comerr: long and short form of the -prefix option.
authorMichael Meffie <mmeffie@sinenomine.net>
Tue, 21 Jan 2014 14:26:11 +0000 (09:26 -0500)
committerDerrick Brashear <shadow@your-file-system.com>
Tue, 28 Jan 2014 01:58:30 +0000 (17:58 -0800)
The man page documented the prefix option as -prefix; compile_et
supported only the short form -p.

Document and support both the long and short forms for the prefix
option; -p and -prefix.

Change-Id: Ide5551b06ae888748600677ed09ba674506a584f
Reviewed-on: http://gerrit.openafs.org/10721
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

doc/man-pages/pod1/afs_compile_et.pod
src/comerr/compile_et.c

index f365d04..6f16662 100644 (file)
@@ -54,6 +54,7 @@ The B<-lang> <I<lang>> option is a synonym for B<-language> <I<lang>>>.
 =item B<-prefix> <I<prefix>>
 
 Specifies the directory to search for the F<error_table.et> file.
+The B<-p> <I<prefix>> option is a synonym for B<-prefix> <I<prefix>>.
 
 =item B<-v> <I<version>>
 
index 982cabb..be75156 100644 (file)
@@ -72,6 +72,12 @@ static const char *const lang_args[] = {
     0,
 };
 
+static const char *const prefix_args[] = {
+    "p",
+    "prefix",
+    0,
+};
+
 static const char *const language_names[] = {
     "C",
     "K&R C",
@@ -207,7 +213,7 @@ main(int argc, char **argv)
                if (!arg)
                    usage();
                got_include = arg;
-           } else if (strcmp(arg, "p") == 0) {
+           } else if (check_arg(prefix_args, arg)) {
                arg = *++argv;
                argc--;
                if (!arg)