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.

1206 lines
33 KiB

  1. #if 0
  2. now:
  3. rip out code that sets RulesAble flag.
  4. Maybe recognize hex integers.
  5. UIGroups
  6. rip out check for cursor origin same as printable origin.
  7. update docs with *IgnoreBlock and *Macros constructs.
  8. note we require =Macroname not to have a space between.
  9. new rule: the value of any ValueMacro must be a syntatically valid
  10. value all by itself.
  11. for example
  12. parenthesis: (
  13. is not a legal macro value since '(' is not a valid value by itself.
  14. ValueMacro references may not appear within "quoted strings"
  15. or %{param constructs}.
  16. update declares.h
  17. if you need to fudge *Color? go to snapshot.c and look for
  18. if(dwGID == GID_COLORMODE &&
  19. ((PCOLORMODEEX)pubDestOptionEx)->bColor )
  20. {
  21. pUIinfo->dwFlags |= FLAG_COLOR_DEVICE ;
  22. }
  23. eventually maybe add function callbacks to the snapshot table
  24. which will provide different defaults depending on the
  25. value of other structures in the bud file.
  26. think about this:
  27. zhanw wants multiple *case to refer to one block.
  28. just like in 'C'.
  29. classify errors into Errors and Warnings
  30. assign each message a verbosity threshold.
  31. more intentional errors for sample file.
  32. complete warning of NON_LOCALIZEABLE keywords
  33. add DisableMultipleCompression? keyword for alvin.
  34. flag a warning if any *name keyword is
  35. present.
  36. remove hardcoded globals from parser.
  37. could delete 4 unnecessary indicies in mrbd structure.
  38. should parser synthesize an extra %
  39. if a literal % is found in a command
  40. invocation?
  41. code review of command: move initoperPrecedence to
  42. framwrk1.c
  43. move list of delimiters to gpd.h
  44. ------
  45. -----
  46. ---- Sanity checks as time permits ----
  47. verify a movement and resolution units are multiples
  48. of the masterunits.
  49. verify there is no switch dependence on pickmany types of
  50. features.
  51. check that number of features and number of options
  52. in each feature does not exceed 255.
  53. if any parameter in a command uses MAXLIMIT(), it must
  54. be the ONLY parameter in the command.
  55. during BInterpretTokens() if a syntax error occurs, the
  56. return value is set to false, but it is completely ignored.
  57. No error condition is raised or anything!
  58. examples: mismatched closing braces
  59. are all required fields for each GID type
  60. present? if not are there acceptable
  61. defaults? if not warn user.
  62. check all papersizes against
  63. *MinSize and *MaxSize defined for
  64. a custom papersize to make sure they are
  65. in range. warn user if not.
  66. If no cust size defined skip the check.
  67. ---- far in the future: -----
  68. countrycode as an implicit feature.
  69. The current value is set at snapshot time.
  70. state1.c : initAllowedTransitions
  71. change FEATURE_FF so its only valid for states:
  72. STATE_FEATURE, STATE_CASE_FEATURE and STATE_OPTION_FEATURE
  73. BUG_BUG !!!!!
  74. check that all cases are terminated by break.
  75. flags being set by |= not just =.
  76. always check to see dwKeywordID is a valid value before
  77. using it to access any table.
  78. ensure any failure clears tokenmap.flags.
  79. are copies of aarValue being used when tkmap->aarValue
  80. is required? and vice versa?
  81. Search through all uses of enumeration constants to verify
  82. code does not need updating due to fact I added more
  83. items to the list.
  84. also symbol tree roots. gdwTTFontSymbols
  85. with prefix m since they are actually macros.
  86. update each module header with correct function declarations.
  87. not implemented: factor out first part of qualified
  88. name outside of LIST construct.
  89. be sure to clarify what structures are referenced from
  90. UIInfo and which must be referenced from the offset pointer.
  91. provide an overview of the attribute storing processing
  92. use handwritten notes as a guide.
  93. are tkmap flags like TKMF_COLON set when they should not be?
  94. probably give shorthand version of *Command a
  95. different name so there is no confusion .
  96. features to implement:
  97. ---------------------
  98. go through and fix the highest priority BUG_BUG!!!!! s.
  99. implement shortcut converter and rip out hack code.
  100. Testing hints:
  101. ------
  102. must test all code in constrnts.c and the
  103. constraints code in helper1.c I have changed
  104. BexchangeDataInFOATNode().
  105. an acid test of determinedefault option
  106. is to make each default option multivalued
  107. and use dependencies which conflict with
  108. the default priority array.
  109. make some features printer sticky, like interleave them.
  110. VOID VinitAllowedTransitions() ; throwaway bp.
  111. BOOL BInterpretTokens( see keyword - value strings.
  112. BOOL BparseAndTerminateString( unicode Xlation
  113. BOOL BpostProcess(
  114. create some defaultoptions with an upside down
  115. dependence, forcing the priority array to be re initialized.
  116. note looking at BarchiveStrings or BcopyToTmpHeap is
  117. a great way to see what is being parsed as a keyword and value!
  118. test symbol registry by creating multiple features each
  119. with multiple options. Also by defining more features for
  120. the same option in a separate section.
  121. In fact alternate two or more feature definitions
  122. to cause searches through several layers.
  123. maybe nested switch constructs too.
  124. BscanStringSegment().
  125. try strings containing %" or %< chars or real
  126. hex substrings.
  127. prepend whitechars and other forms of
  128. arbitrary whitespace to keywords and insert between
  129. tokens. Try continuation lines etc.
  130. try various types of constructs terminated immediately
  131. by eof.
  132. try some include files (nested includes too!)
  133. make some symbol keywords.
  134. {, }
  135. keywords without : or values.
  136. keywords or statements terminating with { or }.
  137. try some fully invalid keywords.
  138. try some structure or non-attribute keywords.
  139. preface keyword with the EXTERN_GLOBAL or EXTERN_FEATURE
  140. tag. (BidentifyAttributeKeyword)
  141. try some improper syntaxes.
  142. test every type of value.
  143. Lists etc.
  144. attribute trees:
  145. global initializer
  146. then add switch conditionals.
  147. do this both outside and within a feature/option construct.
  148. remember to write down at allocation time
  149. the address of the heap.
  150. force propagation of lower level values as default initializers
  151. by causing the tree to branch out more.
  152. ----- done ----
  153. at high verbosity level, emit
  154. keyword and value strings of all block macros
  155. when fully defined. And all keywords that reference
  156. value macros.
  157. force an error by defining this valuemacro:
  158. MacroName: =MacroName "stuff"
  159. note that all error messages need to be check to see
  160. that
  161. vIdentifySource(ptkmap + dwTKMindex) ;
  162. and other ERR messages that reference ptkmap
  163. don't suffer from cut and paste syndrome.
  164. note: when passing values to register symbol or whatever, you
  165. must first strip the leading '=' since this is not automatically done.
  166. need to fix for ?
  167. debug BdelimitName and BResolveValueMacroReference
  168. must modify token1.c so it allows scanning for tokenRefs
  169. within ().
  170. ganesh wants invocation.dwcount to be initialized with
  171. CommandIndex.
  172. if a construct keyword is not recognized,
  173. ignore everything up to matching closing brace.
  174. If an error occurs parsing a construct , say missing a
  175. required symbol, the entire body of the construct
  176. enclosed by braces should be deleted.
  177. implement by creating an IGNORE_STATE ?
  178. could define a specific keyword that
  179. can serve to ifdef out large chunks of code.
  180. init MINIRAWBINARYDATA gmrbd ;
  181. maybe add an new entry to the constants table
  182. just after the {NULL, BOOLEANTYPE}
  183. separator: this will contain {"Boolean class", 0}
  184. and the indexing code will skip this when constructing
  185. the index. However, we can find it by subtracting 1
  186. from the start index.
  187. also modify BOOL BparseConstant( in value1.c
  188. postproc.c
  189. let BIdentifyConstantString(&arSymbolName,
  190. &dwDevmodeID, dwConsClass)
  191. take a fourth param: bCustomOptOK
  192. if true, then a much less severe warning is emitted.
  193. also modify so it emits the class string instead
  194. of a number.
  195. add global to control warning level.
  196. elaborate enumeration class messages, is such
  197. a message fatal (ie SERIAL, PAGE) or is it
  198. tolerable (Option3) ? give a friendly
  199. explaination. Enum Class 31 - what's that?
  200. re-enabled *MaxNumPalettes for alvin to use.
  201. default value is now 0.
  202. add RIP if MAX_GID exceeds 32.
  203. remove if DBCS from postproc.c
  204. abort and retry if number of entries exceeds
  205. dictionary size in framwrk1.c
  206. also implement in sanpshot.c see DwInitSnapShotTable2
  207. new standard var: rop3
  208. another keyword: *MirrorRasterByte? in globals.
  209. add to semantics check:
  210. *Helpindex value must be non-zero.
  211. update constants for printingrate
  212. move private defines out of gpdparse.h
  213. Synthesize installable features for *Installable keyword.
  214. Initialize missing fields with defaults.
  215. sanity checks, features with zero options etc.
  216. emit warning messages if needed.
  217. set the priority array using *DefaultOption
  218. (if needed) what other structures need to be saved?
  219. reflect UIConstraints after parsing keywords.
  220. convert Installation constraints list to UIConstraints
  221. reflect as needed.
  222. (from Zhanw: gpd changes)
  223. I added two entries for custom help support:
  224. - one global entry: *HelpFile which specifies the custom help file name.
  225. - a generic entry for any feature/option: *HelpIndex which specifies the specific help index for that item.
  226. CmdFF and CmdCR.
  227. ganesh wants to split parser into DLL + lib.
  228. modify Halftone processing in Postproc.c
  229. to conform to alvins mail.
  230. Alvin wants new keyword: count of halftone matricies
  231. implement TTFontSub construct processing code.
  232. Later a codepage keyword will let the parser know
  233. whether to interpret such strings as single or double byte.
  234. modify macro in gpd.h so a non-existent command
  235. will cause a NULL to be returned , ganesh wants same for
  236. fontlist.
  237. Notes: UNUSED_ITEM will be used whenever a dword value, ResourceID
  238. has not been explicitly specified in the GPD file.
  239. an empty list of items will be denoted by the value END_OF_LIST
  240. instead of a valid index to the first listnode.
  241. warning GPD keywords missing from snapshot:
  242. ATREEREF atrOptimizeLeftBound; // "OptimizeLeftBound?"
  243. ATREEREF atrStripBlanks; // "StripBlanks"
  244. ATREEREF atrRasterZeroFill; // "RasterZeroFill?"
  245. ATREEREF atrRasterSendAllData; // "RasterSendAllData?"
  246. ATREEREF atrCursorXAfterSendBlockData; // "CursorXAfterSendBlockData"
  247. Option Attribute: *PromptTime
  248. ATREEREF atrIPCallbackID; // "IPCallbackID"
  249. ATREEREF atrColorSeparation; // "ColorSeparation?"
  250. atrMinStripBlankPixels // a resolution option
  251. ATREEREF atrColor; // "Color?"
  252. ATREEREF atrDrvBPP; // "DrvBPP"
  253. ATREEREF atrRotateSize; // "RotateSize?"
  254. /* UIINFO fields not initialized in Snapshot :
  255. loNickName
  256. ARRAYREF UIConstraints; // array of UICONSTRAINTs
  257. ARRAYREF UpdateRequiredItems; //
  258. ARRAYREF InvalidCombinations; // array of INVALIDCOMBOs
  259. DWORD dwMinScale; // mimimum scale factor (percent)
  260. DWORD dwMaxScale; // maximum scale factor (percent)
  261. DWORD dwLangEncoding; // translation string language encoding
  262. DWORD dwLangLevel; // page description langauge level
  263. INVOCATION Password; // password invocation string
  264. INVOCATION ExitServer; // exitserver invocation string
  265. DWORD dwProtocols; // supported comm protocols
  266. DWORD dwJobTimeout; // default job timeout value
  267. DWORD dwWaitTimeout; // default wait timeout value
  268. DWORD dwTTRasterizer; // TrueType rasterizer option
  269. FIX_24_8 fxScreenAngle; // screen angle - global default
  270. FIX_24_8 fxScreenFreq; // screen angle - global default
  271. PTRREF loFontInstallerName; //
  272. dwFreeMem) ;
  273. /* FEATURE fields not initialized in Snapshot :
  274. DWORD dwNoneFalseOptIndex; // None or False option index
  275. INVOCATION QueryInvocation; // query invocation string
  276. DWORD dwFirstOrderIndex; //
  277. DWORD dwEnumID; //
  278. DWORD dwEnumFormat; //
  279. DWORD dwCurrentID; //
  280. DWORD dwCurrentFormat; //
  281. dwInstallableFeatureIndex) ; not needed by snapshot.
  282. dwInstallableOptionIndex) ;
  283. dwUIConstraintList) ;
  284. /* OPTION fields not initialized in Snapshot :
  285. INVOCATION Invocation; // invocation string
  286. use sequenced command list instead.
  287. DWORD dwUIConstraintList; // index to the list of UIConstraints
  288. DWORD dwOrderIndexNext; //
  289. DWORD dwInvalidComboIndex; //
  290. DWORD dwInstallableOptionIndex; //
  291. How do I initialize the various
  292. DWORD dwFlags; // flag bits
  293. for various options from the GPD information?
  294. ! DWORD dwTechnology; // see TECHNOLOGY enumeration
  295. what should this be set to?
  296. There is no GPD keyword corresponding to
  297. uiinfo.loPrinterIcon.
  298. szMaxExtent) ;
  299. szMinExtent) ;
  300. papersizeoption.rcMaxExtent) ;
  301. rcMinExtent
  302. MemoryOption.dwFreeFontMem
  303. resolution.wDefaultDithering) ;
  304. wFlags is mispelled in COLORMODEEX.
  305. change to be a string! dwSpecVersion) ;
  306. ARRAYREF CartridgeSlot; // array of font cartridges names
  307. will now be
  308. ARRAYREF FontCartridges; // array of font cartridge structures
  309. holds same arrayref as GPDDrvInfo.DataType[DT_FONTSCART]
  310. deleted from GPD spec:
  311. ATREEREF atrSimulateXMove; // "SimulateXMove"
  312. VectorOffset, ColorSeparation
  313. MemoryForFontsOnly is now MemoryUsage?
  314. add *Min/MaxGrayFill
  315. CRC checksum
  316. Date and time stamping
  317. Bug preventing enumeration of UserDefined
  318. papersizes.
  319. implement sematchk.c
  320. lots of work to make sure we can handle option = FF
  321. in all helper functions, and disabled features.
  322. fix BInterpretTokens to elaborate error message:
  323. which keyword is bad?
  324. Do lines starting with a comment cause warnings? (no!)
  325. maybe should run eat white spaces first!
  326. test partially qualified name.
  327. Test InvalidCon with just 2 items.
  328. new pallete entries in colormode option find old e-mail.
  329. (delete global entries find BUG_BUG!)
  330. First InputSlot should be left uninitialized
  331. and say "Use Form To Tray assignment"
  332. paperbin = DMBIN_FORMSOURCE I have no such bin!
  333. implement *ConflictPriority, and 2 new keywords. see Zhanw's mail.
  334. Also modify priority array code to assign higher priority
  335. to printer sticky options. In order they will be
  336. Highest : Synthesized options
  337. Higher : printer sticky
  338. Lowest : doc sticky
  339. Also implement a new keyword which allows user to
  340. set relative priorities of doc and printer sticky
  341. options. (but keeps lists separate)
  342. cannon wants to be able to specify the priority of
  343. each feature. but all synthesized options will have a
  344. higher priority than non-synthesized.
  345. update framwrk1.c to use new Installable keywords.
  346. copy master units to UIinfo when amanda updates parser.h
  347. verify bug and fix value1.c page 16.
  348. add PT_TTY to printertype.
  349. At this time update
  350. instructions for adding new keywords to snapshot.c
  351. Postprocessing.
  352. must grovel through symbol tree and initialize
  353. atrFeaKeyWord and atrOptKeyWord for each feature and option.
  354. and translate from ansi to unicode
  355. set flags field in UIinfo.
  356. newkeywords: replace with actual defs in gpd.h
  357. ATREEREF atrYMoveAttributes; // "YMoveAttributes"
  358. ATREEREF atrMaxLineSpacing; // "MaxLineSpacing"
  359. do we special case its default?
  360. ATREEREF atrMinGlyphID; // "MinGlyphID"
  361. ATREEREF atrMaxGlyphID; // "MaxGlyphID"
  362. ATREEREF atrDLSymbolSet; // "DLSymbolSet"
  363. need to add its constants class
  364. ATREEREF atrHelpFile; // "HelpFile"
  365. atrCodePage //"CodePage"
  366. ATREEREF atrOptHelpIndex; // "HelpIndex"
  367. ATREEREF atrFeaHelpIndex; // "HelpIndex"
  368. both Features and Options keyword.
  369. finish updating snapshot once gpd is updated.
  370. *PromptTime should be a Option only keyword.
  371. also init GID and option count for each feature.
  372. assume a normal dwGID and dwNumOptions field exists in DFEATURE_OPTION
  373. and it has been initialized as part of postprocessing.
  374. priority field is properly initialized at postprocessing?
  375. When assigning paperIDs to various papersize options,
  376. fill in paper dimensions if not already explicitly initialized
  377. note assign the custom paper DMPAPER_USER, and any
  378. driver defined paper sizes values larger than that.
  379. determine these by counting # setting for FeatureType keyword.
  380. pmrbd->dwDocumentFeatures;
  381. pmrbd->dwPrinterFeatures;
  382. search for all occurances of VALUE_STRING and
  383. replace by one of the 3 variants.
  384. use AP_APC to map filenames
  385. use *CodePage to map display strings and fontnames
  386. ParserVersion, symbolnames leave in ansi.
  387. define subvalues to control string translation.
  388. and key the unicode Xlation accordingly.
  389. Note: The *CodePage keyword affect the parsing of
  390. all applicable strings encountered after the *CodePage keyword.
  391. The *CodePage keyword my be subsequently re-defined.
  392. add dwSpecVersion field to MINIRAWBINARYDATA, convert string version
  393. stored in global attributes atrGPDSpecVersion to 2 words
  394. and store here during postprocessing.
  395. replace points with pairs
  396. add single and double byte to unicode converter.
  397. where should this be placed? Note name of include file
  398. uses a string, but should not be converted make this flag
  399. controllable or define a new value, TO_UNICODE?.
  400. remember: Davidx says store Unicode strings on Word boundary.
  401. line duplicated: postproc.c line 209.
  402. arSymbolName = psn[dwFeatureIndex].arSymbolName ;
  403. remove before flight in value1.c
  404. ExchangeDataInFOATNode needs changing: specifically,
  405. it exchanges the dword at the heapoffset not the heapoffset
  406. itself. Need to change it so it can handle arbitrary sized
  407. data.
  408. replace rawbinary data by pinfo hdr for 2 functions:
  409. GpdChangeOptionsViaID(
  410. IN PINFOHEADER pInfoHdr ,
  411. IN OUT POPTSELECT pOptions,
  412. IN DWORD dwFeatureID,
  413. IN PDEVMODE pDevmode
  414. )
  415. GpdMapToDeviceOptIndex(
  416. IN PINFOHEADER pInfoHdr ,
  417. IN DWORD dwFeatureID,
  418. IN LONG lParam1,
  419. IN LONG lParam2
  420. )
  421. collation and page protect use the predefined options
  422. ON/OFF, should assign these options optionID values of
  423. 1/0 respectively. need to modify BinitSpecialFeatureOptionFields()
  424. in postproc.c
  425. when amanda adds collate to Parser.h, remove my private
  426. def from gpdparse.h
  427. also transfer my defs in snapshot.h to gpd.h
  428. RotateRasterData? is now RotateRaster?
  429. *YMoveUnits is now *YMoveUnit (same for X)
  430. GPDSpecVersion string not set.
  431. snapshot.c : 400,000 is invalid syntax.
  432. Last line of gpdloadrawbinarydata - snapshot.c
  433. should be return(NULL);
  434. atrPageDimensions) ; Is not required for custom papers.
  435. Why are all except 2 items in the GID array NULL ?
  436. and one is -1 ? not repro.
  437. prepare for reading resources from dll. copy pcl5ems.dll
  438. to printers directory. check that RC values are correctly
  439. initialized.
  440. has the enum constant for the keyword
  441. CursorXafterCR been changed from AT_GRXDATA_ORIGIN
  442. to AT_CURSOR_X_ORIGIN ? if so change spec and parser.
  443. cause entire number string to be printed as an error
  444. value1.c - line 552.
  445. change GpdChangeOptionsViaID so
  446. if paperID doesn't match, fall back to paper dimensions.
  447. This is because the Spooler assigns new papers
  448. IDs on a first come first serve basis.
  449. why is test.gpd locked?
  450. bug fix for uninitialized *CursorOrigin
  451. snapshot.c 1467
  452. if(dwFlags & SSF_RETURN_UNINITIALIZED)
  453. return(TRI_UNINITIALIZED) ;
  454. gpdparse.h 1448
  455. #define SSF_RETURN_UNINITIALIZED 0x00000200
  456. // if no value exists, cause EextractValueFromTree
  457. // to return TRI_UNINITIALIZED, but don't complain
  458. // to user.
  459. snaptbl.c 1849
  460. pmrbd->snapShotTable[dwI].dwFlags = SSF_RETURN_UNINITIALIZED ;
  461. suppress the no integer found message by
  462. not calling parseinteger if LIST code detects
  463. nothing is there (dwCount = 0).
  464. major bugs found in installable feature code!
  465. Why did BparseInvalidInstallableCombination mess up
  466. unable to recognize the option name?
  467. Currently ExchangeDataInFOATNode
  468. stores dwSynFea into dwFeature of patt.
  469. Yet to the rest of the Snapshot code
  470. this isn't SynFea 0 or 1, its Feature 8 or 9!
  471. Verify no one in the snapshot accesses anything via
  472. SynFea, then modify the two Exchange functions
  473. when SynFea = TRUE.
  474. note: features must be synthesized after most postprocessing
  475. has occured so that constraints and things have been
  476. processed, but just before priority array is initialized.
  477. new function:
  478. if(!BfindMatchingNode(&atrCur, dwFeature, dwOption))
  479. BexchangeDataInFOATNode and BexchangeArbDataInFOATNode
  480. 2 changes: add new boolean bSynFeature
  481. dwIn is now pdwIn, if this is NULL,
  482. this means we don't want to alter the attribute tree.
  483. Handling of special keywords during the 2nd pass:
  484. *InvalidInstallableCombination:
  485. parse into links of INVC nodes, with the
  486. new invalidcombo field of the first node
  487. pointing down to another invalid combo.
  488. A new field in the GlobalAttributes structure
  489. will point to the first (most recently created)
  490. INVC list.
  491. See state1.c SPEC_INVALID_INS_COMBO
  492. currently calls BparseInvalidCombination()
  493. *NotInstalledConstraints:
  494. *InstalledConstraints:
  495. parse just like a normal constraint except the root
  496. is placed in the appropriate field. Note there are two
  497. types: LocalFeature and LocalOption. Will the single
  498. function handle both? Apparently yes.
  499. *Installable: treat just like another non-relocatable attribute.
  500. after the 2nd pass, can FeaOpt array to see how many
  501. Installable fields are set to TRUE. (count both Fea and Opts)
  502. Allocate this many synthesized features.
  503. Scan FeaOpt array and link the Installable Feature/Option
  504. with its synthesized feature using the links.
  505. create a default list of Constraints that says SynFea/Not Installed
  506. constrains all options of the associated InstallableFeature/All
  507. except option zero. or if an installable option was specified
  508. only one constraint constraining that one Fea/Option is synthesized.
  509. copy the links for
  510. *NotInstalledConstraints:
  511. *InstalledConstraints:
  512. to the associated Synthesized Feature/Installed
  513. Feature/Not Installed
  514. options.
  515. look at each InvalidInstallableCombination
  516. dereference each Qualified name , replace by associated
  517. Synthesized Feature/Installed, and link to each SyntheFea.
  518. No wildcards needed here.
  519. must set breakpt in KM and see why GpdMapToDeviceOptIndex
  520. keeps getting hit.
  521. return value is FALSE if every option for this
  522. feature is constrained (as may well be the case for
  523. an installable feature.) Note, setup of sequenced
  524. commands may want to call these functions to determine
  525. if a command should be sent.
  526. How would init default option array work? (just see if
  527. feature is constrained and automatically set option = FF)
  528. make sure
  529. (WORD)pinvc[dwICNode].dwOption == (WORD)DEFAULT_INIT))
  530. is handled properly everywhere!
  531. if we define DEFAULT_INIT appearing in a constraint as matching
  532. all options except index 0, then features don't have to be disabled,
  533. and no special case code need be written! to take care of FF
  534. etc.
  535. What about installable features?
  536. if a feature is declared installable,
  537. and the feature is specified to be NOT installed,
  538. the option value for that feature must be set to
  539. Don't care. All the Constraints helper functions will
  540. interpret a DON'T_CARE value as an anti wildcard that
  541. doesn't match any option.
  542. Must also modify code to make sequenced commands and
  543. any code to expect an option may be don't care.
  544. complete and test UI constraints helper functions.
  545. check out latest GPD converted files and resources.
  546. attempt to eliminate all warning messages during parsing.
  547. what is needed to fully sync to latest stuff?
  548. should an empty list be permitted? YES.
  549. this is called twice if first is successful! memory leak!
  550. in snapshot.c line 3438
  551. if (!(pRawData = GpdLoadCachedBinaryData(ptstrDataFilename)))
  552. add new keywords for rectangle fills. see alvin's
  553. mail.
  554. need to implement both helpstring and help index.
  555. revise gpd spec.
  556. fix CL_CONS_PAPERSIZE DMPAPER_USER
  557. so it compares dwDevmodeID not FeatureID.
  558. initialize fields in minirawdata so when test.bud is
  559. loaded, it won't get rejected by the parser.
  560. debug all remaining code.
  561. verify all keywords are enumerated in snapshot.c
  562. don't restore DFEATURE_OPTIONS.atrGIDvalue - leave as dwGID
  563. test BwriteUnicodeToHeap.
  564. The split and combine helper function must recognize
  565. *FeatureType.
  566. decide what fields need to be updated as a result of
  567. the user changing a feature selection.
  568. Write this helper function. Add optimization to return quickly
  569. if no update is required.
  570. more special processing:
  571. to save time do this only if atrModelName is not
  572. initialized. must load resource file and extract
  573. Unicode string at atrModelNameID
  574. and add to stringheap then place offset
  575. in atrModelName.
  576. wait for constants to be defined for *DLSymbolSet
  577. and for ROMAN-8 . and for Halftone options.
  578. --- obsolete -----
  579. no need to implement wildcards.
  580. if the attribute tree for invalidcombinations
  581. is allowed to contain the node dwOpt = (WORD)DEFAULT_INIT
  582. then the helper function accessing any InvalidCombo tree must
  583. check for option = (WORD)DEFAULT_INIT as well as for dwOpt
  584. if dwOpt != 0. If an InvalidCombo node is encountered
  585. containing [dwFea1, (WORD)DEFAULT_INIT] this matches dwFea1, any
  586. non-zero dwOpt. So why (WORD) truncation? Why not store as
  587. dword?
  588. should eventually remove the fully qualified pathname hack
  589. I made since this is better implemented in
  590. resource caching of dll. (binary file should not be
  591. installation dependent. If GPD defines multiple
  592. dlls, this hack will fail.
  593. Locality stuff.
  594. change from arrayref to dword:
  595. iMin and MaxOverlayID in Globals. ?
  596. * if open brace is missing after a construct keyword, must
  597. flag this as a fatal error.
  598. * When consolidating data, add DWORD padding between each block of data.
  599. Also need to free dest block of memory!
  600. * BparseConstant()
  601. should first check to see if strlen matches before
  602. doing string compare.
  603. * BstoreCommandAttrib() note must compare string(dwCommandID)
  604. with string associated with commandID.
  605. * must change eOffsetMeans to VALUE_AT_HEAP after we write
  606. something there.
  607. * state1.c BUG_BUG: openbrace encountered
  608. make this a fatal syntax error.
  609. * mismatched braces should be considered a fatal error.
  610. see PopStack().
  611. * error parsing a construct should be considered a fatal error
  612. due to messing up the stack.
  613. * BidentifyAttributeKeyword currently fails to identify any
  614. keyword with TKMF_EXTERN_ flag set.
  615. * Register symbol doesn't even check for NULL symbol
  616. (aar.dw = 0) or TKMF_NOVALUE !
  617. give newtokenmap its own memory buffer else this buffer
  618. will get freed twice. But leave as is for now since the
  619. GP fault allows me to set breakpts.
  620. add comment saying all string refs use resourceptr.
  621. look for MemAlloc , if fails, make sure
  622. geErrorSev = ERRSEV_FATAL ;
  623. geErrorType = ERRTY_MEMORY_ALLOCATION ;
  624. are set.
  625. also look for BUG_BUG comments of the type paranoid
  626. or internal cons error. also make this a fatal error.
  627. When modifying DWregisterSymbol() update
  628. all references to this by doing fgrep in *.c *.h
  629. and declarations too!
  630. eConstruct = CONSTRUCT_OPTION, CONSTRUCT_FEATURE :
  631. ------ notes for amanda: -----
  632. defaults if keyword is missing from GPD file:
  633. pwstrResourceDLL: 0 or NULL (strings)
  634. iMaxNumPalettes: NO_LIMIT_NUM means unlimited. (int, dwords)
  635. dwBadCursorMoveInGrxMode: END_OF_LIST means empty list.
  636. dwDefaultCTT: NO_RC_CTT_ID
  637. 0 normally indicates no resource.
  638. ptMaxPrintableArea: (0, 0) means unlimited.
  639. dwMaxLineSpacing: UNUSED_ITEM driver must compute the correct value
  640. dwSymbolSetID: UNUSED_ITEM
  641. iHelpIndex: UNUSED_ITEM
  642. dwIPCallbackID: 0 indicates no callback.
  643. ptPrinterCursorOrig: WILDCARD_VALUE assume cursor origin is same
  644. as printable origin.
  645. typedef enum _UIDATATYPE {
  646. UIDT_FEATURE,
  647. UIDT_OPTION,
  648. UIDT_OPTIONEX,
  649. UIDT_CONSTRAINT,
  650. UIDT_GROUPS,
  651. UIDT_LISTNODE, // holds a LIST of dword values
  652. UIDT_FONTSCART, // list of FontCartridges
  653. UIDT_FONTSUBST, // Font Substitution table.
  654. UIDT_LAST
  655. } UIDATATYPE;
  656. add this to UIINFO:
  657. DWORD dwWhichBasePtr[UIDT_LAST] ;
  658. #define BASE_USE_RESOURCE_DATA 0x0001
  659. Determine which BasePtr to use as follows:
  660. if(uiinfo.dwWhichBasePtr[UIDT_GROUPS] & BASE_USE_RESOURCE_DATA)
  661. ptr = pubResourceData + loOffset ;
  662. else
  663. ptr = (PBYTE)pInfoHeader + loOffset ;
  664. PaletteSizes and PaletteScope should not be arrayrefs.
  665. They are lists.
  666. ------ modification of zhanw's gpd files: ----
  667. replace =Macroname with "Macroname"
  668. comment out *Include:
  669. must remove all uses of the shortcut *Command: name: "invocation"
  670. EXTERN_GLOBAL: must have the colon.
  671. Add *CodePage: 1252 near front of file.
  672. Add
  673. *SpotDiameter:100
  674. to each resolution option.
  675. Add
  676. *ModelName: "HP LazyJet 5Si"
  677. to replace *rcModelNameID
  678. remove Memory feature if it only
  679. contains the shortcut
  680. *MemConfigKB: PAIR(9216, 7650)
  681. qualifiy path name as shown:
  682. *ResourceDLL: "c:\tmp\pcl5ems.dll"
  683. ---- GPD file errors: ----
  684. not a keyword: EjectPageWithFF missing ?
  685. --- debugging process ------
  686. build debug binary:
  687. a) run chkbld
  688. b) run ssync -r in \inc \unidrv \parsers \libs \driverui
  689. c) run build -c
  690. in \libs \parsers \driverui
  691. d) prepare test.gpd in \parsers\gpd
  692. e) delete c:\winnt35\system32\spool\drivers\w32x86\2\test.bud
  693. whenever test.gpd or parsercode is altered.
  694. e) on the test machine run newdrvr.bat then
  695. windbg notepad
  696. f) type
  697. bp vinitglobals
  698. at the command window.
  699. type g then hit <cr> everytime the "Unresolved Breakpoint"
  700. dialog box appears.
  701. g) when notepad comes up click on file, page setup
  702. h) when DRIVERUI.DLL (symbols loaded) appears
  703. don't hit <cr>, instead click on set breakpoint
  704. and enter the actual break points you want set.
  705. Press Add, don't hit return until all breakpoints have
  706. been set.
  707. examples:
  708. BcreateGPDbinary,
  709. BisExternKeyword,
  710. BexchangeArbDataInFOATNode,
  711. GPDLOADCACHEDBINARYDATA
  712. gpdinitbinarydata
  713. gpdfreebinarydata
  714. gpdloadrawbinarydata
  715. gpdunloadrawbinarydata
  716. GpdInitDefaultOptions(
  717. GpdSeparateOptionArray(
  718. GpdCombineOptionArray(
  719. GpdUpdateBinaryData(
  720. GpdReconstructOptionArray(
  721. GpdChangeOptionsViaID(
  722. GpdMapToDeviceOptIndex(
  723. BinitDefaultOptionArray
  724. to restart debugging, clear all breakpoints,
  725. click run / stop debugging.
  726. return to step f)
  727. i) the string heap is the first element in gMasterTable.
  728. its address may be 147a68 no 1cd130
  729. some parser warning messages and their source.
  730. Warning, unrecognized keyword.
  731. Issued by BInterpretTokens() in state1.c when
  732. BidentifyAttributeKeyword() returns failure.
  733. constant value not a member of enumeration class: nn
  734. Issued by BparseConstant() in value1.c
  735. unrecognized Unidrv command name
  736. Issued by BstoreCommandAttrib() in state2.c
  737. user supplied constant not a member of enumeration class nn
  738. Issued by BIdentifyConstantString() in postproc.c
  739. enum classes: 26: standard values
  740. 27: Command names
  741. 28: feature names
  742. 31: Paper Source names
  743. -------
  744. error messages notes:
  745. line numbers count \n and \r separately. If
  746. a program is using linenumbers, it should interpret
  747. the count appropriately.
  748. Not all errors will pinpoint a file and line number.