Leaked source code of windows server 2003
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.

1144 lines
29 KiB

  1. // Copyright (c) 1996-1999 Microsoft Corporation
  2. /* declares.h - functions declarations
  3. History of Changes
  4. 9/30/98 --hsingh--
  5. Added delcaration of function BsetUQMFlag(). This function
  6. enables making the UpdateQualityMacro? keyword optional in
  7. .gpd file.
  8. Bug Report 225088
  9. */
  10. // ---- functions defined in command.c ---- //
  11. BOOL BprocessParam(
  12. IN PABSARRAYREF paarValue,
  13. IN PARRAYREF parStrValue,
  14. IN OUT PGLOBL pglobl) ;
  15. BOOL BparseCommandString(
  16. IN PABSARRAYREF paarValue,
  17. IN PARRAYREF parStrValue,
  18. IN OUT PGLOBL pglobl
  19. ) ;
  20. BOOL BconstructRPNtokenStream(
  21. IN OUT PABSARRAYREF paarValue,
  22. OUT PARRAYREF parRPNtokenStream,
  23. IN OUT PGLOBL pglobl) ;
  24. VOID VinitOperPrecedence(
  25. IN OUT PGLOBL pglobl);
  26. BOOL BparseArithmeticToken(
  27. IN OUT PABSARRAYREF paarValue,
  28. OUT PTOKENSTREAM ptstr,
  29. PGLOBL pglobl
  30. ) ;
  31. BOOL BparseDigits(
  32. IN OUT PABSARRAYREF paarValue,
  33. OUT PTOKENSTREAM ptstr ) ;
  34. BOOL BparseParamKeyword(
  35. IN OUT PABSARRAYREF paarValue,
  36. OUT PTOKENSTREAM ptstr,
  37. PGLOBL pglobl ) ;
  38. BOOL BcmpAARtoStr(
  39. PABSARRAYREF paarStr1,
  40. PBYTE str2) ;
  41. // ---- functions defined in constrnt.c ---- //
  42. BOOL BparseConstraint(
  43. PABSARRAYREF paarValue,
  44. PDWORD pdwExistingCList, // index of start of contraint list.
  45. BOOL bCreate,
  46. PGLOBL pglobl) ;
  47. BOOL BexchangeDataInFOATNode(
  48. DWORD dwFeature,
  49. DWORD dwOption,
  50. DWORD dwFieldOff, // offset of field in FeatureOption struct
  51. PDWORD pdwOut, // previous contents of attribute node
  52. PDWORD pdwIn,
  53. BOOL bSynthetic, // access synthetic features
  54. PGLOBL pglobl
  55. ) ;
  56. BOOL BparseInvalidCombination(
  57. PABSARRAYREF paarValue,
  58. DWORD dwFieldOff,
  59. PGLOBL pglobl) ;
  60. BOOL BparseInvalidInstallableCombination1(
  61. PABSARRAYREF paarValue,
  62. DWORD dwFieldOff,
  63. PGLOBL pglobl) ;
  64. // ---- functions defined in framwrk.c ---- //
  65. VOID VinitMainKeywordTable(
  66. PGLOBL pglobl) ;
  67. VOID VinitValueToSize(
  68. PGLOBL pglobl) ;
  69. VOID VinitGlobals(
  70. DWORD dwVerbosity,
  71. PGLOBL pglobl);
  72. BOOL BpreAllocateObjects(
  73. PGLOBL pglobl) ;
  74. BOOL BreturnBuffers(
  75. PGLOBL pglobl) ;
  76. BOOL BallocateCountableObjects(
  77. PGLOBL pglobl) ;
  78. BOOL BinitPreAllocatedObjects(
  79. PGLOBL pglobl) ;
  80. BOOL BinitCountableObjects(
  81. PGLOBL pglobl) ;
  82. BOOL BcreateGPDbinary(
  83. PWSTR pwstrFileName,
  84. DWORD dwVerbosity ) ;
  85. BOOL BpostProcess(
  86. PWSTR pwstrFileName ,
  87. PGLOBL pglobl) ;
  88. BOOL BconsolidateBuffers(
  89. PWSTR pwstrFileName ,
  90. PGLOBL pglobl) ;
  91. BOOL BexpandMemConfigShortcut(DWORD dwSubType) ;
  92. BOOL BexpandCommandShortcut(DWORD dwSubType) ;
  93. // ---- functions defined in helper1.c ---- //
  94. PTSTR pwstrGenerateGPDfilename(
  95. PTSTR ptstrSrcFilename
  96. ) ;
  97. PCOMMAND
  98. CommandPtr(
  99. IN PGPDDRIVERINFO pGPDDrvInfo,
  100. IN DWORD UniCmdID
  101. ) ;
  102. BOOL
  103. InitDefaultOptions(
  104. IN PRAWBINARYDATA pnRawData,
  105. OUT POPTSELECT poptsel,
  106. IN INT iMaxOptions,
  107. IN INT iMode
  108. ) ;
  109. BOOL
  110. SeparateOptionArray(
  111. IN PRAWBINARYDATA pnRawData,
  112. IN POPTSELECT pCombinedOptions,
  113. OUT POPTSELECT pOptions,
  114. IN INT iMaxOptions,
  115. IN INT iMode
  116. ) ;
  117. BOOL
  118. CombineOptionArray(
  119. IN PRAWBINARYDATA pnRawData,
  120. OUT POPTSELECT pCombinedOptions,
  121. IN INT iMaxOptions,
  122. IN POPTSELECT pDocOptions,
  123. IN POPTSELECT pPrinterOptions
  124. ) ;
  125. PINFOHEADER
  126. UpdateBinaryData(
  127. IN PRAWBINARYDATA pnRawData,
  128. IN PINFOHEADER pInfoHdr,
  129. IN POPTSELECT poptsel
  130. ) ;
  131. BOOL
  132. ReconstructOptionArray(
  133. IN PRAWBINARYDATA pnRawData,
  134. IN OUT POPTSELECT pOptions,
  135. IN INT iMaxOptions,
  136. IN DWORD dwFeatureIndex,
  137. IN PBOOL pbSelectedOptions
  138. ) ;
  139. BOOL
  140. ChangeOptionsViaID(
  141. IN PINFOHEADER pInfoHdr ,
  142. IN OUT POPTSELECT pOptions,
  143. IN DWORD dwFeatureID,
  144. IN PDEVMODE pDevmode
  145. ) ;
  146. BOOL BMapDmColorToOptIndex(
  147. PINFOHEADER pInfoHdr ,
  148. IN OUT PDWORD pdwOptIndex , // is current setting ok?
  149. // if not return new index to caller
  150. DWORD dwDmColor // what is requested in Devmode
  151. ) ;
  152. BOOL BMapOptIDtoOptIndex(
  153. PINFOHEADER pInfoHdr ,
  154. OUT PDWORD pdwOptIndex , // return index to caller
  155. DWORD dwFeatureGID,
  156. DWORD dwOptID
  157. ) ;
  158. BOOL BMapPaperDimToOptIndex(
  159. PINFOHEADER pInfoHdr ,
  160. OUT PDWORD pdwOptIndex , // return index to caller
  161. DWORD dwWidth, // in Microns
  162. DWORD dwLength, // in Microns
  163. OUT PDWORD pdwOptionIndexes
  164. ) ;
  165. BOOL BMapResToOptIndex(
  166. PINFOHEADER pInfoHdr ,
  167. OUT PDWORD pdwOptIndex , // return index to caller
  168. DWORD dwXres,
  169. DWORD dwYres
  170. ) ;
  171. BOOL BGIDtoFeaIndex(
  172. PINFOHEADER pInfoHdr ,
  173. PDWORD pdwFeaIndex ,
  174. DWORD dwFeatureGID ) ;
  175. DWORD
  176. MapToDeviceOptIndex(
  177. IN PINFOHEADER pInfoHdr ,
  178. IN DWORD dwFeatureID,
  179. IN LONG lParam1,
  180. IN LONG lParam2,
  181. OUT PDWORD pdwOptionIndexes
  182. ) ;
  183. BOOL
  184. CheckFeatureOptionConflict(
  185. IN PRAWBINARYDATA pnRawData,
  186. IN DWORD dwFeature1,
  187. IN DWORD dwOption1,
  188. IN DWORD dwFeature2,
  189. IN DWORD dwOption2
  190. ) ;
  191. BOOL
  192. ResolveUIConflicts(
  193. IN PRAWBINARYDATA pnRawData,
  194. IN OUT POPTSELECT pOptions,
  195. IN INT iMaxOptions,
  196. IN INT iMode
  197. ) ;
  198. BOOL
  199. EnumEnabledOptions(
  200. IN PRAWBINARYDATA pnRawData,
  201. IN POPTSELECT pOptions,
  202. IN DWORD dwFeatureIndex,
  203. OUT PBOOL pbEnabledOptions ,
  204. IN INT iMode
  205. ) ;
  206. BOOL
  207. EnumOptionsUnconstrainedByPrinterSticky(
  208. IN PRAWBINARYDATA pnRawData,
  209. IN POPTSELECT pOptions,
  210. IN DWORD dwFeatureIndex,
  211. OUT PBOOL pbEnabledOptions
  212. ) ;
  213. BOOL
  214. EnumNewUIConflict(
  215. IN PRAWBINARYDATA pnRawData,
  216. IN POPTSELECT pOptions,
  217. IN DWORD dwFeatureIndex,
  218. IN PBOOL pbSelectedOptions,
  219. OUT PCONFLICTPAIR pConflictPair
  220. ) ;
  221. BOOL
  222. EnumNewPickOneUIConflict(
  223. IN PRAWBINARYDATA pnRawData,
  224. IN POPTSELECT pOptions,
  225. IN DWORD dwFeatureIndex,
  226. IN DWORD dwOptionIndex,
  227. OUT PCONFLICTPAIR pConflictPair
  228. ) ;
  229. BOOL
  230. BIsFeaOptionCurSelected(
  231. IN POPTSELECT pOptions,
  232. IN DWORD dwFeatureIndex,
  233. IN DWORD dwOptionIndex
  234. ) ;
  235. BOOL
  236. BSelectivelyEnumEnabledOptions(
  237. IN PRAWBINARYDATA pnRawData,
  238. IN POPTSELECT pOptions,
  239. IN DWORD dwFeatureIndex,
  240. IN PBOOL pbHonorConstraints, // if non NULL
  241. // points to array of BOOL corresponding to each feature.
  242. // if TRUE means constraint involving this feature is
  243. // to be honored. Otherwise ignore the constraint.
  244. OUT PBOOL pbEnabledOptions, // assume uninitialized
  245. // if pConflictPair is NULL else contains current or proposed
  246. // selections. We will leave this array unchanged in this case.
  247. IN DWORD dwOptSel, // if pConflictPair exists but pbEnabledOptions
  248. // is NULL, assume pickone and dwOptSel holds that selection for
  249. // the feature: dwFeatureIndex.
  250. OUT PCONFLICTPAIR pConflictPair // if present, pbEnabledOptions
  251. // actually lists the current selections. Function then
  252. // exits after encountering the first conflict.
  253. // if a conflict exists, all fields in pConflictPair
  254. // will be properly initialized else dwFeatureIndex1 = -1
  255. // the return value will be TRUE regardless.
  256. ) ;
  257. BOOL
  258. BEnumImposedConstraintsOnFeature
  259. (
  260. IN PRAWBINARYDATA pnRawData,
  261. IN DWORD dwTgtFeature,
  262. IN DWORD dwFeature2,
  263. IN DWORD dwOption2,
  264. OUT PBOOL pbEnabledOptions,
  265. OUT PCONFLICTPAIR pConflictPair // if present, pbEnabledOptions
  266. ) ;
  267. DWORD DwFindNodeInCurLevel(
  268. PATTRIB_TREE patt , // start of ATTRIBUTE tree array.
  269. PATREEREF patr , // index to a level in the attribute tree.
  270. DWORD dwOption // search current level for this option
  271. ) ;
  272. BOOL BIsConstraintActive(
  273. IN PCONSTRAINTS pcnstr , // root of Constraint nodes
  274. IN DWORD dwCNode, // first constraint node in list.
  275. IN PBOOL pbHonorConstraints, // if non NULL
  276. IN POPTSELECT pOptions,
  277. OUT PCONFLICTPAIR pConflictPair ) ;
  278. // ---- functions defined in installb.c ---- //
  279. DWORD DwCountSynthFeatures(
  280. IN BOOL (*fnBCreateFeature)(DWORD, DWORD, DWORD, PGLOBL ) , // callback
  281. IN OUT PGLOBL pglobl
  282. ) ;
  283. BOOL BCreateSynthFeatures(
  284. IN DWORD dwFea, // index of installable feature
  285. IN DWORD dwOpt, // index of installable Option or set to INVALID_INDEX
  286. IN DWORD dwSynFea,
  287. IN OUT PGLOBL pglobl) ;
  288. BOOL BEnableInvInstallableCombos(
  289. PGLOBL pglobl);
  290. // ---- functions defined in postproc.c ---- //
  291. DWORD dwFindLastNode(
  292. DWORD dwFirstNode,
  293. PGLOBL pglobl) ;
  294. BOOL BappendCommonFontsToPortAndLandscape(
  295. PGLOBL pglobl) ;
  296. BOOL BinitSpecialFeatureOptionFields(
  297. PGLOBL pglobl) ;
  298. BOOL BIdentifyConstantString(
  299. IN PARRAYREF parString,
  300. OUT PDWORD pdwDest, // write dword value here.
  301. IN DWORD dwClassIndex, // which class of constant is this?
  302. BOOL bCustomOptOK,
  303. IN PGLOBL pglobl
  304. ) ;
  305. BOOL BReadDataInGlobalNode(
  306. PATREEREF patr, // address of field in GlobalAttrib struct
  307. PDWORD pdwHeapOffset,
  308. PGLOBL pglobl) ;
  309. BOOL BsetUQMFlag(
  310. PGLOBL pglobl);
  311. VOID VCountPrinterDocStickyFeatures(
  312. PGLOBL pglobl) ;
  313. BOOL BConvertSpecVersionToDWORD(
  314. PWSTR pwstrFileName ,
  315. PGLOBL pglobl) ;
  316. BOOL BinitMiniRawBinaryData(
  317. PGLOBL pglobl) ;
  318. BOOL BexchangeArbDataInFOATNode(
  319. DWORD dwFeature,
  320. DWORD dwOption,
  321. DWORD dwFieldOff, // offset of field in FeatureOption struct
  322. DWORD dwCount, // number bytes to copy.
  323. OUT PBYTE pubOut, // previous contents of attribute node
  324. IN PBYTE pubIn, // new contents of attribute node.
  325. PBOOL pbPrevsExists, // previous contents existed.
  326. BOOL bSynthetic, // access synthetic features
  327. PGLOBL pglobl
  328. ) ;
  329. BOOL BInitPriorityArray(
  330. PGLOBL pglobl) ;
  331. // ---- functions defined in semanchk.c ---- //
  332. BOOL
  333. BCheckGPDSemantics(
  334. IN PINFOHEADER pInfoHdr,
  335. POPTSELECT poptsel // assume fully initialized
  336. ) ;
  337. // ---- functions defined in snapshot.c ---- //
  338. PINFOHEADER PINFOHDRcreateSnapshot(
  339. PBYTE pubnRaw, // raw binary data. PSTATIC. BETA2
  340. POPTSELECT poptsel // assume fully initialized
  341. ) ;
  342. BOOL BinitOptionFields(
  343. PBYTE pubDestOption, // ptr to some type of option structure.
  344. PBYTE pubDestOptionEx, // option extra structure if any.
  345. PBYTE pubnRaw, // raw binary data.
  346. DWORD dwFea,
  347. DWORD dwOpt,
  348. POPTSELECT poptsel , // assume fully initialized
  349. PINFOHEADER pInfoHdr, // used to access global structure.
  350. BOOL bUpdate // if true only update selected fields.
  351. ) ;
  352. BOOL BinitUIinfo(
  353. PUIINFO pUIinfo ,
  354. PBYTE pubnRaw, // PSTATIC. BETA2
  355. POPTSELECT poptsel, // assume fully initialized
  356. BOOL bUpdate // if true only update selected fields.
  357. ) ;
  358. BOOL BinitFeatures(
  359. PFEATURE pFeaturesDest,
  360. PDFEATURE_OPTIONS pfoSrc,
  361. PBYTE pubnRaw, // raw binary data.
  362. POPTSELECT poptsel, // assume fully initialized
  363. BOOL bUpdate // if true only update selected fields.
  364. ) ;
  365. BOOL BinitGlobals(
  366. PGLOBALS pGlobals,
  367. PBYTE pubnRaw, // raw binary data.
  368. POPTSELECT poptsel, // assume fully initialized
  369. BOOL bUpdate // if true only update selected fields.
  370. ) ;
  371. BOOL BinitCommandTable(
  372. PDWORD pdwCmdTable, // dest array
  373. PBYTE pubnRaw, // raw binary data.
  374. POPTSELECT poptsel // assume fully initialized
  375. ) ;
  376. BOOL BinitRawData(
  377. PRAWBINARYDATA pRawData, // contained in INFOHEADER.
  378. PBYTE pubnRaw // Parser's raw binary data.
  379. ) ;
  380. BOOL BinitGPDdriverInfo(
  381. PGPDDRIVERINFO pGPDdriverInfo,
  382. PBYTE pubnRaw, // raw binary data.
  383. POPTSELECT poptsel // assume fully initialized
  384. ) ;
  385. BOOL BinitSequencedCmds(
  386. PGPDDRIVERINFO pGPDdriverInfo,
  387. PBYTE pubnRaw, // raw binary data.
  388. POPTSELECT poptsel // assume fully initialized
  389. ) ;
  390. BOOL BaddSequencedCmdToList(
  391. DWORD dwCmdIn, // index of a command in CommandArray
  392. PGPDDRIVERINFO pGPDdriverInfo,
  393. DWORD dwNewListNode, // an unused listnode to add to the list.
  394. PBYTE pubnRaw // raw binary data.
  395. ) ;
  396. BinitDefaultOptionArray(
  397. POPTSELECT poptsel, // assume is large enough
  398. PBYTE pubnRaw) ;
  399. TRISTATUS EdetermineDefaultOption(
  400. PBYTE pubnRaw, // start of Rawbinary data
  401. DWORD dwFeature, // determine the default for this feature
  402. PDFEATURE_OPTIONS pfo,
  403. POPTSELECT poptsel, // assume is large enough
  404. PDWORD pdwPriority) ;
  405. VOID VtileDefault(
  406. PBYTE pubDest,
  407. DWORD dwDefault,
  408. DWORD dwBytes) ;
  409. VOID VtransferValue(
  410. OUT PBYTE pubDest,
  411. IN PBYTE pubSrc ,
  412. IN DWORD dwBytes,
  413. IN DWORD dwFlags,
  414. IN DWORD dwDefaultValue, // holds bit flag value.
  415. IN PBYTE pubHeap ) ; // used to form ptr if SSF_MAKE_STRINGPTR
  416. BOOL BspecialProcessOption(
  417. PBYTE pubnRaw, // start of Rawbinary data
  418. PBYTE pubDestOption, // ptr to some type of option structure.
  419. PBYTE pubDestOptionEx,
  420. PDFEATURE_OPTIONS pfo , // source data
  421. IN POPTSELECT poptsel, // option array which determines path
  422. // through atr.
  423. PINFOHEADER pInfoHdr, // used to access global structure.
  424. DWORD dwFea, // feature index
  425. DWORD dwOpt,
  426. BOOL bDefaultOpt
  427. ) ;
  428. TRISTATUS EextractValueFromTree(
  429. PBYTE pubnRaw, // start of Rawbinary data
  430. DWORD dwSSTableIndex, // some info about this value.
  431. OUT PBYTE pubDest, // write value or link here
  432. OUT PDWORD pdwUnresolvedFeature, // if the attribute tree has
  433. // a dependency on this feature and the current option
  434. // for that feature is not defined in poptsel, this
  435. // function will write the index of the required
  436. // feature in pdwUnresolvedFeature.
  437. IN ATREEREF atrRoot, // root of attribute tree to navigate.
  438. IN POPTSELECT poptsel, // option array which determines path
  439. // through atr. may be filled with OPTION_INDEX_ANY
  440. // if we are jumpstarting
  441. IN DWORD dwFeature,
  442. IN OUT PDWORD pdwNextOpt // if multiple options are selected
  443. // for dwFeature, pdwNextOpt points to the Nth option to consider
  444. // in the poptsel list, at return time, this value
  445. // is incremented if there are remaining options selected,
  446. // else is reset to zero.
  447. // For the first call, or PICKONE features,
  448. // this value must be set to zero.
  449. ) ;
  450. BOOL RaisePriority(
  451. DWORD dwFeature1,
  452. DWORD dwFeature2,
  453. PBYTE pubnRaw,
  454. PDWORD pdwPriority) ;
  455. DWORD dwNumOptionSelected(
  456. IN DWORD dwNumFeatures,
  457. IN POPTSELECT poptsel
  458. ) ;
  459. BOOL BinitSnapShotIndexTable(PBYTE pubnRaw) ;
  460. BOOL BinitSizeOptionTables(PBYTE pubnRaw) ;
  461. PRAWBINARYDATA
  462. LoadRawBinaryData (
  463. IN PTSTR ptstrDataFilename
  464. ) ;
  465. PRAWBINARYDATA
  466. GpdLoadCachedBinaryData(
  467. PTSTR ptstrGpdFilename
  468. ) ;
  469. VOID
  470. UnloadRawBinaryData (
  471. IN PRAWBINARYDATA pnRawData
  472. ) ;
  473. PINFOHEADER
  474. InitBinaryData(
  475. IN PRAWBINARYDATA pnRawData, // actually pStatic
  476. IN PINFOHEADER pInfoHdr,
  477. IN POPTSELECT pOptions
  478. ) ;
  479. VOID
  480. FreeBinaryData(
  481. IN PINFOHEADER pInfoHdr
  482. ) ;
  483. BOOL BIsRawBinaryDataInDate(
  484. IN PBYTE pubRaw) ; // this is pointer to memory mapped file! BETA2
  485. BOOL BgetLocFeaOptIndex(
  486. IN PRAWBINARYDATA pnRawData,
  487. OUT PDWORD pdwFea,
  488. OUT PDWORD pdwOptIndex
  489. );
  490. BOOL BgetLocFeaIndex(
  491. IN PRAWBINARYDATA pnRawData,
  492. OUT PDWORD pdwFea
  493. );
  494. BOOL BfindMatchingOrDefaultNode(
  495. IN PATTRIB_TREE patt , // start of ATTRIBUTE tree array.
  496. IN OUT PDWORD pdwNodeIndex, // Points to first node in chain
  497. IN DWORD dwOptionID // may even take on the value DEFAULT_INIT
  498. ) ;
  499. // ---- functions defined in snaptbl.c ---- //
  500. DWORD DwInitSnapShotTable1(
  501. PBYTE pubnRaw) ;
  502. DWORD DwInitSnapShotTable2(
  503. PBYTE pubnRaw,
  504. DWORD dwI) ;
  505. // ---- functions defined in state1.c ---- //
  506. BOOL BInterpretTokens(
  507. PTKMAP ptkmap, // pointer to tokenmap
  508. BOOL bFirstPass, // is this the first or 2nd time around?
  509. PGLOBL pglobl
  510. ) ;
  511. BOOL BprocessSpecialKeyword(
  512. PTKMAP ptkmap, // pointer to tokenmap
  513. BOOL bFirstPass, // is this the first or 2nd time around?
  514. PGLOBL pglobl
  515. ) ;
  516. BOOL BprocessSymbolKeyword(
  517. PTKMAP ptkmap, // pointer to current entry in tokenmap
  518. PGLOBL pglobl
  519. ) ;
  520. VOID VinitAllowedTransitions(
  521. PGLOBL pglobl) ;
  522. BOOL BpushState(
  523. PTKMAP ptkmap, // pointer to current entry in tokenmap
  524. BOOL bFirstPass,
  525. PGLOBL pglobl
  526. ) ;
  527. BOOL BchangeState(
  528. PTKMAP ptkmap, // pointer to construct in tokenmap
  529. CONSTRUCT eConstruct, // this will induce a transition to NewState
  530. STATE stOldState,
  531. BOOL bSymbol, // should dwValue be saved as a SymbolID ?
  532. BOOL bFirstPass,
  533. PGLOBL pglobl
  534. ) ;
  535. DWORD DWregisterSymbol(
  536. PABSARRAYREF paarSymbol, // the symbol string to register
  537. CONSTRUCT eConstruct , // type of construct determines class of symbol.
  538. BOOL bCopy, // shall we copy paarSymbol to heap? May set
  539. DWORD dwFeatureID, // if you are registering an option symbol
  540. PGLOBL pglobl
  541. ) ;
  542. BOOL BaddAARtoHeap(
  543. PABSARRAYREF paarSrc,
  544. PARRAYREF parDest,
  545. DWORD dwAlign,
  546. PGLOBL pglobl) ;
  547. BOOL BwriteToHeap(
  548. OUT PDWORD pdwDestOff, // heap offset of dest string
  549. PBYTE pubSrc, // points to src string
  550. DWORD dwCnt, // num bytes to copy from src to dest.
  551. DWORD dwAlign,
  552. PGLOBL pglobl) ;
  553. DWORD DWsearchSymbolListForAAR(
  554. PABSARRAYREF paarSymbol,
  555. DWORD dwNodeIndex,
  556. PGLOBL pglobl) ;
  557. DWORD DWsearchSymbolListForID(
  558. DWORD dwSymbolID, // find node containing this ID.
  559. DWORD dwNodeIndex,
  560. PGLOBL pglobl) ;
  561. BOOL BCmpAARtoAR(
  562. PABSARRAYREF paarStr1,
  563. PARRAYREF parStr2,
  564. PGLOBL pglobl) ;
  565. BOOL BpopState(
  566. PGLOBL pglobl) ;
  567. VOID VinitDictionaryIndex(
  568. PGLOBL pglobl) ;
  569. VOID VcharSubstitution(
  570. PABSARRAYREF paarStr,
  571. BYTE ubTgt,
  572. BYTE ubReplcmnt,
  573. PGLOBL pglobl) ;
  574. VOID VIgnoreBlock(
  575. PTKMAP ptkmap,
  576. BOOL bIgnoreBlock,
  577. PGLOBL pglobl) ;
  578. // ---- functions defined in state2.c ---- //
  579. BOOL BprocessAttribute(
  580. PTKMAP ptkmap, // pointer to tokenmap
  581. PGLOBL pglobl
  582. ) ;
  583. BOOL BstoreFontCartAttrib(
  584. PTKMAP ptkmap, // pointer to tokenmap
  585. PGLOBL pglobl
  586. ) ;
  587. BOOL BstoreTTFontSubAttrib(
  588. PTKMAP ptkmap, // pointer to tokenmap
  589. PGLOBL pglobl
  590. ) ;
  591. BOOL BstoreCommandAttrib(
  592. PTKMAP ptkmap, // pointer to tokenmap
  593. PGLOBL pglobl
  594. ) ;
  595. BOOL BstoreFeatureOptionAttrib(
  596. PTKMAP ptkmap, // pointer to tokenmap
  597. PGLOBL pglobl
  598. ) ;
  599. BOOL BstoreGlobalAttrib(
  600. PTKMAP ptkmap, // pointer to tokenmap
  601. PGLOBL pglobl
  602. ) ;
  603. BOOL BaddBranchToTree(
  604. PTKMAP ptkmap, // pointer to tokenmap
  605. PATREEREF patrAttribRoot, // pointer to dword with index
  606. PGLOBL pglobl
  607. ) ;
  608. BOOL BcreateGlobalInitializerNode(
  609. PDWORD pdwNodeIndex,
  610. DWORD dwOffset,
  611. PGLOBL pglobl) ;
  612. BOOL BcreateEndNode(
  613. PDWORD pdwNodeIndex,
  614. DWORD dwFeature,
  615. DWORD dwOption,
  616. PGLOBL pglobl
  617. ) ;
  618. BOOL BfindOrCreateMatchingNode(
  619. IN DWORD dwRootNodeIndex , // first node in chain matching feature
  620. OUT PDWORD pdwNodeIndex, // points to node in chain also matching option
  621. DWORD dwFeatureID, //
  622. DWORD dwOptionID, // may even take on the value DEFAULT_INIT
  623. PGLOBL pglobl
  624. ) ;
  625. BOOL BfindMatchingNode(
  626. IN DWORD dwRootNodeIndex , // first node in chain matching feature
  627. OUT PDWORD pdwNodeIndex, // points to node in chain also matching option
  628. DWORD dwFeatureID,
  629. DWORD dwOptionID, // may even take on the value DEFAULT_INIT
  630. PGLOBL pglobl
  631. ) ;
  632. BOOL BallocElementFromMasterTable(
  633. MT_INDICIES eMTIndex, // select type of structure desired.
  634. PDWORD pdwNodeIndex,
  635. PGLOBL pglobl) ;
  636. BOOL BreturnElementFromMasterTable(
  637. MT_INDICIES eMTIndex, // select type of structure desired.
  638. DWORD dwNodeIndex,
  639. PGLOBL pglobl) ;
  640. BOOL BconvertSymCmdIDtoUnidrvID(
  641. IN DWORD dwCommandID , // from RegisterSymbol
  642. OUT PDWORD pdwUnidrvID,
  643. PGLOBL pglobl
  644. ) ;
  645. // ---- functions defined in token1.c ---- //
  646. BOOL BcreateTokenMap(
  647. PWSTR pwstrFileName,
  648. PGLOBL pglobl ) ;
  649. PARSTATE PARSTscanForKeyword(
  650. PDWORD pdwTKMindex,
  651. PGLOBL pglobl) ;
  652. PARSTATE PARSTparseColon(
  653. PDWORD pdwTKMindex,
  654. PGLOBL pglobl) ;
  655. PARSTATE PARSTparseValue(
  656. PDWORD pdwTKMindex,
  657. PGLOBL pglobl) ;
  658. BOOL BparseKeyword(
  659. DWORD dwTKMindex,
  660. PGLOBL pglobl) ;
  661. BOOL BisExternKeyword(
  662. DWORD dwTKMindex,
  663. PGLOBL pglobl) ;
  664. BOOL BisColonNext(
  665. PGLOBL pglobl) ;
  666. BOOL BeatArbitraryWhite(
  667. PGLOBL pglobl) ;
  668. BOOL BeatComment(
  669. PGLOBL pglobl) ;
  670. BOOL BscanStringSegment(
  671. PGLOBL pglobl) ;
  672. BOOL BscanDelimitedString(
  673. BYTE ubDelimiter,
  674. PBOOL pbMacroDetected,
  675. PGLOBL pglobl) ;
  676. PARSTATE PARSTrestorePrevsFile(
  677. PDWORD pdwTKMindex,
  678. PGLOBL pglobl) ;
  679. PWSTR
  680. PwstrAnsiToUnicode(
  681. IN PSTR pstrAnsiString ,
  682. PGLOBL pglobl) ;
  683. PARSTATE PARSTloadIncludeFile(
  684. PDWORD pdwTKMindex,
  685. PWSTR pwstrFileName, // root GPD file
  686. PGLOBL pglobl);
  687. BOOL BloadFile(
  688. PWSTR pwstrFileName,
  689. PGLOBL pglobl ) ;
  690. BOOL BarchiveStrings(
  691. DWORD dwTKMindex,
  692. PGLOBL pglobl) ;
  693. DWORD DWidentifyKeyword(
  694. DWORD dwTKMindex,
  695. PGLOBL pglobl) ;
  696. BOOL BidentifyAttributeKeyword(
  697. PTKMAP ptkmap, // pointer to tokenmap
  698. PGLOBL pglobl
  699. ) ;
  700. BOOL BcopyToTmpHeap(
  701. PABSARRAYREF paarDest,
  702. PABSARRAYREF paarSrc,
  703. PGLOBL pglobl) ;
  704. DWORD dwStoreFileName(PWSTR pwstrFileName,
  705. PARRAYREF parDest,
  706. PGLOBL pglobl) ;
  707. VOID vFreeFileNames(
  708. PGLOBL pglobl) ;
  709. VOID vIdentifySource(
  710. PTKMAP ptkmap ,
  711. PGLOBL pglobl) ;
  712. // ---- functions defined in value1.c ---- //
  713. BOOL BaddValueToHeap(
  714. IN OUT PDWORD ploHeap, // dest offset to value in binary form
  715. IN PTKMAP ptkmap, // pointer to tokenmap
  716. IN BOOL bOverWrite, // assume ploHeap contains a valid offset
  717. // to a reserved region of the heap of the proper size
  718. // and write binary value into this location instead of
  719. // growing heap. Note: defer overwriting lpHeap
  720. // until we are certain of success.
  721. IN OUT PGLOBL pglobl
  722. ) ;
  723. BOOL BparseAndWrite(
  724. IN PBYTE pubDest, // write binary data or link to this address.
  725. IN PTKMAP ptkmap, // pointer to tokenmap
  726. IN BOOL bAddToHeap, // if true, write to curHeap not pubDest
  727. OUT PDWORD pdwHeapOffset, // if (bAddToHeap) heap offset where
  728. IN OUT PGLOBL pglobl
  729. ) ;
  730. BOOL BparseInteger(
  731. IN PABSARRAYREF paarValue,
  732. IN PDWORD pdwDest, // write dword value here.
  733. IN VALUE eAllowedValue, // dummy
  734. IN PGLOBL pglobl
  735. ) ;
  736. BOOL BparseList(
  737. IN PABSARRAYREF paarValue,
  738. IN PDWORD pdwDest, // location where index to start of list
  739. // is saved
  740. IN BOOL (*fnBparseValue)(PABSARRAYREF, PDWORD, VALUE, PGLOBL), // callback
  741. IN VALUE eAllowedValue, // dummy
  742. IN OUT PGLOBL
  743. ) ;
  744. BOOL BeatLeadingWhiteSpaces(
  745. IN OUT PABSARRAYREF paarSrc
  746. ) ;
  747. BOOL BeatDelimiter(
  748. IN OUT PABSARRAYREF paarSrc,
  749. IN PBYTE pubDelStr // points to a string which paarSrc must match
  750. ) ;
  751. BOOL BdelimitToken(
  752. IN OUT PABSARRAYREF paarSrc, // source string
  753. IN PBYTE pubDelimiters, // array of valid delimiters
  754. OUT PABSARRAYREF paarToken, // token defined by delimiter
  755. OUT PDWORD pdwDel // which delimiter was first encountered?
  756. ) ;
  757. BOOL BeatSurroundingWhiteSpaces(
  758. IN PABSARRAYREF paarSrc
  759. ) ;
  760. BOOL BparseSymbol(
  761. IN PABSARRAYREF paarValue,
  762. IN PDWORD pdwDest, // write dword value here.
  763. IN VALUE eAllowedValue, // which class of symbol is this?
  764. IN PGLOBL pglobl
  765. ) ;
  766. BOOL BparseQualifiedName
  767. (
  768. IN PABSARRAYREF paarValue,
  769. IN PDWORD pdwDest, // write dword value here.
  770. IN VALUE eAllowedValue, // which class of symbol is this?
  771. IN PGLOBL pglobl
  772. ) ;
  773. BOOL BparsePartiallyQualifiedName
  774. (
  775. IN PABSARRAYREF paarValue,
  776. IN PDWORD pdwDest, // write dword value here.
  777. IN VALUE eAllowedValue, // which class of symbol is this?
  778. IN PGLOBL pglobl
  779. ) ;
  780. BOOL BparseOptionSymbol(
  781. IN PABSARRAYREF paarValue,
  782. IN PDWORD pdwDest, // write dword value here.
  783. IN VALUE eAllowedValue, // which class of symbol is this?
  784. IN PGLOBL pglobl
  785. ) ;
  786. BOOL BparseConstant(
  787. IN OUT PABSARRAYREF paarValue,
  788. OUT PDWORD pdwDest, // write dword value here.
  789. IN VALUE eAllowedValue, // which class of constant is this?
  790. IN PGLOBL pglobl
  791. ) ;
  792. BOOL BinitClassIndexTable(
  793. IN OUT PGLOBL pglobl) ;
  794. BOOL BparseRect(
  795. IN PABSARRAYREF paarValue,
  796. IN PRECT prcDest,
  797. PGLOBL pglobl
  798. ) ;
  799. BOOL BparsePoint(
  800. IN PABSARRAYREF paarValue,
  801. IN PPOINT pptDest,
  802. PGLOBL pglobl
  803. ) ;
  804. BOOL BparseString(
  805. IN PABSARRAYREF paarValue,
  806. IN PARRAYREF parStrValue,
  807. IN OUT PGLOBL pglobl
  808. ) ;
  809. BOOL BparseAndTerminateString(
  810. IN PABSARRAYREF paarValue,
  811. IN PARRAYREF parStrValue,
  812. IN VALUE eAllowedValue,
  813. IN OUT PGLOBL pglobl
  814. ) ;
  815. BOOL BwriteUnicodeToHeap(
  816. IN PARRAYREF parSrcString,
  817. OUT PARRAYREF parUnicodeString,
  818. IN INT iCodepage,
  819. IN OUT PGLOBL pglobl
  820. ) ;
  821. BOOL BparseStrSegment(
  822. IN PABSARRAYREF paarStrSeg, // source str segment
  823. IN PARRAYREF parStrLiteral, // dest for result
  824. IN OUT PGLOBL pglobl
  825. ) ;
  826. BOOL BparseStrLiteral(
  827. IN PABSARRAYREF paarStrSeg, // points to literal substring segment.
  828. IN PARRAYREF parStrLiteral, // dest for result
  829. IN OUT PGLOBL pglobl
  830. ) ;
  831. BOOL BparseHexStr(
  832. IN PABSARRAYREF paarStrSeg, // points to hex substring segment.
  833. IN PARRAYREF parStrLiteral, // dest for result
  834. IN OUT PGLOBL pglobl
  835. ) ;
  836. BOOL BparseOrderDep(
  837. IN PABSARRAYREF paarValue,
  838. IN PORDERDEPENDENCY pordDest,
  839. PGLOBL pglobl
  840. ) ;
  841. // ---- functions defined in macros1.c ---- //
  842. BOOL BevaluateMacros(
  843. PGLOBL pglobl) ;
  844. BOOL BDefineValueMacroName(
  845. PTKMAP pNewtkmap,
  846. DWORD dwNewTKMindex,
  847. PGLOBL pglobl) ;
  848. BOOL BResolveValueMacroReference(
  849. PTKMAP ptkmap,
  850. DWORD dwTKMindex,
  851. PGLOBL pglobl) ;
  852. BOOL BdelimitName(
  853. PABSARRAYREF paarValue, // the remainder of the string without the Name
  854. PABSARRAYREF paarToken, // contains the Name
  855. PBYTE pubChar ) ;
  856. BOOL BCatToTmpHeap(
  857. PABSARRAYREF paarDest,
  858. PABSARRAYREF paarSrc,
  859. PGLOBL pglobl) ;
  860. BOOL BResolveBlockMacroReference(
  861. PTKMAP ptkmap,
  862. DWORD dwMacRefIndex,
  863. PGLOBL pglobl) ;
  864. BOOL BDefineBlockMacroName(
  865. PTKMAP pNewtkmap,
  866. DWORD dwNewTKMindex,
  867. PGLOBL pglobl) ;
  868. BOOL BIncreaseMacroLevel(
  869. BOOL bMacroInProgress,
  870. PGLOBL pglobl) ;
  871. BOOL BDecreaseMacroLevel(
  872. PTKMAP pNewtkmap,
  873. DWORD dwNewTKMindex,
  874. PGLOBL pglobl) ;
  875. VOID VEnumBlockMacro(
  876. PTKMAP pNewtkmap,
  877. PBLOCKMACRODICTENTRY pBlockMacroDictEntry,
  878. PGLOBL pglobl ) ;
  879. // ---- functions defined in shortcut.c ---- //
  880. BOOL BInitKeywordField(
  881. PTKMAP pNewtkmap,
  882. PGLOBL pglobl) ;
  883. BOOL BExpandMemConfig(
  884. PTKMAP ptkmap,
  885. PTKMAP pNewtkmap,
  886. DWORD dwTKMindex,
  887. PGLOBL pglobl) ;
  888. BOOL BExpandCommand(
  889. PTKMAP ptkmap,
  890. PTKMAP pNewtkmap,
  891. DWORD dwTKMindex,
  892. PGLOBL pglobl) ;
  893. BOOL BexpandShortcuts(
  894. PGLOBL pglobl) ;
  895. BOOL BSsyncTokenMap(
  896. PTKMAP ptkmap,
  897. PTKMAP pNewtkmap ,
  898. PGLOBL pglobl) ;
  899. // ------- end function declarations ------- //