Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

174 lines
3.8 KiB

  1. /*************************************************/
  2. /* Common Library Component private include file */
  3. /*************************************************/
  4. BOOL InfIsOpen(VOID);
  5. #define PreCondInfOpen(r) PreCondition(InfIsOpen(),r)
  6. /* INF internal limits
  7. */
  8. #define cSectionsMax 0x1000
  9. #define cKeysMax 0x1000
  10. #define cchpFieldMax 0x2000
  11. #define cchpBig ((CCHP)cbAllocMax)
  12. #define cchpSmall ((CCHP)4*1024)
  13. extern BOOL APIENTRY FFindFirstInfSection(VOID);
  14. extern BOOL APIENTRY FFindNextInfSection(VOID);
  15. extern BOOL APIENTRY FValidSectionLabel(VOID);
  16. extern BOOL APIENTRY FListValue(SZ);
  17. #define SzSkipField(ch, f) SzSkipFieldFromLine(ch,fFalse,f)
  18. #define SzGetField(ch) SzSkipFieldFromLine(ch,fTrue,fFalse)
  19. /*
  20. ** Symbol Table Entry structure
  21. **
  22. ** Fields:
  23. ** psteNext: next STE in linked list.
  24. ** szSymbol: zero terminated symbol string - non-NULL and non-empty.
  25. ** szValue: zero terminated value string - non-NULL.
  26. */
  27. typedef struct _ste
  28. {
  29. struct _ste * psteNext;
  30. SZ szSymbol;
  31. SZ szValue;
  32. } STE;
  33. /* Symbol Table Entry datatypes
  34. */
  35. typedef STE * PSTE;
  36. typedef PSTE * PPSTE;
  37. /* Number of STE structs in each STEB
  38. */
  39. #define cStePerSteb 0x07FF
  40. /*
  41. ** Symbol Table Entry Block structure
  42. **
  43. ** Fields:
  44. ** pstebNext: next STEB in linked list.
  45. ** rgste[]: array of allocated STE structs.
  46. */
  47. typedef struct _steb
  48. {
  49. struct _steb * pstebNext;
  50. STE rgste[cStePerSteb];
  51. } STEB;
  52. /* Symbol Table Entry Block datatypes
  53. */
  54. typedef STEB * PSTEB;
  55. /* Number of hash buckets in symbol hash table (must be a power of 2)
  56. */
  57. #define cHashBuckets 255
  58. /* Number of bytes used in hash function for finding a symbol
  59. */
  60. #define cbBytesToSumForHash ((CB)25) // effectively all chars are used
  61. //
  62. // Symbol table
  63. //
  64. typedef struct _SYMTAB *PSYMTAB;
  65. typedef struct _SYMTAB {
  66. PSTE HashBucket[cHashBuckets]; // Hash Buckets
  67. #ifdef SYMTAB_STATS
  68. UINT BucketCount[cHashBuckets]; // Bucket count in hash table
  69. #endif
  70. } SYMTAB;
  71. extern PSTE psteUnused;
  72. extern PSTEB pstebAllocatedBlocks;
  73. extern PSTE APIENTRY PsteAlloc(VOID);
  74. extern BOOL APIENTRY FFreePste(PSTE);
  75. extern USHORT APIENTRY UsHashFunction(PB);
  76. extern PPSTE APIENTRY PpsteFindSymbol(PSYMTAB, SZ);
  77. extern BOOL APIENTRY FAddSymbolFromInfLineToSymTab(INT Line);
  78. extern PSYMTAB APIENTRY SymTabAlloc(VOID);
  79. extern BOOL APIENTRY FFreeSymTab(PSYMTAB);
  80. extern BOOL APIENTRY FCheckSymTab(PSYMTAB);
  81. extern BOOL APIENTRY FValidFATPathChar(CHP);
  82. #define PreCondFlowInit(r) PreCondition(psptFlow!=(PSPT)NULL,r)
  83. /*
  84. ** Evaluation Return Code datatype
  85. */
  86. typedef unsigned ERC; // 1632 was USHORT
  87. #define ercError 0
  88. #define ercTrue 1
  89. #define ercFalse 2
  90. /*
  91. ** Evaluate Compare Mode datatype
  92. */
  93. typedef USHORT ECM;
  94. #define ecmError 0
  95. #define ecmIfStr 1
  96. #define ecmIfStrI 2
  97. #define ecmIfInt 3
  98. #define ecmIfContains 4
  99. #define ecmIfContainsI 5
  100. extern BOOL APIENTRY FSkipToElse(INT *Line,HWND hwndParent);
  101. extern BOOL APIENTRY FSkipToEnd(INT *Line,HWND hwndParent);
  102. extern ERC APIENTRY ErcEvaluateCompare(HWND, ECM, SZ, SZ, SZ);
  103. /* Stack Element For Loop */
  104. typedef struct _sefl
  105. {
  106. struct _sefl * pseflNext;
  107. UINT iStartLine;
  108. RGSZ rgszList;
  109. UINT iItemCur;
  110. SZ szDollarSav;
  111. SZ szPoundSav;
  112. } SEFL;
  113. typedef SEFL * PSEFL;
  114. typedef PSEFL * PPSEFL;
  115. extern PSEFL pseflHead;
  116. extern PSEFL APIENTRY PseflAlloc(VOID);
  117. extern BOOL APIENTRY FFreePsefl(PSEFL);
  118. extern BOOL APIENTRY FSkipToEndOfLoop(INT *Line,HWND hwndParent);
  119. extern BOOL APIENTRY FInitForLoop(INT *Line,HWND hwndParent,SZ List);
  120. extern BOOL APIENTRY FContinueForLoop(INT *Line,HWND hwndParent);
  121. extern SZ APIENTRY SzProcessSz(HWND, SZ);
  122. extern BOOL fSilentSystem;