void-packages/srcpkgs/cups/patches/cups-lpr-help.patch

49 lines
1.6 KiB
Diff

diff -up cups-1.5b1/berkeley/lpr.c.lpr-help cups-1.5b1/berkeley/lpr.c
--- cups-1.5b1/berkeley/lpr.c.lpr-help 2011-03-21 23:02:00.000000000 +0100
+++ cups-1.5b1/berkeley/lpr.c 2011-05-23 17:58:06.000000000 +0200
@@ -24,6 +24,31 @@
#include <cups/cups-private.h>
+static void
+usage (const char *name)
+{
+ _cupsLangPrintf(stdout,
+"Usage: %s [OPTION] [ file(s) ]\n"
+"Print files.\n\n"
+" -E force encryption\n"
+" -H server[:port] specify alternate server\n"
+" -C title, -J title, -T title\n"
+" set the job name\n\n"
+" -P destination/instance print to named printer\n"
+" -U username specify alternate username\n"
+" -# num-copies set number of copies\n"
+" -h disable banner printing\n"
+" -l print without filtering\n"
+" -m send email on completion\n"
+" -o option[=value] set a job option\n"
+" -p format text file with header\n"
+" -q hold job for printing\n"
+" -r delete files after printing\n"
+"\nWith no file given, read standard input.\n"
+, name);
+}
+
+
/*
* 'main()' - Parse options and send files for printing.
*/
@@ -270,6 +294,12 @@ main(int argc, /* I - Number of comm
break;
default :
+ if (!strcmp (argv[i], "--help"))
+ {
+ usage (argv[0]);
+ return (0);
+ }
+
_cupsLangPrintf(stderr,
_("%s: Error - unknown option \"%c\"."), argv[0],
argv[i][1]);