Blame SOURCES/expect-5.45.4-unification-of-usage-and-man-page.patch

261060
diff -up expect5.45.4/expect.man.orig expect5.45.4/expect.man
261060
--- expect5.45.4/expect.man.orig	2018-08-29 10:43:24.112949065 +0200
261060
+++ expect5.45.4/expect.man	2018-08-29 10:45:47.652044587 +0200
261060
@@ -4,7 +4,7 @@ expect \- programmed dialogue with inter
261060
 .SH SYNOPSIS
261060
 .B expect
261060
 [
261060
-.B \-dDinN
261060
+.B \-dDhinNv
261060
 ]
261060
 [
261060
 .B \-c
261060
@@ -180,6 +180,9 @@ problems when reading from a fifo or std
261060
 If the string "\-" is supplied as a filename, standard input is read instead.
261060
 (Use "./\-" to read from a file actually named "\-".)
261060
 .PP
261060
+.B \-h
261060
+causes Expect to print its usage message and exit.
261060
+.PP
261060
 The
261060
 .B \-i
261060
 flag causes
261060
diff -up expect5.45.4/exp_main_sub.c.orig expect5.45.4/exp_main_sub.c
261060
--- expect5.45.4/exp_main_sub.c.orig	2018-02-04 11:43:58.000000000 +0100
261060
+++ expect5.45.4/exp_main_sub.c	2018-08-29 11:04:44.307916140 +0200
261060
@@ -72,7 +72,21 @@ usage(interp)
261060
 Tcl_Interp *interp;
261060
 {
261060
   char buffer [] = "exit 1";
261060
-  expErrorLog("usage: expect [-div] [-c cmds] [[-f] cmdfile] [args]\r\n");
261060
+  expErrorLog("usage: expect [-dDhinNv] [-c cmds] [[-[f|b]] cmdfile] [args]\r\n"
261060
+	"  Flags are as follows:\r\n"
261060
+	"  -b     prefaces a file from which to read commands from\r\n"
261060
+	"           (expect reads one line at a timei from the file)\r\n"
261060
+	"  -c     prefaces a command to be executed before any in the script,\r\n"
261060
+	"           may be used multiple times\r\n"
261060
+	"  -d     enables diagnostic output\r\n"
261060
+	"  -D     enables interactive debugger\r\n"
261060
+	"  -f     prefaces a file from which to read commands from\r\n"
261060
+	"           (expect reads the whole file at once)\r\n"
261060
+	"  -h     prints this usage message and exits\r\n"
261060
+	"  -i     interactively prompts for commands\r\n"
261060
+	"  -n     expect doesn't read personal rc file\r\n"
261060
+	"  -N     expect doesn't read system-wide rc file\r\n"
261060
+	"  -v     prints version and exits\r\n");
261060
 
261060
   /* SF #439042 -- Allow overide of "exit" by user / script
261060
    */
261060
@@ -700,7 +714,7 @@ char **argv;
261060
          * and generate a usage message.
261060
 	 */
261060
 
261060
-	while ((c = getopt(argc, argv, "+b:c:dD:f:inN-v")) != EOF) {
261060
+	while ((c = getopt(argc, argv, "+b:c:dD:f:inN-vh")) != EOF) {
261060
 		switch(c) {
261060
 		case '-':
261060
 			/* getopt already handles -- internally, however */
261060
@@ -768,6 +782,9 @@ char **argv;
261060
 			  Tcl_Eval(interp, buffer); 
261060
 			}
261060
 			break;
261060
+		case 'h':
261060
+			usage(interp);
261060
+			break;
261060
 		default: usage(interp);
261060
 		}
261060
 	}