| 1 | /* |
| 2 | * pclunprint.c - convert an HP PCL file into an image file for viewing. |
| 3 | * |
| 4 | * Copyright 2000 Dave Hill ([email protected]) |
| 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 | * Revision History: |
| 20 | * |
| 21 | * See ChangeLog |
| 22 | */ |
| 23 | |
| 24 | #ifdef HAVE_CONFIG_Hcxx . . $ `<built-in>:411:9`! |
| 25 | #include <config.h>cxx . . $ `<file>/config.h`/ |
| 26 | #endif |
| 27 | #include <gutenprint/util.h>cxx . . $ `<file>/include/gutenprint/util.h`/ |
| 28 | #include<stdio.h> |
| 29 | #include<stdlib.h> |
| 30 | #include<ctype.h> |
| 31 | #include<string.h> |
| 32 | |
| 33 | /* |
| 34 | * Size of buffer used to read file |
| 35 | */ |
| 36 | #define READ_SIZEcxx . . $ `test/pcl-unprint.c:36:9`! 16384 |
| 37 | |
| 38 | /* |
| 39 | * Largest data attached to a command. 1024 means that we can have up to 8192 |
| 40 | * pixels in a row |
| 41 | */ |
| 42 | #define MAX_DATAcxx . . $ `test/pcl-unprint.c:42:9`! 16384 |
| 43 | |
| 44 | FILEcxx . . $ FILE# *read_fdcxx . . $ read_fd.,*write_fdcxx . . $ write_fd.; |
| 45 | char read_buffercxx . . $ read_buffer.[READ_SIZEcxx . . $ `test/pcl-unprint.c:36:9`!]; |
| 46 | char data_buffercxx . . $ data_buffer.[MAX_DATAcxx . . $ `test/pcl-unprint.c:42:9`!]; |
| 47 | char initial_commandcxx . . $ initial_command.[3]; |
| 48 | int initial_command_indexcxx . . $ initial_command_index.; |
| 49 | char final_commandcxx . . $ final_command.; |
| 50 | int numeric_argcxx . . $ numeric_arg.; |
| 51 | int max_data_lencxx . . $ max_data_len. = 0; |
| 52 | |
| 53 | int read_pointercxx . . $ read_pointer.; |
| 54 | int read_sizecxx . . $ read_size.; |
| 55 | int eofcxx . . $ eof.; |
| 56 | int combined_commandcxx . . $ combined_command. = 0; |
| 57 | int skip_outputcxx . . $ skip_output. = 0; |
| 58 | |
| 59 | /* |
| 60 | * Data about the image |
| 61 | */ |
| 62 | |
| 63 | typedef structcxx . . $ $anonymous_type_613f0d930bdf33ab_0# { |
| 64 | int colour_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#colour_type.; /* Mono, 3/4 colour */ |
| 65 | int pixel_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#pixel_type.; /* Mono, CMY, RGB */ |
| 66 | int black_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#black_depth.; /* 2 level, 4 level */ |
| 67 | int cyan_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#cyan_depth.; /* 2 level, 4 level */ |
| 68 | int magenta_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#magenta_depth.; /* 2 level, 4 level */ |
| 69 | int yellow_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#yellow_depth.; /* 2 level, 4 level */ |
| 70 | int lcyan_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#lcyan_depth.; /* 2 level, 4 level */ |
| 71 | int lmagenta_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#lmagenta_depth.; /* 2 level, 4 level */ |
| 72 | int image_widthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_width.; |
| 73 | int image_heightcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_height.; |
| 74 | int compression_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#compression_type.; /* Uncompressed or TIFF */ |
| 75 | } image_tcxx . . $ image_t#; |
| 76 | |
| 77 | /* |
| 78 | * collected data read from file |
| 79 | */ |
| 80 | |
| 81 | typedef structcxx . . $ $anonymous_type_613f0d930bdf33ab_1# { |
| 82 | char **black_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_bufs.; /* Storage for black rows */ |
| 83 | int black_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_data_rows_per_row.; /* Number of black rows */ |
| 84 | char **cyan_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_bufs.; |
| 85 | int cyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_data_rows_per_row.; |
| 86 | char **magenta_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_bufs.; |
| 87 | int magenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_data_rows_per_row.; |
| 88 | char **yellow_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_bufs.; |
| 89 | int yellow_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_data_rows_per_row.; |
| 90 | char **lcyan_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#lcyan_bufs.; |
| 91 | int lcyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lcyan_data_rows_per_row.; |
| 92 | char **lmagenta_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#lmagenta_bufs.; |
| 93 | int lmagenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lmagenta_data_rows_per_row.; |
| 94 | int buffer_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#buffer_length.; |
| 95 | int active_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#active_length.; /* Length of output data */ |
| 96 | int output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth.; |
| 97 | int input_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#input_depth.; |
| 98 | int pixels_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#pixels_depth.; |
| 99 | } output_tcxx . . $ output_t#; |
| 100 | |
| 101 | #define PCL_MONOcxx . . $ `test/pcl-unprint.c:101:9`! 1 |
| 102 | #define PCL_CMYcxx . . $ `test/pcl-unprint.c:102:9`! 3 |
| 103 | #define PCL_CMYKcxx . . $ `test/pcl-unprint.c:103:9`! 4 |
| 104 | #define PCL_CMYKcmcxx . . $ `test/pcl-unprint.c:104:9`! 6 |
| 105 | #define PCL_RGBcxx . . $ `test/pcl-unprint.c:105:9`! 65 |
| 106 | |
| 107 | #define PCL_COMPRESSION_NONEcxx . . $ `test/pcl-unprint.c:107:9`! 0 |
| 108 | #define PCL_COMPRESSION_RUNLENGTHcxx . . $ `test/pcl-unprint.c:108:9`! 1 |
| 109 | #define PCL_COMPRESSION_TIFFcxx . . $ `test/pcl-unprint.c:109:9`! 2 |
| 110 | #define PCL_COMPRESSION_DELTAcxx . . $ `test/pcl-unprint.c:110:9`! 3 |
| 111 | #define PCL_COMPRESSION_ADAPTIVEcxx . . $ `test/pcl-unprint.c:111:9`! 5 |
| 112 | #define PCL_COMPRESSION_CRDRcxx . . $ `test/pcl-unprint.c:112:9`! 9 /* Compressed row delta replacement */ |
| 113 | |
| 114 | /* PCL COMMANDS */ |
| 115 | |
| 116 | typedef enumcxx . . $ $anonymous_type_613f0d930bdf33ab_2# { |
| 117 | PCL_RESETcxx . . $ PCL_RESET. = 1, |
| 118 | PCL_MEDIA_SIZEcxx . . $ PCL_MEDIA_SIZE., |
| 119 | PCL_PERF_SKIPcxx . . $ PCL_PERF_SKIP., |
| 120 | PCL_TOP_MARGINcxx . . $ PCL_TOP_MARGIN., |
| 121 | PCL_MEDIA_TYPEcxx . . $ PCL_MEDIA_TYPE., |
| 122 | PCL_MEDIA_SOURCEcxx . . $ PCL_MEDIA_SOURCE., |
| 123 | PCL_SHINGLINGcxx . . $ PCL_SHINGLING., |
| 124 | PCL_RASTERGRAPHICS_QUALITYcxx . . $ PCL_RASTERGRAPHICS_QUALITY., |
| 125 | PCL_DEPLETIONcxx . . $ PCL_DEPLETION., |
| 126 | PCL_CONFIGUREcxx . . $ PCL_CONFIGURE., |
| 127 | PCL_RESOLUTIONcxx . . $ PCL_RESOLUTION., |
| 128 | PCL_COLOURTYPEcxx . . $ PCL_COLOURTYPE., |
| 129 | PCL_COMPRESSIONTYPEcxx . . $ PCL_COMPRESSIONTYPE., |
| 130 | PCL_LEFTRASTER_POScxx . . $ PCL_LEFTRASTER_POS., |
| 131 | PCL_TOPRASTER_POScxx . . $ PCL_TOPRASTER_POS., |
| 132 | PCL_RASTER_WIDTHcxx . . $ PCL_RASTER_WIDTH., |
| 133 | PCL_RASTER_HEIGHTcxx . . $ PCL_RASTER_HEIGHT., |
| 134 | PCL_START_RASTERcxx . . $ PCL_START_RASTER., |
| 135 | PCL_END_RASTERcxx . . $ PCL_END_RASTER., |
| 136 | PCL_END_COLOUR_RASTERcxx . . $ PCL_END_COLOUR_RASTER., |
| 137 | PCL_DATAcxx . . $ PCL_DATA., |
| 138 | PCL_DATA_LASTcxx . . $ PCL_DATA_LAST., |
| 139 | PCL_PRINT_QUALITYcxx . . $ PCL_PRINT_QUALITY., |
| 140 | PCL_ENTER_PJLcxx . . $ PCL_ENTER_PJL., |
| 141 | PCL_GRAY_BALANCEcxx . . $ PCL_GRAY_BALANCE., |
| 142 | PCL_DRIVER_CONFIGcxx . . $ PCL_DRIVER_CONFIG., |
| 143 | PCL_PAGE_ORIENTATIONcxx . . $ PCL_PAGE_ORIENTATION., |
| 144 | PCL_VERTICAL_CURSOR_POSITIONING_BY_DOTScxx . . $ PCL_VERTICAL_CURSOR_POSITIONING_BY_DOTS., |
| 145 | PCL_HORIZONTAL_CURSOR_POSITIONING_BY_DOTScxx . . $ PCL_HORIZONTAL_CURSOR_POSITIONING_BY_DOTS., |
| 146 | PCL_UNIT_OF_MEASUREcxx . . $ PCL_UNIT_OF_MEASURE., |
| 147 | PCL_RELATIVE_VERTICAL_PIXEL_MOVEMENTcxx . . $ PCL_RELATIVE_VERTICAL_PIXEL_MOVEMENT., |
| 148 | PCL_PALETTE_CONFIGURATIONcxx . . $ PCL_PALETTE_CONFIGURATION., |
| 149 | PCL_LPIcxx . . $ PCL_LPI., |
| 150 | PCL_CPIcxx . . $ PCL_CPI., |
| 151 | PCL_PAGE_LENGTHcxx . . $ PCL_PAGE_LENGTH., |
| 152 | PCL_NUM_COPIEScxx . . $ PCL_NUM_COPIES., |
| 153 | PCL_DUPLEXcxx . . $ PCL_DUPLEX., |
| 154 | PCL_MEDIA_SIDEcxx . . $ PCL_MEDIA_SIDE., |
| 155 | PCL_RTL_CONFIGUREcxx . . $ PCL_RTL_CONFIGURE., |
| 156 | PCL_ENTER_PCLcxx . . $ PCL_ENTER_PCL., |
| 157 | PCL_ENTER_HPGL2cxx . . $ PCL_ENTER_HPGL2., |
| 158 | PCL_NEGATIVE_MOTIONcxx . . $ PCL_NEGATIVE_MOTION., |
| 159 | PCL_MEDIA_DESTcxx . . $ PCL_MEDIA_DEST., |
| 160 | PCL_JOB_SEPARATIONcxx . . $ PCL_JOB_SEPARATION., |
| 161 | PCL_LEFT_OFFSET_REGISTRATIONcxx . . $ PCL_LEFT_OFFSET_REGISTRATION., |
| 162 | PCL_TOP_OFFSET_REGISTRATIONcxx . . $ PCL_TOP_OFFSET_REGISTRATION., |
| 163 | PCL_PRINT_DIRECTIONcxx . . $ PCL_PRINT_DIRECTION., |
| 164 | PCL_LEFT_MARGINcxx . . $ PCL_LEFT_MARGIN., |
| 165 | PCL_RIGHT_MARGINcxx . . $ PCL_RIGHT_MARGIN., |
| 166 | PCL_RESET_MARGINScxx . . $ PCL_RESET_MARGINS.,PCL_TEXT_LENGTHcxx . . $ PCL_TEXT_LENGTH., |
| 167 | /* Added by rlk 2017-12-25 */ |
| 168 | PCL_RASTER_RENDERcxx . . $ PCL_RASTER_RENDER., /* Rendering algorithm */ |
| 169 | PCL_COLOR_COMPONENT_1cxx . . $ PCL_COLOR_COMPONENT_1., /* Color component 1 */ |
| 170 | PCL_COLOR_COMPONENT_2cxx . . $ PCL_COLOR_COMPONENT_2., /* Color component 2 */ |
| 171 | PCL_COLOR_COMPONENT_3cxx . . $ PCL_COLOR_COMPONENT_3., /* Color component 3 */ |
| 172 | PCL_ASSIGN_COLOR_INDEXcxx . . $ PCL_ASSIGN_COLOR_INDEX., |
| 173 | PCL_SET_FOREGROUND_COLORcxx . . $ PCL_SET_FOREGROUND_COLOR., |
| 174 | PCL_SET_VMIcxx . . $ PCL_SET_VMI., |
| 175 | PCL_SEED_ROW_SOURCEcxx . . $ PCL_SEED_ROW_SOURCE., |
| 176 | } command_tcxx . . $ command_t#; |
| 177 | |
| 178 | typedef structcxx . . $ $anonymous_type_613f0d930bdf33ab_3# { |
| 179 | const char initial_commandcxx . . $ $anonymous_type_613f0d930bdf33ab_3#initial_command.[3]; /* First part of command */ |
| 180 | const char final_commandcxx . . $ $anonymous_type_613f0d930bdf33ab_3#final_command.; /* Last part of command */ |
| 181 | int has_datacxx . . $ $anonymous_type_613f0d930bdf33ab_3#has_data.; /* Data follows */ |
| 182 | int clean_statecxx . . $ $anonymous_type_613f0d930bdf33ab_3#clean_state.; /* Leaves printer state clean */ |
| 183 | command_tcxx . . $ command_t# commandcxx . . $ $anonymous_type_613f0d930bdf33ab_3#command.; /* Command name */ |
| 184 | const char *descriptioncxx . . $ $anonymous_type_613f0d930bdf33ab_3#description.; /* Text for printing */ |
| 185 | } commands_tcxx . . $ commands_t#; |
| 186 | |
| 187 | const commands_tcxx . . $ commands_t# pcl_commandscxx . . $ pcl_commands.[] = |
| 188 | { |
| 189 | /* Two-character sequences ESC <x> */ |
| 190 | { "E", '\0', 0, 1, PCL_RESETcxx . . $ PCL_RESET., "PCL RESET" }, |
| 191 | { "9", '\0', 0, 0, PCL_RESET_MARGINScxx . . $ PCL_RESET_MARGINS., "Reset Margins" }, |
| 192 | { "%", 'A', 0, 0, PCL_ENTER_PCLcxx . . $ PCL_ENTER_PCL., "PCL mode" }, |
| 193 | { "%", 'B', 0, 0, PCL_ENTER_HPGL2cxx . . $ PCL_ENTER_HPGL2., "HPGL/2 mode" }, |
| 194 | { "%", 'X', 0, 0, PCL_ENTER_PJLcxx . . $ PCL_ENTER_PJL., "UEL/Enter PJL mode" }, |
| 195 | /* Parameterised sequences */ |
| 196 | /* Raster positioning */ |
| 197 | { "&a", 'G', 0, 0, PCL_MEDIA_SIDEcxx . . $ PCL_MEDIA_SIDE., "Set Media Side" }, |
| 198 | { "&a", 'H', 0, 0, PCL_LEFTRASTER_POScxx . . $ PCL_LEFTRASTER_POS., "Left Raster Position" }, |
| 199 | { "&a", 'L', 0, 0, PCL_LEFT_MARGINcxx . . $ PCL_LEFT_MARGIN., "Left Margin by Column" }, |
| 200 | { "&a", 'M', 0, 0, PCL_RIGHT_MARGINcxx . . $ PCL_RIGHT_MARGIN., "Right Margin by Column" }, |
| 201 | { "&a", 'N', 0, 0, PCL_NEGATIVE_MOTIONcxx . . $ PCL_NEGATIVE_MOTION., "Negative Motion" }, |
| 202 | { "&a", 'P', 0, 0, PCL_PRINT_DIRECTIONcxx . . $ PCL_PRINT_DIRECTION., "Print Direction" }, |
| 203 | { "&a", 'V', 0, 0, PCL_TOPRASTER_POScxx . . $ PCL_TOPRASTER_POS., "Top Raster Position" }, |
| 204 | /* Characters */ |
| 205 | { "&k", 'H', 0, 0, PCL_CPIcxx . . $ PCL_CPI., "Characters per Inch" }, |
| 206 | /* Media */ |
| 207 | { "&l", 'A', 0, 0, PCL_MEDIA_SIZEcxx . . $ PCL_MEDIA_SIZE. , "Media Size" }, |
| 208 | { "&l", 'C', 0, 0, PCL_SET_VMIcxx . . $ PCL_SET_VMI., "Set Vertical Line Spacing" }, |
| 209 | { "&l", 'D', 0, 0, PCL_LPIcxx . . $ PCL_LPI. , "Lines per Inch" }, |
| 210 | { "&l", 'E', 0, 0, PCL_TOP_MARGINcxx . . $ PCL_TOP_MARGIN. , "Top Margin" }, |
| 211 | { "&l", 'F', 0, 0, PCL_TEXT_LENGTHcxx . . $ PCL_TEXT_LENGTH. , "Text Length" }, |
| 212 | { "&l", 'G', 0, 0, PCL_MEDIA_DESTcxx . . $ PCL_MEDIA_DEST., "Media Destination" }, |
| 213 | { "&l", 'H', 0, 0, PCL_MEDIA_SOURCEcxx . . $ PCL_MEDIA_SOURCE., "Media Source" }, |
| 214 | { "&l", 'L', 0, 0, PCL_PERF_SKIPcxx . . $ PCL_PERF_SKIP. , "Perf. Skip" }, |
| 215 | { "&l", 'M', 0, 0, PCL_MEDIA_TYPEcxx . . $ PCL_MEDIA_TYPE. , "Media Type" }, |
| 216 | { "&l", 'O', 0, 0, PCL_PAGE_ORIENTATIONcxx . . $ PCL_PAGE_ORIENTATION., "Page Orientation" }, |
| 217 | { "&l", 'P', 0, 0, PCL_PAGE_LENGTHcxx . . $ PCL_PAGE_LENGTH., "Page Length in Lines" }, |
| 218 | { "&l", 'S', 0, 0, PCL_DUPLEXcxx . . $ PCL_DUPLEX., "Duplex mode" }, |
| 219 | { "&l", 'T', 0, 0, PCL_JOB_SEPARATIONcxx . . $ PCL_JOB_SEPARATION., "Job Separation" }, |
| 220 | { "&l", 'U', 0, 0, PCL_LEFT_OFFSET_REGISTRATIONcxx . . $ PCL_LEFT_OFFSET_REGISTRATION., "Left Offset Registration" }, |
| 221 | { "&l", 'X', 0, 0, PCL_NUM_COPIEScxx . . $ PCL_NUM_COPIES., "Number of copies" }, |
| 222 | { "&l", 'Z', 0, 0, PCL_TOP_OFFSET_REGISTRATIONcxx . . $ PCL_TOP_OFFSET_REGISTRATION., "Top Offset Registration" }, |
| 223 | /* Units */ |
| 224 | { "&u", 'D', 0, 0, PCL_UNIT_OF_MEASUREcxx . . $ PCL_UNIT_OF_MEASURE., "Unit of Measure" }, /* from bpd05446 */ |
| 225 | /* Raster data */ |
| 226 | { "*b", 'B', 0, 0, PCL_GRAY_BALANCEcxx . . $ PCL_GRAY_BALANCE., "Gray Balance" }, /* from PCL Developer's Guide 6.0 */ |
| 227 | { "*b", 'M', 0, 0, PCL_COMPRESSIONTYPEcxx . . $ PCL_COMPRESSIONTYPE., "Compression Type" }, |
| 228 | { "*b", 'S', 0, 0, PCL_SEED_ROW_SOURCEcxx . . $ PCL_SEED_ROW_SOURCE., "Seed row # source" }, |
| 229 | { "*b", 'V', 1, 0, PCL_DATAcxx . . $ PCL_DATA., "Data, intermediate" }, |
| 230 | { "*b", 'W', 1, 0, PCL_DATA_LASTcxx . . $ PCL_DATA_LAST., "Data, last" }, |
| 231 | { "*b", 'Y', 0, 0, PCL_RELATIVE_VERTICAL_PIXEL_MOVEMENTcxx . . $ PCL_RELATIVE_VERTICAL_PIXEL_MOVEMENT., "Relative Vertical Pixel Movement" }, |
| 232 | /* Palette */ |
| 233 | { "*d", 'W', 1, 0, PCL_PALETTE_CONFIGURATIONcxx . . $ PCL_PALETTE_CONFIGURATION., "Palette Configuration" }, |
| 234 | /* Plane configuration */ |
| 235 | { "*g", 'W', 1, 0, PCL_CONFIGUREcxx . . $ PCL_CONFIGURE., "Configure Raster Data" }, |
| 236 | /* Raster Graphics */ |
| 237 | { "*o", 'D', 0, 0, PCL_DEPLETIONcxx . . $ PCL_DEPLETION., "Depletion" }, |
| 238 | { "*o", 'M', 0, 0, PCL_PRINT_QUALITYcxx . . $ PCL_PRINT_QUALITY., "Print Quality" }, |
| 239 | { "*o", 'Q', 0, 0, PCL_SHINGLINGcxx . . $ PCL_SHINGLING., "Raster Graphics Shingling" }, |
| 240 | { "*o", 'W', 1, 0, PCL_DRIVER_CONFIGcxx . . $ PCL_DRIVER_CONFIG., "Driver Configuration Command" }, |
| 241 | /* Cursor Positioning */ |
| 242 | { "*p", 'X', 0, 0, PCL_HORIZONTAL_CURSOR_POSITIONING_BY_DOTScxx . . $ PCL_HORIZONTAL_CURSOR_POSITIONING_BY_DOTS., "Horizontal Cursor Positioning by Dots" }, |
| 243 | { "*p", 'Y', 0, 0, PCL_VERTICAL_CURSOR_POSITIONING_BY_DOTScxx . . $ PCL_VERTICAL_CURSOR_POSITIONING_BY_DOTS., "Vertical Cursor Positioning by Dots" }, |
| 244 | /* Raster graphics */ |
| 245 | { "*r", 'A', 0, 0, PCL_START_RASTERcxx . . $ PCL_START_RASTER., "Start Raster Graphics" }, |
| 246 | { "*r", 'B', 0, 0, PCL_END_RASTERcxx . . $ PCL_END_RASTER., "End Raster Graphics"}, |
| 247 | { "*r", 'C', 0, 0, PCL_END_COLOUR_RASTERcxx . . $ PCL_END_COLOUR_RASTER., "End Colour Raster Graphics" }, |
| 248 | { "*r", 'Q', 0, 0, PCL_RASTERGRAPHICS_QUALITYcxx . . $ PCL_RASTERGRAPHICS_QUALITY., "Raster Graphics Quality" }, |
| 249 | { "*r", 'S', 0, 0, PCL_RASTER_WIDTHcxx . . $ PCL_RASTER_WIDTH., "Raster Width" }, |
| 250 | { "*r", 'T', 0, 0, PCL_RASTER_HEIGHTcxx . . $ PCL_RASTER_HEIGHT., "Raster Height" }, |
| 251 | { "*r", 'U', 0, 0, PCL_COLOURTYPEcxx . . $ PCL_COLOURTYPE., "Colour Type" }, |
| 252 | /* Resolution */ |
| 253 | { "*t", 'R', 0, 0, PCL_RESOLUTIONcxx . . $ PCL_RESOLUTION., "Resolution" }, |
| 254 | { "*t", 'J', 0, 0, PCL_RASTER_RENDERcxx . . $ PCL_RASTER_RENDER., "Render Algorithm" }, |
| 255 | /* RTL/PCL5 */ |
| 256 | { "*v", 'W', 1, 0, PCL_RTL_CONFIGUREcxx . . $ PCL_RTL_CONFIGURE., "RTL Configure Image Data" }, |
| 257 | { "*v", 'A', 0, 0, PCL_COLOR_COMPONENT_1cxx . . $ PCL_COLOR_COMPONENT_1., "Color Component 1" }, |
| 258 | { "*v", 'B', 0, 0, PCL_COLOR_COMPONENT_2cxx . . $ PCL_COLOR_COMPONENT_2., "Color Component 2" }, |
| 259 | { "*v", 'C', 0, 0, PCL_COLOR_COMPONENT_3cxx . . $ PCL_COLOR_COMPONENT_3., "Color Component 3" }, |
| 260 | { "*v", 'I', 0, 0, PCL_ASSIGN_COLOR_INDEXcxx . . $ PCL_ASSIGN_COLOR_INDEX., "Assign Color Index" }, |
| 261 | { "*v", 'S', 0, 0, PCL_SET_FOREGROUND_COLORcxx . . $ PCL_SET_FOREGROUND_COLOR., "Set Foreground Color" }, |
| 262 | }; |
| 263 | |
| 264 | int pcl_find_commandcxx . . $ pcl_find_command(b126dc7c1de90089). (void); |
| 265 | void fill_buffercxx . . $ fill_buffer(49f6e7a06ebc5aa8). (void); |
| 266 | void pcl_read_commandcxx . . $ pcl_read_command(49f6e7a06ebc5aa8). (void); |
| 267 | void write_greycxx . . $ write_grey(68f3e7e0e3c2bba4). (output_tcxx . . $ output_t# *output, image_tcxx . . $ image_t# *image); |
| 268 | void write_pixelcxx . . $ write_pixel(68f3e7e0e3c2bba4). (output_tcxx . . $ output_t# *output, image_tcxx . . $ image_t# *image); |
| 269 | void write_colourcxx . . $ write_colour(68f3e7e0e3c2bba4). (output_tcxx . . $ output_t# *output, image_tcxx . . $ image_t# *image); |
| 270 | int decode_tiffcxx . . $ decode_tiff(7a63760584a149dc). (char *in_buffer, int data_length, char *decode_buf, |
| 271 | int maxlen); |
| 272 | int decode_deltacxx . . $ decode_delta(c9c5c1436ea186a2). (char *in_buffer, size_t data_length, char *decode_buf, |
| 273 | size_t maxlen); |
| 274 | void pcl_resetcxx . . $ pcl_reset(599da8bd83e736e8). (image_tcxx . . $ image_t# *i); |
| 275 | int depth_to_rowscxx . . $ depth_to_rows(7864480464b09eea). (int depth); |
| 276 | |
| 277 | |
| 278 | /* |
| 279 | * pcl_find_command(). Search the commands table for the command. |
| 280 | */ |
| 281 | |
| 282 | int pcl_find_commandcxx . . $ pcl_find_command(b126dc7c1de90089).(void) |
| 283 | { |
| 284 | |
| 285 | int num_commands = sizeof(pcl_commandscxx . . $ pcl_commands.) / sizeof(commands_tcxx . . $ commands_t#); |
| 286 | int i; |
| 287 | |
| 288 | for (i=0; i < num_commands; i++) { |
| 289 | if ((strcmpcxx . . $ strcmp(5ae29d726ae57f88).(initial_commandcxx . . $ initial_command., pcl_commandscxx . . $ pcl_commands.[i].initial_commandcxx . . $ $anonymous_type_613f0d930bdf33ab_3#initial_command.) == 0) && |
| 290 | (final_commandcxx . . $ final_command. == pcl_commandscxx . . $ pcl_commands.[i].final_commandcxx . . $ $anonymous_type_613f0d930bdf33ab_3#final_command.)) |
| 291 | return(i); |
| 292 | } |
| 293 | |
| 294 | return (-1); |
| 295 | } |
| 296 | |
| 297 | /* |
| 298 | * fill_buffer() - Read a new chunk from the input file |
| 299 | */ |
| 300 | |
| 301 | void fill_buffercxx . . $ fill_buffer(49f6e7a06ebc5aa8).(void) |
| 302 | { |
| 303 | |
| 304 | if ((read_pointercxx . . $ read_pointer. == -1) || (read_pointercxx . . $ read_pointer. >= read_sizecxx . . $ read_size.)) { |
| 305 | read_sizecxx . . $ read_size. = (int) freadcxx . . $ fread(738fc8ac1d711e58).(&read_buffercxx . . $ read_buffer., sizeof(char), READ_SIZEcxx . . $ `test/pcl-unprint.c:36:9`!, read_fdcxx . . $ read_fd.); |
| 306 | |
| 307 | #ifdef DEBUG |
| 308 | fprintf(stderr, "Read %d characters\n", read_size); |
| 309 | #endif |
| 310 | |
| 311 | if (read_sizecxx . . $ read_size. == 0) { |
| 312 | #ifdef DEBUG |
| 313 | fprintf(stderr, "No More to read!\n"); |
| 314 | #endif |
| 315 | eofcxx . . $ eof. = 1; |
| 316 | return; |
| 317 | } |
| 318 | read_pointercxx . . $ read_pointer. = 0; |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | /* |
| 323 | * pcl_read_command() - Read the data stream and parse the next PCL |
| 324 | * command. |
| 325 | */ |
| 326 | |
| 327 | void pcl_read_commandcxx . . $ pcl_read_command(49f6e7a06ebc5aa8).(void) |
| 328 | { |
| 329 | |
| 330 | char c; |
| 331 | int minus; |
| 332 | int skipped_chars; |
| 333 | |
| 334 | /* |
| 335 | Precis from the PCL Developer's Guide 6.0:- |
| 336 | |
| 337 | There are two formats for PCL commands; "Two Character" and |
| 338 | "Parameterised". |
| 339 | |
| 340 | A "Two Character" command is: ESC <x>, where <x> has a decimal |
| 341 | value between 48 and 126 (inclusive). |
| 342 | |
| 343 | A "Parameterised" command is: ESC <x> <y> [n] <z> |
| 344 | where x, y and z are characters, and [n] is an optional number. |
| 345 | The character <x> has a decimal value between 33 and 47 (incl). |
| 346 | The character <y> has a decimal value between 96 and 126 (incl). |
| 347 | |
| 348 | Some commands are followed by data, in this case, [n] is the |
| 349 | number of bytes to read, otherwise <n> is a numeric argument. |
| 350 | The number <n> can consist of +, - and 0-9 (and .). |
| 351 | |
| 352 | The character <z> is either in the range 64-94 for a termination |
| 353 | or 96-126 for a combined command. (The ref guide gives these |
| 354 | as "96-126" and "64-96" which cannot be right as 96 appears twice!) |
| 355 | |
| 356 | It is possible to combine parameterised commands if the |
| 357 | command prefix is the same, e.g. ESC & l 26 a 0 L is the same as |
| 358 | ESC & l 26 A ESC & l 0 L. The key to this is that the terminator for |
| 359 | the first command is in the range 96-126 (lower case). |
| 360 | |
| 361 | There is a problem with the "escape command" (ESC %) as it does not |
| 362 | conform to this specification, so we have to check for it specifically! |
| 363 | */ |
| 364 | |
| 365 | #define PCL_DIGITcxx . . $ `test/pcl-unprint.c:365:9`!(c) (((unsigned int) c >= 48) && ((unsigned int) c <= 57)) |
| 366 | #define PCL_TWOCHARcxx . . $ `test/pcl-unprint.c:366:9`!(c) (((unsigned int) c >= 48) && ((unsigned int) c <= 126)) |
| 367 | #define PCL_PARAMcxx . . $ `test/pcl-unprint.c:367:9`!(c) (((unsigned int) c >= 33) && ((unsigned int) c <= 47)) |
| 368 | #define PCL_PARAM2cxx . . $ `test/pcl-unprint.c:368:9`!(c) (((unsigned int) c >= 96) && ((unsigned int) c <= 126)) |
| 369 | #define PCL_COMBINED_TERMcxx . . $ `test/pcl-unprint.c:369:9`!(c) (((unsigned int) c >= 96) && ((unsigned int) c <= 126)) |
| 370 | #define PCL_TERMcxx . . $ `test/pcl-unprint.c:370:9`!(c) (((unsigned int) c >= 64) && ((unsigned int) c <= 94)) |
| 371 | #define PCL_CONVERT_TERMcxx . . $ `test/pcl-unprint.c:371:9`!(c) (c - (char) 32) |
| 372 | |
| 373 | numeric_argcxx . . $ numeric_arg.=0; |
| 374 | minus = 0; |
| 375 | final_commandcxx . . $ final_command. = '\0'; |
| 376 | |
| 377 | fill_buffercxx . . $ fill_buffer(49f6e7a06ebc5aa8).(); |
| 378 | if (eofcxx . . $ eof. == 1) |
| 379 | return; |
| 380 | |
| 381 | c = read_buffercxx . . $ read_buffer.[read_pointercxx . . $ read_pointer.++]; |
| 382 | #ifdef DEBUG |
| 383 | fprintf(stderr, "Got %c\n", c); |
| 384 | #endif |
| 385 | |
| 386 | /* |
| 387 | * If we are not in a "combined command", we are looking for ESC |
| 388 | */ |
| 389 | |
| 390 | if (combined_commandcxx . . $ combined_command. == 0) { |
| 391 | int non_ff_skipped_chars = 0; |
| 392 | if(c != (char) 0x1b) { |
| 393 | |
| 394 | /* |
| 395 | * all we can do is to chew through the file looking for another ESC. |
| 396 | */ |
| 397 | |
| 398 | skipped_chars = 0; |
| 399 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, " "); |
| 400 | while (c != (char) 0x1b) { |
| 401 | if (c == (char) 0x0c) |
| 402 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, " FF"); |
| 403 | else |
| 404 | non_ff_skipped_chars++; |
| 405 | skipped_chars++; |
| 406 | fill_buffercxx . . $ fill_buffer(49f6e7a06ebc5aa8).(); |
| 407 | if (eofcxx . . $ eof. == 1) { |
| 408 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: EOF looking for ESC!\n"); |
| 409 | return; |
| 410 | } |
| 411 | c = read_buffercxx . . $ read_buffer.[read_pointercxx . . $ read_pointer.++]; |
| 412 | } |
| 413 | if (non_ff_skipped_chars != 0) |
| 414 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: No ESC found (out of sync?) searching... "); |
| 415 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, " %d character%s skipped.\n", skipped_chars, |
| 416 | skipped_chars == 1 ? "" : "s"); |
| 417 | } |
| 418 | |
| 419 | /* |
| 420 | * We got an ESC, process normally |
| 421 | */ |
| 422 | |
| 423 | initial_command_indexcxx . . $ initial_command_index.=0; |
| 424 | initial_commandcxx . . $ initial_command.[initial_command_indexcxx . . $ initial_command_index.] = '\0'; |
| 425 | fill_buffercxx . . $ fill_buffer(49f6e7a06ebc5aa8).(); |
| 426 | if (eofcxx . . $ eof. == 1) { |
| 427 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: EOF after ESC!\n"); |
| 428 | return; |
| 429 | } |
| 430 | |
| 431 | /* Get first command letter */ |
| 432 | |
| 433 | c = read_buffercxx . . $ read_buffer.[read_pointercxx . . $ read_pointer.++]; |
| 434 | initial_commandcxx . . $ initial_command.[initial_command_indexcxx . . $ initial_command_index.++] = c; |
| 435 | |
| 436 | #ifdef DEBUG |
| 437 | fprintf(stderr, "Got %c\n", c); |
| 438 | #endif |
| 439 | |
| 440 | /* Check to see if this character forms a "two character" command, |
| 441 | or is a special command. */ |
| 442 | |
| 443 | if (PCL_TWOCHARcxx . . $ `test/pcl-unprint.c:366:9`!(c)) { |
| 444 | #ifdef DEBUG |
| 445 | fprintf(stderr, "Two character command\n"); |
| 446 | #endif |
| 447 | initial_commandcxx . . $ initial_command.[initial_command_indexcxx . . $ initial_command_index.] = '\0'; |
| 448 | return; |
| 449 | } /* two character check */ |
| 450 | |
| 451 | /* Now check for a "parameterised" sequence. */ |
| 452 | |
| 453 | else if (PCL_PARAMcxx . . $ `test/pcl-unprint.c:367:9`!(c)) { |
| 454 | #ifdef DEBUG |
| 455 | fprintf(stderr, "Parameterised command\n"); |
| 456 | #endif |
| 457 | |
| 458 | /* Get the next character in the command */ |
| 459 | |
| 460 | fill_buffercxx . . $ fill_buffer(49f6e7a06ebc5aa8).(); |
| 461 | if (eofcxx . . $ eof. == 1) { |
| 462 | |
| 463 | #ifdef DEBUG |
| 464 | fprintf(stderr, "EOF in middle of command!\n"); |
| 465 | #endif |
| 466 | eofcxx . . $ eof. = 0; /* Ignore it */ |
| 467 | initial_commandcxx . . $ initial_command.[initial_command_indexcxx . . $ initial_command_index.] = '\0'; |
| 468 | return; |
| 469 | } |
| 470 | c = read_buffercxx . . $ read_buffer.[read_pointercxx . . $ read_pointer.++]; |
| 471 | #ifdef DEBUG |
| 472 | fprintf(stderr, "Got %c\n", c); |
| 473 | #endif |
| 474 | |
| 475 | /* Check that it is legal and store it */ |
| 476 | |
| 477 | if (PCL_PARAM2cxx . . $ `test/pcl-unprint.c:368:9`!(c)) { |
| 478 | initial_commandcxx . . $ initial_command.[initial_command_indexcxx . . $ initial_command_index.++] = c; |
| 479 | initial_commandcxx . . $ initial_command.[initial_command_indexcxx . . $ initial_command_index.] = '\0'; |
| 480 | |
| 481 | /* Get the next character in the command then fall into the numeric part */ |
| 482 | |
| 483 | fill_buffercxx . . $ fill_buffer(49f6e7a06ebc5aa8).(); |
| 484 | if (eofcxx . . $ eof. == 1) { |
| 485 | |
| 486 | #ifdef DEBUG |
| 487 | fprintf(stderr, "EOF in middle of command!\n"); |
| 488 | #endif |
| 489 | eofcxx . . $ eof. = 0; /* Ignore it */ |
| 490 | return; |
| 491 | } |
| 492 | c = read_buffercxx . . $ read_buffer.[read_pointercxx . . $ read_pointer.++]; |
| 493 | #ifdef DEBUG |
| 494 | fprintf(stderr, "Got %c\n", c); |
| 495 | #endif |
| 496 | |
| 497 | } |
| 498 | else { |
| 499 | /* The second character is not legal. If the first character is '%' then allow it |
| 500 | * through */ |
| 501 | |
| 502 | if (initial_commandcxx . . $ initial_command.[0] == '%') { |
| 503 | #ifdef DEBUG |
| 504 | fprintf(stderr, "ESC%% command\n"); |
| 505 | #endif |
| 506 | initial_commandcxx . . $ initial_command.[initial_command_indexcxx . . $ initial_command_index.] = '\0'; |
| 507 | } |
| 508 | else { |
| 509 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: Illegal second character %c in parameterised command.\n", |
| 510 | c); |
| 511 | initial_commandcxx . . $ initial_command.[initial_command_indexcxx . . $ initial_command_index.] = '\0'; |
| 512 | return; |
| 513 | } |
| 514 | } |
| 515 | } /* Parameterised check */ |
| 516 | |
| 517 | /* If we get here, the command is illegal */ |
| 518 | |
| 519 | else { |
| 520 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: Illegal first character %c in command.\n", |
| 521 | c); |
| 522 | initial_commandcxx . . $ initial_command.[initial_command_indexcxx . . $ initial_command_index.] = '\0'; |
| 523 | return; |
| 524 | } |
| 525 | } /* End of (combined_command) */ |
| 526 | |
| 527 | /* |
| 528 | We get here if either this is a combined sequence, or we have processed |
| 529 | the beginning of a parameterised sequence. There is an optional number |
| 530 | next, which may be preceded by "+" or "-". FIXME We should also handle |
| 531 | decimal points. |
| 532 | */ |
| 533 | |
| 534 | if ((c == '-') || (c == '+') || (PCL_DIGITcxx . . $ `test/pcl-unprint.c:365:9`!(c))) { |
| 535 | if (c == '-') |
| 536 | minus = 1; |
| 537 | else if (c == '+') |
| 538 | minus = 0; |
| 539 | else |
| 540 | numeric_argcxx . . $ numeric_arg. = (int) (c - '0'); |
| 541 | |
| 542 | /* Continue until non-numeric seen */ |
| 543 | |
| 544 | while (1) { |
| 545 | fill_buffercxx . . $ fill_buffer(49f6e7a06ebc5aa8).(); |
| 546 | if (eofcxx . . $ eof. == 1) { |
| 547 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: EOF in middle of command!\n"); |
| 548 | return; |
| 549 | } |
| 550 | c = read_buffercxx . . $ read_buffer.[read_pointercxx . . $ read_pointer.++]; |
| 551 | |
| 552 | #ifdef DEBUG |
| 553 | fprintf(stderr, "Got %c\n", c); |
| 554 | #endif |
| 555 | |
| 556 | if (! PCL_DIGITcxx . . $ `test/pcl-unprint.c:365:9`!(c)) { |
| 557 | break; /* End of loop */ |
| 558 | } |
| 559 | numeric_argcxx . . $ numeric_arg. = (10 * numeric_argcxx . . $ numeric_arg.) + (int) (c - '0'); |
| 560 | } |
| 561 | } |
| 562 | |
| 563 | /* |
| 564 | We fell out of the loop when we read a non-numeric character. |
| 565 | Treat this as the terminating character and check for a combined |
| 566 | command. We should check that the letter is a valid terminator, |
| 567 | but it doesn't matter as we'll just not recognize the command! |
| 568 | */ |
| 569 | |
| 570 | combined_commandcxx . . $ combined_command. = (PCL_COMBINED_TERMcxx . . $ `test/pcl-unprint.c:369:9`!(c) != 0); |
| 571 | if (combined_commandcxx . . $ combined_command. == 1) { |
| 572 | #ifdef DEBUG |
| 573 | fprintf(stderr, "Combined command\n"); |
| 574 | #endif |
| 575 | final_commandcxx . . $ final_command. = PCL_CONVERT_TERMcxx . . $ `test/pcl-unprint.c:371:9`!(c); |
| 576 | } |
| 577 | else |
| 578 | final_commandcxx . . $ final_command. = c; |
| 579 | |
| 580 | if (minus == 1) |
| 581 | numeric_argcxx . . $ numeric_arg. = -numeric_argcxx . . $ numeric_arg.; |
| 582 | |
| 583 | return; |
| 584 | } |
| 585 | |
| 586 | /* |
| 587 | * write_grey() - write out one line of mono PNM image |
| 588 | */ |
| 589 | |
| 590 | /* FIXME - multiple levels */ |
| 591 | |
| 592 | void write_greycxx . . $ write_grey(68f3e7e0e3c2bba4).(output_tcxx . . $ output_t# *output, /* I: data */ |
| 593 | image_tcxx . . $ image_t# *image) /* I: Image data */ |
| 594 | { |
| 595 | int wholebytes = image->image_widthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_width. / 8; |
| 596 | int crumbs = image->image_widthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_width. - (wholebytes * 8); |
| 597 | char *buf = output->black_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_bufs.[0]; |
| 598 | |
| 599 | int i, j; |
| 600 | char tb[8]; |
| 601 | |
| 602 | #ifdef DEBUG |
| 603 | fprintf(stderr, "Data Length: %d, wholebytes: %d, crumbs: %d\n", |
| 604 | output->active_length, wholebytes, crumbs); |
| 605 | #endif |
| 606 | |
| 607 | for (i=0; i < wholebytes; i++) { |
| 608 | for (j=0; j < 8; j++) { |
| 609 | tb[j] = (((buf[i] >> (7-j)) & 1)); |
| 610 | tb[j] = output->output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth. - tb[j]; |
| 611 | } |
| 612 | (void) fwritecxx . . $ fwrite(ab0609fa07c47d6e).(&tb[0], sizeof(char), 8, write_fdcxx . . $ write_fd.); |
| 613 | } |
| 614 | for (j=0; j < crumbs; j++) { |
| 615 | tb[j] = (((buf[wholebytes] >> (7-j)) & 1)); |
| 616 | tb[j] = output->output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth. - tb[j]; |
| 617 | } |
| 618 | (void) fwritecxx . . $ fwrite(ab0609fa07c47d6e).(&tb[0], sizeof(char), (size_t) crumbs, write_fdcxx . . $ write_fd.); |
| 619 | } |
| 620 | |
| 621 | |
| 622 | /* |
| 623 | * write_pixel() - write out one line of pixel PNM image |
| 624 | */ |
| 625 | |
| 626 | /* FIXME - other than direct by pixel */ |
| 627 | void write_pixelcxx . . $ write_pixel(68f3e7e0e3c2bba4).(output_tcxx . . $ output_t# *output, /* I: data */ |
| 628 | image_tcxx . . $ image_t# *image) /* I: Image data */ |
| 629 | { |
| 630 | unsigned char *buf = (unsigned char *) (output->black_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_bufs.[0]); |
| 631 | int i; |
| 632 | if (image->colour_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#colour_type. == PCL_CMYcxx . . $ `test/pcl-unprint.c:102:9`!) { |
| 633 | for (i = 0; i < image->image_widthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_width. * 3; i++) { |
| 634 | buf[i] = -buf[i]; |
| 635 | } |
| 636 | } |
| 637 | (void) fwritecxx . . $ fwrite(ab0609fa07c47d6e).(buf, sizeof(char), image->image_widthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_width. * 3, write_fdcxx . . $ write_fd.); |
| 638 | /* Needed for delta compression */ |
| 639 | if (image->colour_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#colour_type. == PCL_CMYcxx . . $ `test/pcl-unprint.c:102:9`!) { |
| 640 | for (i = 0; i < image->image_widthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_width. * 3; i++) { |
| 641 | buf[i] = -buf[i]; |
| 642 | } |
| 643 | } |
| 644 | } |
| 645 | |
| 646 | /* |
| 647 | * write_colour() - Write out one row of RGB PNM data. |
| 648 | */ |
| 649 | |
| 650 | /* FIXME - multiple levels and CMYK/CMYKcm */ |
| 651 | |
| 652 | void write_colourcxx . . $ write_colour(68f3e7e0e3c2bba4).(output_tcxx . . $ output_t# *output, /* I: Data buffers */ |
| 653 | image_tcxx . . $ image_t# *image) /* I: Image data */ |
| 654 | { |
| 655 | int wholebytes = image->image_widthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_width. / 8; |
| 656 | int crumbs = image->image_widthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_width. - (wholebytes * 8); |
| 657 | |
| 658 | int i, j, jj; |
| 659 | char tb[8*3]; |
| 660 | |
| 661 | char *cyan_buf; |
| 662 | char *magenta_buf; |
| 663 | char *yellow_buf; |
| 664 | char *black_buf; |
| 665 | |
| 666 | return; |
| 667 | cyan_buf = output->cyan_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_bufs.[0]; |
| 668 | magenta_buf = output->magenta_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_bufs.[0]; |
| 669 | yellow_buf = output->yellow_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_bufs.[0]; |
| 670 | if (image->colour_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#colour_type. != PCL_CMYcxx . . $ `test/pcl-unprint.c:102:9`!) |
| 671 | black_buf = output->black_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_bufs.[0]; |
| 672 | else |
| 673 | black_buf = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!; |
| 674 | |
| 675 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Data Length: %d, wholebytes: %d, crumbs: %d, planes: %d\n", |
| 676 | output->active_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#active_length., wholebytes, crumbs, image->colour_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#colour_type.); |
| 677 | |
| 678 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Cyan: "); |
| 679 | for (i=0; i < output->active_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#active_length.; i++) { |
| 680 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%02x ", (unsigned char) cyan_buf[i]); |
| 681 | } |
| 682 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\n"); |
| 683 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Magenta: "); |
| 684 | for (i=0; i < output->active_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#active_length.; i++) { |
| 685 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%02x ", (unsigned char) magenta_buf[i]); |
| 686 | } |
| 687 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\n"); |
| 688 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Yellow: "); |
| 689 | for (i=0; i < output->active_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#active_length.; i++) { |
| 690 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%02x ", (unsigned char) yellow_buf[i]); |
| 691 | } |
| 692 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\n"); |
| 693 | if (image->colour_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#colour_type. == PCL_CMYKcxx . . $ `test/pcl-unprint.c:103:9`!) { |
| 694 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Black: "); |
| 695 | for (i=0; i < output->active_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#active_length.; i++) { |
| 696 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%02x ", (unsigned char) black_buf[i]); |
| 697 | } |
| 698 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\n"); |
| 699 | } |
| 700 | |
| 701 | if (output->pixels_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#pixels_depth. == 1) { |
| 702 | if (image->colour_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#colour_type. == PCL_CMYcxx . . $ `test/pcl-unprint.c:102:9`!) { |
| 703 | for (i=0; i < wholebytes; i++) { |
| 704 | for (j=0,jj=0; j < 8; j++,jj+=3) { |
| 705 | tb[jj] = (((cyan_buf[i] >> (7-j)) & 1)); |
| 706 | tb[jj] = output->output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth. - tb[jj]; |
| 707 | tb[jj+1] = (((magenta_buf[i] >> (7-j)) & 1)); |
| 708 | tb[jj+1] = output->output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth. - tb[jj+1]; |
| 709 | tb[jj+2] = (((yellow_buf[i] >> (7-j)) & 1)); |
| 710 | tb[jj+2] = output->output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth. - tb[jj+2]; |
| 711 | } |
| 712 | (void) fwritecxx . . $ fwrite(ab0609fa07c47d6e).(&tb[0], sizeof(char), (size_t) (8*3), write_fdcxx . . $ write_fd.); |
| 713 | } |
| 714 | for (j=0,jj=0; j < crumbs; j++,jj+=3) { |
| 715 | tb[jj] = (((cyan_buf[wholebytes] >> (7-j)) & 1)); |
| 716 | tb[jj] = output->output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth. - tb[jj]; |
| 717 | tb[jj+1] = (((magenta_buf[wholebytes] >> (7-j)) & 1)); |
| 718 | tb[jj+1] = output->output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth. - tb[jj+1]; |
| 719 | tb[jj+2] = (((yellow_buf[wholebytes] >> (7-j)) & 1)); |
| 720 | tb[jj+2] = output->output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth. - tb[jj+2]; |
| 721 | } |
| 722 | (void) fwritecxx . . $ fwrite(ab0609fa07c47d6e).(&tb[0], sizeof(char), (size_t) crumbs*3, write_fdcxx . . $ write_fd.); |
| 723 | } |
| 724 | else { |
| 725 | for (i=0; i < wholebytes; i++) { |
| 726 | for (j=0,jj=0; j < 8; j++,jj+=3) { |
| 727 | #if !defined OUTPUT_CMYK_ONLY_K && !defined OUTPUT_CMYK_ONLY_CMY |
| 728 | tb[jj] = ((((cyan_buf[i]|black_buf[i]) >> (7-j)) & 1)); |
| 729 | tb[jj+1] = ((((magenta_buf[i]|black_buf[i]) >> (7-j)) & 1)); |
| 730 | tb[jj+2] = ((((yellow_buf[i]|black_buf[i]) >> (7-j)) & 1)); |
| 731 | #endif |
| 732 | #ifdef OUTPUT_CMYK_ONLY_K |
| 733 | tb[jj] = (((black_buf[i] >> (7-j)) & 1)); |
| 734 | tb[jj+1] = (((black_buf[i] >> (7-j)) & 1)); |
| 735 | tb[jj+2] = (((black_buf[i] >> (7-j)) & 1)); |
| 736 | #endif |
| 737 | #ifdef OUTPUT_CMYK_ONLY_CMY |
| 738 | tb[jj] = (((cyan_buf[i] >> (7-j)) & 1)); |
| 739 | tb[jj+1] = (((magenta_buf[i] >> (7-j)) & 1)); |
| 740 | tb[jj+2] = (((yellow_buf[i] >> (7-j)) & 1)); |
| 741 | #endif |
| 742 | tb[jj] = output->output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth. - tb[jj]; |
| 743 | tb[jj+1] = output->output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth. - tb[jj+1]; |
| 744 | tb[jj+2] = output->output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth. - tb[jj+2]; |
| 745 | } |
| 746 | (void) fwritecxx . . $ fwrite(ab0609fa07c47d6e).(&tb[0], sizeof(char), (size_t) (8*3), write_fdcxx . . $ write_fd.); |
| 747 | } |
| 748 | for (j=0,jj=0; j < crumbs; j++,jj+=3) { |
| 749 | #if !defined OUTPUT_CMYK_ONLY_K && !defined OUTPUT_CMYK_ONLY_CMY |
| 750 | tb[jj] = ((((cyan_buf[wholebytes]|black_buf[wholebytes]) >> (7-j)) & 1)); |
| 751 | tb[jj+1] = ((((magenta_buf[wholebytes]|black_buf[wholebytes]) >> (7-j)) & 1)); |
| 752 | tb[jj+2] = ((((yellow_buf[wholebytes]|black_buf[wholebytes]) >> (7-j)) & 1)); |
| 753 | #endif |
| 754 | #ifdef OUTPUT_CMYK_ONLY_K |
| 755 | tb[jj] = (((black_buf[wholebytes] >> (7-j)) & 1)); |
| 756 | tb[jj+1] = (((black_buf[wholebytes] >> (7-j)) & 1)); |
| 757 | tb[jj+2] = (((black_buf[wholebytes] >> (7-j)) & 1)); |
| 758 | #endif |
| 759 | #ifdef OUTPUT_CMYK_ONLY_CMY |
| 760 | tb[jj] = (((cyan_buf[wholebytes] >> (7-j)) & 1)); |
| 761 | tb[jj+1] = (((magenta_buf[wholebytes] >> (7-j)) & 1)); |
| 762 | tb[jj+2] = (((yellow_buf[wholebytes] >> (7-j)) & 1)); |
| 763 | #endif |
| 764 | tb[jj] = output->output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth. - tb[jj]; |
| 765 | tb[jj+1] = output->output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth. - tb[jj+1]; |
| 766 | tb[jj+2] = output->output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth. - tb[jj+2]; |
| 767 | } |
| 768 | (void) fwritecxx . . $ fwrite(ab0609fa07c47d6e).(&tb[0], sizeof(char), (size_t) crumbs*3, write_fdcxx . . $ write_fd.); |
| 769 | } |
| 770 | } |
| 771 | } |
| 772 | /* |
| 773 | * decode_tiff() - Uncompress a TIFF encoded buffer |
| 774 | */ |
| 775 | |
| 776 | int decode_tiffcxx . . $ decode_tiff(7a63760584a149dc).(char *in_buffer, /* I: Data buffer */ |
| 777 | int data_length, /* I: Length of data */ |
| 778 | char *decode_buf, /* O: decoded data */ |
| 779 | int maxlen) /* I: Max length of decode_buf */ |
| 780 | { |
| 781 | /* The TIFF coding consists of either:- |
| 782 | * |
| 783 | * (0 <= count <= 127) (count+1 bytes of data) for non repeating data |
| 784 | * or |
| 785 | * (-127 <= count <= -1) (data) for 1-count bytes of repeating data |
| 786 | */ |
| 787 | |
| 788 | int count; |
| 789 | int pos = 0; |
| 790 | int dpos = 0; |
| 791 | #ifdef DEBUG |
| 792 | int i; |
| 793 | #endif |
| 794 | |
| 795 | while(pos < data_length ) { |
| 796 | |
| 797 | count = in_buffer[pos]; |
| 798 | |
| 799 | if ((count >= 0) && (count <= 127)) { |
| 800 | #ifdef DEBUG |
| 801 | fprintf(stderr, "%d bytes of nonrepeated data\n", count+1); |
| 802 | fprintf(stderr, "DATA: "); |
| 803 | for (i=0; i< (count+1); i++) { |
| 804 | fprintf(stderr, "%02x ", (unsigned char) in_buffer[pos + 1 + i]); |
| 805 | } |
| 806 | fprintf(stderr, "\n"); |
| 807 | #endif |
| 808 | if ((dpos + count + 1) > maxlen) { |
| 809 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: Too much expanded data (%d > %d)!\n", dpos + count + 1, maxlen); |
| 810 | exitcxx . . $ exit(3ca292c338df9bb3).(EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!); |
| 811 | } |
| 812 | memcpycxx . . $ memcpy(cc817cb175f282d).(&decode_buf[dpos], &in_buffer[pos+1], (size_t) (count + 1)); |
| 813 | dpos += count + 1; |
| 814 | pos += count + 2; |
| 815 | } |
| 816 | else if ((count >= -127) && (count < 0)) { |
| 817 | #ifdef DEBUG |
| 818 | fprintf(stderr, "%02x repeated %d times\n", (unsigned char) in_buffer[pos + 1], 1 - count); |
| 819 | #endif |
| 820 | if ((dpos + 1 - count) > maxlen) { |
| 821 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: Too much expanded data (%d > %d)!\n", dpos + 1 - count, maxlen); |
| 822 | exitcxx . . $ exit(3ca292c338df9bb3).(EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!); |
| 823 | } |
| 824 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&decode_buf[dpos], in_buffer[pos + 1], (size_t) (1 - count)); |
| 825 | dpos += 1 - count; |
| 826 | pos += 2; |
| 827 | } |
| 828 | else { |
| 829 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: Illegal TIFF count: %d, skipped\n", count); |
| 830 | pos += 2; |
| 831 | } |
| 832 | } |
| 833 | |
| 834 | #ifdef DEBUG |
| 835 | fprintf(stderr, "TIFFOUT: "); |
| 836 | for (i=0; i< dpos; i++) { |
| 837 | fprintf(stderr, "%02x ", (unsigned char) decode_buf[i]); |
| 838 | } |
| 839 | fprintf(stderr, "\n"); |
| 840 | #endif |
| 841 | return(dpos); |
| 842 | } |
| 843 | |
| 844 | /* |
| 845 | * decode_delta() - Uncompress a delta encoded buffer |
| 846 | */ |
| 847 | |
| 848 | int decode_deltacxx . . $ decode_delta(c9c5c1436ea186a2).(char *in_buffer, /* I: Data buffer */ |
| 849 | size_t data_length, /* I: Length of data */ |
| 850 | char *decode_buf, /* I/O: decoded data */ |
| 851 | size_t maxlen) /* I: Max length of decode_buf */ |
| 852 | { |
| 853 | |
| 854 | unsigned command_byte = 0; |
| 855 | unsigned delta_bytes = 0; |
| 856 | unsigned offset_from_last = 0; |
| 857 | unsigned next_offset = 0; |
| 858 | |
| 859 | size_t pos = 0; |
| 860 | int dpos = 0; |
| 861 | #ifdef DEBUG |
| 862 | int i = 0; |
| 863 | int j = 0; |
| 864 | #endif |
| 865 | |
| 866 | #ifdef DEBUG |
| 867 | fprintf(stderr, ">>>Decode delta %p %d %p %d\n", in_buffer, data_length, |
| 868 | decode_buf, maxlen); |
| 869 | #endif |
| 870 | while(pos < data_length ) { |
| 871 | |
| 872 | command_byte = in_buffer[pos]; |
| 873 | delta_bytes = (((unsigned char) command_byte) >> 5) + 1; |
| 874 | offset_from_last = (command_byte & ((1 << 5) - 1)); |
| 875 | if (offset_from_last == 31) { |
| 876 | do { |
| 877 | next_offset = (unsigned char) in_buffer[++pos]; |
| 878 | offset_from_last += next_offset; |
| 879 | } while (next_offset == 0xff); |
| 880 | } |
| 881 | #ifdef DEBUG |
| 882 | fprintf(stderr, "%d: command %02x (delta %d, offset %d)\n", i, |
| 883 | (unsigned char) command_byte, delta_bytes, offset_from_last); |
| 884 | fprintf(stderr, " pos %d dpos %d data_length %d maxlen %d\n", |
| 885 | pos, dpos, data_length, maxlen); |
| 886 | #endif |
| 887 | pos++; |
| 888 | if (data_length - pos < delta_bytes) { |
| 889 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: data overrun in delta (delta %d, remaining %zd)\n", |
| 890 | delta_bytes, data_length - pos); |
| 891 | } |
| 892 | dpos += offset_from_last; |
| 893 | (void) memcpycxx . . $ memcpy(cc817cb175f282d).(decode_buf + dpos, in_buffer + pos, delta_bytes); |
| 894 | #ifdef DEBUG |
| 895 | fprintf(stderr, " "); |
| 896 | for (j = 0; j < delta_bytes; j++) { |
| 897 | fprintf(stderr, "%02x ", (unsigned char) in_buffer[pos + j]); |
| 898 | } |
| 899 | fprintf(stderr, "\n"); |
| 900 | #endif |
| 901 | pos += delta_bytes; |
| 902 | dpos += delta_bytes; |
| 903 | #ifdef DEBUG |
| 904 | fprintf(stderr, " pos %d dpos %d data_length %d maxlen %d\n", |
| 905 | pos, dpos, data_length, maxlen); |
| 906 | i++; |
| 907 | #endif |
| 908 | } |
| 909 | /* |
| 910 | fprintf(stderr, " Decode delta %d %d %d\n", pos, data_length, dpos); |
| 911 | */ |
| 912 | |
| 913 | #ifdef DEBUG |
| 914 | fprintf(stderr, "DELTAOUT: "); |
| 915 | for (i=0; i< dpos; i++) { |
| 916 | fprintf(stderr, "%02x ", (unsigned char) decode_buf[i]); |
| 917 | } |
| 918 | fprintf(stderr, "\n"); |
| 919 | #endif |
| 920 | |
| 921 | (void)maxlen; |
| 922 | |
| 923 | return(dpos); |
| 924 | } |
| 925 | |
| 926 | /* |
| 927 | * pcl_reset() - Rest image parameters to default |
| 928 | */ |
| 929 | |
| 930 | void pcl_resetcxx . . $ pcl_reset(599da8bd83e736e8).(image_tcxx . . $ image_t# *i) |
| 931 | { |
| 932 | i->colour_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#colour_type. = PCL_MONOcxx . . $ `test/pcl-unprint.c:101:9`!; |
| 933 | i->pixel_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#pixel_type. = PCL_MONOcxx . . $ `test/pcl-unprint.c:101:9`!; |
| 934 | i->black_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#black_depth. = 2; /* Assume mono */ |
| 935 | i->cyan_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#cyan_depth. = 0; |
| 936 | i->magenta_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#magenta_depth. = 0; |
| 937 | i->yellow_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#yellow_depth. = 0; |
| 938 | i->lcyan_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#lcyan_depth. = 0; |
| 939 | i->lmagenta_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#lmagenta_depth. = 0; |
| 940 | i->image_widthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_width. = -1; |
| 941 | i->image_heightcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_height. = -1; |
| 942 | i->compression_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#compression_type. = 0; /* should this be NONE? */ |
| 943 | } |
| 944 | |
| 945 | /* |
| 946 | * depth_to_rows() - convert the depth of the colour into the number |
| 947 | * of data rows needed to represent it. Assumes that depth is a power |
| 948 | * of 2, FIXME if not! |
| 949 | */ |
| 950 | |
| 951 | int depth_to_rowscxx . . $ depth_to_rows(7864480464b09eea).(int depth) |
| 952 | { |
| 953 | int rows; |
| 954 | |
| 955 | if (depth == 0) |
| 956 | return(0); |
| 957 | |
| 958 | for (rows = 1; rows < 8; rows++) { |
| 959 | if ((depth >> rows) == 1) |
| 960 | return(rows); |
| 961 | } |
| 962 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: depth %d too big to handle in depth_to_rows()!\n", |
| 963 | depth); |
| 964 | return(0); /* ?? */ |
| 965 | } |
| 966 | |
| 967 | static void |
| 968 | print_commandcxx . . $ print_command(3e454b8ccf442868).(int index, int arg) |
| 969 | { |
| 970 | char buf[16]; |
| 971 | const commands_tcxx . . $ commands_t# *cmd = &(pcl_commandscxx . . $ pcl_commands.[index]); |
| 972 | (void) snprintfcxx . . $ snprintf(ea502d73e74c754c).(buf, 15, "%s%d%c", cmd->initial_commandcxx . . $ $anonymous_type_613f0d930bdf33ab_3#initial_command., arg, cmd->final_commandcxx . . $ $anonymous_type_613f0d930bdf33ab_3#final_command.); |
| 973 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%-8s (%s): ", buf, pcl_commandscxx . . $ pcl_commands.[index].descriptioncxx . . $ $anonymous_type_613f0d930bdf33ab_3#description.); |
| 974 | } |
| 975 | |
| 976 | /* |
| 977 | * Main |
| 978 | */ |
| 979 | |
| 980 | int maincxx . . $ main(afcd3168fc1188a4).(int argc, char *argv[]) |
| 981 | { |
| 982 | |
| 983 | int command_index; |
| 984 | command_tcxx . . $ command_t# command; |
| 985 | int i, j; /* Loop/general variables */ |
| 986 | int image_row_counter = -1; /* Count of current row */ |
| 987 | int total_image_rows = 0; /* All rows seen */ |
| 988 | int current_data_row = -1; /* Count of data rows received for this output row */ |
| 989 | int expected_data_rows_per_row = -1; |
| 990 | /* Expected no of data rows per output row */ |
| 991 | image_tcxx . . $ image_t# image_data; /* Data concerning image */ |
| 992 | long filepos = -1; |
| 993 | int wrote_header = 0; |
| 994 | int state_is_clean = 1; |
| 995 | |
| 996 | /* |
| 997 | * Holders for the decoded lines |
| 998 | */ |
| 999 | |
| 1000 | output_tcxx . . $ output_t# output_data; |
| 1001 | |
| 1002 | /* |
| 1003 | * The above pointers (when allocated) are then copied into this |
| 1004 | * variable in the correct order so that the received data can |
| 1005 | * be stored. |
| 1006 | */ |
| 1007 | |
| 1008 | char **received_rows; |
| 1009 | |
| 1010 | output_data.black_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_bufs. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!; /* Storage for black rows */ |
| 1011 | output_data.black_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_data_rows_per_row. = 0; /* Number of black rows */ |
| 1012 | output_data.cyan_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_bufs. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!; |
| 1013 | output_data.cyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_data_rows_per_row. = 0; |
| 1014 | output_data.magenta_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_bufs. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!; |
| 1015 | output_data.magenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_data_rows_per_row. = 0; |
| 1016 | output_data.yellow_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_bufs. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!; |
| 1017 | output_data.yellow_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_data_rows_per_row. = 0; |
| 1018 | output_data.lcyan_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#lcyan_bufs. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!; |
| 1019 | output_data.lcyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lcyan_data_rows_per_row. = 0; |
| 1020 | output_data.lmagenta_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#lmagenta_bufs. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!; |
| 1021 | output_data.lmagenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lmagenta_data_rows_per_row. = 0; |
| 1022 | output_data.buffer_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#buffer_length. = 0; |
| 1023 | output_data.active_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#active_length. = 0; |
| 1024 | output_data.output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth. = 0; |
| 1025 | output_data.input_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#input_depth. = 1; |
| 1026 | output_data.pixels_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#pixels_depth. = 1; |
| 1027 | |
| 1028 | received_rows = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!; |
| 1029 | |
| 1030 | if(argc == 1){ |
| 1031 | read_fdcxx . . $ read_fd. = stdincxx . . $ `<external>/232824719582829767/stdio.h:153:9`!; |
| 1032 | write_fdcxx . . $ write_fd. = stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!; |
| 1033 | } |
| 1034 | else if(argc == 2){ |
| 1035 | read_fdcxx . . $ read_fd. = fopencxx . . $ fopen(82ec0787cd37e0a3).(argv[1],"r"); |
| 1036 | write_fdcxx . . $ write_fd. = stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!; |
| 1037 | } |
| 1038 | else { |
| 1039 | if(*argv[1] == '-'){ |
| 1040 | read_fdcxx . . $ read_fd. = stdincxx . . $ `<external>/232824719582829767/stdio.h:153:9`!; |
| 1041 | write_fdcxx . . $ write_fd. = fopencxx . . $ fopen(82ec0787cd37e0a3).(argv[2],"w"); |
| 1042 | } |
| 1043 | else { |
| 1044 | read_fdcxx . . $ read_fd. = fopencxx . . $ fopen(82ec0787cd37e0a3).(argv[1],"r"); |
| 1045 | write_fdcxx . . $ write_fd. = fopencxx . . $ fopen(82ec0787cd37e0a3).(argv[2],"w"); |
| 1046 | } |
| 1047 | } |
| 1048 | |
| 1049 | if (read_fdcxx . . $ read_fd. == (FILEcxx . . $ FILE# *)NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!) { |
| 1050 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: Error Opening input file.\n"); |
| 1051 | exitcxx . . $ exit(3ca292c338df9bb3). (EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!); |
| 1052 | } |
| 1053 | |
| 1054 | if (write_fdcxx . . $ write_fd. == (FILEcxx . . $ FILE# *)NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!) { |
| 1055 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: Error Opening output file.\n"); |
| 1056 | exitcxx . . $ exit(3ca292c338df9bb3). (EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!); |
| 1057 | } |
| 1058 | |
| 1059 | read_pointercxx . . $ read_pointer.=-1; |
| 1060 | eofcxx . . $ eof.=0; |
| 1061 | initial_command_indexcxx . . $ initial_command_index.=0; |
| 1062 | initial_commandcxx . . $ initial_command.[initial_command_indexcxx . . $ initial_command_index.] = '\0'; |
| 1063 | numeric_argcxx . . $ numeric_arg.=0; |
| 1064 | final_commandcxx . . $ final_command. = '\0'; |
| 1065 | |
| 1066 | |
| 1067 | pcl_resetcxx . . $ pcl_reset(599da8bd83e736e8).(&image_data); |
| 1068 | |
| 1069 | while (1) { |
| 1070 | pcl_read_commandcxx . . $ pcl_read_command(49f6e7a06ebc5aa8).(); |
| 1071 | if (eofcxx . . $ eof. == 1) { |
| 1072 | if (! state_is_clean) |
| 1073 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "EOF while reading command.\n"); |
| 1074 | (void) fclosecxx . . $ fclose(89bc1efcdac0ca22).(read_fdcxx . . $ read_fd.); |
| 1075 | (void) fclosecxx . . $ fclose(89bc1efcdac0ca22).(write_fdcxx . . $ write_fd.); |
| 1076 | exitcxx . . $ exit(3ca292c338df9bb3).(EXIT_SUCCESScxx . . $ `<external>/10696550936717951914/stdlib.h:93:9`!); |
| 1077 | } |
| 1078 | |
| 1079 | #ifdef DEBUG |
| 1080 | fprintf(stderr, "initial_command: %s, numeric_arg: %d, final_command: %c\n", |
| 1081 | initial_command, numeric_arg, final_command); |
| 1082 | #endif |
| 1083 | |
| 1084 | command_index = pcl_find_commandcxx . . $ pcl_find_command(b126dc7c1de90089).(); |
| 1085 | if (command_index == -1) { |
| 1086 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: Unknown (and unhandled) command: %s%d%c\n", initial_commandcxx . . $ initial_command., |
| 1087 | numeric_argcxx . . $ numeric_arg., final_commandcxx . . $ final_command.); |
| 1088 | /* We may have to skip some data here */ |
| 1089 | } |
| 1090 | else { |
| 1091 | command = pcl_commandscxx . . $ pcl_commands.[command_index].commandcxx . . $ $anonymous_type_613f0d930bdf33ab_3#command.; |
| 1092 | state_is_clean = pcl_commandscxx . . $ pcl_commands.[command_index].clean_statecxx . . $ $anonymous_type_613f0d930bdf33ab_3#clean_state.; |
| 1093 | if (pcl_commandscxx . . $ pcl_commands.[command_index].has_datacxx . . $ $anonymous_type_613f0d930bdf33ab_3#has_data. == 1) { |
| 1094 | |
| 1095 | /* Read the data into data_buffer */ |
| 1096 | |
| 1097 | #ifdef DEBUG |
| 1098 | fprintf(stderr, "Data: "); |
| 1099 | #endif |
| 1100 | |
| 1101 | if (numeric_argcxx . . $ numeric_arg. > MAX_DATAcxx . . $ `test/pcl-unprint.c:42:9`!) { |
| 1102 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: Too much data (%d), increase MAX_DATA (%d)!\n", numeric_argcxx . . $ numeric_arg., MAX_DATAcxx . . $ `test/pcl-unprint.c:42:9`!); |
| 1103 | exitcxx . . $ exit(3ca292c338df9bb3).(EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!); |
| 1104 | } |
| 1105 | |
| 1106 | for (i=0; i < numeric_argcxx . . $ numeric_arg.; i++) { |
| 1107 | fill_buffercxx . . $ fill_buffer(49f6e7a06ebc5aa8).(); |
| 1108 | if (eofcxx . . $ eof. == 1) { |
| 1109 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: Unexpected EOF whilst reading data\n"); |
| 1110 | exitcxx . . $ exit(3ca292c338df9bb3).(EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!); |
| 1111 | } |
| 1112 | data_buffercxx . . $ data_buffer.[i] = read_buffercxx . . $ read_buffer.[read_pointercxx . . $ read_pointer.++]; |
| 1113 | |
| 1114 | #ifdef DEBUG |
| 1115 | fprintf(stderr, "%02x ", (unsigned char) data_buffer[i]); |
| 1116 | #endif |
| 1117 | |
| 1118 | } |
| 1119 | |
| 1120 | #ifdef DEBUG |
| 1121 | fprintf(stderr, "\n"); |
| 1122 | #endif |
| 1123 | |
| 1124 | } |
| 1125 | switch(command) { |
| 1126 | case PCL_RESETcxx . . $ PCL_RESET. : |
| 1127 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1128 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\n"); |
| 1129 | pcl_resetcxx . . $ pcl_reset(599da8bd83e736e8).(&image_data); |
| 1130 | break; |
| 1131 | |
| 1132 | case PCL_RESET_MARGINScxx . . $ PCL_RESET_MARGINS. : |
| 1133 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1134 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\n"); |
| 1135 | break; |
| 1136 | |
| 1137 | case PCL_START_RASTERcxx . . $ PCL_START_RASTER. : |
| 1138 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1139 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\n"); |
| 1140 | |
| 1141 | /* Make sure we have all the stuff needed to work out what we are going |
| 1142 | to write out. */ |
| 1143 | |
| 1144 | i = 0; /* use as error indicator */ |
| 1145 | |
| 1146 | if (image_data.image_widthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_width. == -1) { |
| 1147 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: Image width not set!\n"); |
| 1148 | i++; |
| 1149 | } |
| 1150 | if (image_data.image_heightcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_height. == -1) { |
| 1151 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "WARNING: Image height not set!\n"); |
| 1152 | } |
| 1153 | |
| 1154 | if ((image_data.black_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#black_depth. != 0) && |
| 1155 | (image_data.black_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#black_depth. != 2)) { |
| 1156 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "WARNING: Only 2 level black dithers handled.\n"); |
| 1157 | } |
| 1158 | if ((image_data.cyan_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#cyan_depth. != 0) && |
| 1159 | (image_data.cyan_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#cyan_depth. != 2)) { |
| 1160 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "WARNING: Only 2 level cyan dithers handled.\n"); |
| 1161 | } |
| 1162 | if ((image_data.magenta_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#magenta_depth. != 0) && |
| 1163 | (image_data.magenta_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#magenta_depth. != 2)) { |
| 1164 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "WARNING: Only 2 level magenta dithers handled.\n"); |
| 1165 | } |
| 1166 | if ((image_data.yellow_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#yellow_depth. != 0) && |
| 1167 | (image_data.yellow_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#yellow_depth. != 2)) { |
| 1168 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "WARNING: only 2 level yellow dithers handled.\n"); |
| 1169 | } |
| 1170 | if (image_data.lcyan_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#lcyan_depth. != 0) { |
| 1171 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "WARNING: Light cyan dithers not yet handled.\n"); |
| 1172 | } |
| 1173 | if (image_data.lmagenta_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#lmagenta_depth. != 0) { |
| 1174 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "WARNING: Light magenta dithers not yet handled.\n"); |
| 1175 | } |
| 1176 | |
| 1177 | if (image_data.compression_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#compression_type. != PCL_COMPRESSION_NONEcxx . . $ `test/pcl-unprint.c:107:9`! && |
| 1178 | image_data.compression_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#compression_type. != PCL_COMPRESSION_TIFFcxx . . $ `test/pcl-unprint.c:109:9`! && |
| 1179 | image_data.compression_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#compression_type. != PCL_COMPRESSION_DELTAcxx . . $ `test/pcl-unprint.c:110:9`!) { |
| 1180 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, |
| 1181 | "Sorry, only 'no compression' or 'tiff compression' handled.\n"); |
| 1182 | i++; |
| 1183 | } |
| 1184 | |
| 1185 | if (i != 0) { |
| 1186 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "PNM output suppressed, will continue diagnostic output.\n"); |
| 1187 | skip_outputcxx . . $ skip_output. = 1; |
| 1188 | } |
| 1189 | |
| 1190 | if (skip_outputcxx . . $ skip_output. == 0) { |
| 1191 | if (! wrote_header) { |
| 1192 | if (image_data.colour_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#colour_type. == PCL_MONOcxx . . $ `test/pcl-unprint.c:101:9`! && |
| 1193 | image_data.pixel_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#pixel_type. == PCL_MONOcxx . . $ `test/pcl-unprint.c:101:9`!) |
| 1194 | (void) fputscxx . . $ fputs(874fa6a5e59ab9bd).("P5\n", write_fdcxx . . $ write_fd.); /* Raw, Grey */ |
| 1195 | else |
| 1196 | (void) fputscxx . . $ fputs(874fa6a5e59ab9bd).("P6\n", write_fdcxx . . $ write_fd.); /* Raw, RGB */ |
| 1197 | |
| 1198 | (void) fputscxx . . $ fputs(874fa6a5e59ab9bd).("# Written by pclunprint.\n", write_fdcxx . . $ write_fd.); |
| 1199 | |
| 1200 | /* |
| 1201 | * Remember the file position where we wrote the image width and height |
| 1202 | * (you don't want to know why!) |
| 1203 | */ |
| 1204 | |
| 1205 | filepos = ftellcxx . . $ ftell(1dcafcd8ef4c6e6c).(write_fdcxx . . $ write_fd.); |
| 1206 | |
| 1207 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(write_fdcxx . . $ write_fd., "%10d %10d\n", image_data.image_widthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_width., |
| 1208 | image_data.image_heightcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_height.); |
| 1209 | } |
| 1210 | |
| 1211 | /* |
| 1212 | * Write the depth of the image |
| 1213 | */ |
| 1214 | |
| 1215 | if (image_data.black_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#black_depth. != 0) |
| 1216 | output_data.output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth. = image_data.black_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#black_depth. - 1; |
| 1217 | else |
| 1218 | output_data.output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth. = image_data.cyan_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#cyan_depth. - 1; |
| 1219 | if (! wrote_header) { |
| 1220 | if (output_data.pixels_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#pixels_depth. > 1) |
| 1221 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(write_fdcxx . . $ write_fd., "%d\n", 255); |
| 1222 | else |
| 1223 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(write_fdcxx . . $ write_fd., "%d\n", output_data.output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth.); |
| 1224 | } |
| 1225 | wrote_header = 1; |
| 1226 | |
| 1227 | |
| 1228 | image_row_counter = 0; |
| 1229 | current_data_row = 0; |
| 1230 | |
| 1231 | output_data.black_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_data_rows_per_row. = depth_to_rowscxx . . $ depth_to_rows(7864480464b09eea).(image_data.black_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#black_depth.); |
| 1232 | output_data.cyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_data_rows_per_row. = depth_to_rowscxx . . $ depth_to_rows(7864480464b09eea).(image_data.cyan_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#cyan_depth.); |
| 1233 | output_data.magenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_data_rows_per_row. = depth_to_rowscxx . . $ depth_to_rows(7864480464b09eea).(image_data.magenta_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#magenta_depth.); |
| 1234 | output_data.yellow_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_data_rows_per_row. = depth_to_rowscxx . . $ depth_to_rows(7864480464b09eea).(image_data.yellow_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#yellow_depth.); |
| 1235 | output_data.lcyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lcyan_data_rows_per_row. = depth_to_rowscxx . . $ depth_to_rows(7864480464b09eea).(image_data.lcyan_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#lcyan_depth.); |
| 1236 | output_data.lmagenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lmagenta_data_rows_per_row. = depth_to_rowscxx . . $ depth_to_rows(7864480464b09eea).(image_data.lmagenta_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#lmagenta_depth.); |
| 1237 | |
| 1238 | /* |
| 1239 | * Allocate some storage for the expected planes |
| 1240 | */ |
| 1241 | |
| 1242 | output_data.buffer_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#buffer_length. = (image_data.image_widthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_width. + 7) / 8; |
| 1243 | |
| 1244 | if (output_data.black_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_data_rows_per_row. != 0) { |
| 1245 | output_data.black_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_bufs. = stp_zalloccxx . . $ stp_zalloc(bfcfa4d6b7f7ef64).(output_data.black_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_data_rows_per_row. * sizeof (char *)); |
| 1246 | for (i=0; i < output_data.black_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_data_rows_per_row.; i++) { |
| 1247 | output_data.black_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_bufs.[i] = stp_zalloccxx . . $ stp_zalloc(bfcfa4d6b7f7ef64).(output_data.buffer_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#buffer_length. * sizeof (char) * output_data.input_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#input_depth. * output_data.pixels_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#pixels_depth.); |
| 1248 | } |
| 1249 | } |
| 1250 | if (output_data.cyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_data_rows_per_row. != 0) { |
| 1251 | output_data.cyan_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_bufs. = stp_zalloccxx . . $ stp_zalloc(bfcfa4d6b7f7ef64).(output_data.cyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_data_rows_per_row. * sizeof (char *)); |
| 1252 | for (i=0; i < output_data.cyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_data_rows_per_row.; i++) { |
| 1253 | output_data.cyan_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_bufs.[i] = stp_zalloccxx . . $ stp_zalloc(bfcfa4d6b7f7ef64).(output_data.buffer_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#buffer_length. * sizeof (char) * output_data.input_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#input_depth. * output_data.pixels_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#pixels_depth.); |
| 1254 | } |
| 1255 | } |
| 1256 | if (output_data.magenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_data_rows_per_row. != 0) { |
| 1257 | output_data.magenta_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_bufs. = stp_zalloccxx . . $ stp_zalloc(bfcfa4d6b7f7ef64).(output_data.magenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_data_rows_per_row. * sizeof (char *)); |
| 1258 | for (i=0; i < output_data.magenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_data_rows_per_row.; i++) { |
| 1259 | output_data.magenta_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_bufs.[i] = stp_zalloccxx . . $ stp_zalloc(bfcfa4d6b7f7ef64).(output_data.buffer_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#buffer_length. * sizeof (char) * output_data.input_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#input_depth. * output_data.pixels_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#pixels_depth.); |
| 1260 | } |
| 1261 | } |
| 1262 | if (output_data.yellow_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_data_rows_per_row. != 0) { |
| 1263 | output_data.yellow_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_bufs. = stp_zalloccxx . . $ stp_zalloc(bfcfa4d6b7f7ef64).(output_data.yellow_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_data_rows_per_row. * sizeof (char *)); |
| 1264 | for (i=0; i < output_data.yellow_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_data_rows_per_row.; i++) { |
| 1265 | output_data.yellow_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_bufs.[i] = stp_zalloccxx . . $ stp_zalloc(bfcfa4d6b7f7ef64).(output_data.buffer_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#buffer_length. * sizeof (char) * output_data.input_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#input_depth. * output_data.pixels_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#pixels_depth.); |
| 1266 | } |
| 1267 | } |
| 1268 | if (output_data.lcyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lcyan_data_rows_per_row. != 0) { |
| 1269 | output_data.lcyan_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#lcyan_bufs. = stp_zalloccxx . . $ stp_zalloc(bfcfa4d6b7f7ef64).(output_data.lcyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lcyan_data_rows_per_row. * sizeof (char *)); |
| 1270 | for (i=0; i < output_data.lcyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lcyan_data_rows_per_row.; i++) { |
| 1271 | output_data.lcyan_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#lcyan_bufs.[i] = stp_zalloccxx . . $ stp_zalloc(bfcfa4d6b7f7ef64).(output_data.buffer_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#buffer_length. * sizeof (char) * output_data.input_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#input_depth. * output_data.pixels_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#pixels_depth.); |
| 1272 | } |
| 1273 | } |
| 1274 | if (output_data.lmagenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lmagenta_data_rows_per_row. != 0) { |
| 1275 | output_data.lmagenta_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#lmagenta_bufs. = stp_zalloccxx . . $ stp_zalloc(bfcfa4d6b7f7ef64).(output_data.lmagenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lmagenta_data_rows_per_row. * sizeof (char *)); |
| 1276 | for (i=0; i < output_data.lmagenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lmagenta_data_rows_per_row.; i++) { |
| 1277 | output_data.lmagenta_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#lmagenta_bufs.[i] = stp_zalloccxx . . $ stp_zalloc(bfcfa4d6b7f7ef64).(output_data.buffer_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#buffer_length. * sizeof (char) * output_data.input_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#input_depth. * output_data.pixels_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#pixels_depth.); |
| 1278 | } |
| 1279 | } |
| 1280 | |
| 1281 | /* |
| 1282 | * Now store the pointers in the right order to make life easier in the |
| 1283 | * decoding phase |
| 1284 | */ |
| 1285 | |
| 1286 | expected_data_rows_per_row = output_data.black_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_data_rows_per_row. + |
| 1287 | output_data.cyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_data_rows_per_row. + output_data.magenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_data_rows_per_row. + |
| 1288 | output_data.yellow_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_data_rows_per_row. + output_data.lcyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lcyan_data_rows_per_row. + |
| 1289 | output_data.lmagenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lmagenta_data_rows_per_row.; |
| 1290 | |
| 1291 | received_rows = stp_malloccxx . . $ stp_malloc(bfcfa4d6b7f7ef64).(expected_data_rows_per_row * sizeof(char *)); |
| 1292 | j = 0; |
| 1293 | for (i = 0; i < output_data.black_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_data_rows_per_row.; i++) |
| 1294 | received_rows[j++] = output_data.black_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_bufs.[i]; |
| 1295 | for (i = 0; i < output_data.cyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_data_rows_per_row.; i++) |
| 1296 | received_rows[j++] = output_data.cyan_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_bufs.[i]; |
| 1297 | for (i = 0; i < output_data.magenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_data_rows_per_row.; i++) |
| 1298 | received_rows[j++] = output_data.magenta_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_bufs.[i]; |
| 1299 | for (i = 0; i < output_data.yellow_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_data_rows_per_row.; i++) |
| 1300 | received_rows[j++] = output_data.yellow_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_bufs.[i]; |
| 1301 | for (i = 0; i < output_data.lcyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lcyan_data_rows_per_row.; i++) |
| 1302 | received_rows[j++] = output_data.lcyan_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#lcyan_bufs.[i]; |
| 1303 | for (i = 0; i < output_data.lmagenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lmagenta_data_rows_per_row.; i++) |
| 1304 | received_rows[j++] = output_data.lmagenta_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#lmagenta_bufs.[i]; |
| 1305 | } |
| 1306 | break; |
| 1307 | |
| 1308 | case PCL_END_RASTERcxx . . $ PCL_END_RASTER. : |
| 1309 | case PCL_END_COLOUR_RASTERcxx . . $ PCL_END_COLOUR_RASTER. : |
| 1310 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1311 | |
| 1312 | if (skip_outputcxx . . $ skip_output. == 0) { |
| 1313 | |
| 1314 | /* |
| 1315 | * Check that we got the correct number of rows of data. If the expected number is |
| 1316 | * -1, we have to go back and fill in the PNM parameters (which is why we remembered |
| 1317 | * where they were in the file!) |
| 1318 | */ |
| 1319 | |
| 1320 | if (image_data.image_heightcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_height. == -1) { |
| 1321 | image_data.image_heightcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_height. = image_row_counter; |
| 1322 | total_image_rows += image_row_counter; |
| 1323 | if (fseekcxx . . $ fseek(543fae30d249f6b1).(write_fdcxx . . $ write_fd., filepos, SEEK_SETcxx . . $ `<external>/232824719582829767/stdio.h:110:9`!) != -1) { |
| 1324 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(write_fdcxx . . $ write_fd., "%10d %10d\n", image_data.image_widthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_width., |
| 1325 | total_image_rows); |
| 1326 | fseekcxx . . $ fseek(543fae30d249f6b1).(write_fdcxx . . $ write_fd., 0L, SEEK_ENDcxx . . $ `<external>/232824719582829767/stdio.h:112:9`!); |
| 1327 | } |
| 1328 | } |
| 1329 | |
| 1330 | if (image_row_counter != image_data.image_heightcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_height.) |
| 1331 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: Row count mismatch. Expected %d rows, got %d rows.\n", |
| 1332 | image_data.image_heightcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_height., image_row_counter); |
| 1333 | else |
| 1334 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\t%d rows processed, max %d.\n", |
| 1335 | image_row_counter, max_data_lencxx . . $ max_data_len.); |
| 1336 | |
| 1337 | image_data.image_heightcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_height. = -1; |
| 1338 | image_row_counter = -1; |
| 1339 | |
| 1340 | if (output_data.black_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_data_rows_per_row. != 0) { |
| 1341 | for (i=0; i < output_data.black_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_data_rows_per_row.; i++) { |
| 1342 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(output_data.black_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_bufs.[i]); |
| 1343 | } |
| 1344 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(output_data.black_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_bufs.); |
| 1345 | output_data.black_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_bufs. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!; |
| 1346 | } |
| 1347 | output_data.black_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#black_data_rows_per_row. = 0; |
| 1348 | if (output_data.cyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_data_rows_per_row. != 0) { |
| 1349 | for (i=0; i < output_data.cyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_data_rows_per_row.; i++) { |
| 1350 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(output_data.cyan_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_bufs.[i]); |
| 1351 | } |
| 1352 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(output_data.cyan_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_bufs.); |
| 1353 | output_data.cyan_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_bufs. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!; |
| 1354 | } |
| 1355 | output_data.cyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#cyan_data_rows_per_row. = 0; |
| 1356 | if (output_data.magenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_data_rows_per_row. != 0) { |
| 1357 | for (i=0; i < output_data.magenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_data_rows_per_row.; i++) { |
| 1358 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(output_data.magenta_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_bufs.[i]); |
| 1359 | } |
| 1360 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(output_data.magenta_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_bufs.); |
| 1361 | output_data.magenta_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_bufs. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!; |
| 1362 | } |
| 1363 | output_data.magenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#magenta_data_rows_per_row. = 0; |
| 1364 | if (output_data.yellow_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_data_rows_per_row. != 0) { |
| 1365 | for (i=0; i < output_data.yellow_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_data_rows_per_row.; i++) { |
| 1366 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(output_data.yellow_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_bufs.[i]); |
| 1367 | } |
| 1368 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(output_data.yellow_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_bufs.); |
| 1369 | output_data.yellow_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_bufs. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!; |
| 1370 | } |
| 1371 | output_data.yellow_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#yellow_data_rows_per_row. = 0; |
| 1372 | if (output_data.lcyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lcyan_data_rows_per_row. != 0) { |
| 1373 | for (i=0; i < output_data.lcyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lcyan_data_rows_per_row.; i++) { |
| 1374 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(output_data.lcyan_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#lcyan_bufs.[i]); |
| 1375 | } |
| 1376 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(output_data.lcyan_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#lcyan_bufs.); |
| 1377 | output_data.lcyan_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#lcyan_bufs. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!; |
| 1378 | } |
| 1379 | output_data.lcyan_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lcyan_data_rows_per_row. = 0; |
| 1380 | if (output_data.lmagenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lmagenta_data_rows_per_row. != 0) { |
| 1381 | for (i=0; i < output_data.lmagenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lmagenta_data_rows_per_row.; i++) { |
| 1382 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(output_data.lmagenta_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#lmagenta_bufs.[i]); |
| 1383 | } |
| 1384 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(output_data.lmagenta_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#lmagenta_bufs.); |
| 1385 | output_data.lmagenta_bufscxx . . $ $anonymous_type_613f0d930bdf33ab_1#lmagenta_bufs. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!; |
| 1386 | } |
| 1387 | output_data.lmagenta_data_rows_per_rowcxx . . $ $anonymous_type_613f0d930bdf33ab_1#lmagenta_data_rows_per_row. = 0; |
| 1388 | stp_freecxx . . $ stp_free(5d22bdacc48458e8).(received_rows); |
| 1389 | received_rows = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!; |
| 1390 | } |
| 1391 | break; |
| 1392 | |
| 1393 | case PCL_SET_VMIcxx . . $ PCL_SET_VMI. : |
| 1394 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1395 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\n"); |
| 1396 | break; |
| 1397 | |
| 1398 | case PCL_MEDIA_SIZEcxx . . $ PCL_MEDIA_SIZE. : |
| 1399 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1400 | switch (numeric_argcxx . . $ numeric_arg.) { |
| 1401 | case 2 : |
| 1402 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Letter\n"); |
| 1403 | break; |
| 1404 | case 3 : |
| 1405 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Legal\n"); |
| 1406 | break; |
| 1407 | case 6 : |
| 1408 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Tabloid\n"); |
| 1409 | break; |
| 1410 | case 26 : |
| 1411 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "A4\n"); |
| 1412 | break; |
| 1413 | case 27 : |
| 1414 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "A3\n"); |
| 1415 | break; |
| 1416 | case 101 : |
| 1417 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Custom\n"); |
| 1418 | break; |
| 1419 | default : |
| 1420 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown (%d)\n", numeric_argcxx . . $ numeric_arg.); |
| 1421 | break; |
| 1422 | } |
| 1423 | break; |
| 1424 | |
| 1425 | case PCL_MEDIA_TYPEcxx . . $ PCL_MEDIA_TYPE. : |
| 1426 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1427 | switch (numeric_argcxx . . $ numeric_arg.) { |
| 1428 | case 0 : |
| 1429 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Plain\n"); |
| 1430 | break; |
| 1431 | case 1 : |
| 1432 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Bond\n"); |
| 1433 | break; |
| 1434 | case 2 : |
| 1435 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Premium\n"); |
| 1436 | break; |
| 1437 | case 3 : |
| 1438 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Glossy/Photo\n"); |
| 1439 | break; |
| 1440 | case 4 : |
| 1441 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Transparency\n"); |
| 1442 | break; |
| 1443 | case 5 : |
| 1444 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Quick-dry Photo\n"); |
| 1445 | break; |
| 1446 | case 6 : |
| 1447 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Quick-dry Transparency\n"); |
| 1448 | break; |
| 1449 | default : |
| 1450 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown (%d)\n", numeric_argcxx . . $ numeric_arg.); |
| 1451 | break; |
| 1452 | } |
| 1453 | break; |
| 1454 | |
| 1455 | case PCL_MEDIA_SOURCEcxx . . $ PCL_MEDIA_SOURCE. : |
| 1456 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1457 | switch (numeric_argcxx . . $ numeric_arg.) { |
| 1458 | case -2 : |
| 1459 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "FEED CURRENT\n"); |
| 1460 | break; |
| 1461 | case 0 : |
| 1462 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "EJECT\n"); |
| 1463 | break; |
| 1464 | case 1 : |
| 1465 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "LJ Tray 2 or Portable CSF or DJ Tray\n"); |
| 1466 | break; |
| 1467 | case 2 : |
| 1468 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Manual\n"); |
| 1469 | break; |
| 1470 | case 3 : |
| 1471 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Envelope\n"); |
| 1472 | break; |
| 1473 | case 4 : |
| 1474 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "LJ Tray 3 or Desktop CSF or DJ Tray 2\n"); |
| 1475 | break; |
| 1476 | case 5 : |
| 1477 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "LJ Tray 4 or DJ optional\n"); |
| 1478 | break; |
| 1479 | case 7 : |
| 1480 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "DJ Autosource\n"); |
| 1481 | break; |
| 1482 | case 8 : |
| 1483 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "LJ Tray 1\n"); |
| 1484 | break; |
| 1485 | default : |
| 1486 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown (%d)\n", numeric_argcxx . . $ numeric_arg.); |
| 1487 | break; |
| 1488 | } |
| 1489 | break; |
| 1490 | |
| 1491 | case PCL_SHINGLINGcxx . . $ PCL_SHINGLING. : |
| 1492 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1493 | switch (numeric_argcxx . . $ numeric_arg.) { |
| 1494 | case 0 : |
| 1495 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "None\n"); |
| 1496 | break; |
| 1497 | case 1 : |
| 1498 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "2 passes\n"); |
| 1499 | break; |
| 1500 | case 2 : |
| 1501 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "4 passes\n"); |
| 1502 | break; |
| 1503 | default : |
| 1504 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown (%d)\n", numeric_argcxx . . $ numeric_arg.); |
| 1505 | break; |
| 1506 | } |
| 1507 | break; |
| 1508 | |
| 1509 | case PCL_RASTERGRAPHICS_QUALITYcxx . . $ PCL_RASTERGRAPHICS_QUALITY. : |
| 1510 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1511 | switch (numeric_argcxx . . $ numeric_arg.) { |
| 1512 | case 0 : |
| 1513 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "(set by printer controls)\n"); |
| 1514 | break; |
| 1515 | case 1 : |
| 1516 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Draft\n"); |
| 1517 | break; |
| 1518 | case 2 : |
| 1519 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "High\n"); |
| 1520 | break; |
| 1521 | default : |
| 1522 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown (%d)\n", numeric_argcxx . . $ numeric_arg.); |
| 1523 | break; |
| 1524 | } |
| 1525 | break; |
| 1526 | |
| 1527 | case PCL_DEPLETIONcxx . . $ PCL_DEPLETION. : |
| 1528 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1529 | switch (numeric_argcxx . . $ numeric_arg.) { |
| 1530 | case 1 : |
| 1531 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "None\n"); |
| 1532 | break; |
| 1533 | case 2 : |
| 1534 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "25%%\n"); |
| 1535 | break; |
| 1536 | case 3 : |
| 1537 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "50%%\n"); |
| 1538 | break; |
| 1539 | case 5 : |
| 1540 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "50%% with gamma correction\n"); |
| 1541 | break; |
| 1542 | default : |
| 1543 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown (%d)\n", numeric_argcxx . . $ numeric_arg.); |
| 1544 | break; |
| 1545 | } |
| 1546 | break; |
| 1547 | |
| 1548 | case PCL_PRINT_QUALITYcxx . . $ PCL_PRINT_QUALITY. : |
| 1549 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1550 | switch (numeric_argcxx . . $ numeric_arg.) { |
| 1551 | case -1 : |
| 1552 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Draft\n"); |
| 1553 | break; |
| 1554 | case 0 : |
| 1555 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Normal\n"); |
| 1556 | break; |
| 1557 | case 1 : |
| 1558 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Presentation\n"); |
| 1559 | break; |
| 1560 | default : |
| 1561 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown (%d)\n", numeric_argcxx . . $ numeric_arg.); |
| 1562 | break; |
| 1563 | } |
| 1564 | break; |
| 1565 | |
| 1566 | case PCL_RELATIVE_VERTICAL_PIXEL_MOVEMENTcxx . . $ PCL_RELATIVE_VERTICAL_PIXEL_MOVEMENT. : |
| 1567 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1568 | |
| 1569 | if (skip_outputcxx . . $ skip_output. == 0) { |
| 1570 | |
| 1571 | /* Check that we are in raster mode */ |
| 1572 | |
| 1573 | if (expected_data_rows_per_row == -1) |
| 1574 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: raster data without start raster!\n"); |
| 1575 | |
| 1576 | /* |
| 1577 | What we need to do now is to write out "N" rows of all-white data to |
| 1578 | simulate the vertical slew |
| 1579 | */ |
| 1580 | |
| 1581 | for (i=0; i<expected_data_rows_per_row; i++) |
| 1582 | { |
| 1583 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(received_rows[i], 0, (size_t) output_data.buffer_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#buffer_length. * sizeof(char) * output_data.output_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#output_depth.); |
| 1584 | } |
| 1585 | for (i=0; i<numeric_argcxx . . $ numeric_arg.; i++) |
| 1586 | { |
| 1587 | if (image_data.colour_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#colour_type. == PCL_MONOcxx . . $ `test/pcl-unprint.c:101:9`!) { |
| 1588 | if (image_data.pixel_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#pixel_type. == PCL_MONOcxx . . $ `test/pcl-unprint.c:101:9`!) { |
| 1589 | write_greycxx . . $ write_grey(68f3e7e0e3c2bba4).(&output_data, &image_data); |
| 1590 | } else { |
| 1591 | write_pixelcxx . . $ write_pixel(68f3e7e0e3c2bba4).(&output_data, &image_data); |
| 1592 | } |
| 1593 | } else { |
| 1594 | write_colourcxx . . $ write_colour(68f3e7e0e3c2bba4).(&output_data, &image_data); |
| 1595 | } |
| 1596 | image_row_counter++; |
| 1597 | } |
| 1598 | } |
| 1599 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\n"); |
| 1600 | break; |
| 1601 | |
| 1602 | case PCL_DUPLEXcxx . . $ PCL_DUPLEX. : |
| 1603 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1604 | switch (numeric_argcxx . . $ numeric_arg.) { |
| 1605 | case 0 : |
| 1606 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "None\n"); |
| 1607 | break; |
| 1608 | case 1 : |
| 1609 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Duplex No Tumble (Long Edge)\n"); |
| 1610 | break; |
| 1611 | case 2 : |
| 1612 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Duplex Tumble (Short Edge)\n"); |
| 1613 | break; |
| 1614 | default : |
| 1615 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown (%d)\n", numeric_argcxx . . $ numeric_arg.); |
| 1616 | break; |
| 1617 | } |
| 1618 | break; |
| 1619 | |
| 1620 | case PCL_DRIVER_CONFIGcxx . . $ PCL_DRIVER_CONFIG. : |
| 1621 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1622 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "(ignored)"); |
| 1623 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, " Data: "); |
| 1624 | for (i=0; i < numeric_argcxx . . $ numeric_arg.; i++) { |
| 1625 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%02x ", (unsigned char) data_buffercxx . . $ data_buffer.[i]); |
| 1626 | } |
| 1627 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\n"); |
| 1628 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, " Device: "); |
| 1629 | switch (data_buffercxx . . $ data_buffer.[0]) { |
| 1630 | case 6: |
| 1631 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Color Laser Printer\n"); |
| 1632 | break; |
| 1633 | default: |
| 1634 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown\n"); |
| 1635 | break; |
| 1636 | } |
| 1637 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, " Function: "); |
| 1638 | switch (data_buffercxx . . $ data_buffer.[1]) { |
| 1639 | case 0: |
| 1640 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Lightness %d\n", data_buffercxx . . $ data_buffer.[2]); |
| 1641 | break; |
| 1642 | case 1: |
| 1643 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Saturation %d\n", data_buffercxx . . $ data_buffer.[2]); |
| 1644 | break; |
| 1645 | case 3: |
| 1646 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Scaling Algorithm: "); |
| 1647 | switch (data_buffercxx . . $ data_buffer.[2]) { |
| 1648 | case 0: |
| 1649 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Pixel Replication\n"); |
| 1650 | break; |
| 1651 | case 1: |
| 1652 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Bilinear Interpolation\n"); |
| 1653 | break; |
| 1654 | case 2: |
| 1655 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Modified Bilinear Interpolation\n"); |
| 1656 | break; |
| 1657 | default: |
| 1658 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown\n"); |
| 1659 | } |
| 1660 | break; |
| 1661 | case 4: |
| 1662 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Color Treatment: "); |
| 1663 | switch (data_buffercxx . . $ data_buffer.[2]) { |
| 1664 | case 0: |
| 1665 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "No Adjustment\n"); |
| 1666 | break; |
| 1667 | case 1: |
| 1668 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Process Blue\n"); |
| 1669 | break; |
| 1670 | case 2: |
| 1671 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Vivid Graphics\n"); |
| 1672 | break; |
| 1673 | case 3: |
| 1674 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Transparency\n"); |
| 1675 | break; |
| 1676 | case 4: |
| 1677 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Out of Gamut\n"); |
| 1678 | break; |
| 1679 | case 5: |
| 1680 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "CIE Lab Match\n"); |
| 1681 | break; |
| 1682 | case 6: |
| 1683 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Screen Match\n"); |
| 1684 | break; |
| 1685 | default: |
| 1686 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown\n"); |
| 1687 | } |
| 1688 | break; |
| 1689 | case 5: |
| 1690 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Download Color Map: "); |
| 1691 | switch (data_buffercxx . . $ data_buffer.[2]) { |
| 1692 | case 1: |
| 1693 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "CMY Color Space\n"); |
| 1694 | break; |
| 1695 | case 3: |
| 1696 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "CIE Lab Color Space\n"); |
| 1697 | break; |
| 1698 | default: |
| 1699 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown\n"); |
| 1700 | } |
| 1701 | break; |
| 1702 | default: |
| 1703 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown\n"); |
| 1704 | break; |
| 1705 | } |
| 1706 | break; |
| 1707 | case PCL_PERF_SKIPcxx . . $ PCL_PERF_SKIP. : |
| 1708 | case PCL_TOP_MARGINcxx . . $ PCL_TOP_MARGIN. : |
| 1709 | case PCL_RESOLUTIONcxx . . $ PCL_RESOLUTION. : |
| 1710 | case PCL_LEFTRASTER_POScxx . . $ PCL_LEFTRASTER_POS. : |
| 1711 | case PCL_TOPRASTER_POScxx . . $ PCL_TOPRASTER_POS. : |
| 1712 | case PCL_VERTICAL_CURSOR_POSITIONING_BY_DOTScxx . . $ PCL_VERTICAL_CURSOR_POSITIONING_BY_DOTS. : |
| 1713 | case PCL_HORIZONTAL_CURSOR_POSITIONING_BY_DOTScxx . . $ PCL_HORIZONTAL_CURSOR_POSITIONING_BY_DOTS. : |
| 1714 | case PCL_PALETTE_CONFIGURATIONcxx . . $ PCL_PALETTE_CONFIGURATION. : |
| 1715 | case PCL_UNIT_OF_MEASUREcxx . . $ PCL_UNIT_OF_MEASURE. : |
| 1716 | case PCL_GRAY_BALANCEcxx . . $ PCL_GRAY_BALANCE. : |
| 1717 | case PCL_LPIcxx . . $ PCL_LPI. : |
| 1718 | case PCL_CPIcxx . . $ PCL_CPI. : |
| 1719 | case PCL_PAGE_LENGTHcxx . . $ PCL_PAGE_LENGTH. : |
| 1720 | case PCL_NUM_COPIEScxx . . $ PCL_NUM_COPIES. : |
| 1721 | case PCL_ENTER_PCLcxx . . $ PCL_ENTER_PCL. : |
| 1722 | case PCL_NEGATIVE_MOTIONcxx . . $ PCL_NEGATIVE_MOTION. : |
| 1723 | case PCL_JOB_SEPARATIONcxx . . $ PCL_JOB_SEPARATION. : |
| 1724 | case PCL_LEFT_OFFSET_REGISTRATIONcxx . . $ PCL_LEFT_OFFSET_REGISTRATION. : |
| 1725 | case PCL_TOP_OFFSET_REGISTRATIONcxx . . $ PCL_TOP_OFFSET_REGISTRATION. : |
| 1726 | case PCL_PRINT_DIRECTIONcxx . . $ PCL_PRINT_DIRECTION. : |
| 1727 | case PCL_LEFT_MARGINcxx . . $ PCL_LEFT_MARGIN. : |
| 1728 | case PCL_RIGHT_MARGINcxx . . $ PCL_RIGHT_MARGIN. : |
| 1729 | case PCL_TEXT_LENGTHcxx . . $ PCL_TEXT_LENGTH. : |
| 1730 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1731 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "(ignored)"); |
| 1732 | if (pcl_commandscxx . . $ pcl_commands.[command_index].has_datacxx . . $ $anonymous_type_613f0d930bdf33ab_3#has_data. == 1) { |
| 1733 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, " Data: "); |
| 1734 | for (i=0; i < numeric_argcxx . . $ numeric_arg.; i++) { |
| 1735 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%02x ", (unsigned char) data_buffercxx . . $ data_buffer.[i]); |
| 1736 | } |
| 1737 | } |
| 1738 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\n"); |
| 1739 | break; |
| 1740 | |
| 1741 | case PCL_COLOURTYPEcxx . . $ PCL_COLOURTYPE. : |
| 1742 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1743 | image_data.colour_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#colour_type. = -numeric_argcxx . . $ numeric_arg.; |
| 1744 | switch (image_data.colour_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#colour_type.) { |
| 1745 | case PCL_MONOcxx . . $ `test/pcl-unprint.c:101:9`! : |
| 1746 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "MONO\n"); |
| 1747 | break; |
| 1748 | case PCL_CMYcxx . . $ `test/pcl-unprint.c:102:9`! : |
| 1749 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "CMY (one cart)\n"); |
| 1750 | image_data.black_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#black_depth. = 0; /* Black levels */ |
| 1751 | image_data.cyan_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#cyan_depth. = 2; /* Cyan levels */ |
| 1752 | image_data.magenta_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#magenta_depth. = 2; /* Magenta levels */ |
| 1753 | image_data.yellow_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#yellow_depth. = 2; /* Yellow levels */ |
| 1754 | break; |
| 1755 | case PCL_CMYKcxx . . $ `test/pcl-unprint.c:103:9`! : |
| 1756 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "CMYK (two cart)\n"); |
| 1757 | image_data.black_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#black_depth. = 2; /* Black levels */ |
| 1758 | image_data.cyan_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#cyan_depth. = 2; /* Cyan levels */ |
| 1759 | image_data.magenta_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#magenta_depth. = 2; /* Magenta levels */ |
| 1760 | image_data.yellow_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#yellow_depth. = 2; /* Yellow levels */ |
| 1761 | break; |
| 1762 | default : |
| 1763 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown (%d)\n", -numeric_argcxx . . $ numeric_arg.); |
| 1764 | break; |
| 1765 | } |
| 1766 | break; |
| 1767 | |
| 1768 | case PCL_COMPRESSIONTYPEcxx . . $ PCL_COMPRESSIONTYPE. : |
| 1769 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1770 | image_data.compression_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#compression_type. = numeric_argcxx . . $ numeric_arg.; |
| 1771 | switch (image_data.compression_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#compression_type.) { |
| 1772 | case PCL_COMPRESSION_NONEcxx . . $ `test/pcl-unprint.c:107:9`! : |
| 1773 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "NONE\n"); |
| 1774 | break; |
| 1775 | case PCL_COMPRESSION_RUNLENGTHcxx . . $ `test/pcl-unprint.c:108:9`! : |
| 1776 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Runlength\n"); |
| 1777 | break; |
| 1778 | case PCL_COMPRESSION_TIFFcxx . . $ `test/pcl-unprint.c:109:9`! : |
| 1779 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "TIFF\n"); |
| 1780 | break; |
| 1781 | case PCL_COMPRESSION_DELTAcxx . . $ `test/pcl-unprint.c:110:9`! : |
| 1782 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "DELTA\n"); |
| 1783 | break; |
| 1784 | case PCL_COMPRESSION_ADAPTIVEcxx . . $ `test/pcl-unprint.c:111:9`! : |
| 1785 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ADAPTIVE (mono only)\n"); |
| 1786 | break; |
| 1787 | case PCL_COMPRESSION_CRDRcxx . . $ `test/pcl-unprint.c:112:9`! : |
| 1788 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Compressed Row Delta Replacement\n"); |
| 1789 | break; |
| 1790 | default : |
| 1791 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown (%d)\n", image_data.compression_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#compression_type.); |
| 1792 | break; |
| 1793 | } |
| 1794 | break; |
| 1795 | |
| 1796 | case PCL_RASTER_WIDTHcxx . . $ PCL_RASTER_WIDTH. : |
| 1797 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1798 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\n"); |
| 1799 | image_data.image_widthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_width. = numeric_argcxx . . $ numeric_arg.; |
| 1800 | break; |
| 1801 | |
| 1802 | case PCL_RASTER_HEIGHTcxx . . $ PCL_RASTER_HEIGHT. : |
| 1803 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1804 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\n"); |
| 1805 | image_data.image_heightcxx . . $ $anonymous_type_613f0d930bdf33ab_0#image_height. = numeric_argcxx . . $ numeric_arg.; |
| 1806 | break; |
| 1807 | |
| 1808 | case PCL_SEED_ROW_SOURCEcxx . . $ PCL_SEED_ROW_SOURCE. : |
| 1809 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1810 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\n"); |
| 1811 | break; |
| 1812 | |
| 1813 | case PCL_RTL_CONFIGUREcxx . . $ PCL_RTL_CONFIGURE. : |
| 1814 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1815 | for (i = 0; i < numeric_argcxx . . $ numeric_arg.; i++) |
| 1816 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, " %02x", (unsigned char) data_buffercxx . . $ data_buffer.[i]); |
| 1817 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\n"); |
| 1818 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, " Color Space: "); |
| 1819 | switch (data_buffercxx . . $ data_buffer.[0]) { |
| 1820 | case 0: |
| 1821 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "DeviceRGB\n"); |
| 1822 | image_data.pixel_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#pixel_type. = PCL_RGBcxx . . $ `test/pcl-unprint.c:105:9`!; |
| 1823 | break; |
| 1824 | case 1: |
| 1825 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "DeviceCMY\n"); |
| 1826 | image_data.pixel_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#pixel_type. = PCL_CMYcxx . . $ `test/pcl-unprint.c:102:9`!; |
| 1827 | break; |
| 1828 | case 2: |
| 1829 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "sRGB\n"); |
| 1830 | image_data.pixel_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#pixel_type. = PCL_RGBcxx . . $ `test/pcl-unprint.c:105:9`!; |
| 1831 | break; |
| 1832 | default: |
| 1833 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown\n"); |
| 1834 | break; |
| 1835 | } |
| 1836 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, " Encoding: "); |
| 1837 | switch (data_buffercxx . . $ data_buffer.[1]) { |
| 1838 | case 0: |
| 1839 | case 1: |
| 1840 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Indexed by %s, %d bits/index", |
| 1841 | data_buffercxx . . $ data_buffer.[1] == 0 ? "Plane" : "Pixel", |
| 1842 | data_buffercxx . . $ data_buffer.[2]); |
| 1843 | output_data.input_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#input_depth. = data_buffercxx . . $ data_buffer.[2]; |
| 1844 | break; |
| 1845 | case 2: |
| 1846 | case 3: |
| 1847 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Direct by %s, depth %d\n", |
| 1848 | data_buffercxx . . $ data_buffer.[1] == 2 ? "Plane" : "Pixel", |
| 1849 | data_buffercxx . . $ data_buffer.[3]); |
| 1850 | output_data.pixels_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#pixels_depth. = 3; |
| 1851 | output_data.input_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#input_depth. = data_buffercxx . . $ data_buffer.[3]; |
| 1852 | break; |
| 1853 | default: |
| 1854 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown\n"); |
| 1855 | break; |
| 1856 | } |
| 1857 | break; |
| 1858 | |
| 1859 | case PCL_CONFIGUREcxx . . $ PCL_CONFIGURE. : |
| 1860 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1861 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\tFormat: %d\n", data_buffercxx . . $ data_buffer.[0]); |
| 1862 | if (data_buffercxx . . $ data_buffer.[0] == 2) { |
| 1863 | |
| 1864 | /* |
| 1865 | * the data that follows depends on the colour type (buffer[1]). The size |
| 1866 | * of the data should be 2 + (6 * number of planes). |
| 1867 | */ |
| 1868 | |
| 1869 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\tOutput Planes: "); |
| 1870 | image_data.colour_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#colour_type. = data_buffercxx . . $ data_buffer.[1]; /* # output planes */ |
| 1871 | switch (image_data.colour_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#colour_type.) { |
| 1872 | case PCL_MONOcxx . . $ `test/pcl-unprint.c:101:9`! : |
| 1873 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "MONO\n"); |
| 1874 | |
| 1875 | /* Size should be 8 */ |
| 1876 | |
| 1877 | if (numeric_argcxx . . $ numeric_arg. != 8) |
| 1878 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: Expected 8 bytes of data, got %d\n", numeric_argcxx . . $ numeric_arg.); |
| 1879 | |
| 1880 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\tBlack: X dpi: %d, Y dpi: %d, Levels: %d\n", ((unsigned char) data_buffercxx . . $ data_buffer.[2]<<8)+(unsigned char)data_buffercxx . . $ data_buffer.[3], |
| 1881 | ((unsigned char) data_buffercxx . . $ data_buffer.[4]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[5], data_buffercxx . . $ data_buffer.[7]); |
| 1882 | image_data.black_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#black_depth. = data_buffercxx . . $ data_buffer.[7]; /* Black levels */ |
| 1883 | break; |
| 1884 | case PCL_CMYcxx . . $ `test/pcl-unprint.c:102:9`! : |
| 1885 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "CMY (one cart)\n"); |
| 1886 | |
| 1887 | /* Size should be 20 */ |
| 1888 | |
| 1889 | if (numeric_argcxx . . $ numeric_arg. != 20) |
| 1890 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: Expected 20 bytes of data, got %d\n", numeric_argcxx . . $ numeric_arg.); |
| 1891 | |
| 1892 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\tCyan: X dpi: %d, Y dpi: %d, Levels: %d\n", ((unsigned char) data_buffercxx . . $ data_buffer.[2]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[3], |
| 1893 | ((unsigned char) data_buffercxx . . $ data_buffer.[4]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[5], data_buffercxx . . $ data_buffer.[7]); |
| 1894 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\tMagenta: X dpi: %d, Y dpi: %d, Levels: %d\n", ((unsigned char) data_buffercxx . . $ data_buffer.[8]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[9], |
| 1895 | ((unsigned char) data_buffercxx . . $ data_buffer.[10]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[11], data_buffercxx . . $ data_buffer.[13]); |
| 1896 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\tYellow: X dpi: %d, Y dpi: %d, Levels: %d\n", ((unsigned char) data_buffercxx . . $ data_buffer.[14]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[15], |
| 1897 | ((unsigned char) data_buffercxx . . $ data_buffer.[16]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[17], data_buffercxx . . $ data_buffer.[19]); |
| 1898 | image_data.black_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#black_depth. = 0; |
| 1899 | image_data.cyan_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#cyan_depth. = data_buffercxx . . $ data_buffer.[7]; /* Cyan levels */ |
| 1900 | image_data.magenta_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#magenta_depth. = data_buffercxx . . $ data_buffer.[13]; /* Magenta levels */ |
| 1901 | image_data.yellow_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#yellow_depth. = data_buffercxx . . $ data_buffer.[19]; /* Yellow levels */ |
| 1902 | break; |
| 1903 | case PCL_CMYKcxx . . $ `test/pcl-unprint.c:103:9`! : |
| 1904 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "CMYK (two cart)\n"); |
| 1905 | |
| 1906 | /* Size should be 26 */ |
| 1907 | |
| 1908 | if (numeric_argcxx . . $ numeric_arg. != 26) |
| 1909 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: Expected 26 bytes of data, got %d\n", numeric_argcxx . . $ numeric_arg.); |
| 1910 | |
| 1911 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\tBlack: X dpi: %d, Y dpi: %d, Levels: %d\n", ((unsigned char) data_buffercxx . . $ data_buffer.[2]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[3], |
| 1912 | ((unsigned char) data_buffercxx . . $ data_buffer.[4]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[5], data_buffercxx . . $ data_buffer.[7]); |
| 1913 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\tCyan: X dpi: %d, Y dpi: %d, Levels: %d\n", ((unsigned char) data_buffercxx . . $ data_buffer.[8]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[9], |
| 1914 | ((unsigned char) data_buffercxx . . $ data_buffer.[10]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[11], data_buffercxx . . $ data_buffer.[13]); |
| 1915 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\tMagenta: X dpi: %d, Y dpi: %d, Levels: %d\n", ((unsigned char) data_buffercxx . . $ data_buffer.[14]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[15], |
| 1916 | ((unsigned char) data_buffercxx . . $ data_buffer.[16]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[17], data_buffercxx . . $ data_buffer.[19]); |
| 1917 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\tYellow: X dpi: %d, Y dpi: %d, Levels: %d\n", ((unsigned char) data_buffercxx . . $ data_buffer.[20]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[21], |
| 1918 | ((unsigned char) data_buffercxx . . $ data_buffer.[22]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[23], data_buffercxx . . $ data_buffer.[25]); |
| 1919 | image_data.black_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#black_depth. = data_buffercxx . . $ data_buffer.[7]; /* Black levels */ |
| 1920 | image_data.cyan_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#cyan_depth. = data_buffercxx . . $ data_buffer.[13]; /* Cyan levels */ |
| 1921 | image_data.magenta_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#magenta_depth. = data_buffercxx . . $ data_buffer.[19]; /* Magenta levels */ |
| 1922 | image_data.yellow_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#yellow_depth. = data_buffercxx . . $ data_buffer.[25]; /* Yellow levels */ |
| 1923 | break; |
| 1924 | case PCL_CMYKcmcxx . . $ `test/pcl-unprint.c:104:9`! : |
| 1925 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "CMYKcm (two cart photo)\n"); |
| 1926 | |
| 1927 | /* Size should be 38 */ |
| 1928 | |
| 1929 | if (numeric_argcxx . . $ numeric_arg. != 38) |
| 1930 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: Expected 38 bytes of data, got %d\n", numeric_argcxx . . $ numeric_arg.); |
| 1931 | |
| 1932 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\tBlack: X dpi: %d, Y dpi: %d, Levels: %d\n", ((unsigned char) data_buffercxx . . $ data_buffer.[2]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[3], |
| 1933 | ((unsigned char) data_buffercxx . . $ data_buffer.[4]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[5], data_buffercxx . . $ data_buffer.[7]); |
| 1934 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\tCyan: X dpi: %d, Y dpi: %d, Levels: %d\n", ((unsigned char) data_buffercxx . . $ data_buffer.[8]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[9], |
| 1935 | ((unsigned char) data_buffercxx . . $ data_buffer.[10]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[11], data_buffercxx . . $ data_buffer.[13]); |
| 1936 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\tMagenta: X dpi: %d, Y dpi: %d, Levels: %d\n", ((unsigned char) data_buffercxx . . $ data_buffer.[14]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[15], |
| 1937 | ((unsigned char) data_buffercxx . . $ data_buffer.[16]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[17], data_buffercxx . . $ data_buffer.[19]); |
| 1938 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\tYellow: X dpi: %d, Y dpi: %d, Levels: %d\n", ((unsigned char) data_buffercxx . . $ data_buffer.[20]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[21], |
| 1939 | ((unsigned char) data_buffercxx . . $ data_buffer.[22]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[23], data_buffercxx . . $ data_buffer.[25]); |
| 1940 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\tLight Cyan: X dpi: %d, Y dpi: %d, Levels: %d\n", ((unsigned char) data_buffercxx . . $ data_buffer.[26]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[27], |
| 1941 | ((unsigned char) data_buffercxx . . $ data_buffer.[28]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[29], data_buffercxx . . $ data_buffer.[31]); |
| 1942 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\tLight Magenta: X dpi: %d, Y dpi: %d, Levels: %d\n", ((unsigned char) data_buffercxx . . $ data_buffer.[32]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[33], |
| 1943 | ((unsigned char) data_buffercxx . . $ data_buffer.[34]<<8)+(unsigned char) data_buffercxx . . $ data_buffer.[35], data_buffercxx . . $ data_buffer.[37]); |
| 1944 | image_data.black_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#black_depth. = data_buffercxx . . $ data_buffer.[7]; /* Black levels */ |
| 1945 | image_data.cyan_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#cyan_depth. = data_buffercxx . . $ data_buffer.[13]; /* Cyan levels */ |
| 1946 | image_data.magenta_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#magenta_depth. = data_buffercxx . . $ data_buffer.[19]; /* Magenta levels */ |
| 1947 | image_data.yellow_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#yellow_depth. = data_buffercxx . . $ data_buffer.[25]; /* Yellow levels */ |
| 1948 | image_data.lcyan_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#lcyan_depth. = data_buffercxx . . $ data_buffer.[31]; /* Cyan levels */ |
| 1949 | image_data.lmagenta_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_0#lmagenta_depth. = data_buffercxx . . $ data_buffer.[37]; /* Magenta levels */ |
| 1950 | break; |
| 1951 | default : |
| 1952 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown (%d)\n", data_buffercxx . . $ data_buffer.[1]); |
| 1953 | break; |
| 1954 | } |
| 1955 | } |
| 1956 | else { |
| 1957 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown format %d\n", data_buffercxx . . $ data_buffer.[0]); |
| 1958 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Data: "); |
| 1959 | for (i=0; i < numeric_argcxx . . $ numeric_arg.; i++) { |
| 1960 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%02x ", (unsigned char) data_buffercxx . . $ data_buffer.[i]); |
| 1961 | } |
| 1962 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\n"); |
| 1963 | } |
| 1964 | break; |
| 1965 | |
| 1966 | case PCL_DATAcxx . . $ PCL_DATA. : |
| 1967 | case PCL_DATA_LASTcxx . . $ PCL_DATA_LAST. : |
| 1968 | if (skip_outputcxx . . $ skip_output. == 1) { |
| 1969 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 1970 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\n"); |
| 1971 | } |
| 1972 | else { |
| 1973 | |
| 1974 | /* |
| 1975 | * Make sure that we have enough data to process this command! |
| 1976 | */ |
| 1977 | |
| 1978 | if (expected_data_rows_per_row == -1) |
| 1979 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: raster data without start raster!\n"); |
| 1980 | |
| 1981 | if (numeric_argcxx . . $ numeric_arg. > max_data_lencxx . . $ max_data_len.) |
| 1982 | max_data_lencxx . . $ max_data_len. = numeric_argcxx . . $ numeric_arg.; |
| 1983 | /* |
| 1984 | * The last flag indicates that this is the end of the planes for a row |
| 1985 | * so we check it against the number of planes we have seen and are |
| 1986 | * expecting. |
| 1987 | */ |
| 1988 | |
| 1989 | if (command == PCL_DATA_LASTcxx . . $ PCL_DATA_LAST.) { |
| 1990 | if (current_data_row != (expected_data_rows_per_row - 1)) |
| 1991 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: 'Last Plane' set on plane %d of %d!\n", |
| 1992 | current_data_row, expected_data_rows_per_row); |
| 1993 | } |
| 1994 | else { |
| 1995 | if (current_data_row == (expected_data_rows_per_row - 1)) |
| 1996 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: Expected 'last plane', but not set!\n"); |
| 1997 | } |
| 1998 | |
| 1999 | /* |
| 2000 | * Accumulate the data rows for each output row,then write the image. |
| 2001 | */ |
| 2002 | /* |
| 2003 | fprintf(stderr, ">>>>>Current %d %p %p %p\n", |
| 2004 | current_data_row, received_rows, |
| 2005 | data_buffer, received_rows[current_data_row]); |
| 2006 | */ |
| 2007 | |
| 2008 | if (image_data.compression_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#compression_type. == PCL_COMPRESSION_NONEcxx . . $ `test/pcl-unprint.c:107:9`!) { |
| 2009 | memcpycxx . . $ memcpy(cc817cb175f282d).(received_rows[current_data_row], &data_buffercxx . . $ data_buffer., (size_t) numeric_argcxx . . $ numeric_arg.); |
| 2010 | output_data.active_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#active_length. = numeric_argcxx . . $ numeric_arg. * output_data.input_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#input_depth. * output_data.pixels_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#pixels_depth.; |
| 2011 | } |
| 2012 | else if (image_data.compression_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#compression_type. == PCL_COMPRESSION_TIFFcxx . . $ `test/pcl-unprint.c:109:9`!) { |
| 2013 | output_data.active_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#active_length. = decode_tiffcxx . . $ decode_tiff(7a63760584a149dc).(data_buffercxx . . $ data_buffer., numeric_argcxx . . $ numeric_arg., received_rows[current_data_row], output_data.buffer_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#buffer_length. * output_data.input_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#input_depth. * output_data.pixels_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#pixels_depth.); |
| 2014 | |
| 2015 | } |
| 2016 | else if (image_data.compression_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#compression_type. == PCL_COMPRESSION_DELTAcxx . . $ `test/pcl-unprint.c:110:9`!) { |
| 2017 | output_data.active_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#active_length. = decode_deltacxx . . $ decode_delta(c9c5c1436ea186a2).(data_buffercxx . . $ data_buffer., numeric_argcxx . . $ numeric_arg., received_rows[current_data_row], output_data.buffer_lengthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#buffer_length. * output_data.input_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#input_depth. * output_data.pixels_depthcxx . . $ $anonymous_type_613f0d930bdf33ab_1#pixels_depth.); |
| 2018 | } |
| 2019 | /* |
| 2020 | fprintf(stderr, "<<<<<Current %d %p %p %p\n", |
| 2021 | current_data_row, received_rows, |
| 2022 | data_buffer, received_rows[current_data_row]); |
| 2023 | */ |
| 2024 | if (command == PCL_DATA_LASTcxx . . $ PCL_DATA_LAST.) { |
| 2025 | if (image_data.colour_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#colour_type. == PCL_MONOcxx . . $ `test/pcl-unprint.c:101:9`!) { |
| 2026 | if (image_data.pixel_typecxx . . $ $anonymous_type_613f0d930bdf33ab_0#pixel_type. == PCL_MONOcxx . . $ `test/pcl-unprint.c:101:9`!) { |
| 2027 | write_greycxx . . $ write_grey(68f3e7e0e3c2bba4).(&output_data, &image_data); |
| 2028 | } else { |
| 2029 | write_pixelcxx . . $ write_pixel(68f3e7e0e3c2bba4).(&output_data, &image_data); |
| 2030 | } |
| 2031 | } else { |
| 2032 | write_colourcxx . . $ write_colour(68f3e7e0e3c2bba4).(&output_data, &image_data); |
| 2033 | } |
| 2034 | current_data_row = 0; |
| 2035 | image_row_counter++; |
| 2036 | } |
| 2037 | else |
| 2038 | current_data_row++; |
| 2039 | } |
| 2040 | break; |
| 2041 | |
| 2042 | case PCL_ENTER_HPGL2cxx . . $ PCL_ENTER_HPGL2. : |
| 2043 | case PCL_ENTER_PJLcxx . . $ PCL_ENTER_PJL. : { |
| 2044 | int c; |
| 2045 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 2046 | |
| 2047 | /* |
| 2048 | * This is a special command. Read up to the next ESC and output it. |
| 2049 | */ |
| 2050 | |
| 2051 | c = 0; |
| 2052 | while (1) { |
| 2053 | fill_buffercxx . . $ fill_buffer(49f6e7a06ebc5aa8).(); |
| 2054 | if (eofcxx . . $ eof. == 1) { |
| 2055 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\n"); |
| 2056 | break; |
| 2057 | } |
| 2058 | c = read_buffercxx . . $ read_buffer.[read_pointercxx . . $ read_pointer.++]; |
| 2059 | if (c == '\033') |
| 2060 | break; |
| 2061 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%c", c); |
| 2062 | } |
| 2063 | |
| 2064 | /* |
| 2065 | * Now we are sitting at the "ESC" that is the start of the next command. |
| 2066 | */ |
| 2067 | read_pointercxx . . $ read_pointer.--; |
| 2068 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "\n"); |
| 2069 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "End of %s\n", pcl_commandscxx . . $ pcl_commands.[command_index].descriptioncxx . . $ $anonymous_type_613f0d930bdf33ab_3#description.); |
| 2070 | } |
| 2071 | break; |
| 2072 | |
| 2073 | case PCL_PAGE_ORIENTATIONcxx . . $ PCL_PAGE_ORIENTATION. : |
| 2074 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 2075 | switch (numeric_argcxx . . $ numeric_arg.) { |
| 2076 | case 0 : |
| 2077 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Portrait"); |
| 2078 | break; |
| 2079 | case 1 : |
| 2080 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Landscape"); |
| 2081 | break; |
| 2082 | case 2 : |
| 2083 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Reverse Portrait"); |
| 2084 | break; |
| 2085 | case 3 : |
| 2086 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Reverse Landscape"); |
| 2087 | break; |
| 2088 | default : |
| 2089 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown (%d)", numeric_argcxx . . $ numeric_arg.); |
| 2090 | break; |
| 2091 | } |
| 2092 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, " (ignored)\n"); |
| 2093 | break; |
| 2094 | |
| 2095 | case PCL_MEDIA_SIDEcxx . . $ PCL_MEDIA_SIDE. : |
| 2096 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 2097 | switch (numeric_argcxx . . $ numeric_arg.) { |
| 2098 | case 0 : |
| 2099 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Next side"); |
| 2100 | break; |
| 2101 | case 1 : |
| 2102 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Front side"); |
| 2103 | break; |
| 2104 | case 2 : |
| 2105 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Back side"); |
| 2106 | break; |
| 2107 | default : |
| 2108 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown (%d)", numeric_argcxx . . $ numeric_arg.); |
| 2109 | break; |
| 2110 | } |
| 2111 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, " (ignored)\n"); |
| 2112 | break; |
| 2113 | |
| 2114 | case PCL_MEDIA_DESTcxx . . $ PCL_MEDIA_DEST. : |
| 2115 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 2116 | switch (numeric_argcxx . . $ numeric_arg.) { |
| 2117 | case 1 : |
| 2118 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Upper Output bin"); |
| 2119 | break; |
| 2120 | case 2 : |
| 2121 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Lower (Rear) Output bin"); |
| 2122 | break; |
| 2123 | default : |
| 2124 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown (%d)", numeric_argcxx . . $ numeric_arg.); |
| 2125 | break; |
| 2126 | } |
| 2127 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, " (ignored)\n"); |
| 2128 | break; |
| 2129 | |
| 2130 | case PCL_RASTER_RENDERcxx . . $ PCL_RASTER_RENDER. : |
| 2131 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 2132 | switch (numeric_argcxx . . $ numeric_arg.) { |
| 2133 | case 0 : |
| 2134 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Continuous tone detail (high lpi)"); |
| 2135 | break; |
| 2136 | case 3 : |
| 2137 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Device-best dither"); |
| 2138 | break; |
| 2139 | case 15 : |
| 2140 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Continuous tone smooth (high lpi)"); |
| 2141 | break; |
| 2142 | case 18 : |
| 2143 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Continuous tone basic (low lpi)"); |
| 2144 | break; |
| 2145 | default : |
| 2146 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Unknown (%d)", numeric_argcxx . . $ numeric_arg.); |
| 2147 | break; |
| 2148 | } |
| 2149 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, " (ignored)\n"); |
| 2150 | break; |
| 2151 | case PCL_COLOR_COMPONENT_1cxx . . $ PCL_COLOR_COMPONENT_1. : |
| 2152 | case PCL_COLOR_COMPONENT_2cxx . . $ PCL_COLOR_COMPONENT_2. : |
| 2153 | case PCL_COLOR_COMPONENT_3cxx . . $ PCL_COLOR_COMPONENT_3. : |
| 2154 | case PCL_ASSIGN_COLOR_INDEXcxx . . $ PCL_ASSIGN_COLOR_INDEX. : |
| 2155 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 2156 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, " (ignored)\n"); |
| 2157 | break; |
| 2158 | case PCL_SET_FOREGROUND_COLORcxx . . $ PCL_SET_FOREGROUND_COLOR. : |
| 2159 | print_commandcxx . . $ print_command(3e454b8ccf442868).(command_index, numeric_argcxx . . $ numeric_arg.); |
| 2160 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, " (ignored)\n"); |
| 2161 | break; |
| 2162 | |
| 2163 | default : |
| 2164 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "ERROR: No handler for %s!\n", pcl_commandscxx . . $ pcl_commands.[command_index].descriptioncxx . . $ $anonymous_type_613f0d930bdf33ab_3#description.); |
| 2165 | break; |
| 2166 | } |
| 2167 | } |
| 2168 | } |
| 2169 | } |