diff options
author | Jim Meyering <meyering@redhat.com> | 2008-06-03 08:34:09 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-06-03 09:15:00 +0200 |
commit | 896b672499d6a31a6caf85411bcbdde6edc57668 (patch) | |
tree | 27683a9e32614e6ea09de5e06d7967164593bbd7 /src/tr.c | |
parent | 1b0b6c8d08785bf9b05931371259ac710a806e51 (diff) | |
download | coreutils-896b672499d6a31a6caf85411bcbdde6edc57668.tar.xz |
use gnulib's progname module
* bootstrap.conf (gnulib_modules): Add progname.
* src/*.c (program_name): Remove declaration.
* (main): Call set_program_name rather than setting program_name.
* src/nice.c (main): Cast program_name to "(char *)".
* src/prog-fprintf.c: Include "system.h"
* src/system.h: Include "progname.h".
* maint.mk (sc_program_name): Adjust rule.
Suggestion from Eric Blake.
Diffstat (limited to 'src/tr.c')
-rw-r--r-- | src/tr.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -193,9 +193,6 @@ es_match (struct E_string const *es, size_t i, char c) return es->s[i] == c && !es->escaped[i]; } -/* The name by which this program was run. */ -char const *program_name; - /* When true, each sequence in the input of a repeated character (call it c) is replaced (in the output) by a single occurrence of c for every c in the squeeze set. */ @@ -1671,7 +1668,7 @@ main (int argc, char **argv) struct Spec_list *s2 = &buf2; initialize_main (&argc, &argv); - program_name = argv[0]; + set_program_name (argv[0]); setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); |