]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - systemv/lpoptions.c
Merge changes from CUPS 1.4svn-r7961.
[thirdparty/cups.git] / systemv / lpoptions.c
index 132523be66c3036718564944e18a774123be7732..208ddcd9425368a718f282de6e4288bf6de3bf35 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: lpoptions.c 6649 2007-07-11 21:46:42Z mike $"
+ * "$Id: lpoptions.c 7720 2008-07-11 22:46:21Z mike $"
  *
  *   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 = " ";
            }
@@ -546,5 +548,5 @@ usage(void)
 
 
 /*
- * End of "$Id: lpoptions.c 6649 2007-07-11 21:46:42Z mike $".
+ * End of "$Id: lpoptions.c 7720 2008-07-11 22:46:21Z mike $".
  */