home *** CD-ROM | disk | FTP | other *** search
/ Network Support Encyclopedia 96-1 / novell-nsepro-1996-1-cd2.iso / download / netware / os2hdr.exe / NWCONFIG.H < prev    next >
C/C++ Source or Header  |  1993-07-26  |  2KB  |  82 lines

  1. /*--------------------------------------------------------------------------
  2.      (C) Copyright Novell, Inc. 1991  All Rights Reserved.
  3.  
  4.  No part of this file may be duplicated, revised, translated, localized or
  5.  modified in any manner or compiled, linked, or uploaded or downloaded to or
  6.  from any computer system without the prior written consent of Novell, Inc.
  7. --------------------------------------------------------------------------*/
  8. #define T_OPTIONAL    0x80
  9.  
  10. #define T_NUMBER      0x01
  11. #define T_INDEX       0x02
  12. #define T_STRING      0x03
  13. #define T_HEX_STRING  0x04
  14. #define T_HEX_NUMBER  0x05
  15. #define T_LONG_NUMBER 0x06
  16. #define T_LONG_HEX    0x07
  17.  
  18. #define T_SET_1       0x10
  19. #define T_SET_2       0x11
  20. #define T_SET_3       0x12
  21. #define T_SET_4       0x13
  22. #define T_SET_5       0x14
  23. #define T_SET_6       0x15
  24. #define T_SET_7       0x16
  25. #define T_SET_8       0x17
  26. #define T_SET_9       0x18
  27. #define T_SET_10      0x19
  28. #define T_SET_11      0x1A
  29. #define T_SET_12      0x1B
  30. #define T_SET_13      0x1C
  31. #define T_SET_14      0x1D
  32. #define T_SET_15      0x1E
  33. #define T_SET_16      0x1F
  34.  
  35. #define MAX_PARAMETERS        8
  36. #define MAX_SECTION_NAME_SIZE 32
  37. #define MAX_VALUE_SIZE        80
  38. #define MAX_SET_ELEMENTS      20
  39.  
  40. typedef struct
  41. {
  42.   INT16 numberOfElements;
  43.   INT16 NWPTR elementCode;
  44.   char NWPTR NWPTR elementName;
  45.   INT16 NWPTR elementValue;
  46. } SetTableStruct;
  47.  
  48. typedef struct
  49. {
  50.   INT16 paramType;
  51.   long defaultValue;
  52. } TypeDefaultStruct;
  53.  
  54. typedef union
  55. {
  56.   char NWPTR string;
  57.   unsigned INT16 number;
  58.   unsigned long longNumber;
  59. } PARAMETER_TABLE_TYPE;
  60.  
  61. typedef struct
  62. {
  63.   INT16 keywordCode;
  64.   char NWPTR keyword;
  65.   void (NWPTR function)(PARAMETER_TABLE_TYPE NWPTR );
  66.   TypeDefaultStruct typeDefault[MAX_PARAMETERS];
  67. } GrammarTableStruct;
  68.  
  69. #ifdef __cplusplus
  70. extern "C" {
  71. #endif
  72. INT16 NWAPI NWParseConfig(
  73.   PCHAR configFile,
  74.   PCHAR sectionName,
  75.   UINT  sectionInstance,
  76.   UINT  grammarTableSize,
  77.   GrammarTableStruct NWPTR grammarTable,
  78.   SetTableStruct NWPTR setTable);
  79. #ifdef __cplusplus
  80. }
  81. #endif
  82.