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: openafs-stable-1_8_0pre1~821 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=37937a3e924eee7a09c7719ca6355703e65092e1;hp=15c80b1a92516a41d4aed8403db1485e97a7eff6 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 f365d04..6f16662 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 982cabb..be75156 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)