home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / lib / xp / xp_mesgp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.1 KB  |  78 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19.  
  20. /*-----------------------------------------------------------------------------
  21.     Private Typesdefs, Globals, Etc
  22. -----------------------------------------------------------------------------*/
  23.  
  24. #if 1
  25. # define VA_START_UGLINESS
  26. #endif
  27.  
  28. #include <stdarg.h>
  29.  
  30. #ifndef _XP_Message_Private_
  31. #define _XP_Message_Private_
  32.  
  33. #define MessageArgsMax 9
  34.  
  35. typedef enum { matString, matInteger, matLiteral }  xpm_ArgType;
  36. typedef struct xpm_Args_ xpm_Args;
  37.  
  38. typedef long xpm_Integer;
  39.  
  40. #if !defined(DEBUG) && (defined(__cplusplus) || defined(__gcc))
  41. # ifndef INLINE
  42. #  define INLINE inline
  43. # endif
  44. #else
  45. # define INLINE static
  46. #endif
  47.  
  48. struct xpm_Args_ {
  49.     int                sizes [MessageArgsMax];
  50.     xpm_ArgType        types [MessageArgsMax];
  51. #ifdef VA_START_UGLINESS
  52.     va_list         stack;
  53. #endif
  54.     const char **     start;
  55.     int                max;
  56. };
  57.  
  58. /*-----------------------------------------------------------------------------
  59.     streams interface to processing format strings
  60. -----------------------------------------------------------------------------*/
  61.  
  62. typedef struct OutputStream_ OutputStream;
  63.  
  64. typedef void 
  65. WriteLiteral (OutputStream * o, char c);
  66.  
  67. typedef void
  68. WriteArgument (OutputStream * o, char c, int argument);
  69.  
  70. struct OutputStream_ {
  71.     WriteLiteral *    writeLiteral;
  72.     WriteArgument*    writeArgument;
  73.     xpm_Args *        args;
  74. };
  75.  
  76. #endif /* _XP_Message_Private_ */
  77.  
  78.