summaryrefslogtreecommitdiffstats
path: root/cups-lpr-help.patch
blob: c42434dbcf93b135d6cd634cfb4ee5327017ff73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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]);