| 1 | /* |
| 2 | * |
| 3 | * Print plug-in Datamax-O'Neil DPL driver for Gutenprint. |
| 4 | * |
| 5 | * Copyright 1997-2000 Michael Sweet ([email protected]), |
| 6 | * Robert Krawitz ([email protected]) and |
| 7 | * Dave Hill ([email protected]) |
| 8 | * |
| 9 | * Copyright 2016 Steve Letter ([email protected]) |
| 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify it |
| 12 | * under the terms of the GNU General Public License as published by the Free |
| 13 | * Software Foundation; either version 2 of the License, or (at your option) |
| 14 | * any later version. |
| 15 | * |
| 16 | * This program is distributed in the hope that it will be useful, but |
| 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| 18 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 19 | * for more details. |
| 20 | * |
| 21 | * You should have received a copy of the GNU General Public License |
| 22 | * along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 23 | */ |
| 24 | |
| 25 | /* |
| 26 | * This file must include only standard C header files. The core code must |
| 27 | * compile on generic platforms that don't support glib, gimp, gtk, etc. |
| 28 | */ |
| 29 | |
| 30 | #ifdef HAVE_CONFIG_Hcxx . . $ `<built-in>:411:9`! |
| 31 | #include <config.h>cxx . . $ `<file>/config.h`/ |
| 32 | #endif |
| 33 | #include <gutenprint/gutenprint.h>cxx . . $ `<file>/include/gutenprint/gutenprint.h`/ |
| 34 | #include <gutenprint/gutenprint-intl-internal.h>cxx . . $ `<file>/include/gutenprint/gutenprint-intl-internal.h`/ |
| 35 | #include "gutenprint-internal.h"cxx . . $ `<file>/src/main/gutenprint-internal.h`/ |
| 36 | #include "dither-impl.h"cxx . . $ `<file>/src/main/dither-impl.h`/ |
| 37 | #include <stdio.h> |
| 38 | #include <string.h> |
| 39 | |
| 40 | #define DEBUGcxx . . $ `src/main/print-dpl.c:40:9`! |
| 41 | #define DPL_DEBUG_DISABLE_BLANKLINE_REMOVALcxx . . $ `src/main/print-dpl.c:41:9`! |
| 42 | |
| 43 | /* |
| 44 | * Local functions... |
| 45 | */ |
| 46 | static void dpl_pcxcxx . . $ dpl_pcx(1d73a4498ccb64b0). (stp_vars_tcxx . . $ stp_vars_t# *, unsigned char *, int, int); |
| 47 | static int dpl_get_multipliercxx . . $ dpl_get_multiplier(b1be75487ade2f93). (const stp_vars_tcxx . . $ stp_vars_t# * v); |
| 48 | |
| 49 | #ifndef MAX |
| 50 | #define MAXcxx . . $ `src/main/print-dpl.c:50:9`!(a, b) ((a) > (b) ? (a) : (b)) |
| 51 | #endif /* !MAX */ |
| 52 | |
| 53 | typedef structcxx . . $ $anonymous_type_daa3e556b07fed8_0# |
| 54 | { |
| 55 | int heightcxx . . $ $anonymous_type_daa3e556b07fed8_0#height.; |
| 56 | int orientationcxx . . $ $anonymous_type_daa3e556b07fed8_0#orientation.; |
| 57 | int label_separatorcxx . . $ $anonymous_type_daa3e556b07fed8_0#label_separator.; |
| 58 | unsigned int h_offsetcxx . . $ $anonymous_type_daa3e556b07fed8_0#h_offset.; |
| 59 | unsigned int v_offsetcxx . . $ $anonymous_type_daa3e556b07fed8_0#v_offset.; |
| 60 | int darknesscxx . . $ $anonymous_type_daa3e556b07fed8_0#darkness.; |
| 61 | int speedcxx . . $ $anonymous_type_daa3e556b07fed8_0#speed.; |
| 62 | int presentcxx . . $ $anonymous_type_daa3e556b07fed8_0#present.; |
| 63 | } dpl_privdata_tcxx . . $ dpl_privdata_t#; |
| 64 | |
| 65 | /* |
| 66 | * Generic define for a name/value set |
| 67 | */ |
| 68 | |
| 69 | typedef structcxx . . $ $anonymous_type_daa3e556b07fed8_1# |
| 70 | { |
| 71 | const char *dpl_namecxx . . $ $anonymous_type_daa3e556b07fed8_1#dpl_name.; |
| 72 | const char *dpl_textcxx . . $ $anonymous_type_daa3e556b07fed8_1#dpl_text.; |
| 73 | int dpl_codecxx . . $ $anonymous_type_daa3e556b07fed8_1#dpl_code.; |
| 74 | int p0cxx . . $ $anonymous_type_daa3e556b07fed8_1#p0.; |
| 75 | int p1cxx . . $ $anonymous_type_daa3e556b07fed8_1#p1.; |
| 76 | } dpl_tcxx . . $ dpl_t#; |
| 77 | |
| 78 | |
| 79 | #define DPL_RES_150_150cxx . . $ `src/main/print-dpl.c:79:9`! 1 |
| 80 | #define DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`! 2 |
| 81 | #define DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`! 4 |
| 82 | #define DPL_RES_400_400cxx . . $ `src/main/print-dpl.c:82:9`! 8 |
| 83 | #define DPL_RES_600_600cxx . . $ `src/main/print-dpl.c:83:9`! 16 |
| 84 | |
| 85 | static const dpl_tcxx . . $ dpl_t# dpl_resolutionscxx . . $ dpl_resolutions.[] = { |
| 86 | {"600dpi", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("600x600 DPI"), DPL_RES_600_600cxx . . $ `src/main/print-dpl.c:83:9`!, 600, 600}, |
| 87 | {"400dpi", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("400x400 DPI"), DPL_RES_400_400cxx . . $ `src/main/print-dpl.c:82:9`!, 400, 400}, |
| 88 | {"300dpi", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("300x300 DPI"), DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, 300, 300}, |
| 89 | {"203dpi", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("203x203 DPI"), DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, 203, 203}, |
| 90 | {"150dpi", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("150x150 DPI"), DPL_RES_150_150cxx . . $ `src/main/print-dpl.c:79:9`!, 150, 150}, |
| 91 | }; |
| 92 | |
| 93 | #define NUM_RESOLUTIONScxx . . $ `src/main/print-dpl.c:93:9`! (sizeof(dpl_resolutions) / sizeof (dpl_t)) |
| 94 | |
| 95 | static const dpl_tcxx . . $ dpl_t# dpl_speedscxx . . $ dpl_speeds.[] = { |
| 96 | {"A", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("1.0 IPS"), 'A'}, |
| 97 | {"B", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("1.5 IPS"), 'B'}, |
| 98 | {"C", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("2.0 IPS"), 'C'}, |
| 99 | {"D", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("2.5 IPS"), 'D'}, |
| 100 | {"E", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("3.0 IPS"), 'E'}, |
| 101 | {"F", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("3.5 IPS"), 'F'}, |
| 102 | {"G", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("4.0 IPS"), 'G'}, |
| 103 | {"H", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("4.5 IPS"), 'H'}, |
| 104 | {"I", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("5.0 IPS"), 'I'}, |
| 105 | {"J", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("5.5 IPS"), 'J'}, |
| 106 | {"K", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("6.0 IPS"), 'K'}, |
| 107 | {"L", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("6.5 IPS"), 'L'}, |
| 108 | {"M", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("7.0 IPS"), 'M'}, |
| 109 | {"N", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("7.5 IPS"), 'N'}, |
| 110 | {"O", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("8.0 IPS"), 'O'}, |
| 111 | {"P", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("8.5 IPS"), 'P'}, |
| 112 | {"Q", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("9.0 IPS"), 'Q'}, |
| 113 | {"R", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("9.5 IPS"), 'R'}, |
| 114 | {"S", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("10.0 IPS"), 'S'}, |
| 115 | {"T", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("10.5 IPS"), 'T'}, |
| 116 | {"U", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("11.0 IPS"), 'U'}, |
| 117 | {"V", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("11.5 IPS"), 'V'}, |
| 118 | {"W", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("12.0 IPS"), 'W'}, |
| 119 | }; |
| 120 | |
| 121 | #define NUM_SPEEDScxx . . $ `src/main/print-dpl.c:121:9`! (sizeof(dpl_speeds) / sizeof (dpl_t)) |
| 122 | |
| 123 | /* |
| 124 | * Printer capability data |
| 125 | */ |
| 126 | |
| 127 | typedef structcxx . . $ $anonymous_type_daa3e556b07fed8_2# |
| 128 | { |
| 129 | int modelcxx . . $ $anonymous_type_daa3e556b07fed8_2#model.; |
| 130 | unsigned int custom_max_widthcxx . . $ $anonymous_type_daa3e556b07fed8_2#custom_max_width.; |
| 131 | unsigned int custom_max_heightcxx . . $ $anonymous_type_daa3e556b07fed8_2#custom_max_height.; |
| 132 | unsigned int custom_min_widthcxx . . $ $anonymous_type_daa3e556b07fed8_2#custom_min_width.; |
| 133 | unsigned int custom_min_heightcxx . . $ $anonymous_type_daa3e556b07fed8_2#custom_min_height.; |
| 134 | int resolutionscxx . . $ $anonymous_type_daa3e556b07fed8_2#resolutions.; |
| 135 | int max_resolutioncxx . . $ $anonymous_type_daa3e556b07fed8_2#max_resolution.; |
| 136 | int resolution_adjustcxx . . $ $anonymous_type_daa3e556b07fed8_2#resolution_adjust.; |
| 137 | char max_speedcxx . . $ $anonymous_type_daa3e556b07fed8_2#max_speed.; |
| 138 | char min_speedcxx . . $ $anonymous_type_daa3e556b07fed8_2#min_speed.; |
| 139 | char default_speedcxx . . $ $anonymous_type_daa3e556b07fed8_2#default_speed.; |
| 140 | } dpl_cap_tcxx . . $ dpl_cap_t#; |
| 141 | |
| 142 | static const dpl_cap_tcxx . . $ dpl_cap_t# dpl_model_capabilitiescxx . . $ dpl_model_capabilities.[] = { |
| 143 | /* Datamax-O'Neil Thermal DPL printers */ |
| 144 | {10017, /* I Class Mark II 203 DPI */ |
| 145 | 4 * 72, 99 * 72, /* Max paper size */ |
| 146 | 1, 1, /* Min paper size */ |
| 147 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 148 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 149 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 150 | 'W', |
| 151 | 'C', |
| 152 | 'O', |
| 153 | }, |
| 154 | /* Datamax-O'Neil Thermal DPL printers */ |
| 155 | {10018, /* I Class Mark II 300 DPI */ |
| 156 | 4 * 72, 99 * 72, /* Max paper size */ |
| 157 | 1, 1, /* Min paper size */ |
| 158 | DPL_RES_150_150cxx . . $ `src/main/print-dpl.c:79:9`! | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, /* Resolutions */ |
| 159 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, |
| 160 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 161 | 'S', |
| 162 | 'C', |
| 163 | 'O', |
| 164 | }, |
| 165 | /* Datamax-O'Neil Thermal DPL printers */ |
| 166 | {10020, /* I Class Mark II 600 DPI */ |
| 167 | 4 * 72, 99 * 72, /* Max paper size */ |
| 168 | 1, 1, /* Min paper size */ |
| 169 | /* for future use |
| 170 | DPL_RES_150_150 | DPL_RES_203_203 | DPL_RES_300_300 | DPL_RES_600_600, */ |
| 171 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`! | DPL_RES_600_600cxx . . $ `src/main/print-dpl.c:83:9`!, /* Resolutions */ |
| 172 | DPL_RES_600_600cxx . . $ `src/main/print-dpl.c:83:9`!, |
| 173 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, |
| 174 | 'K', |
| 175 | 'C', |
| 176 | 'G', |
| 177 | }, |
| 178 | /* Datamax-O'Neil Thermal DPL printers */ |
| 179 | {10021, /* E Class Mark III Basic 203 DPI*/ |
| 180 | 4 * 72, 99 * 72, /* Max paper size */ |
| 181 | 1, 1, /* Min paper size */ |
| 182 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolutions */ |
| 183 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 184 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 185 | 'G', |
| 186 | 'C', |
| 187 | 'E', |
| 188 | }, |
| 189 | /* Datamax-O'Neil Thermal DPL printers */ |
| 190 | {10022, /* E Class Mark III Basic 300 DPI*/ |
| 191 | 4 * 72, 99 * 72, /* Max paper size */ |
| 192 | 1, 1, /* Min paper size */ |
| 193 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, /* Resolutions */ |
| 194 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, |
| 195 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, |
| 196 | 'G', |
| 197 | 'C', |
| 198 | 'E', |
| 199 | }, |
| 200 | /* Datamax-O'Neil Thermal DPL printers */ |
| 201 | {10023, /* E Class Mark III Advanced 203 DPI*/ |
| 202 | 4 * 72, 99 * 72, /* Max paper size */ |
| 203 | 1, 1, /* Min paper size */ |
| 204 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolutions */ |
| 205 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 206 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 207 | 'I', |
| 208 | 'C', |
| 209 | 'E', |
| 210 | }, |
| 211 | /* Datamax-O'Neil Thermal DPL printers */ |
| 212 | {10024, /* E Class Mark III Advanced 300 DPI*/ |
| 213 | 4 * 72, 99 * 72, /* Max paper size */ |
| 214 | 1, 1, /* Min paper size */ |
| 215 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, /* Resolutions */ |
| 216 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, |
| 217 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, |
| 218 | 'I', |
| 219 | 'C', |
| 220 | 'G', |
| 221 | }, |
| 222 | /* Datamax-O'Neil Thermal DPL printers */ |
| 223 | {10025, /* E Class Mark III Pro 203 DPI*/ |
| 224 | 4 * 72, 99 * 72, /* Max paper size */ |
| 225 | 1, 1, /* Min paper size */ |
| 226 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolutions */ |
| 227 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 228 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 229 | 'K', |
| 230 | 'C', |
| 231 | 'G', |
| 232 | }, |
| 233 | /* Datamax-O'Neil Thermal DPL printers */ |
| 234 | {10026, /* E Class Mark III Pro 300 DPI*/ |
| 235 | 4 * 72, 99 * 72, /* Max paper size */ |
| 236 | 1, 1, /* Min paper size */ |
| 237 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, /* Resolutions */ |
| 238 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, |
| 239 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, |
| 240 | 'I', |
| 241 | 'C', |
| 242 | 'G', |
| 243 | }, |
| 244 | /* Datamax-O'Neil Thermal DPL printers */ |
| 245 | {10027, /* E Class Mark III ProPlus 203 DPI*/ |
| 246 | 4 * 72, 99 * 72, /* Max paper size */ |
| 247 | 1, 1, /* Min paper size */ |
| 248 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolutions */ |
| 249 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 250 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 251 | 'K', |
| 252 | 'C', |
| 253 | 'G', |
| 254 | }, |
| 255 | /* Datamax-O'Neil Thermal DPL printers */ |
| 256 | {10028, /* E Class Mark III ProPlus 300 DPI*/ |
| 257 | 4 * 72, 99 * 72, /* Max paper size */ |
| 258 | 1, 1, /* Min paper size */ |
| 259 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, /* Resolutions */ |
| 260 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, |
| 261 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, |
| 262 | 'I', |
| 263 | 'C', |
| 264 | 'G', |
| 265 | }, |
| 266 | /* Datamax-O'Neil Thermal DPL printers */ |
| 267 | {10029, /* RL3e */ |
| 268 | 3 * 72, 99 * 72, /* Max paper size */ |
| 269 | 1, 1, /* Min paper size */ |
| 270 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolutions */ |
| 271 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 272 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 273 | 'G', |
| 274 | 'A', |
| 275 | 'E', |
| 276 | }, |
| 277 | /* Datamax-O'Neil Thermal DPL printers */ |
| 278 | {10030, /* RL4e */ |
| 279 | 4 * 72, 99 * 72, /* Max paper size */ |
| 280 | 1, 1, /* Min paper size */ |
| 281 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolutions */ |
| 282 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 283 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 284 | 'G', |
| 285 | 'A', |
| 286 | 'E', |
| 287 | }, |
| 288 | /* Datamax-O'Neil Thermal DPL printers */ |
| 289 | {10031, /* H4212 */ |
| 290 | 4 * 72, 99 * 72, /* Max paper size */ |
| 291 | 1, 1, /* Min paper size */ |
| 292 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolutions */ |
| 293 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Max Resolution */ |
| 294 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolution Adjust */ |
| 295 | 'W', /* Maximum IPS */ |
| 296 | 'C', /* Minimum IPS */ |
| 297 | 'O', /* Default IPS */ |
| 298 | }, |
| 299 | /* Datamax-O'Neil Thermal DPL printers */ |
| 300 | {10032, /* H4212X */ |
| 301 | 4 * 72, 99 * 72, /* Max paper size */ |
| 302 | 1, 1, /* Min paper size */ |
| 303 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolutions */ |
| 304 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Max Resolution */ |
| 305 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolution Adjust */ |
| 306 | 'W', /* Maximum IPS */ |
| 307 | 'C', /* Minimum IPS */ |
| 308 | 'O', /* Default IPS */ |
| 309 | }, |
| 310 | /* Datamax-O'Neil Thermal DPL printers */ |
| 311 | {10033, /* H4310 */ |
| 312 | 4 * 72, 99 * 72, /* Max paper size */ |
| 313 | 1, 1, /* Min paper size */ |
| 314 | DPL_RES_150_150cxx . . $ `src/main/print-dpl.c:79:9`! | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, /* Resolutions */ |
| 315 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, /* Max Resolution */ |
| 316 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolution Adjust */ |
| 317 | 'S', /* Maximum IPS */ |
| 318 | 'C', /* Minimum IPS */ |
| 319 | 'O', /* Default IPS */ |
| 320 | }, |
| 321 | /* Datamax-O'Neil Thermal DPL printers */ |
| 322 | {10034, /* H4310X */ |
| 323 | 4 * 72, 99 * 72, /* Max paper size */ |
| 324 | 1, 1, /* Min paper size */ |
| 325 | DPL_RES_150_150cxx . . $ `src/main/print-dpl.c:79:9`! | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, /* Resolutions */ |
| 326 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, /* Max Resolution */ |
| 327 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolution Adjust */ |
| 328 | 'S', /* Maximum IPS */ |
| 329 | 'C', /* Minimum IPS */ |
| 330 | 'O', /* Default IPS */ |
| 331 | }, |
| 332 | /* Datamax-O'Neil Thermal DPL printers */ |
| 333 | {10035, /* H4408 */ |
| 334 | 4 * 72, 99 * 72, /* Max paper size */ |
| 335 | 1, 1, /* Min paper size */ |
| 336 | DPL_RES_400_400cxx . . $ `src/main/print-dpl.c:82:9`! | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolutions */ |
| 337 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Max Resolution */ |
| 338 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolution Adjust */ |
| 339 | 'O', /* Maximum IPS */ |
| 340 | 'C', /* Minimum IPS */ |
| 341 | 'G', /* Default IPS */ |
| 342 | }, |
| 343 | /* Datamax-O'Neil Thermal DPL printers */ |
| 344 | {10036, /* H4606 */ |
| 345 | 4 * 72, 99 * 72, /* Max paper size */ |
| 346 | 1, 1, /* Min paper size */ |
| 347 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`! | DPL_RES_600_600cxx . . $ `src/main/print-dpl.c:83:9`!, /* Resolutions */ |
| 348 | DPL_RES_600_600cxx . . $ `src/main/print-dpl.c:83:9`!, /* Max Resolution */ |
| 349 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, /* Resolution Adjust */ |
| 350 | 'K', /* Maximum IPS */ |
| 351 | 'C', /* Minimum IPS */ |
| 352 | 'G', /* Default IPS */ |
| 353 | }, |
| 354 | /* Datamax-O'Neil Thermal DPL printers */ |
| 355 | {10037, /* H4606X */ |
| 356 | 4 * 72, 99 * 72, /* Max paper size */ |
| 357 | 1, 1, /* Min paper size */ |
| 358 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`! | DPL_RES_600_600cxx . . $ `src/main/print-dpl.c:83:9`!, /* Resolutions */ |
| 359 | DPL_RES_600_600cxx . . $ `src/main/print-dpl.c:83:9`!, /* Max Resolution */ |
| 360 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, /* Resolution Adjust */ |
| 361 | 'K', /* Maximum IPS */ |
| 362 | 'C', /* Minimum IPS */ |
| 363 | 'G', /* Default IPS */ |
| 364 | }, |
| 365 | /* Datamax-O'Neil Thermal DPL printers */ |
| 366 | {10038, /* H6210 */ |
| 367 | 6 * 72, 99 * 72, /* Max paper size */ |
| 368 | 1, 1, /* Min paper size */ |
| 369 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolutions */ |
| 370 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Max Resolution */ |
| 371 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolution Adjust */ |
| 372 | 'S', /* Maximum IPS */ |
| 373 | 'C', /* Minimum IPS */ |
| 374 | 'O', /* Default IPS */ |
| 375 | }, |
| 376 | /* Datamax-O'Neil Thermal DPL printers */ |
| 377 | {10039, /* H6210X */ |
| 378 | 6 * 72, 99 * 72, /* Max paper size */ |
| 379 | 1, 1, /* Min paper size */ |
| 380 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolutions */ |
| 381 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Max Resolution */ |
| 382 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolution Adjust */ |
| 383 | 'S', /* Maximum IPS */ |
| 384 | 'C', /* Minimum IPS */ |
| 385 | 'O', /* Default IPS */ |
| 386 | }, |
| 387 | /* Datamax-O'Neil Thermal DPL printers */ |
| 388 | {10040, /* H6212 */ |
| 389 | 6 * 72, 99 * 72, /* Max paper size */ |
| 390 | 1, 1, /* Min paper size */ |
| 391 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolutions */ |
| 392 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Max Resolution */ |
| 393 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolution Adjust */ |
| 394 | 'W', /* Maximum IPS */ |
| 395 | 'C', /* Minimum IPS */ |
| 396 | 'O', /* Default IPS */ |
| 397 | }, |
| 398 | /* Datamax-O'Neil Thermal DPL printers */ |
| 399 | {10041, /* H6212X */ |
| 400 | 6 * 72, 99 * 72, /* Max paper size */ |
| 401 | 1, 1, /* Min paper size */ |
| 402 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolutions */ |
| 403 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Max Resolution */ |
| 404 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolution Adjust */ |
| 405 | 'W', /* Maximum IPS */ |
| 406 | 'C', /* Minimum IPS */ |
| 407 | 'O', /* Default IPS */ |
| 408 | }, |
| 409 | /* Datamax-O'Neil Thermal DPL printers */ |
| 410 | {10042, /* H6308 */ |
| 411 | 6 * 72, 99 * 72, /* Max paper size */ |
| 412 | 1, 1, /* Min paper size */ |
| 413 | DPL_RES_150_150cxx . . $ `src/main/print-dpl.c:79:9`! | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, /* Resolutions */ |
| 414 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, /* Max Resolution */ |
| 415 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolution Adjust */ |
| 416 | 'O', /* Maximum IPS */ |
| 417 | 'C', /* Minimum IPS */ |
| 418 | 'G', /* Default IPS */ |
| 419 | }, |
| 420 | /* Datamax-O'Neil Thermal DPL printers */ |
| 421 | {10043, /* H6310X */ |
| 422 | 6 * 72, 99 * 72, /* Max paper size */ |
| 423 | 1, 1, /* Min paper size */ |
| 424 | DPL_RES_150_150cxx . . $ `src/main/print-dpl.c:79:9`! | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, /* Resolutions */ |
| 425 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, /* Max Resolution */ |
| 426 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolution Adjust */ |
| 427 | 'S', /* Maximum IPS */ |
| 428 | 'C', /* Minimum IPS */ |
| 429 | 'O', /* Default IPS */ |
| 430 | }, |
| 431 | /* Datamax-O'Neil Thermal DPL printers */ |
| 432 | {10044, /* H8308 */ |
| 433 | 8.5 * 72, 99 * 72, /* Max paper size */ |
| 434 | 1, 1, /* Min paper size */ |
| 435 | DPL_RES_150_150cxx . . $ `src/main/print-dpl.c:79:9`! | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, /* Resolutions */ |
| 436 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, /* Max Resolution */ |
| 437 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolution Adjust */ |
| 438 | 'O', /* Maximum IPS */ |
| 439 | 'C', /* Minimum IPS */ |
| 440 | 'G', /* Default IPS */ |
| 441 | }, |
| 442 | /* Datamax-O'Neil Thermal DPL printers */ |
| 443 | {10045, /* H8308X */ |
| 444 | 8.5 * 72, 99 * 72, /* Max paper size */ |
| 445 | 1, 1, /* Min paper size */ |
| 446 | DPL_RES_150_150cxx . . $ `src/main/print-dpl.c:79:9`! | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, /* Resolutions */ |
| 447 | DPL_RES_300_300cxx . . $ `src/main/print-dpl.c:81:9`!, /* Max Resolution */ |
| 448 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolution Adjust */ |
| 449 | 'O', /* Maximum IPS */ |
| 450 | 'C', /* Minimum IPS */ |
| 451 | 'G', /* Default IPS */ |
| 452 | }, |
| 453 | /* Honeywell Thermal DPL printers */ |
| 454 | {10046, /* RP2 */ |
| 455 | 2 * 72, 99 * 72, /* Max paper size */ |
| 456 | 1, 1, /* Min paper size */ |
| 457 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolutions */ |
| 458 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 459 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 460 | 'I', |
| 461 | 'A', |
| 462 | 'E', |
| 463 | }, |
| 464 | /* Honeywell Thermal DPL printers */ |
| 465 | {10047, /* RP4 */ |
| 466 | 4 * 72, 99 * 72, /* Max paper size */ |
| 467 | 1, 1, /* Min paper size */ |
| 468 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, /* Resolutions */ |
| 469 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 470 | DPL_RES_203_203cxx . . $ `src/main/print-dpl.c:80:9`!, |
| 471 | 'I', |
| 472 | 'A', |
| 473 | 'E', |
| 474 | }, |
| 475 | }; |
| 476 | |
| 477 | static const stp_parameter_tcxx . . $ stp_parameter_t# the_parameterscxx . . $ the_parameters.[] = { |
| 478 | { |
| 479 | "PageSize", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Page Size"), "Color=No,Category=Basic Printer Setup", |
| 480 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Size of the paper being printed to"), |
| 481 | STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST., STP_PARAMETER_CLASS_COREcxx . . $ STP_PARAMETER_CLASS_CORE., |
| 482 | STP_PARAMETER_LEVEL_BASICcxx . . $ STP_PARAMETER_LEVEL_BASIC., 1, 1, STP_CHANNEL_NONEcxx . . $ `include/gutenprint/vars.h:154:9`!, 1, 0}, |
| 483 | { |
| 484 | "Resolution", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Resolution"), "Color=No,Category=Basic Printer Setup", |
| 485 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Resolution of the print"), |
| 486 | STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST., STP_PARAMETER_CLASS_FEATUREcxx . . $ STP_PARAMETER_CLASS_FEATURE., |
| 487 | STP_PARAMETER_LEVEL_BASICcxx . . $ STP_PARAMETER_LEVEL_BASIC., 1, 1, STP_CHANNEL_NONEcxx . . $ `include/gutenprint/vars.h:154:9`!, 1, 0}, |
| 488 | { |
| 489 | "PrintingMode", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Printing Mode"), "Color=Yes,Category=Core Parameter", |
| 490 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Printing Output Mode"), |
| 491 | STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST., STP_PARAMETER_CLASS_COREcxx . . $ STP_PARAMETER_CLASS_CORE., |
| 492 | STP_PARAMETER_LEVEL_BASICcxx . . $ STP_PARAMETER_LEVEL_BASIC., 1, 1, STP_CHANNEL_NONEcxx . . $ `include/gutenprint/vars.h:154:9`!, 1, 0 |
| 493 | }, |
| 494 | #ifdef FIXME /* Orientation not available for graphics, need |
| 495 | * rotation routine in this driver */ |
| 496 | { |
| 497 | "Orientation", N_("Orientation"), "Color=No,Category=Basic Printer Setup", |
| 498 | N_("Orientation, Portrait, Landscape, Upside Down, Seascape"), |
| 499 | STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_FEATURE, |
| 500 | STP_PARAMETER_LEVEL_BASIC, 1, 1, STP_CHANNEL_NONE, 1, 0 |
| 501 | }, |
| 502 | #endif |
| 503 | { |
| 504 | "LabelSeparator", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Media Index Type"), |
| 505 | "Color=No,Category=Basic Printer Setup", |
| 506 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Gap, Notch, Hole, Black Mark, Continuous"), |
| 507 | STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST., STP_PARAMETER_CLASS_FEATUREcxx . . $ STP_PARAMETER_CLASS_FEATURE., |
| 508 | STP_PARAMETER_LEVEL_BASICcxx . . $ STP_PARAMETER_LEVEL_BASIC., 1, 1, STP_CHANNEL_NONEcxx . . $ `include/gutenprint/vars.h:154:9`!, 1, 0, |
| 509 | }, |
| 510 | { |
| 511 | "Darkness", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Darkness"), "Color=No,Category=Basic Printer Setup", |
| 512 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Darkness Adjust, from 0 to 30"), |
| 513 | STP_PARAMETER_TYPE_INTcxx . . $ STP_PARAMETER_TYPE_INT., STP_PARAMETER_CLASS_FEATUREcxx . . $ STP_PARAMETER_CLASS_FEATURE., |
| 514 | STP_PARAMETER_LEVEL_BASICcxx . . $ STP_PARAMETER_LEVEL_BASIC., 0, 1, STP_CHANNEL_NONEcxx . . $ `include/gutenprint/vars.h:154:9`!, 1, 0}, |
| 515 | { |
| 516 | "Speed", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Print Speed"), "Color=No,Category=Basic Printer Setup", |
| 517 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Speed Adjust"), |
| 518 | STP_PARAMETER_TYPE_STRING_LISTcxx . . $ STP_PARAMETER_TYPE_STRING_LIST., STP_PARAMETER_CLASS_FEATUREcxx . . $ STP_PARAMETER_CLASS_FEATURE., |
| 519 | STP_PARAMETER_LEVEL_BASICcxx . . $ STP_PARAMETER_LEVEL_BASIC., 1, 1, STP_CHANNEL_NONEcxx . . $ `include/gutenprint/vars.h:154:9`!, 0, 0}, |
| 520 | }; |
| 521 | |
| 522 | static const unsigned int the_parameter_countcxx . . $ the_parameter_count. = |
| 523 | sizeof (the_parameterscxx . . $ the_parameters.) / sizeof (const stp_parameter_tcxx . . $ stp_parameter_t#); |
| 524 | |
| 525 | typedef structcxx . . $ $anonymous_type_daa3e556b07fed8_3# |
| 526 | { |
| 527 | const stp_parameter_tcxx . . $ stp_parameter_t# paramcxx . . $ $anonymous_type_daa3e556b07fed8_3#param.; |
| 528 | double mincxx . . $ $anonymous_type_daa3e556b07fed8_3#min.; |
| 529 | double maxcxx . . $ $anonymous_type_daa3e556b07fed8_3#max.; |
| 530 | double defvalcxx . . $ $anonymous_type_daa3e556b07fed8_3#defval.; |
| 531 | int color_onlycxx . . $ $anonymous_type_daa3e556b07fed8_3#color_only.; |
| 532 | } float_param_tcxx . . $ float_param_t#; |
| 533 | |
| 534 | static const float_param_tcxx . . $ float_param_t# float_parameterscxx . . $ float_parameters.[] = { |
| 535 | { |
| 536 | { |
| 537 | "HorizOffset", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Horizontal Offset"), |
| 538 | "Color=No,Category=Basic Output Adjustment", |
| 539 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Adjust horizontal position"), |
| 540 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 541 | STP_PARAMETER_LEVEL_ADVANCED3cxx . . $ STP_PARAMETER_LEVEL_ADVANCED3., 1, 1, STP_CHANNEL_NONEcxx . . $ `include/gutenprint/vars.h:154:9`!, 1, 0, |
| 542 | }, 0.0, 4.0, 0.0, 0}, |
| 543 | { |
| 544 | { |
| 545 | "VertOffset", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Vertical Offset"), |
| 546 | "Color=No,Category=Basic Output Adjustment", |
| 547 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Adjust vertical position"), |
| 548 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_OUTPUTcxx . . $ STP_PARAMETER_CLASS_OUTPUT., |
| 549 | STP_PARAMETER_LEVEL_ADVANCED3cxx . . $ STP_PARAMETER_LEVEL_ADVANCED3., 1, 1, STP_CHANNEL_NONEcxx . . $ `include/gutenprint/vars.h:154:9`!, 1, 0, |
| 550 | }, 0.0, 10.0, 0.0, 0}, |
| 551 | { |
| 552 | { |
| 553 | "Present", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Present Distance"), |
| 554 | "Color=No,Category=Basic Output Adjustment", |
| 555 | N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Presnt Distance, 0.0 advances the default."), |
| 556 | STP_PARAMETER_TYPE_DOUBLEcxx . . $ STP_PARAMETER_TYPE_DOUBLE., STP_PARAMETER_CLASS_FEATUREcxx . . $ STP_PARAMETER_CLASS_FEATURE., |
| 557 | STP_PARAMETER_LEVEL_BASICcxx . . $ STP_PARAMETER_LEVEL_BASIC., 1, 1, STP_CHANNEL_NONEcxx . . $ `include/gutenprint/vars.h:154:9`!, 1, 0, |
| 558 | }, 0.0, 10.0, 0.0, 0}, |
| 559 | }; |
| 560 | |
| 561 | static const unsigned int float_parameter_countcxx . . $ float_parameter_count. = |
| 562 | sizeof (float_parameterscxx . . $ float_parameters.) / sizeof (const float_param_tcxx . . $ float_param_t#); |
| 563 | |
| 564 | /* |
| 565 | * Convert a value into it's option name |
| 566 | */ |
| 567 | |
| 568 | static const char * |
| 569 | dpl_val_to_stringcxx . . $ dpl_val_to_string(78d9a2fa4a34304a). (const stp_vars_tcxx . . $ stp_vars_t# *v, |
| 570 | int code, /* I: Code */ |
| 571 | const dpl_tcxx . . $ dpl_t# * options, /* I: Options */ |
| 572 | int num_options) /* I: Num options */ |
| 573 | { |
| 574 | |
| 575 | int i; |
| 576 | const char *string = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 577 | |
| 578 | /* |
| 579 | * Look up the code in the table and convert to the string. |
| 580 | */ |
| 581 | |
| 582 | for (i = 0; i < num_options; i++) |
| 583 | { |
| 584 | if (code == options[i].dpl_codecxx . . $ $anonymous_type_daa3e556b07fed8_1#dpl_code.) |
| 585 | { |
| 586 | string = options[i].dpl_namecxx . . $ $anonymous_type_daa3e556b07fed8_1#dpl_name.; |
| 587 | break; |
| 588 | } |
| 589 | } |
| 590 | |
| 591 | stp_dprintfcxx . . $ stp_dprintf(13526ca24396f6ac). (STP_DBG_DPLcxx . . $ `include/gutenprint/util.h:190:9`!, v, "Code: %d, String: %s\n", code, string); |
| 592 | |
| 593 | return (string); |
| 594 | } |
| 595 | |
| 596 | static const char * |
| 597 | dpl_val_to_textcxx . . $ dpl_val_to_text(78d9a2fa4a34304a). (const stp_vars_tcxx . . $ stp_vars_t# *v, |
| 598 | int code, /* I: Code */ |
| 599 | const dpl_tcxx . . $ dpl_t# * options, /* I: Options */ |
| 600 | int num_options) /* I: Num options */ |
| 601 | { |
| 602 | |
| 603 | int i; |
| 604 | const char *string = "<null>"; |
| 605 | |
| 606 | /* |
| 607 | * Look up the code in the table and convert to the string. |
| 608 | */ |
| 609 | |
| 610 | for (i = 0; i < num_options; i++) |
| 611 | { |
| 612 | if (code == options[i].dpl_codecxx . . $ $anonymous_type_daa3e556b07fed8_1#dpl_code.) |
| 613 | { |
| 614 | string = gettextcxx . . $ `include/gutenprint/gutenprint-intl-internal.h:61:11`! (options[i].dpl_text); |
| 615 | break; |
| 616 | } |
| 617 | } |
| 618 | |
| 619 | stp_dprintfcxx . . $ stp_dprintf(13526ca24396f6ac). (STP_DBG_DPLcxx . . $ `include/gutenprint/util.h:190:9`!, v, "Code: %d, String: %s\n", code, string); |
| 620 | |
| 621 | return (string); |
| 622 | } |
| 623 | |
| 624 | /* |
| 625 | * dpl_get_model_capabilities() - Return struct of model capabilities |
| 626 | */ |
| 627 | |
| 628 | static const dpl_cap_tcxx . . $ dpl_cap_t# * /* O: Capabilities */ |
| 629 | dpl_get_model_capabilitiescxx . . $ dpl_get_model_capabilities(bbada5572716dfb4). (const stp_vars_tcxx . . $ stp_vars_t# *v) /* I: Model */ |
| 630 | { |
| 631 | int i; |
| 632 | int model = stp_get_model_idcxx . . $ stp_get_model_id(b1be75487ade2f93).(v); |
| 633 | int models = sizeof (dpl_model_capabilitiescxx . . $ dpl_model_capabilities.) / sizeof (dpl_cap_tcxx . . $ dpl_cap_t#); |
| 634 | for (i = 0; i < models; i++) |
| 635 | { |
| 636 | if (dpl_model_capabilitiescxx . . $ dpl_model_capabilities.[i].modelcxx . . $ $anonymous_type_daa3e556b07fed8_2#model. == model) |
| 637 | { |
| 638 | return &(dpl_model_capabilitiescxx . . $ dpl_model_capabilities.[i]); |
| 639 | } |
| 640 | } |
| 641 | stp_eprintfcxx . . $ stp_eprintf(7aef7aa9b820d38). (v, "dpl: model %d not found in capabilities list.\n", model); |
| 642 | return &(dpl_model_capabilitiescxx . . $ dpl_model_capabilities.[0]); |
| 643 | } |
| 644 | |
| 645 | /* |
| 646 | * Determine the current resolution |
| 647 | */ |
| 648 | |
| 649 | static void |
| 650 | dpl_describe_resolutioncxx . . $ dpl_describe_resolution(5883f070c6139f40). (const stp_vars_tcxx . . $ stp_vars_t# * v, stp_resolution_tcxx . . $ stp_resolution_t# *x, stp_resolution_tcxx . . $ stp_resolution_t# *y) |
| 651 | { |
| 652 | unsigned int i; |
| 653 | const char *resolution = stp_get_string_parametercxx . . $ stp_get_string_parameter(3e3ce5d385745545). (v, "Resolution"); |
| 654 | |
| 655 | *x = -1; |
| 656 | *y = -1; |
| 657 | if (resolution) |
| 658 | { |
| 659 | for (i = 0; i < NUM_RESOLUTIONScxx . . $ `src/main/print-dpl.c:93:9`!; i++) |
| 660 | { |
| 661 | if (!strcmpcxx . . $ strcmp(5ae29d726ae57f88). (resolution, dpl_resolutionscxx . . $ dpl_resolutions.[i].dpl_namecxx . . $ $anonymous_type_daa3e556b07fed8_1#dpl_name.)) |
| 662 | { |
| 663 | *x = dpl_resolutionscxx . . $ dpl_resolutions.[i].p0cxx . . $ $anonymous_type_daa3e556b07fed8_1#p0.; |
| 664 | *y = dpl_resolutionscxx . . $ dpl_resolutions.[i].p1cxx . . $ $anonymous_type_daa3e556b07fed8_1#p1.; |
| 665 | } |
| 666 | } |
| 667 | } |
| 668 | if (*x != *y) { |
| 669 | if (*x > *y) { |
| 670 | *y = *x; |
| 671 | } else { |
| 672 | *x = *y; |
| 673 | } |
| 674 | } |
| 675 | } |
| 676 | |
| 677 | int |
| 678 | dpl_get_multipliercxx . . $ dpl_get_multiplier(b1be75487ade2f93). (const stp_vars_tcxx . . $ stp_vars_t# * v) |
| 679 | { |
| 680 | stp_resolution_tcxx . . $ stp_resolution_t# x, y; |
| 681 | int multiplier; |
| 682 | unsigned int i; |
| 683 | int max_dpi = 0; |
| 684 | |
| 685 | const dpl_cap_tcxx . . $ dpl_cap_t# *caps = dpl_get_model_capabilitiescxx . . $ dpl_get_model_capabilities(bbada5572716dfb4). (v); |
| 686 | |
| 687 | for (i = 0; i < NUM_RESOLUTIONScxx . . $ `src/main/print-dpl.c:93:9`!; i++) |
| 688 | { |
| 689 | if (caps->max_resolutioncxx . . $ $anonymous_type_daa3e556b07fed8_2#max_resolution. == dpl_resolutionscxx . . $ dpl_resolutions.[i].dpl_codecxx . . $ $anonymous_type_daa3e556b07fed8_1#dpl_code.) |
| 690 | { |
| 691 | max_dpi = dpl_resolutionscxx . . $ dpl_resolutions.[i].p0cxx . . $ $anonymous_type_daa3e556b07fed8_1#p0.; |
| 692 | } |
| 693 | } |
| 694 | |
| 695 | // XXX error if max_dpi is 0? |
| 696 | |
| 697 | dpl_describe_resolutioncxx . . $ dpl_describe_resolution(5883f070c6139f40). (v, &x, &y); |
| 698 | |
| 699 | if (x == max_dpi) |
| 700 | multiplier = 1; |
| 701 | else |
| 702 | multiplier = 2; |
| 703 | |
| 704 | return multiplier; |
| 705 | } |
| 706 | |
| 707 | #ifdef FIXME |
| 708 | /* |
| 709 | * Orientation support - modes available |
| 710 | * Note that the internal names MUST match those in cups/genppd.c else the |
| 711 | * PPD files will not be generated correctly |
| 712 | */ |
| 713 | |
| 714 | static const stp_param_string_t orientation_types[] = { |
| 715 | {"Portrait", N_("Portrait")}, |
| 716 | {"Landscape", N_("Landscape")}, |
| 717 | {"UpsideDown", N_("Reverse Portrait")}, |
| 718 | {"Seascape", N_("Reverse Landscape")}, |
| 719 | }; |
| 720 | |
| 721 | #define NUM_ORIENTATION (sizeof (orientation_types) / sizeof (stp_param_string_t)) |
| 722 | #endif |
| 723 | |
| 724 | /* |
| 725 | * Label Separator Support for D-O printers, modes available |
| 726 | */ |
| 727 | |
| 728 | static const stp_param_string_tcxx . . $ stp_param_string_t# label_separator_typescxx . . $ label_separator_types.[] = { |
| 729 | {"IGNORE", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Printer Setting")}, |
| 730 | {"GAP", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Gap")}, |
| 731 | {"NOTCH", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Notch")}, |
| 732 | {"HOLE", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Hole")}, |
| 733 | {"MARK", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Black Mark")}, |
| 734 | {"CONTINUOUS", N_cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:67:17`!("Continuous")}, |
| 735 | }; |
| 736 | |
| 737 | #define NUM_LABEL_SEPARATORcxx . . $ `src/main/print-dpl.c:737:9`! (sizeof (label_separator_types) / sizeof (stp_param_string_t)) |
| 738 | |
| 739 | /* |
| 740 | * 'dpl_papersize_valid()' - Is the paper size valid for this printer. |
| 741 | */ |
| 742 | |
| 743 | static int |
| 744 | dpl_papersize_validcxx . . $ dpl_papersize_valid(f165717c60361d82). (const stp_vars_tcxx . . $ stp_vars_t# *v, const stp_papersize_tcxx . . $ stp_papersize_t# * pt) |
| 745 | { |
| 746 | const dpl_cap_tcxx . . $ dpl_cap_t# *caps = dpl_get_model_capabilitiescxx . . $ dpl_get_model_capabilities(bbada5572716dfb4). (v); |
| 747 | unsigned int pwidth = pt->widthcxx . . $ $anonymous_type_51fd7f0ef3c7bff0_2#width.; |
| 748 | unsigned int pheight = pt->heightcxx . . $ $anonymous_type_51fd7f0ef3c7bff0_2#height.; |
| 749 | |
| 750 | /* |
| 751 | * Is it a valid name? |
| 752 | */ |
| 753 | |
| 754 | if (strlencxx . . $ strlen(751346f8406fd082). (pt->namecxx . . $ $anonymous_type_51fd7f0ef3c7bff0_2#name.) <= 0) |
| 755 | return (0); |
| 756 | |
| 757 | /* |
| 758 | * We are allowed custom paper sizes. Check that the size is within |
| 759 | * limits. Check that the name contains d-o if this is the |
| 760 | * Datamax O'Neil label printer and not custom paper |
| 761 | */ |
| 762 | |
| 763 | if (pwidth <= caps->custom_max_widthcxx . . $ $anonymous_type_daa3e556b07fed8_2#custom_max_width. && |
| 764 | pheight <= caps->custom_max_heightcxx . . $ $anonymous_type_daa3e556b07fed8_2#custom_max_height. && |
| 765 | (pheight >= caps->custom_min_heightcxx . . $ $anonymous_type_daa3e556b07fed8_2#custom_min_height. || pheight == 0) && |
| 766 | (pwidth >= caps->custom_min_widthcxx . . $ $anonymous_type_daa3e556b07fed8_2#custom_min_width. || pwidth == 0)) |
| 767 | { |
| 768 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (pt->namecxx . . $ $anonymous_type_51fd7f0ef3c7bff0_2#name., "Custom")) |
| 769 | { |
| 770 | if (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! != strstrcxx . . $ strstr(a713fe7b9a57cf96). (pt->namecxx . . $ $anonymous_type_51fd7f0ef3c7bff0_2#name., "d-o")) |
| 771 | { |
| 772 | return (1); |
| 773 | } |
| 774 | else |
| 775 | { |
| 776 | return (0); |
| 777 | } |
| 778 | } |
| 779 | } |
| 780 | |
| 781 | return (0); |
| 782 | } |
| 783 | |
| 784 | /* |
| 785 | * 'dpl_parameters()' - Return the parameter values for the given parameter. |
| 786 | */ |
| 787 | |
| 788 | static stp_parameter_list_tcxx . . $ stp_parameter_list_t# |
| 789 | dpl_list_parameterscxx . . $ dpl_list_parameters(817585d40f809196). (const stp_vars_tcxx . . $ stp_vars_t# * v) |
| 790 | { |
| 791 | stp_parameter_list_tcxx . . $ stp_parameter_list_t# *ret; |
| 792 | unsigned int i; |
| 793 | (void)v; |
| 794 | |
| 795 | ret = stp_parameter_list_createcxx . . $ stp_parameter_list_create(50c7df7de5344ebb). (); |
| 796 | for (i = 0; i < the_parameter_countcxx . . $ the_parameter_count.; i++) |
| 797 | stp_parameter_list_add_paramcxx . . $ stp_parameter_list_add_param(9dab94dbd10bbd1f). (ret, &(the_parameterscxx . . $ the_parameters.[i])); |
| 798 | for (i = 0; i < float_parameter_countcxx . . $ float_parameter_count.; i++) |
| 799 | stp_parameter_list_add_paramcxx . . $ stp_parameter_list_add_param(9dab94dbd10bbd1f). (ret, &(float_parameterscxx . . $ float_parameters.[i].paramcxx . . $ $anonymous_type_daa3e556b07fed8_3#param.)); |
| 800 | return ret; |
| 801 | } |
| 802 | |
| 803 | static void |
| 804 | dpl_parameterscxx . . $ dpl_parameters(dfd5b9531b51a6d2). (const stp_vars_tcxx . . $ stp_vars_t# * v, const char *name, |
| 805 | stp_parameter_tcxx . . $ stp_parameter_t# * description) |
| 806 | { |
| 807 | int model = stp_get_model_idcxx . . $ stp_get_model_id(b1be75487ade2f93). (v); |
| 808 | unsigned int i; |
| 809 | const dpl_cap_tcxx . . $ dpl_cap_t# *caps; |
| 810 | description->p_typecxx . . $ $anonymous_type_c987533f3b833c82_8#p_type. = STP_PARAMETER_TYPE_INVALIDcxx . . $ STP_PARAMETER_TYPE_INVALID.; |
| 811 | |
| 812 | if (name == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 813 | return; |
| 814 | |
| 815 | stp_dprintfcxx . . $ stp_dprintf(13526ca24396f6ac). (STP_DBG_DPLcxx . . $ `include/gutenprint/util.h:190:9`!, v, "dpl_parameters(): Name = %s\n", name); |
| 816 | |
| 817 | caps = dpl_get_model_capabilitiescxx . . $ dpl_get_model_capabilities(bbada5572716dfb4). (v); |
| 818 | |
| 819 | stp_dprintfcxx . . $ stp_dprintf(13526ca24396f6ac). (STP_DBG_DPLcxx . . $ `include/gutenprint/util.h:190:9`!, v, "Printer model = %d\n", model); |
| 820 | stp_dprintfcxx . . $ stp_dprintf(13526ca24396f6ac). (STP_DBG_DPLcxx . . $ `include/gutenprint/util.h:190:9`!, v, "PageWidth = %d, PageHeight = %d\n", |
| 821 | caps->custom_max_widthcxx . . $ $anonymous_type_daa3e556b07fed8_2#custom_max_width., caps->custom_max_heightcxx . . $ $anonymous_type_daa3e556b07fed8_2#custom_max_height.); |
| 822 | stp_dprintfcxx . . $ stp_dprintf(13526ca24396f6ac). (STP_DBG_DPLcxx . . $ `include/gutenprint/util.h:190:9`!, v, "MinPageWidth = %d, MinPageHeight = %d\n", |
| 823 | caps->custom_min_widthcxx . . $ $anonymous_type_daa3e556b07fed8_2#custom_min_width., caps->custom_min_heightcxx . . $ $anonymous_type_daa3e556b07fed8_2#custom_min_height.); |
| 824 | stp_dprintfcxx . . $ stp_dprintf(13526ca24396f6ac). (STP_DBG_DPLcxx . . $ `include/gutenprint/util.h:190:9`!, v, "Resolutions: %d\n", caps->resolutionscxx . . $ $anonymous_type_daa3e556b07fed8_2#resolutions.); |
| 825 | |
| 826 | for (i = 0; i < the_parameter_countcxx . . $ the_parameter_count.; i++) |
| 827 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (name, the_parameterscxx . . $ the_parameters.[i].namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.) == 0) |
| 828 | { |
| 829 | stp_fill_parameter_settingscxx . . $ stp_fill_parameter_settings(bb1f9d668495a4b4). (description, &(the_parameterscxx . . $ the_parameters.[i])); |
| 830 | break; |
| 831 | } |
| 832 | description->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 833 | |
| 834 | for (i = 0; i < float_parameter_countcxx . . $ float_parameter_count.; i++) |
| 835 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (name, float_parameterscxx . . $ float_parameters.[i].paramcxx . . $ $anonymous_type_daa3e556b07fed8_3#param..namecxx . . $ $anonymous_type_c987533f3b833c82_8#name.) == 0) |
| 836 | { |
| 837 | stp_fill_parameter_settingscxx . . $ stp_fill_parameter_settings(bb1f9d668495a4b4). (description, |
| 838 | &(float_parameterscxx . . $ float_parameters.[i].paramcxx . . $ $anonymous_type_daa3e556b07fed8_3#param.)); |
| 839 | description->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#dbl. = float_parameterscxx . . $ float_parameters.[i].defvalcxx . . $ $anonymous_type_daa3e556b07fed8_3#defval.; |
| 840 | description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dbl..uppercxx . . $ $anonymous_type_c987533f3b833c82_5#upper. = float_parameterscxx . . $ float_parameters.[i].maxcxx . . $ $anonymous_type_daa3e556b07fed8_3#max.; |
| 841 | description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..dblcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#dbl..lowercxx . . $ $anonymous_type_c987533f3b833c82_5#lower. = float_parameterscxx . . $ float_parameters.[i].mincxx . . $ $anonymous_type_daa3e556b07fed8_3#min.; |
| 842 | break; |
| 843 | } |
| 844 | |
| 845 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (name, "PageSize") == 0) |
| 846 | { |
| 847 | const stp_papersize_list_tcxx . . $ stp_papersize_list_t# *paper_sizes = |
| 848 | stpi_get_papersize_list_namedcxx . . $ stpi_get_papersize_list_named(81f88378de3f2d3).("labels", ""); |
| 849 | const stp_papersize_list_item_tcxx . . $ stp_papersize_list_item_t# *ptli = |
| 850 | stpi_papersize_list_get_startcxx . . $ `src/main/gutenprint-internal.h:121:9`!(paper_sizes); |
| 851 | description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str. = stp_string_list_createcxx . . $ stp_string_list_create(f262b3b5e10fad14). (); |
| 852 | while (ptli) |
| 853 | { |
| 854 | const stp_papersize_tcxx . . $ stp_papersize_t# *pt = stpi_paperlist_item_get_datacxx . . $ `src/main/gutenprint-internal.h:125:9`!(ptli); |
| 855 | if (strlencxx . . $ strlen(751346f8406fd082). (pt->namecxx . . $ $anonymous_type_51fd7f0ef3c7bff0_2#name.) > 0 && dpl_papersize_validcxx . . $ dpl_papersize_valid(f165717c60361d82). (v, pt)) |
| 856 | stp_string_list_add_stringcxx . . $ stp_string_list_add_string(61ec312b340c2952).(description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., |
| 857 | pt->namecxx . . $ $anonymous_type_51fd7f0ef3c7bff0_2#name., gettextcxx . . $ `include/gutenprint/gutenprint-intl-internal.h:61:11`!(pt->text)); |
| 858 | ptli = stpi_paperlist_item_nextcxx . . $ `src/main/gutenprint-internal.h:123:9`!(ptli); |
| 859 | } |
| 860 | description->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str. = |
| 861 | stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a). (description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., 0)->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.; |
| 862 | } |
| 863 | else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (name, "Resolution") == 0) |
| 864 | { |
| 865 | description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str. = stp_string_list_createcxx . . $ stp_string_list_create(f262b3b5e10fad14). (); |
| 866 | description->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str. = |
| 867 | dpl_val_to_stringcxx . . $ dpl_val_to_string(78d9a2fa4a34304a). (v, caps->max_resolutioncxx . . $ $anonymous_type_daa3e556b07fed8_2#max_resolution., dpl_resolutionscxx . . $ dpl_resolutions., |
| 868 | NUM_RESOLUTIONScxx . . $ `src/main/print-dpl.c:93:9`!); |
| 869 | for (i = 0; i < NUM_RESOLUTIONScxx . . $ `src/main/print-dpl.c:93:9`!; i++) |
| 870 | if (caps->resolutionscxx . . $ $anonymous_type_daa3e556b07fed8_2#resolutions. & dpl_resolutionscxx . . $ dpl_resolutions.[i].dpl_codecxx . . $ $anonymous_type_daa3e556b07fed8_1#dpl_code.) |
| 871 | { |
| 872 | stp_string_list_add_stringcxx . . $ stp_string_list_add_string(61ec312b340c2952). |
| 873 | (description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., |
| 874 | dpl_val_to_stringcxx . . $ dpl_val_to_string(78d9a2fa4a34304a). (v, dpl_resolutionscxx . . $ dpl_resolutions.[i].dpl_codecxx . . $ $anonymous_type_daa3e556b07fed8_1#dpl_code., |
| 875 | dpl_resolutionscxx . . $ dpl_resolutions., NUM_RESOLUTIONScxx . . $ `src/main/print-dpl.c:93:9`!), |
| 876 | dpl_val_to_textcxx . . $ dpl_val_to_text(78d9a2fa4a34304a). (v, dpl_resolutionscxx . . $ dpl_resolutions.[i].dpl_codecxx . . $ $anonymous_type_daa3e556b07fed8_1#dpl_code., |
| 877 | dpl_resolutionscxx . . $ dpl_resolutions., NUM_RESOLUTIONScxx . . $ `src/main/print-dpl.c:93:9`!)); |
| 878 | } |
| 879 | } |
| 880 | else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(name, "PrintingMode") == 0) |
| 881 | { |
| 882 | description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str. = stp_string_list_createcxx . . $ stp_string_list_create(f262b3b5e10fad14).(); |
| 883 | stp_string_list_add_stringcxx . . $ stp_string_list_add_string(61ec312b340c2952). |
| 884 | (description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., "BW", _cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:58:11`!("Black and White")); |
| 885 | description->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str. = |
| 886 | stp_string_list_paramcxx . . $ stp_string_list_param(1d71fb1c8ad3926a).(description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., 0)->namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.; |
| 887 | } |
| 888 | #ifdef FIXME |
| 889 | else if (strcmp (name, "Orientation") == 0) |
| 890 | { |
| 891 | description->bounds.str = stp_string_list_create (); |
| 892 | description->deflt.str = orientation_types[0].name; |
| 893 | for (i = 0; i < NUM_ORIENTATION; i++) |
| 894 | { |
| 895 | stp_string_list_add_string (description->bounds.str, |
| 896 | orientation_types[i].name, |
| 897 | gettext (orientation_types[i].text)); |
| 898 | } |
| 899 | } |
| 900 | #endif |
| 901 | else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (name, "LabelSeparator") == 0) |
| 902 | { |
| 903 | description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str. = stp_string_list_createcxx . . $ stp_string_list_create(f262b3b5e10fad14). (); |
| 904 | description->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str. = label_separator_typescxx . . $ label_separator_types.[0].namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name.; |
| 905 | for (i = 0; i < NUM_LABEL_SEPARATORcxx . . $ `src/main/print-dpl.c:737:9`!; i++) |
| 906 | { |
| 907 | stp_string_list_add_stringcxx . . $ stp_string_list_add_string(61ec312b340c2952). (description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., |
| 908 | label_separator_typescxx . . $ label_separator_types.[i].namecxx . . $ $anonymous_type_cb0224bbe5755622_0#name., |
| 909 | gettextcxx . . $ `include/gutenprint/gutenprint-intl-internal.h:61:11`! (label_separator_types[i]. |
| 910 | text)); |
| 911 | } |
| 912 | } |
| 913 | else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (name, "Darkness") == 0) |
| 914 | { |
| 915 | description->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#integer. = -1; |
| 916 | description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#integer..lowercxx . . $ $anonymous_type_c987533f3b833c82_6#lower. = 0; |
| 917 | description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..integercxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#integer..uppercxx . . $ $anonymous_type_c987533f3b833c82_6#upper. = 30; |
| 918 | } |
| 919 | else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (name, "Speed") == 0) |
| 920 | { |
| 921 | description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str. = stp_string_list_createcxx . . $ stp_string_list_create(f262b3b5e10fad14). (); |
| 922 | stp_string_list_add_stringcxx . . $ stp_string_list_add_string(61ec312b340c2952). (description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., "None", |
| 923 | _cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:58:11`!("Use Current Setting")); |
| 924 | stp_string_list_add_stringcxx . . $ stp_string_list_add_string(61ec312b340c2952). (description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., "Default", |
| 925 | _cxx . . $ `include/gutenprint/gutenprint-intl-internal.h:58:11`!("Use Default Setting")); |
| 926 | description->defltcxx . . $ $anonymous_type_c987533f3b833c82_8#deflt..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_10#str. = "None"; |
| 927 | for (i = 0; i < NUM_SPEEDScxx . . $ `src/main/print-dpl.c:121:9`!; i++) |
| 928 | { |
| 929 | stp_string_list_add_stringcxx . . $ stp_string_list_add_string(61ec312b340c2952). (description->boundscxx . . $ $anonymous_type_c987533f3b833c82_8#bounds..strcxx . . $ $anonymous_type_c987533f3b833c82_8#$anonymous_type_9#str., |
| 930 | dpl_speedscxx . . $ dpl_speeds.[i].dpl_namecxx . . $ $anonymous_type_daa3e556b07fed8_1#dpl_name., |
| 931 | gettextcxx . . $ `include/gutenprint/gutenprint-intl-internal.h:61:11`! (dpl_speeds[i]. |
| 932 | dpl_text)); |
| 933 | } |
| 934 | } |
| 935 | else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (name, "HorizOffset") == 0 || |
| 936 | strcmpcxx . . $ strcmp(5ae29d726ae57f88). (name, "VertOffset") == 0 || strcmpcxx . . $ strcmp(5ae29d726ae57f88). (name, "Present") == 0) |
| 937 | { |
| 938 | description->is_activecxx . . $ $anonymous_type_c987533f3b833c82_8#is_active. = 1; |
| 939 | } |
| 940 | } |
| 941 | |
| 942 | |
| 943 | /* |
| 944 | * 'dpl_imageable_area()' - Return the imageable area of the page. |
| 945 | */ |
| 946 | static void |
| 947 | internal_imageable_areacxx . . $ internal_imageable_area(25e50967534aa153). (const stp_vars_tcxx . . $ stp_vars_t# * v, /* I */ |
| 948 | stp_dimension_tcxx . . $ stp_dimension_t# *left, /* O - Left position in points */ |
| 949 | stp_dimension_tcxx . . $ stp_dimension_t# *right, /* O - Right position in points */ |
| 950 | stp_dimension_tcxx . . $ stp_dimension_t# *bottom, /* O - Bottom position in points */ |
| 951 | stp_dimension_tcxx . . $ stp_dimension_t# *top) /* O - Top position in points */ |
| 952 | { |
| 953 | stp_dimension_tcxx . . $ stp_dimension_t# width, height; /* Size of page */ |
| 954 | |
| 955 | stp_default_media_sizecxx . . $ stp_default_media_size(2eafa46ec96dc268). (v, &width, &height); |
| 956 | |
| 957 | *left = 0; |
| 958 | *right = width; |
| 959 | *top = 0; |
| 960 | *bottom = height; |
| 961 | } |
| 962 | |
| 963 | static void |
| 964 | dpl_imageable_areacxx . . $ dpl_imageable_area(25e50967534aa153). (const stp_vars_tcxx . . $ stp_vars_t# * v, /* I */ |
| 965 | stp_dimension_tcxx . . $ stp_dimension_t# *left, /* O - Left position in points */ |
| 966 | stp_dimension_tcxx . . $ stp_dimension_t# *right, /* O - Right position in points */ |
| 967 | stp_dimension_tcxx . . $ stp_dimension_t# *bottom, /* O - Bottom position in points */ |
| 968 | stp_dimension_tcxx . . $ stp_dimension_t# *top) /* O - Top position in points */ |
| 969 | { |
| 970 | internal_imageable_areacxx . . $ internal_imageable_area(25e50967534aa153). (v, left, right, bottom, top); |
| 971 | } |
| 972 | |
| 973 | static void |
| 974 | dpl_limitcxx . . $ dpl_limit(25e50967534aa153). (const stp_vars_tcxx . . $ stp_vars_t# * v, /* I */ |
| 975 | stp_dimension_tcxx . . $ stp_dimension_t# *width, stp_dimension_tcxx . . $ stp_dimension_t# *height, stp_dimension_tcxx . . $ stp_dimension_t# *min_width, stp_dimension_tcxx . . $ stp_dimension_t# *min_height) |
| 976 | { |
| 977 | const dpl_cap_tcxx . . $ dpl_cap_t# *caps = dpl_get_model_capabilitiescxx . . $ dpl_get_model_capabilities(bbada5572716dfb4). (v); |
| 978 | *width = caps->custom_max_widthcxx . . $ $anonymous_type_daa3e556b07fed8_2#custom_max_width.; |
| 979 | *height = caps->custom_max_heightcxx . . $ $anonymous_type_daa3e556b07fed8_2#custom_max_height.; |
| 980 | *min_width = caps->custom_min_widthcxx . . $ $anonymous_type_daa3e556b07fed8_2#custom_min_width.; |
| 981 | *min_height = caps->custom_min_heightcxx . . $ $anonymous_type_daa3e556b07fed8_2#custom_min_height.; |
| 982 | } |
| 983 | |
| 984 | static const char * |
| 985 | dpl_describe_outputcxx . . $ dpl_describe_output(4be828c28602b542). (const stp_vars_tcxx . . $ stp_vars_t# * v) |
| 986 | { |
| 987 | (void)v; |
| 988 | return "Grayscale"; |
| 989 | } |
| 990 | |
| 991 | static const stp_papersize_tcxx . . $ stp_papersize_t# * |
| 992 | dpl_describe_papersizecxx . . $ dpl_describe_papersize(977e5bf217e59ec).(const stp_vars_tcxx . . $ stp_vars_t# *v, const char *name) |
| 993 | { |
| 994 | (void)v; |
| 995 | return stpi_get_listed_papersizecxx . . $ stpi_get_listed_papersize(49f21dd3ffd9359c).(name, "labels"); |
| 996 | } |
| 997 | |
| 998 | static void |
| 999 | pcx_headercxx . . $ pcx_header(40c2c4844a792f0b). (stp_vars_tcxx . . $ stp_vars_t# * v, stp_image_tcxx . . $ stp_image_t# * image) |
| 1000 | { |
| 1001 | unsigned short height; |
| 1002 | unsigned short right; |
| 1003 | unsigned short top; /* y = 0 is at bottom */ |
| 1004 | unsigned short bytes; |
| 1005 | short xdpi; |
| 1006 | stp_resolution_tcxx . . $ stp_resolution_t# r_xdpi; |
| 1007 | stp_resolution_tcxx . . $ stp_resolution_t# *xdpi_p = (&r_xdpi); |
| 1008 | short ydpi; |
| 1009 | stp_resolution_tcxx . . $ stp_resolution_t# r_ydpi; |
| 1010 | stp_resolution_tcxx . . $ stp_resolution_t# *ydpi_p = (&r_ydpi); |
| 1011 | int n; |
| 1012 | const short zero = 0; |
| 1013 | |
| 1014 | stp_putccxx . . $ stp_putc(a57e1a3820493fb). (10, v); /* Signature */ |
| 1015 | stp_putccxx . . $ stp_putc(a57e1a3820493fb). (5, v); /* Version */ |
| 1016 | stp_putccxx . . $ stp_putc(a57e1a3820493fb). (1, v); /* RLE encoding */ |
| 1017 | stp_putccxx . . $ stp_putc(a57e1a3820493fb). (1, v); /* bits per pixel */ |
| 1018 | |
| 1019 | /* Get resolutions */ |
| 1020 | dpl_describe_resolutioncxx . . $ dpl_describe_resolution(5883f070c6139f40). (v, xdpi_p, ydpi_p); |
| 1021 | |
| 1022 | xdpi = (short) r_xdpi; |
| 1023 | ydpi = (short) r_ydpi; |
| 1024 | |
| 1025 | bytes = (xdpi * 4 + 7 ) / 8; /* must be an even number */ |
| 1026 | if (bytes != (bytes & 0xfffe)) |
| 1027 | bytes++; |
| 1028 | |
| 1029 | height = stp_image_heightcxx . . $ stp_image_height(ba31fd85910919f2). (image); |
| 1030 | |
| 1031 | /* |
| 1032 | * Convert image size to printer resolution and setup the page for printing... |
| 1033 | */ |
| 1034 | |
| 1035 | right = 4 * xdpi - 1; |
| 1036 | top = height - 1; |
| 1037 | |
| 1038 | /* send image start and end positions */ |
| 1039 | stp_zfwritecxx . . $ stp_zfwrite(e7e85bda1a353e8c). ((const char *) &zero, 2, 1, v); |
| 1040 | stp_zfwritecxx . . $ stp_zfwrite(e7e85bda1a353e8c). ((const char *) &zero, 2, 1, v); |
| 1041 | stp_zfwritecxx . . $ stp_zfwrite(e7e85bda1a353e8c). ((const char *) &right, 2, 1, v); |
| 1042 | stp_zfwritecxx . . $ stp_zfwrite(e7e85bda1a353e8c). ((const char *) &top, 2, 1, v); |
| 1043 | |
| 1044 | /* send resolutions */ |
| 1045 | stp_zfwritecxx . . $ stp_zfwrite(e7e85bda1a353e8c). ((const char *) &xdpi, 2, 1, v); |
| 1046 | stp_zfwritecxx . . $ stp_zfwrite(e7e85bda1a353e8c). ((const char *) &ydpi, 2, 1, v); |
| 1047 | |
| 1048 | /* send palette and reserved byte */ |
| 1049 | for (n = 0; n < 3; n++) |
| 1050 | stp_putccxx . . $ stp_putc(a57e1a3820493fb). (0, v); |
| 1051 | for (n = 0; n < 45; n++) |
| 1052 | stp_putccxx . . $ stp_putc(a57e1a3820493fb). (0xff, v); |
| 1053 | stp_putccxx . . $ stp_putc(a57e1a3820493fb). (0, v); |
| 1054 | |
| 1055 | stp_putccxx . . $ stp_putc(a57e1a3820493fb). (1, v); /* number of planes, monochrome */ |
| 1056 | |
| 1057 | stp_zfwritecxx . . $ stp_zfwrite(e7e85bda1a353e8c). ((const char *) &bytes, 2, 1, v); |
| 1058 | |
| 1059 | stp_putccxx . . $ stp_putc(a57e1a3820493fb). (1, v); /* monochrome */ |
| 1060 | stp_putccxx . . $ stp_putc(a57e1a3820493fb). (0, v); |
| 1061 | |
| 1062 | stp_putccxx . . $ stp_putc(a57e1a3820493fb). (0, v); /* imagee size */ |
| 1063 | stp_putccxx . . $ stp_putc(a57e1a3820493fb). (0, v); |
| 1064 | stp_putccxx . . $ stp_putc(a57e1a3820493fb). (0, v); |
| 1065 | stp_putccxx . . $ stp_putc(a57e1a3820493fb). (0, v); |
| 1066 | |
| 1067 | for (n = 0; n < 54; n++) |
| 1068 | stp_putccxx . . $ stp_putc(a57e1a3820493fb). (0, v); /* padding */ |
| 1069 | } |
| 1070 | |
| 1071 | /* |
| 1072 | * 'dpl_print()' - Print an image to an HP printer. |
| 1073 | */ |
| 1074 | |
| 1075 | static void |
| 1076 | dpl_printfunccxx . . $ dpl_printfunc(c8b26ae77f1a10bd). (stp_vars_tcxx . . $ stp_vars_t# * v, int height) |
| 1077 | { |
| 1078 | unsigned char *black = stp_dither_get_channelcxx . . $ stp_dither_get_channel(ee4943665e6fee3b). (v, STP_ECOLOR_Kcxx . . $ `include/gutenprint/dither.h:49:9`!, 0); |
| 1079 | |
| 1080 | dpl_pcxcxx . . $ dpl_pcx(1d73a4498ccb64b0). (v, black, (height + 7) / 8, 1); |
| 1081 | } |
| 1082 | |
| 1083 | static double |
| 1084 | get_double_paramcxx . . $ get_double_param(59eb18042deb636b). (stp_vars_tcxx . . $ stp_vars_t# * v, const char *param) |
| 1085 | { |
| 1086 | if (param && stp_check_float_parametercxx . . $ stp_check_float_parameter(cff2817d3dcc2695). (v, param, STP_PARAMETER_ACTIVEcxx . . $ STP_PARAMETER_ACTIVE.)) |
| 1087 | return stp_get_float_parametercxx . . $ stp_get_float_parameter(ac3b1c02c916f219). (v, param); |
| 1088 | else |
| 1089 | return 1.0; |
| 1090 | } |
| 1091 | |
| 1092 | static int |
| 1093 | dpl_do_printcxx . . $ dpl_do_print(54c0568b42af3904). (stp_vars_tcxx . . $ stp_vars_t# * v, stp_image_tcxx . . $ stp_image_t# * image) |
| 1094 | { |
| 1095 | dpl_privdata_tcxx . . $ dpl_privdata_t# privdata; |
| 1096 | int status = 1; |
| 1097 | #ifdef FIXME |
| 1098 | const char *orientation_mode = stp_get_string_parameter (v, "Orientation"); |
| 1099 | #endif |
| 1100 | const char *label_separator_mode = |
| 1101 | stp_get_string_parametercxx . . $ stp_get_string_parameter(3e3ce5d385745545). (v, "LabelSeparator"); |
| 1102 | double h_offset = get_double_paramcxx . . $ get_double_param(59eb18042deb636b). (v, "HorizOffset"); |
| 1103 | double v_offset = get_double_paramcxx . . $ get_double_param(59eb18042deb636b). (v, "VertOffset"); |
| 1104 | double present = get_double_paramcxx . . $ get_double_param(59eb18042deb636b). (v, "Present"); |
| 1105 | int y; /* Looping vars */ |
| 1106 | stp_resolution_tcxx . . $ stp_resolution_t# xdpi, ydpi; /* Resolution */ |
| 1107 | int multiplier; |
| 1108 | unsigned char *black; /* Black bitmap data */ |
| 1109 | unsigned zero_mask; |
| 1110 | int image_height; |
| 1111 | int image_width; |
| 1112 | const dpl_cap_tcxx . . $ dpl_cap_t# *caps = dpl_get_model_capabilitiescxx . . $ dpl_get_model_capabilities(bbada5572716dfb4). (v); |
| 1113 | const char *speed = stp_get_string_parametercxx . . $ stp_get_string_parameter(3e3ce5d385745545).(v, "Speed"); |
| 1114 | |
| 1115 | if (!stp_verifycxx . . $ stp_verify(60b55b6a36641e80). (v)) |
| 1116 | { |
| 1117 | stp_eprintfcxx . . $ stp_eprintf(7aef7aa9b820d38). (v, "Print options not verified; cannot print.\n"); |
| 1118 | return 0; |
| 1119 | } |
| 1120 | |
| 1121 | /* |
| 1122 | * Setup a read-only pixel region for the entire image... |
| 1123 | */ |
| 1124 | |
| 1125 | stp_image_initcxx . . $ stp_image_init(7010b42a94b47a79). (image); |
| 1126 | |
| 1127 | stp_set_string_parametercxx . . $ stp_set_string_parameter(7405204ff890c7b8). (v, "ColorCorrection", "None"); |
| 1128 | #ifdef TESTING |
| 1129 | stp_set_float_parameter (v, "Brightness", 1.0); |
| 1130 | stp_set_float_parameter (v, "Contrast", 1.0); |
| 1131 | stp_set_float_parameter (v, "Gamma", 1.0); |
| 1132 | #endif |
| 1133 | /* |
| 1134 | * Figure out the output resolution... |
| 1135 | */ |
| 1136 | |
| 1137 | dpl_describe_resolutioncxx . . $ dpl_describe_resolution(5883f070c6139f40). (v, &xdpi, &ydpi); |
| 1138 | |
| 1139 | stp_dprintfcxx . . $ stp_dprintf(13526ca24396f6ac). (STP_DBG_DPLcxx . . $ `include/gutenprint/util.h:190:9`!, v, "dpl: resolution=%dx%d\n", (int) xdpi, (int) ydpi); |
| 1140 | if (xdpi <= 0 || ydpi <= 0) |
| 1141 | { |
| 1142 | stp_eprintfcxx . . $ stp_eprintf(7aef7aa9b820d38). (v, "No resolution found; cannot print.\n"); |
| 1143 | return 0; |
| 1144 | } |
| 1145 | |
| 1146 | image_height = stp_image_heightcxx . . $ stp_image_height(ba31fd85910919f2). (image); |
| 1147 | image_width = stp_image_widthcxx . . $ stp_image_width(ba31fd85910919f2). (image); |
| 1148 | |
| 1149 | #ifdef FIXME |
| 1150 | privdata.orientation = 0; |
| 1151 | if ((strncmp (orientation_mode, "Landscape", 9) == 0)) |
| 1152 | privdata.orientation = 1; |
| 1153 | else if ((strncmp (orientation_mode, "UpsideDown", 10) == 0)) |
| 1154 | privdata.orientation = 2; |
| 1155 | else if ((strncmp (orientation_mode, "Seascape", 8) == 0)) |
| 1156 | privdata.orientation = 3; |
| 1157 | #endif |
| 1158 | |
| 1159 | /* |
| 1160 | * Label Separator mode |
| 1161 | */ |
| 1162 | privdata.label_separatorcxx . . $ $anonymous_type_daa3e556b07fed8_0#label_separator. = 0; |
| 1163 | if ((strncmpcxx . . $ strncmp(fd278af2f295fa2e). (label_separator_mode, "GAP", 3) == 0)) |
| 1164 | privdata.label_separatorcxx . . $ $anonymous_type_daa3e556b07fed8_0#label_separator. = 1; |
| 1165 | else if ((strncmpcxx . . $ strncmp(fd278af2f295fa2e). (label_separator_mode, "NOTCH", 5) == 0)) |
| 1166 | privdata.label_separatorcxx . . $ $anonymous_type_daa3e556b07fed8_0#label_separator. = 1; |
| 1167 | else if ((strncmpcxx . . $ strncmp(fd278af2f295fa2e). (label_separator_mode, "HOLE", 4) == 0)) |
| 1168 | privdata.label_separatorcxx . . $ $anonymous_type_daa3e556b07fed8_0#label_separator. = 1; |
| 1169 | else if ((strncmpcxx . . $ strncmp(fd278af2f295fa2e). (label_separator_mode, "MARK", 4) == 0)) |
| 1170 | privdata.label_separatorcxx . . $ $anonymous_type_daa3e556b07fed8_0#label_separator. = 2; |
| 1171 | else if ((strncmpcxx . . $ strncmp(fd278af2f295fa2e). (label_separator_mode, "CONTINUOUS", 10) == 0)) |
| 1172 | privdata.label_separatorcxx . . $ $anonymous_type_daa3e556b07fed8_0#label_separator. = 3; |
| 1173 | |
| 1174 | /* |
| 1175 | * Print Offsets |
| 1176 | */ |
| 1177 | privdata.h_offsetcxx . . $ $anonymous_type_daa3e556b07fed8_0#h_offset. = (int) (h_offset * 100); /* in 0.01 of an inch */ |
| 1178 | privdata.v_offsetcxx . . $ $anonymous_type_daa3e556b07fed8_0#v_offset. = (int) (v_offset * 100); /* in 0.01 of an inch */ |
| 1179 | |
| 1180 | privdata.presentcxx . . $ $anonymous_type_daa3e556b07fed8_0#present. = (int) (present * 100.0); /* in 0.01 of an inch */ |
| 1181 | |
| 1182 | /* |
| 1183 | * Darkness Mode |
| 1184 | */ |
| 1185 | if (-1 != (privdata.darknesscxx . . $ $anonymous_type_daa3e556b07fed8_0#darkness. = stp_get_int_parametercxx . . $ stp_get_int_parameter(b1e629819c29df09). (v, "Darkness"))) |
| 1186 | { |
| 1187 | if (0 == privdata.darknesscxx . . $ $anonymous_type_daa3e556b07fed8_0#darkness.) |
| 1188 | { |
| 1189 | privdata.darknesscxx . . $ $anonymous_type_daa3e556b07fed8_0#darkness. = 10; /* default */ |
| 1190 | } |
| 1191 | } |
| 1192 | |
| 1193 | /* |
| 1194 | * Speed Mode |
| 1195 | */ |
| 1196 | privdata.speedcxx . . $ $anonymous_type_daa3e556b07fed8_0#speed. = 0; |
| 1197 | if (0 != strcmpcxx . . $ strcmp(5ae29d726ae57f88).("None", speed)) |
| 1198 | { |
| 1199 | if (0 == strcmpcxx . . $ strcmp(5ae29d726ae57f88).("Default", speed)) |
| 1200 | { |
| 1201 | privdata.speedcxx . . $ $anonymous_type_daa3e556b07fed8_0#speed. = (int) caps->default_speedcxx . . $ $anonymous_type_daa3e556b07fed8_2#default_speed.; |
| 1202 | } |
| 1203 | else |
| 1204 | { |
| 1205 | unsigned int i; |
| 1206 | for (i = 0; i < NUM_SPEEDScxx . . $ `src/main/print-dpl.c:121:9`!; i++) |
| 1207 | { |
| 1208 | if (0 == strcmpcxx . . $ strcmp(5ae29d726ae57f88).(dpl_speedscxx . . $ dpl_speeds.[i].dpl_namecxx . . $ $anonymous_type_daa3e556b07fed8_1#dpl_name., speed)) |
| 1209 | { |
| 1210 | privdata.speedcxx . . $ $anonymous_type_daa3e556b07fed8_0#speed. = dpl_speedscxx . . $ dpl_speeds.[i].dpl_codecxx . . $ $anonymous_type_daa3e556b07fed8_1#dpl_code.; |
| 1211 | break; |
| 1212 | } |
| 1213 | } |
| 1214 | if (caps->min_speedcxx . . $ $anonymous_type_daa3e556b07fed8_2#min_speed. > (char) (privdata.speedcxx . . $ $anonymous_type_daa3e556b07fed8_0#speed.)) |
| 1215 | { |
| 1216 | privdata.speedcxx . . $ $anonymous_type_daa3e556b07fed8_0#speed. = caps->min_speedcxx . . $ $anonymous_type_daa3e556b07fed8_2#min_speed.; |
| 1217 | } |
| 1218 | else |
| 1219 | { |
| 1220 | if (caps->max_speedcxx . . $ $anonymous_type_daa3e556b07fed8_2#max_speed. < (char) (privdata.speedcxx . . $ $anonymous_type_daa3e556b07fed8_0#speed.)) |
| 1221 | { |
| 1222 | privdata.speedcxx . . $ $anonymous_type_daa3e556b07fed8_0#speed. = caps->max_speedcxx . . $ $anonymous_type_daa3e556b07fed8_2#max_speed.; |
| 1223 | } |
| 1224 | } |
| 1225 | } |
| 1226 | } |
| 1227 | |
| 1228 | /* workaround for printer bug */ |
| 1229 | for (y=0; y<64; y++) |
| 1230 | stp_putccxx . . $ stp_putc(a57e1a3820493fb). (0, v); |
| 1231 | |
| 1232 | /* |
| 1233 | * Send DPL initialization commands... |
| 1234 | */ |
| 1235 | stp_putscxx . . $ stp_puts(35a89ecf160f646a). ("\002n\r", v); /* set Imperial units */ |
| 1236 | |
| 1237 | /* Max page length */ |
| 1238 | if (image_height / ydpi > 4) |
| 1239 | { |
| 1240 | stp_zprintfcxx . . $ stp_zprintf(7aef7aa9b820d38). (v, "\002M%04i\r", |
| 1241 | 300 * image_height / ((int) ydpi) + (3 * privdata.v_offsetcxx . . $ $anonymous_type_daa3e556b07fed8_0#v_offset.)); |
| 1242 | } |
| 1243 | else |
| 1244 | { |
| 1245 | stp_zprintfcxx . . $ stp_zprintf(7aef7aa9b820d38). (v, "\002M%04i\r", 1200 + (3 * privdata.v_offsetcxx . . $ $anonymous_type_daa3e556b07fed8_0#v_offset.)); |
| 1246 | } |
| 1247 | /* set Label Width */ |
| 1248 | stp_zprintfcxx . . $ stp_zprintf(7aef7aa9b820d38). (v, "\002KcLW%04i\r", |
| 1249 | 100 * image_width / ((int) xdpi) + privdata.h_offsetcxx . . $ $anonymous_type_daa3e556b07fed8_0#h_offset.); |
| 1250 | if (0 != privdata.label_separatorcxx . . $ $anonymous_type_daa3e556b07fed8_0#label_separator.) |
| 1251 | { |
| 1252 | if (1 == privdata.label_separatorcxx . . $ $anonymous_type_daa3e556b07fed8_0#label_separator.) |
| 1253 | { |
| 1254 | stp_putscxx . . $ stp_puts(35a89ecf160f646a). ("\002e\r", v); /* edge mode */ |
| 1255 | } |
| 1256 | else if (2 == privdata.label_separatorcxx . . $ $anonymous_type_daa3e556b07fed8_0#label_separator.) |
| 1257 | { |
| 1258 | stp_putscxx . . $ stp_puts(35a89ecf160f646a). ("\002r\r", v); /* Mark mode */ |
| 1259 | } |
| 1260 | else |
| 1261 | { |
| 1262 | stp_zprintfcxx . . $ stp_zprintf(7aef7aa9b820d38). (v, "\002c%04i\r", 100 * /* Continuous mode */ |
| 1263 | image_height / ((int) ydpi) + privdata.v_offsetcxx . . $ $anonymous_type_daa3e556b07fed8_0#v_offset.); |
| 1264 | } |
| 1265 | } |
| 1266 | if (privdata.darknesscxx . . $ $anonymous_type_daa3e556b07fed8_0#darkness. > -1) |
| 1267 | { |
| 1268 | stp_zprintfcxx . . $ stp_zprintf(7aef7aa9b820d38). (v, "\002KZH%02i\r", privdata.darknesscxx . . $ $anonymous_type_daa3e556b07fed8_0#darkness.); |
| 1269 | } |
| 1270 | if (privdata.speedcxx . . $ $anonymous_type_daa3e556b07fed8_0#speed. > 0) |
| 1271 | { |
| 1272 | stp_zprintfcxx . . $ stp_zprintf(7aef7aa9b820d38). (v, "\002KZP%c\r", privdata.speedcxx . . $ $anonymous_type_daa3e556b07fed8_0#speed.); |
| 1273 | } |
| 1274 | stp_zprintfcxx . . $ stp_zprintf(7aef7aa9b820d38). (v, "\002Kf%04i\r", privdata.presentcxx . . $ $anonymous_type_daa3e556b07fed8_0#present.); |
| 1275 | stp_putscxx . . $ stp_puts(35a89ecf160f646a). ("\002IDPcups0\r", v); /* Save PCX file */ |
| 1276 | pcx_headercxx . . $ pcx_header(40c2c4844a792f0b). (v, image); |
| 1277 | |
| 1278 | |
| 1279 | stp_dprintfcxx . . $ stp_dprintf(13526ca24396f6ac). (STP_DBG_DPLcxx . . $ `include/gutenprint/util.h:190:9`!, v, "Normal init\n"); |
| 1280 | |
| 1281 | /* |
| 1282 | * Allocate memory for the raster data... |
| 1283 | */ |
| 1284 | |
| 1285 | black = stp_malloccxx . . $ stp_malloc(bfcfa4d6b7f7ef64). ((image_width + 7) / 8); |
| 1286 | |
| 1287 | stp_set_string_parametercxx . . $ stp_set_string_parameter(7405204ff890c7b8). (v, "STPIOutputType", "Grayscale"); |
| 1288 | |
| 1289 | /* set up for very fast dithering as default */ |
| 1290 | stp_set_string_parametercxx . . $ stp_set_string_parameter(7405204ff890c7b8). (v, "DitherAlgorithm", "VeryFast"); |
| 1291 | |
| 1292 | stp_dither_initcxx . . $ stp_dither_init(d3ac8ed317e2c6e7). (v, image, image_width, xdpi, ydpi); |
| 1293 | |
| 1294 | stp_dither_add_channelcxx . . $ stp_dither_add_channel(4bbde36c7860b58e). (v, black, STP_ECOLOR_Kcxx . . $ `include/gutenprint/dither.h:49:9`!, 0); |
| 1295 | stp_channel_set_black_channelcxx . . $ stp_channel_set_black_channel(c8b26ae77f1a10bd). (v, STP_ECOLOR_Kcxx . . $ `include/gutenprint/dither.h:49:9`!); |
| 1296 | |
| 1297 | stp_channel_set_density_adjustmentcxx . . $ stp_channel_set_density_adjustment(a8240c31a9a620dc). (v, STP_ECOLOR_Kcxx . . $ `include/gutenprint/dither.h:49:9`!, 0, |
| 1298 | get_double_paramcxx . . $ get_double_param(59eb18042deb636b). (v, "BlackDensity") * |
| 1299 | 1); |
| 1300 | |
| 1301 | (void) stp_color_initcxx . . $ stp_color_init(8474e95f5358b69d). (v, image, 65536); |
| 1302 | |
| 1303 | stp_allocate_component_datacxx . . $ stp_allocate_component_data(c746010122f90098). (v, "Driver", 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`!, &privdata); |
| 1304 | |
| 1305 | for (y = 0; y < image_height; y++) |
| 1306 | { |
| 1307 | if (stp_color_get_rowcxx . . $ stp_color_get_row(ba7b466a9562988e). (v, image, y, &zero_mask)) |
| 1308 | { |
| 1309 | status = 2; |
| 1310 | break; |
| 1311 | } |
| 1312 | stp_dithercxx . . $ stp_dither(c27f96f0d387255a). (v, y, 0, 0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1313 | dpl_printfunccxx . . $ dpl_printfunc(c8b26ae77f1a10bd). (v, image_width); |
| 1314 | } |
| 1315 | |
| 1316 | stp_putscxx . . $ stp_puts(35a89ecf160f646a). ("\r\002L\r", v); /* enter Label Formatting mode */ |
| 1317 | multiplier = dpl_get_multipliercxx . . $ dpl_get_multiplier(b1be75487ade2f93). (v); /* dot multiplier */ |
| 1318 | stp_zprintfcxx . . $ stp_zprintf(7aef7aa9b820d38). (v, "D%1i%1i\r", multiplier, multiplier); |
| 1319 | stp_putscxx . . $ stp_puts(35a89ecf160f646a). ("R0000\r", v); /* 0 offset, offset handled below */ |
| 1320 | stp_putscxx . . $ stp_puts(35a89ecf160f646a). ("A2\r", v); /* transparent mode */ |
| 1321 | /* load graphic */ |
| 1322 | stp_zprintfcxx . . $ stp_zprintf(7aef7aa9b820d38). (v, "1Y11000%04i%04icups0\r", privdata.v_offsetcxx . . $ $anonymous_type_daa3e556b07fed8_0#v_offset., |
| 1323 | privdata.h_offsetcxx . . $ $anonymous_type_daa3e556b07fed8_0#h_offset.); |
| 1324 | stp_putscxx . . $ stp_puts(35a89ecf160f646a). ("Q0001\r", v); /* one label */ |
| 1325 | stp_putscxx . . $ stp_puts(35a89ecf160f646a). ("E\r", v); /* print now */ |
| 1326 | stp_putscxx . . $ stp_puts(35a89ecf160f646a). ("\002xDGcups0\r", v); /* delete graphic */ |
| 1327 | #if 0 |
| 1328 | stp_puts ("\002zD\r", v); /* reclaim space */ |
| 1329 | #endif |
| 1330 | |
| 1331 | stp_image_concludecxx . . $ stp_image_conclude(7010b42a94b47a79). (image); |
| 1332 | |
| 1333 | /* |
| 1334 | * Cleanup... |
| 1335 | */ |
| 1336 | |
| 1337 | if (black != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1338 | stp_freecxx . . $ stp_free(5d22bdacc48458e8). (black); |
| 1339 | |
| 1340 | return status; |
| 1341 | } |
| 1342 | |
| 1343 | static int |
| 1344 | dpl_printcxx . . $ dpl_print(be5d09c432b01f95). (const stp_vars_tcxx . . $ stp_vars_t# * v, stp_image_tcxx . . $ stp_image_t# * image) |
| 1345 | { |
| 1346 | int status; |
| 1347 | stp_vars_tcxx . . $ stp_vars_t# *nv = stp_vars_create_copycxx . . $ stp_vars_create_copy(d6c73ebbfa1de3f9). (v); |
| 1348 | stp_prune_inactive_optionscxx . . $ stp_prune_inactive_options(1a97b8462f9f913c). (nv); |
| 1349 | status = dpl_do_printcxx . . $ dpl_do_print(54c0568b42af3904). (nv, image); |
| 1350 | stp_vars_destroycxx . . $ stp_vars_destroy(1a97b8462f9f913c). (nv); |
| 1351 | return status; |
| 1352 | } |
| 1353 | |
| 1354 | static const stp_printfuncs_tcxx . . $ stp_printfuncs_t# print_dpl_printfuncscxx . . $ print_dpl_printfuncs. = { |
| 1355 | dpl_list_parameterscxx . . $ dpl_list_parameters(817585d40f809196)., |
| 1356 | dpl_parameterscxx . . $ dpl_parameters(dfd5b9531b51a6d2)., |
| 1357 | stp_default_media_sizecxx . . $ stp_default_media_size(2eafa46ec96dc268)., |
| 1358 | dpl_imageable_areacxx . . $ dpl_imageable_area(25e50967534aa153)., |
| 1359 | dpl_imageable_areacxx . . $ dpl_imageable_area(25e50967534aa153)., |
| 1360 | dpl_limitcxx . . $ dpl_limit(25e50967534aa153)., |
| 1361 | dpl_printcxx . . $ dpl_print(be5d09c432b01f95)., |
| 1362 | dpl_describe_resolutioncxx . . $ dpl_describe_resolution(5883f070c6139f40)., |
| 1363 | dpl_describe_outputcxx . . $ dpl_describe_output(4be828c28602b542)., |
| 1364 | stp_verify_printer_paramscxx . . $ stp_verify_printer_params(60b55b6a36641e80)., |
| 1365 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 1366 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 1367 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 1368 | dpl_describe_papersizecxx . . $ dpl_describe_papersize(977e5bf217e59ec). |
| 1369 | }; |
| 1370 | |
| 1371 | |
| 1372 | static void |
| 1373 | dpl_pcxcxx . . $ dpl_pcx(1d73a4498ccb64b0). (stp_vars_tcxx . . $ stp_vars_t# * v, /* I - Print file or command */ |
| 1374 | unsigned char *short_line, /* I - Output bitmap data */ |
| 1375 | int height, /* I - Height of bitmap data */ |
| 1376 | int last_plane) /* I - True if this is the last plane */ |
| 1377 | { |
| 1378 | unsigned char *line; |
| 1379 | unsigned char *data; |
| 1380 | unsigned char stored; |
| 1381 | int add_bytes = 0; |
| 1382 | int count = 0; |
| 1383 | int in = 0; |
| 1384 | int out = 0; |
| 1385 | stp_resolution_tcxx . . $ stp_resolution_t# xdpi, ydpi; |
| 1386 | const dpl_cap_tcxx . . $ dpl_cap_t# *caps = dpl_get_model_capabilitiescxx . . $ dpl_get_model_capabilities(bbada5572716dfb4). (v); |
| 1387 | unsigned int i; |
| 1388 | int max_dpi = 0; |
| 1389 | int dpi_adjust = 0; |
| 1390 | (void)last_plane; |
| 1391 | |
| 1392 | /* Each line has to be 4 inches long */ |
| 1393 | dpl_describe_resolutioncxx . . $ dpl_describe_resolution(5883f070c6139f40). (v, &xdpi, &ydpi); |
| 1394 | |
| 1395 | for (i = 0; i < NUM_RESOLUTIONScxx . . $ `src/main/print-dpl.c:93:9`!; i++) |
| 1396 | { |
| 1397 | if (caps->max_resolutioncxx . . $ $anonymous_type_daa3e556b07fed8_2#max_resolution. == dpl_resolutionscxx . . $ dpl_resolutions.[i].dpl_codecxx . . $ $anonymous_type_daa3e556b07fed8_1#dpl_code.) |
| 1398 | { |
| 1399 | max_dpi = dpl_resolutionscxx . . $ dpl_resolutions.[i].p0cxx . . $ $anonymous_type_daa3e556b07fed8_1#p0.; |
| 1400 | } |
| 1401 | if (caps->resolution_adjustcxx . . $ $anonymous_type_daa3e556b07fed8_2#resolution_adjust. == dpl_resolutionscxx . . $ dpl_resolutions.[i].dpl_codecxx . . $ $anonymous_type_daa3e556b07fed8_1#dpl_code.) |
| 1402 | { |
| 1403 | dpi_adjust = dpl_resolutionscxx . . $ dpl_resolutions.[i].p0cxx . . $ $anonymous_type_daa3e556b07fed8_1#p0.; |
| 1404 | } |
| 1405 | } |
| 1406 | |
| 1407 | // XXX check to see if max_dpi or dpi_adjust == 0? |
| 1408 | |
| 1409 | if (xdpi == max_dpi) |
| 1410 | { |
| 1411 | add_bytes = ((xdpi * 4) + 7) / 8 - height; |
| 1412 | } |
| 1413 | else |
| 1414 | { |
| 1415 | add_bytes = ((dpi_adjust * 4) + 7) / 8 - height; |
| 1416 | } |
| 1417 | |
| 1418 | /* allocate 4 inch input buffer */ |
| 1419 | line = (unsigned char *) stp_malloccxx . . $ stp_malloc(bfcfa4d6b7f7ef64). (height + add_bytes); |
| 1420 | /* allocate output buffer, worst case */ |
| 1421 | data = (unsigned char *) stp_malloccxx . . $ stp_malloc(bfcfa4d6b7f7ef64). ((height + add_bytes) * 2); |
| 1422 | |
| 1423 | /* invert data, cups makes white 1 and black 0, printer wants the opposite */ |
| 1424 | for (in = 0; in < height; in++) |
| 1425 | { |
| 1426 | line[in] = 0xff ^ short_line[in]; |
| 1427 | } |
| 1428 | |
| 1429 | /* pad to 4 inches */ |
| 1430 | for (in = height; in < (height + add_bytes); in++) |
| 1431 | { |
| 1432 | line[in] = 0xff; |
| 1433 | } |
| 1434 | |
| 1435 | in = 0; |
| 1436 | while (in < (height + add_bytes)) |
| 1437 | { |
| 1438 | stored = line[in]; /* save the value */ |
| 1439 | for (count = 1; in + count < (height + add_bytes) && line[in + count] == stored && count < 63; count++); /* count the run */ |
| 1440 | |
| 1441 | /* test to see if we need to make a run of one because the data value |
| 1442 | has the two top bits set and see if we actually have a run */ |
| 1443 | if (stored > 191 || count > 1) |
| 1444 | { |
| 1445 | data[out++] = count | 0xc0; /* mask to indicate a run */ |
| 1446 | data[out++] = stored; /* output the value */ |
| 1447 | } |
| 1448 | else /* not a run */ |
| 1449 | { |
| 1450 | data[out++] = stored; /* output the value */ |
| 1451 | } |
| 1452 | in += count; |
| 1453 | } |
| 1454 | stp_zfwritecxx . . $ stp_zfwrite(e7e85bda1a353e8c). ((const char *) data, out, 1, v); |
| 1455 | stp_freecxx . . $ stp_free(5d22bdacc48458e8). (line); |
| 1456 | stp_freecxx . . $ stp_free(5d22bdacc48458e8). (data); |
| 1457 | } |
| 1458 | |
| 1459 | |
| 1460 | static stp_family_tcxx . . $ stp_family_t# print_dpl_module_datacxx . . $ print_dpl_module_data. = { |
| 1461 | &print_dpl_printfuncscxx . . $ print_dpl_printfuncs., |
| 1462 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! |
| 1463 | }; |
| 1464 | |
| 1465 | |
| 1466 | static int |
| 1467 | print_dpl_module_initcxx . . $ print_dpl_module_init(b126dc7c1de90089). (void) |
| 1468 | { |
| 1469 | return stpi_family_registercxx . . $ stpi_family_register(29ae8ff464c7f7e5). (print_dpl_module_datacxx . . $ print_dpl_module_data..printer_listcxx . . $ stp_family#printer_list.); |
| 1470 | } |
| 1471 | |
| 1472 | |
| 1473 | static int |
| 1474 | print_dpl_module_exitcxx . . $ print_dpl_module_exit(b126dc7c1de90089). (void) |
| 1475 | { |
| 1476 | return stpi_family_unregistercxx . . $ stpi_family_unregister(29ae8ff464c7f7e5). (print_dpl_module_datacxx . . $ print_dpl_module_data..printer_listcxx . . $ stp_family#printer_list.); |
| 1477 | } |
| 1478 | |
| 1479 | |
| 1480 | /* Module header */ |
| 1481 | #define stp_module_versioncxx . . $ `src/main/print-dpl.c:1481:9`! print_dpl_LTX_stp_module_version |
| 1482 | #define stp_module_datacxx . . $ `src/main/print-dpl.c:1482:9`! print_dpl_LTX_stp_module_data |
| 1483 | |
| 1484 | stp_module_version_tcxx . . $ stp_module_version_t# stp_module_versioncxx . . $ `src/main/print-dpl.c:1481:9`! = { 0, 0 }; |
| 1485 | |
| 1486 | stp_module_tcxx . . $ stp_module_t# stp_module_datacxx . . $ `src/main/print-dpl.c:1482:9`! = { |
| 1487 | "dpl", |
| 1488 | VERSIONcxx . . $ `config.h:204:9`!, |
| 1489 | "DPL family driver", |
| 1490 | STP_MODULE_CLASS_FAMILYcxx . . $ STP_MODULE_CLASS_FAMILY., |
| 1491 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 1492 | print_dpl_module_initcxx . . $ print_dpl_module_init(b126dc7c1de90089)., |
| 1493 | print_dpl_module_exitcxx . . $ print_dpl_module_exit(b126dc7c1de90089)., |
| 1494 | (void *) &print_dpl_module_datacxx . . $ print_dpl_module_data. |
| 1495 | }; |