• Home
  • Raw
  • Download

Lines Matching refs:ppd

91 static int	check_constraints(ppd_file_t *ppd, int errors, int verbose,
93 static int check_case(ppd_file_t *ppd, int errors, int verbose);
94 static int check_defaults(ppd_file_t *ppd, int errors, int verbose,
96 static int check_duplex(ppd_file_t *ppd, int errors, int verbose,
98 static int check_filters(ppd_file_t *ppd, const char *root, int errors,
100 static int check_profiles(ppd_file_t *ppd, const char *root, int errors,
102 static int check_sizes(ppd_file_t *ppd, int errors, int verbose, int warn);
103 static int check_translations(ppd_file_t *ppd, int errors, int verbose,
105 static void show_conflicts(ppd_file_t *ppd, const char *prefix);
106 static int test_raster(ppd_file_t *ppd, int verbose);
138 ppd_file_t *ppd; /* PPD file record */ in main() local
162 ppd = NULL; in main()
284 ppd = _ppdOpen(cupsFileStdin(), _PPD_LOCALIZATION_ALL); in main()
287 printf("%s:", (ppd && ppd->pcfilename) ? ppd->pcfilename : "(stdin)"); in main()
300 ppd = _ppdOpen(fp, _PPD_LOCALIZATION_ALL); in main()
318 if (ppd == NULL) in main()
433 if ((attr = ppdFindAttr(ppd, "FormatVersion", NULL)) != NULL && in main()
437 if ((attr = ppdFindAttr(ppd, "cupsFilter2", NULL)) != NULL) in main()
443 if (!test_raster(ppd, verbose)) in main()
448 while ((attr = ppdFindNextAttr(ppd, "cupsFilter2", NULL)) != NULL); in main()
452 for (j = 0; j < ppd->num_filters; j ++) in main()
453 if (strstr(ppd->filters[j], "application/vnd.cups-raster")) in main()
455 if (!test_raster(ppd, verbose)) in main()
466 errors = check_defaults(ppd, errors, verbose, 0); in main()
468 if ((attr = ppdFindAttr(ppd, "DefaultImageableArea", NULL)) == NULL) in main()
482 else if (ppdPageSize(ppd, attr->value) == NULL && in main()
504 if ((attr = ppdFindAttr(ppd, "DefaultPaperDimension", NULL)) == NULL) in main()
518 else if (ppdPageSize(ppd, attr->value) == NULL && in main()
537 for (j = 0, group = ppd->groups; j < ppd->num_groups; j ++, group ++) in main()
586 if ((attr = ppdFindAttr(ppd, "FileVersion", NULL)) != NULL) in main()
625 if ((attr = ppdFindAttr(ppd, "FormatVersion", NULL)) != NULL) in main()
669 if (ppd->lang_encoding != NULL) in main()
689 if (ppd->lang_version != NULL) in main()
709 if (ppd->manufacturer != NULL) in main()
711 if (!_cups_strncasecmp(ppd->manufacturer, "Hewlett-Packard", 15) || in main()
712 !_cups_strncasecmp(ppd->manufacturer, "Hewlett Packard", 15)) in main()
728 else if (!_cups_strncasecmp(ppd->manufacturer, "OkiData", 7) || in main()
729 !_cups_strncasecmp(ppd->manufacturer, "Oki Data", 8)) in main()
763 if (ppd->modelname != NULL) in main()
765 for (ptr = ppd->modelname; *ptr; ptr ++) in main()
803 if (ppd->nickname != NULL) in main()
823 if (ppdFindOption(ppd, "PageSize") != NULL) in main()
843 if (ppdFindOption(ppd, "PageRegion") != NULL) in main()
863 if (ppd->pcfilename != NULL) in main()
883 if (ppd->product != NULL) in main()
885 if (ppd->product[0] != '(' || in main()
886 ppd->product[strlen(ppd->product) - 1] != ')') in main()
918 if ((attr = ppdFindAttr(ppd, "PSVersion", NULL)) != NULL && in main()
958 if (ppd->shortnickname != NULL) in main()
960 if (strlen(ppd->shortnickname) > 31) in main()
993 if (ppd->patches != NULL && strchr(ppd->patches, '\"') && in main()
994 strstr(ppd->patches, "*End")) in main()
1014 if (ppd->num_sizes == 0) in main()
1031 for (j = 0, size = ppd->sizes; j < ppd->num_sizes; j ++, size ++) in main()
1091 if ((option = ppdFindOption(ppd, "Resolution")) == NULL) in main()
1092 if ((option = ppdFindOption(ppd, "JCLResolution")) == NULL) in main()
1093 option = ppdFindOption(ppd, "SetResolution"); in main()
1136 if ((attr = ppdFindAttr(ppd, "1284DeviceID", NULL)) && in main()
1153 errors = check_case(ppd, errors, verbose); in main()
1156 errors = check_constraints(ppd, errors, verbose, 0); in main()
1159 errors = check_filters(ppd, root, errors, verbose, 0); in main()
1162 errors = check_profiles(ppd, root, errors, verbose, 0); in main()
1165 errors = check_sizes(ppd, errors, verbose, 0); in main()
1168 errors = check_translations(ppd, errors, verbose, 0); in main()
1171 errors = check_duplex(ppd, errors, verbose, 0); in main()
1173 if ((attr = ppdFindAttr(ppd, "cupsLanguages", NULL)) != NULL && in main()
1181 if ((attr = ppdFindAttr(ppd, "LanguageEncoding", NULL)) != NULL) in main()
1197 if (!ppd->lang_version || strcmp(ppd->lang_version, "English")) in main()
1206 ppd->lang_version ? ppd->lang_version : "(null)"); in main()
1215 for (option = ppdFirstOption(ppd); in main()
1217 option = ppdNextOption(ppd)) in main()
1290 errors = check_defaults(ppd, errors, verbose, 1); in main()
1293 errors = check_constraints(ppd, errors, verbose, 1); in main()
1296 errors = check_filters(ppd, root, errors, verbose, 1); in main()
1299 errors = check_profiles(ppd, root, errors, verbose, 1); in main()
1302 errors = check_sizes(ppd, errors, verbose, 1); in main()
1304 errors = check_sizes(ppd, errors, verbose, 2); in main()
1307 errors = check_translations(ppd, errors, verbose, 1); in main()
1310 errors = check_duplex(ppd, errors, verbose, 1); in main()
1316 if ((option = ppdFindOption(ppd, "JCLDuplex")) == NULL) in main()
1317 if ((option = ppdFindOption(ppd, "EFDuplex")) == NULL) in main()
1318 option = ppdFindOption(ppd, "KD03Duplex"); in main()
1331 for (j = 0; j < ppd->num_attrs; j ++) in main()
1333 attr = ppd->attrs[j]; in main()
1349 !ppdFindOption(ppd, attr->name + 7)) in main()
1364 if (!ppd->lang_encoding && ppdversion < 41) in main()
1372 if (!ppd->manufacturer && ppdversion < 43) in main()
1385 if (!(ignore & WARN_FILENAME) && ppd->pcfilename) in main()
1387 if (strlen(ppd->pcfilename) > 12) in main()
1396 if (!_cups_strcasecmp(ppd->pcfilename, "unused.ppd")) in main()
1404 if (!ppd->shortnickname && ppdversion < 43) in main()
1417 if (ppd->protocols) in main()
1419 if (strstr(ppd->protocols, "PJL") && in main()
1420 strstr(ppd->protocols, "BCP") && in main()
1421 !strstr(ppd->protocols, "TBCP")) in main()
1429 if (strstr(ppd->protocols, "PJL") && in main()
1430 (!ppd->jcl_begin || !ppd->jcl_end || !ppd->jcl_ps)) in main()
1445 for (j = 0, group = ppd->groups; j < ppd->num_groups; j ++, group ++) in main()
1452 for (m = 0, group2 = ppd->groups; in main()
1453 m < ppd->num_groups; in main()
1492 ppd->language_level, in main()
1493 ppd->color_device ? "TRUE" : "FALSE", in main()
1494 ppd->variable_sizes ? "TRUE" : "FALSE", in main()
1495 ppd->landscape); in main()
1497 switch (ppd->colorspace) in main()
1517 ppd->num_emulations); in main()
1518 for (j = 0; j < ppd->num_emulations; j ++) in main()
1520 j, ppd->emulations[j].name); in main()
1523 ppd->lang_encoding); in main()
1525 ppd->lang_version); in main()
1526 _cupsLangPrintf(stdout, " modelname = %s", ppd->modelname); in main()
1528 ppd->ttrasterizer == NULL ? "None" : ppd->ttrasterizer); in main()
1530 ppd->manufacturer); in main()
1531 _cupsLangPrintf(stdout, " product = %s", ppd->product); in main()
1532 _cupsLangPrintf(stdout, " nickname = %s", ppd->nickname); in main()
1534 ppd->shortnickname); in main()
1536 ppd->patches == NULL ? 0 : (int)strlen(ppd->patches)); in main()
1538 _cupsLangPrintf(stdout, " num_groups = %d", ppd->num_groups); in main()
1539 for (j = 0, group = ppd->groups; j < ppd->num_groups; j ++, group ++) in main()
1560 size = ppdPageSize(ppd, choice->choice); in main()
1596 ppd->num_consts); in main()
1597 for (j = 0; j < ppd->num_consts; j ++) in main()
1600 j, ppd->consts[j].option1, ppd->consts[j].choice1, in main()
1601 ppd->consts[j].option2, ppd->consts[j].choice2); in main()
1604 ppd->num_profiles); in main()
1605 for (j = 0; j < ppd->num_profiles; j ++) in main()
1609 j, ppd->profiles[j].resolution, in main()
1610 ppd->profiles[j].media_type, in main()
1611 ppd->profiles[j].gamma, ppd->profiles[j].density, in main()
1612 ppd->profiles[j].matrix[0][0], in main()
1613 ppd->profiles[j].matrix[0][1], in main()
1614 ppd->profiles[j].matrix[0][2], in main()
1615 ppd->profiles[j].matrix[1][0], in main()
1616 ppd->profiles[j].matrix[1][1], in main()
1617 ppd->profiles[j].matrix[1][2], in main()
1618 ppd->profiles[j].matrix[2][0], in main()
1619 ppd->profiles[j].matrix[2][1], in main()
1620 ppd->profiles[j].matrix[2][2]); in main()
1622 _cupsLangPrintf(stdout, " num_fonts = %d", ppd->num_fonts); in main()
1623 for (j = 0; j < ppd->num_fonts; j ++) in main()
1625 j, ppd->fonts[j]); in main()
1627 _cupsLangPrintf(stdout, " num_attrs = %d", ppd->num_attrs); in main()
1628 for (j = 0; j < ppd->num_attrs; j ++) in main()
1631 ppd->attrs[j]->name, ppd->attrs[j]->spec, in main()
1632 ppd->attrs[j]->text[0] ? "/" : "", in main()
1633 ppd->attrs[j]->text, in main()
1634 ppd->attrs[j]->value ? in main()
1635 ppd->attrs[j]->value : "(null)"); in main()
1638 ppdClose(ppd); in main()
1738 check_constraints(ppd_file_t *ppd, /* I - PPD file */ in check_constraints() argument
1765 if ((constattr = ppdFindAttr(ppd, "cupsUIConstraints", NULL)) != NULL) in check_constraints()
1772 constattr = ppdFindNextAttr(ppd, "cupsUIConstraints", NULL)) in check_constraints()
1808 cupsArraySave(ppd->sorted_attrs); in check_constraints()
1811 !ppdFindAttr(ppd, "cupsUIResolver", constattr->spec)) in check_constraints()
1824 cupsArrayRestore(ppd->sorted_attrs); in check_constraints()
1863 if ((o = ppdFindOption(ppd, option)) == NULL) in check_constraints()
1934 if (!cupsResolveConflicts(ppd, NULL, NULL, &num_options, &options)) in check_constraints()
1956 for (i = ppd->num_consts, c = ppd->consts; i > 0; i --, c ++) in check_constraints()
1970 if ((o = ppdFindOption(ppd, option)) == NULL) in check_constraints()
2011 if ((o = ppdFindOption(ppd, option)) == NULL) in check_constraints()
2052 check_case(ppd_file_t *ppd, /* I - PPD file */ in check_case() argument
2069 for (i = ppd->num_groups, groupa = ppd->groups; i > 1; i --, groupa ++) in check_case()
2089 for (optiona = ppdFirstOption(ppd); optiona; optiona = ppdNextOption(ppd)) in check_case()
2091 cupsArraySave(ppd->options); in check_case()
2092 for (optionb = ppdNextOption(ppd); optionb; optionb = ppdNextOption(ppd)) in check_case()
2106 cupsArrayRestore(ppd->options); in check_case()
2161 check_defaults(ppd_file_t *ppd, /* I - PPD file */ in check_defaults() argument
2174 ppdMarkDefaults(ppd); in check_defaults()
2175 if (ppdConflicts(ppd)) in check_defaults()
2184 show_conflicts(ppd, prefix); in check_defaults()
2190 for (j = 0; j < ppd->num_attrs; j ++) in check_defaults()
2192 attr = ppd->attrs[j]; in check_defaults()
2207 if ((option = ppdFindOption(ppd, attr->name + 7)) != NULL && in check_defaults()
2244 check_duplex(ppd_file_t *ppd, /* I - PPD file */ in check_duplex() argument
2261 if ((option = ppdFindOption(ppd, "Duplex")) != NULL) in check_duplex()
2314 check_filters(ppd_file_t *ppd, /* I - PPD file */ in check_filters() argument
2339 for (attr = ppdFindAttr(ppd, "cupsFilter", NULL); in check_filters()
2341 attr = ppdFindNextAttr(ppd, "cupsFilter", NULL)) in check_filters()
2457 for (attr = ppdFindAttr(ppd, "cupsFilter2", NULL); in check_filters()
2459 attr = ppdFindNextAttr(ppd, "cupsFilter2", NULL)) in check_filters()
2585 for (attr = ppdFindAttr(ppd, "cupsPreFilter", NULL); in check_filters()
2587 attr = ppdFindNextAttr(ppd, "cupsPreFilter", NULL)) in check_filters()
2672 for (attr = ppdFindAttr(ppd, "APDialogExtension", NULL); in check_filters()
2674 attr = ppdFindNextAttr(ppd, "APDialogExtension", NULL)) in check_filters()
2729 if ((attr = ppdFindAttr(ppd, "APPrinterIconPath", NULL)) != NULL) in check_filters()
2784 if ((attr = ppdFindAttr(ppd, "APPrinterLowInkTool", NULL)) != NULL) in check_filters()
2839 if ((attr = ppdFindAttr(ppd, "APPrinterUtilityPath", NULL)) != NULL) in check_filters()
2894 if ((attr = ppdFindAttr(ppd, "APScanAppPath", NULL)) != NULL) in check_filters()
2942 if (ppdFindAttr(ppd, "APScanAppBundleID", NULL)) in check_filters()
2967 check_profiles(ppd_file_t *ppd, /* I - PPD file */ in check_profiles() argument
2987 for (attr = ppdFindAttr(ppd, "cupsICCProfile", NULL); in check_profiles()
2989 attr = ppdFindNextAttr(ppd, "cupsICCProfile", NULL)) in check_profiles()
3112 check_sizes(ppd_file_t *ppd, /* I - PPD file */ in check_sizes() argument
3140 if ((page_size = ppdFindOption(ppd, "PageSize")) == NULL && warn != 2) in check_sizes()
3155 if ((page_region = ppdFindOption(ppd, "PageRegion")) == NULL && warn != 2) in check_sizes()
3170 for (i = ppd->num_sizes, size = ppd->sizes; i > 0; i --, size ++) in check_sizes()
3266 if (pwg_media && pwg_media->ppd && in check_sizes()
3267 (pwg_media->ppd[0] < 'a' || pwg_media->ppd[0] > 'z')) in check_sizes()
3269 size_t ppdlen = strlen(pwg_media->ppd); in check_sizes()
3272 strlcpy(buf, pwg_media->ppd, sizeof(buf)); in check_sizes()
3276 if (!strcmp(pwg_media->ppd, "DoublePostcardRotated")) in check_sizes()
3279 snprintf(buf, sizeof(buf), "%s.Transverse", pwg_media->ppd); in check_sizes()
3281 snprintf(buf, sizeof(buf), "%sRotated", pwg_media->ppd); in check_sizes()
3303 else if (!strncmp(size->name, pwg_media->ppd, ppdlen)) in check_sizes()
3331 if (strncmp(pwg_media->ppd, "Env", 3) && in check_sizes()
3333 snprintf(buf, sizeof(buf), "Env%s", pwg_media->ppd); in check_sizes()
3409 check_translations(ppd_file_t *ppd, /* I - PPD file */ in check_translations() argument
3434 if ((languages = _ppdGetLanguages(ppd)) != NULL) in check_translations()
3470 for (option = ppdFirstOption(ppd); in check_translations()
3472 option = ppdNextOption(ppd)) in check_translations()
3480 if ((attr = ppdFindAttr(ppd, keyword, option->keyword)) == NULL && in check_translations()
3481 (attr = ppdFindAttr(ppd, llkeyword, option->keyword)) == NULL) in check_translations()
3534 (coption = ppdFindCustomOption(ppd, in check_translations()
3540 if ((attr = ppdFindAttr(ppd, ckeyword, "True")) != NULL && in check_translations()
3570 if ((attr = ppdFindAttr(ppd, ckeyword, in check_translations()
3572 (attr = ppdFindAttr(ppd, cllkeyword, in check_translations()
3610 else if ((attr = ppdFindAttr(ppd, keyword, in check_translations()
3612 (attr = ppdFindAttr(ppd, llkeyword, in check_translations()
3700 show_conflicts(ppd_file_t *ppd, /* I - PPD to check */ in show_conflicts() argument
3714 for (i = ppd->num_consts, c = ppd->consts; i > 0; i --, c ++) in show_conflicts()
3720 o1 = ppdFindOption(ppd, c->option1); in show_conflicts()
3753 o2 = ppdFindOption(ppd, c->option2); in show_conflicts()
3801 test_raster(ppd_file_t *ppd, /* I - PPD file */ in test_raster() argument
3807 ppdMarkDefaults(ppd); in test_raster()
3808 if (cupsRasterInterpretPPD(&header, ppd, 0, NULL, 0)) in test_raster()
3825 if (!ppdPageSize(ppd, "Custom.612x792")) in test_raster()
3828 ppdMarkOption(ppd, "PageSize", "Custom.612x792"); in test_raster()
3830 if (cupsRasterInterpretPPD(&header, ppd, 0, NULL, 0)) in test_raster()