diff options
author | Jim Meyering <meyering@fb.com> | 2014-09-14 19:38:11 -0700 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2014-11-30 18:59:34 -0800 |
commit | 8ad1b31305297df63a04919ad1bd9b94dec9aeb4 (patch) | |
tree | d093e27adaa52f48459ac6cea813c597dd4d73eb | |
parent | 72834d8d89a352f21a4ab4937a7439eadc55785b (diff) | |
download | sed-8ad1b31305297df63a04919ad1bd9b94dec9aeb4.tar.gz |
maint: enable sc_program_name syntax check
* cfg.mk (local-checks-to-skip): Remove its exemption.
* sed/sed.c: Include progname.h".
(program_name): Remove now-unnecessary declaration.
(main): Call set_program_name.
* bootstrap.conf (gnulib_modules): Add progname.
* lib/.gitignore: Append the two new names.
-rw-r--r-- | bootstrap.conf | 1 | ||||
-rw-r--r-- | cfg.mk | 3 | ||||
-rw-r--r-- | lib/.gitignore | 2 | ||||
-rw-r--r-- | sed/sed.c | 4 |
4 files changed, 7 insertions, 3 deletions
diff --git a/bootstrap.conf b/bootstrap.conf index 2cc519e..a51fd5f 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -40,6 +40,7 @@ mbsinit memchr mkostemp obstack +progname readme-release regex rename @@ -33,7 +33,6 @@ local-checks-to-skip = \ sc_m4_quote_check \ sc_makefile_at_at_check \ sc_po_check \ - sc_program_name \ sc_prohibit_always_true_header_tests \ sc_prohibit_atoi_atof \ sc_prohibit_empty_lines_at_EOF \ @@ -139,3 +138,5 @@ config_h_header ?= (<config\.h>|"sed\.h") exclude_file_name_regexp--sc_long_lines = ^tests/.*$$ exclude_file_name_regexp--sc_prohibit_doubled_word = \ ^testsuite/(mac-mf|uniq)\.(good|inp)$$ + +exclude_file_name_regexp--sc_program_name = ^testsuite/.*\.c$$ diff --git a/lib/.gitignore b/lib/.gitignore index 48d8e10..95015bc 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -206,3 +206,5 @@ xstriconv.c xstriconv.h xstrndup.c xstrndup.h +/progname.c +/progname.h @@ -26,6 +26,7 @@ #include <stdlib.h> #include <sys/types.h> #include "getopt.h" +#include "progname.h" #include "version-etc.h" @@ -35,8 +36,6 @@ _("Ken Pizzini"), \ _("Paolo Bonzini") -char *program_name; - int extended_regexp_flags = 0; /* one-byte buffer delimiter */ @@ -200,6 +199,7 @@ main(argc, argv) /* Set locale according to user's wishes. */ setlocale (LC_ALL, ""); #endif + set_program_name (argv[0]); initialize_mbcs (); #if ENABLE_NLS |