X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fcups.git;a=blobdiff_plain;f=cups%2Ftestppd.c;h=37032ff62e5e37d2469eaa6fb84e98ec6f3a5539;hp=bdaf944a4e6190e5926cda88763a10d7fd51f6b9;hb=d09495fadd23469999a64b1812ffb880bf4372de;hpb=8ca02f3c0539293422509d03219786fb6d7db48b diff --git a/cups/testppd.c b/cups/testppd.c index bdaf944a4..37032ff62 100644 --- a/cups/testppd.c +++ b/cups/testppd.c @@ -1,5 +1,5 @@ /* - * "$Id: testppd.c 5700 2006-06-26 19:20:39Z mike $" + * "$Id: testppd.c 5826 2006-08-15 19:04:11Z mike $" * * PPD test program for the Common UNIX Printing System (CUPS). * @@ -192,10 +192,18 @@ main(int argc, /* I - Number of command-line arguments */ else { int i, j, k; /* Looping vars */ + ppd_attr_t *attr; /* Current attribute */ ppd_group_t *group; /* Option group */ ppd_option_t *option; /* Option */ + char lang[255]; /* LANG environment variable */ + if (argc > 2) + { + snprintf(lang, sizeof(lang), "LANG=%s", argv[2]); + putenv(lang); + } + ppdLocalize(ppd); for (i = ppd->num_groups, group = ppd->groups; @@ -203,7 +211,7 @@ main(int argc, /* I - Number of command-line arguments */ i --, group ++) { printf("%s (%s):\n", group->name, group->text); - + for (j = group->num_options, option = group->options; j > 0; j --, option ++) @@ -215,6 +223,14 @@ main(int argc, /* I - Number of command-line arguments */ option->choices[k].text); } } + + puts("Attributes:"); + + for (attr = (ppd_attr_t *)cupsArrayFirst(ppd->sorted_attrs); + attr; + attr = (ppd_attr_t *)cupsArrayNext(ppd->sorted_attrs)) + printf(" *%s %s/%s: \"%s\"\n", attr->name, attr->spec, + attr->text, attr->value ? attr->value : ""); } } @@ -223,5 +239,5 @@ main(int argc, /* I - Number of command-line arguments */ /* - * End of "$Id: testppd.c 5700 2006-06-26 19:20:39Z mike $". + * End of "$Id: testppd.c 5826 2006-08-15 19:04:11Z mike $". */