[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

add -q to patch



This is a simple patch that adds -q to patch.  It does the same thing as -s,
and is added only for consistancy.


Index: patch.1
===================================================================
RCS file: /cvs/openbsd/src/usr.bin/patch/patch.1,v
retrieving revision 1.17
diff -u -u -r1.17 patch.1
--- patch.1	31 Oct 2003 20:20:45 -0000	1.17
+++ patch.1	11 Jul 2004 08:41:37 -0000
@@ -240,7 +240,7 @@
 reversed normal diffs will begin with a delete, which will fail, triggering
 the heuristic.)
 .It Xo
-.Fl s , Fl Fl quiet ,
+.Fl q , Fl s , Fl Fl quiet ,
 .Fl Fl silent
 .Xc
 Makes
Index: patch.c
===================================================================
RCS file: /cvs/openbsd/src/usr.bin/patch/patch.c,v
retrieving revision 1.41
diff -u -u -r1.41 patch.c
--- patch.c	9 Jul 2004 19:13:46 -0000	1.41
+++ patch.c	11 Jul 2004 08:41:37 -0000
@@ -437,7 +437,7 @@
 static void
 get_some_switches(void)
 {
-	const char *options = "b::B:cCd:D:eEfF:i:lnNo:p:r:RstuvV:x:z:";
+	const char *options = "b::B:cCd:D:eEfF:i:lnNo:p:qr:RstuvV:x:z:";
 	static struct option longopts[] = {
 		{"backup",		no_argument,		0,	'b'},
 		{"batch",		no_argument,		0,	't'},
@@ -455,6 +455,7 @@
 		{"normal",		no_argument,		0,	'n'},
 		{"output",		required_argument,	0,	'o'},
 		{"prefix",		required_argument,	0,	'B'},
+		{"quiet",		no_argument,		0,	'q'},
 		{"quiet",		no_argument,		0,	's'},
 		{"reject-file",		required_argument,	0,	'r'},
 		{"remove-empty-files",	no_argument,		0,	'E'},
@@ -556,6 +557,7 @@
 			reverse = true;
 			reverse_flag_specified = true;
 			break;
+		case 'q':
 		case 's':
 			verbose = false;
 			break;
@@ -604,7 +606,7 @@
 usage(void)
 {
 	fprintf(stderr,
-"usage: patch [-bcCeEflnNRstuv] [-B backup-prefix] [-d directory] [-D
symbol]\n"+"usage: patch [-bcCeEflnNqRstuv] [-B backup-prefix] [-d
directory] [-D symbol]\n" "             [-F max-fuzz] [-i patchfile] [-o
out-file] [-p strip-count]\n" "             [-r rej-name] [-V
{numbered,existing,simple}] [-z backup-ext]\n" "             [origfile
[patchfile]]\n");


-- 
The Computer made me do it.



Visit your host, monkey.org