| 3206 | |
| 3207 | |
| 3208 | char * |
| 3209 | _ppdCreateFromIPP2( |
| 3210 | char *buffer, /* I - Filename buffer */ |
| 3211 | size_t bufsize, /* I - Size of filename buffer */ |
| 3212 | ipp_t *supported, /* I - Get-Printer-Attributes response */ |
| 3213 | cups_lang_t *lang) /* I - Language */ |
| 3214 | { |
| 3215 | cups_file_t *fp; /* PPD file */ |
| 3216 | cups_array_t *sizes; /* Media sizes supported by printer */ |
| 3217 | cups_size_t *size; /* Current media size */ |
| 3218 | ipp_attribute_t *attr, /* xxx-supported */ |
| 3219 | *lang_supp, /* printer-strings-languages-supported */ |
| 3220 | *defattr, /* xxx-default */ |
| 3221 | *quality, /* print-quality-supported */ |
| 3222 | *x_dim, *y_dim; /* Media dimensions */ |
| 3223 | ipp_t *media_col, /* Media collection */ |
| 3224 | *media_size; /* Media size collection */ |
| 3225 | char make[256], /* Make and model */ |
| 3226 | *mptr, /* Pointer into make and model */ |
| 3227 | ppdname[PPD_MAX_NAME]; |
| 3228 | /* PPD keyword */ |
| 3229 | const char *model; /* Model name */ |
| 3230 | int i, j, /* Looping vars */ |
| 3231 | count, /* Number of values */ |
| 3232 | bottom, /* Largest bottom margin */ |
| 3233 | left, /* Largest left margin */ |
| 3234 | right, /* Largest right margin */ |
| 3235 | top, /* Largest top margin */ |
| 3236 | max_length = 0, /* Maximum custom size */ |
| 3237 | max_width = 0, |
| 3238 | min_length = INT_MAX, |
| 3239 | /* Minimum custom size */ |
| 3240 | min_width = INT_MAX, |
| 3241 | is_apple = 0, /* Does the printer support Apple raster? */ |
| 3242 | is_pdf = 0, /* Does the printer support PDF? */ |
| 3243 | is_pwg = 0; /* Does the printer support PWG Raster? */ |
| 3244 | pwg_media_t *pwg; /* PWG media size */ |
| 3245 | int xres, yres; /* Resolution values */ |
| 3246 | int resolutions[1000]; |
| 3247 | /* Array of resolution indices */ |
| 3248 | int have_qdraft = 0,/* Have draft quality? */ |
| 3249 | have_qhigh = 0; /* Have high quality? */ |
| 3250 | char msgid[256]; /* Message identifier (attr.value) */ |
| 3251 | const char *keyword; /* Keyword value */ |
| 3252 | cups_array_t *strings = NULL;/* Printer strings file */ |
| 3253 | struct lconv *loc = localeconv(); |
| 3254 | /* Locale data */ |
| 3255 | cups_array_t *fin_options = NULL; |
| 3256 | /* Finishing options */ |
| 3257 | |
| 3258 | |
| 3259 | /* |
| 3260 | * Range check input... |
| 3261 | */ |
| 3262 | |
| 3263 | if (buffer) |
| 3264 | *buffer = '\0'; |
| 3265 |
no test coverage detected