From 6b0c80f5577e1097a04c501c1fa8dfaa3939f3ef Mon Sep 17 00:00:00 2001 From: Michael Meffie Date: Tue, 21 Jan 2014 09:26:11 -0500 Subject: [PATCH] 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. Reviewed-on: http://gerrit.openafs.org/10721 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 37937a3e924eee7a09c7719ca6355703e65092e1) Change-Id: I65b8d54bde89be85bd535d3a85fd2b22408bba39 Reviewed-on: http://gerrit.openafs.org/11225 Reviewed-by: Perry Ruiter Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand --- doc/man-pages/pod1/afs_compile_et.pod | 1 + src/comerr/compile_et.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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 9b9b282f8..de877cda7 100644 --- a/src/comerr/compile_et.c +++ b/src/comerr/compile_et.c @@ -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) -- 2.39.5