PERFORCE change 179367 for review
Benjamin Fiedler
bfiedler at FreeBSD.org
Wed Jun 9 17:59:21 UTC 2010
http://p4web.freebsd.org/@@179367?ac=10
Change 179367 by bfiedler at freebsd-home on 2010/06/09 17:58:44
Fix --help options
Affected files ...
.. //depot/projects/soc2010/bsdtextproc/diff/diff.c#3 edit
Differences ...
==== //depot/projects/soc2010/bsdtextproc/diff/diff.c#3 (text+ko) ====
@@ -139,13 +139,15 @@
{ NULL, 0, NULL, '\0'}
};
-static const char* help_msg[] = {
+static const char *help_msg[] = {
"-a --text treat files as ASCII text",
"-B --ignore-blank-lines Ignore blank newlines in the comparison",
"-b --ignore-space-change Ignore all changes due to whitespace",
"-C NUM --context=[NUM] Show NUM lines before and after change (default 3)",
"-D --ifdef=NAME",
-NULL };
+NULL,
+};
+char **help_strs = (char **)help_msg;
void usage(void);
@@ -293,6 +295,12 @@
ignore_file_case = 0;
break;
case OPT_HELP:
+ for(;*help_strs;help_strs++)
+ {
+ printf("%s\n", *help_strs);
+ }
+ exit(2);
+ break;
default:
usage();
break;
More information about the p4-projects
mailing list