/*
- * "$Id: lpc.c 4906 2006-01-10 20:53:28Z mike $"
+ * "$Id: lpc.c 5023 2006-01-29 14:39:44Z mike $"
*
* "lpc" command for the Common UNIX Printing System (CUPS).
*
* Do the command prompt thing...
*/
- printf("lpc> ");
+ _cupsLangPuts(stdout, _("lpc> "));
while (fgets(line, sizeof(line), stdin) != NULL)
{
/*
* Nothing left, just show a prompt...
*/
- printf("lpc> ");
+ _cupsLangPuts(stdout, _("lpc> "));
continue;
}
* Put another prompt out to the user...
*/
- printf("lpc> ");
+ _cupsLangPuts(stdout, _("lpc> "));
}
}
else if (!compare_strings(command, "help", 1) || !strcmp(command, "?"))
show_help(params);
else
- _cupsLangPrintf(stdout, cupsLangDefault(),
+ _cupsLangPrintf(stdout,
_("%s is not implemented by the CUPS version of lpc.\n"),
command);
}
{
if (!command)
{
- _cupsLangPrintf(stdout, cupsLangDefault(),
+ _cupsLangPrintf(stdout,
_("Commands may be abbreviated. Commands are:\n"
"\n"
"exit help quit status ?\n"));
}
else if (!compare_strings(command, "help", 1) || !strcmp(command, "?"))
- _cupsLangPrintf(stdout, cupsLangDefault(),
- _("help\t\tget help on commands\n"));
+ _cupsLangPrintf(stdout, _("help\t\tget help on commands\n"));
else if (!compare_strings(command, "status", 4))
- _cupsLangPrintf(stdout, cupsLangDefault(),
- _("status\t\tshow status of daemon and queue\n"));
+ _cupsLangPrintf(stdout, _("status\t\tshow status of daemon and queue\n"));
else
- _cupsLangPrintf(stdout, cupsLangDefault(),
- _("?Invalid help command unknown\n"));
+ _cupsLangPrintf(stdout, _("?Invalid help command unknown\n"));
}
"attributes-natural-language", NULL,
language->language);
- httpAssembleURIf(printer_uri, sizeof(printer_uri), "ipp", NULL,
- "localhost", 631, "/printers/%s", printer);
+ httpAssembleURIf(HTTP_URI_CODING_ALL, printer_uri, sizeof(printer_uri),
+ "ipp", NULL, "localhost", 631, "/printers/%s",
+ printer);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, printer_uri);
printf("%s:\n", printer);
if (!strncmp(device, "file:", 5))
- _cupsLangPrintf(stdout, language,
+ _cupsLangPrintf(stdout,
_("\tprinter is on device \'%s\' speed -1\n"),
device + 5);
else
if ((delimiter = strchr(device, ':')) != NULL )
{
*delimiter = '\0';
- _cupsLangPrintf(stdout, language,
+ _cupsLangPrintf(stdout,
_("\tprinter is on device \'%s\' speed -1\n"),
device);
}
}
if (accepting)
- _cupsLangPuts(stdout, language, _("\tqueuing is enabled\n"));
+ _cupsLangPuts(stdout, _("\tqueuing is enabled\n"));
else
- _cupsLangPuts(stdout, language, _("\tqueuing is disabled\n"));
+ _cupsLangPuts(stdout, _("\tqueuing is disabled\n"));
if (pstate != IPP_PRINTER_STOPPED)
- _cupsLangPuts(stdout, language, _("\tprinting is enabled\n"));
+ _cupsLangPuts(stdout, _("\tprinting is enabled\n"));
else
- _cupsLangPuts(stdout, language, _("\tprinting is disabled\n"));
+ _cupsLangPuts(stdout, _("\tprinting is disabled\n"));
if (jobcount == 0)
- _cupsLangPuts(stdout, language, _("\tno entries\n"));
+ _cupsLangPuts(stdout, _("\tno entries\n"));
else
- _cupsLangPrintf(stdout, language, _("\t%d entries\n"), jobcount);
+ _cupsLangPrintf(stdout, _("\t%d entries\n"), jobcount);
- _cupsLangPuts(stdout, language, _("\tdaemon present\n"));
+ _cupsLangPuts(stdout, _("\tdaemon present\n"));
}
if (attr == NULL)
/*
- * End of "$Id: lpc.c 4906 2006-01-10 20:53:28Z mike $".
+ * End of "$Id: lpc.c 5023 2006-01-29 14:39:44Z mike $".
*/