/*
- * "$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
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"));
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 = " ";
}
/*
- * 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 $".
*/