diff options
author | Eric Blake <ebb9@byu.net> | 2008-06-03 06:42:14 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2008-06-03 06:42:14 -0600 |
commit | 3be468475e78fc79f2e4aa60585daf7232e5c68d (patch) | |
tree | 4615f08403ae4b14a749488915f19f23143a9216 | |
parent | f3fbfb92cc3f44af244f888b8be6b465493dc590 (diff) | |
download | m4-3be468475e78fc79f2e4aa60585daf7232e5c68d.tar.gz |
Use progname module rather than rolling our own program_name.
* m4/gnulib-cache.m4: Import progname module.
* src/m4.c (program_name): Replace...
(main): ...with a call to set_program_name.
Signed-off-by: Eric Blake <ebb9@byu.net>
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | m4/gnulib-cache.m4 | 4 | ||||
-rw-r--r-- | src/m4.c | 6 |
3 files changed, 11 insertions, 6 deletions
@@ -1,3 +1,10 @@ +2008-06-03 Eric Blake <ebb9@byu.net> + + Use progname module rather than rolling our own program_name. + * m4/gnulib-cache.m4: Import progname module. + * src/m4.c (program_name): Replace... + (main): ...with a call to set_program_name. + 2008-06-02 Eric Blake <ebb9@byu.net> Stage 24: Allow embedded NUL in macro names. diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4 index b6ba2020..5aa48202 100644 --- a/m4/gnulib-cache.m4 +++ b/m4/gnulib-cache.m4 @@ -15,11 +15,11 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --local-dir=local --lib=libm4 --source-base=lib --m4-base=m4 --doc-base=doc --aux-dir=build-aux --with-tests --no-libtool --macro-prefix=M4 announce-gen assert autobuild avltree-oset binary-io clean-temp cloexec close-stream closein config-h error fdl fflush flexmember fopen-safer fseeko gendocs getopt git-version-gen gnumakefile gnupload gpl-3.0 intprops memchr2 memmem mkstemp obstack quote regex stdbool stdint stdlib-safer strtod strtol unlocked-io vasnprintf-posix verror version-etc version-etc-fsf xalloc xmemdup0 xprintf xvasprintf-posix +# gnulib-tool --import --dir=. --local-dir=local --lib=libm4 --source-base=lib --m4-base=m4 --doc-base=doc --aux-dir=build-aux --with-tests --no-libtool --macro-prefix=M4 announce-gen assert autobuild avltree-oset binary-io clean-temp cloexec close-stream closein config-h error fdl fflush flexmember fopen-safer fseeko gendocs getopt git-version-gen gnumakefile gnupload gpl-3.0 intprops memchr2 memmem mkstemp obstack progname quote regex stdbool stdint stdlib-safer strtod strtol unlocked-io vasnprintf-posix verror version-etc version-etc-fsf xalloc xmemdup0 xprintf xvasprintf-posix # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([local]) -gl_MODULES([announce-gen assert autobuild avltree-oset binary-io clean-temp cloexec close-stream closein config-h error fdl fflush flexmember fopen-safer fseeko gendocs getopt git-version-gen gnumakefile gnupload gpl-3.0 intprops memchr2 memmem mkstemp obstack quote regex stdbool stdint stdlib-safer strtod strtol unlocked-io vasnprintf-posix verror version-etc version-etc-fsf xalloc xmemdup0 xprintf xvasprintf-posix]) +gl_MODULES([announce-gen assert autobuild avltree-oset binary-io clean-temp cloexec close-stream closein config-h error fdl fflush flexmember fopen-safer fseeko gendocs getopt git-version-gen gnumakefile gnupload gpl-3.0 intprops memchr2 memmem mkstemp obstack progname quote regex stdbool stdint stdlib-safer strtod strtol unlocked-io vasnprintf-posix verror version-etc version-etc-fsf xalloc xmemdup0 xprintf xvasprintf-posix]) gl_AVOID([]) gl_SOURCE_BASE([lib]) gl_M4_BASE([m4]) @@ -25,6 +25,7 @@ #include <signal.h> #include <stdarg.h> +#include "progname.h" #include "version-etc.h" #define AUTHORS "Rene' Seindal", "Eric Blake" @@ -66,9 +67,6 @@ int nesting_limit = 1024; const char *user_word_regexp = ""; #endif -/* The name this program was run with. */ -const char *program_name; - /* Global catchall for any errors that should affect final error status, but where we try to continue execution in the meantime. */ int retcode; @@ -413,7 +411,7 @@ main (int argc, char *const *argv, char *const *envp) const char *frozen_file_to_write = NULL; const char *macro_sequence = ""; - program_name = argv[0]; + set_program_name (argv[0]); retcode = EXIT_SUCCESS; atexit (close_stdin); |