summaryrefslogtreecommitdiff
path: root/berkeley
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2012-10-25 20:57:13 +0200
committerDidier Raboud <odyx@debian.org>2012-10-25 20:57:13 +0200
commit49a2853988b074d087e82c51aec4f9fc052a057d (patch)
treec38ece96005bc33bd4e133fd0037f3428fdc039d /berkeley
parenta312f7e1ac68fb22275719f6208b670d9edd45b5 (diff)
downloadcups-49a2853988b074d087e82c51aec4f9fc052a057d.tar.gz
Imported Upstream version 1.5.0upstream/1.5.0
Diffstat (limited to 'berkeley')
-rw-r--r--berkeley/Dependencies46
-rw-r--r--berkeley/Makefile8
-rw-r--r--berkeley/lpc.c49
-rw-r--r--berkeley/lpq.c74
-rw-r--r--berkeley/lpr.c74
-rw-r--r--berkeley/lprm.c36
6 files changed, 134 insertions, 153 deletions
diff --git a/berkeley/Dependencies b/berkeley/Dependencies
index 460f6e0b..de9ba979 100644
--- a/berkeley/Dependencies
+++ b/berkeley/Dependencies
@@ -1,16 +1,34 @@
# DO NOT DELETE THIS LINE -- make depend depends on it.
-lpc.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/versioning.h
-lpc.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-lpc.o: ../cups/i18n.h ../cups/transcode.h ../cups/debug.h ../cups/string.h
-lpc.o: ../config.h
-lpq.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
-lpq.o: ../cups/http.h ../cups/versioning.h ../cups/ppd.h ../cups/array.h
-lpq.o: ../cups/file.h ../cups/language.h ../cups/i18n.h ../cups/transcode.h
-lpq.o: ../cups/debug.h
-lpr.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
-lpr.o: ../cups/http.h ../cups/versioning.h ../cups/ppd.h ../cups/array.h
-lpr.o: ../cups/file.h ../cups/language.h ../cups/i18n.h ../cups/transcode.h
-lprm.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/versioning.h
-lprm.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-lprm.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
+lpc.o: ../cups/cups-private.h ../cups/cups.h ../cups/file.h
+lpc.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h
+lpc.o: ../cups/language.h ../cups/string-private.h ../config.h
+lpc.o: ../cups/debug-private.h ../cups/ppd-private.h ../cups/ppd.h
+lpc.o: ../cups/cups.h ../cups/pwg-private.h ../cups/http-private.h
+lpc.o: ../cups/http.h ../cups/md5-private.h ../cups/ipp-private.h
+lpc.o: ../cups/ipp.h ../cups/language-private.h ../cups/transcode.h
+lpc.o: ../cups/thread-private.h
+lpq.o: ../cups/cups-private.h ../cups/cups.h ../cups/file.h
+lpq.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h
+lpq.o: ../cups/language.h ../cups/string-private.h ../config.h
+lpq.o: ../cups/debug-private.h ../cups/ppd-private.h ../cups/ppd.h
+lpq.o: ../cups/cups.h ../cups/pwg-private.h ../cups/http-private.h
+lpq.o: ../cups/http.h ../cups/md5-private.h ../cups/ipp-private.h
+lpq.o: ../cups/ipp.h ../cups/language-private.h ../cups/transcode.h
+lpq.o: ../cups/thread-private.h
+lpr.o: ../cups/cups-private.h ../cups/cups.h ../cups/file.h
+lpr.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h
+lpr.o: ../cups/language.h ../cups/string-private.h ../config.h
+lpr.o: ../cups/debug-private.h ../cups/ppd-private.h ../cups/ppd.h
+lpr.o: ../cups/cups.h ../cups/pwg-private.h ../cups/http-private.h
+lpr.o: ../cups/http.h ../cups/md5-private.h ../cups/ipp-private.h
+lpr.o: ../cups/ipp.h ../cups/language-private.h ../cups/transcode.h
+lpr.o: ../cups/thread-private.h
+lprm.o: ../cups/cups-private.h ../cups/cups.h ../cups/file.h
+lprm.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h
+lprm.o: ../cups/language.h ../cups/string-private.h ../config.h
+lprm.o: ../cups/debug-private.h ../cups/ppd-private.h ../cups/ppd.h
+lprm.o: ../cups/cups.h ../cups/pwg-private.h ../cups/http-private.h
+lprm.o: ../cups/http.h ../cups/md5-private.h ../cups/ipp-private.h
+lprm.o: ../cups/ipp.h ../cups/language-private.h ../cups/transcode.h
+lprm.o: ../cups/thread-private.h
diff --git a/berkeley/Makefile b/berkeley/Makefile
index 2b80d460..64aa82d5 100644
--- a/berkeley/Makefile
+++ b/berkeley/Makefile
@@ -1,9 +1,9 @@
#
-# "$Id: Makefile 8500 2009-04-13 22:53:03Z mike $"
+# "$Id: Makefile 9771 2011-05-12 05:21:56Z mike $"
#
-# Berkeley commands makefile for the Common UNIX Printing System (CUPS).
+# Berkeley commands makefile for CUPS.
#
-# Copyright 2007-2009 by Apple Inc.
+# Copyright 2007-2011 by Apple Inc.
# Copyright 1997-2006 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
@@ -163,5 +163,5 @@ include Dependencies
#
-# End of "$Id: Makefile 8500 2009-04-13 22:53:03Z mike $".
+# End of "$Id: Makefile 9771 2011-05-12 05:21:56Z mike $".
#
diff --git a/berkeley/lpc.c b/berkeley/lpc.c
index a18eb0e7..2e4491a2 100644
--- a/berkeley/lpc.c
+++ b/berkeley/lpc.c
@@ -1,9 +1,9 @@
/*
- * "$Id: lpc.c 7079 2007-11-30 01:58:31Z mike $"
+ * "$Id: lpc.c 9384 2010-11-22 07:06:39Z mike $"
*
- * "lpc" command for the Common UNIX Printing System (CUPS).
+ * "lpc" command for CUPS.
*
- * Copyright 2007 by Apple Inc.
+ * Copyright 2007-2010 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -25,12 +25,7 @@
* Include necessary headers...
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <cups/cups.h>
-#include <cups/i18n.h>
-#include <cups/debug.h>
-#include <cups/string.h>
+#include <cups/cups-private.h>
/*
@@ -78,7 +73,7 @@ main(int argc, /* I - Number of command-line arguments */
* Do the command prompt thing...
*/
- _cupsLangPuts(stdout, _("lpc> "));
+ _cupsLangPuts(stdout, _("lpc> ")); /* TODO: Need no-newline version */
while (fgets(line, sizeof(line), stdin) != NULL)
{
/*
@@ -106,7 +101,7 @@ main(int argc, /* I - Number of command-line arguments */
* Nothing left, just show a prompt...
*/
- _cupsLangPuts(stdout, _("lpc> "));
+ _cupsLangPuts(stdout, _("lpc> ")); /* TODO: Need no newline version */
continue;
}
@@ -142,7 +137,7 @@ main(int argc, /* I - Number of command-line arguments */
* Put another prompt out to the user...
*/
- _cupsLangPuts(stdout, _("lpc> "));
+ _cupsLangPuts(stdout, _("lpc> ")); /* TODO: Need no newline version */
}
}
@@ -191,7 +186,7 @@ do_command(http_t *http, /* I - HTTP connection to server */
show_help(params);
else
_cupsLangPrintf(stdout,
- _("%s is not implemented by the CUPS version of lpc.\n"),
+ _("%s is not implemented by the CUPS version of lpc."),
command);
}
@@ -208,14 +203,14 @@ show_help(const char *command) /* I - Command to describe or NULL */
_cupsLangPrintf(stdout,
_("Commands may be abbreviated. Commands are:\n"
"\n"
- "exit help quit status ?\n"));
+ "exit help quit status ?"));
}
else if (!compare_strings(command, "help", 1) || !strcmp(command, "?"))
- _cupsLangPrintf(stdout, _("help\t\tget help on commands\n"));
+ _cupsLangPrintf(stdout, _("help\t\tGet help on commands."));
else if (!compare_strings(command, "status", 4))
- _cupsLangPrintf(stdout, _("status\t\tshow status of daemon and queue\n"));
+ _cupsLangPrintf(stdout, _("status\t\tShow status of daemon and queue."));
else
- _cupsLangPrintf(stdout, _("?Invalid help command unknown\n"));
+ _cupsLangPrintf(stdout, _("?Invalid help command unknown."));
}
@@ -405,7 +400,7 @@ show_status(http_t *http, /* I - HTTP connection to server */
printf("%s:\n", printer);
if (!strncmp(device, "file:", 5))
_cupsLangPrintf(stdout,
- _("\tprinter is on device \'%s\' speed -1\n"),
+ _("\tprinter is on device \'%s\' speed -1"),
device + 5);
else
{
@@ -417,27 +412,27 @@ show_status(http_t *http, /* I - HTTP connection to server */
{
*delimiter = '\0';
_cupsLangPrintf(stdout,
- _("\tprinter is on device \'%s\' speed -1\n"),
+ _("\tprinter is on device \'%s\' speed -1"),
device);
}
}
if (accepting)
- _cupsLangPuts(stdout, _("\tqueuing is enabled\n"));
+ _cupsLangPuts(stdout, _("\tqueuing is enabled"));
else
- _cupsLangPuts(stdout, _("\tqueuing is disabled\n"));
+ _cupsLangPuts(stdout, _("\tqueuing is disabled"));
if (pstate != IPP_PRINTER_STOPPED)
- _cupsLangPuts(stdout, _("\tprinting is enabled\n"));
+ _cupsLangPuts(stdout, _("\tprinting is enabled"));
else
- _cupsLangPuts(stdout, _("\tprinting is disabled\n"));
+ _cupsLangPuts(stdout, _("\tprinting is disabled"));
if (jobcount == 0)
- _cupsLangPuts(stdout, _("\tno entries\n"));
+ _cupsLangPuts(stdout, _("\tno entries"));
else
- _cupsLangPrintf(stdout, _("\t%d entries\n"), jobcount);
+ _cupsLangPrintf(stdout, _("\t%d entries"), jobcount);
- _cupsLangPuts(stdout, _("\tdaemon present\n"));
+ _cupsLangPuts(stdout, _("\tdaemon present"));
}
if (attr == NULL)
@@ -450,5 +445,5 @@ show_status(http_t *http, /* I - HTTP connection to server */
/*
- * End of "$Id: lpc.c 7079 2007-11-30 01:58:31Z mike $".
+ * End of "$Id: lpc.c 9384 2010-11-22 07:06:39Z mike $".
*/
diff --git a/berkeley/lpq.c b/berkeley/lpq.c
index 5d880b7a..1c673954 100644
--- a/berkeley/lpq.c
+++ b/berkeley/lpq.c
@@ -1,9 +1,9 @@
/*
- * "$Id: lpq.c 8929 2009-12-15 22:40:37Z mike $"
+ * "$Id: lpq.c 9744 2011-05-05 23:42:30Z mike $"
*
- * "lpq" command for the Common UNIX Printing System (CUPS).
+ * "lpq" command for CUPS.
*
- * Copyright 2007-2009 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -28,12 +28,7 @@
* Include necessary headers...
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <cups/string.h>
-#include <cups/cups.h>
-#include <cups/i18n.h>
-#include <cups/debug.h>
+#include <cups/cups-private.h>
/*
@@ -99,8 +94,7 @@ main(int argc, /* I - Number of command-line arguments */
if (http)
httpEncryption(http, HTTP_ENCRYPT_REQUIRED);
#else
- _cupsLangPrintf(stderr,
- _("%s: Sorry, no encryption support compiled in!\n"),
+ _cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."),
argv[0]);
#endif /* HAVE_SSL */
break;
@@ -115,15 +109,14 @@ main(int argc, /* I - Number of command-line arguments */
{
_cupsLangPrintf(stderr,
_("%s: Error - expected username after "
- "\'-U\' option!\n"),
- argv[0]);
+ "\"-U\" option."), argv[0]);
return (1);
}
cupsSetUser(argv[i]);
}
break;
-
+
case 'P' : /* Printer */
if (argv[i][2])
dest = argv[i] + 2;
@@ -135,7 +128,7 @@ main(int argc, /* I - Number of command-line arguments */
{
httpClose(http);
cupsFreeDests(num_dests, dests);
-
+
usage();
}
@@ -154,11 +147,10 @@ main(int argc, /* I - Number of command-line arguments */
{
if (instance)
_cupsLangPrintf(stderr,
- _("%s: Error - unknown destination \"%s/%s\"!\n"),
+ _("%s: Error - unknown destination \"%s/%s\"."),
argv[0], dest, instance);
else
- _cupsLangPrintf(stderr,
- _("%s: Unknown destination \"%s\"!\n"),
+ _cupsLangPrintf(stderr, _("%s: Unknown destination \"%s\"."),
argv[0], dest);
return (1);
@@ -186,8 +178,7 @@ main(int argc, /* I - Number of command-line arguments */
{
_cupsLangPrintf(stderr,
_("%s: Error - expected hostname after "
- "\'-h\' option!\n"),
- argv[0]);
+ "\"-h\" option."), argv[0]);
return (1);
}
else
@@ -242,12 +233,12 @@ main(int argc, /* I - Number of command-line arguments */
if (dest && !cupsGetDest(dest, NULL, num_dests, dests))
_cupsLangPrintf(stderr,
- _("%s: error - %s environment variable names "
- "non-existent destination \"%s\"!\n"),
- argv[0], val, dest);
+ _("%s: Error - %s environment variable names "
+ "non-existent destination \"%s\"."), argv[0], val,
+ dest);
else
_cupsLangPrintf(stderr,
- _("%s: error - no default destination available.\n"),
+ _("%s: Error - no default destination available."),
argv[0]);
httpClose(http);
cupsFreeDests(num_dests, dests);
@@ -301,7 +292,7 @@ connect_server(const char *command, /* I - Command name */
if (http == NULL)
{
- _cupsLangPrintf(stderr, _("%s: Unable to connect to server\n"), command);
+ _cupsLangPrintf(stderr, _("%s: Unable to connect to server."), command);
exit(1);
}
}
@@ -423,7 +414,7 @@ show_jobs(const char *command, /* I - Command name */
{
if (response->request.status.status_code > IPP_OK_CONFLICT)
{
- _cupsLangPrintf(stderr, "%s: %s\n", command, cupsLastErrorString());
+ _cupsLangPrintf(stderr, "%s: %s", command, cupsLastErrorString());
ippDelete(response);
return (0);
}
@@ -516,12 +507,13 @@ show_jobs(const char *command, /* I - Command name */
if (!longstatus && jobcount == 0)
#ifdef __osf__
_cupsLangPuts(stdout,
+ /* TRANSLATORS: Pri is job priority. */
_("Rank Owner Pri Job Files"
- " Total Size\n"));
+ " Total Size"));
#else
_cupsLangPuts(stdout,
_("Rank Owner Job File(s)"
- " Total Size\n"));
+ " Total Size"));
#endif /* __osf__ */
jobcount ++;
@@ -557,20 +549,20 @@ show_jobs(const char *command, /* I - Command name */
else
strlcpy(namestr, jobname, sizeof(namestr));
- _cupsLangPrintf(stdout, _("%s: %-33.33s [job %d localhost]\n"),
+ _cupsLangPrintf(stdout, _("%s: %-33.33s [job %d localhost]"),
jobuser, rankstr, jobid);
- _cupsLangPrintf(stdout, _(" %-39.39s %.0f bytes\n"),
+ _cupsLangPrintf(stdout, _(" %-39.39s %.0f bytes"),
namestr, 1024.0 * jobsize);
}
else
#ifdef __osf__
_cupsLangPrintf(stdout,
- _("%-6s %-10.10s %-4d %-10d %-27.27s %.0f bytes\n"),
+ _("%-6s %-10.10s %-4d %-10d %-27.27s %.0f bytes"),
rankstr, jobuser, jobpriority, jobid, jobname,
1024.0 * jobsize);
#else
_cupsLangPrintf(stdout,
- _("%-7s %-7.7s %-7d %-31.31s %.0f bytes\n"),
+ _("%-7s %-7.7s %-7d %-31.31s %.0f bytes"),
rankstr, jobuser, jobid, jobname, 1024.0 * jobsize);
#endif /* __osf */
@@ -582,12 +574,12 @@ show_jobs(const char *command, /* I - Command name */
}
else
{
- _cupsLangPrintf(stderr, "%s: %s\n", command, cupsLastErrorString());
+ _cupsLangPrintf(stderr, "%s: %s", command, cupsLastErrorString());
return (0);
}
if (jobcount == 0)
- _cupsLangPuts(stdout, _("no entries\n"));
+ _cupsLangPuts(stdout, _("no entries"));
return (jobcount);
}
@@ -636,7 +628,7 @@ show_printer(const char *command, /* I - Command name */
{
if (response->request.status.status_code > IPP_OK_CONFLICT)
{
- _cupsLangPrintf(stderr, "%s: %s\n", command, cupsLastErrorString());
+ _cupsLangPrintf(stderr, "%s: %s", command, cupsLastErrorString());
ippDelete(response);
return;
}
@@ -649,21 +641,21 @@ show_printer(const char *command, /* I - Command name */
switch (state)
{
case IPP_PRINTER_IDLE :
- _cupsLangPrintf(stdout, _("%s is ready\n"), dest);
+ _cupsLangPrintf(stdout, _("%s is ready"), dest);
break;
case IPP_PRINTER_PROCESSING :
- _cupsLangPrintf(stdout, _("%s is ready and printing\n"),
+ _cupsLangPrintf(stdout, _("%s is ready and printing"),
dest);
break;
case IPP_PRINTER_STOPPED :
- _cupsLangPrintf(stdout, _("%s is not ready\n"), dest);
+ _cupsLangPrintf(stdout, _("%s is not ready"), dest);
break;
}
ippDelete(response);
}
else
- _cupsLangPrintf(stderr, "%s: %s\n", command, cupsLastErrorString());
+ _cupsLangPrintf(stderr, "%s: %s", command, cupsLastErrorString());
}
@@ -676,11 +668,11 @@ usage(void)
{
_cupsLangPuts(stderr,
_("Usage: lpq [-P dest] [-U username] [-h hostname[:port]] "
- "[-l] [+interval]\n"));
+ "[-l] [+interval]"));
exit(1);
}
/*
- * End of "$Id: lpq.c 8929 2009-12-15 22:40:37Z mike $".
+ * End of "$Id: lpq.c 9744 2011-05-05 23:42:30Z mike $".
*/
diff --git a/berkeley/lpr.c b/berkeley/lpr.c
index 2e30bc31..34bb3295 100644
--- a/berkeley/lpr.c
+++ b/berkeley/lpr.c
@@ -1,9 +1,9 @@
/*
- * "$Id: lpr.c 7720 2008-07-11 22:46:21Z mike $"
+ * "$Id: lpr.c 9636 2011-03-21 22:02:00Z mike $"
*
- * "lpr" command for the Common UNIX Printing System (CUPS).
+ * "lpr" command for CUPS.
*
- * Copyright 2007-2008 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -21,13 +21,7 @@
* Include necessary headers...
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-
-#include <cups/string.h>
-#include <cups/cups.h>
-#include <cups/i18n.h>
+#include <cups/cups-private.h>
/*
@@ -73,8 +67,7 @@ main(int argc, /* I - Number of command-line arguments */
#ifdef HAVE_SSL
cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
#else
- _cupsLangPrintf(stderr,
- _("%s: Sorry, no encryption support compiled in!\n"),
+ _cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."),
argv[0]);
#endif /* HAVE_SSL */
break;
@@ -89,8 +82,7 @@ main(int argc, /* I - Number of command-line arguments */
{
_cupsLangPrintf(stderr,
_("%s: Error - expected username after "
- "\'-U\' option!\n"),
- argv[0]);
+ "\"-U\" option."), argv[0]);
return (1);
}
@@ -109,8 +101,7 @@ main(int argc, /* I - Number of command-line arguments */
{
_cupsLangPrintf(stderr,
_("%s: Error - expected hostname after "
- "\'-H\' option!\n"),
- argv[0]);
+ "\"-H\" option."), argv[0]);
return (1);
}
else
@@ -131,8 +122,8 @@ main(int argc, /* I - Number of command-line arguments */
if (i >= argc)
{
_cupsLangPrintf(stderr,
- _("%s: Error - expected value after \'-%c\' "
- "option!\n"), argv[0], ch);
+ _("%s: Error - expected value after \"-%c\" "
+ "option."), argv[0], ch);
return (1);
}
}
@@ -145,8 +136,8 @@ main(int argc, /* I - Number of command-line arguments */
case 't' : /* Troff */
case 'v' : /* Raster image */
_cupsLangPrintf(stderr,
- _("%s: Warning - \'%c\' format modifier not "
- "supported - output may not be correct!\n"),
+ _("%s: Warning - \"%c\" format modifier not "
+ "supported - output may not be correct."),
argv[0], ch);
break;
@@ -159,9 +150,8 @@ main(int argc, /* I - Number of command-line arguments */
if (i >= argc)
{
_cupsLangPrintf(stderr,
- _("%s: error - expected option=value after "
- "\'-o\' option!\n"),
- argv[0]);
+ _("%s: Error - expected option=value after "
+ "\"-o\" option."), argv[0]);
return (1);
}
@@ -217,8 +207,7 @@ main(int argc, /* I - Number of command-line arguments */
{
_cupsLangPrintf(stderr,
_("%s: Error - expected destination after "
- "\'-P\' option!\n"),
- argv[0]);
+ "\"-P\" option."), argv[0]);
return (1);
}
@@ -248,9 +237,8 @@ main(int argc, /* I - Number of command-line arguments */
if (i >= argc)
{
_cupsLangPrintf(stderr,
- _("%s: Error - expected copy count after "
- "\'-#\' option!\n"),
- argv[0]);
+ _("%s: Error - expected copies after "
+ "\"-#\" option."), argv[0]);
return (1);
}
@@ -272,8 +260,8 @@ main(int argc, /* I - Number of command-line arguments */
if (i >= argc)
{
_cupsLangPrintf(stderr,
- _("%s: Error - expected name after \'-%c\' "
- "option!\n"), argv[0], ch);
+ _("%s: Error - expected name after \"-%c\" "
+ "option."), argv[0], ch);
return (1);
}
@@ -283,8 +271,8 @@ main(int argc, /* I - Number of command-line arguments */
default :
_cupsLangPrintf(stderr,
- _("%s: Error - unknown option \'%c\'!\n"),
- argv[0], argv[i][1]);
+ _("%s: Error - unknown option \"%c\"."), argv[0],
+ argv[i][1]);
return (1);
}
else if (num_files < 1000)
@@ -296,7 +284,7 @@ main(int argc, /* I - Number of command-line arguments */
if (access(argv[i], R_OK) != 0)
{
_cupsLangPrintf(stderr,
- _("%s: Error - unable to access \"%s\" - %s\n"),
+ _("%s: Error - unable to access \"%s\" - %s"),
argv[0], argv[i], strerror(errno));
return (1);
}
@@ -314,8 +302,8 @@ main(int argc, /* I - Number of command-line arguments */
}
else
_cupsLangPrintf(stderr,
- _("%s: Error - too many files - \"%s\"\n"),
- argv[0], argv[i]);
+ _("%s: Error - too many files - \"%s\"."), argv[0],
+ argv[i]);
/*
* See if we have any files to print; if not, print from stdin...
*/
@@ -354,15 +342,14 @@ main(int argc, /* I - Number of command-line arguments */
if (printer && !cupsGetNamedDest(NULL, printer, NULL))
_cupsLangPrintf(stderr,
_("%s: Error - %s environment variable names "
- "non-existent destination \"%s\"!\n"),
- argv[0], val, printer);
+ "non-existent destination \"%s\"."), argv[0], val,
+ printer);
else if (cupsLastError() == IPP_NOT_FOUND)
_cupsLangPrintf(stderr,
- _("%s: Error - no default destination available.\n"),
+ _("%s: Error - no default destination available."),
argv[0]);
else
- _cupsLangPrintf(stderr,
- _("%s: Error - scheduler not responding!\n"),
+ _cupsLangPrintf(stderr, _("%s: Error - scheduler not responding."),
argv[0]);
return (1);
@@ -406,8 +393,7 @@ main(int argc, /* I - Number of command-line arguments */
if (status != HTTP_CONTINUE)
{
- _cupsLangPrintf(stderr,
- _("%s: Error - unable to queue from stdin - %s\n"),
+ _cupsLangPrintf(stderr, _("%s: Error - unable to queue from stdin - %s."),
argv[0], httpStatus(status));
return (1);
}
@@ -418,7 +404,7 @@ main(int argc, /* I - Number of command-line arguments */
if (job_id < 1)
{
- _cupsLangPrintf(stderr, "%s: %s\n", argv[0], cupsLastErrorString());
+ _cupsLangPrintf(stderr, "%s: %s", argv[0], cupsLastErrorString());
return (1);
}
@@ -427,5 +413,5 @@ main(int argc, /* I - Number of command-line arguments */
/*
- * End of "$Id: lpr.c 7720 2008-07-11 22:46:21Z mike $".
+ * End of "$Id: lpr.c 9636 2011-03-21 22:02:00Z mike $".
*/
diff --git a/berkeley/lprm.c b/berkeley/lprm.c
index eeeca538..6d69a461 100644
--- a/berkeley/lprm.c
+++ b/berkeley/lprm.c
@@ -1,9 +1,9 @@
/*
- * "$Id: lprm.c 7261 2008-01-28 23:09:31Z mike $"
+ * "$Id: lprm.c 9384 2010-11-22 07:06:39Z mike $"
*
- * "lprm" command for the Common UNIX Printing System (CUPS).
+ * "lprm" command for CUPS.
*
- * Copyright 2007 by Apple Inc.
+ * Copyright 2007-2010 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -21,12 +21,7 @@
* Include necessary headers...
*/
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <cups/cups.h>
-#include <cups/i18n.h>
-#include <cups/string.h>
+#include <cups/cups-private.h>
/*
@@ -69,8 +64,7 @@ main(int argc, /* I - Number of command-line arguments */
cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
#else
_cupsLangPrintf(stderr,
- _("%s: Sorry, no encryption support compiled in!\n"),
- argv[0]);
+ _("%s: Sorry, no encryption support."), argv[0]);
#endif /* HAVE_SSL */
break;
@@ -90,7 +84,7 @@ main(int argc, /* I - Number of command-line arguments */
NULL)) == NULL)
{
_cupsLangPrintf(stderr,
- _("%s: Error - unknown destination \"%s\"!\n"),
+ _("%s: Error - unknown destination \"%s\"."),
argv[0], name);
goto error;
}
@@ -108,8 +102,7 @@ main(int argc, /* I - Number of command-line arguments */
{
_cupsLangPrintf(stderr,
_("%s: Error - expected username after "
- "\'-U\' option!\n"),
- argv[0]);
+ "\"-U\" option."), argv[0]);
goto error;
}
@@ -128,8 +121,7 @@ main(int argc, /* I - Number of command-line arguments */
{
_cupsLangPrintf(stderr,
_("%s: Error - expected hostname after "
- "\'-h\' option!\n"),
- argv[0]);
+ "\"-h\" option."), argv[0]);
goto error;
}
else
@@ -144,8 +136,7 @@ main(int argc, /* I - Number of command-line arguments */
break;
default :
- _cupsLangPrintf(stderr,
- _("%s: Error - unknown option \'%c\'!\n"),
+ _cupsLangPrintf(stderr, _("%s: Error - unknown option \"%c\"."),
argv[0], argv[i][1]);
goto error;
}
@@ -178,15 +169,14 @@ main(int argc, /* I - Number of command-line arguments */
}
else
{
- _cupsLangPrintf(stderr,
- _("%s: Error - unknown destination \"%s\"!\n"),
+ _cupsLangPrintf(stderr, _("%s: Error - unknown destination \"%s\"."),
argv[0], argv[i]);
goto error;
}
if (cupsCancelJob2(CUPS_HTTP_DEFAULT, name, job_id, 0) != IPP_OK)
{
- _cupsLangPrintf(stderr, "%s: %s\n", argv[0], cupsLastErrorString());
+ _cupsLangPrintf(stderr, "%s: %s", argv[0], cupsLastErrorString());
goto error;
}
@@ -200,7 +190,7 @@ main(int argc, /* I - Number of command-line arguments */
if (!did_cancel && cupsCancelJob2(CUPS_HTTP_DEFAULT, name, 0, 0) != IPP_OK)
{
- _cupsLangPrintf(stderr, "%s: %s\n", argv[0], cupsLastErrorString());
+ _cupsLangPrintf(stderr, "%s: %s", argv[0], cupsLastErrorString());
goto error;
}
@@ -223,5 +213,5 @@ main(int argc, /* I - Number of command-line arguments */
/*
- * End of "$Id: lprm.c 7261 2008-01-28 23:09:31Z mike $".
+ * End of "$Id: lprm.c 9384 2010-11-22 07:06:39Z mike $".
*/