m4-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch-1_4 --help cleanup


From: Eric Blake
Subject: branch-1_4 --help cleanup
Date: Thu, 27 Jul 2006 16:00:29 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

This makes --help and --version comply with GNU Coding Standards.

2006-07-27  Eric Blake  <address@hidden>

        * doc/Makefile.am (m4.1): Improve man page.
        * src/m4.c (usage): Improve --help output, including adding the
        bug reporting address.
        (main): Follow GNU Coding Standards for --version output.

Index: src/m4.c
===================================================================
RCS file: /sources/m4/m4/src/Attic/m4.c,v
retrieving revision 1.1.1.1.2.21
diff -u -r1.1.1.1.2.21 m4.c
--- src/m4.c    25 Jul 2006 12:43:57 -0000      1.1.1.1.2.21
+++ src/m4.c    27 Jul 2006 15:59:23 -0000
@@ -146,6 +146,11 @@
     {
       printf ("Usage: %s [OPTION]... [FILE]...\n", program_name);
       fputs ("\
+Process macros in FILEs.  If no FILE or if FILE is `-', standard input\n\
+is read.\n\
+", stdout);
+      fputs ("\
+\n\
 Mandatory or optional arguments to long options are mandatory or optional\n\
 for short options too.\n\
 \n\
@@ -165,10 +170,10 @@
       fputs ("\
 \n\
 Preprocessor features:\n\
-  -D, --define=NAME[=VALUE]    enter NAME has having VALUE, or empty\n\
-  -I, --include=DIRECTORY      append this directory to include path\n\
-  -s, --synclines              generate `#line NO \"FILE\"' lines\n\
-  -U, --undefine=NAME          delete builtin NAME\n\
+  -D, --define=NAME[=VALUE]    define NAME has having VALUE, or empty\n\
+  -I, --include=DIRECTORY      append DIRECTORY to include path\n\
+  -s, --synclines              generate `#line NUM \"FILE\"' lines\n\
+  -U, --undefine=NAME          undefine NAME\n\
 ", stdout);
       fputs ("\
 \n\
@@ -203,8 +208,8 @@
   p   show results of path searches\n\
   q   quote values as necessary, with a or e flag\n\
   t   trace for all macro calls, not only traceon'ed\n\
-  V   shorthand for all of the other flags\n\
   x   add a unique macro call id, useful with c flag\n\
+  V   shorthand for all of the above flags\n\
 ", stdout);
       fputs ("\
 \n\
@@ -213,13 +218,10 @@
 ", stdout);
       fputs ("\
 \n\
-If no FILE or if FILE is `-', standard input is read.\n\
-", stdout);
-      fputs ("\
-\n\
 Exit status is 0 for success, 1 for failure, 63 for frozen file version\n\
 mismatch, or whatever value was passed to the m4exit macro.\n\
 ", stdout);
+      printf ("\nReport bugs to <%s>.\n", PACKAGE_BUGREPORT);
     }
 
   if (close_stream (stdout) != 0)
@@ -408,12 +410,13 @@
   if (show_version)
     {
       printf ("%s\n", PACKAGE_STRING);
-      printf ("Written by Rene' Seindal.\n\
-\n\
+      fputs ("\
 Copyright (C) 2006 Free Software Foundation, Inc.\n\
 This is free software; see the source for copying conditions.  There is NO\n\
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
-");
+\n\
+Written by Rene' Seindal.\n\
+", stdout);
 
       if (close_stream (stdout) != 0)
        M4ERROR ((EXIT_FAILURE, errno, "write error"));
Index: doc/Makefile.am
===================================================================
RCS file: /sources/m4/m4/doc/Attic/Makefile.am,v
retrieving revision 1.8.2.7
diff -u -r1.8.2.7 Makefile.am
--- doc/Makefile.am     13 Jul 2006 12:50:47 -0000      1.8.2.7
+++ doc/Makefile.am     27 Jul 2006 15:59:23 -0000
@@ -35,7 +35,8 @@
        @if test -x ../src/m4$(EXEEXT) ; then \
          echo "Updating man page m4.1" ; \
          $(SHELL) $(top_srcdir)/missing --run \
-           help2man -o $@ ../src/m4$(EXEEXT) ; \
+           help2man --name="macro processor" --source=FSF \
+             --info-page=m4 --output=$@ ../src/m4$(EXEEXT) ; \
        else \
          echo "WARNING: The \`man' page \`$@' cannot be updated yet."; \
          echo "         Retry once the program executable is ready."; \







reply via email to

[Prev in Thread] Current Thread [Next in Thread]