Debian Codegraph @

src/cups/genppd.c

raw symbols SCIP
1 /*
2 * PPD file generation program for the CUPS drivers.
3 *
4 * Copyright 1993-2008 by Mike Sweet and Robert Krawitz.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 2 of the License, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 *
19 * Contents:
20 *
21 * main() - Process files on the command-line...
22 * cat_ppd() - Copy the named PPD to stdout.
23 * generate_ppd() - Generate a PPD file.
24 * getlangs() - Get a list of available translations.
25 * help() - Show detailed help.
26 * is_special_option() - Determine if an option should be grouped.
27 * list_ppds() - List the available drivers.
28 * print_group_close() - Close a UI group.
29 * print_group_open() - Open a new UI group.
30 * printlangs() - Print list of available translations.
31 * printmodels() - Print a list of available models.
32 * usage() - Show program usage.
33 * write_ppd() - Write a PPD file.
34 */
35
36 /*
37 * Include necessary headers...
38 */
39
40 #include "genppd.h"cxx . . $ `<file>/src/cups/genppd.h`/
41 #pragma GCC diagnostic ignored "-Wformat-nonliteral"
42
43 #if defined(HAVE_VARARGS_H) && !defined(HAVE_STDARG_Hcxx . . $ `config.h:118:9`!)
44 #include <varargs.h>
45 #else
46 #include <stdarg.h>
47 #endif
48
49 const char *ppdextcxx . . $ ppdext. = ".ppd";
50 const char *cups_modeldircxx . . $ cups_modeldir. = CUPS_MODELDIRcxx . . $ `config.h:8:9`!;
51 const char *gpextcxx . . $ gpext. = "";
52
53 static int use_compressioncxx . . $ use_compression.;
54
55 int use_base_versioncxx . . $ use_base_version. = 0;
56
57 /*
58 * Some applications use the XxYdpi tags rather than the actual
59 * hardware resolutions to decide what resolution to print at. Some
60 * applications get very unhappy if the vertical resolution exceeds
61 * a certain amount. Some of those applications even get very unhappy if
62 * the PPD file even contains a resolution that exceeds that limit.
63 * And they're not even free source applications.
64 * Feh.
65 */
66 #define MAXIMUM_SAFE_PPD_Y_RESOLUTIONcxx . . $ `src/cups/genppd.c:66:9`! (720)
67 #define MAXIMUM_SAFE_PPD_X_RESOLUTIONcxx . . $ `src/cups/genppd.c:67:9`! (1500)
68
69 /*
70 * Note:
71 *
72 * The current release of ESP Ghostscript is fully Level 3 compliant,
73 * so we can report Level 3 support by default...
74 */
75
76 int cups_ppd_ps_levelcxx . . $ cups_ppd_ps_level. = CUPS_PPD_PS_LEVELcxx . . $ `config.h:14:9`!;
77 int localize_numberscxx . . $ localize_numbers. = 0;
78
79 /*
80 * File handling stuff...
81 */
82
83 typedef structcxx . . $ $anonymous_type_d2bfadd67790c745_0# /**** Media size values ****/
84 {
85 const char *namecxx . . $ $anonymous_type_d2bfadd67790c745_0#name., /* Media size name */
86 *textcxx . . $ $anonymous_type_d2bfadd67790c745_0#text.; /* Media size text */
87 stp_dimension_tcxx . . $ stp_dimension_t# widthcxx . . $ $anonymous_type_d2bfadd67790c745_0#width., /* Media width */
88 heightcxx . . $ $anonymous_type_d2bfadd67790c745_0#height., /* Media height */
89 leftcxx . . $ $anonymous_type_d2bfadd67790c745_0#left., /* Media left margin */
90 rightcxx . . $ $anonymous_type_d2bfadd67790c745_0#right., /* Media right margin */
91 bottomcxx . . $ $anonymous_type_d2bfadd67790c745_0#bottom., /* Media bottom margin */
92 topcxx . . $ $anonymous_type_d2bfadd67790c745_0#top.; /* Media top margin */
93 } paper_tcxx . . $ paper_t#;
94
95 const char *special_optionscxx . . $ special_options.[] =
96 {
97 "PageSize",
98 "MediaType",
99 "InputSlot",
100 "Resolution",
101 "OutputOrder",
102 "Quality",
103 "Duplex",
104 "Collate",
105 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!
106 };
107
108 /*
109 * TRANSLATORS:
110 * Please keep these translated names SHORT. The number of bytes in
111 * the parameter class name plus the number of bytes in the parameter
112 * name must not exceed 38 BYTES (not characters!)
113 */
114
115 const char *parameter_class_namescxx . . $ parameter_class_names.[] =
116 {
117 _cxx . . $ `src/cups/i18n.h:28:9`!("Printer Features"),
118 _cxx . . $ `src/cups/i18n.h:28:9`!("Output Control")
119 };
120
121 const char *parameter_level_namescxx . . $ parameter_level_names.[] =
122 {
123 _cxx . . $ `src/cups/i18n.h:28:9`!("Common"),
124 _cxx . . $ `src/cups/i18n.h:28:9`!("Extra 1"),
125 _cxx . . $ `src/cups/i18n.h:28:9`!("Extra 2"),
126 _cxx . . $ `src/cups/i18n.h:28:9`!("Extra 3"),
127 _cxx . . $ `src/cups/i18n.h:28:9`!("Extra 4"),
128 _cxx . . $ `src/cups/i18n.h:28:9`!("Extra 5")
129 };
130
131 /*
132 * Local functions...
133 */
134
135 static int gpputscxx . . $ gpputs(21296c77d5f44c4f).(gpFilecxx . . $ gpFile# f, const char *s);
136 static int gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(gpFilecxx . . $ gpFile# f, const char *format, ...)
137 __attribute__((format(__printf__, 2, 3)));
138 static int is_special_optioncxx . . $ is_special_option(5c4306d8553b3696).(const char *name);
139 static void print_group_closecxx . . $ print_group_close(f809d5d9c0465c7f).(gpFilecxx . . $ gpFile# fp, stp_parameter_class_tcxx . . $ stp_parameter_class_t# p_class,
140 stp_parameter_level_tcxx . . $ stp_parameter_level_t# p_level,
141 const char *language,
142 const stp_string_list_tcxx . . $ stp_string_list_t# *po);
143 static void print_group_opencxx . . $ print_group_open(f809d5d9c0465c7f).(gpFilecxx . . $ gpFile# fp, stp_parameter_class_tcxx . . $ stp_parameter_class_t# p_class,
144 stp_parameter_level_tcxx . . $ stp_parameter_level_t# p_level,
145 const char *language,
146 const stp_string_list_tcxx . . $ stp_string_list_t# *po);
147
148
149 /*
150 * Global variables...
151 */
152
153
154 static int
155 gpputscxx . . $ gpputs(21296c77d5f44c4f).(gpFilecxx . . $ gpFile# f, const char *s)
156 {
157 #ifdef HAVE_LIBZcxx . . $ `config.h:91:9`!
158 if (use_compressioncxx . . $ use_compression.)
159 return gzputscxx . . $ gzputs(a4302f0834288e6e).(f->gzfcxx . . $ $anonymous_type_b1f2d71ee109eb2b_1#gzf., s);
160 else
161 return fputscxx . . $ fputs(874fa6a5e59ab9bd).(s, f->fcxx . . $ $anonymous_type_b1f2d71ee109eb2b_1#f.);
162 #else
163 return fputs(s, f);
164 #endif
165 }
166
167 static int
168 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(gpFilecxx . . $ gpFile# f, const char *format, ...)
169 {
170 int status;
171 int current_allocation = 64;
172 char *result = stp_malloccxx . . $ stp_malloc(bfcfa4d6b7f7ef64).(current_allocation);
173 while (1)
174 {
175 int bytes;
176 va_listcxx . . $ va_list# args;
177 va_startcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stdarg.h:50:9`!(args, format);
178 bytes = vsnprintfcxx . . $ vsnprintf(a85eea89d1bd834f).(result, current_allocation, format, args);
179 va_endcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stdarg.h:52:9`!(args);
180 if (bytes >= 0 && bytes < current_allocation)
181 break;
182 else
183 {
184 stp_freecxx . . $ stp_free(5d22bdacc48458e8).(result);
185 if (bytes < 0)
186 current_allocation *= 2;
187 else
188 current_allocation = bytes + 1;
189 result = stp_malloccxx . . $ stp_malloc(bfcfa4d6b7f7ef64).(current_allocation);
190 }
191 }
192 status = gpputscxx . . $ gpputs(21296c77d5f44c4f).(f, result);
193 stp_freecxx . . $ stp_free(5d22bdacc48458e8).(result);
194 return status;
195 }
196
197 /*
198 * 'getlangs()' - Get a list of available translations.
199 */
200
201 char ** /* O - Array of languages */
202 getlangscxx . . $ getlangs(de5739791ae7584).(void)
203 {
204 int i; /* Looping var */
205 char *ptr; /* Pointer into string */
206 static char all_linguas[] = ALL_LINGUAScxx . . $ `<built-in>:421:9`!;
207 /* List of languages from configure.ac */
208 static char **langs = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; /* Array of languages */
209
210
211 if (!langs)
212 {
213 /*
214 * Create the langs array...
215 */
216
217 for (i = 1, ptr = strchrcxx . . $ strchr(2050848944e00d54).(all_linguas, ' '); ptr; ptr = strchrcxx . . $ strchr(2050848944e00d54).(ptr + 1, ' '))
218 i ++;
219
220 langs = calloccxx . . $ calloc(63a7bf2941bfcd7a).(i + 1, sizeof(char *));
221
222 langs[0] = all_linguas;
223 for (i = 1, ptr = strchrcxx . . $ strchr(2050848944e00d54).(all_linguas, ' '); ptr; ptr = strchrcxx . . $ strchr(2050848944e00d54).(ptr + 1, ' '))
224 {
225 *ptr = '\0';
226 langs[i] = ptr + 1;
227 i ++;
228 }
229 }
230
231 return (langs);
232 }
233
234
235 /*
236 * 'is_special_option()' - Determine if an option should be grouped.
237 */
238
239 static int /* O - 1 if non-grouped, 0 otherwise */
240 is_special_optioncxx . . $ is_special_option(5c4306d8553b3696).(const char *name) /* I - Option name */
241 {
242 int i = 0;
243 while (special_optionscxx . . $ special_options.[i])
244 {
245 if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(name, special_optionscxx . . $ special_options.[i]) == 0)
246 return 1;
247 i++;
248 }
249 return 0;
250 }
251
252 /*
253 * strlen returns the number of characters. PPD file limitations are
254 * defined in bytes. So we need something to count bytes, not merely
255 * characters.
256 */
257
258 static size_t
259 bytelencxx . . $ bytelen(751346f8406fd082).(const char *buffer)
260 {
261 size_t answer = 0;
262 while (*buffer++ != '\0')
263 answer++;
264 return answer;
265 }
266
267 /*
268 * Use our localization routine to correctly do localization on all
269 * systems. The standard lookup routine has trouble creating multi-locale
270 * files on many systems, and on some systems there's not even a reliable
271 * way to use something other than the system locale.
272 */
273 #ifdef _cxx . . $ `src/cups/i18n.h:28:9`!
274 #undef _cxx . . $ `src/cups/i18n.h:28:9`!
275 #endif
276 #define _cxx . . $ `src/cups/genppd.c:276:9`!(x) stp_i18n_lookup(po, x)
277
278 #define PPD_MAX_SHORT_NICKNAMEcxx . . $ `src/cups/genppd.c:278:9`! (31)
279
280 static void
281 print_ppd_headercxx . . $ print_ppd_header(4059aa2a14d14649).(gpFilecxx . . $ gpFile# fp, ppd_type_tcxx . . $ ppd_type_t# ppd_type, int model, const char *driver,
282 const char *family, const char *long_name,
283 const char *manufacturer, const char *device_id,
284 const char *ppd_location,
285 const char *language, const stp_string_list_tcxx . . $ stp_string_list_t# *po,
286 char **all_langs)
287 {
288 (void)model;
289 (void)family;
290 (void)device_id;
291 (void)ppd_location;
292 (void)all_langs;
293
294 char short_long_name[(PPD_MAX_SHORT_NICKNAMEcxx . . $ `src/cups/genppd.c:278:9`!) + 1];
295 /*
296 * Write a standard header...
297 */
298 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*PPD-Adobe: \"4.3\"\n");
299 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*% PPD file for CUPS/Gutenprint.\n");
300 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*% Copyright 1993-2008 by Mike Sweet and Robert Krawitz.\n");
301 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*% This program is free software; you can redistribute it and/or\n");
302 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*% modify it under the terms of the GNU General Public License,\n");
303 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*% either version 2, or (at your option) any later version,\n");
304 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*% as published by the Free Software Foundation.\n");
305 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*%\n");
306 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*% This program is distributed in the hope that it will be useful, but\n");
307 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n");
308 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n");
309 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*% for more details.\n");
310 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*%\n");
311 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*% You should have received a copy of the GNU General Public License\n");
312 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*% along with this program. If not, see <https://www.gnu.org/licenses/>.\n");
313 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*%\n");
314 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*FormatVersion: \"4.3\"\n");
315 if (use_base_versioncxx . . $ use_base_version.)
316 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*FileVersion: \"" BASE_VERSIONcxx . . $ `<built-in>:412:9`! "\"\n");
317 else
318 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*FileVersion: \"" VERSIONcxx . . $ `config.h:204:9`! "\"\n");
319 /* Specify language of PPD translation */
320 /* TRANSLATORS: Specify the language of the PPD translation.
321 * Use the English name of your language here, e.g. "Swedish" instead of
322 * "Svenska". */
323 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*LanguageVersion: %s\n", _cxx . . $ `src/cups/genppd.c:276:9`!("English"));
324 if (language)
325 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*LanguageEncoding: UTF-8\n");
326 else
327 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*LanguageEncoding: ISOLatin1\n");
328 /*
329 * Strictly speaking, the PCFileName attribute should be a 12 character
330 * max (12345678.ppd) filename, as a requirement of the old PPD spec.
331 * The following code generates a (hopefully unique) 8.3 filename from
332 * the driver name, and makes the filename all UPPERCASE as well...
333 */
334
335 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*PCFileName: \"STP%05d.PPD\"\n",
336 stp_get_printer_index_by_drivercxx . . $ stp_get_printer_index_by_driver(5c4306d8553b3696).(driver) +
337 ((int) ppd_type * stp_printer_model_countcxx . . $ stp_printer_model_count(b126dc7c1de90089).()));
338 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*Manufacturer: \"%s\"\n", manufacturer);
339
340 /*
341 * The Product attribute specifies the string returned by the PostScript
342 * interpreter. The last one will appear in the CUPS "product" field,
343 * while all instances are available as attributes. Rather than listing
344 * the PostScript interpreters we might encounter, we instead just list
345 * a single product line with the "long name" to be compatible with other
346 * CUPS-based drivers. (This is a change from Gutenprint 5.0 and earlier)
347 */
348
349 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*Product: \"(%s)\"\n", long_name);
350
351 /*
352 * The ModelName attribute now provides the long name rather than the
353 * short driver name... The rastertoprinter driver looks up both...
354 */
355
356 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ModelName: \"%s\"\n", long_name);
357 strncpycxx . . $ strncpy(255158a415b673b0).(short_long_name, long_name, PPD_MAX_SHORT_NICKNAMEcxx . . $ `src/cups/genppd.c:278:9`!);
358 short_long_name[PPD_MAX_SHORT_NICKNAMEcxx . . $ `src/cups/genppd.c:278:9`!] = '\0';
359 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ShortNickName: \"%s\"\n", short_long_name);
360
361 /*
362 * NOTE - code in rastertoprinter looks for this version string.
363 * If this is changed, the corresponding change must be made in
364 * rastertoprinter.c. Look for "ppd->nickname"
365 */
366 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*NickName: \"%s%s%s%s\"\n",
367 long_name, CUPS_PPD_NICKNAME_STRINGcxx . . $ `config.h:11:9`!, VERSIONcxx . . $ `config.h:204:9`!,
368 (ppd_type == PPD_SIMPLIFIEDcxx . . $ PPD_SIMPLIFIED. ? " Simplified" :
369 ppd_type == PPD_NO_COLOR_OPTScxx . . $ PPD_NO_COLOR_OPTS. ? " No Color Options" : ""));
370 if (cups_ppd_ps_levelcxx . . $ cups_ppd_ps_level. == 2)
371 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*PSVersion: \"(2017.000) 550\"\n");
372 else
373 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*PSVersion: \"(3010.000) 0\"\n");
374 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*LanguageLevel: \"%d\"\n", cups_ppd_ps_levelcxx . . $ cups_ppd_ps_level.);
375 }
376
377 static void
378 print_ppd_header_3cxx . . $ print_ppd_header_3(4059aa2a14d14649).(gpFilecxx . . $ gpFile# fp, ppd_type_tcxx . . $ ppd_type_t# ppd_type, int model,
379 const char *driver,
380 const char *family, const char *long_name,
381 const char *manufacturer, const char *device_id,
382 const char *ppd_location,
383 const char *language, const stp_string_list_tcxx . . $ stp_string_list_t# *po,
384 char **all_langs)
385 {
386 (void)po;
387 (void)ppd_location;
388 (void)manufacturer;
389 (void)long_name;
390 (void)ppd_type;
391 (void)model;
392 (void)driver;
393 (void)family;
394
395 int i;
396 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*FileSystem: False\n");
397 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*LandscapeOrientation: Plus90\n");
398 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*TTRasterizer: Type42\n");
399
400 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*cupsVersion: 1.2\n");
401
402 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*cupsFilter: \"application/vnd.cups-raster 100 rastertogutenprint.%s\"\n", GUTENPRINT_RELEASE_VERSIONcxx . . $ `config.h:30:9`!);
403
404 if (device_id)
405 {
406 if (strlencxx . . $ strlen(751346f8406fd082).(device_id) > 200)
407 {
408 char buf[129];
409 int bytes_left = strlencxx . . $ strlen(751346f8406fd082).(device_id);
410 int offset = 0;
411 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*1284DeviceID: \"");
412 while (bytes_left > 0)
413 {
414 memsetcxx . . $ memset(d1de1e4fb215f1c6).(buf, 0, 129);
415 strncpycxx . . $ strncpy(255158a415b673b0).(buf, device_id + offset, 128);
416 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, buf);
417 if (bytes_left <= 128)
418 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "\"");
419 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "\n");
420 offset += 128;
421 bytes_left -= 128;
422 }
423 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*End\n");
424 }
425 else
426 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*1284DeviceID: \"%s\"\n", device_id);
427 }
428 if (!language)
429 {
430 /*
431 * Generate globalized PPDs when POSIX language is requested...
432 */
433
434 const char *prefix = "*cupsLanguages: \"";
435
436 for (i = 0; all_langs[i]; i ++)
437 {
438 if (!strcmpcxx . . $ strcmp(5ae29d726ae57f88).(all_langs[i], "C") || !strcmpcxx . . $ strcmp(5ae29d726ae57f88).(all_langs[i], "en"))
439 continue;
440
441 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "%s%s", prefix, all_langs[i]);
442 prefix = " ";
443 }
444
445 if (!strcmpcxx . . $ strcmp(5ae29d726ae57f88).(prefix, " "))
446 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "\"\n");
447 }
448 }
449
450 static void
451 print_ppd_header_2cxx . . $ print_ppd_header_2(4059aa2a14d14649).(gpFilecxx . . $ gpFile# fp, ppd_type_tcxx . . $ ppd_type_t# ppd_type, int model, const char *driver,
452 const char *family, const char *long_name,
453 const char *manufacturer, const char *device_id,
454 const char *ppd_location,
455 const char *language, const stp_string_list_tcxx . . $ stp_string_list_t# *po,
456 char **all_langs)
457 {
458 (void)po;
459 (void)all_langs;
460 (void)device_id;
461 (void)manufacturer;
462 (void)long_name;
463 (void)ppd_type;
464
465 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDriverName: \"%s\"\n", driver);
466 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDriverModelFamily: \"%d_%s\"\n", model, family);
467 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpPPDLocation: \"%s\"\n", ppd_location);
468 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpLocale: \"%s\"\n", language ? language : "C");
469 }
470
471 static void
472 print_page_sizescxx . . $ print_page_sizes(e21d8311195aed55).(gpFilecxx . . $ gpFile# fp, stp_vars_tcxx . . $ stp_vars_t# *v, int simplified,
473 const stp_string_list_tcxx . . $ stp_string_list_t# *po)
474 {
475 int variable_sizes = 0;
476 stp_parameter_tcxx . . $ stp_parameter_t# desc;
477 int num_opts;
478 paper_tcxx . . $ paper_t# *the_papers;
479 int i;
480 stp_dimension_tcxx . . $ stp_dimension_t# width, height, /* Page information */
481 bottom, left,
482 top, right;
483 stp_dimension_tcxx . . $ stp_dimension_t# min_width, /* Min/max custom size */
484 min_height,
485 max_width,
486 max_height;
487 const stp_param_string_tcxx . . $ stp_param_string_t# *opt;
488 int cur_opt = 0;
489
490 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "PageSize", &desc);
491 num_opts = stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.);
492 the_papers = stp_malloccxx . . $ stp_malloc(bfcfa4d6b7f7ef64).(sizeof(paper_tcxx . . $ paper_t#) * num_opts);
493 for (i = 0; i < num_opts; i++)
494 {
495 const stp_papersize_tcxx . . $ stp_papersize_t# *papersize;
496 opt = stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., i);
497 if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., "Custom") == 0)
498 {
499 variable_sizes = 1;
500 continue;
501 }
502
503 papersize = stp_describe_papersizecxx . . $ stp_describe_papersize(977e5bf217e59ec).(v, opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.);
504
505 if (!papersize)
506 {
507 printfcxx . . $ printf(581fddd72a8db8fc).("Unable to lookup size %s!\n", opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.);
508 continue;
509 }
510
511 if (simplified && num_opts >= 10 &&
512 (!desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str. || strcmpcxx . . $ strcmp(5ae29d726ae57f88).(opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.) != 0) &&
513 (papersize->paper_unitcxx . . $ $anonymous_type_51fd7f0ef3c7bff0_2#paper_unit. == PAPERSIZE_ENGLISH_EXTENDEDcxx . . $ PAPERSIZE_ENGLISH_EXTENDED. ||
514 papersize->paper_unitcxx . . $ $anonymous_type_51fd7f0ef3c7bff0_2#paper_unit. == PAPERSIZE_METRIC_EXTENDEDcxx . . $ PAPERSIZE_METRIC_EXTENDED.))
515 continue;
516
517 if (papersize->widthcxx . . $ $anonymous_type_51fd7f0ef3c7bff0_2#width. <= 0 || papersize->heightcxx . . $ $anonymous_type_51fd7f0ef3c7bff0_2#height. <= 0)
518 continue;
519
520 width = papersize->widthcxx . . $ $anonymous_type_51fd7f0ef3c7bff0_2#width.;
521 height = papersize->heightcxx . . $ $anonymous_type_51fd7f0ef3c7bff0_2#height.;
522
523 stp_set_string_parametercxx . . $ stp_set_string_parameter(7405204ff890c7b8).(v, "PageSize", opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.);
524
525 stp_get_media_sizecxx . . $ stp_get_media_size(2eafa46ec96dc268).(v, &width, &height);
526 stp_get_maximum_imageable_areacxx . . $ stp_get_maximum_imageable_area(25e50967534aa153).(v, &left, &right, &bottom, &top);
527
528 if (left < 0)
529 left = 0;
530 if (right > width)
531 right = width;
532 if (bottom > height)
533 bottom = height;
534 if (top < 0)
535 top = 0;
536
537 the_papers[cur_opt].namecxx . . $ $anonymous_type_d2bfadd67790c745_0#name. = opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.;
538 the_papers[cur_opt].textcxx . . $ $anonymous_type_d2bfadd67790c745_0#text. = stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.);
539 the_papers[cur_opt].widthcxx . . $ $anonymous_type_d2bfadd67790c745_0#width. = width;
540 the_papers[cur_opt].heightcxx . . $ $anonymous_type_d2bfadd67790c745_0#height. = height;
541 the_papers[cur_opt].leftcxx . . $ $anonymous_type_d2bfadd67790c745_0#left. = left;
542 the_papers[cur_opt].rightcxx . . $ $anonymous_type_d2bfadd67790c745_0#right. = right;
543 the_papers[cur_opt].bottomcxx . . $ $anonymous_type_d2bfadd67790c745_0#bottom. = height - bottom;
544 the_papers[cur_opt].topcxx . . $ $anonymous_type_d2bfadd67790c745_0#top. = height - top;
545
546 cur_opt++;
547 stp_clear_string_parametercxx . . $ stp_clear_string_parameter(f1526d77388867f8).(v, "PageSize");
548 }
549
550 /*
551 * The VariablePaperSize attribute is obsolete, however some popular
552 * applications still look for it to provide custom page size support.
553 */
554
555 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*VariablePaperSize: %s\n\n", variable_sizes ? "true" : "false");
556
557 if (stp_parameter_has_category_valuecxx . . $ stp_parameter_has_category_value(d2d6b47631715960).(v, &desc, "Color", "Yes"))
558 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*ColorKeyWords: \"PageSize\"\n");
559 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OpenUI *PageSize/%s: PickOne\n", _cxx . . $ `src/cups/genppd.c:276:9`!("Media Size"));
560 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OPOptionHints PageSize: \"dropdown\"\n");
561 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OrderDependency: 10 AnySetup *PageSize\n");
562 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpStp%s: %d %d %d %d %d %.3f %.3f %.3f\n",
563 desc.namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type., desc.is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory.,
564 desc.p_classcxx . . $ $anonymous_type_c987533f3b833c82_8#p_class., desc.p_levelcxx . . $ $anonymous_type_c987533f3b833c82_8#p_level., desc.channelcxx . . $ $anonymous_type_c987533f3b833c82_8#channel., 0.0, 0.0, 0.0);
565 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultPageSize: %s\n", desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
566 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultPageSize: %s\n", desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
567 for (i = 0; i < cur_opt; i ++)
568 {
569 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*PageSize %s", the_papers[i].namecxx . . $ $anonymous_type_d2bfadd67790c745_0#name.);
570 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "/%s:\t\"<</PageSize[%.3f %.3f]/ImagingBBox null>>setpagedevice\"\n",
571 the_papers[i].textcxx . . $ $anonymous_type_d2bfadd67790c745_0#text., the_papers[i].widthcxx . . $ $anonymous_type_d2bfadd67790c745_0#width., the_papers[i].heightcxx . . $ $anonymous_type_d2bfadd67790c745_0#height.);
572 }
573 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*CloseUI: *PageSize\n\n");
574
575 if (stp_parameter_has_category_valuecxx . . $ stp_parameter_has_category_value(d2d6b47631715960).(v, &desc, "Color", "Yes"))
576 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*ColorKeyWords: \"PageRegion\"\n");
577 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OpenUI *PageRegion/%s: PickOne\n", _cxx . . $ `src/cups/genppd.c:276:9`!("Media Size"));
578 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OPOptionHints PageRegion: \"dropdown\"\n");
579 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OrderDependency: 10 AnySetup *PageRegion\n");
580 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultPageRegion: %s\n", desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
581 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultPageRegion: %s\n", desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
582 for (i = 0; i < cur_opt; i ++)
583 {
584 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*PageRegion %s", the_papers[i].namecxx . . $ $anonymous_type_d2bfadd67790c745_0#name.);
585 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "/%s:\t\"<</PageSize[%.3f %.3f]/ImagingBBox null>>setpagedevice\"\n",
586 the_papers[i].textcxx . . $ $anonymous_type_d2bfadd67790c745_0#text., the_papers[i].widthcxx . . $ $anonymous_type_d2bfadd67790c745_0#width., the_papers[i].heightcxx . . $ $anonymous_type_d2bfadd67790c745_0#height.);
587 }
588 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*CloseUI: *PageRegion\n\n");
589
590 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultImageableArea: %s\n", desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
591 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultImageableArea: %s\n", desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
592 for (i = 0; i < cur_opt; i ++)
593 {
594 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ImageableArea %s", the_papers[i].namecxx . . $ $anonymous_type_d2bfadd67790c745_0#name.);
595 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "/%s:\t\"%.3f %.3f %.3f %.3f\"\n", the_papers[i].textcxx . . $ $anonymous_type_d2bfadd67790c745_0#text.,
596 the_papers[i].leftcxx . . $ $anonymous_type_d2bfadd67790c745_0#left., the_papers[i].bottomcxx . . $ $anonymous_type_d2bfadd67790c745_0#bottom.,
597 the_papers[i].rightcxx . . $ $anonymous_type_d2bfadd67790c745_0#right., the_papers[i].topcxx . . $ $anonymous_type_d2bfadd67790c745_0#top.);
598 }
599 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "\n");
600
601 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultPaperDimension: %s\n", desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
602 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultPaperDimension: %s\n", desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
603
604 for (i = 0; i < cur_opt; i ++)
605 {
606 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*PaperDimension %s", the_papers[i].namecxx . . $ $anonymous_type_d2bfadd67790c745_0#name.);
607 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "/%s:\t\"%.3f %.3f\"\n",
608 the_papers[i].textcxx . . $ $anonymous_type_d2bfadd67790c745_0#text., the_papers[i].widthcxx . . $ $anonymous_type_d2bfadd67790c745_0#width., the_papers[i].heightcxx . . $ $anonymous_type_d2bfadd67790c745_0#height.);
609 }
610 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "\n");
611
612 if (variable_sizes)
613 {
614 stp_get_size_limitcxx . . $ stp_get_size_limit(25e50967534aa153).(v, &max_width, &max_height, &min_width, &min_height);
615 stp_set_string_parametercxx . . $ stp_set_string_parameter(7405204ff890c7b8).(v, "PageSize", "Custom");
616 stp_get_media_sizecxx . . $ stp_get_media_size(2eafa46ec96dc268).(v, &width, &height);
617 stp_get_maximum_imageable_areacxx . . $ stp_get_maximum_imageable_area(25e50967534aa153).(v, &left, &right, &bottom, &top);
618 if (left < 0)
619 left = 0;
620 if (top < 0)
621 top = 0;
622 if (bottom > height)
623 bottom = height;
624 if (right > width)
625 width = right;
626
627 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*MaxMediaWidth: \"%.3f\"\n", max_width);
628 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*MaxMediaHeight: \"%.3f\"\n", max_height);
629 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*HWMargins: %.3f %.3f %.3f %.3f\n",
630 left, height - bottom, width - right, top);
631 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*CustomPageSize True: \"pop pop pop <</PageSize[5 -2 roll]/ImagingBBox null>>setpagedevice\"\n");
632 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ParamCustomPageSize Width: 1 points %.3f %.3f\n",
633 min_width, max_width);
634 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ParamCustomPageSize Height: 2 points %.3f %.3f\n",
635 min_height, max_height);
636 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*ParamCustomPageSize WidthOffset: 3 points 0 0\n");
637 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*ParamCustomPageSize HeightOffset: 4 points 0 0\n");
638 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*ParamCustomPageSize Orientation: 5 int 0 0\n\n");
639 stp_clear_string_parametercxx . . $ stp_clear_string_parameter(f1526d77388867f8).(v, "PageSize");
640 }
641
642 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
643 if (the_papers)
644 stp_freecxx . . $ stp_free(5d22bdacc48458e8).(the_papers);
645 }
646
647 static void
648 print_color_setupcxx . . $ print_color_setup(369eb896502a1ef1).(gpFilecxx . . $ gpFile# fp, int simplified, int printer_is_color,
649 const stp_string_list_tcxx . . $ stp_string_list_t# *po)
650 {
651 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*ColorKeyWords: \"ColorModel\"\n");
652 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OpenUI *ColorModel/%s: PickOne\n", _cxx . . $ `src/cups/genppd.c:276:9`!("Color Model"));
653 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OPOptionHints ColorModel: \"radiobuttons\"\n");
654 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OrderDependency: 2 AnySetup *ColorModel\n");
655
656 if (printer_is_color)
657 {
658 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*DefaultColorModel: RGB\n");
659 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*StpDefaultColorModel: RGB\n");
660 }
661 else
662 {
663 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*DefaultColorModel: Gray\n");
664 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*StpDefaultColorModel: Gray\n");
665 }
666
667 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ColorModel Gray/%s:\t\"<<"
668 "/cupsColorSpace %d"
669 "/cupsColorOrder %d"
670 "%s"
671 ">>setpagedevice\"\n",
672 _cxx . . $ `src/cups/genppd.c:276:9`!("Grayscale"), CUPS_CSPACE_Wcxx . . $ CUPS_CSPACE_W., CUPS_ORDER_CHUNKEDcxx . . $ CUPS_ORDER_CHUNKED.,
673 simplified ? "/cupsBitsPerColor 8/cupsPreferredBitsPerColor 16" : "");
674 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ColorModel Black/%s:\t\"<<"
675 "/cupsColorSpace %d"
676 "/cupsColorOrder %d"
677 "%s"
678 ">>setpagedevice\"\n",
679 _cxx . . $ `src/cups/genppd.c:276:9`!("Inverted Grayscale"), CUPS_CSPACE_Kcxx . . $ CUPS_CSPACE_K., CUPS_ORDER_CHUNKEDcxx . . $ CUPS_ORDER_CHUNKED.,
680 simplified ? "/cupsBitsPerColor 8/cupsPreferredBitsPerColor 16" : "");
681
682 if (printer_is_color)
683 {
684 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ColorModel RGB/%s:\t\"<<"
685 "/cupsColorSpace %d"
686 "/cupsColorOrder %d"
687 "%s"
688 ">>setpagedevice\"\n",
689 _cxx . . $ `src/cups/genppd.c:276:9`!("RGB Color"), CUPS_CSPACE_RGBcxx . . $ CUPS_CSPACE_RGB., CUPS_ORDER_CHUNKEDcxx . . $ CUPS_ORDER_CHUNKED.,
690 simplified ? "/cupsBitsPerColor 8/cupsPreferredBitsPerColor 16" : "");
691 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ColorModel CMY/%s:\t\"<<"
692 "/cupsColorSpace %d"
693 "/cupsColorOrder %d"
694 "%s"
695 ">>setpagedevice\"\n",
696 _cxx . . $ `src/cups/genppd.c:276:9`!("CMY Color"), CUPS_CSPACE_CMYcxx . . $ CUPS_CSPACE_CMY., CUPS_ORDER_CHUNKEDcxx . . $ CUPS_ORDER_CHUNKED.,
697 simplified ? "/cupsBitsPerColor 8/cupsPreferredBitsPerColor 16" : "");
698 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ColorModel CMYK/%s:\t\"<<"
699 "/cupsColorSpace %d"
700 "/cupsColorOrder %d"
701 "%s"
702 ">>setpagedevice\"\n",
703 _cxx . . $ `src/cups/genppd.c:276:9`!("CMYK"), CUPS_CSPACE_CMYKcxx . . $ CUPS_CSPACE_CMYK., CUPS_ORDER_CHUNKEDcxx . . $ CUPS_ORDER_CHUNKED.,
704 simplified ? "/cupsBitsPerColor 8/cupsPreferredBitsPerColor 16" : "");
705 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ColorModel KCMY/%s:\t\"<<"
706 "/cupsColorSpace %d"
707 "/cupsColorOrder %d"
708 "%s"
709 ">>setpagedevice\"\n",
710 _cxx . . $ `src/cups/genppd.c:276:9`!("KCMY"), CUPS_CSPACE_KCMYcxx . . $ CUPS_CSPACE_KCMY., CUPS_ORDER_CHUNKEDcxx . . $ CUPS_ORDER_CHUNKED.,
711 simplified ? "/cupsBitsPerColor 8/cupsPreferredBitsPerColor 16" : "");
712 }
713
714 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*CloseUI: *ColorModel\n\n");
715 if (!simplified)
716 {
717 /*
718 * 8 or 16 bit color (16 bit is slower)
719 */
720 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*ColorKeyWords: \"StpColorPrecision\"\n");
721 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OpenUI *StpColorPrecision/%s: PickOne\n", _cxx . . $ `src/cups/genppd.c:276:9`!("Color Precision"));
722 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OPOptionHints StpColorPrecision: \"radiobuttons\"\n");
723 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OrderDependency: 1 AnySetup *StpColorPrecision\n");
724 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*DefaultStpColorPrecision: Normal\n");
725 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*StpDefaultStpColorPrecision: Normal\n");
726 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpColorPrecision Normal/%s:\t\"<<"
727 "/cupsBitsPerColor 8>>setpagedevice\"\n", _cxx . . $ `src/cups/genppd.c:276:9`!("Normal"));
728 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpColorPrecision Best/%s:\t\"<<"
729 "/cupsBitsPerColor 8"
730 "/cupsPreferredBitsPerColor 16>>setpagedevice\"\n", _cxx . . $ `src/cups/genppd.c:276:9`!("Best"));
731 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*CloseUI: *StpColorPrecision\n\n");
732 }
733 }
734
735 static int
736 fix_utf8cxx . . $ fix_utf8(b6d9217c5e0a83f0).(char *buf, size_t len)
737 {
738 char *b = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
739
740 /* Might truncate up to 3 bytes*/
741 b = buf + len - 3;
742
743 /* Is the last byte part of multi-byte sequence? */
744 if (b[2] & 0x80)
745 {
746 /*Is the last byte in buffer the first byte in a new
747 * multi-byte sequence? */
748 if (b[2] & 0x40) return len - 1;
749 /* Is it a 3 byte sequence? */
750 else if ((b[1] & 0xe0) == 0xe0) return len - 2;
751 /* Is it a 4 byte sequence? */
752 else if ((b[0] & 0xf0) == 0xf0) return len - 3;
753 }
754 return len;
755 }
756
757 static void
758 print_groupcxx . . $ print_group(dab9546acb310af8).(
759 gpFilecxx . . $ gpFile# fp, /* I - File to write to */
760 const char *what,
761 stp_parameter_class_tcxx . . $ stp_parameter_class_t# p_class, /* I - Option class */
762 stp_parameter_level_tcxx . . $ stp_parameter_level_t# p_level, /* I - Option level */
763 const char *language, /* I - Language */
764 const stp_string_list_tcxx . . $ stp_string_list_t# *po) /* I - Message catalog */
765 {
766 char buf[64];
767 const char *class = stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, parameter_class_namescxx . . $ parameter_class_names.[p_class]);
768 const char *level = stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, parameter_level_namescxx . . $ parameter_level_names.[p_level]);
769 size_t bytes = bytelencxx . . $ bytelen(751346f8406fd082).(class) + bytelencxx . . $ bytelen(751346f8406fd082).(level);
770
771 snprintfcxx . . $ snprintf(ea502d73e74c754c).(buf, 40, "%s%s%s", class, bytes < 39 ? " " : "", level);
772 buf[fix_utf8cxx . . $ fix_utf8(b6d9217c5e0a83f0).(buf, strlencxx . . $ strlen(751346f8406fd082).(buf))] = 0;
773
774 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%sGroup: C%dL%d/%s\n", what, p_class, p_level, buf);
775 if (language && !strcmpcxx . . $ strcmp(5ae29d726ae57f88).(language, "C") && !strcmpcxx . . $ strcmp(5ae29d726ae57f88).(what, "Open"))
776 {
777 char **all_langs = getlangscxx . . $ getlangs(de5739791ae7584).();/* All languages */
778 const char *lang;
779 int langnum;
780
781 for (langnum = 0; all_langs[langnum]; langnum ++)
782 {
783 const stp_string_list_tcxx . . $ stp_string_list_t# *altpo;
784
785 lang = all_langs[langnum];
786
787 if (!strcmpcxx . . $ strcmp(5ae29d726ae57f88).(lang, "C") || !strcmpcxx . . $ strcmp(5ae29d726ae57f88).(lang, "en"))
788 continue;
789 if ((altpo = stp_i18n_loadcxx . . $ stp_i18n_load(f2f2e30b05a373a0).(lang)) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
790 {
791 class = stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(altpo, parameter_class_namescxx . . $ parameter_class_names.[p_class]);
792 level = stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(altpo, parameter_level_namescxx . . $ parameter_level_names.[p_level]);
793 bytes = bytelencxx . . $ bytelen(751346f8406fd082).(class) + bytelencxx . . $ bytelen(751346f8406fd082).(level);
794 snprintfcxx . . $ snprintf(ea502d73e74c754c).(buf, 40, "%s%s%s", class, bytes < 39 ? " " : "", level);
795 buf[fix_utf8cxx . . $ fix_utf8(b6d9217c5e0a83f0).(buf, strlencxx . . $ strlen(751346f8406fd082).(buf))] = 0;
796 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Translation C%dL%d/%s: \"\"\n",
797 lang, p_class, p_level, buf);
798 }
799 }
800 }
801 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "\n");
802 }
803
804 /*
805 * 'print_group_close()' - Close a UI group.
806 */
807
808 static void
809 print_group_closecxx . . $ print_group_close(f809d5d9c0465c7f).(
810 gpFilecxx . . $ gpFile# fp, /* I - File to write to */
811 stp_parameter_class_tcxx . . $ stp_parameter_class_t# p_class, /* I - Option class */
812 stp_parameter_level_tcxx . . $ stp_parameter_level_t# p_level, /* I - Option level */
813 const char *language, /* I - language */
814 const stp_string_list_tcxx . . $ stp_string_list_t# *po) /* I - Message catalog */
815 {
816 (void)po;
817 (void)language;
818 print_groupcxx . . $ print_group(dab9546acb310af8).(fp, "Close", p_class, p_level, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
819 }
820
821
822 /*
823 * 'print_group_open()' - Open a new UI group.
824 */
825
826 static void
827 print_group_opencxx . . $ print_group_open(f809d5d9c0465c7f).(
828 gpFilecxx . . $ gpFile# fp, /* I - File to write to */
829 stp_parameter_class_tcxx . . $ stp_parameter_class_t# p_class, /* I - Option class */
830 stp_parameter_level_tcxx . . $ stp_parameter_level_t# p_level, /* I - Option level */
831 const char *language, /* I - language */
832 const stp_string_list_tcxx . . $ stp_string_list_t# *po) /* I - Message catalog */
833 {
834 print_groupcxx . . $ print_group(dab9546acb310af8).(fp, "Open", p_class, p_level, language ? language : "C", po);
835 }
836
837 static void
838 print_one_optioncxx . . $ print_one_option(3ae19822ef124b4d).(gpFilecxx . . $ gpFile# fp, stp_vars_tcxx . . $ stp_vars_t# *v, const stp_string_list_tcxx . . $ stp_string_list_t# *po,
839 ppd_type_tcxx . . $ ppd_type_t# ppd_type, const stp_parameter_tcxx . . $ stp_parameter_t# *lparam,
840 const stp_parameter_tcxx . . $ stp_parameter_t# *desc)
841 {
842 int num_opts;
843 int i;
844 const stp_param_string_tcxx . . $ stp_param_string_t# *opt;
845 int printed_default_value = 0;
846 int simplified = ppd_type == PPD_SIMPLIFIEDcxx . . $ PPD_SIMPLIFIED.;
847 char dimstr[255]; /* Dimension string */
848 int print_close_ui = 1;
849 int is_color_opt = stp_parameter_has_category_valuecxx . . $ stp_parameter_has_category_value(d2d6b47631715960).(v, desc, "Color", "Yes");
850 int skip_color = (ppd_type == PPD_NO_COLOR_OPTScxx . . $ PPD_NO_COLOR_OPTS. && is_color_opt);
851 if (is_color_opt)
852 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ColorKeyWords: \"Stp%s\"\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
853
854 #ifndef FULL_RAW
855 if (desc->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. != STP_PARAMETER_TYPE_RAWcxx . . $ STP_PARAMETER_TYPE_RAW.)
856 {
857 #endif
858 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OpenUI *Stp%s/%s: PickOne\n",
859 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, desc->textcxx . . $ $anonymous_type_c987533f3b833c82_8#text.));
860 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OrderDependency: 10 AnySetup *Stp%s\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
861 #ifndef FULL_RAW
862 }
863 #endif
864 switch (desc->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type.)
865 {
866 case STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST.:
867 num_opts = stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.);
868 if (! skip_color)
869 {
870 if (num_opts > 3)
871 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OPOptionHints Stp%s: \"dropdown\"\n", lparam->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
872 else
873 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OPOptionHints Stp%s: \"radiobuttons\"\n", lparam->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
874 }
875 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpStp%s: %d %d %d %d %d %.3f %.3f %.3f\n",
876 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., desc->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type., desc->is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory., desc->p_classcxx . . $ $anonymous_type_c987533f3b833c82_8#p_class.,
877 desc->p_levelcxx . . $ $anonymous_type_c987533f3b833c82_8#p_level., desc->channelcxx . . $ $anonymous_type_c987533f3b833c82_8#channel., 0.0, 0.0, 0.0);
878 if (desc->is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory.)
879 {
880 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultStp%s: %s\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
881 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultStp%s: %s\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
882 }
883 else
884 {
885 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultStp%s: None\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
886 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultStp%s: None\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
887 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*Stp%s %s/%s: \"\"\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., "None", _cxx . . $ `src/cups/genppd.c:276:9`!("None"));
888 }
889 for (i = 0; i < num_opts; i++)
890 {
891 opt = stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., i);
892 if (skip_color && strcmpcxx . . $ strcmp(5ae29d726ae57f88).(opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.) != 0)
893 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*?Stp%s %s/%s: \"\"\n",
894 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.));
895 else
896 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*Stp%s %s/%s: \"\"\n",
897 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.));
898 }
899 break;
900 case STP_PARAMETER_TYPE_RAWcxx . . $ STP_PARAMETER_TYPE_RAW.:
901 print_close_ui = 0;
902 #ifdef FULL_RAW /* XXX not sure if the standalone Custom... bit is sufficient */
903 gpprintf(fp, "*StpStp%s: %d %d %d %d %d %.3f %.3f %.3f\n",
904 desc->name, desc->p_type, desc->is_mandatory, desc->p_class,
905 desc->p_level, desc->channel, 0.0, 0.0, 0.0);
906 gpprintf(fp, "*DefaultStp%s: None\n", desc->name);
907 gpprintf(fp, "*StpDefaultStp%s: None\n", desc->name);
908 gpprintf(fp, "*Stp%s %s/%s: \"\"\n", desc->name, "None", _("None"));
909 gpprintf(fp, "*CloseUI: *Stp%s\n", desc->name);
910 #endif
911 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*CustomStp%s True: \"pop\"\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
912 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ParamCustomStp%s Text/%s: 1 string %d %d\n\n",
913 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., _cxx . . $ `src/cups/genppd.c:276:9`!("Text"), 0, 0);
914
915 break;
916 case STP_PARAMETER_TYPE_BOOLEANcxx . . $ STP_PARAMETER_TYPE_BOOLEAN.:
917 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OPOptionHints Stp%s: \"checkbox\"\n", lparam->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
918 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpStp%s: %d %d %d %d %d %.3f %.3f %.3f\n",
919 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., desc->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type., desc->is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory., desc->p_classcxx . . $ $anonymous_type_c987533f3b833c82_8#p_class.,
920 desc->p_levelcxx . . $ $anonymous_type_c987533f3b833c82_8#p_level., desc->channelcxx . . $ $anonymous_type_c987533f3b833c82_8#channel., 0.0, 0.0,
921 desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..booleancxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#boolean. ? 1.0 : 0.0);
922 if (desc->is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory.)
923 {
924 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultStp%s: %s\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.,
925 desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..booleancxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#boolean. ? "True" : "False");
926 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultStp%s: %s\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.,
927 desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..booleancxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#boolean. ? "True" : "False");
928 if (skip_color)
929 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*Stp%s %s/%s: \"\"\n",
930 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..booleancxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#boolean. ? "True" : "False",
931 desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..booleancxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#boolean. ? _cxx . . $ `src/cups/genppd.c:276:9`!("Yes") : _cxx . . $ `src/cups/genppd.c:276:9`!("No"));
932 }
933 else
934 {
935 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultStp%s: None\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
936 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultStp%s: None\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
937 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*Stp%s %s/%s: \"\"\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., "None", _cxx . . $ `src/cups/genppd.c:276:9`!("None"));
938 }
939 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%sStp%s %s/%s: \"\"\n",
940 (skip_color ? "?" : ""), desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., "False", _cxx . . $ `src/cups/genppd.c:276:9`!("No"));
941 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%sStp%s %s/%s: \"\"\n",
942 (skip_color ? "?" : ""), desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., "True", _cxx . . $ `src/cups/genppd.c:276:9`!("Yes"));
943 break;
944 case STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE.:
945 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OPOptionHints Stp%s: \"slider input spinbox\"\n",
946 lparam->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
947 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpStp%s: %d %d %d %d %d %.3f %.3f %.3f\n",
948 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., desc->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type., desc->is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory., desc->p_classcxx . . $ $anonymous_type_c987533f3b833c82_8#p_class.,
949 desc->p_levelcxx . . $ $anonymous_type_c987533f3b833c82_8#p_level., desc->channelcxx . . $ $anonymous_type_c987533f3b833c82_8#channel., desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dbl..lowercxx . . $ $anonymous_type_c987533f3b833c82_5#lower.,
950 desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dbl..uppercxx . . $ $anonymous_type_c987533f3b833c82_5#upper., desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#dbl.);
951 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultStp%s: None\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
952 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultStp%s: None\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
953 if (!skip_color)
954 {
955 for (i = desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dbl..lowercxx . . $ $anonymous_type_c987533f3b833c82_5#lower. * 1000;
956 i <= desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dbl..uppercxx . . $ $anonymous_type_c987533f3b833c82_5#upper. * 1000 ; i += 100)
957 {
958 if (desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#dbl. * 1000 == i && desc->is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory.)
959 {
960 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*Stp%s None/%.3f: \"\"\n",
961 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., ((double) i) * .001);
962 printed_default_value = 1;
963 }
964 else
965 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*Stp%s %d/%.3f: \"\"\n",
966 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., i, ((double) i) * .001);
967 }
968 }
969 if (!desc->is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory.)
970 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*Stp%s None/%s: \"\"\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., _cxx . . $ `src/cups/genppd.c:276:9`!("None"));
971 else if (! printed_default_value)
972 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*Stp%s None/%.3f: \"\"\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#dbl.);
973 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*CloseUI: *Stp%s\n\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
974
975 /*
976 * Add custom option code and value parameter...
977 */
978
979 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*CustomStp%s True: \"pop\"\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
980 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ParamCustomStp%s Value/%s: 1 real %.3f %.3f\n\n",
981 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., _cxx . . $ `src/cups/genppd.c:276:9`!("Value"), desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dbl..lowercxx . . $ $anonymous_type_c987533f3b833c82_5#lower.,
982 desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dbl..uppercxx . . $ $anonymous_type_c987533f3b833c82_5#upper.);
983 if (!simplified && !skip_color)
984 {
985 if (is_color_opt)
986 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ColorKeyWords: \"StpFine%s\"\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
987 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OpenUI *StpFine%s/%s %s: PickOne\n",
988 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, desc->textcxx . . $ $anonymous_type_c987533f3b833c82_8#text.),
989 _cxx . . $ `src/cups/genppd.c:276:9`!("Fine Adjustment"));
990 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OPOptionHints StpFine%s: \"hide\"\n", lparam->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
991 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpStpFine%s: %d %d %d %d %d %.3f %.3f %.3f\n",
992 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., STP_PARAMETER_TYPE_INVALIDcxx . . $ STP_PARAMETER_TYPE_INVALID., 0,
993 0, 0, -1, 0.0, 0.0, 0.0);
994 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultStpFine%s: None\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
995 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultStpFine%s: None\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
996 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpFine%s None/0.000: \"\"\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
997 for (i = 0; i < 100; i += 5)
998 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpFine%s %d/%.3f: \"\"\n",
999 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., i, ((double) i) * .001);
1000 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*CloseUI: *StpFine%s\n\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
1001 }
1002 print_close_ui = 0;
1003
1004 break;
1005 case STP_PARAMETER_TYPE_DIMENSIONcxx . . $ STP_PARAMETER_TYPE_DIMENSION.:
1006 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OPOptionHints Stp%s: \"length slider input spinbox\"\n",
1007 lparam->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
1008 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpStp%s: %d %d %d %d %d %.3f %.3f %.3f\n",
1009 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., desc->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type., desc->is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory.,
1010 desc->p_classcxx . . $ $anonymous_type_c987533f3b833c82_8#p_class., desc->p_levelcxx . . $ $anonymous_type_c987533f3b833c82_8#p_level., desc->channelcxx . . $ $anonymous_type_c987533f3b833c82_8#channel.,
1011 desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dimensioncxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dimension..lowercxx . . $ $anonymous_type_c987533f3b833c82_7#lower.,
1012 desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dimensioncxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dimension..uppercxx . . $ $anonymous_type_c987533f3b833c82_7#upper.,
1013 desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..dimensioncxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#dimension.);
1014 if (desc->is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory.)
1015 {
1016 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultStp%s: %d\n",
1017 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., (int) desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..dimensioncxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#dimension.);
1018 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultStp%s: %d\n",
1019 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., (int) desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..dimensioncxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#dimension.);
1020 }
1021 else
1022 {
1023 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultStp%s: None\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
1024 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultStp%s: None\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
1025 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*Stp%s %s/%s: \"\"\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., "None", _cxx . . $ `src/cups/genppd.c:276:9`!("None"));
1026 }
1027 if (!skip_color)
1028 {
1029 for (i = (int) desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dimensioncxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dimension..lowercxx . . $ $anonymous_type_c987533f3b833c82_7#lower.;
1030 i <= (int) desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dimensioncxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dimension..uppercxx . . $ $anonymous_type_c987533f3b833c82_7#upper.; i++)
1031 {
1032 snprintfcxx . . $ snprintf(ea502d73e74c754c).(dimstr, sizeof(dimstr), _cxx . . $ `src/cups/genppd.c:276:9`!("%.1f mm"),
1033 (double)i * 25.4 / 72.0);
1034 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*Stp%s %d/%s: \"\"\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., i, dimstr);
1035 }
1036 }
1037
1038 print_close_ui = 0;
1039 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*CloseUI: *Stp%s\n\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
1040
1041 #ifndef __APPLE__ /* This leads to outright _crashes_ on apple platforms */
1042 /*
1043 * Add custom option code and value parameter...
1044 */
1045
1046 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*CustomStp%s True: \"pop\"\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
1047 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ParamCustomStp%s Value/%s: 1 points %d %d\n\n",
1048 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., _cxx . . $ `src/cups/genppd.c:276:9`!("Value"), (int) desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dimensioncxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dimension..lowercxx . . $ $anonymous_type_c987533f3b833c82_7#lower.,
1049 (int) desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dimensioncxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dimension..uppercxx . . $ $anonymous_type_c987533f3b833c82_7#upper.);
1050 #endif
1051 break;
1052 case STP_PARAMETER_TYPE_INTcxx . . $ STP_PARAMETER_TYPE_INT.:
1053 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OPOptionHints Stp%s: \"input spinbox\"\n", lparam->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
1054 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpStp%s: %d %d %d %d %d %.3f %.3f %.3f\n",
1055 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., desc->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type., desc->is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory., desc->p_classcxx . . $ $anonymous_type_c987533f3b833c82_8#p_class.,
1056 desc->p_levelcxx . . $ $anonymous_type_c987533f3b833c82_8#p_level., desc->channelcxx . . $ $anonymous_type_c987533f3b833c82_8#channel.,
1057 (double) desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#integer..lowercxx . . $ $anonymous_type_c987533f3b833c82_6#lower.,
1058 (double) desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#integer..uppercxx . . $ $anonymous_type_c987533f3b833c82_6#upper.,
1059 (double) desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#integer.);
1060 if (desc->is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory.)
1061 {
1062 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultStp%s: %d\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#integer.);
1063 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultStp%s: %d\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#integer.);
1064 if (skip_color)
1065 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*Stp%s %d/%d: \"\"\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.,
1066 desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#integer., desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#integer.);
1067 }
1068 else
1069 {
1070 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultStp%s: None\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
1071 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultStp%s: None\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
1072 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*Stp%s %s/%s: \"\"\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., "None", _cxx . . $ `src/cups/genppd.c:276:9`!("None"));
1073 }
1074 for (i = desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#integer..lowercxx . . $ $anonymous_type_c987533f3b833c82_6#lower.; i <= desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#integer..uppercxx . . $ $anonymous_type_c987533f3b833c82_6#upper.; i++)
1075 {
1076 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%sStp%s %d/%d: \"\"\n",
1077 (skip_color ? "?" : ""), desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., i, i);
1078 }
1079
1080 print_close_ui = 0;
1081 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*CloseUI: *Stp%s\n\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
1082
1083 break;
1084 default:
1085 break;
1086 }
1087 if (print_close_ui)
1088 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*CloseUI: *Stp%s\n\n", desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
1089 }
1090
1091 static void
1092 print_one_localizationcxx . . $ print_one_localization(30c83b6b73f3f2fb).(gpFilecxx . . $ gpFile# fp, const stp_string_list_tcxx . . $ stp_string_list_t# *po,
1093 int simplified, const char *lang,
1094 const stp_parameter_tcxx . . $ stp_parameter_t# *lparam,
1095 const stp_parameter_tcxx . . $ stp_parameter_t# *desc)
1096 {
1097 int num_opts;
1098 int i;
1099 const stp_param_string_tcxx . . $ stp_param_string_t# *opt;
1100 char dimstr[255]; /* Dimension string */
1101 (void)lparam;
1102
1103 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Translation Stp%s/%s: \"\"\n", lang,
1104 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, desc->textcxx . . $ $anonymous_type_c987533f3b833c82_8#text.));
1105 switch (desc->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type.)
1106 {
1107 case STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST.:
1108 if (!desc->is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory.)
1109 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Stp%s %s/%s: \"\"\n", lang, desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.,
1110 "None", _cxx . . $ `src/cups/genppd.c:276:9`!("None"));
1111 num_opts = stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.);
1112 for (i = 0; i < num_opts; i++)
1113 {
1114 opt = stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., i);
1115 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Stp%s %s/%s: \"\"\n", lang,
1116 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.));
1117 }
1118 break;
1119
1120 case STP_PARAMETER_TYPE_BOOLEANcxx . . $ STP_PARAMETER_TYPE_BOOLEAN.:
1121 if (!desc->is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory.)
1122 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Stp%s %s/%s: \"\"\n", lang, desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.,
1123 "None", _cxx . . $ `src/cups/genppd.c:276:9`!("None"));
1124 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Stp%s %s/%s: \"\"\n", lang, desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., "False", _cxx . . $ `src/cups/genppd.c:276:9`!("No"));
1125 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Stp%s %s/%s: \"\"\n", lang, desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., "True", _cxx . . $ `src/cups/genppd.c:276:9`!("Yes"));
1126 break;
1127
1128 case STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE.:
1129 if (localize_numberscxx . . $ localize_numbers.)
1130 {
1131 for (i = desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dbl..lowercxx . . $ $anonymous_type_c987533f3b833c82_5#lower. * 1000;
1132 i <= desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dbl..uppercxx . . $ $anonymous_type_c987533f3b833c82_5#upper. * 1000; i += 100)
1133 {
1134 if (desc->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#dbl. * 1000 == i && desc->is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory.)
1135 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Stp%s None/%.3f: \"\"\n", lang,
1136 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., ((double) i) * .001);
1137 else
1138 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Stp%s %d/%.3f: \"\"\n", lang,
1139 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., i, ((double) i) * .001);
1140 }
1141 }
1142 if (!desc->is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory.)
1143 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Stp%s None/%s: \"\"\n", lang, desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., _cxx . . $ `src/cups/genppd.c:276:9`!("None"));
1144 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.ParamCustomStp%s Value/%s: \"\"\n", lang,
1145 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., _cxx . . $ `src/cups/genppd.c:276:9`!("Value"));
1146 if (!simplified)
1147 {
1148 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Translation StpFine%s/%s %s: \"\"\n", lang,
1149 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, desc->textcxx . . $ $anonymous_type_c987533f3b833c82_8#text.),
1150 _cxx . . $ `src/cups/genppd.c:276:9`!("Fine Adjustment"));
1151 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.StpFine%s None/%.3f: \"\"\n", lang,
1152 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., 0.0);
1153 if (localize_numberscxx . . $ localize_numbers.)
1154 {
1155 for (i = 0; i < 100; i += 5)
1156 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.StpFine%s %d/%.3f: \"\"\n", lang,
1157 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., i, ((double) i) * .001);
1158 }
1159 }
1160 break;
1161
1162 case STP_PARAMETER_TYPE_DIMENSIONcxx . . $ STP_PARAMETER_TYPE_DIMENSION.:
1163 if (!desc->is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory.)
1164 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Stp%s %s/%s: \"\"\n", lang, desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.,
1165 "None", _cxx . . $ `src/cups/genppd.c:276:9`!("None"));
1166 /* Unlike the other fields, dimensions are not strictly numbers */
1167 for (i = (int) desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dimensioncxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dimension..lowercxx . . $ $anonymous_type_c987533f3b833c82_7#lower.;
1168 i <= (int) desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dimensioncxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dimension..uppercxx . . $ $anonymous_type_c987533f3b833c82_7#upper.; i++)
1169 {
1170 snprintfcxx . . $ snprintf(ea502d73e74c754c).(dimstr, sizeof(dimstr), _cxx . . $ `src/cups/genppd.c:276:9`!("%.1f mm"),
1171 (double)i * 25.4 / 72.0);
1172 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Stp%s %d/%s: \"\"\n", lang,
1173 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., i, dimstr);
1174 }
1175 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.ParamCustomStp%s Value/%s: \"\"\n", lang,
1176 desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., _cxx . . $ `src/cups/genppd.c:276:9`!("Value"));
1177 break;
1178
1179 case STP_PARAMETER_TYPE_INTcxx . . $ STP_PARAMETER_TYPE_INT.:
1180 if (!desc->is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory.)
1181 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Stp%s %s/%s: \"\"\n", lang, desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.,
1182 "None", _cxx . . $ `src/cups/genppd.c:276:9`!("None"));
1183 if (localize_numberscxx . . $ localize_numbers.)
1184 {
1185 for (i = desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#integer..lowercxx . . $ $anonymous_type_c987533f3b833c82_6#lower.;
1186 i <= desc->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#integer..uppercxx . . $ $anonymous_type_c987533f3b833c82_6#upper.; i++)
1187 {
1188 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Stp%s %d/%d: \"\"\n", lang, desc->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., i, i);
1189 }
1190 }
1191 break;
1192
1193 default:
1194 break;
1195 }
1196 }
1197
1198 static void
1199 print_standard_fontscxx . . $ print_standard_fonts(c6ab881b91d04181).(gpFilecxx . . $ gpFile# fp)
1200 {
1201 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "\n*DefaultFont: Courier\n");
1202 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font AvantGarde-Book: Standard \"(001.006S)\" Standard ROM\n");
1203 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font AvantGarde-BookOblique: Standard \"(001.006S)\" Standard ROM\n");
1204 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font AvantGarde-Demi: Standard \"(001.007S)\" Standard ROM\n");
1205 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font AvantGarde-DemiOblique: Standard \"(001.007S)\" Standard ROM\n");
1206 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Bookman-Demi: Standard \"(001.004S)\" Standard ROM\n");
1207 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Bookman-DemiItalic: Standard \"(001.004S)\" Standard ROM\n");
1208 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Bookman-Light: Standard \"(001.004S)\" Standard ROM\n");
1209 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Bookman-LightItalic: Standard \"(001.004S)\" Standard ROM\n");
1210 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Courier: Standard \"(002.004S)\" Standard ROM\n");
1211 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Courier-Bold: Standard \"(002.004S)\" Standard ROM\n");
1212 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Courier-BoldOblique: Standard \"(002.004S)\" Standard ROM\n");
1213 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Courier-Oblique: Standard \"(002.004S)\" Standard ROM\n");
1214 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Helvetica: Standard \"(001.006S)\" Standard ROM\n");
1215 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Helvetica-Bold: Standard \"(001.007S)\" Standard ROM\n");
1216 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Helvetica-BoldOblique: Standard \"(001.007S)\" Standard ROM\n");
1217 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Helvetica-Narrow: Standard \"(001.006S)\" Standard ROM\n");
1218 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Helvetica-Narrow-Bold: Standard \"(001.007S)\" Standard ROM\n");
1219 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Helvetica-Narrow-BoldOblique: Standard \"(001.007S)\" Standard ROM\n");
1220 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Helvetica-Narrow-Oblique: Standard \"(001.006S)\" Standard ROM\n");
1221 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Helvetica-Oblique: Standard \"(001.006S)\" Standard ROM\n");
1222 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font NewCenturySchlbk-Bold: Standard \"(001.009S)\" Standard ROM\n");
1223 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font NewCenturySchlbk-BoldItalic: Standard \"(001.007S)\" Standard ROM\n");
1224 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font NewCenturySchlbk-Italic: Standard \"(001.006S)\" Standard ROM\n");
1225 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font NewCenturySchlbk-Roman: Standard \"(001.007S)\" Standard ROM\n");
1226 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Palatino-Bold: Standard \"(001.005S)\" Standard ROM\n");
1227 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Palatino-BoldItalic: Standard \"(001.005S)\" Standard ROM\n");
1228 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Palatino-Italic: Standard \"(001.005S)\" Standard ROM\n");
1229 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Palatino-Roman: Standard \"(001.005S)\" Standard ROM\n");
1230 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Symbol: Special \"(001.007S)\" Special ROM\n");
1231 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Times-Bold: Standard \"(001.007S)\" Standard ROM\n");
1232 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Times-BoldItalic: Standard \"(001.009S)\" Standard ROM\n");
1233 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Times-Italic: Standard \"(001.007S)\" Standard ROM\n");
1234 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font Times-Roman: Standard \"(001.007S)\" Standard ROM\n");
1235 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font ZapfChancery-MediumItalic: Standard \"(001.007S)\" Standard ROM\n");
1236 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*Font ZapfDingbats: Special \"(001.004S)\" Standard ROM\n");
1237 }
1238
1239 /*
1240 * 'write_ppd()' - Write a PPD file.
1241 */
1242
1243 int /* O - Exit status */
1244 write_ppdcxx . . $ write_ppd(b5c2acede45c40d2).(
1245 gpFilecxx . . $ gpFile# fp, /* I - File to write to */
1246 const stp_printer_tcxx . . $ stp_printer_t# *p, /* I - Printer driver */
1247 const char *language, /* I - Primary language */
1248 const char *ppd_location, /* I - Location of PPD file */
1249 ppd_type_tcxx . . $ ppd_type_t# ppd_type, /* I - 1 = simplified options */
1250 const char *filename, /* I - input filename */
1251 int compress) /* I - compress output */
1252 {
1253 unsigned int i, j, k, l; /* Looping vars */
1254 unsigned int num_opts; /* Number of printer options */
1255 stp_resolution_tcxx . . $ stp_resolution_t# xdpi, ydpi; /* Resolution info */
1256 stp_vars_tcxx . . $ stp_vars_t# *v; /* Variable info */
1257 const char *driver; /* Driver name */
1258 const char *family; /* Printer family */
1259 int model; /* Internal model ID */
1260 const char *long_name; /* Driver long name */
1261 const char *manufacturer; /* Manufacturer of printer */
1262 const char *device_id; /* IEEE1284 device ID */
1263 const stp_vars_tcxx . . $ stp_vars_t# *printvars; /* Printer option names */
1264 int nativecopies = 0; /* Printer natively generates copies */
1265 stp_parameter_tcxx . . $ stp_parameter_t# desc;
1266 stp_parameter_list_tcxx . . $ stp_parameter_list_t# param_list;
1267 const stp_param_string_tcxx . . $ stp_param_string_t# *opt;
1268 int has_quality_parameter = 0;
1269 int printer_is_color = 0;
1270 int simplified = ppd_type == PPD_SIMPLIFIEDcxx . . $ PPD_SIMPLIFIED.;
1271 int skip_color = ppd_type == PPD_NO_COLOR_OPTScxx . . $ PPD_NO_COLOR_OPTS.;
1272 unsigned int maximum_level = simplified ?
1273 STP_PARAMETER_LEVEL_BASICcxx . . $ STP_PARAMETER_LEVEL_BASIC. : STP_PARAMETER_LEVEL_ADVANCED4cxx . . $ STP_PARAMETER_LEVEL_ADVANCED4.;
1274 char *default_resolution = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; /* Default resolution mapped name */
1275 stp_string_list_tcxx . . $ stp_string_list_t# *resolutions = stp_string_list_createcxx . . $ stp_string_list_create(f262b3b5e10fad14).();
1276 char **all_langs = getlangscxx . . $ getlangs(de5739791ae7584).();/* All languages */
1277 const stp_string_list_tcxx . . $ stp_string_list_t# *po = stp_i18n_loadcxx . . $ stp_i18n_load(f2f2e30b05a373a0).(language);
1278 /* Message catalog */
1279
1280 /*
1281 * This is ugly. The right thing would be to pass this through, but
1282 * then all calls to gpputs, gpprintf, etc. and callers would need to
1283 * have this arg.
1284 */
1285 use_compressioncxx . . $ use_compression. = compress;
1286 /*
1287 * Initialize driver-specific variables...
1288 */
1289
1290 driver = stp_printer_get_drivercxx . . $ stp_printer_get_driver(b5d6ef9de7e317aa).(p);
1291 family = stp_printer_get_familycxx . . $ stp_printer_get_family(b5d6ef9de7e317aa).(p);
1292 model = stp_printer_get_modelcxx . . $ stp_printer_get_model(7a5f2d0743711567).(p);
1293 long_name = stp_printer_get_long_namecxx . . $ stp_printer_get_long_name(b5d6ef9de7e317aa).(p);
1294 manufacturer = stp_printer_get_manufacturercxx . . $ stp_printer_get_manufacturer(b5d6ef9de7e317aa).(p);
1295 device_id = stp_printer_get_device_idcxx . . $ stp_printer_get_device_id(b5d6ef9de7e317aa).(p);
1296 printvars = stp_printer_get_defaultscxx . . $ stp_printer_get_defaults(961f21647a798a4c).(p);
1297
1298 print_ppd_headercxx . . $ print_ppd_header(4059aa2a14d14649).(fp, ppd_type, model, driver, family, long_name,
1299 manufacturer, device_id, ppd_location, language, po,
1300 all_langs);
1301
1302
1303 /* Set Job Mode to "Job" as this enables the Duplex option */
1304 v = stp_vars_create_copycxx . . $ stp_vars_create_copy(d6c73ebbfa1de3f9).(printvars);
1305 stp_set_string_parametercxx . . $ stp_set_string_parameter(7405204ff890c7b8).(v, "JobMode", "Job");
1306
1307 /* Assume that color printers are inkjets and should have pages reversed */
1308 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "PrintingMode", &desc);
1309 if (desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. == STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST.)
1310 {
1311 if (stp_string_list_is_presentcxx . . $ stp_string_list_is_present(bf726c32497cc2b).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., "Color"))
1312 {
1313 printer_is_color = 1;
1314 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*ColorDevice: True\n");
1315 }
1316 else
1317 {
1318 printer_is_color = 0;
1319 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*ColorDevice: False\n");
1320 }
1321 if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str., "Color") == 0)
1322 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*DefaultColorSpace: RGB\n");
1323 else
1324 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*DefaultColorSpace: Gray\n");
1325 }
1326 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
1327
1328 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "NativeCopies", &desc);
1329 if (desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. == STP_PARAMETER_TYPE_BOOLEANcxx . . $ STP_PARAMETER_TYPE_BOOLEAN.)
1330 nativecopies = desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..booleancxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#boolean.;
1331 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
1332
1333 if (nativecopies)
1334 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*cupsManualCopies: False\n");
1335 else
1336 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*cupsManualCopies: True\n");
1337
1338 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "CommandFilterName", &desc);
1339 if (desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. == STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST. && desc.is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active.)
1340 {
1341 opt = stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., 0);
1342 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*cupsFilter: \"application/vnd.cups-command 33 %s\"\n", opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.);
1343 }
1344 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
1345
1346 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "CommandFilterCommands", &desc);
1347 if (desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. == STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST. && desc.is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active.)
1348 {
1349 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*cupsCommands: \"");
1350 num_opts = stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.);
1351 for (i = 0 ; i < num_opts; i++)
1352 {
1353 opt = stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., i);
1354 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "%s ", opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.);
1355 }
1356 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "\"\n");
1357 }
1358 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
1359
1360 print_ppd_header_3cxx . . $ print_ppd_header_3(4059aa2a14d14649).(fp, ppd_type, model,
1361 driver, family, long_name,
1362 manufacturer, device_id, ppd_location, language, po,
1363 all_langs);
1364
1365 /* Macintosh color management */
1366
1367 #ifdef __APPLE__
1368 gpputs(fp, "*cupsICCProfile Gray../Grayscale: \"/System/Library/ColorSync/Profiles/sRGB Profile.icc\"\n");
1369 gpputs(fp, "*cupsICCProfile RGB../Color: \"/System/Library/ColorSync/Profiles/sRGB Profile.icc\"\n");
1370 gpputs(fp, "*cupsICCProfile CMYK../Color: \"/System/Library/ColorSync/Profiles/Generic CMYK Profile.icc\"\n");
1371 gpputs(fp, "*APSupportsCustomColorMatching: true\n");
1372 gpputs(fp, "*APDefaultCustomColorMatchingProfile: sRGB\n");
1373 gpputs(fp, "*APCustomColorMatchingProfile: sRGB\n");
1374 #endif
1375
1376 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "\n");
1377
1378 print_ppd_header_2cxx . . $ print_ppd_header_2(4059aa2a14d14649).(fp, ppd_type, model, driver, family, long_name,
1379 manufacturer, device_id, ppd_location, language, po,
1380 all_langs);
1381
1382 /*
1383 * Get the page sizes from the driver...
1384 */
1385
1386 if (printer_is_color)
1387 stp_set_string_parametercxx . . $ stp_set_string_parameter(7405204ff890c7b8).(v, "PrintingMode", "Color");
1388 else
1389 stp_set_string_parametercxx . . $ stp_set_string_parameter(7405204ff890c7b8).(v, "PrintingMode", "BW");
1390 stp_set_string_parametercxx . . $ stp_set_string_parameter(7405204ff890c7b8).(v, "ChannelBitDepth", "8");
1391 print_page_sizescxx . . $ print_page_sizes(e21d8311195aed55).(fp, v, simplified, po);
1392
1393 /*
1394 * Do we support color?
1395 */
1396
1397 print_color_setupcxx . . $ print_color_setup(369eb896502a1ef1).(fp, simplified, printer_is_color, po);
1398
1399 /*
1400 * Media types...
1401 */
1402
1403 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "MediaType", &desc);
1404
1405 if (desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. == STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST. && desc.is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active. &&
1406 stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.) > 0)
1407 {
1408 int is_color_opt =
1409 stp_parameter_has_category_valuecxx . . $ stp_parameter_has_category_value(d2d6b47631715960).(v, &desc, "Color", "Yes");
1410 int nocolor = skip_color && is_color_opt;
1411 num_opts = stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.);
1412 if (is_color_opt)
1413 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ColorKeyWords: \"MediaType\"\n");
1414 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OpenUI *MediaType/%s: PickOne\n", _cxx . . $ `src/cups/genppd.c:276:9`!("Media Type"));
1415 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OPOptionHints MediaType: \"dropdown\"\n");
1416 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OrderDependency: 10 AnySetup *MediaType\n");
1417 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpStp%s: %d %d %d %d %d %.3f %.3f %.3f\n",
1418 desc.namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type., desc.is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory.,
1419 desc.p_classcxx . . $ $anonymous_type_c987533f3b833c82_8#p_class., desc.p_levelcxx . . $ $anonymous_type_c987533f3b833c82_8#p_level., desc.channelcxx . . $ $anonymous_type_c987533f3b833c82_8#channel., 0.0, 0.0, 0.0);
1420 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultMediaType: %s\n", desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
1421 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultMediaType: %s\n", desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
1422
1423 for (i = 0; i < num_opts; i ++)
1424 {
1425 opt = stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., i);
1426 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%sMediaType %s/%s:\t\"<</MediaType(%s)>>setpagedevice\"\n",
1427 nocolor && strcmpcxx . . $ strcmp(5ae29d726ae57f88).(opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.) != 0 ? "?" : "",
1428 opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.), opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.);
1429 }
1430
1431 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*CloseUI: *MediaType\n\n");
1432 }
1433 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
1434
1435 /*
1436 * Input slots...
1437 */
1438
1439 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "InputSlot", &desc);
1440
1441 if (desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. == STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST. && desc.is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active. &&
1442 stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.) > 0)
1443 {
1444 int is_color_opt =
1445 stp_parameter_has_category_valuecxx . . $ stp_parameter_has_category_value(d2d6b47631715960).(v, &desc, "Color", "Yes");
1446 int nocolor = skip_color && is_color_opt;
1447 num_opts = stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.);
1448 if (is_color_opt)
1449 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ColorKeyWords: \"InputSlot\"\n");
1450 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OpenUI *InputSlot/%s: PickOne\n", _cxx . . $ `src/cups/genppd.c:276:9`!("Media Source"));
1451 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OPOptionHints InputSlot: \"dropdown\"\n");
1452 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OrderDependency: 10 AnySetup *InputSlot\n");
1453 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpStp%s: %d %d %d %d %d %.3f %.3f %.3f\n",
1454 desc.namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type., desc.is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory.,
1455 desc.p_classcxx . . $ $anonymous_type_c987533f3b833c82_8#p_class., desc.p_levelcxx . . $ $anonymous_type_c987533f3b833c82_8#p_level., desc.channelcxx . . $ $anonymous_type_c987533f3b833c82_8#channel., 0.0, 0.0, 0.0);
1456 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultInputSlot: %s\n", desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
1457 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultInputSlot: %s\n", desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
1458
1459 for (i = 0; i < num_opts; i ++)
1460 {
1461 opt = stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., i);
1462 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%sInputSlot %s/%s:\t\"<</MediaClass(%s)>>setpagedevice\"\n",
1463 nocolor && strcmpcxx . . $ strcmp(5ae29d726ae57f88).(opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.) != 0 ? "?" : "",
1464 opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.), opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.);
1465 }
1466
1467 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*CloseUI: *InputSlot\n\n");
1468 }
1469 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
1470
1471 /*
1472 * Quality settings
1473 */
1474
1475 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "Quality", &desc);
1476 if (desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. == STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST. && desc.is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active.)
1477 {
1478 int is_color_opt =
1479 stp_parameter_has_category_valuecxx . . $ stp_parameter_has_category_value(d2d6b47631715960).(v, &desc, "Color", "Yes");
1480 int nocolor = skip_color && is_color_opt;
1481 if (is_color_opt)
1482 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ColorKeyWords: \"Quality\"\n");
1483 stp_clear_string_parametercxx . . $ stp_clear_string_parameter(f1526d77388867f8).(v, "Resolution");
1484 has_quality_parameter = 1;
1485 num_opts = stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.);
1486 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OpenUI *StpQuality/%s: PickOne\n", stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, desc.textcxx . . $ $anonymous_type_c987533f3b833c82_8#text.));
1487 if (num_opts > 3)
1488 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OPOptionHints Quality: \"radiobuttons\"\n");
1489 else
1490 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OPOptionHints Quality: \"dropdown\"\n");
1491 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OrderDependency: 10 AnySetup *StpQuality\n");
1492 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpStp%s: %d %d %d %d %d %.3f %.3f %.3f\n",
1493 desc.namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type., desc.is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory.,
1494 desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type., desc.p_levelcxx . . $ $anonymous_type_c987533f3b833c82_8#p_level., desc.channelcxx . . $ $anonymous_type_c987533f3b833c82_8#channel., 0.0, 0.0, 0.0);
1495 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultStpQuality: %s\n", desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
1496 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultStpQuality: %s\n", desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
1497 for (i = 0; i < num_opts; i++)
1498 {
1499 opt = stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., i);
1500 stp_set_string_parametercxx . . $ stp_set_string_parameter(7405204ff890c7b8).(v, "Quality", opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.);
1501 stp_describe_resolutioncxx . . $ stp_describe_resolution(5883f070c6139f40).(v, &xdpi, &ydpi);
1502 if (xdpi == -1 || ydpi == -1)
1503 {
1504 stp_parameter_tcxx . . $ stp_parameter_t# res_desc;
1505 stp_clear_string_parametercxx . . $ stp_clear_string_parameter(f1526d77388867f8).(v, "Quality");
1506 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "Resolution", &res_desc);
1507 stp_set_string_parametercxx . . $ stp_set_string_parameter(7405204ff890c7b8).(v, "Resolution", res_desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
1508 stp_describe_resolutioncxx . . $ stp_describe_resolution(5883f070c6139f40).(v, &xdpi, &ydpi);
1509 stp_clear_string_parametercxx . . $ stp_clear_string_parameter(f1526d77388867f8).(v, "Resolution");
1510 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&res_desc);
1511 }
1512 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%sStpQuality %s/%s:\t\"<</HWResolution[%d %d]/cupsRowFeed %d>>setpagedevice\"\n",
1513 nocolor && strcmpcxx . . $ strcmp(5ae29d726ae57f88).(opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.) != 0 ? "?" : "",
1514 opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.), (int) xdpi, (int) ydpi, i + 1);
1515 }
1516 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*CloseUI: *StpQuality\n\n");
1517 }
1518 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
1519 stp_clear_string_parametercxx . . $ stp_clear_string_parameter(f1526d77388867f8).(v, "Quality");
1520
1521 /*
1522 * Resolutions...
1523 */
1524
1525 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "Resolution", &desc);
1526
1527 if (desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. == STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST. && desc.is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active.)
1528 {
1529 num_opts = stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.);
1530 if (!simplified || desc.p_levelcxx . . $ $anonymous_type_c987533f3b833c82_8#p_level. == STP_PARAMETER_LEVEL_BASICcxx . . $ STP_PARAMETER_LEVEL_BASIC.)
1531 {
1532 int is_color_opt =
1533 stp_parameter_has_category_valuecxx . . $ stp_parameter_has_category_value(d2d6b47631715960).(v, &desc, "Color", "Yes");
1534 int nocolor = skip_color && is_color_opt;
1535 stp_string_list_tcxx . . $ stp_string_list_t# *res_list = stp_string_list_createcxx . . $ stp_string_list_create(f262b3b5e10fad14).();
1536 char res_name[64]; /* Plenty long enough for XXXxYYYdpi */
1537 int resolution_ok;
1538 stp_resolution_tcxx . . $ stp_resolution_t# tmp_xdpi, tmp_ydpi;
1539
1540 if (is_color_opt)
1541 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ColorKeyWords: \"Resolution\"\n");
1542 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OpenUI *Resolution/%s: PickOne\n", _cxx . . $ `src/cups/genppd.c:276:9`!("Resolution"));
1543 if (num_opts > 3)
1544 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OPOptionHints Resolution: \"resolution radiobuttons\"\n");
1545 else
1546 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OPOptionHints Resolution: \"resolution dropdown\"\n");
1547 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OrderDependency: 10 AnySetup *Resolution\n");
1548 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpStp%s: %d %d %d %d %d %.3f %.3f %.3f\n",
1549 desc.namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type., desc.is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory.,
1550 desc.p_classcxx . . $ $anonymous_type_c987533f3b833c82_8#p_class., desc.p_levelcxx . . $ $anonymous_type_c987533f3b833c82_8#p_level., desc.channelcxx . . $ $anonymous_type_c987533f3b833c82_8#channel., 0.0, 0.0, 0.0);
1551 if (has_quality_parameter)
1552 {
1553 stp_parameter_tcxx . . $ stp_parameter_t# desc1;
1554 stp_clear_string_parametercxx . . $ stp_clear_string_parameter(f1526d77388867f8).(v, "Resolution");
1555 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "Quality", &desc1);
1556 stp_set_string_parametercxx . . $ stp_set_string_parameter(7405204ff890c7b8).(v, "Quality", desc1.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
1557 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc1);
1558 stp_describe_resolutioncxx . . $ stp_describe_resolution(5883f070c6139f40).(v, &xdpi, &ydpi);
1559 stp_clear_string_parametercxx . . $ stp_clear_string_parameter(f1526d77388867f8).(v, "Quality");
1560 tmp_xdpi = xdpi;
1561 while (tmp_xdpi > MAXIMUM_SAFE_PPD_X_RESOLUTIONcxx . . $ `src/cups/genppd.c:67:9`!)
1562 tmp_xdpi /= 2;
1563 tmp_ydpi = ydpi;
1564 while (tmp_ydpi > MAXIMUM_SAFE_PPD_Y_RESOLUTIONcxx . . $ `src/cups/genppd.c:66:9`!)
1565 tmp_ydpi /= 2;
1566 if (tmp_ydpi < tmp_xdpi)
1567 tmp_xdpi = tmp_ydpi;
1568 /*
1569 Make the default resolution look like an almost square resolution
1570 so that applications using it will be less likely to generate
1571 excess resolution. However, make the hardware resolution
1572 match the printer default.
1573 */
1574 (void) snprintfcxx . . $ snprintf(ea502d73e74c754c).(res_name, 63, "%dx%ddpi", (int) tmp_xdpi + 1, (int) tmp_xdpi);
1575 default_resolution = stp_strdupcxx . . $ stp_strdup(a8b8e32347182212).(res_name);
1576 stp_string_list_add_stringcxx . . $ stp_string_list_add_string(61ec312b340c2952).(res_list, res_name, res_name);
1577 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultResolution: %s\n", res_name);
1578 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultResolution: %s\n", res_name);
1579 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*Resolution %s/%s:\t\"<</HWResolution[%d %d]>>setpagedevice\"\n",
1580 res_name, _cxx . . $ `src/cups/genppd.c:276:9`!("Automatic"), (int) xdpi, (int) ydpi);
1581 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpResolutionMap: %s %s\n", res_name, "None");
1582 }
1583 else
1584 {
1585 stp_set_string_parametercxx . . $ stp_set_string_parameter(7405204ff890c7b8).(v, "Resolution", desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
1586 stp_describe_resolutioncxx . . $ stp_describe_resolution(5883f070c6139f40).(v, &xdpi, &ydpi);
1587
1588 if (xdpi == ydpi)
1589 (void) snprintfcxx . . $ snprintf(ea502d73e74c754c).(res_name, 63, "%ddpi", (int) xdpi);
1590 else
1591 (void) snprintfcxx . . $ snprintf(ea502d73e74c754c).(res_name, 63, "%dx%ddpi", (int) xdpi, (int) ydpi);
1592 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultResolution: %s\n", res_name);
1593 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultResolution: %s\n", res_name);
1594 /*
1595 * We need to add this to the resolution list here so that
1596 * some non-default resolution won't wind up with the
1597 * default resolution name
1598 */
1599 stp_string_list_add_stringcxx . . $ stp_string_list_add_string(61ec312b340c2952).(res_list, res_name, res_name);
1600 }
1601
1602 stp_clear_string_parametercxx . . $ stp_clear_string_parameter(f1526d77388867f8).(v, "Quality");
1603 for (i = 0; i < num_opts; i ++)
1604 {
1605 /*
1606 * Strip resolution name to its essentials...
1607 */
1608 opt = stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., i);
1609 stp_set_string_parametercxx . . $ stp_set_string_parameter(7405204ff890c7b8).(v, "Resolution", opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.);
1610 stp_describe_resolutioncxx . . $ stp_describe_resolution(5883f070c6139f40).(v, &xdpi, &ydpi);
1611
1612 /* This should only happen with a "None" resolution */
1613 if (xdpi == -1 || ydpi == -1)
1614 continue;
1615
1616 resolution_ok = 0;
1617 tmp_xdpi = xdpi;
1618 while (tmp_xdpi > MAXIMUM_SAFE_PPD_X_RESOLUTIONcxx . . $ `src/cups/genppd.c:67:9`!)
1619 tmp_xdpi /= 2;
1620 tmp_ydpi = ydpi;
1621 while (tmp_ydpi > MAXIMUM_SAFE_PPD_Y_RESOLUTIONcxx . . $ `src/cups/genppd.c:66:9`!)
1622 tmp_ydpi /= 2;
1623 do
1624 {
1625 if (tmp_xdpi == tmp_ydpi)
1626 (void) snprintfcxx . . $ snprintf(ea502d73e74c754c).(res_name, 63, "%ddpi", (int) tmp_xdpi);
1627 else
1628 (void) snprintfcxx . . $ snprintf(ea502d73e74c754c).(res_name, 63, "%dx%ddpi", (int) tmp_xdpi, (int) tmp_ydpi);
1629 if ((!has_quality_parameter &&
1630 strcmpcxx . . $ strcmp(5ae29d726ae57f88).(opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.) == 0) ||
1631 !stp_string_list_is_presentcxx . . $ stp_string_list_is_present(bf726c32497cc2b).(res_list, res_name))
1632 {
1633 resolution_ok = 1;
1634 stp_string_list_add_stringcxx . . $ stp_string_list_add_string(61ec312b340c2952).(res_list, res_name, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.);
1635 }
1636 else if (tmp_ydpi > tmp_xdpi &&
1637 tmp_ydpi < MAXIMUM_SAFE_PPD_Y_RESOLUTIONcxx . . $ `src/cups/genppd.c:66:9`!)
1638 /* Note that we're incrementing the *higher* resolution.
1639 This will generate less aliasing, and apps that convert
1640 down to a square resolution will do the right thing. */
1641 tmp_ydpi++;
1642 else if (tmp_xdpi < MAXIMUM_SAFE_PPD_X_RESOLUTIONcxx . . $ `src/cups/genppd.c:67:9`!)
1643 tmp_xdpi++;
1644 else
1645 tmp_xdpi /= 2;
1646 } while (!resolution_ok);
1647 stp_string_list_add_stringcxx . . $ stp_string_list_add_string(61ec312b340c2952).(resolutions, res_name, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.);
1648 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%sResolution %s/%s:\t\"<</HWResolution[%d %d]/cupsCompression %d>>setpagedevice\"\n",
1649 nocolor && strcmpcxx . . $ strcmp(5ae29d726ae57f88).(opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.) != 0 ? "?" : "",
1650 res_name, stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.), (int) xdpi, (int) ydpi, i + 1);
1651 if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(res_name, opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.) != 0)
1652 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpResolutionMap: %s %s\n", res_name, opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.);
1653 }
1654
1655 stp_string_list_destroycxx . . $ stp_string_list_destroy(73d8582195bcdbb3).(res_list);
1656 stp_clear_string_parametercxx . . $ stp_clear_string_parameter(f1526d77388867f8).(v, "Resolution");
1657 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*CloseUI: *Resolution\n\n");
1658 }
1659 }
1660
1661 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
1662
1663 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "OutputOrder", &desc);
1664 if (desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. == STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST.)
1665 {
1666 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OpenUI *OutputOrder/%s: PickOne\n", _cxx . . $ `src/cups/genppd.c:276:9`!("Output Order"));
1667 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OPOptionHints OutputOrder: \"radiobuttons\"\n");
1668 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OrderDependency: 10 AnySetup *OutputOrder\n");
1669 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultOutputOrder: %s\n", desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
1670 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultOutputOrder: %s\n", desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
1671 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OutputOrder Normal/%s: \"\"\n", _cxx . . $ `src/cups/genppd.c:276:9`!("Normal"));
1672 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OutputOrder Reverse/%s: \"\"\n", _cxx . . $ `src/cups/genppd.c:276:9`!("Reverse"));
1673 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*CloseUI: *OutputOrder\n\n");
1674 }
1675 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
1676
1677 /*
1678 * Duplex
1679 * Note that the opt->name strings MUST match those in the printer driver(s)
1680 * else the PPD files will not be generated correctly
1681 */
1682
1683 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "Duplex", &desc);
1684 if (desc.is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active. && desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. == STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST.)
1685 {
1686 num_opts = stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.);
1687 if (num_opts > 0)
1688 {
1689 int is_color_opt =
1690 stp_parameter_has_category_valuecxx . . $ stp_parameter_has_category_value(d2d6b47631715960).(v, &desc, "Color", "Yes");
1691 if (is_color_opt)
1692 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*ColorKeyWords: \"InputSlot\"\n");
1693 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OpenUI *Duplex/%s: PickOne\n", _cxx . . $ `src/cups/genppd.c:276:9`!("2-Sided Printing"));
1694 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OPOptionHints Duplex: \"radiobuttons\"\n");
1695 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OrderDependency: 10 AnySetup *Duplex\n");
1696 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpStp%s: %d %d %d %d %d %.3f %.3f %.3f\n",
1697 desc.namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type., desc.is_mandatorycxx . . $ $anonymous_type_c987533f3b833c82_8#is_mandatory.,
1698 desc.p_classcxx . . $ $anonymous_type_c987533f3b833c82_8#p_class., desc.p_levelcxx . . $ $anonymous_type_c987533f3b833c82_8#p_level., desc.channelcxx . . $ $anonymous_type_c987533f3b833c82_8#channel., 0.0, 0.0, 0.0);
1699 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*DefaultDuplex: %s\n", desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
1700 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefaultDuplex: %s\n", desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.);
1701
1702 for (i = 0; i < num_opts; i++)
1703 {
1704 opt = stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., i);
1705 if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., "None") == 0)
1706 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*Duplex %s/%s: \"<</Duplex false>>setpagedevice\"\n", opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.));
1707 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., "DuplexNoTumble") == 0)
1708 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*Duplex %s/%s: \"<</Duplex true/Tumble false>>setpagedevice\"\n", opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.));
1709 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., "DuplexTumble") == 0)
1710 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*Duplex %s/%s: \"<</Duplex true/Tumble true>>setpagedevice\"\n", opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.));
1711 }
1712 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*CloseUI: *Duplex\n\n");
1713 }
1714 }
1715 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
1716
1717 /* Collation */
1718 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "Collate", &desc);
1719 if (desc.is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active.)
1720 {
1721 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OpenUI *%s/%s: PickOne\n",
1722 desc.namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, desc.textcxx . . $ $anonymous_type_c987533f3b833c82_8#text.));
1723 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OrderDependency: 10 AnySetup *%s\n", desc.namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
1724 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OPOptionHints %s: \"checkbox\"\n", desc.namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
1725 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*Default%s: %s\n", desc.namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.,
1726 desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..booleancxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#boolean. ? "True" : "False");
1727 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpDefault%s: %s\n", desc.namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.,
1728 desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..booleancxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#boolean. ? "True" : "False");
1729 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s %s/%s: \"\"\n",
1730 desc.namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., "False", _cxx . . $ `src/cups/genppd.c:276:9`!("No"));
1731 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s %s/%s: \"\"\n",
1732 desc.namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., "True", _cxx . . $ `src/cups/genppd.c:276:9`!("Yes"));
1733 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*CloseUI: *%s\n\n", desc.namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.);
1734 }
1735 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
1736
1737 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*OpenUI *StpiShrinkOutput/%s: PickOne\n",
1738 _cxx . . $ `src/cups/genppd.c:276:9`!("Shrink Page If Necessary to Fit Borders"));
1739 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OPOptionHints StpiShrinkOutput: \"radiobuttons\"\n");
1740 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*OrderDependency: 10 AnySetup *StpiShrinkOutput\n");
1741 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*DefaultStpiShrinkOutput: Shrink\n");
1742 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*StpDefaultStpiShrinkOutput: Shrink\n");
1743 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpiShrinkOutput %s/%s: \"\"\n", "Shrink", _cxx . . $ `src/cups/genppd.c:276:9`!("Shrink (print the whole page)"));
1744 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpiShrinkOutput %s/%s: \"\"\n", "Crop", _cxx . . $ `src/cups/genppd.c:276:9`!("Crop (preserve dimensions)"));
1745 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*StpiShrinkOutput %s/%s: \"\"\n", "Expand", _cxx . . $ `src/cups/genppd.c:276:9`!("Expand (use maximum page area)"));
1746 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "*CloseUI: *StpiShrinkOutput\n\n");
1747
1748 param_list = stp_get_parameter_listcxx . . $ stp_get_parameter_list(817585d40f809196).(v);
1749
1750 for (j = 0; j <= STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT.; j++)
1751 {
1752 for (k = 0; k <= maximum_level; k++)
1753 {
1754 int printed_open_group = 0;
1755 size_t param_count = stp_parameter_list_countcxx . . $ stp_parameter_list_count(2e8e543e1193434e).(param_list);
1756 for (l = 0; l < param_count; l++)
1757 {
1758 const stp_parameter_tcxx . . $ stp_parameter_t# *lparam =
1759 stp_parameter_list_paramcxx . . $ stp_parameter_list_param(f24b23997c12c6a6).(param_list, l);
1760 if (lparam->p_classcxx . . $ $anonymous_type_c987533f3b833c82_8#p_class. != j || lparam->p_levelcxx . . $ $anonymous_type_c987533f3b833c82_8#p_level. != k ||
1761 is_special_optioncxx . . $ is_special_option(5c4306d8553b3696).(lparam->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.) || lparam->read_onlycxx . . $ $anonymous_type_c987533f3b833c82_8#read_only. ||
1762 (lparam->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. != STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST. &&
1763 lparam->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. != STP_PARAMETER_TYPE_RAWcxx . . $ STP_PARAMETER_TYPE_RAW. &&
1764 lparam->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. != STP_PARAMETER_TYPE_BOOLEANcxx . . $ STP_PARAMETER_TYPE_BOOLEAN. &&
1765 lparam->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. != STP_PARAMETER_TYPE_DIMENSIONcxx . . $ STP_PARAMETER_TYPE_DIMENSION. &&
1766 lparam->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. != STP_PARAMETER_TYPE_INTcxx . . $ STP_PARAMETER_TYPE_INT. &&
1767 lparam->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. != STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE.))
1768 continue;
1769 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, lparam->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., &desc);
1770 if (desc.is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active.)
1771 {
1772 if (!printed_open_group)
1773 {
1774 print_group_opencxx . . $ print_group_open(f809d5d9c0465c7f).(fp, j, k, language, po);
1775 printed_open_group = 1;
1776 }
1777 print_one_optioncxx . . $ print_one_option(3ae19822ef124b4d).(fp, v, po, ppd_type, lparam, &desc);
1778 }
1779 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
1780 }
1781 if (printed_open_group)
1782 print_group_closecxx . . $ print_group_close(f809d5d9c0465c7f).(fp, j, k, language, po);
1783 }
1784 }
1785 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "ImageType", &desc);
1786 if (desc.is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active. && desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. == STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST.)
1787 {
1788 num_opts = stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.);
1789 if (num_opts > 0)
1790 {
1791 for (i = 0; i < num_opts; i++)
1792 {
1793 opt = stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., i);
1794 if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., "None") != 0)
1795 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*APPrinterPreset %s/%s: \"*StpImageType %s\"\n",
1796 opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.), opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.);
1797 }
1798 gpputscxx . . $ gpputs(21296c77d5f44c4f).(fp, "\n");
1799 }
1800 }
1801 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
1802
1803 if (!language)
1804 {
1805 /*
1806 * Generate globalized PPDs when POSIX language is requested...
1807 */
1808
1809 const char *lang;
1810 const stp_string_list_tcxx . . $ stp_string_list_t# *savepo = po;
1811 int langnum;
1812
1813 for (langnum = 0; all_langs[langnum]; langnum ++)
1814 {
1815 lang = all_langs[langnum];
1816
1817 if (!strcmpcxx . . $ strcmp(5ae29d726ae57f88).(lang, "C") || !strcmpcxx . . $ strcmp(5ae29d726ae57f88).(lang, "en"))
1818 continue;
1819
1820 if ((po = stp_i18n_loadcxx . . $ stp_i18n_load(f2f2e30b05a373a0).(lang)) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
1821 continue;
1822
1823 /*
1824 * Get the page sizes from the driver...
1825 */
1826
1827 if (printer_is_color)
1828 stp_set_string_parametercxx . . $ stp_set_string_parameter(7405204ff890c7b8).(v, "PrintingMode", "Color");
1829 else
1830 stp_set_string_parametercxx . . $ stp_set_string_parameter(7405204ff890c7b8).(v, "PrintingMode", "BW");
1831 stp_set_string_parametercxx . . $ stp_set_string_parameter(7405204ff890c7b8).(v, "ChannelBitDepth", "8");
1832 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "PageSize", &desc);
1833 num_opts = stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.);
1834
1835 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Translation PageSize/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("Media Size"));
1836 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Translation PageRegion/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("Media Size"));
1837
1838 for (i = 0; i < num_opts; i++)
1839 {
1840 const stp_papersize_tcxx . . $ stp_papersize_t# *papersize;
1841 opt = stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., i);
1842 papersize = stp_describe_papersizecxx . . $ stp_describe_papersize(977e5bf217e59ec).(v, opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.);
1843
1844 if (!papersize)
1845 continue;
1846
1847 /*
1848 if (strcmp(opt->name, "Custom") == 0)
1849 continue;
1850 */
1851
1852 if (simplified && num_opts >= 10 &&
1853 (!desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str. || strcmpcxx . . $ strcmp(5ae29d726ae57f88).(opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., desc.defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str.) != 0) &&
1854 (papersize->paper_unitcxx . . $ $anonymous_type_51fd7f0ef3c7bff0_2#paper_unit. == PAPERSIZE_ENGLISH_EXTENDEDcxx . . $ PAPERSIZE_ENGLISH_EXTENDED. ||
1855 papersize->paper_unitcxx . . $ $anonymous_type_51fd7f0ef3c7bff0_2#paper_unit. == PAPERSIZE_METRIC_EXTENDEDcxx . . $ PAPERSIZE_METRIC_EXTENDED. ||
1856 ((papersize->widthcxx . . $ $anonymous_type_51fd7f0ef3c7bff0_2#width. <= 0 || papersize->heightcxx . . $ $anonymous_type_51fd7f0ef3c7bff0_2#height. <= 0) &&
1857 strcmpcxx . . $ strcmp(5ae29d726ae57f88).(opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., "Custom") != 0)))
1858 continue;
1859
1860 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.PageSize %s/%s: \"\"\n", lang, opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.));
1861 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.PageRegion %s/%s: \"\"\n", lang, opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.));
1862 }
1863
1864 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
1865
1866 /*
1867 * Do we support color?
1868 */
1869
1870 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Translation ColorModel/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("Color Model"));
1871 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.ColorModel Gray/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("Grayscale"));
1872 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.ColorModel Black/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("Inverted Grayscale"));
1873
1874 if (printer_is_color)
1875 {
1876 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.ColorModel RGB/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("RGB Color"));
1877 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.ColorModel CMY/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("CMY Color"));
1878 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.ColorModel CMYK/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("CMYK"));
1879 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.ColorModel KCMY/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("KCMY"));
1880 }
1881
1882 if (!simplified)
1883 {
1884 /*
1885 * 8 or 16 bit color (16 bit is slower)
1886 */
1887 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Translation StpColorPrecision/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("Color Precision"));
1888 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.StpColorPrecision Normal/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("Normal"));
1889 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.StpColorPrecision Best/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("Best"));
1890 }
1891
1892 /*
1893 * Media types...
1894 */
1895
1896 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "MediaType", &desc);
1897 if (desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. == STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST. && desc.is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active. &&
1898 stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.) > 0)
1899 {
1900 num_opts = stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.);
1901 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Translation MediaType/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("Media Type"));
1902
1903 for (i = 0; i < num_opts; i ++)
1904 {
1905 opt = stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., i);
1906 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.MediaType %s/%s: \"\"\n", lang, opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.));
1907 }
1908 }
1909 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
1910
1911 /*
1912 * Input slots...
1913 */
1914
1915 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "InputSlot", &desc);
1916
1917 if (desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. == STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST. && desc.is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active. &&
1918 stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.) > 0)
1919 {
1920 num_opts = stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.);
1921 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Translation InputSlot/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("Media Source"));
1922
1923 for (i = 0; i < num_opts; i ++)
1924 {
1925 opt = stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., i);
1926 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.InputSlot %s/%s: \"\"\n", lang, opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.));
1927 }
1928 }
1929 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
1930
1931 /*
1932 * Quality settings
1933 */
1934
1935 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "Quality", &desc);
1936 if (desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. == STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST. && desc.is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active.)
1937 {
1938 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Translation StpQuality/%s: \"\"\n", lang, stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, desc.textcxx . . $ $anonymous_type_c987533f3b833c82_8#text.));
1939 num_opts = stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.);
1940 for (i = 0; i < num_opts; i++)
1941 {
1942 opt = stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., i);
1943 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.StpQuality %s/%s: \"\"\n", lang, opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.));
1944 }
1945 }
1946 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
1947
1948 /*
1949 * Resolution
1950 */
1951
1952 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "Resolution", &desc);
1953
1954 if (!simplified || desc.p_levelcxx . . $ $anonymous_type_c987533f3b833c82_8#p_level. == STP_PARAMETER_LEVEL_BASICcxx . . $ STP_PARAMETER_LEVEL_BASIC.)
1955 {
1956 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Translation Resolution/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("Resolution"));
1957 if (has_quality_parameter)
1958 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Resolution %s/%s: \"\"\n", lang,
1959 default_resolution, _cxx . . $ `src/cups/genppd.c:276:9`!("Automatic"));
1960
1961 num_opts = stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(resolutions);
1962 for (i = 0; i < num_opts; i ++)
1963 {
1964 opt = stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(resolutions, i);
1965 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Resolution %s/%s: \"\"\n", lang,
1966 opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.));
1967 }
1968 }
1969
1970 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
1971
1972 /*
1973 * OutputOrder
1974 */
1975
1976 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "OutputOrder", &desc);
1977 if (desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. == STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST.)
1978 {
1979 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Translation OutputOrder/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("Output Order"));
1980 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.OutputOrder Normal/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("Normal"));
1981 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.OutputOrder Reverse/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("Reverse"));
1982 }
1983 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
1984
1985 /*
1986 * Duplex
1987 * Note that the opt->name strings MUST match those in the printer driver(s)
1988 * else the PPD files will not be generated correctly
1989 */
1990
1991 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "Duplex", &desc);
1992 if (desc.is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active. && desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. == STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST.)
1993 {
1994 num_opts = stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.);
1995 if (num_opts > 0)
1996 {
1997 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Translation Duplex/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("2-Sided Printing"));
1998
1999 for (i = 0; i < num_opts; i++)
2000 {
2001 opt = stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., i);
2002 if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., "None") == 0)
2003 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Duplex %s/%s: \"\"\n", lang, opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.));
2004 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., "DuplexNoTumble") == 0)
2005 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Duplex %s/%s: \"\"\n", lang, opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.));
2006 else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., "DuplexTumble") == 0)
2007 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Duplex %s/%s: \"\"\n", lang, opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., stp_i18n_lookupcxx . . $ stp_i18n_lookup(576974698f4b4250).(po, opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text.));
2008 }
2009 }
2010 }
2011 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
2012
2013 /* Collation */
2014 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "Collate", &desc);
2015 if (desc.is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active.)
2016 {
2017 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Translation Collate/%s: \"\"\n", lang, _cxx . . $ `src/cups/genppd.c:276:9`!("Collate the Job"));
2018 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Collate %s/%s: \"\"\n", lang, "True", _cxx . . $ `src/cups/genppd.c:276:9`!("Yes"));
2019 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Collate %s/%s: \"\"\n", lang, "False", _cxx . . $ `src/cups/genppd.c:276:9`!("No"));
2020 }
2021
2022 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.Translation StpiShrinkOutput/%s: \"\"\n", lang,
2023 _cxx . . $ `src/cups/genppd.c:276:9`!("Shrink Page If Necessary to Fit Borders"));
2024 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.StpiShrinkOutput %s/%s: \"\"\n", lang, "Shrink", _cxx . . $ `src/cups/genppd.c:276:9`!("Shrink (print the whole page)"));
2025 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.StpiShrinkOutput %s/%s: \"\"\n", lang, "Crop", _cxx . . $ `src/cups/genppd.c:276:9`!("Crop (preserve dimensions)"));
2026 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.StpiShrinkOutput %s/%s: \"\"\n", lang, "Expand", _cxx . . $ `src/cups/genppd.c:276:9`!("Expand (use maximum page area)"));
2027
2028 for (j = 0; j <= STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT.; j++)
2029 {
2030 for (k = 0; k <= maximum_level; k++)
2031 {
2032 size_t param_count = stp_parameter_list_countcxx . . $ stp_parameter_list_count(2e8e543e1193434e).(param_list);
2033 for (l = 0; l < param_count; l++)
2034 {
2035 const stp_parameter_tcxx . . $ stp_parameter_t# *lparam =
2036 stp_parameter_list_paramcxx . . $ stp_parameter_list_param(f24b23997c12c6a6).(param_list, l);
2037 if (lparam->p_classcxx . . $ $anonymous_type_c987533f3b833c82_8#p_class. != j || lparam->p_levelcxx . . $ $anonymous_type_c987533f3b833c82_8#p_level. != k ||
2038 is_special_optioncxx . . $ is_special_option(5c4306d8553b3696).(lparam->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.) || lparam->read_onlycxx . . $ $anonymous_type_c987533f3b833c82_8#read_only. ||
2039 (lparam->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. != STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST. &&
2040 lparam->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. != STP_PARAMETER_TYPE_BOOLEANcxx . . $ STP_PARAMETER_TYPE_BOOLEAN. &&
2041 lparam->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. != STP_PARAMETER_TYPE_DIMENSIONcxx . . $ STP_PARAMETER_TYPE_DIMENSION. &&
2042 lparam->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. != STP_PARAMETER_TYPE_INTcxx . . $ STP_PARAMETER_TYPE_INT. &&
2043 lparam->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. != STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE.))
2044 continue;
2045 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, lparam->namecxx . . $ $anonymous_type_c987533f3b833c82_8#name., &desc);
2046 if (desc.is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active.)
2047 print_one_localizationcxx . . $ print_one_localization(30c83b6b73f3f2fb).(fp, po, simplified, lang,
2048 lparam, &desc);
2049 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
2050 }
2051 }
2052 }
2053 stp_describe_parametercxx . . $ stp_describe_parameter(dfd5b9531b51a6d2).(v, "ImageType", &desc);
2054 if (desc.is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active. && desc.p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. == STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST.)
2055 {
2056 num_opts = stp_string_list_countcxx . . $ stp_string_list_count(53b7214102d1daf6).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str.);
2057 if (num_opts > 0)
2058 {
2059 for (i = 0; i < num_opts; i++)
2060 {
2061 opt = stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(desc.boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., i);
2062 if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., "None") != 0)
2063 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "*%s.APPrinterPreset %s/%s: \"*StpImageType %s\"\n",
2064 lang, opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., opt->textcxx . . $ $anonymous_type_cb0224bbe5755622_0#text., opt->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.);
2065 }
2066 }
2067 }
2068 stp_parameter_description_destroycxx . . $ stp_parameter_description_destroy(6259b4d9050bb586).(&desc);
2069 }
2070 po = savepo;
2071 }
2072 stp_parameter_list_destroycxx . . $ stp_parameter_list_destroy(5d22bdacc48458e8).(param_list);
2073 if (has_quality_parameter)
2074 stp_freecxx . . $ stp_free(5d22bdacc48458e8).(default_resolution);
2075 stp_string_list_destroycxx . . $ stp_string_list_destroy(73d8582195bcdbb3).(resolutions);
2076
2077 /*
2078 * Fonts...
2079 */
2080
2081 print_standard_fontscxx . . $ print_standard_fonts(c6ab881b91d04181).(fp);
2082 gpprintfcxx . . $ gpprintf(7b3c319270a566bc).(fp, "\n*%% End of %s\n", filename);
2083
2084 stp_vars_destroycxx . . $ stp_vars_destroy(1a97b8462f9f913c).(v);
2085
2086 return (0);
2087 }