1 | /*DDK*************************************************************************/
|
---|
2 | /* */
|
---|
3 | /* COPYRIGHT Copyright (C) 1991, 2003 IBM Corporation */
|
---|
4 | /* */
|
---|
5 | /* The following IBM OS/2 source code is provided to you solely for */
|
---|
6 | /* the purpose of assisting you in your development of OS/2 device */
|
---|
7 | /* drivers. You may use this code in accordance with the IBM License */
|
---|
8 | /* Agreement provided in the IBM Developer Connection Device Driver */
|
---|
9 | /* Source Kit for OS/2. This Copyright statement may not be removed. */
|
---|
10 | /* */
|
---|
11 | /*****************************************************************************/
|
---|
12 | //Number of lists 1 or 2
|
---|
13 | #define PSLISTCOUNT 4
|
---|
14 |
|
---|
15 | //For each list the size
|
---|
16 | SHORT sListSize [PSLISTCOUNT] = {127,254,254,2};
|
---|
17 |
|
---|
18 | //The Keywords . . .
|
---|
19 |
|
---|
20 | CHAR achPSKeyWords[] =
|
---|
21 | "0A\00010\0001008\0001191\0001224\000"
|
---|
22 | "12345X\0001728\0001B\00025\0002592\000"
|
---|
23 | "279\000297\000300\000312\000420\000"
|
---|
24 | "459\000499\000516\000522\000540\000"
|
---|
25 | "595\000600\000612\000624\000649\000"
|
---|
26 | "684\000729\000756\000792\000842\000"
|
---|
27 | "93\00095\000A3\000B4\000B5\000"
|
---|
28 | "C5\000Coated\000ColorRendering\000ColorSmartColorMatching\000ColorTransform\000"
|
---|
29 | "Comm10\000DL\000DeferredMediaSelection\000DeviceRenderingInfo\000Duplex\000"
|
---|
30 | "ENTER\000Executive\000Folio\000HWResolution\000Halftone\000"
|
---|
31 | "ImageBrightness\000ImageContrast\000ImagingBBox\000InputAttributes\000InputSlot\000"
|
---|
32 | "LANGUAGE\000Lower\000ManualFeed\000MediaPosition\000MediaType\000"
|
---|
33 | "Middle\000Multipurpose\000OutputMode\000PJL\000PageRegion\000"
|
---|
34 | "PageSize\000Policies\000PostRenderingEnhance\000PostRenderingEnhanceDetails\000Priority\000"
|
---|
35 | "REValue\000SET\000Tabloid\000TraySwitch\000Type\000"
|
---|
36 | "UIConstraints\000Upper\000VirtualColorDevice\000a4\000a4tray\000"
|
---|
37 | "add\000b5tray\000begin\000cleartomark\000copy\000"
|
---|
38 | "currentdict\000currentpagedevice\000def\000defineresource\000dict\000"
|
---|
39 | "dup\000end\000eq\000exch\000exec\000"
|
---|
40 | "false\000findresource\000get\000globaldict\000if\000"
|
---|
41 | "ifelse\000known\000legaltray\000length\000letter\000"
|
---|
42 | "lettertray\000manualfeed\000mark\000mul\000ne\000"
|
---|
43 | "null\000pop\000put\000setcolorrendering\000setdoret\000"
|
---|
44 | "setduplexmode\000sethalftone\000setmailboxstacker\000setoutputtray\000setpagedevice\000"
|
---|
45 | "setpapertray\000settrayswitch\000settumble\000statusdict\000stopped\000"
|
---|
46 | "sub\000true\00010.32\000100\0001001\000"
|
---|
47 | "1032\0001080\0001190\00011x17\00011x17tray\000"
|
---|
48 | "1200\00012345\0001274\0001296\0001318\000"
|
---|
49 | "1322\0001361\0001460\0001584\0001684\000"
|
---|
50 | "1772\0002064\0002384\0002448\000252\000"
|
---|
51 | "2551\000281\000283\000288\0002920\000"
|
---|
52 | "298\0003168\000323\0003370\0003456\000"
|
---|
53 | "3529\000354\000360\000396\000400\000"
|
---|
54 | "400x400dpi\000432\0004320\000460\000461\000"
|
---|
55 | "504\0005184\000570\000576\000587\000"
|
---|
56 | "596\0006048\000639\000648\0006912\000"
|
---|
57 | "708\000709\000720\000724\000728\000"
|
---|
58 | "757\000767\0007776\000800\000800x400dpi\000"
|
---|
59 | "81.7\000864\000890\000907\000921\000"
|
---|
60 | "935\000936\000940\000971\000983\000"
|
---|
61 | "AdjustCIEColors\000Base\000Basic\000BeginPage\000BlackSubstitution\000"
|
---|
62 | "BlueAdjust\000CPEnhanced\000CPSpot\000CRDFamily\000Capabilities\000"
|
---|
63 | "Cluster\000Collate\000Color\000ColorBalance\000ColorCorrection\000"
|
---|
64 | "ColorSmartColorRendering\000ColorSmartGraphicsAdjustment\000ColorSmartGraphicsHalftone\000ColorSmartImageAdjustment\000ColorSmartImageHalftone\000"
|
---|
65 | "ColorSmartTextAdjustment\000ColorSmartTextHalftone\000Commercial\000DENSITY\000Dark\000"
|
---|
66 | "DefaultColorRendering\000DefaultHalftone\000Device\000DeviceCMY\000DeviceCMYK\000"
|
---|
67 | "DeviceGray\000ECONOMODE\000EOJ\000Enhanced\000Euroscale\000"
|
---|
68 | "False\000GetPageDeviceName\000Gray\000IncludeFeature\000Install\000"
|
---|
69 | "JOB\000Jog\000LDENSITY\000LMANUALPAPERTYPE\000LPARM\000"
|
---|
70 | "LPICTUREGRADE\000LTRAY1PAPERTYPE\000LanguageLevel\000Light\000MatchScreen\000"
|
---|
71 | "MediaColor\000Medium\000MirrorPrint\000Missing\000NoAdj\000"
|
---|
72 | "OFF\000OPTIONAL\000OUTBIN\000Option1\000OutputAttributes\000"
|
---|
73 | "OutputFaceUp\000OutputType\000POSTSCRIPT\000PageDeviceName\000Paper\000"
|
---|
74 | "Plain\000Please\000Postscript\000PreRenderingEnhance\000PrintMethod\000"
|
---|
75 | "PrintQuality\000ProcSet\000ProcessColorModel\000QMSsetscreencrd\000RESOLUTION\000"
|
---|
76 | "RET\000RenderingMethod\000Resolution\000SWOP\000Scatter\000"
|
---|
77 | "ScreenFamily\000Screening\000Seiko\000SeikoCRD\000SeikoHalftone\000"
|
---|
78 | "SeikoPageDevice\000SeikoSCTC\000SeikoSetup\000Seikodict\000Smoothing\000"
|
---|
79 | "Standard\000StandardEOD\000TekBlue\000TekDisplay\000This\000"
|
---|
80 | "TonerSaver\000Transparency\000True\000Tumble\000Vivid\000"
|
---|
81 | "WARNING\000a3tray\000a5tray\000abs\000and\000"
|
---|
82 | "b4tray\000bind\000boversize\000c5envelope\000c5envelopetray\000"
|
---|
83 | "cdp\000clip\000closepath\000cmyk\000collate\000"
|
---|
84 | "colormodel\000colorseparation\000com10envelope\000com10envelopetray\000com6envelope\000"
|
---|
85 | "com6envelopetray\000com9envelope\000com9envelopetray\000concat\000contact\000"
|
---|
86 | "count\000cvi\000cvs\000device\000div\000"
|
---|
87 | "dlenvelope\000dlenvelopetray\000does\000duplexer\000executivepage\000"
|
---|
88 | "executivetray\000flush\000following\000forall\000idiv\000"
|
---|
89 | "index\000initializepage\000legal\000lineto\000lms\000"
|
---|
90 | "mod\000monarcenvelope\000monarcenvelopetray\000multipurpose\000newpath\000"
|
---|
91 | "not\000off\000paper\000password\000quit\000"
|
---|
92 | "repeat\000roll\000rotate\000save\000setcollate\000"
|
---|
93 | "setcollatorstacker\000setcolorscreen\000setglobal\000setresolution\000setscreen\000"
|
---|
94 | "setsorterstacker\000setstrokeadjust\000settransfer\000sizes\000software\000"
|
---|
95 | "startjob\000store\000string\000support\000the\000"
|
---|
96 | "through\000translate\000tray\000trayswitch\000userdict\000"
|
---|
97 | "where\0001.0000\0001.0570\0001.0890\0001.5374\000"
|
---|
98 | "1.8760\0001005\0001031\000106x45\000107.5\000"
|
---|
99 | "110x220envelope\000110x220envelopetray\0001188\0001253\0001289\000"
|
---|
100 | "12929400\0001310\0001346\0001375\000162x229envelope\000"
|
---|
101 | "162x229envelopetray\0001990\0001994\0002400\0003.2410\000"
|
---|
102 | "3.875x7.5envelope\0003.875x7.5envelopetray\0003311992\00035.5\0004.125x9.5envelope\000"
|
---|
103 | "4.125x9.5envelopetray\0004.1666667\0004557176\00053x45\000591.36\000"
|
---|
104 | "601.68\00071.5\00071x45\00080x45\000845.3\000"
|
---|
105 | "926.5\000ActualPostRenderingEnhance\000ActualPreRenderingEnhance\000Adjustment\000Advanced\000"
|
---|
106 | "Angle\000AnySetup\000April\000BRBlackSubstitution\000BRErrorDiffusion\000"
|
---|
107 | "BRFeeder\000BRPrintQuality\000BRProcessColor\000BandPage\000Begin\000"
|
---|
108 | "Blue\000Business\000Business300\000Business600\000CARDSTOCK\000"
|
---|
109 | "Cannot\000CloseGroup\000CloseUI\000ClusterAutoSelectColorRendering\000ClusterAutoSelectHalftone\000"
|
---|
110 | "ClusterCRD\000ClusterHalftone\000Code\000ColorDepth\000ColorRegistration\000"
|
---|
111 | "ColorRenderingType\000ColorSpace\000Colorimetric\000Colorimetric300\000Colorimetric600\000"
|
---|
112 | "Comm\000Copyright\000DARK\000DefaultColorRendering600\000DefaultColorRenderingRE\000"
|
---|
113 | "DefaultColorRenderingRE600\000DefaultColorSpace\000DefaultEndOfDocType\000DefaultHalftone600\000DefaultResolution\000"
|
---|
114 | "Detail\000DetailCRD\000DetailHalftone\000Display\000DonorType\000"
|
---|
115 | "Draft\000Emulators\000EndOfDocType\000EngExe\000EngPreStart\000"
|
---|
116 | "Engine\000EnhancedColorRendering\000EnhancedColorRendering600\000EnhancedHalftone\000Envelope\000"
|
---|
117 | "Failed\000FaxSupport\000File\000FileSystem\000FinishQuality\000"
|
---|
118 | "FreeVM\000Frequency\000GetHalftoneName\000Glossy\000Halftone1\000"
|
---|
119 | "Halftone2\000Halftone6\000HalftoneName\000HalftoneType\000ImageDiffusion\000"
|
---|
120 | "ImageEnhancement\000Incorporated\000InstallableOptions\000Instruments\000June\000"
|
---|
121 | "LABELS\000LCOLLATION\000LIGHT\000LTRAY2PAPERTYPE\000Letter\000"
|
---|
122 | "MEDIUM\000Mark\000MatrixLMN\000Monochrome\000NORMAL\000"
|
---|
123 | "Newsprint\000NoAdjust\000None\000Number\000OUTPUT\000"
|
---|
124 | "Option7\000Option9\000OrderDependency\000Password\000Patch\000"
|
---|
125 | "Photographic\000PostScript\000PreRenderingEnhanceDetails\000Premium\000PrintTechnology\000"
|
---|
126 | "Printer\000Protocols\000ROUGH\000RenderTable\000Reserved\000"
|
---|
127 | "Reset\000Rights\000SIIscreen\000SNAP\000ScatterAutoSelectColorRendering\000"
|
---|
128 | "ScatterAutoSelectHalftone\000ScatterCRD\000ScatterHalftone\000Screen\000SeikoHalftoneJET2\000"
|
---|
129 | "SeikoSCTK\000SeikoSCTM\000SeikoSCTY\000SeikoSpot\000Separations\000"
|
---|
130 | "Simulate\000Slider\000SlipSheet\000Smooth\000Space\000"
|
---|
131 | "Special\000SpotFunction\000Staple\000StapleDetails\000StartEmulator\000"
|
---|
132 | "Stock\000TBCP\000TCdict\000TRANSPARENCY\000TTRasterizer\000"
|
---|
133 | "TekBP\000TransformPQR\000Tray\000TrayLinking\000Type42\000"
|
---|
134 | "UseCIE\000VariablePaperSize\000VividClusterAutoSelectHalftone\000VividScatterAutoSelectHalftone\000WhitePoint\000"
|
---|
135 | "a4oversize\000a4small\000a6tray\000aoversize\000author\000"
|
---|
136 | "autoscale\000b6tray\000c5tray\000calcolor\000ceiling\000"
|
---|
137 | "code\000com10\000com10tray\000counttomark\000currenthalftone\000"
|
---|
138 | "defaulthalftone\000dicttype\000dltray\000duplex\000file\000"
|
---|
139 | "findcolorrendering\000floor\000getinterval\000graymodel\000hplj\000"
|
---|
140 | "ickOne\000initial\000input\000instance\000invalid\000"
|
---|
141 | "letterhead\000lettersmall\000mode\000modify\000monarch\000"
|
---|
142 | "monarchtray\000moveto\000patch\000printer\000ptra\000"
|
---|
143 | "putinterval\000rectclip\000regular\000reset\000resource\000"
|
---|
144 | "resourcestatus\000setblackgeneration\000setcolor\000setcolorspace\000setcolortransfer\000"
|
---|
145 | "setgray\000setrgbcolor\000setundercolorremoval\000stack\000statement\000"
|
---|
146 | "statementtray\000supera\000superb\000systemdict\000this\000"
|
---|
147 | "trays\000type\000universaltray\000updated\000xerox\000"
|
---|
148 | "Photographic300\000Photographic600\000";
|
---|
149 |
|
---|
150 | //The Offsets . . .
|
---|
151 |
|
---|
152 | SHORT sPSKeyWordOffset[] = {
|
---|
153 | 0,3,6,11,16,
|
---|
154 | 21,28,33,36,39,
|
---|
155 | 44,48,52,56,60,
|
---|
156 | 64,68,72,76,80,
|
---|
157 | 84,88,92,96,100,
|
---|
158 | 104,108,112,116,120,
|
---|
159 | 124,127,130,133,136,
|
---|
160 | 139,142,149,164,188,
|
---|
161 | 203,210,213,236,256,
|
---|
162 | 263,269,279,285,298,
|
---|
163 | 307,323,337,349,365,
|
---|
164 | 375,384,390,401,415,
|
---|
165 | 425,432,445,456,460,
|
---|
166 | 471,480,489,510,538,
|
---|
167 | 547,555,559,567,578,
|
---|
168 | 583,597,603,622,625,
|
---|
169 | 632,636,643,649,661,
|
---|
170 | 666,678,696,700,715,
|
---|
171 | 720,724,728,731,736,
|
---|
172 | 741,747,760,764,775,
|
---|
173 | 778,785,791,801,808,
|
---|
174 | 815,826,837,842,846,
|
---|
175 | 849,854,858,862,880,
|
---|
176 | 889,903,915,933,947,
|
---|
177 | 961,974,988,998,1009,
|
---|
178 | 1017,1021,1026,1032,1036,
|
---|
179 | 1041,1046,1051,1056,1062,
|
---|
180 | 1072,1077,1083,1088,1093,
|
---|
181 | 1098,1103,1108,1113,1118,
|
---|
182 | 1123,1128,1133,1138,1143,
|
---|
183 | 1147,1152,1156,1160,1164,
|
---|
184 | 1169,1173,1178,1182,1187,
|
---|
185 | 1192,1197,1201,1205,1209,
|
---|
186 | 1213,1224,1228,1233,1237,
|
---|
187 | 1241,1245,1250,1254,1258,
|
---|
188 | 1262,1266,1271,1275,1279,
|
---|
189 | 1284,1288,1292,1296,1300,
|
---|
190 | 1304,1308,1312,1317,1321,
|
---|
191 | 1332,1337,1341,1345,1349,
|
---|
192 | 1353,1357,1361,1365,1369,
|
---|
193 | 1373,1389,1394,1400,1410,
|
---|
194 | 1428,1439,1450,1457,1467,
|
---|
195 | 1480,1488,1496,1502,1515,
|
---|
196 | 1531,1556,1585,1612,1638,
|
---|
197 | 1662,1687,1710,1721,1729,
|
---|
198 | 1734,1756,1772,1779,1789,
|
---|
199 | 1800,1811,1821,1825,1834,
|
---|
200 | 1844,1850,1868,1873,1888,
|
---|
201 | 1896,1900,1904,1913,1930,
|
---|
202 | 1936,1950,1966,1980,1986,
|
---|
203 | 1998,2009,2016,2028,2036,
|
---|
204 | 2042,2046,2055,2062,2070,
|
---|
205 | 2087,2100,2111,2122,2137,
|
---|
206 | 2143,2149,2156,2167,2187,
|
---|
207 | 2199,2212,2220,2238,2254,
|
---|
208 | 2265,2269,2285,2296,2301,
|
---|
209 | 2309,2322,2332,2338,2347,
|
---|
210 | 2361,2377,2387,2398,2408,
|
---|
211 | 2418,2427,2439,2447,2458,
|
---|
212 | 2463,2474,2487,2492,2499,
|
---|
213 | 2505,2513,2520,2527,2531,
|
---|
214 | 2535,2542,2547,2557,2568,
|
---|
215 | 2583,2587,2592,2602,2607,
|
---|
216 | 2615,2626,2642,2656,2674,
|
---|
217 | 2687,2704,2717,2734,2741,
|
---|
218 | 2749,2755,2759,2763,2770,
|
---|
219 | 2774,2785,2800,2805,2814,
|
---|
220 | 2828,2842,2848,2858,2865,
|
---|
221 | 2870,2876,2891,2897,2904,
|
---|
222 | 2908,2912,2927,2946,2959,
|
---|
223 | 2967,2971,2975,2981,2990,
|
---|
224 | 2995,3002,3007,3014,3019,
|
---|
225 | 3030,3049,3064,3074,3088,
|
---|
226 | 3098,3115,3131,3143,3149,
|
---|
227 | 3158,3167,3173,3180,3188,
|
---|
228 | 3192,3200,3210,3215,3226,
|
---|
229 | 3235,3241,3248,3255,3262,
|
---|
230 | 3269,3276,3281,3286,3293,
|
---|
231 | 3299,3315,3335,3340,3345,
|
---|
232 | 3350,3359,3364,3369,3374,
|
---|
233 | 3390,3410,3415,3420,3425,
|
---|
234 | 3432,3450,3472,3480,3485,
|
---|
235 | 3503,3525,3535,3543,3549,
|
---|
236 | 3556,3563,3568,3574,3580,
|
---|
237 | 3586,3592,3619,3645,3656,
|
---|
238 | 3665,3671,3680,3686,3706,
|
---|
239 | 3723,3732,3747,3762,3771,
|
---|
240 | 3777,3782,3791,3803,3815,
|
---|
241 | 3825,3832,3843,3851,3883,
|
---|
242 | 3909,3920,3936,3941,3952,
|
---|
243 | 3970,3989,4000,4013,4029,
|
---|
244 | 4045,4050,4060,4065,4090,
|
---|
245 | 4114,4141,4159,4179,4198,
|
---|
246 | 4216,4223,4233,4248,4256,
|
---|
247 | 4266,4272,4282,4295,4302,
|
---|
248 | 4314,4321,4344,4370,4387,
|
---|
249 | 4396,4403,4414,4419,4430,
|
---|
250 | 4444,4451,4461,4477,4484,
|
---|
251 | 4494,4504,4514,4527,4540,
|
---|
252 | 4555,4572,4585,4604,4616,
|
---|
253 | 4621,4628,4639,4645,4661,
|
---|
254 | 4668,4675,4680,4690,4701,
|
---|
255 | 4708,4718,4727,4732,4739,
|
---|
256 | 4746,4754,4762,4778,4787,
|
---|
257 | 4793,4806,4817,4844,4852,
|
---|
258 | 4868,4876,4886,4892,4904,
|
---|
259 | 4913,4919,4926,4936,4941,
|
---|
260 | 4973,4999,5010,5026,5033,
|
---|
261 | 5051,5061,5071,5081,5091,
|
---|
262 | 5103,5112,5119,5129,5136,
|
---|
263 | 5142,5150,5163,5170,5184,
|
---|
264 | 5198,5204,5209,5216,5229,
|
---|
265 | 5242,5248,5261,5266,5278,
|
---|
266 | 5285,5292,5310,5341,5372,
|
---|
267 | 5383,5394,5402,5409,5419,
|
---|
268 | 5426,5436,5443,5450,5459,
|
---|
269 | 5467,5472,5478,5488,5500,
|
---|
270 | 5516,5532,5541,5548,5555,
|
---|
271 | 5560,5579,5585,5597,5607,
|
---|
272 | 5612,5619,5627,5633,5642,
|
---|
273 | 5650,5661,5673,5678,5685,
|
---|
274 | 5693,5705,5712,5718,5726,
|
---|
275 | 5731,5743,5752,5760,5766,
|
---|
276 | 5775,5790,5809,5818,5832,
|
---|
277 | 5849,5857,5869,5890,5896,
|
---|
278 | 5906,5920,5927,5934,5945,
|
---|
279 | 5950,5956,5961,5975,5983,
|
---|
280 | 5989,6005};
|
---|