summaryrefslogtreecommitdiff
path: root/berkeley
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2007-12-21 23:54:03 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2007-12-21 23:54:03 +0000
commita4924f6c45f9a65e7c380e63c8539e86c0795d60 (patch)
tree1266c67de1c98aaf44ed8a5223be729c4e1c798a /berkeley
parent0a6827453a0fe4a97ad37a6a1a7ffeb96a10e339 (diff)
Import CUPS 1.4svn-r7153.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@563 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'berkeley')
-rw-r--r--berkeley/lpr.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/berkeley/lpr.c b/berkeley/lpr.c
index 47e0d814c..de01906bc 100644
--- a/berkeley/lpr.c
+++ b/berkeley/lpr.c
@@ -68,9 +68,7 @@ main(int argc, /* I - Number of command-line arguments */
int num_copies; /* Number of copies per file */
int num_files; /* Number of files to print */
const char *files[1000]; /* Files to print */
- int num_dests; /* Number of destinations */
- cups_dest_t *dests, /* Destinations */
- *dest; /* Selected destination */
+ cups_dest_t *dest; /* Selected destination */
int num_options; /* Number of options */
cups_option_t *options; /* Options */
int deletefile; /* Delete file after print? */
@@ -88,8 +86,7 @@ main(int argc, /* I - Number of command-line arguments */
deletefile = 0;
printer = NULL;
- num_dests = 0;
- dests = NULL;
+ dest = NULL;
num_options = 0;
options = NULL;
num_files = 0;
@@ -258,10 +255,7 @@ main(int argc, /* I - Number of command-line arguments */
if ((instance = strrchr(printer, '/')) != NULL)
*instance++ = '\0';
- if (num_dests == 0)
- num_dests = cupsGetDests(&dests);
-
- if ((dest = cupsGetDest(printer, instance, num_dests, dests)) != NULL)
+ if ((dest = cupsGetNamedDest(NULL, printer, instance)) != NULL)
{
for (j = 0; j < dest->num_options; j ++)
if (cupsGetOption(dest->options[j].name, num_options,
@@ -355,10 +349,7 @@ main(int argc, /* I - Number of command-line arguments */
if (printer == NULL)
{
- if (num_dests == 0)
- num_dests = cupsGetDests(&dests);
-
- if ((dest = cupsGetDest(NULL, NULL, num_dests, dests)) != NULL)
+ if ((dest = cupsGetNamedDest(NULL, NULL, NULL)) != NULL)
{
printer = dest->name;
@@ -387,7 +378,7 @@ main(int argc, /* I - Number of command-line arguments */
else
val = "LPDEST";
- if (printer && !cupsGetDest(printer, NULL, num_dests, dests))
+ if (printer && !cupsGetNamedDest(NULL, printer, NULL))
_cupsLangPrintf(stderr,
_("%s: Error - %s environment variable names "
"non-existent destination \"%s\"!\n"),