* Copyright 2007-2017 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
- * These coded instructions, statements, and computer programs are the
- * property of Apple Inc. and are protected by Federal copyright
- * law. Distribution and use rights are outlined in the file "LICENSE.txt"
- * which should have been included with this file. If this file is
- * missing or damaged, see the license at "http://www.cups.org/".
+ * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
*/
/*
};
- DEBUG_printf(("show_accepting(printers=\"%s\")\n", printers));
-
if (printers != NULL && !strcmp(printers, "all"))
printers = NULL;
if (response)
{
- DEBUG_puts("show_accepting: request succeeded...");
-
/*
* Loop through the printers returned in the list and display
* their devices...
};
- DEBUG_printf(("show_classes(dests=\"%s\")\n", dests));
-
if (dests != NULL && !strcmp(dests, "all"))
dests = NULL;
if (response)
{
- DEBUG_puts("show_classes: request succeeded...");
-
if (response->request.status.status_code > IPP_OK_CONFLICT)
{
_cupsLangPrintf(stderr, "lpstat: %s", cupsLastErrorString());
};
- DEBUG_printf(("show_devices(printers=\"%s\")\n", printers));
-
if (printers != NULL && !strcmp(printers, "all"))
printers = NULL;
if (response)
{
- DEBUG_puts("show_devices: request succeeded...");
-
/*
* Loop through the printers returned in the list and display
* their devices...
};
- DEBUG_printf(("show_jobs(dests=\"%s\", users=\"%s\", long_status=%d, "
- "ranking=%d, which=\"%s\")\n", dests, users, long_status,
- ranking, which));
-
if (dests != NULL && !strcmp(dests, "all"))
dests = NULL;
};
- DEBUG_printf(("show_printers(printers=\"%s\", num_dests=%d, dests=%p, "
- "long_status=%d)\n", printers, num_dests, dests, long_status));
-
if (printers != NULL && !strcmp(printers, "all"))
printers = NULL;
if (response)
{
- DEBUG_puts("show_printers: request succeeded...");
-
/*
* Loop through the printers returned in the list and display
* their status...
switch (pstate)
{
case IPP_PRINTER_IDLE :
- _cupsLangPrintf(stdout,
- _("printer %s is idle. enabled since %s"),
- printer, printer_state_time);
+ if (ippContainsString(reasons, "hold-new-jobs"))
+ _cupsLangPrintf(stdout, _("printer %s is holding new jobs. enabled since %s"), printer, printer_state_time);
+ else
+ _cupsLangPrintf(stdout, _("printer %s is idle. enabled since %s"), printer, printer_state_time);
break;
case IPP_PRINTER_PROCESSING :
- _cupsLangPrintf(stdout,
- _("printer %s now printing %s-%d. "
- "enabled since %s"),
- printer, printer, jobid, printer_state_time);
+ _cupsLangPrintf(stdout, _("printer %s now printing %s-%d. enabled since %s"), printer, printer, jobid, printer_state_time);
break;
case IPP_PRINTER_STOPPED :
- _cupsLangPrintf(stdout,
- _("printer %s disabled since %s -"),
- printer, printer_state_time);
+ _cupsLangPrintf(stdout, _("printer %s disabled since %s -"), printer, printer_state_time);
break;
}