diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2008-07-15 01:21:40 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2008-07-15 01:21:40 +0000 |
commit | 1f0275e3cc0bc5fbe11e3bffd54581aa05c9c764 (patch) | |
tree | fac6166e65e5ecf207f69d77e00529a7337d91ac /systemv/lpoptions.c | |
parent | 4509bb49335b3edfdb1b03d83d6cd05890968b59 (diff) |
Merge changes from CUPS 1.4svn-r7715.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@859 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'systemv/lpoptions.c')
-rw-r--r-- | systemv/lpoptions.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/systemv/lpoptions.c b/systemv/lpoptions.c index 0dc5d0b56..d2d42ce9c 100644 --- a/systemv/lpoptions.c +++ b/systemv/lpoptions.c @@ -3,7 +3,7 @@ * * Printer option program for the Common UNIX Printing System (CUPS). * - * Copyright 2007 by Apple Inc. + * Copyright 2007-2008 by Apple Inc. * Copyright 1997-2006 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -96,7 +96,9 @@ main(int argc, /* I - Number of command-line arguments */ if (num_dests == 0) num_dests = cupsGetDests(&dests); - if ((dest = cupsGetDest(printer, instance, num_dests, dests)) == NULL) + if (num_dests == 0 || !dests || + (dest = cupsGetDest(printer, instance, num_dests, + dests)) == NULL) { _cupsLangPuts(stderr, _("lpoptions: Unknown printer or class!\n")); @@ -463,8 +465,8 @@ list_group(ppd_file_t *ppd, /* I - PPD file */ while (cparam) { - _cupsLangPrintf(stdout, "%s%s=%s", choice->marked ? "*" : "", - cparam->name, types[cparam->type]); + _cupsLangPrintf(stdout, "%s%s=%s", prefix, cparam->name, + types[cparam->type]); cparam = (ppd_cparam_t *)cupsArrayNext(coption->params); prefix = " "; } |