]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
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)
committerStephan Wiesand <stephan.wiesand@desy.de>
Thu, 26 Jun 2014 11:11:11 +0000 (07:11 -0400)
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.

Reviewed-on: http://gerrit.openafs.org/10721
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 37937a3e924eee7a09c7719ca6355703e65092e1)

Change-Id: I65b8d54bde89be85bd535d3a85fd2b22408bba39
Reviewed-on: http://gerrit.openafs.org/11225
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
doc/man-pages/pod1/afs_compile_et.pod
src/comerr/compile_et.c

index f365d04f3038c5b401e89c5df0732dc9e89b2232..6f1666276b6f238c6af743141d577277570dc47c 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 9b9b282f87916fdddb204c025b08bf542a93e3cd..de877cda7c024fe4af5e8310110b3b6698e32255 100644 (file)
@@ -79,6 +79,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",
@@ -214,7 +220,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)