Blame SOURCES/cups-lpr-help.patch

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