From: Michael Meffie Date: Tue, 21 Jan 2014 14:26:11 +0000 (-0500) Subject: comerr: long and short form of the -prefix option. X-Git-Tag: upstream/1.8.0_pre1^2~821 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=37937a3e924eee7a09c7719ca6355703e65092e1;p=packages%2Fo%2Fopenafs.git comerr: long and short form of the -prefix option. 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 Reviewed-by: Derrick Brashear --- diff --git a/doc/man-pages/pod1/afs_compile_et.pod b/doc/man-pages/pod1/afs_compile_et.pod index f365d04f3..6f1666276 100644 --- a/doc/man-pages/pod1/afs_compile_et.pod +++ b/doc/man-pages/pod1/afs_compile_et.pod @@ -54,6 +54,7 @@ The B<-lang> > option is a synonym for B<-language> >>. =item B<-prefix> > Specifies the directory to search for the F file. +The B<-p> > option is a synonym for B<-prefix> >. =item B<-v> > diff --git a/src/comerr/compile_et.c b/src/comerr/compile_et.c index 982cabb5a..be75156e7 100644 --- a/src/comerr/compile_et.c +++ b/src/comerr/compile_et.c @@ -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)