From bd2bba21fbc1976ebff52451fe53064c3a3b3075 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 27 Jul 2006 18:12:08 +0000 Subject: [PATCH] * 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. --- ChangeLog | 9 ++++++++- doc/Makefile.am | 3 ++- src/m4.c | 27 +++++++++++++++------------ 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index e8e51737..9af2fec2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,15 @@ +2006-07-27 Eric Blake + + * 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. + 2006-07-26 Eric Blake * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and end-comment consistently, to match POSIX. - + * doc/m4.texinfo (Macro Arguments, Changequote, Changecom) (Dnl, M4wrap, Include): Document EOF issues, and add examples. (Incompatibilities): Document incompatibility of changecom diff --git a/doc/Makefile.am b/doc/Makefile.am index bb71d0dc..9e2dacf5 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -35,7 +35,8 @@ $(srcdir)/m4.1: $(top_srcdir)/configure.ac $(top_srcdir)/src/m4.c @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."; \ diff --git a/src/m4.c b/src/m4.c index 8dab5d91..a2eb9dea 100644 --- a/src/m4.c +++ b/src/m4.c @@ -146,6 +146,11 @@ usage (int status) { 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 @@ Operation modes:\n\ 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 @@ FLAGS is any of:\n\ 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 @@ of directories included after any specified by `-I'.\n\ ", 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 @@ main (int argc, char *const *argv, char *const *envp) 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")); -- 2.11.4.GIT