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.

3575 lines
138 KiB

  1. // Copyright (c) 1996-1999 Microsoft Corporation
  2. /* framwrk.c - functions that tie different functions together.
  3. a supporting framework so to speak.
  4. History of Changes
  5. 9/30/98 --hsingh--
  6. Added call to function BsetUQMFlag(). The function enables
  7. making the UpdateQualityMacro? keyword optional in
  8. .gpd file.
  9. */
  10. #include "gpdparse.h"
  11. #include "globals.h"
  12. // ---- functions defined in framwrk.c ---- //
  13. BOOL BcreateGPDbinary(
  14. PWSTR pwstrFileName,
  15. DWORD dwVerbosity) ;
  16. VOID VinitMainKeywordTable(
  17. PGLOBL pglobl) ;
  18. DWORD DWinitMainKeywordTable1(
  19. DWORD dwI,
  20. PGLOBL pglobl) ;
  21. DWORD DWinitMainKeywordTable2(
  22. DWORD dwI,
  23. PGLOBL pglobl) ;
  24. DWORD DWinitMainKeywordTable3(
  25. DWORD dwI,
  26. PGLOBL pglobl) ;
  27. DWORD DWinitMainKeywordTable4(
  28. DWORD dwI,
  29. PGLOBL pglobl) ;
  30. DWORD DWinitMainKeywordTable5(
  31. DWORD dwI,
  32. PGLOBL pglobl) ;
  33. VOID VinitValueToSize(
  34. PGLOBL pglobl) ;
  35. VOID VinitGlobals(
  36. DWORD dwVerbosity,
  37. PGLOBL pglobl);
  38. BOOL BpreAllocateObjects(
  39. PGLOBL pglobl) ;
  40. BOOL BreturnBuffers(
  41. PGLOBL pglobl) ;
  42. BOOL BallocateCountableObjects(
  43. PGLOBL pglobl) ;
  44. BOOL BinitPreAllocatedObjects(
  45. PGLOBL pglobl) ;
  46. BOOL BinitCountableObjects(
  47. PGLOBL pglobl) ;
  48. BOOL BevaluateMacros(
  49. PGLOBL pglobl) ;
  50. BOOL BpostProcess(
  51. PWSTR pwstrFileName,
  52. PGLOBL pglobl) ;
  53. BOOL BconsolidateBuffers(
  54. PWSTR pwstrFileName,
  55. PGLOBL pglobl) ;
  56. BOOL BexpandMemConfigShortcut(DWORD dwSubType) ;
  57. BOOL BexpandCommandShortcut(DWORD dwSubType) ;
  58. // ---------------------------------------------------- //
  59. BOOL BcreateGPDbinary(
  60. PWSTR pwstrFileName, // root GPD file
  61. DWORD dwVerbosity ) // Verbosity Level
  62. {
  63. BOOL bStatus ;
  64. GLOBL globl;
  65. PGLOBL pglobl = &globl;
  66. // check. Temporary global.
  67. // check. pglobl = &globl;
  68. VinitGlobals(dwVerbosity, &globl) ;
  69. while(geErrorSev < ERRSEV_FATAL)
  70. {
  71. bStatus = BpreAllocateObjects(&globl) ;
  72. if(bStatus)
  73. {
  74. bStatus = BinitPreAllocatedObjects(&globl) ;
  75. }
  76. if(bStatus)
  77. {
  78. bStatus = BcreateTokenMap(pwstrFileName, &globl ) ;
  79. }
  80. if(bStatus)
  81. {
  82. bStatus = BexpandShortcuts(&globl) ;
  83. }
  84. if(bStatus)
  85. {
  86. bStatus = BevaluateMacros(&globl) ;
  87. }
  88. if(bStatus)
  89. {
  90. bStatus = BInterpretTokens((PTKMAP)gMasterTable[MTI_NEWTOKENMAP].
  91. pubStruct, TRUE, &globl ) ; // is first pass
  92. }
  93. if(bStatus)
  94. {
  95. bStatus = BallocateCountableObjects(&globl) ;
  96. }
  97. if(bStatus)
  98. {
  99. bStatus = BinitCountableObjects(&globl) ;
  100. }
  101. if(bStatus)
  102. {
  103. bStatus = BInterpretTokens((PTKMAP)gMasterTable[MTI_NEWTOKENMAP].
  104. pubStruct, FALSE, &globl ) ; // second pass
  105. }
  106. if(bStatus)
  107. {
  108. bStatus = BpostProcess(pwstrFileName, &globl) ;
  109. }
  110. ; // execution reaches here regardless
  111. // sets error code if needed.
  112. if(BreturnBuffers(&globl) ) // clears ERRSEV_RESTART but
  113. { // returns FALSE in this case.
  114. if(geErrorSev < ERRSEV_RESTART)
  115. {
  116. return(bStatus) ; // escape
  117. }
  118. }
  119. }
  120. return(FALSE) ; // died due to Fatal , unrecoverable error.
  121. } // BcreateGPDbinary(...)
  122. VOID VinitMainKeywordTable(
  123. PGLOBL pglobl)
  124. {
  125. DWORD dwI = 0 ; // index to MainKeywordTable.
  126. dwI = DWinitMainKeywordTable1(dwI, pglobl) ;
  127. dwI = DWinitMainKeywordTable2(dwI, pglobl) ;
  128. dwI = DWinitMainKeywordTable3(dwI, pglobl) ;
  129. dwI = DWinitMainKeywordTable4(dwI, pglobl) ;
  130. dwI = DWinitMainKeywordTable5(dwI, pglobl) ;
  131. if(dwI >= gMasterTable[MTI_MAINKEYWORDTABLE].dwArraySize)
  132. RIP(("Too many entries to fit inside MainKeywordTable\n"));
  133. }
  134. DWORD DWinitMainKeywordTable1(
  135. DWORD dwI,
  136. PGLOBL pglobl)
  137. /*
  138. note:
  139. VinitDictionaryIndex() assumes the MainKeywordTable
  140. is divided into sections. Each section is terminated by
  141. a NULL entry, that is an entry where pstrKeyword = NULL.
  142. The sections and their order in the KeywordTable are defined
  143. by the enum KEYWORD_SECTS. Make sure the MainKeywordTable
  144. has enough slots to hold all entries defined here.
  145. */
  146. {
  147. /* NON_ATTR - constructs and special keywords. */
  148. // *UIGroup:
  149. mMainKeywordTable[dwI].pstrKeyword = "UIGroup" ;
  150. mMainKeywordTable[dwI].eAllowedValue = VALUE_SYMBOL_DEF ;
  151. mMainKeywordTable[dwI].flAgs = 0 ;
  152. mMainKeywordTable[dwI].eType = TY_CONSTRUCT ;
  153. mMainKeywordTable[dwI].dwSubType = CONSTRUCT_UIGROUP ;
  154. mMainKeywordTable[dwI].dwOffset = 0 ;
  155. dwI++ ;
  156. // *Feature:
  157. mMainKeywordTable[dwI].pstrKeyword = "Feature" ;
  158. mMainKeywordTable[dwI].eAllowedValue = VALUE_SYMBOL_DEF ;
  159. mMainKeywordTable[dwI].flAgs = 0 ;
  160. mMainKeywordTable[dwI].eType = TY_CONSTRUCT ;
  161. mMainKeywordTable[dwI].dwSubType = CONSTRUCT_FEATURE ;
  162. mMainKeywordTable[dwI].dwOffset = 0 ;
  163. dwI++ ;
  164. // *Option:
  165. mMainKeywordTable[dwI].pstrKeyword = "Option" ;
  166. mMainKeywordTable[dwI].eAllowedValue = VALUE_SYMBOL_DEF ;
  167. mMainKeywordTable[dwI].flAgs = 0 ;
  168. mMainKeywordTable[dwI].eType = TY_CONSTRUCT ;
  169. mMainKeywordTable[dwI].dwSubType = CONSTRUCT_OPTION ;
  170. mMainKeywordTable[dwI].dwOffset = 0 ;
  171. gdwOptionConstruct = dwI ;
  172. dwI++ ;
  173. // *switch:
  174. mMainKeywordTable[dwI].pstrKeyword = "switch" ;
  175. mMainKeywordTable[dwI].eAllowedValue = VALUE_SYMBOL_DEF ;
  176. mMainKeywordTable[dwI].flAgs = 0 ;
  177. mMainKeywordTable[dwI].eType = TY_CONSTRUCT ;
  178. mMainKeywordTable[dwI].dwSubType = CONSTRUCT_SWITCH ;
  179. mMainKeywordTable[dwI].dwOffset = 0 ;
  180. dwI++ ;
  181. // *case:
  182. mMainKeywordTable[dwI].pstrKeyword = "case" ;
  183. mMainKeywordTable[dwI].eAllowedValue = VALUE_SYMBOL_DEF ;
  184. mMainKeywordTable[dwI].flAgs = 0 ;
  185. mMainKeywordTable[dwI].eType = TY_CONSTRUCT ;
  186. mMainKeywordTable[dwI].dwSubType = CONSTRUCT_CASE ;
  187. mMainKeywordTable[dwI].dwOffset = 0 ;
  188. dwI++ ;
  189. // *Switch:
  190. mMainKeywordTable[dwI].pstrKeyword = "Switch" ;
  191. mMainKeywordTable[dwI].eAllowedValue = VALUE_SYMBOL_DEF ;
  192. mMainKeywordTable[dwI].flAgs = 0 ;
  193. mMainKeywordTable[dwI].eType = TY_CONSTRUCT ;
  194. mMainKeywordTable[dwI].dwSubType = CONSTRUCT_SWITCH ;
  195. mMainKeywordTable[dwI].dwOffset = 0 ;
  196. dwI++ ;
  197. // *Case:
  198. mMainKeywordTable[dwI].pstrKeyword = "Case" ;
  199. mMainKeywordTable[dwI].eAllowedValue = VALUE_SYMBOL_DEF ;
  200. mMainKeywordTable[dwI].flAgs = 0 ;
  201. mMainKeywordTable[dwI].eType = TY_CONSTRUCT ;
  202. mMainKeywordTable[dwI].dwSubType = CONSTRUCT_CASE ;
  203. mMainKeywordTable[dwI].dwOffset = 0 ;
  204. dwI++ ;
  205. // *default:
  206. mMainKeywordTable[dwI].pstrKeyword = "default" ;
  207. mMainKeywordTable[dwI].eAllowedValue = VALUE_SYMBOL_DEF ;
  208. mMainKeywordTable[dwI].flAgs = 0 ;
  209. mMainKeywordTable[dwI].eType = TY_CONSTRUCT ;
  210. mMainKeywordTable[dwI].dwSubType = CONSTRUCT_DEFAULT ;
  211. mMainKeywordTable[dwI].dwOffset = 0 ;
  212. dwI++ ;
  213. // *Command:
  214. mMainKeywordTable[dwI].pstrKeyword = "Command" ;
  215. mMainKeywordTable[dwI].eAllowedValue = VALUE_SYMBOL_DEF ;
  216. mMainKeywordTable[dwI].flAgs = 0 ;
  217. mMainKeywordTable[dwI].eType = TY_CONSTRUCT ;
  218. mMainKeywordTable[dwI].dwSubType = CONSTRUCT_COMMAND ;
  219. mMainKeywordTable[dwI].dwOffset = 0 ;
  220. gdwCommandConstruct = dwI ;
  221. dwI++ ;
  222. // *FontCartridge:
  223. mMainKeywordTable[dwI].pstrKeyword = "FontCartridge" ;
  224. mMainKeywordTable[dwI].eAllowedValue = VALUE_SYMBOL_DEF ;
  225. mMainKeywordTable[dwI].flAgs = 0 ;
  226. mMainKeywordTable[dwI].eType = TY_CONSTRUCT ;
  227. mMainKeywordTable[dwI].dwSubType = CONSTRUCT_FONTCART ;
  228. mMainKeywordTable[dwI].dwOffset = 0 ;
  229. dwI++ ;
  230. // *TTFS:
  231. mMainKeywordTable[dwI].pstrKeyword = "TTFS" ;
  232. mMainKeywordTable[dwI].eAllowedValue = VALUE_SYMBOL_DEF ;
  233. mMainKeywordTable[dwI].flAgs = 0 ;
  234. mMainKeywordTable[dwI].eType = TY_CONSTRUCT ;
  235. mMainKeywordTable[dwI].dwSubType = CONSTRUCT_TTFONTSUBS ;
  236. mMainKeywordTable[dwI].dwOffset = 0 ;
  237. dwI++ ;
  238. // *OEM:
  239. mMainKeywordTable[dwI].pstrKeyword = "OEM" ;
  240. mMainKeywordTable[dwI].eAllowedValue = VALUE_SYMBOL_DEF ;
  241. mMainKeywordTable[dwI].flAgs = 0 ;
  242. mMainKeywordTable[dwI].eType = TY_CONSTRUCT ;
  243. mMainKeywordTable[dwI].dwSubType = CONSTRUCT_OEM ;
  244. mMainKeywordTable[dwI].dwOffset = 0 ;
  245. dwI++ ;
  246. // BlockMacro:
  247. mMainKeywordTable[dwI].pstrKeyword = "BlockMacro" ;
  248. mMainKeywordTable[dwI].eAllowedValue = VALUE_SYMBOL_DEF ;
  249. mMainKeywordTable[dwI].flAgs = 0 ;
  250. mMainKeywordTable[dwI].eType = TY_CONSTRUCT ;
  251. mMainKeywordTable[dwI].dwSubType = CONSTRUCT_BLOCKMACRO ;
  252. mMainKeywordTable[dwI].dwOffset = 0 ; // not used
  253. dwI++ ;
  254. // Macros:
  255. mMainKeywordTable[dwI].pstrKeyword = "Macros" ;
  256. mMainKeywordTable[dwI].eAllowedValue = NO_VALUE ;
  257. mMainKeywordTable[dwI].flAgs = 0 ;
  258. mMainKeywordTable[dwI].eType = TY_CONSTRUCT ;
  259. mMainKeywordTable[dwI].dwSubType = CONSTRUCT_MACROS;
  260. mMainKeywordTable[dwI].dwOffset = 0 ; // not used
  261. dwI++ ;
  262. // {:
  263. mMainKeywordTable[dwI].pstrKeyword = "{" ;
  264. mMainKeywordTable[dwI].eAllowedValue = NO_VALUE ;
  265. mMainKeywordTable[dwI].flAgs = 0 ;
  266. mMainKeywordTable[dwI].eType = TY_CONSTRUCT ;
  267. mMainKeywordTable[dwI].dwSubType = CONSTRUCT_OPENBRACE ;
  268. mMainKeywordTable[dwI].dwOffset = 0 ; // not used
  269. gdwOpenBraceConstruct = dwI ;
  270. dwI++ ;
  271. // }:
  272. mMainKeywordTable[dwI].pstrKeyword = "}" ;
  273. mMainKeywordTable[dwI].eAllowedValue = NO_VALUE ;
  274. mMainKeywordTable[dwI].flAgs = 0 ;
  275. mMainKeywordTable[dwI].eType = TY_CONSTRUCT ;
  276. mMainKeywordTable[dwI].dwSubType = CONSTRUCT_CLOSEBRACE ;
  277. mMainKeywordTable[dwI].dwOffset = 0 ; // not used
  278. gdwCloseBraceConstruct = dwI ;
  279. dwI++ ;
  280. // end of constructs.
  281. // *Include:
  282. mMainKeywordTable[dwI].pstrKeyword = "Include" ;
  283. mMainKeywordTable[dwI].eAllowedValue = VALUE_STRING_DEF_CONVERT ;
  284. mMainKeywordTable[dwI].flAgs = 0 ;
  285. mMainKeywordTable[dwI].eType = TY_SPECIAL ;
  286. mMainKeywordTable[dwI].dwSubType = SPEC_INCLUDE ;
  287. mMainKeywordTable[dwI].dwOffset = 0 ;
  288. dwI++ ;
  289. // *InsertBlock:
  290. mMainKeywordTable[dwI].pstrKeyword = "InsertBlock" ;
  291. mMainKeywordTable[dwI].eAllowedValue = VALUE_SYMBOL_BLOCKMACRO ;
  292. mMainKeywordTable[dwI].flAgs = 0 ;
  293. mMainKeywordTable[dwI].eType = TY_SPECIAL ;
  294. mMainKeywordTable[dwI].dwSubType = SPEC_INSERTBLOCK ;
  295. mMainKeywordTable[dwI].dwOffset = 0 ;
  296. dwI++ ;
  297. // *IgnoreBlock:
  298. mMainKeywordTable[dwI].pstrKeyword = "IgnoreBlock" ;
  299. mMainKeywordTable[dwI].eAllowedValue = NO_VALUE ;
  300. mMainKeywordTable[dwI].flAgs = 0 ;
  301. mMainKeywordTable[dwI].eType = TY_SPECIAL ;
  302. mMainKeywordTable[dwI].dwSubType = SPEC_IGNOREBLOCK ;
  303. mMainKeywordTable[dwI].dwOffset = 0 ;
  304. gdwID_IgnoreBlock = dwI ;
  305. dwI++ ;
  306. // *InvalidCombination:
  307. mMainKeywordTable[dwI].pstrKeyword = "InvalidCombination" ;
  308. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME ;
  309. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  310. mMainKeywordTable[dwI].eType = TY_SPECIAL ;
  311. mMainKeywordTable[dwI].dwSubType = SPEC_INVALID_COMBO ;
  312. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  313. atrInvalidCombos) ;
  314. dwI++ ;
  315. // *InvalidInstallableCombination:
  316. mMainKeywordTable[dwI].pstrKeyword = "InvalidInstallableCombination" ;
  317. mMainKeywordTable[dwI].eAllowedValue = VALUE_PARTIALLY_QUALIFIED_NAME ;
  318. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  319. mMainKeywordTable[dwI].eType = TY_SPECIAL ;
  320. mMainKeywordTable[dwI].dwSubType = SPEC_INVALID_INS_COMBO ;
  321. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  322. atrInvldInstallCombo) ;
  323. dwI++ ;
  324. // *Cmd:
  325. // mMainKeywordTable[dwI].pstrKeyword = "Cmd" ;
  326. // mMainKeywordTable[dwI].eAllowedValue = VALUE_COMMAND_SHORTCUT ;
  327. // mMainKeywordTable[dwI].flAgs = KWF_SHORTCUT ;
  328. // mMainKeywordTable[dwI].eType = TY_SPECIAL ;
  329. // mMainKeywordTable[dwI].dwSubType = SPEC_COMMAND_SHORTCUT ;
  330. // mMainKeywordTable[dwI].dwOffset = 0 ;
  331. // dwI++ ;
  332. // *TTFS:
  333. // mMainKeywordTable[dwI].pstrKeyword = "TTFS" ;
  334. // mMainKeywordTable[dwI].eAllowedValue = VALUE_FONTSUB ;
  335. // mMainKeywordTable[dwI].flAgs = KWF_SHORTCUT ;
  336. // mMainKeywordTable[dwI].eType = TY_SPECIAL ;
  337. // mMainKeywordTable[dwI].dwSubType = SPEC_TTFS ;
  338. // mMainKeywordTable[dwI].dwOffset = 0 ;
  339. // dwI++ ;
  340. // these memconfig keywords must be expanded into
  341. // options.
  342. // *MemConfigKB:
  343. mMainKeywordTable[dwI].pstrKeyword = "MemConfigKB" ;
  344. mMainKeywordTable[dwI].eAllowedValue = VALUE_POINT ;
  345. mMainKeywordTable[dwI].flAgs = KWF_SHORTCUT ;
  346. mMainKeywordTable[dwI].eType = TY_SPECIAL ;
  347. mMainKeywordTable[dwI].dwSubType = SPEC_MEM_CONFIG_KB ;
  348. mMainKeywordTable[dwI].dwOffset = 0 ;
  349. gdwMemConfigKB = dwI ;
  350. dwI++ ;
  351. // *MemConfigMB:
  352. mMainKeywordTable[dwI].pstrKeyword = "MemConfigMB" ;
  353. mMainKeywordTable[dwI].eAllowedValue = VALUE_POINT ;
  354. mMainKeywordTable[dwI].flAgs = KWF_SHORTCUT ;
  355. mMainKeywordTable[dwI].eType = TY_SPECIAL ;
  356. mMainKeywordTable[dwI].dwSubType = SPEC_MEM_CONFIG_MB ;
  357. mMainKeywordTable[dwI].dwOffset = 0 ;
  358. gdwMemConfigMB = dwI ;
  359. dwI++ ;
  360. // ---- End of Section ---- //
  361. mMainKeywordTable[dwI].pstrKeyword = NULL ;
  362. dwI++ ;
  363. return dwI ;
  364. }
  365. DWORD DWinitMainKeywordTable2(
  366. DWORD dwI,
  367. PGLOBL pglobl)
  368. {
  369. /* ---- GLOBAL Construct keywords: ----- */
  370. // *GPDSpecVersion:
  371. mMainKeywordTable[dwI].pstrKeyword = "GPDSpecVersion" ;
  372. mMainKeywordTable[dwI].eAllowedValue = VALUE_STRING_NO_CONVERT ;
  373. mMainKeywordTable[dwI].flAgs = 0 ;
  374. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  375. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  376. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  377. atrGPDSpecVersion) ;
  378. dwI++ ;
  379. // *MasterUnits:
  380. mMainKeywordTable[dwI].pstrKeyword = "MasterUnits" ;
  381. mMainKeywordTable[dwI].eAllowedValue = VALUE_POINT ;
  382. mMainKeywordTable[dwI].flAgs = 0 ;
  383. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  384. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  385. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  386. atrMasterUnits) ;
  387. dwI++ ;
  388. // *ModelName:
  389. mMainKeywordTable[dwI].pstrKeyword = "ModelName" ;
  390. mMainKeywordTable[dwI].eAllowedValue = VALUE_STRING_CP_CONVERT ;
  391. mMainKeywordTable[dwI].flAgs = 0 ;
  392. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  393. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  394. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  395. atrModelName) ;
  396. dwI++ ;
  397. // *rcModelNameID:
  398. mMainKeywordTable[dwI].pstrKeyword = "rcModelNameID" ;
  399. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX ;
  400. mMainKeywordTable[dwI].flAgs = 0 ;
  401. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  402. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  403. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  404. atrModelNameID) ;
  405. dwI++ ;
  406. // *GPDFileVersion:
  407. mMainKeywordTable[dwI].pstrKeyword = "GPDFileVersion" ;
  408. mMainKeywordTable[dwI].eAllowedValue = VALUE_STRING_NO_CONVERT ;
  409. mMainKeywordTable[dwI].flAgs = 0 ;
  410. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  411. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  412. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  413. atrGPDFileVersion) ;
  414. dwI++ ;
  415. // *GPDFileName:
  416. mMainKeywordTable[dwI].pstrKeyword = "GPDFileName" ;
  417. mMainKeywordTable[dwI].eAllowedValue = VALUE_STRING_DEF_CONVERT ;
  418. mMainKeywordTable[dwI].flAgs = 0 ;
  419. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  420. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  421. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  422. atrGPDFileName) ;
  423. dwI++ ;
  424. // *InstalledOptionName:
  425. mMainKeywordTable[dwI].pstrKeyword = "InstalledOptionName" ;
  426. mMainKeywordTable[dwI].eAllowedValue = VALUE_STRING_CP_CONVERT ;
  427. mMainKeywordTable[dwI].flAgs = 0 ;
  428. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  429. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  430. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  431. atrNameInstalled) ;
  432. dwI++ ;
  433. // *rcInstalledOptionNameID:
  434. mMainKeywordTable[dwI].pstrKeyword = "rcInstalledOptionNameID" ;
  435. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX ;
  436. mMainKeywordTable[dwI].flAgs = 0 ;
  437. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  438. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  439. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  440. atrNameIDInstalled) ;
  441. dwI++ ;
  442. // *NotInstalledOptionName:
  443. mMainKeywordTable[dwI].pstrKeyword = "NotInstalledOptionName" ;
  444. mMainKeywordTable[dwI].eAllowedValue = VALUE_STRING_CP_CONVERT ;
  445. mMainKeywordTable[dwI].flAgs = 0 ;
  446. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  447. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  448. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  449. atrNameNotInstalled) ;
  450. dwI++ ;
  451. // *rcNotInstalledOptionNameID:
  452. mMainKeywordTable[dwI].pstrKeyword = "rcNotInstalledOptionNameID" ;
  453. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX ;
  454. mMainKeywordTable[dwI].flAgs = 0 ;
  455. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  456. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  457. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  458. atrNameIDNotInstalled) ;
  459. dwI++ ;
  460. // *DraftQualitySettings:
  461. mMainKeywordTable[dwI].pstrKeyword = "DraftQualitySettings" ;
  462. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME ;
  463. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  464. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  465. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  466. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  467. atrDraftQualitySettings) ;
  468. dwI++ ;
  469. // *BetterQualitySettings:
  470. mMainKeywordTable[dwI].pstrKeyword = "BetterQualitySettings" ;
  471. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME ;
  472. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  473. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  474. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  475. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  476. atrBetterQualitySettings) ;
  477. dwI++ ;
  478. // *BestQualitySettings:
  479. mMainKeywordTable[dwI].pstrKeyword = "BestQualitySettings" ;
  480. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME ;
  481. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  482. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  483. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  484. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  485. atrBestQualitySettings) ;
  486. dwI++ ;
  487. // *DefaultQuality:
  488. mMainKeywordTable[dwI].pstrKeyword = "DefaultQuality" ;
  489. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_QUALITYSETTING ;
  490. mMainKeywordTable[dwI].flAgs = 0 ;
  491. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  492. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  493. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  494. atrDefaultQuality) ;
  495. dwI++ ;
  496. // *PrinterType:
  497. mMainKeywordTable[dwI].pstrKeyword = "PrinterType" ;
  498. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_PRINTERTYPE ;
  499. mMainKeywordTable[dwI].flAgs = 0 ;
  500. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  501. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  502. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  503. atrPrinterType) ;
  504. dwI++ ;
  505. // *Personality:
  506. mMainKeywordTable[dwI].pstrKeyword = "Personality" ;
  507. mMainKeywordTable[dwI].eAllowedValue = VALUE_STRING_CP_CONVERT ;
  508. mMainKeywordTable[dwI].flAgs = 0 ;
  509. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  510. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  511. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  512. atrPersonality) ;
  513. dwI++ ;
  514. // *rcPersonalityID:
  515. mMainKeywordTable[dwI].pstrKeyword = "rcPersonalityID" ;
  516. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX ;
  517. mMainKeywordTable[dwI].flAgs = 0 ;
  518. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  519. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  520. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  521. atrRcPersonalityID) ;
  522. dwI++ ;
  523. // *ResourceDLL:
  524. mMainKeywordTable[dwI].pstrKeyword = "ResourceDLL" ;
  525. mMainKeywordTable[dwI].eAllowedValue = VALUE_STRING_DEF_CONVERT ;
  526. mMainKeywordTable[dwI].flAgs = 0 ;
  527. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  528. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  529. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  530. atrResourceDLL) ;
  531. dwI++ ;
  532. // *CodePage:
  533. mMainKeywordTable[dwI].pstrKeyword = "CodePage" ;
  534. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  535. mMainKeywordTable[dwI].flAgs = 0 ;
  536. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  537. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  538. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  539. atrCodePage) ;
  540. dwI++ ;
  541. // *MaxCopies:
  542. mMainKeywordTable[dwI].pstrKeyword = "MaxCopies" ;
  543. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  544. mMainKeywordTable[dwI].flAgs = 0 ;
  545. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  546. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  547. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  548. atrMaxCopies) ;
  549. dwI++ ;
  550. // *FontCartSlots:
  551. mMainKeywordTable[dwI].pstrKeyword = "FontCartSlots" ;
  552. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  553. mMainKeywordTable[dwI].flAgs = 0 ;
  554. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  555. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  556. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  557. atrFontCartSlots) ;
  558. dwI++ ;
  559. // *MaxPrintableArea:
  560. mMainKeywordTable[dwI].pstrKeyword = "MaxPrintableArea" ;
  561. mMainKeywordTable[dwI].eAllowedValue = VALUE_POINT ;
  562. mMainKeywordTable[dwI].flAgs = 0 ;
  563. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  564. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  565. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  566. atrMaxPrintableArea) ;
  567. dwI++ ;
  568. // *OutputDataFormat:
  569. mMainKeywordTable[dwI].pstrKeyword = "OutputDataFormat" ;
  570. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_OUTPUTDATAFORMAT ;
  571. mMainKeywordTable[dwI].flAgs = 0 ;
  572. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  573. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  574. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  575. atrOutputDataFormat) ;
  576. dwI++ ;
  577. // *LookaheadRegion:
  578. mMainKeywordTable[dwI].pstrKeyword = "LookAheadRegion" ;
  579. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  580. mMainKeywordTable[dwI].flAgs = 0 ;
  581. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  582. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  583. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  584. atrLookaheadRegion) ;
  585. dwI++ ;
  586. // *rcPrinterIconID:
  587. mMainKeywordTable[dwI].pstrKeyword = "rcPrinterIconID" ;
  588. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX ;
  589. mMainKeywordTable[dwI].flAgs = 0 ;
  590. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  591. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  592. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  593. atrPrinterIcon) ;
  594. dwI++ ;
  595. // *HelpFile:
  596. mMainKeywordTable[dwI].pstrKeyword = "HelpFile" ;
  597. mMainKeywordTable[dwI].eAllowedValue = VALUE_STRING_DEF_CONVERT ;
  598. mMainKeywordTable[dwI].flAgs = 0 ;
  599. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  600. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  601. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  602. atrHelpFile) ;
  603. dwI++ ;
  604. // *OEMCustomData:
  605. mMainKeywordTable[dwI].pstrKeyword = "OEMCustomData" ;
  606. mMainKeywordTable[dwI].eAllowedValue = VALUE_STRING_NO_CONVERT ;
  607. mMainKeywordTable[dwI].flAgs = 0 ;
  608. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  609. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  610. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  611. atrOEMCustomData) ;
  612. dwI++ ;
  613. //
  614. // Printer Capabilities related information
  615. //
  616. // *RotateCoordinate?:
  617. mMainKeywordTable[dwI].pstrKeyword = "RotateCoordinate?" ;
  618. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  619. mMainKeywordTable[dwI].flAgs = 0 ;
  620. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  621. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  622. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  623. atrRotateCoordinate) ;
  624. dwI++ ;
  625. // *RasterCaps:
  626. mMainKeywordTable[dwI].pstrKeyword = "RasterCaps" ;
  627. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_RASTERCAPS ;
  628. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  629. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  630. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  631. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  632. atrRasterCaps) ;
  633. dwI++ ;
  634. // *RotateRaster?:
  635. mMainKeywordTable[dwI].pstrKeyword = "RotateRaster?" ;
  636. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  637. mMainKeywordTable[dwI].flAgs = 0 ;
  638. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  639. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  640. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  641. atrRotateRasterData) ;
  642. dwI++ ;
  643. // *TextCaps:
  644. mMainKeywordTable[dwI].pstrKeyword = "TextCaps" ;
  645. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_TEXTCAPS ;
  646. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  647. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  648. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  649. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  650. atrTextCaps) ;
  651. dwI++ ;
  652. // *RotateFont?:
  653. mMainKeywordTable[dwI].pstrKeyword = "RotateFont?" ;
  654. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  655. mMainKeywordTable[dwI].flAgs = 0 ;
  656. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  657. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  658. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  659. atrRotateFont) ;
  660. dwI++ ;
  661. // *MemoryUsage:
  662. mMainKeywordTable[dwI].pstrKeyword = "MemoryUsage" ;
  663. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_MEMORYUSAGE ;
  664. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  665. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  666. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  667. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  668. atrMemoryUsage) ;
  669. dwI++ ;
  670. // *ReselectFont:
  671. mMainKeywordTable[dwI].pstrKeyword = "ReselectFont" ;
  672. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_RESELECTFONT ;
  673. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  674. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  675. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  676. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  677. atrReselectFont) ;
  678. dwI++ ;
  679. // *PrintRate:
  680. mMainKeywordTable[dwI].pstrKeyword = "PrintRate" ;
  681. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  682. mMainKeywordTable[dwI].flAgs = 0 ;
  683. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  684. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  685. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  686. atrPrintRate) ;
  687. dwI++ ;
  688. #ifndef WINNT_40
  689. // *PrintRateUnit:
  690. mMainKeywordTable[dwI].pstrKeyword = "PrintRateUnit" ;
  691. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_PRINTRATEUNIT ;
  692. mMainKeywordTable[dwI].flAgs = 0 ;
  693. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  694. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  695. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  696. atrPrintRateUnit) ;
  697. dwI++ ;
  698. #endif
  699. // *PrintRatePPM:
  700. mMainKeywordTable[dwI].pstrKeyword = "PrintRatePPM" ;
  701. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  702. mMainKeywordTable[dwI].flAgs = 0 ;
  703. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  704. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  705. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  706. atrPrintRatePPM) ;
  707. dwI++ ;
  708. // *OutputOrderReversed?:
  709. // note this keyword is also an option Keyword with type:
  710. // ATT_LOCAL_OPTION_ONLY
  711. mMainKeywordTable[dwI].pstrKeyword = "OutputOrderReversed?" ;
  712. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  713. mMainKeywordTable[dwI].flAgs = 0 ;
  714. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  715. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  716. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  717. atrOutputOrderReversed) ;
  718. dwI++ ;
  719. // *ReverseBandOrderForEvenPages?:
  720. // special flag for HP970C with AutoDuplexer
  721. //
  722. mMainKeywordTable[dwI].pstrKeyword = "ReverseBandOrderForEvenPages?" ;
  723. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  724. mMainKeywordTable[dwI].flAgs = 0 ;
  725. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  726. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  727. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  728. atrReverseBandOrderForEvenPages) ;
  729. dwI++ ;
  730. // *OEMPrintingCallbacks:
  731. mMainKeywordTable[dwI].pstrKeyword = "OEMPrintingCallbacks" ;
  732. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_OEMPRINTINGCALLBACKS ;
  733. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  734. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  735. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_ONLY ;
  736. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  737. atrOEMPrintingCallbacks) ;
  738. dwI++ ;
  739. //
  740. // Cursor Control related information
  741. //
  742. // *CursorXAfterCR:
  743. mMainKeywordTable[dwI].pstrKeyword = "CursorXAfterCR" ;
  744. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_CURSORXAFTERCR ;
  745. mMainKeywordTable[dwI].flAgs = 0 ;
  746. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  747. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  748. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  749. atrCursorXAfterCR) ;
  750. dwI++ ;
  751. // *BadCursorMoveInGrxMode:
  752. mMainKeywordTable[dwI].pstrKeyword = "BadCursorMoveInGrxMode" ;
  753. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BADCURSORMOVEINGRXMODE ;
  754. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  755. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  756. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  757. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  758. atrBadCursorMoveInGrxMode) ;
  759. dwI++ ;
  760. // *YMoveAttributes:
  761. mMainKeywordTable[dwI].pstrKeyword = "YMoveAttributes" ;
  762. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_YMOVEATTRIB ;
  763. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  764. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  765. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  766. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  767. atrYMoveAttributes) ;
  768. dwI++ ;
  769. // *MaxLineSpacing:
  770. mMainKeywordTable[dwI].pstrKeyword = "MaxLineSpacing" ;
  771. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  772. mMainKeywordTable[dwI].flAgs = 0 ;
  773. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  774. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  775. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  776. atrMaxLineSpacing) ;
  777. dwI++ ;
  778. // *UseSpaceForXMove?:
  779. mMainKeywordTable[dwI].pstrKeyword = "UseSpaceForXMove?" ;
  780. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  781. mMainKeywordTable[dwI].flAgs = 0 ;
  782. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  783. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  784. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  785. atrbUseSpaceForXMove) ;
  786. dwI++ ;
  787. // *AbsXMovesRightOnly?:
  788. mMainKeywordTable[dwI].pstrKeyword = "AbsXMovesRightOnly?" ;
  789. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  790. mMainKeywordTable[dwI].flAgs = 0 ;
  791. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  792. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  793. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  794. atrbAbsXMovesRightOnly) ;
  795. dwI++ ;
  796. #if 0
  797. // *SimulateXMove:
  798. mMainKeywordTable[dwI].pstrKeyword = "SimulateXMove" ;
  799. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_SIMULATEXMOVE ;
  800. mMainKeywordTable[dwI].flAgs = 0 ;
  801. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  802. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  803. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  804. atrSimulateXMove) ;
  805. dwI++ ;
  806. #endif
  807. // *EjectPageWithFF?:
  808. mMainKeywordTable[dwI].pstrKeyword = "EjectPageWithFF?" ;
  809. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  810. mMainKeywordTable[dwI].flAgs = 0 ;
  811. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  812. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  813. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  814. atrEjectPageWithFF) ;
  815. dwI++ ;
  816. // *XMoveThreshold:
  817. mMainKeywordTable[dwI].pstrKeyword = "XMoveThreshold" ;
  818. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  819. mMainKeywordTable[dwI].flAgs = 0 ;
  820. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  821. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  822. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  823. atrXMoveThreshold) ;
  824. dwI++ ;
  825. // *YMoveThreshold:
  826. mMainKeywordTable[dwI].pstrKeyword = "YMoveThreshold" ;
  827. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  828. mMainKeywordTable[dwI].flAgs = 0 ;
  829. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  830. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  831. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  832. atrYMoveThreshold) ;
  833. dwI++ ;
  834. // *XMoveUnit:
  835. mMainKeywordTable[dwI].pstrKeyword = "XMoveUnit" ;
  836. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  837. mMainKeywordTable[dwI].flAgs = 0 ;
  838. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  839. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  840. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  841. atrXMoveUnits) ;
  842. dwI++ ;
  843. // *YMoveUnit:
  844. mMainKeywordTable[dwI].pstrKeyword = "YMoveUnit" ;
  845. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  846. mMainKeywordTable[dwI].flAgs = 0 ;
  847. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  848. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  849. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  850. atrYMoveUnits) ;
  851. dwI++ ;
  852. // *LineSpacingMoveUnit:
  853. mMainKeywordTable[dwI].pstrKeyword = "LineSpacingMoveUnit" ;
  854. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  855. mMainKeywordTable[dwI].flAgs = 0 ;
  856. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  857. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  858. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  859. atrLineSpacingMoveUnit) ;
  860. dwI++ ;
  861. return dwI ;
  862. }
  863. DWORD DWinitMainKeywordTable3(
  864. DWORD dwI,
  865. PGLOBL pglobl)
  866. {
  867. //
  868. // Color related information
  869. //
  870. // *ChangeColorModeOnPage?:
  871. mMainKeywordTable[dwI].pstrKeyword = "ChangeColorModeOnPage?" ;
  872. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  873. mMainKeywordTable[dwI].flAgs = 0 ;
  874. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  875. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  876. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  877. atrChangeColorMode) ;
  878. dwI++ ;
  879. // *ChangeColorModeOnDoc?:
  880. mMainKeywordTable[dwI].pstrKeyword = "ChangeColorModeOnDoc?" ;
  881. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  882. mMainKeywordTable[dwI].flAgs = 0 ;
  883. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  884. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  885. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  886. atrChangeColorModeDoc) ;
  887. dwI++ ;
  888. // *MagentaInCyanDye:
  889. mMainKeywordTable[dwI].pstrKeyword = "MagentaInCyanDye" ;
  890. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  891. mMainKeywordTable[dwI].flAgs = 0 ;
  892. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  893. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  894. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  895. atrMagentaInCyanDye) ;
  896. dwI++ ;
  897. // *YellowInCyanDye:
  898. mMainKeywordTable[dwI].pstrKeyword = "YellowInCyanDye" ;
  899. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  900. mMainKeywordTable[dwI].flAgs = 0 ;
  901. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  902. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  903. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  904. atrYellowInCyanDye) ;
  905. dwI++ ;
  906. // *CyanInMagentaDye:
  907. mMainKeywordTable[dwI].pstrKeyword = "CyanInMagentaDye" ;
  908. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  909. mMainKeywordTable[dwI].flAgs = 0 ;
  910. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  911. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  912. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  913. atrCyanInMagentaDye) ;
  914. dwI++ ;
  915. // *YellowInMagentaDye:
  916. mMainKeywordTable[dwI].pstrKeyword = "YellowInMagentaDye" ;
  917. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  918. mMainKeywordTable[dwI].flAgs = 0 ;
  919. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  920. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  921. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  922. atrYellowInMagentaDye) ;
  923. dwI++ ;
  924. // *CyanInYellowDye:
  925. mMainKeywordTable[dwI].pstrKeyword = "CyanInYellowDye" ;
  926. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  927. mMainKeywordTable[dwI].flAgs = 0 ;
  928. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  929. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  930. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  931. atrCyanInYellowDye) ;
  932. dwI++ ;
  933. // *MagentaInYellowDye:
  934. mMainKeywordTable[dwI].pstrKeyword = "MagentaInYellowDye" ;
  935. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  936. mMainKeywordTable[dwI].flAgs = 0 ;
  937. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  938. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  939. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  940. atrMagentaInYellowDye) ;
  941. dwI++ ;
  942. // *UseExpColorSelectCmd?:
  943. mMainKeywordTable[dwI].pstrKeyword = "UseExpColorSelectCmd?" ;
  944. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  945. mMainKeywordTable[dwI].flAgs = 0 ;
  946. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  947. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  948. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  949. atrUseColorSelectCmd) ;
  950. dwI++ ;
  951. // *MoveToX0BeforeSetColor?:
  952. mMainKeywordTable[dwI].pstrKeyword = "MoveToX0BeforeSetColor?" ;
  953. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  954. mMainKeywordTable[dwI].flAgs = 0 ;
  955. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  956. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  957. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  958. atrMoveToX0BeforeColor) ;
  959. dwI++ ;
  960. // *EnableGDIColorMapping?:
  961. mMainKeywordTable[dwI].pstrKeyword = "EnableGDIColorMapping?" ;
  962. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  963. mMainKeywordTable[dwI].flAgs = 0 ;
  964. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  965. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  966. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  967. atrEnableGDIColorMapping) ;
  968. dwI++ ;
  969. // obsolete fields
  970. // *MaxNumPalettes:
  971. mMainKeywordTable[dwI].pstrKeyword = "MaxNumPalettes" ;
  972. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  973. mMainKeywordTable[dwI].flAgs = 0 ;
  974. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  975. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  976. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  977. atrMaxNumPalettes) ;
  978. dwI++ ;
  979. #if 0
  980. // *PaletteSizes:
  981. mMainKeywordTable[dwI].pstrKeyword = "PaletteSizes" ;
  982. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  983. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  984. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  985. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  986. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  987. atrPaletteSizes) ;
  988. dwI++ ;
  989. // *PaletteScope:
  990. mMainKeywordTable[dwI].pstrKeyword = "PaletteScope" ;
  991. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_PALETTESCOPE ;
  992. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  993. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  994. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  995. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  996. atrPaletteScope) ;
  997. dwI++ ;
  998. #endif
  999. // *MinOverlayID:
  1000. mMainKeywordTable[dwI].pstrKeyword = "MinOverlayID" ;
  1001. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1002. mMainKeywordTable[dwI].flAgs = 0 ;
  1003. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1004. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1005. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1006. atrMinOverlayID) ;
  1007. dwI++ ;
  1008. // *MaxOverlayID:
  1009. mMainKeywordTable[dwI].pstrKeyword = "MaxOverlayID" ;
  1010. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1011. mMainKeywordTable[dwI].flAgs = 0 ;
  1012. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1013. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1014. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1015. atrMaxOverlayID) ;
  1016. dwI++ ;
  1017. // *OptimizeLeftBound?:
  1018. mMainKeywordTable[dwI].pstrKeyword = "OptimizeLeftBound?" ;
  1019. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE;
  1020. mMainKeywordTable[dwI].flAgs = 0 ;
  1021. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1022. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1023. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1024. atrOptimizeLeftBound) ;
  1025. dwI++ ;
  1026. // *StripBlanks:
  1027. mMainKeywordTable[dwI].pstrKeyword = "StripBlanks" ;
  1028. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_STRIPBLANKS ;
  1029. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  1030. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1031. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1032. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1033. atrStripBlanks) ;
  1034. dwI++ ;
  1035. // *LandscapeGrxRotation:
  1036. mMainKeywordTable[dwI].pstrKeyword = "LandscapeGrxRotation" ;
  1037. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_LANDSCAPEGRXROTATION ;
  1038. mMainKeywordTable[dwI].flAgs = 0 ;
  1039. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1040. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1041. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1042. atrLandscapeGrxRotation) ;
  1043. dwI++ ;
  1044. // *RasterZeroFill?:
  1045. mMainKeywordTable[dwI].pstrKeyword = "RasterZeroFill?" ;
  1046. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  1047. mMainKeywordTable[dwI].flAgs = 0 ;
  1048. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1049. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1050. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1051. atrRasterZeroFill) ;
  1052. dwI++ ;
  1053. // *RasterSendAllData?:
  1054. mMainKeywordTable[dwI].pstrKeyword = "RasterSendAllData?" ;
  1055. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  1056. mMainKeywordTable[dwI].flAgs = 0 ;
  1057. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1058. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1059. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1060. atrRasterSendAllData) ;
  1061. dwI++ ;
  1062. // *SendMultipleRows?:
  1063. mMainKeywordTable[dwI].pstrKeyword = "SendMultipleRows?" ;
  1064. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  1065. mMainKeywordTable[dwI].flAgs = 0 ;
  1066. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1067. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1068. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1069. atrSendMultipleRows) ;
  1070. dwI++ ;
  1071. // *MaxMultipleRowBytes:
  1072. mMainKeywordTable[dwI].pstrKeyword = "MaxMultipleRowBytes" ;
  1073. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1074. mMainKeywordTable[dwI].flAgs = 0 ;
  1075. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1076. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1077. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1078. atrMaxMultipleRowBytes) ;
  1079. dwI++ ;
  1080. // *CursorXAfterSendBlockData:
  1081. mMainKeywordTable[dwI].pstrKeyword = "CursorXAfterSendBlockData" ;
  1082. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_CURSORXAFTERSENDBLOCKDATA ;
  1083. mMainKeywordTable[dwI].flAgs = 0 ;
  1084. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1085. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1086. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1087. atrCursorXAfterSendBlockData) ;
  1088. dwI++ ;
  1089. // *CursorYAfterSendBlockData:
  1090. mMainKeywordTable[dwI].pstrKeyword = "CursorYAfterSendBlockData" ;
  1091. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_CURSORYAFTERSENDBLOCKDATA ;
  1092. mMainKeywordTable[dwI].flAgs = 0 ;
  1093. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1094. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1095. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1096. atrCursorYAfterSendBlockData) ;
  1097. dwI++ ;
  1098. // *MirrorRasterByte?:
  1099. mMainKeywordTable[dwI].pstrKeyword = "MirrorRasterByte?" ;
  1100. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  1101. mMainKeywordTable[dwI].flAgs = 0 ;
  1102. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1103. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1104. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1105. atrMirrorRasterByte) ;
  1106. dwI++ ;
  1107. // *MirrorRasterPage?
  1108. mMainKeywordTable[dwI].pstrKeyword = "MirrorRasterPage?" ;
  1109. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  1110. mMainKeywordTable[dwI].flAgs = 0 ;
  1111. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1112. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1113. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1114. atrMirrorRasterPage) ;
  1115. dwI++ ;
  1116. // *DeviceFonts: formerly known as *Font:
  1117. mMainKeywordTable[dwI].pstrKeyword = "DeviceFonts" ;
  1118. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX ;
  1119. mMainKeywordTable[dwI].flAgs = KWF_LIST | KWF_ADDITIVE ;
  1120. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1121. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1122. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1123. atrDeviceFontsList ) ;
  1124. dwI++ ;
  1125. // *DefaultFont:
  1126. mMainKeywordTable[dwI].pstrKeyword = "DefaultFont" ;
  1127. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX ;
  1128. mMainKeywordTable[dwI].flAgs = 0 ;
  1129. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1130. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1131. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1132. atrDefaultFont) ;
  1133. dwI++ ;
  1134. // *TTFSEnabled?:
  1135. mMainKeywordTable[dwI].pstrKeyword = "TTFSEnabled?" ;
  1136. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  1137. mMainKeywordTable[dwI].flAgs = 0 ;
  1138. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1139. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1140. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1141. atrTTFSEnabled ) ;
  1142. dwI++ ;
  1143. // *RestoreDefaultFont?:
  1144. mMainKeywordTable[dwI].pstrKeyword = "RestoreDefaultFont?" ;
  1145. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  1146. mMainKeywordTable[dwI].flAgs = 0 ;
  1147. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1148. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1149. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1150. atrRestoreDefaultFont) ;
  1151. dwI++ ;
  1152. // *DefaultCTT:
  1153. mMainKeywordTable[dwI].pstrKeyword = "DefaultCTT" ;
  1154. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1155. mMainKeywordTable[dwI].flAgs = 0 ;
  1156. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1157. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1158. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1159. atrDefaultCTT) ;
  1160. dwI++ ;
  1161. // *MaxFontUsePerPage:
  1162. mMainKeywordTable[dwI].pstrKeyword = "MaxFontUsePerPage" ;
  1163. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1164. mMainKeywordTable[dwI].flAgs = 0 ;
  1165. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1166. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1167. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1168. atrMaxFontUsePerPage) ;
  1169. dwI++ ;
  1170. // *RotateFont?:
  1171. mMainKeywordTable[dwI].pstrKeyword = "RotateFont?" ;
  1172. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  1173. mMainKeywordTable[dwI].flAgs = 0 ;
  1174. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1175. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1176. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1177. atrRotateFont) ;
  1178. dwI++ ;
  1179. // *TextYOffset:
  1180. mMainKeywordTable[dwI].pstrKeyword = "TextYOffset" ;
  1181. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1182. mMainKeywordTable[dwI].flAgs = 0 ;
  1183. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1184. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1185. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1186. atrTextYOffset) ;
  1187. dwI++ ;
  1188. // *CharPosition:
  1189. mMainKeywordTable[dwI].pstrKeyword = "CharPosition" ;
  1190. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_CHARPOSITION ;
  1191. mMainKeywordTable[dwI].flAgs = 0 ;
  1192. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1193. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1194. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1195. atrCharPosition) ;
  1196. dwI++ ;
  1197. // ------- Font Downloading
  1198. // *MinFontID:
  1199. mMainKeywordTable[dwI].pstrKeyword = "MinFontID" ;
  1200. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1201. mMainKeywordTable[dwI].flAgs = 0 ;
  1202. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1203. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1204. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1205. atrMinFontID) ;
  1206. dwI++ ;
  1207. // *MaxFontID:
  1208. mMainKeywordTable[dwI].pstrKeyword = "MaxFontID" ;
  1209. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1210. mMainKeywordTable[dwI].flAgs = 0 ;
  1211. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1212. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1213. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1214. atrMaxFontID) ;
  1215. dwI++ ;
  1216. // *MaxNumDownFonts:
  1217. mMainKeywordTable[dwI].pstrKeyword = "MaxNumDownFonts" ;
  1218. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1219. mMainKeywordTable[dwI].flAgs = 0 ;
  1220. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1221. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1222. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1223. atrMaxNumDownFonts) ;
  1224. dwI++ ;
  1225. // *DLSymbolSet:
  1226. mMainKeywordTable[dwI].pstrKeyword = "DLSymbolSet" ;
  1227. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_DLSYMBOLSET ;
  1228. mMainKeywordTable[dwI].flAgs = 0 ;
  1229. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1230. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1231. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1232. atrDLSymbolSet) ;
  1233. dwI++ ;
  1234. // *MinGlyphID:
  1235. mMainKeywordTable[dwI].pstrKeyword = "MinGlyphID" ;
  1236. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1237. mMainKeywordTable[dwI].flAgs = 0 ;
  1238. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1239. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1240. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1241. atrMinGlyphID) ;
  1242. dwI++ ;
  1243. // *MaxGlyphID:
  1244. mMainKeywordTable[dwI].pstrKeyword = "MaxGlyphID" ;
  1245. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1246. mMainKeywordTable[dwI].flAgs = 0 ;
  1247. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1248. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1249. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1250. atrMaxGlyphID) ;
  1251. dwI++ ;
  1252. // *IncrementalDownload?:
  1253. mMainKeywordTable[dwI].pstrKeyword = "IncrementalDownload?" ;
  1254. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  1255. mMainKeywordTable[dwI].flAgs = 0 ;
  1256. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1257. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1258. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1259. atrIncrementalDownload) ;
  1260. dwI++ ;
  1261. // *FontFormat:
  1262. mMainKeywordTable[dwI].pstrKeyword = "FontFormat" ;
  1263. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_FONTFORMAT ;
  1264. mMainKeywordTable[dwI].flAgs = 0 ;
  1265. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1266. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1267. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1268. atrFontFormat) ;
  1269. dwI++ ;
  1270. // *MemoryUsage:
  1271. mMainKeywordTable[dwI].pstrKeyword = "MemoryUsage" ;
  1272. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  1273. mMainKeywordTable[dwI].flAgs = 0 ;
  1274. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1275. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1276. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1277. atrMemoryForFontsOnly) ;
  1278. dwI++ ;
  1279. // *DiffFontsPerByteMode?:
  1280. mMainKeywordTable[dwI].pstrKeyword = "DiffFontsPerByteMode?" ;
  1281. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  1282. mMainKeywordTable[dwI].flAgs = 0 ;
  1283. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1284. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1285. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1286. atrDiffFontsPerByteMode) ;
  1287. dwI++ ;
  1288. // -----
  1289. // *CursorXAfterRectFill:
  1290. mMainKeywordTable[dwI].pstrKeyword = "CursorXAfterRectFill" ;
  1291. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_CURXAFTER_RECTFILL ;
  1292. mMainKeywordTable[dwI].flAgs = 0 ;
  1293. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1294. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1295. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1296. atrCursorXAfterRectFill) ;
  1297. dwI++ ;
  1298. // *CursorYAfterRectFill:
  1299. mMainKeywordTable[dwI].pstrKeyword = "CursorYAfterRectFill" ;
  1300. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_CURYAFTER_RECTFILL ;
  1301. mMainKeywordTable[dwI].flAgs = 0 ;
  1302. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1303. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1304. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1305. atrCursorYAfterRectFill) ;
  1306. dwI++ ;
  1307. // *MinGrayFill:
  1308. mMainKeywordTable[dwI].pstrKeyword = "MinGrayFill" ;
  1309. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1310. mMainKeywordTable[dwI].flAgs = 0 ;
  1311. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1312. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1313. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1314. atrMinGrayFill) ;
  1315. dwI++ ;
  1316. // *MaxGrayFill:
  1317. mMainKeywordTable[dwI].pstrKeyword = "MaxGrayFill" ;
  1318. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1319. mMainKeywordTable[dwI].flAgs = 0 ;
  1320. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1321. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1322. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1323. atrMaxGrayFill) ;
  1324. dwI++ ;
  1325. // *TextHalftoneThreshold:
  1326. mMainKeywordTable[dwI].pstrKeyword = "TextHalftoneThreshold" ;
  1327. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  1328. mMainKeywordTable[dwI].flAgs = 0 ;
  1329. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1330. mMainKeywordTable[dwI].dwSubType = ATT_GLOBAL_FREEFLOAT ;
  1331. mMainKeywordTable[dwI].dwOffset = offsetof(GLOBALATTRIB,
  1332. atrTextHalftoneThreshold) ;
  1333. dwI++ ;
  1334. // ---- End of Section ---- //
  1335. mMainKeywordTable[dwI].pstrKeyword = NULL ;
  1336. dwI++ ;
  1337. return dwI ;
  1338. }
  1339. DWORD DWinitMainKeywordTable4(
  1340. DWORD dwI,
  1341. PGLOBL pglobl)
  1342. {
  1343. /* ---- FEATURE Construct keywords: ----- */
  1344. // *FeatureType:
  1345. mMainKeywordTable[dwI].pstrKeyword = "FeatureType" ;
  1346. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_FEATURETYPE ;
  1347. mMainKeywordTable[dwI].flAgs = 0 ;
  1348. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1349. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_ONLY ;
  1350. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1351. atrFeatureType) ;
  1352. dwI++ ;
  1353. // *UIType: aka PickMany?
  1354. mMainKeywordTable[dwI].pstrKeyword = "UIType" ;
  1355. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_UITYPE ;
  1356. mMainKeywordTable[dwI].flAgs = 0 ;
  1357. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1358. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_ONLY ;
  1359. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1360. atrUIType) ;
  1361. dwI++ ;
  1362. // *DefaultOption:
  1363. mMainKeywordTable[dwI].pstrKeyword = "DefaultOption" ;
  1364. mMainKeywordTable[dwI].eAllowedValue = VALUE_SYMBOL_OPTIONS ;
  1365. mMainKeywordTable[dwI].flAgs = 0 ;
  1366. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1367. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_FF ;
  1368. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1369. atrDefaultOption) ;
  1370. dwI++ ;
  1371. // *ConflictPriority:
  1372. mMainKeywordTable[dwI].pstrKeyword = "ConflictPriority" ;
  1373. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1374. mMainKeywordTable[dwI].flAgs = 0 ;
  1375. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1376. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_ONLY ;
  1377. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1378. atrPriority ) ;
  1379. dwI++ ;
  1380. // *Installable?:
  1381. mMainKeywordTable[dwI].pstrKeyword = "Installable?" ;
  1382. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  1383. mMainKeywordTable[dwI].flAgs = 0 ;
  1384. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1385. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_ONLY ;
  1386. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1387. atrFeaInstallable) ;
  1388. dwI++ ;
  1389. // *InstallableFeatureName:
  1390. mMainKeywordTable[dwI].pstrKeyword = "InstallableFeatureName" ;
  1391. mMainKeywordTable[dwI].eAllowedValue = VALUE_STRING_CP_CONVERT ;
  1392. mMainKeywordTable[dwI].flAgs = 0 ;
  1393. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1394. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_ONLY ;
  1395. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1396. atrInstallableFeaDisplayName ) ;
  1397. dwI++ ;
  1398. // *rcInstallableFeatureNameID:
  1399. mMainKeywordTable[dwI].pstrKeyword = "rcInstallableFeatureNameID" ;
  1400. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX ;
  1401. mMainKeywordTable[dwI].flAgs = 0 ;
  1402. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1403. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_ONLY ;
  1404. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1405. atrInstallableFeaRcNameID) ;
  1406. dwI++ ;
  1407. // *Name:
  1408. mMainKeywordTable[dwI].pstrKeyword = "Name" ;
  1409. mMainKeywordTable[dwI].eAllowedValue = VALUE_STRING_CP_CONVERT ;
  1410. mMainKeywordTable[dwI].flAgs = 0 ;
  1411. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1412. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_FF ;
  1413. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1414. atrFeaDisplayName ) ;
  1415. dwI++ ;
  1416. // *rcNameID:
  1417. mMainKeywordTable[dwI].pstrKeyword = "rcNameID" ;
  1418. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX ;
  1419. mMainKeywordTable[dwI].flAgs = 0 ;
  1420. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1421. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_FF ;
  1422. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1423. atrFeaRcNameID) ;
  1424. dwI++ ;
  1425. // *rcIconID:
  1426. mMainKeywordTable[dwI].pstrKeyword = "rcIconID" ;
  1427. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX ;
  1428. mMainKeywordTable[dwI].flAgs = 0 ;
  1429. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1430. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_FF ;
  1431. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1432. atrFeaRcIconID) ;
  1433. dwI++ ;
  1434. // *rcHelpTextID:
  1435. mMainKeywordTable[dwI].pstrKeyword = "rcHelpTextID" ;
  1436. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1437. mMainKeywordTable[dwI].flAgs = 0 ;
  1438. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1439. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_FF ;
  1440. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1441. atrFeaRcHelpTextID) ;
  1442. dwI++ ;
  1443. // *rcPromptMsgID:
  1444. mMainKeywordTable[dwI].pstrKeyword = "rcPromptMsgID" ;
  1445. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1446. mMainKeywordTable[dwI].flAgs = 0 ;
  1447. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1448. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_FF ;
  1449. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1450. atrFeaRcPromptMsgID) ;
  1451. dwI++ ;
  1452. // *rcPromptTime:
  1453. mMainKeywordTable[dwI].pstrKeyword = "rcPromptTime" ;
  1454. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_PROMPTTIME ;
  1455. mMainKeywordTable[dwI].flAgs = 0 ;
  1456. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1457. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_ONLY ;
  1458. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1459. atrFeaRcPromptTime) ;
  1460. dwI++ ;
  1461. // *ConcealFromUI?:
  1462. mMainKeywordTable[dwI].pstrKeyword = "ConcealFromUI?" ;
  1463. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  1464. mMainKeywordTable[dwI].flAgs = 0 ;
  1465. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1466. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_ONLY ;
  1467. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1468. atrConcealFromUI) ;
  1469. dwI++ ;
  1470. // *UpdateQualityMacro?:
  1471. mMainKeywordTable[dwI].pstrKeyword = "UpdateQualityMacro?" ;
  1472. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  1473. mMainKeywordTable[dwI].flAgs = 0 ;
  1474. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1475. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_ONLY ;
  1476. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1477. atrUpdateQualityMacro) ;
  1478. dwI++ ;
  1479. // *HelpIndex:
  1480. mMainKeywordTable[dwI].pstrKeyword = "HelpIndex" ;
  1481. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1482. mMainKeywordTable[dwI].flAgs = 0 ;
  1483. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1484. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_FF ;
  1485. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1486. atrFeaHelpIndex) ;
  1487. dwI++ ;
  1488. // *QueryOptionList: BUG_BUG! not supported in 5.0
  1489. mMainKeywordTable[dwI].pstrKeyword = "QueryOptionList" ;
  1490. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1491. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  1492. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1493. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_ONLY ;
  1494. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1495. atrQueryOptionList) ;
  1496. dwI++ ;
  1497. // *QueryDataType:
  1498. mMainKeywordTable[dwI].pstrKeyword = "QueryDataType" ;
  1499. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_QUERYDATATYPE ;
  1500. mMainKeywordTable[dwI].flAgs = 0 ;
  1501. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1502. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_ONLY ;
  1503. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1504. atrQueryDataType) ;
  1505. dwI++ ;
  1506. // *QueryDefaultOption: BUG_BUG! not supported in 5.0
  1507. mMainKeywordTable[dwI].pstrKeyword = "QueryDefaultOption" ;
  1508. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1509. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  1510. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1511. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_ONLY ;
  1512. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1513. atrQueryDefaultOption) ;
  1514. dwI++ ;
  1515. // *InstalledConstraints:
  1516. mMainKeywordTable[dwI].pstrKeyword = "InstalledConstraints" ;
  1517. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTRAINT ;
  1518. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  1519. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1520. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_ONLY ;
  1521. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1522. atrFeaInstallConstraints) ;
  1523. dwI++ ;
  1524. // *NotInstalledConstraints:
  1525. mMainKeywordTable[dwI].pstrKeyword = "NotInstalledConstraints" ;
  1526. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTRAINT ;
  1527. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  1528. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1529. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FEATURE_ONLY ;
  1530. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1531. atrFeaNotInstallConstraints) ;
  1532. dwI++ ;
  1533. // ---- End of Section ---- //
  1534. mMainKeywordTable[dwI].pstrKeyword = NULL ;
  1535. dwI++ ;
  1536. /* ---- OPTION Construct keywords: ----- */
  1537. // *Installable?:
  1538. mMainKeywordTable[dwI].pstrKeyword = "Installable?" ;
  1539. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  1540. mMainKeywordTable[dwI].flAgs = 0 ;
  1541. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1542. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  1543. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1544. atrOptInstallable) ;
  1545. dwI++ ;
  1546. // *InstallableFeatureName:
  1547. mMainKeywordTable[dwI].pstrKeyword = "InstallableFeatureName" ;
  1548. mMainKeywordTable[dwI].eAllowedValue = VALUE_STRING_CP_CONVERT ;
  1549. mMainKeywordTable[dwI].flAgs = 0 ;
  1550. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1551. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  1552. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1553. atrInstallableOptDisplayName ) ;
  1554. dwI++ ;
  1555. // *rcInstallableFeatureNameID:
  1556. mMainKeywordTable[dwI].pstrKeyword = "rcInstallableFeatureNameID" ;
  1557. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX ;
  1558. mMainKeywordTable[dwI].flAgs = 0 ;
  1559. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1560. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  1561. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1562. atrInstallableOptRcNameID) ;
  1563. dwI++ ;
  1564. // *Name:
  1565. mMainKeywordTable[dwI].pstrKeyword = "Name" ;
  1566. mMainKeywordTable[dwI].eAllowedValue = VALUE_STRING_CP_CONVERT;
  1567. mMainKeywordTable[dwI].flAgs = 0 ;
  1568. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1569. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1570. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1571. atrOptDisplayName ) ;
  1572. gdwOptionName = dwI ;
  1573. dwI++ ;
  1574. // *rcNameID:
  1575. mMainKeywordTable[dwI].pstrKeyword = "rcNameID" ;
  1576. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX;
  1577. mMainKeywordTable[dwI].flAgs = 0 ;
  1578. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1579. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1580. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1581. atrOptRcNameID) ;
  1582. dwI++ ;
  1583. // *rcIconID:
  1584. mMainKeywordTable[dwI].pstrKeyword = "rcIconID" ;
  1585. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX;
  1586. mMainKeywordTable[dwI].flAgs = 0 ;
  1587. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1588. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1589. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1590. atrOptRcIconID) ;
  1591. dwI++ ;
  1592. // *rcHelpTextID:
  1593. mMainKeywordTable[dwI].pstrKeyword = "rcHelpTextID" ;
  1594. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  1595. mMainKeywordTable[dwI].flAgs = 0 ;
  1596. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1597. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1598. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1599. atrOptRcHelpTextID) ;
  1600. dwI++ ;
  1601. // *HelpIndex:
  1602. mMainKeywordTable[dwI].pstrKeyword = "HelpIndex" ;
  1603. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  1604. mMainKeywordTable[dwI].flAgs = 0 ;
  1605. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1606. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1607. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1608. atrOptHelpIndex) ;
  1609. dwI++ ;
  1610. // *rcPromptMsgID:
  1611. mMainKeywordTable[dwI].pstrKeyword = "rcPromptMsgID" ;
  1612. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  1613. mMainKeywordTable[dwI].flAgs = 0 ;
  1614. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1615. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1616. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1617. atrOptRcPromptMsgID) ;
  1618. dwI++ ;
  1619. // *rcPromptTime:
  1620. mMainKeywordTable[dwI].pstrKeyword = "rcPromptTime" ;
  1621. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_PROMPTTIME ;
  1622. mMainKeywordTable[dwI].flAgs = 0 ;
  1623. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1624. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1625. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1626. atrOptRcPromptTime) ;
  1627. dwI++ ;
  1628. // *Constraints:
  1629. mMainKeywordTable[dwI].pstrKeyword = "Constraints" ;
  1630. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTRAINT ;
  1631. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  1632. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1633. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  1634. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1635. atrConstraints) ;
  1636. dwI++ ;
  1637. // *InstalledConstraints:
  1638. mMainKeywordTable[dwI].pstrKeyword = "InstalledConstraints" ;
  1639. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTRAINT ;
  1640. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  1641. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1642. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  1643. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1644. atrOptInstallConstraints) ;
  1645. dwI++ ;
  1646. // *NotInstalledConstraints:
  1647. mMainKeywordTable[dwI].pstrKeyword = "NotInstalledConstraints" ;
  1648. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTRAINT ;
  1649. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  1650. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1651. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  1652. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1653. atrOptNotInstallConstraints) ;
  1654. dwI++ ;
  1655. // *OptionID:
  1656. mMainKeywordTable[dwI].pstrKeyword = "OptionID" ;
  1657. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1658. mMainKeywordTable[dwI].flAgs = 0 ;
  1659. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1660. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  1661. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1662. atrOptIDvalue) ;
  1663. dwI++ ;
  1664. // *DisabledFeatures:
  1665. mMainKeywordTable[dwI].pstrKeyword = "DisabledFeatures" ;
  1666. mMainKeywordTable[dwI].eAllowedValue = VALUE_PARTIALLY_QUALIFIED_NAME ;
  1667. mMainKeywordTable[dwI].flAgs = KWF_LIST | KWF_ADDITIVE ;
  1668. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1669. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1670. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1671. atrDisabledFeatures) ;
  1672. dwI++ ;
  1673. #ifdef GMACROS
  1674. // *DependentSettings:
  1675. mMainKeywordTable[dwI].pstrKeyword = "DependentSettings" ;
  1676. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME ;
  1677. mMainKeywordTable[dwI].flAgs = KWF_LIST | KWF_CHAIN ;
  1678. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1679. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1680. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1681. atrDependentSettings) ;
  1682. dwI++ ;
  1683. // *UIChangeTriggersMacro:
  1684. mMainKeywordTable[dwI].pstrKeyword = "UIChangeTriggersMacro" ;
  1685. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME ;
  1686. mMainKeywordTable[dwI].flAgs = KWF_LIST | KWF_CHAIN ;
  1687. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1688. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1689. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1690. atrUIChangeTriggersMacro) ;
  1691. dwI++ ;
  1692. #endif
  1693. // -- Option specific keywords -- //
  1694. // *PrintableArea:
  1695. mMainKeywordTable[dwI].pstrKeyword = "PrintableArea" ;
  1696. mMainKeywordTable[dwI].eAllowedValue = VALUE_POINT;
  1697. mMainKeywordTable[dwI].flAgs = 0 ;
  1698. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1699. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1700. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1701. atrPrintableSize) ;
  1702. dwI++ ;
  1703. // *PrintableOrigin:
  1704. mMainKeywordTable[dwI].pstrKeyword = "PrintableOrigin" ;
  1705. mMainKeywordTable[dwI].eAllowedValue = VALUE_POINT;
  1706. mMainKeywordTable[dwI].flAgs = 0 ;
  1707. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1708. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1709. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1710. atrPrintableOrigin) ;
  1711. dwI++ ;
  1712. // *CursorOrigin:
  1713. mMainKeywordTable[dwI].pstrKeyword = "CursorOrigin" ;
  1714. mMainKeywordTable[dwI].eAllowedValue = VALUE_POINT;
  1715. mMainKeywordTable[dwI].flAgs = 0 ;
  1716. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1717. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1718. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1719. atrCursorOrigin) ;
  1720. dwI++ ;
  1721. // *VectorOffset:
  1722. mMainKeywordTable[dwI].pstrKeyword = "VectorOffset" ;
  1723. mMainKeywordTable[dwI].eAllowedValue = VALUE_POINT;
  1724. mMainKeywordTable[dwI].flAgs = 0 ;
  1725. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1726. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1727. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1728. atrVectorOffset) ;
  1729. dwI++ ;
  1730. // *MinSize:
  1731. mMainKeywordTable[dwI].pstrKeyword = "MinSize" ;
  1732. mMainKeywordTable[dwI].eAllowedValue = VALUE_POINT;
  1733. mMainKeywordTable[dwI].flAgs = 0 ;
  1734. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1735. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1736. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1737. atrMinSize) ;
  1738. dwI++ ;
  1739. // *MaxSize:
  1740. mMainKeywordTable[dwI].pstrKeyword = "MaxSize" ;
  1741. mMainKeywordTable[dwI].eAllowedValue = VALUE_POINT;
  1742. mMainKeywordTable[dwI].flAgs = 0 ;
  1743. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1744. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1745. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1746. atrMaxSize) ;
  1747. dwI++ ;
  1748. // *TopMargin:
  1749. mMainKeywordTable[dwI].pstrKeyword = "TopMargin" ;
  1750. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1751. mMainKeywordTable[dwI].flAgs = 0 ;
  1752. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1753. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1754. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1755. atrTopMargin) ;
  1756. dwI++ ;
  1757. // *BottomMargin:
  1758. mMainKeywordTable[dwI].pstrKeyword = "BottomMargin" ;
  1759. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1760. mMainKeywordTable[dwI].flAgs = 0 ;
  1761. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1762. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1763. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1764. atrBottomMargin) ;
  1765. dwI++ ;
  1766. // *MaxPrintableWidth:
  1767. mMainKeywordTable[dwI].pstrKeyword = "MaxPrintableWidth" ;
  1768. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1769. mMainKeywordTable[dwI].flAgs = 0 ;
  1770. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1771. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1772. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1773. atrMaxPrintableWidth) ;
  1774. dwI++ ;
  1775. // *MinLeftMargin:
  1776. mMainKeywordTable[dwI].pstrKeyword = "MinLeftMargin" ;
  1777. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1778. mMainKeywordTable[dwI].flAgs = 0 ;
  1779. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1780. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1781. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1782. atrMinLeftMargin) ;
  1783. dwI++ ;
  1784. // *CenterPrintable?:
  1785. mMainKeywordTable[dwI].pstrKeyword = "CenterPrintable?" ;
  1786. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  1787. mMainKeywordTable[dwI].flAgs = 0 ;
  1788. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1789. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1790. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1791. atrCenterPrintable) ;
  1792. dwI++ ;
  1793. // *PageDimensions:
  1794. mMainKeywordTable[dwI].pstrKeyword = "PageDimensions" ;
  1795. mMainKeywordTable[dwI].eAllowedValue = VALUE_POINT;
  1796. mMainKeywordTable[dwI].flAgs = 0 ;
  1797. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1798. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1799. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1800. atrPageDimensions) ;
  1801. dwI++ ;
  1802. // *RotateSize?:
  1803. mMainKeywordTable[dwI].pstrKeyword = "RotateSize?" ;
  1804. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  1805. mMainKeywordTable[dwI].flAgs = 0 ;
  1806. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1807. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1808. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1809. atrRotateSize) ;
  1810. dwI++ ;
  1811. // *PortRotationAngle:
  1812. mMainKeywordTable[dwI].pstrKeyword = "PortRotationAngle" ;
  1813. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  1814. mMainKeywordTable[dwI].flAgs = 0 ;
  1815. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1816. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1817. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1818. atrPortRotationAngle) ;
  1819. dwI++ ;
  1820. // *PageProtectMem:
  1821. mMainKeywordTable[dwI].pstrKeyword = "PageProtectMem" ;
  1822. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  1823. mMainKeywordTable[dwI].flAgs = 0 ;
  1824. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1825. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1826. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1827. atrPageProtectMem) ;
  1828. dwI++ ;
  1829. // *CustCursorOriginX:
  1830. mMainKeywordTable[dwI].pstrKeyword = "CustCursorOriginX" ;
  1831. mMainKeywordTable[dwI].eAllowedValue = VALUE_PARAMETER;
  1832. mMainKeywordTable[dwI].flAgs = 0 ;
  1833. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1834. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1835. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1836. atrCustCursorOriginX) ;
  1837. dwI++ ;
  1838. // *CustCursorOriginY:
  1839. mMainKeywordTable[dwI].pstrKeyword = "CustCursorOriginY" ;
  1840. mMainKeywordTable[dwI].eAllowedValue = VALUE_PARAMETER;
  1841. mMainKeywordTable[dwI].flAgs = 0 ;
  1842. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1843. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1844. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1845. atrCustCursorOriginY) ;
  1846. dwI++ ;
  1847. // *CustPrintableOriginX:
  1848. mMainKeywordTable[dwI].pstrKeyword = "CustPrintableOriginX" ;
  1849. mMainKeywordTable[dwI].eAllowedValue = VALUE_PARAMETER;
  1850. mMainKeywordTable[dwI].flAgs = 0 ;
  1851. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1852. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1853. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1854. atrCustPrintableOriginX) ;
  1855. dwI++ ;
  1856. // *CustPrintableOriginY:
  1857. mMainKeywordTable[dwI].pstrKeyword = "CustPrintableOriginY" ;
  1858. mMainKeywordTable[dwI].eAllowedValue = VALUE_PARAMETER;
  1859. mMainKeywordTable[dwI].flAgs = 0 ;
  1860. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1861. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1862. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1863. atrCustPrintableOriginY) ;
  1864. dwI++ ;
  1865. // *CustPrintableSizeX:
  1866. mMainKeywordTable[dwI].pstrKeyword = "CustPrintableSizeX" ;
  1867. mMainKeywordTable[dwI].eAllowedValue = VALUE_PARAMETER;
  1868. mMainKeywordTable[dwI].flAgs = 0 ;
  1869. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1870. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1871. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1872. atrCustPrintableSizeX) ;
  1873. dwI++ ;
  1874. // *CustPrintableSizeY:
  1875. mMainKeywordTable[dwI].pstrKeyword = "CustPrintableSizeY" ;
  1876. mMainKeywordTable[dwI].eAllowedValue = VALUE_PARAMETER;
  1877. mMainKeywordTable[dwI].flAgs = 0 ;
  1878. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1879. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1880. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1881. atrCustPrintableSizeY) ;
  1882. dwI++ ;
  1883. // *FeedMargins:
  1884. mMainKeywordTable[dwI].pstrKeyword = "FeedMargins" ;
  1885. mMainKeywordTable[dwI].eAllowedValue = VALUE_POINT;
  1886. mMainKeywordTable[dwI].flAgs = 0 ;
  1887. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1888. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1889. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1890. atrFeedMargins) ;
  1891. dwI++ ;
  1892. // *PaperFeed:
  1893. mMainKeywordTable[dwI].pstrKeyword = "PaperFeed" ;
  1894. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_PAPERFEED_ORIENT ;
  1895. mMainKeywordTable[dwI].flAgs = 0 ;
  1896. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1897. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1898. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1899. atrPaperFeed) ;
  1900. dwI++ ;
  1901. // *DPI:
  1902. mMainKeywordTable[dwI].pstrKeyword = "DPI" ;
  1903. mMainKeywordTable[dwI].eAllowedValue = VALUE_POINT;
  1904. mMainKeywordTable[dwI].flAgs = 0 ;
  1905. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1906. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1907. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1908. atrDPI) ;
  1909. dwI++ ;
  1910. // *SpotDiameter:
  1911. mMainKeywordTable[dwI].pstrKeyword = "SpotDiameter" ;
  1912. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  1913. mMainKeywordTable[dwI].flAgs = 0 ;
  1914. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1915. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1916. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1917. atrSpotDiameter) ;
  1918. dwI++ ;
  1919. // *TextDPI:
  1920. mMainKeywordTable[dwI].pstrKeyword = "TextDPI" ;
  1921. mMainKeywordTable[dwI].eAllowedValue = VALUE_POINT;
  1922. mMainKeywordTable[dwI].flAgs = 0 ;
  1923. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1924. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1925. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1926. atrTextDPI) ;
  1927. dwI++ ;
  1928. // *PinsPerPhysPass:
  1929. mMainKeywordTable[dwI].pstrKeyword = "PinsPerPhysPass" ;
  1930. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  1931. mMainKeywordTable[dwI].flAgs = 0 ;
  1932. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1933. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1934. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1935. atrPinsPerPhysPass) ;
  1936. dwI++ ;
  1937. // *PinsPerLogPass:
  1938. mMainKeywordTable[dwI].pstrKeyword = "PinsPerLogPass" ;
  1939. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  1940. mMainKeywordTable[dwI].flAgs = 0 ;
  1941. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1942. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1943. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1944. atrPinsPerLogPass) ;
  1945. dwI++ ;
  1946. // *RequireUniDir?:
  1947. mMainKeywordTable[dwI].pstrKeyword = "RequireUniDir?" ;
  1948. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE;
  1949. mMainKeywordTable[dwI].flAgs = 0 ;
  1950. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1951. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1952. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1953. atrRequireUniDir) ;
  1954. dwI++ ;
  1955. // *MinStripBlankPixels:
  1956. mMainKeywordTable[dwI].pstrKeyword = "MinStripBlankPixels" ;
  1957. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  1958. mMainKeywordTable[dwI].flAgs = 0 ;
  1959. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1960. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1961. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1962. atrMinStripBlankPixels) ;
  1963. dwI++ ;
  1964. // *RedDeviceGamma:
  1965. mMainKeywordTable[dwI].pstrKeyword = "RedDeviceGamma" ;
  1966. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  1967. mMainKeywordTable[dwI].flAgs = 0 ;
  1968. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1969. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1970. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1971. atrRedDeviceGamma) ;
  1972. dwI++ ;
  1973. // *GreenDeviceGamma:
  1974. mMainKeywordTable[dwI].pstrKeyword = "GreenDeviceGamma" ;
  1975. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  1976. mMainKeywordTable[dwI].flAgs = 0 ;
  1977. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1978. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1979. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1980. atrGreenDeviceGamma) ;
  1981. dwI++ ;
  1982. // *BlueDeviceGamma:
  1983. mMainKeywordTable[dwI].pstrKeyword = "BlueDeviceGamma" ;
  1984. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  1985. mMainKeywordTable[dwI].flAgs = 0 ;
  1986. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1987. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_FF ;
  1988. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1989. atrBlueDeviceGamma) ;
  1990. dwI++ ;
  1991. // *Color?:
  1992. mMainKeywordTable[dwI].pstrKeyword = "Color?" ;
  1993. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  1994. mMainKeywordTable[dwI].flAgs = 0 ;
  1995. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  1996. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  1997. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  1998. atrColor) ;
  1999. dwI++ ;
  2000. // *DevNumOfPlanes:
  2001. mMainKeywordTable[dwI].pstrKeyword = "DevNumOfPlanes" ;
  2002. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  2003. mMainKeywordTable[dwI].flAgs = 0 ;
  2004. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2005. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  2006. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  2007. atrDevNumOfPlanes) ;
  2008. dwI++ ;
  2009. // *DevBPP:
  2010. mMainKeywordTable[dwI].pstrKeyword = "DevBPP" ;
  2011. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  2012. mMainKeywordTable[dwI].flAgs = 0 ;
  2013. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2014. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  2015. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  2016. atrDevBPP) ;
  2017. dwI++ ;
  2018. // *ColorPlaneOrder:
  2019. mMainKeywordTable[dwI].pstrKeyword = "ColorPlaneOrder" ;
  2020. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_COLORPLANE ;
  2021. mMainKeywordTable[dwI].flAgs = KWF_LIST ;
  2022. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2023. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  2024. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  2025. atrColorPlaneOrder) ;
  2026. dwI++ ;
  2027. // *DrvBPP:
  2028. mMainKeywordTable[dwI].pstrKeyword = "DrvBPP" ;
  2029. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  2030. mMainKeywordTable[dwI].flAgs = 0 ;
  2031. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2032. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  2033. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  2034. atrDrvBPP) ;
  2035. dwI++ ;
  2036. // *IPCallbackID:
  2037. mMainKeywordTable[dwI].pstrKeyword = "IPCallbackID" ;
  2038. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  2039. mMainKeywordTable[dwI].flAgs = 0 ;
  2040. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2041. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  2042. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  2043. atrIPCallbackID) ;
  2044. dwI++ ;
  2045. // *ColorSeparation?:
  2046. mMainKeywordTable[dwI].pstrKeyword = "ColorSeparation?" ;
  2047. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  2048. mMainKeywordTable[dwI].flAgs = 0 ;
  2049. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2050. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  2051. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  2052. atrColorSeparation) ;
  2053. dwI++ ;
  2054. // *RasterMode:
  2055. mMainKeywordTable[dwI].pstrKeyword = "RasterMode" ;
  2056. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_RASTERMODE ;
  2057. mMainKeywordTable[dwI].flAgs = 0 ;
  2058. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2059. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  2060. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  2061. atrRasterMode) ;
  2062. dwI++ ;
  2063. // *PaletteSize:
  2064. mMainKeywordTable[dwI].pstrKeyword = "PaletteSize" ;
  2065. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  2066. mMainKeywordTable[dwI].flAgs = 0 ;
  2067. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2068. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  2069. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  2070. atrPaletteSize) ;
  2071. dwI++ ;
  2072. // *PaletteProgrammable?:
  2073. mMainKeywordTable[dwI].pstrKeyword = "PaletteProgrammable?" ;
  2074. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  2075. mMainKeywordTable[dwI].flAgs = 0 ;
  2076. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2077. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  2078. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  2079. atrPaletteProgrammable) ;
  2080. dwI++ ;
  2081. // *rcHTPatternID:
  2082. mMainKeywordTable[dwI].pstrKeyword = "rcHTPatternID" ;
  2083. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX;
  2084. mMainKeywordTable[dwI].flAgs = 0 ;
  2085. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2086. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  2087. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  2088. atrRcHTPatternID) ;
  2089. dwI++ ;
  2090. // *HTPatternSize:
  2091. mMainKeywordTable[dwI].pstrKeyword = "HTPatternSize" ;
  2092. mMainKeywordTable[dwI].eAllowedValue = VALUE_POINT;
  2093. mMainKeywordTable[dwI].flAgs = 0 ;
  2094. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2095. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  2096. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  2097. atrHTPatternSize) ;
  2098. dwI++ ;
  2099. // *HTNumPatterns:
  2100. mMainKeywordTable[dwI].pstrKeyword = "HTNumPatterns" ;
  2101. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  2102. mMainKeywordTable[dwI].flAgs = 0 ;
  2103. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2104. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  2105. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  2106. atrHTNumPatterns) ;
  2107. dwI++ ;
  2108. // *HTCallbackID:
  2109. mMainKeywordTable[dwI].pstrKeyword = "HTCallbackID" ;
  2110. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  2111. mMainKeywordTable[dwI].flAgs = 0 ;
  2112. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2113. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  2114. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  2115. atrHTCallbackID) ;
  2116. dwI++ ;
  2117. // *Luminance:
  2118. mMainKeywordTable[dwI].pstrKeyword = "Luminance" ;
  2119. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  2120. mMainKeywordTable[dwI].flAgs = 0 ;
  2121. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2122. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  2123. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  2124. atrLuminance) ;
  2125. dwI++ ;
  2126. // *MemoryConfigKB:
  2127. mMainKeywordTable[dwI].pstrKeyword = "MemoryConfigKB" ;
  2128. mMainKeywordTable[dwI].eAllowedValue = VALUE_POINT ;
  2129. mMainKeywordTable[dwI].flAgs = 0 ;
  2130. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2131. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  2132. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  2133. atrMemoryConfigKB) ;
  2134. gdwMemoryConfigKB = dwI ;
  2135. dwI++ ;
  2136. // *MemoryConfigMB:
  2137. mMainKeywordTable[dwI].pstrKeyword = "MemoryConfigMB" ;
  2138. mMainKeywordTable[dwI].eAllowedValue = VALUE_POINT ;
  2139. mMainKeywordTable[dwI].flAgs = 0 ;
  2140. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2141. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  2142. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  2143. atrMemoryConfigMB) ;
  2144. gdwMemoryConfigMB = dwI ;
  2145. dwI++ ;
  2146. // *OutputOrderReversed?:
  2147. mMainKeywordTable[dwI].pstrKeyword = "OutputOrderReversed?" ;
  2148. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  2149. mMainKeywordTable[dwI].flAgs = 0 ;
  2150. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2151. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_OPTION_ONLY ;
  2152. mMainKeywordTable[dwI].dwOffset = offsetof(DFEATURE_OPTIONS,
  2153. atrOutputOrderReversed) ;
  2154. dwI++ ;
  2155. // ---- End of Section ---- //
  2156. mMainKeywordTable[dwI].pstrKeyword = NULL ;
  2157. dwI++ ;
  2158. return dwI ;
  2159. }
  2160. DWORD DWinitMainKeywordTable5(
  2161. DWORD dwI,
  2162. PGLOBL pglobl)
  2163. {
  2164. /* ---- COMMAND Construct keywords: ----- */
  2165. // *Cmd:
  2166. mMainKeywordTable[dwI].pstrKeyword = "Cmd" ;
  2167. mMainKeywordTable[dwI].eAllowedValue = VALUE_COMMAND_INVOC ;
  2168. mMainKeywordTable[dwI].flAgs = KWF_COMMAND ;
  2169. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2170. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_COMMAND_ONLY ;
  2171. mMainKeywordTable[dwI].dwOffset = offsetof(COMMAND, strInvocation ) ;
  2172. gdwCommandCmd = dwI ;
  2173. dwI++ ;
  2174. // *CallbackID:
  2175. mMainKeywordTable[dwI].pstrKeyword = "CallbackID" ;
  2176. mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER;
  2177. mMainKeywordTable[dwI].flAgs = KWF_COMMAND ;
  2178. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2179. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_COMMAND_ONLY ;
  2180. mMainKeywordTable[dwI].dwOffset = offsetof(COMMAND, dwCmdCallbackID ) ;
  2181. dwI++ ;
  2182. // *Order:
  2183. mMainKeywordTable[dwI].pstrKeyword = "Order" ;
  2184. mMainKeywordTable[dwI].eAllowedValue = VALUE_ORDERDEPENDENCY;
  2185. mMainKeywordTable[dwI].flAgs = KWF_COMMAND ;
  2186. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2187. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_COMMAND_ONLY ;
  2188. mMainKeywordTable[dwI].dwOffset = offsetof(COMMAND, ordOrder ) ;
  2189. dwI++ ;
  2190. // *Params:
  2191. mMainKeywordTable[dwI].pstrKeyword = "Params" ;
  2192. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_STANDARD_VARS ;
  2193. mMainKeywordTable[dwI].flAgs = KWF_LIST | KWF_COMMAND ;
  2194. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2195. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_COMMAND_ONLY ;
  2196. mMainKeywordTable[dwI].dwOffset = offsetof(COMMAND, dwStandardVarsList) ;
  2197. dwI++ ;
  2198. // *NoPageEject?:
  2199. mMainKeywordTable[dwI].pstrKeyword = "NoPageEject?" ;
  2200. mMainKeywordTable[dwI].eAllowedValue = VALUE_CONSTANT_BOOLEANTYPE ;
  2201. mMainKeywordTable[dwI].flAgs = KWF_COMMAND ;
  2202. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2203. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_COMMAND_ONLY ;
  2204. mMainKeywordTable[dwI].dwOffset = offsetof(COMMAND, bNoPageEject) ;
  2205. dwI++ ;
  2206. // ---- End of Section ---- //
  2207. mMainKeywordTable[dwI].pstrKeyword = NULL ;
  2208. dwI++ ;
  2209. /* ---- FONTCART Construct keywords: ----- */
  2210. // *rcCartridgeNameID:
  2211. mMainKeywordTable[dwI].pstrKeyword = "rcCartridgeNameID" ;
  2212. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX ;
  2213. mMainKeywordTable[dwI].flAgs = KWF_FONTCART ;
  2214. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2215. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FONTCART_ONLY ;
  2216. mMainKeywordTable[dwI].dwOffset = offsetof(FONTCART , dwRCCartNameID ) ;
  2217. dwI++ ;
  2218. // *CartridgeName:
  2219. mMainKeywordTable[dwI].pstrKeyword = "CartridgeName" ;
  2220. mMainKeywordTable[dwI].eAllowedValue = VALUE_STRING_CP_CONVERT;
  2221. mMainKeywordTable[dwI].flAgs = KWF_FONTCART ;
  2222. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2223. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FONTCART_ONLY ;
  2224. mMainKeywordTable[dwI].dwOffset = offsetof(FONTCART , strCartName ) ;
  2225. dwI++ ;
  2226. // *Fonts:
  2227. mMainKeywordTable[dwI].pstrKeyword = "Fonts" ;
  2228. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX;
  2229. mMainKeywordTable[dwI].flAgs = KWF_LIST | KWF_FONTCART ;
  2230. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2231. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FONTCART_ONLY ;
  2232. mMainKeywordTable[dwI].dwOffset = offsetof(FONTCART , dwFontLst ) ;
  2233. dwI++ ;
  2234. // *PortraitFonts:
  2235. mMainKeywordTable[dwI].pstrKeyword = "PortraitFonts" ;
  2236. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX;
  2237. mMainKeywordTable[dwI].flAgs = KWF_LIST | KWF_FONTCART ;
  2238. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2239. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FONTCART_ONLY ;
  2240. mMainKeywordTable[dwI].dwOffset = offsetof(FONTCART , dwPortFontLst ) ;
  2241. dwI++ ;
  2242. // *LandscapeFonts:
  2243. mMainKeywordTable[dwI].pstrKeyword = "LandscapeFonts" ;
  2244. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX;
  2245. mMainKeywordTable[dwI].flAgs = KWF_LIST | KWF_FONTCART ;
  2246. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2247. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_FONTCART_ONLY ;
  2248. mMainKeywordTable[dwI].dwOffset = offsetof(FONTCART , dwLandFontLst ) ;
  2249. dwI++ ;
  2250. // ---- End of Section ---- //
  2251. mMainKeywordTable[dwI].pstrKeyword = NULL ;
  2252. dwI++ ;
  2253. /* ---- TTFONTSUBS Construct keywords: ----- */
  2254. // these keywords may be synthesized along with the construct
  2255. // *TTFontSub from the shortcut:
  2256. // *TTFS: "font name" : <fontID>
  2257. // *TTFontName:
  2258. mMainKeywordTable[dwI].pstrKeyword = "TTFontName" ;
  2259. mMainKeywordTable[dwI].eAllowedValue = VALUE_STRING_CP_CONVERT ;
  2260. mMainKeywordTable[dwI].flAgs = KWF_TTFONTSUBS ;
  2261. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2262. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_TTFONTSUBS_ONLY ;
  2263. mMainKeywordTable[dwI].dwOffset = offsetof(TTFONTSUBTABLE, arTTFontName) ;
  2264. dwI++ ;
  2265. // *DevFontName:
  2266. mMainKeywordTable[dwI].pstrKeyword = "DevFontName" ;
  2267. mMainKeywordTable[dwI].eAllowedValue = VALUE_STRING_CP_CONVERT ;
  2268. mMainKeywordTable[dwI].flAgs = KWF_TTFONTSUBS ;
  2269. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2270. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_TTFONTSUBS_ONLY ;
  2271. mMainKeywordTable[dwI].dwOffset = offsetof(TTFONTSUBTABLE, arDevFontName) ;
  2272. dwI++ ;
  2273. // *rcTTFontNameID:
  2274. mMainKeywordTable[dwI].pstrKeyword = "rcTTFontNameID" ;
  2275. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX ;
  2276. mMainKeywordTable[dwI].flAgs = KWF_TTFONTSUBS ;
  2277. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2278. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_TTFONTSUBS_ONLY ;
  2279. mMainKeywordTable[dwI].dwOffset = offsetof(TTFONTSUBTABLE,
  2280. dwRcTTFontNameID) ;
  2281. dwI++ ;
  2282. // *rcDevFontNameID:
  2283. mMainKeywordTable[dwI].pstrKeyword = "rcDevFontNameID" ;
  2284. mMainKeywordTable[dwI].eAllowedValue = VALUE_QUALIFIED_NAME_EX ;
  2285. mMainKeywordTable[dwI].flAgs = KWF_TTFONTSUBS ;
  2286. mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2287. mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_TTFONTSUBS_ONLY ;
  2288. mMainKeywordTable[dwI].dwOffset = offsetof(TTFONTSUBTABLE,
  2289. dwRcDevFontNameID) ;
  2290. dwI++ ;
  2291. // *DevFontID:
  2292. // mMainKeywordTable[dwI].pstrKeyword = "DevFontID" ;
  2293. // mMainKeywordTable[dwI].eAllowedValue = VALUE_INTEGER ;
  2294. // mMainKeywordTable[dwI].flAgs = KWF_TTFONTSUBS ;
  2295. // mMainKeywordTable[dwI].eType = TY_ATTRIBUTE ;
  2296. // mMainKeywordTable[dwI].dwSubType = ATT_LOCAL_TTFONTSUBS_ONLY ;
  2297. // mMainKeywordTable[dwI].dwOffset = offsetof(TTFONTSUBTABLE, dwDevFontID) ;
  2298. // dwI++ ;
  2299. // ---- End of Section ---- //
  2300. mMainKeywordTable[dwI].pstrKeyword = NULL ;
  2301. dwI++ ;
  2302. /* ---- OEM Construct keywords: ----- */
  2303. // ---- End of Section ---- //
  2304. mMainKeywordTable[dwI].pstrKeyword = NULL ;
  2305. dwI++ ;
  2306. /* ---- END_ATTR No more Construct keywords: ----- */
  2307. return dwI ;
  2308. }
  2309. VOID VinitValueToSize(
  2310. PGLOBL pglobl)
  2311. {
  2312. DWORD dwI ;
  2313. // initialize to DWORD size as defaults.
  2314. for(dwI = 0 ; dwI < VALUE_MAX ; dwI++)
  2315. gValueToSize[dwI] = sizeof(DWORD) ;
  2316. gValueToSize[NO_VALUE] = 0 ;
  2317. gValueToSize[VALUE_LARGEST] = 0 ;
  2318. gValueToSize[VALUE_STRING_NO_CONVERT] = sizeof(ARRAYREF) ;
  2319. gValueToSize[VALUE_STRING_DEF_CONVERT] = sizeof(ARRAYREF) ;
  2320. gValueToSize[VALUE_STRING_CP_CONVERT] = sizeof(ARRAYREF) ;
  2321. gValueToSize[VALUE_COMMAND_INVOC] = sizeof(ARRAYREF) ;
  2322. gValueToSize[VALUE_PARAMETER] = sizeof(ARRAYREF) ;
  2323. // SYMBOLS and CONSTANTS are all DWORD sized.
  2324. gValueToSize[VALUE_POINT] = sizeof(POINT) ; // etc
  2325. gValueToSize[VALUE_RECT] = sizeof(RECT) ; // etc
  2326. gValueToSize[VALUE_QUALIFIED_NAME] = sizeof(DWORD) ; // currently
  2327. // VALUE_CONSTRAINT, VALUE_INVALID_INSTALL_COMBO
  2328. // are currently all accessed via DWORD indicies to nodes.
  2329. gValueToSize[VALUE_ORDERDEPENDENCY] = sizeof(ORDERDEPENDENCY) ;
  2330. gValueToSize[VALUE_FONTSUB] = sizeof(TTFONTSUBTABLE) ;
  2331. // not really used since its a special keyword.
  2332. gValueToSize[VALUE_LIST] = sizeof(DWORD) ; // etc
  2333. // only the index of first listnode is stored.
  2334. for(dwI = 0 ; dwI < VALUE_MAX ; dwI++)
  2335. {
  2336. if(gValueToSize[dwI] > gValueToSize[VALUE_LARGEST])
  2337. gValueToSize[VALUE_LARGEST] = gValueToSize[dwI] ;
  2338. }
  2339. }
  2340. VOID VinitGlobals(
  2341. DWORD dwVerbosity,
  2342. PGLOBL pglobl)
  2343. {
  2344. DWORD dwIndex;
  2345. CONST PBYTE pubStar = "*"; // Used for initializing gaarPPPrefix
  2346. if(MAX_GID > 32)
  2347. RIP(("MAX_GID > 32 violates some GPD parser assumptions.\n"));
  2348. memset(pglobl, 0, sizeof(GLOBL));
  2349. // initialize all globals to default state.
  2350. geErrorType = ERRTY_NONE ; // start with a clean slate
  2351. geErrorSev = ERRSEV_NONE ;
  2352. // check. Adding initializations that were previously done when variables were global
  2353. gdwResDLL_ID = 0 ; // no Feature yet defined to hold Resource DLLs.
  2354. gdwVerbosity = dwVerbosity ;
  2355. // 0 = min verbosity, 4 max verbosity.
  2356. // set preprocessor prefix to '*'
  2357. gaarPPPrefix.pub = pubStar;
  2358. gaarPPPrefix.dw = 1;
  2359. VinitValueToSize(pglobl) ; // size of value links.
  2360. VinitAllowedTransitions(pglobl) ; // AllowedTransitions and Attributes
  2361. (VOID) BinitClassIndexTable(pglobl) ; // gcieTable[] constant classes.
  2362. VinitOperPrecedence(pglobl) ; // arithmetic operators used in command
  2363. // parameters.
  2364. // no memory buffers allocated.
  2365. for(dwIndex = 0 ; dwIndex < MTI_MAX_ENTRIES ; dwIndex++)
  2366. {
  2367. gMasterTable[dwIndex].pubStruct = NULL ;
  2368. }
  2369. gMasterTable[MTI_STRINGHEAP].dwArraySize = 0x010000 ;
  2370. gMasterTable[MTI_STRINGHEAP].dwMaxArraySize = 0x200000 ;
  2371. gMasterTable[MTI_STRINGHEAP].dwElementSiz = sizeof(BYTE) ;
  2372. gMasterTable[MTI_GLOBALATTRIB].dwArraySize = 1 ;
  2373. gMasterTable[MTI_GLOBALATTRIB].dwMaxArraySize = 1 ;
  2374. gMasterTable[MTI_GLOBALATTRIB].dwElementSiz = sizeof(GLOBALATTRIB) ;
  2375. gMasterTable[MTI_COMMANDTABLE].dwArraySize = CMD_MAX ;
  2376. gMasterTable[MTI_COMMANDTABLE].dwMaxArraySize = CMD_MAX ;
  2377. gMasterTable[MTI_COMMANDTABLE].dwElementSiz = sizeof(ATREEREF) ;
  2378. gMasterTable[MTI_ATTRIBTREE].dwArraySize = 5000 ;
  2379. gMasterTable[MTI_ATTRIBTREE].dwMaxArraySize = 50,000 ;
  2380. gMasterTable[MTI_ATTRIBTREE].dwElementSiz = sizeof(ATTRIB_TREE) ;
  2381. gMasterTable[MTI_COMMANDARRAY].dwArraySize = 500 ;
  2382. gMasterTable[MTI_COMMANDARRAY].dwMaxArraySize = 5000 ;
  2383. gMasterTable[MTI_COMMANDARRAY].dwElementSiz = sizeof(COMMAND) ;
  2384. gMasterTable[MTI_PARAMETER].dwArraySize = 500 ;
  2385. gMasterTable[MTI_PARAMETER].dwMaxArraySize = 5000 ;
  2386. gMasterTable[MTI_PARAMETER].dwElementSiz = sizeof(PARAMETER) ;
  2387. gMasterTable[MTI_TOKENSTREAM].dwArraySize = 3000 ;
  2388. gMasterTable[MTI_TOKENSTREAM].dwMaxArraySize = 30000 ;
  2389. gMasterTable[MTI_TOKENSTREAM].dwElementSiz = sizeof(TOKENSTREAM) ;
  2390. gMasterTable[MTI_LISTNODES].dwArraySize = 3000 ;
  2391. gMasterTable[MTI_LISTNODES].dwMaxArraySize = 50000 ;
  2392. gMasterTable[MTI_LISTNODES].dwElementSiz = sizeof(LISTNODE) ;
  2393. gMasterTable[MTI_CONSTRAINTS].dwArraySize = 300 ;
  2394. gMasterTable[MTI_CONSTRAINTS].dwMaxArraySize = 5000 ;
  2395. gMasterTable[MTI_CONSTRAINTS].dwElementSiz = sizeof(CONSTRAINTS) ;
  2396. gMasterTable[MTI_INVALIDCOMBO].dwArraySize = 40 ;
  2397. gMasterTable[MTI_INVALIDCOMBO].dwMaxArraySize = 500 ;
  2398. gMasterTable[MTI_INVALIDCOMBO].dwElementSiz = sizeof(INVALIDCOMBO ) ;
  2399. gMasterTable[MTI_GPDFILEDATEINFO].dwArraySize = 10 ;
  2400. gMasterTable[MTI_GPDFILEDATEINFO].dwMaxArraySize = 100 ;
  2401. gMasterTable[MTI_GPDFILEDATEINFO].dwElementSiz = sizeof(GPDFILEDATEINFO ) ;
  2402. /* set dwArraySize = 0 for objects that are allocated on 2nd pass */
  2403. gMasterTable[MTI_DFEATURE_OPTIONS].dwArraySize = 0 ;
  2404. gMasterTable[MTI_DFEATURE_OPTIONS].dwMaxArraySize = 300 ;
  2405. gMasterTable[MTI_DFEATURE_OPTIONS].dwElementSiz =
  2406. sizeof(DFEATURE_OPTIONS) ;
  2407. gMasterTable[MTI_SYNTHESIZED_FEATURES].dwArraySize = 0 ;
  2408. gMasterTable[MTI_SYNTHESIZED_FEATURES].dwMaxArraySize = 100 ;
  2409. gMasterTable[MTI_SYNTHESIZED_FEATURES].dwElementSiz =
  2410. sizeof(DFEATURE_OPTIONS) ;
  2411. gMasterTable[MTI_PRIORITYARRAY].dwArraySize = 0 ;
  2412. gMasterTable[MTI_PRIORITYARRAY].dwMaxArraySize =
  2413. gMasterTable[MTI_DFEATURE_OPTIONS].dwMaxArraySize +
  2414. gMasterTable[MTI_SYNTHESIZED_FEATURES].dwMaxArraySize ;
  2415. gMasterTable[MTI_PRIORITYARRAY].dwElementSiz =
  2416. sizeof(DWORD) ;
  2417. gMasterTable[MTI_TTFONTSUBTABLE].dwArraySize = 0 ;
  2418. gMasterTable[MTI_TTFONTSUBTABLE].dwMaxArraySize = 1000 ;
  2419. gMasterTable[MTI_TTFONTSUBTABLE].dwElementSiz = sizeof(TTFONTSUBTABLE) ;
  2420. gMasterTable[MTI_FONTCART].dwArraySize = 0 ;
  2421. gMasterTable[MTI_FONTCART].dwMaxArraySize = 500 ;
  2422. gMasterTable[MTI_FONTCART].dwElementSiz = sizeof(FONTCART) ;
  2423. gMasterTable[MTI_SYMBOLROOT].dwArraySize = SCL_NUMSYMCLASSES ;
  2424. gMasterTable[MTI_SYMBOLROOT].dwMaxArraySize = SCL_NUMSYMCLASSES ;
  2425. gMasterTable[MTI_SYMBOLROOT].dwElementSiz = sizeof(DWORD) ;
  2426. gMasterTable[MTI_SYMBOLTREE].dwArraySize = 1500 ;
  2427. gMasterTable[MTI_SYMBOLTREE].dwMaxArraySize = 16000 ;
  2428. gMasterTable[MTI_SYMBOLTREE].dwElementSiz = sizeof(SYMBOLNODE) ;
  2429. gMasterTable[MTI_TMPHEAP].dwArraySize = 0x010000 ;
  2430. gMasterTable[MTI_TMPHEAP].dwMaxArraySize = 0x200000 ;
  2431. gMasterTable[MTI_TMPHEAP].dwElementSiz = sizeof(BYTE) ;
  2432. gMasterTable[MTI_SOURCEBUFFER].dwArraySize = 10 ;
  2433. gMasterTable[MTI_SOURCEBUFFER].dwMaxArraySize = 100 ;
  2434. gMasterTable[MTI_SOURCEBUFFER].dwElementSiz = sizeof(SOURCEBUFFER) ;
  2435. // NEWTOKENMAP is created from unused entries in TOKENMAP.
  2436. gMasterTable[MTI_TOKENMAP].dwArraySize = 0x3000 ;
  2437. gMasterTable[MTI_TOKENMAP].dwMaxArraySize = 0x40000 ;
  2438. gMasterTable[MTI_TOKENMAP].dwElementSiz = sizeof(TKMAP) ;
  2439. gMasterTable[MTI_NEWTOKENMAP].dwArraySize = 0x3000 ;
  2440. gMasterTable[MTI_NEWTOKENMAP].dwMaxArraySize = 0x40000 ;
  2441. gMasterTable[MTI_NEWTOKENMAP].dwElementSiz = sizeof(TKMAP) ;
  2442. gMasterTable[MTI_BLOCKMACROARRAY].dwArraySize = 200 ;
  2443. gMasterTable[MTI_BLOCKMACROARRAY].dwMaxArraySize = 3000 ;
  2444. gMasterTable[MTI_BLOCKMACROARRAY].dwElementSiz = sizeof(BLOCKMACRODICTENTRY) ;
  2445. gMasterTable[MTI_VALUEMACROARRAY].dwArraySize = 800 ;
  2446. gMasterTable[MTI_VALUEMACROARRAY].dwMaxArraySize = 4000 ;
  2447. gMasterTable[MTI_VALUEMACROARRAY].dwElementSiz = sizeof(VALUEMACRODICTENTRY) ;
  2448. gMasterTable[MTI_MACROLEVELSTACK].dwArraySize = 20 ;
  2449. gMasterTable[MTI_MACROLEVELSTACK].dwMaxArraySize = 60 ;
  2450. gMasterTable[MTI_MACROLEVELSTACK].dwElementSiz = sizeof(MACROLEVELSTATE) ;
  2451. gMasterTable[MTI_STSENTRY].dwArraySize = 20 ;
  2452. gMasterTable[MTI_STSENTRY].dwMaxArraySize = 60 ;
  2453. gMasterTable[MTI_STSENTRY].dwElementSiz = sizeof(STSENTRY) ;
  2454. gMasterTable[MTI_OP_QUEUE].dwArraySize = 40 ;
  2455. gMasterTable[MTI_OP_QUEUE].dwMaxArraySize = 150 ;
  2456. gMasterTable[MTI_OP_QUEUE].dwElementSiz = sizeof(DWORD) ;
  2457. gMasterTable[MTI_MAINKEYWORDTABLE].dwArraySize = 400 ;
  2458. gMasterTable[MTI_MAINKEYWORDTABLE].dwMaxArraySize = 3000 ;
  2459. gMasterTable[MTI_MAINKEYWORDTABLE].dwElementSiz =
  2460. sizeof(KEYWORDTABLE_ENTRY) ;
  2461. gMasterTable[MTI_RNGDICTIONARY].dwArraySize = END_ATTR ;
  2462. gMasterTable[MTI_RNGDICTIONARY].dwMaxArraySize = END_ATTR ;
  2463. gMasterTable[MTI_RNGDICTIONARY].dwElementSiz = sizeof(RANGE) ;
  2464. gMasterTable[MTI_FILENAMES].dwArraySize = 40 ;
  2465. gMasterTable[MTI_FILENAMES].dwMaxArraySize = 100 ;
  2466. gMasterTable[MTI_FILENAMES].dwElementSiz = sizeof(PWSTR) ;
  2467. gMasterTable[MTI_PREPROCSTATE].dwArraySize = 20 ;
  2468. gMasterTable[MTI_PREPROCSTATE].dwMaxArraySize = 100 ;
  2469. gMasterTable[MTI_PREPROCSTATE].dwElementSiz = sizeof(PPSTATESTACK) ;
  2470. }
  2471. BOOL BpreAllocateObjects(
  2472. PGLOBL pglobl)
  2473. {
  2474. DWORD dwIndex, dwBytes ;
  2475. /* set dwArraySize = 0 for objects that are allocated on 2nd pass */
  2476. gMasterTable[MTI_DFEATURE_OPTIONS].dwArraySize = 0 ;
  2477. gMasterTable[MTI_SYNTHESIZED_FEATURES].dwArraySize = 0 ;
  2478. gMasterTable[MTI_PRIORITYARRAY].dwArraySize = 0 ;
  2479. // allocation occurs at PostProcessing time.
  2480. gMasterTable[MTI_TTFONTSUBTABLE].dwArraySize = 0 ;
  2481. gMasterTable[MTI_FONTCART].dwArraySize = 0 ;
  2482. for(dwIndex = 0 ; dwIndex < MTI_MAX_ENTRIES ; dwIndex++)
  2483. {
  2484. gMasterTable[dwIndex].dwCurIndex = 0 ;
  2485. // do initialization first: bug 308404
  2486. }
  2487. for(dwIndex = 0 ; dwIndex < MTI_MAX_ENTRIES ; dwIndex++)
  2488. {
  2489. if(gMasterTable[dwIndex].dwArraySize)
  2490. {
  2491. dwBytes = gMasterTable[dwIndex].dwArraySize *
  2492. gMasterTable[dwIndex].dwElementSiz ;
  2493. if(!(gMasterTable[dwIndex].pubStruct = MemAllocZ(dwBytes) ))
  2494. {
  2495. ERR(("Fatal: unable to alloc requested memory: %d bytes.\n",
  2496. dwBytes));
  2497. geErrorType = ERRTY_MEMORY_ALLOCATION ;
  2498. geErrorSev = ERRSEV_FATAL ;
  2499. gdwMasterTabIndex = dwIndex ;
  2500. return(FALSE) ; // This is unrecoverable
  2501. }
  2502. }
  2503. }
  2504. // do not use heap offset zero because OFFSET_TO_POINTER()
  2505. // macro will consider this an invalid value!
  2506. gMasterTable[MTI_STRINGHEAP].dwCurIndex = 1 ;
  2507. return(TRUE) ;
  2508. }
  2509. BOOL BreturnBuffers(
  2510. PGLOBL pglobl)
  2511. /* FALSE return indicates a go-round
  2512. is needed. Otherwise you are
  2513. free to exit caller's loop.
  2514. */
  2515. {
  2516. DWORD dwIndex ;
  2517. // better close all the memory mapped files.
  2518. while(mCurFile)
  2519. {
  2520. mCurFile-- ; // pop stack
  2521. MemFree(mpSourcebuffer[mCurFile].pubSrcBuf) ;
  2522. }
  2523. vFreeFileNames(pglobl) ;
  2524. for(dwIndex = 0 ; dwIndex < MTI_MAX_ENTRIES ; dwIndex++)
  2525. {
  2526. if(gMasterTable[dwIndex].pubStruct)
  2527. {
  2528. MemFree(gMasterTable[dwIndex].pubStruct) ;
  2529. gMasterTable[dwIndex].pubStruct = NULL ;
  2530. }
  2531. }
  2532. // resize one array if needed.
  2533. if((geErrorType == ERRTY_MEMORY_ALLOCATION) &&
  2534. (geErrorSev == ERRSEV_RESTART))
  2535. {
  2536. if( gMasterTable[gdwMasterTabIndex].dwArraySize <
  2537. gMasterTable[gdwMasterTabIndex].dwMaxArraySize )
  2538. {
  2539. DWORD dwInc ;
  2540. dwInc = gMasterTable[gdwMasterTabIndex].dwArraySize / 2 ;
  2541. gMasterTable[gdwMasterTabIndex].dwArraySize +=
  2542. (dwInc) ? (dwInc) : 1 ;
  2543. geErrorSev = ERRSEV_NONE ; // hopefully this fixes
  2544. // the problem.
  2545. return(FALSE) ; // go round needed.
  2546. }
  2547. else
  2548. {
  2549. geErrorSev = ERRSEV_FATAL ;
  2550. ERR(("Internal error: memory usage exceeded hardcoded limits.\n"));
  2551. ERR((" %d bytes requested, %d bytes allowed.\n",
  2552. gMasterTable[gdwMasterTabIndex].dwArraySize,
  2553. gMasterTable[gdwMasterTabIndex].dwMaxArraySize));
  2554. }
  2555. }
  2556. return(TRUE); // due to success or utter failure, don't
  2557. // try anymore.
  2558. }
  2559. BOOL BallocateCountableObjects(
  2560. PGLOBL pglobl)
  2561. /*
  2562. The first pass of BinterpretTokens() has registered all
  2563. the unique symbols for the various constructs.
  2564. By querying the SymbolID value stored at the root of
  2565. each symbol tree, we know how many structures of each
  2566. type to allocate.
  2567. */
  2568. {
  2569. DWORD dwIndex, dwBytes ;
  2570. PDWORD pdwSymbolClass ;
  2571. PSYMBOLNODE psn ;
  2572. pdwSymbolClass = (PDWORD)gMasterTable[MTI_SYMBOLROOT].pubStruct ;
  2573. psn = (PSYMBOLNODE) gMasterTable[MTI_SYMBOLTREE].pubStruct ;
  2574. if(pdwSymbolClass[SCL_FEATURES] != INVALID_INDEX)
  2575. {
  2576. gMasterTable[MTI_DFEATURE_OPTIONS].dwArraySize =
  2577. psn[pdwSymbolClass[SCL_FEATURES]].dwSymbolID + 1 ;
  2578. }
  2579. // else no symbols registered - leave dwArraySize = 0 ;
  2580. if(pdwSymbolClass[SCL_TTFONTNAMES] != INVALID_INDEX)
  2581. {
  2582. gMasterTable[MTI_TTFONTSUBTABLE].dwArraySize =
  2583. psn[pdwSymbolClass[SCL_TTFONTNAMES]].dwSymbolID + 1;
  2584. }
  2585. if(pdwSymbolClass[SCL_FONTCART] != INVALID_INDEX)
  2586. {
  2587. gMasterTable[MTI_FONTCART].dwArraySize =
  2588. psn[pdwSymbolClass[SCL_FONTCART]].dwSymbolID + 1;
  2589. }
  2590. for(dwIndex = 0 ; dwIndex < MTI_MAX_ENTRIES ; dwIndex++)
  2591. {
  2592. if(gMasterTable[dwIndex].dwArraySize &&
  2593. !gMasterTable[dwIndex].pubStruct)
  2594. {
  2595. dwBytes = gMasterTable[dwIndex].dwArraySize *
  2596. gMasterTable[dwIndex].dwElementSiz ;
  2597. if(!(gMasterTable[dwIndex].pubStruct = MemAllocZ(dwBytes) ))
  2598. {
  2599. ERR(("Fatal: unable to alloc requested memory: %d bytes.\n",
  2600. dwBytes));
  2601. geErrorType = ERRTY_MEMORY_ALLOCATION ;
  2602. geErrorSev = ERRSEV_FATAL ;
  2603. gdwMasterTabIndex = dwIndex ;
  2604. return(FALSE) ; // This is unrecoverable
  2605. }
  2606. else
  2607. {
  2608. gMasterTable[dwIndex].dwCurIndex = 0 ;
  2609. }
  2610. }
  2611. }
  2612. return(TRUE) ; // success !
  2613. }
  2614. BOOL BinitPreAllocatedObjects(
  2615. PGLOBL pglobl)
  2616. {
  2617. DWORD dwI, dwJ ;
  2618. VinitMainKeywordTable(pglobl) ; // contents of mMainKeywordTable[] itself
  2619. VinitDictionaryIndex(pglobl) ; // inits MTI_RNGDICTIONARY
  2620. /* init roots of symbol trees */
  2621. for(dwI = 0 ; dwI < gMasterTable[MTI_SYMBOLROOT].dwArraySize ; dwI++)
  2622. {
  2623. ((PDWORD)gMasterTable[MTI_SYMBOLROOT].pubStruct)[dwI] =
  2624. INVALID_INDEX ;
  2625. }
  2626. // init preprocessor state stack
  2627. mdwNestingLevel = 0 ;
  2628. mppStack[mdwNestingLevel].permState = PERM_ALLOW ;
  2629. mppStack[mdwNestingLevel].ifState = IFS_ROOT;
  2630. for(dwI = 0 ; dwI < gMasterTable[MTI_TOKENMAP].dwArraySize ; dwI++)
  2631. {
  2632. ((PTKMAP)gMasterTable[MTI_TOKENMAP].pubStruct)[dwI].dwFlags =
  2633. 0 ; // must start with this field cleared.
  2634. }
  2635. for(dwI = 0 ; dwI < gMasterTable[MTI_GLOBALATTRIB].dwArraySize
  2636. ; dwI++)
  2637. {
  2638. for(dwJ = 0 ; dwJ < gMasterTable[MTI_GLOBALATTRIB].dwElementSiz /
  2639. sizeof(ATREEREF) ; dwJ++)
  2640. {
  2641. ((PATREEREF)( (PGLOBALATTRIB)gMasterTable[MTI_GLOBALATTRIB].
  2642. pubStruct + dwI))[dwJ] =
  2643. ATTRIB_UNINITIALIZED ; // the GLOBALATTRIB struct is
  2644. // comprised entirely of ATREEREFs.
  2645. }
  2646. }
  2647. for(dwI = 0 ; dwI < gMasterTable[MTI_COMMANDARRAY].dwArraySize ; dwI++)
  2648. {
  2649. ((PCOMMAND)gMasterTable[MTI_COMMANDARRAY].pubStruct)[dwI].
  2650. dwCmdCallbackID = NO_CALLBACK_ID ;
  2651. ((PCOMMAND)gMasterTable[MTI_COMMANDARRAY].pubStruct)[dwI].
  2652. ordOrder.eSection = SS_UNINITIALIZED ;
  2653. ((PCOMMAND)gMasterTable[MTI_COMMANDARRAY].pubStruct)[dwI].
  2654. dwStandardVarsList = END_OF_LIST ;
  2655. ((PCOMMAND)gMasterTable[MTI_COMMANDARRAY].pubStruct)[dwI].
  2656. bNoPageEject = FALSE ;
  2657. }
  2658. return(TRUE);
  2659. }
  2660. BOOL BinitCountableObjects(
  2661. PGLOBL pglobl)
  2662. {
  2663. DWORD dwI, dwJ ;
  2664. PFONTCART pfc ;
  2665. for(dwI = 0 ; dwI < gMasterTable[MTI_DFEATURE_OPTIONS].dwArraySize
  2666. ; dwI++)
  2667. {
  2668. for(dwJ = 0 ; dwJ < gMasterTable[MTI_DFEATURE_OPTIONS].dwElementSiz /
  2669. sizeof(ATREEREF) ; dwJ++)
  2670. {
  2671. ((PATREEREF)( (PDFEATURE_OPTIONS)gMasterTable[MTI_DFEATURE_OPTIONS].
  2672. pubStruct + dwI))[dwJ] =
  2673. ATTRIB_UNINITIALIZED ; // the DFEATURE_OPTIONS struct is
  2674. // comprised entirely of ATREEREFs.
  2675. }
  2676. }
  2677. for(dwI = 0 ; dwI < gMasterTable[MTI_COMMANDTABLE].dwArraySize ; dwI++)
  2678. {
  2679. ((PATREEREF)gMasterTable[MTI_COMMANDTABLE].pubStruct)[dwI] =
  2680. ATTRIB_UNINITIALIZED ; // the command table is
  2681. // comprised entirely of ATREEREFs.
  2682. }
  2683. pfc = (PFONTCART)gMasterTable[MTI_FONTCART].pubStruct ;
  2684. for(dwI = 0 ; dwI < gMasterTable[MTI_FONTCART].dwArraySize ; dwI++)
  2685. {
  2686. pfc[dwI].dwFontLst = pfc[dwI].dwPortFontLst = pfc[dwI].dwLandFontLst =
  2687. END_OF_LIST ;
  2688. }
  2689. return(TRUE);
  2690. }
  2691. #if 0
  2692. BOOL BevaluateMacros(
  2693. PGLOBL pglobl)
  2694. // and expand shortcuts
  2695. {
  2696. // placeholder code - use original tokenMap
  2697. // BUG_BUG!!!!! just swap the two entries for now.
  2698. DWORD dwTmp ;
  2699. PBYTE pubTmp ;
  2700. dwTmp = gMasterTable[MTI_NEWTOKENMAP].dwArraySize ;
  2701. gMasterTable[MTI_NEWTOKENMAP].dwArraySize =
  2702. gMasterTable[MTI_TOKENMAP].dwArraySize ;
  2703. gMasterTable[MTI_TOKENMAP].dwArraySize = dwTmp ;
  2704. dwTmp = gMasterTable[MTI_NEWTOKENMAP].dwMaxArraySize ;
  2705. gMasterTable[MTI_NEWTOKENMAP].dwMaxArraySize =
  2706. gMasterTable[MTI_TOKENMAP].dwMaxArraySize ;
  2707. gMasterTable[MTI_TOKENMAP].dwMaxArraySize = dwTmp ;
  2708. pubTmp = gMasterTable[MTI_NEWTOKENMAP].pubStruct ;
  2709. gMasterTable[MTI_NEWTOKENMAP].pubStruct =
  2710. gMasterTable[MTI_TOKENMAP].pubStruct ;
  2711. gMasterTable[MTI_TOKENMAP].pubStruct = pubTmp ;
  2712. return(TRUE);
  2713. }
  2714. #endif
  2715. BOOL BpostProcess(
  2716. PWSTR pwstrFileName, // root GPD file
  2717. PGLOBL pglobl)
  2718. {
  2719. BOOL bStatus ;
  2720. DWORD dwIndex, dwBytes, dwCount ;
  2721. PDWORD pdwPriority ;
  2722. /*
  2723. check to see that all manditory fields
  2724. have been initialized, warn otherwise.
  2725. Have no way to reject entries once allocated.
  2726. verify that all features referenced in switch
  2727. statements are pickone.
  2728. FeatureOption[ptkmap->dwValue].bReferenced = TRUE ;
  2729. check that these features marked true are
  2730. always of type PICK_ONE.
  2731. reflect all constraints in list: if A constrains B, then B constrains A.
  2732. Of course feature only qualified names are not permitted.
  2733. so check for this here since we were cheap and used
  2734. the same parsing routine as for InvalidInstallableCombinations.
  2735. perform checks like all lists being converted must be of
  2736. type installable. Lists may be rooted at the feature
  2737. or option level. the Feature/Options named in the
  2738. InvalidInstallableCombinations lists must also be *Installable.
  2739. */
  2740. BappendCommonFontsToPortAndLandscape(pglobl) ;
  2741. BinitSpecialFeatureOptionFields(pglobl) ;
  2742. gMasterTable[MTI_SYNTHESIZED_FEATURES].dwArraySize =
  2743. DwCountSynthFeatures(NULL, pglobl) ;
  2744. gMasterTable[MTI_PRIORITYARRAY].dwArraySize =
  2745. gMasterTable[MTI_DFEATURE_OPTIONS].dwArraySize +
  2746. gMasterTable[MTI_SYNTHESIZED_FEATURES].dwArraySize ;
  2747. for(dwIndex = 0 ; dwIndex < MTI_MAX_ENTRIES ; dwIndex++)
  2748. {
  2749. if(gMasterTable[dwIndex].dwArraySize &&
  2750. !gMasterTable[dwIndex].pubStruct)
  2751. {
  2752. dwBytes = gMasterTable[dwIndex].dwArraySize *
  2753. gMasterTable[dwIndex].dwElementSiz ;
  2754. if(!(gMasterTable[dwIndex].pubStruct = MemAllocZ(dwBytes) ))
  2755. {
  2756. ERR(("Fatal: unable to alloc requested memory: %d bytes.\n",
  2757. dwBytes));
  2758. geErrorType = ERRTY_MEMORY_ALLOCATION ;
  2759. geErrorSev = ERRSEV_FATAL ;
  2760. gdwMasterTabIndex = dwIndex ;
  2761. return(FALSE) ; // This is unrecoverable
  2762. }
  2763. else
  2764. {
  2765. gMasterTable[dwIndex].dwCurIndex = 0 ;
  2766. }
  2767. }
  2768. }
  2769. if ( !BsetUQMFlag(pglobl))
  2770. return FALSE; //There are 2 ways that this function will return false.
  2771. // 1) When space from the heap cannot be allocated.
  2772. // Soln: restart.
  2773. // 2) An unexpected Condition is encountered.
  2774. // Soln: Fatal. Stop Parsing.
  2775. VCountPrinterDocStickyFeatures(pglobl) ;
  2776. (VOID)BConvertSpecVersionToDWORD(pwstrFileName, pglobl) ;
  2777. BinitMiniRawBinaryData(pglobl) ;
  2778. DwCountSynthFeatures(BCreateSynthFeatures, pglobl) ;
  2779. BInitPriorityArray(pglobl) ;
  2780. // save selected buffers to file
  2781. bStatus = BconsolidateBuffers(pwstrFileName, pglobl);
  2782. return(bStatus) ;
  2783. }
  2784. BOOL BconsolidateBuffers(
  2785. PWSTR pwstrFileName, // root GPD file
  2786. PGLOBL pglobl)
  2787. {
  2788. DWORD dwCurOffset , dwI;
  2789. ENHARRAYREF earTableContents[MTI_NUM_SAVED_OBJECTS] ;
  2790. PBYTE pubDest ; // points to new destination buffer
  2791. PWSTR pwstrBinaryFileName ;
  2792. HANDLE hFile;
  2793. DWORD dwBytesWritten,
  2794. dwAlign = 4; // padding for DWORD alignment of all sub buffers.
  2795. BOOL bResult = FALSE;
  2796. OPTSELECT optsel[MAX_COMBINED_OPTIONS] ; // assume is large enough
  2797. WIN32_FILE_ATTRIBUTE_DATA File_Attributes ;
  2798. // first update dwCurIndex for fixed allocation buffers
  2799. // since dwCurIndex does not indicate elements used in this
  2800. // case.
  2801. dwI = MTI_GLOBALATTRIB ;
  2802. gMasterTable[dwI].dwCurIndex = gMasterTable[dwI].dwArraySize ;
  2803. dwI = MTI_DFEATURE_OPTIONS ;
  2804. gMasterTable[dwI].dwCurIndex = gMasterTable[dwI].dwArraySize ;
  2805. dwI = MTI_SYNTHESIZED_FEATURES ;
  2806. gMasterTable[dwI].dwCurIndex = gMasterTable[dwI].dwArraySize ;
  2807. dwI = MTI_PRIORITYARRAY ;
  2808. gMasterTable[dwI].dwCurIndex = gMasterTable[dwI].dwArraySize ;
  2809. dwI = MTI_TTFONTSUBTABLE ;
  2810. gMasterTable[dwI].dwCurIndex = gMasterTable[dwI].dwArraySize ;
  2811. dwI = MTI_COMMANDTABLE ;
  2812. gMasterTable[dwI].dwCurIndex = gMasterTable[dwI].dwArraySize ;
  2813. dwI = MTI_FONTCART ;
  2814. gMasterTable[dwI].dwCurIndex = gMasterTable[dwI].dwArraySize ;
  2815. dwI = MTI_SYMBOLROOT ;
  2816. gMasterTable[dwI].dwCurIndex = gMasterTable[dwI].dwArraySize ;
  2817. // at offset zero is the MINIRAWBINARYDATA header.
  2818. // Immediately after this is the array of ENHARRAYREFS
  2819. // supplying offsets to all other objects
  2820. // comprising the GPD binary.
  2821. // use the MTI_ defines to automate the copying of selected
  2822. // buffers. Just make sure the subset that is being copied
  2823. // occupies the lower MTI_ indicies and is terminated by
  2824. // MTI_NUM_SAVED_OBJECTS. The enumeration value will
  2825. // determine the order in which the various MTI_ buffers
  2826. // appear in the new buffer.
  2827. dwCurOffset = sizeof(MINIRAWBINARYDATA) ;
  2828. dwCurOffset += sizeof(ENHARRAYREF) * MTI_NUM_SAVED_OBJECTS ;
  2829. dwCurOffset = (dwCurOffset + dwAlign - 1) / dwAlign ;
  2830. dwCurOffset *= dwAlign ;
  2831. for(dwI = 0 ; dwI < MTI_NUM_SAVED_OBJECTS ; dwI++)
  2832. {
  2833. earTableContents[dwI].loOffset = dwCurOffset ;
  2834. earTableContents[dwI].dwCount =
  2835. gMasterTable[dwI].dwCurIndex ;
  2836. earTableContents[dwI].dwElementSiz =
  2837. gMasterTable[dwI].dwElementSiz ;
  2838. dwCurOffset += gMasterTable[dwI].dwElementSiz *
  2839. gMasterTable[dwI].dwCurIndex ;
  2840. dwCurOffset = (dwCurOffset + dwAlign - 1) / dwAlign ;
  2841. dwCurOffset *= dwAlign ;
  2842. }
  2843. pubDest = MemAlloc(dwCurOffset) ; // new destination buffer.
  2844. if(!pubDest)
  2845. {
  2846. ERR(("Fatal: unable to alloc requested memory: %d bytes.\n",
  2847. dwCurOffset));
  2848. geErrorType = ERRTY_MEMORY_ALLOCATION ;
  2849. geErrorSev = ERRSEV_FATAL ;
  2850. return(FALSE) ; // This is unrecoverable
  2851. }
  2852. // Last minute initializations:
  2853. gmrbd.rbd.dwFileSize = dwCurOffset ;
  2854. // gmrbd.pvPrivateData is not required by the .bud. It is only initialized
  2855. // at snapshot time. Therefore putting it to NULL.
  2856. // gmrbd.FileDateInfo is not used by the parser at all.
  2857. gmrbd.rbd.pvPrivateData = (PVOID) NULL;
  2858. gmrbd.rbd.FileDateInfo.dwCount = 0x00000000;
  2859. gmrbd.rbd.FileDateInfo.loOffset = (PTRREF)0x00000000;
  2860. // copy table of contents to start of dest buffer.
  2861. memcpy(pubDest, &gmrbd , sizeof(MINIRAWBINARYDATA) ) ;
  2862. memcpy(pubDest + sizeof(MINIRAWBINARYDATA), earTableContents ,
  2863. sizeof(ENHARRAYREF) * MTI_NUM_SAVED_OBJECTS ) ;
  2864. for(dwI = 0 ; dwI < MTI_NUM_SAVED_OBJECTS ; dwI++)
  2865. {
  2866. memcpy(
  2867. pubDest + earTableContents[dwI].loOffset, // dest
  2868. gMasterTable[dwI].pubStruct, // src
  2869. earTableContents[dwI].dwCount * // count
  2870. earTableContents[dwI].dwElementSiz ) ;
  2871. }
  2872. // priority array is modified at snapshot time
  2873. // if(!BinitDefaultOptionArray(optsel, pubDest))
  2874. // can't call this function from parser DLL.
  2875. // Generate a binary file name based the original filename
  2876. // Create a file and write data to it
  2877. if ((pwstrBinaryFileName = pwstrGenerateGPDfilename(pwstrFileName)) == NULL)
  2878. {
  2879. goto CLEANUP_BconsolidateBuffers ;
  2880. }
  2881. if(GetFileAttributesEx( (LPCTSTR) pwstrBinaryFileName, // assumes widestrings
  2882. GetFileExInfoStandard,
  2883. (LPVOID) &File_Attributes) )
  2884. {
  2885. // BUD exists - attempt to delete .
  2886. if(! DeleteFile((LPCTSTR) pwstrBinaryFileName))
  2887. {
  2888. WCHAR awchTmpName[MAX_PATH],
  2889. awchPath[MAX_PATH];
  2890. PWSTR pwstrLastBackSlash ;
  2891. // cannot delete, attempt to rename
  2892. wcsncpy(awchPath, pwstrBinaryFileName , MAX_PATH -1);
  2893. pwstrLastBackSlash = wcsrchr(awchPath,TEXT('\\')) ;
  2894. if (!pwstrLastBackSlash)
  2895. goto CLEANUP_BconsolidateBuffers ;
  2896. *(pwstrLastBackSlash + 1) = NUL;
  2897. if(!GetTempFileName(
  2898. (LPCTSTR) awchPath,
  2899. TEXT("BUD"), // pointer to filename prefix
  2900. 0, // number used to create temporary filename
  2901. (LPTSTR) awchTmpName))
  2902. goto CLEANUP_BconsolidateBuffers ;
  2903. // failed to make tmp filename
  2904. if( !MoveFileEx(
  2905. (LPCTSTR) pwstrBinaryFileName,
  2906. (LPCTSTR) awchTmpName,
  2907. MOVEFILE_REPLACE_EXISTING))
  2908. goto CLEANUP_BconsolidateBuffers ;
  2909. // Now cause temp file to disappear on reboot.
  2910. MoveFileEx(
  2911. (LPCTSTR) awchTmpName,
  2912. NULL,
  2913. MOVEFILE_DELAY_UNTIL_REBOOT) ;
  2914. // not a big problem if temp file cannot be deleted.
  2915. }
  2916. }
  2917. if((hFile = CreateFile(pwstrBinaryFileName,
  2918. GENERIC_WRITE,
  2919. 0,
  2920. NULL,
  2921. CREATE_ALWAYS,
  2922. FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN | SECURITY_SQOS_PRESENT | SECURITY_ANONYMOUS,
  2923. NULL)) != INVALID_HANDLE_VALUE)
  2924. {
  2925. bResult = WriteFile(hFile,
  2926. pubDest,
  2927. dwCurOffset,
  2928. &dwBytesWritten,
  2929. NULL) &&
  2930. (dwCurOffset == dwBytesWritten);
  2931. CloseHandle(hFile);
  2932. }
  2933. CLEANUP_BconsolidateBuffers:
  2934. if (! bResult)
  2935. {
  2936. // Fail fatally if file cannot be opened for writing. If somebody else
  2937. // has opened the file, we do not wait for that guy to close the file.
  2938. // We simply fail.
  2939. geErrorSev = ERRSEV_FATAL;
  2940. geErrorType = ERRTY_FILE_OPEN;
  2941. ERR(("Unable to save binary GPD data to file.\n"));
  2942. }
  2943. if(pwstrBinaryFileName)
  2944. MemFree(pwstrBinaryFileName);
  2945. if(pubDest)
  2946. MemFree(pubDest);
  2947. return bResult;
  2948. }
  2949. BOOL BexpandMemConfigShortcut(DWORD dwSubType)
  2950. {
  2951. BOOL bStatus = FALSE;
  2952. return(bStatus) ;
  2953. }
  2954. // create strings in tmpHeap.
  2955. // checks to make sure there are
  2956. // enough slots in the tokenmap before proceeding.
  2957. BOOL BexpandCommandShortcut(DWORD dwSubType)
  2958. {
  2959. BOOL bStatus = FALSE;
  2960. return(bStatus) ;
  2961. }
  2962. // add sensor to detect colons within a value as
  2963. // this indicates something extra was tacked on.
  2964. // if(ptkmap[*pdwTKMindex].dwFlags & TKMF_COLON)
  2965. /*
  2966. BOOL BinitRemainingFields()
  2967. {
  2968. This function initializes synthesized fields
  2969. like these in the FeatureOption array.
  2970. ATREEREF atrOptIDvalue; // ID value
  2971. ATREEREF atrFeaFlags ; // invalid or not
  2972. ATREEREF atrPriority ;
  2973. // warning: any non-attribtreeref added to
  2974. // the DFEATURE_OPTIONS structure will get stomped on in strange
  2975. // and wonderful ways by BinitPreAllocatedObjects.
  2976. // internal consistency checks.
  2977. BOOL bReferenced ; // default is FALSE.
  2978. DWORD dwGID , // GID tag
  2979. dwNumOptions ; // these are not read in from GPD file.
  2980. maybe also determine count of DocSticky and PrinterSticky
  2981. or maybe that is only stored in the RawBinaryData block.
  2982. }
  2983. */