]>
Commit | Line | Data |
---|---|---|
1f9b7ef8 KB |
1 | diff -up cups-1.5b1/berkeley/lpr.c.lpr-help cups-1.5b1/berkeley/lpr.c |
2 | --- cups-1.5b1/berkeley/lpr.c.lpr-help 2011-03-21 23:02:00.000000000 +0100 | |
3 | +++ cups-1.5b1/berkeley/lpr.c 2011-05-23 17:58:06.000000000 +0200 | |
4 | @@ -24,6 +24,31 @@ | |
5 | #include <cups/cups-private.h> | |
f92713d3 SS |
6 | |
7 | ||
8 | +static void | |
9 | +usage (const char *name) | |
10 | +{ | |
11 | + _cupsLangPrintf(stdout, | |
12 | +"Usage: %s [OPTION] [ file(s) ]\n" | |
13 | +"Print files.\n\n" | |
14 | +" -E force encryption\n" | |
15 | +" -H server[:port] specify alternate server\n" | |
16 | +" -C title, -J title, -T title\n" | |
17 | +" set the job name\n\n" | |
18 | +" -P destination/instance print to named printer\n" | |
19 | +" -U username specify alternate username\n" | |
20 | +" -# num-copies set number of copies\n" | |
21 | +" -h disable banner printing\n" | |
22 | +" -l print without filtering\n" | |
23 | +" -m send email on completion\n" | |
24 | +" -o option[=value] set a job option\n" | |
25 | +" -p format text file with header\n" | |
26 | +" -q hold job for printing\n" | |
27 | +" -r delete files after printing\n" | |
28 | +"\nWith no file given, read standard input.\n" | |
29 | +, name); | |
30 | +} | |
31 | + | |
32 | + | |
33 | /* | |
34 | * 'main()' - Parse options and send files for printing. | |
35 | */ | |
1f9b7ef8 | 36 | @@ -270,6 +294,12 @@ main(int argc, /* I - Number of comm |
f92713d3 SS |
37 | break; |
38 | ||
39 | default : | |
40 | + if (!strcmp (argv[i], "--help")) | |
41 | + { | |
42 | + usage (argv[0]); | |
43 | + return (0); | |
44 | + } | |
45 | + | |
46 | _cupsLangPrintf(stderr, | |
1f9b7ef8 KB |
47 | _("%s: Error - unknown option \"%c\"."), argv[0], |
48 | argv[i][1]); |