[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep branch, master, updated. v2.25-84-g6c96214
From: |
Jim Meyering |
Subject: |
grep branch, master, updated. v2.25-84-g6c96214 |
Date: |
Tue, 6 Sep 2016 04:49:48 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".
The branch, master has been updated
via 6c96214b4d75de6bf6cf95514e39c494fdcc8c4f (commit)
from ceac7eff585e024ee7b3ba812b0117b1fab7ed63 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=6c96214b4d75de6bf6cf95514e39c494fdcc8c4f
commit 6c96214b4d75de6bf6cf95514e39c494fdcc8c4f
Author: Jim Meyering <address@hidden>
Date: Mon Sep 5 09:27:28 2016 -0700
maint: switch from gnulib's progname to getprogname module
* gnulib: Update to latest, for its new getprogname module.
* bootstrap.conf (avoided_gnulib_modules): Include the getprogname
module rather than the now-obsolescent progname.
* src/grep.c: Include "getprogname.h" rather than "progname.h"
and remove any use of set_program_name.
* tests/dfa-match-aux.c (main): Likewise.
* tests/get-mb-cur-max.c (main): Likewise.
* src/grep.c (usage, main): Use getprogname() in place of program_name.
diff --git a/bootstrap.conf b/bootstrap.conf
index 9e76131..841937e 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -39,6 +39,7 @@ fstatat
fts
getopt-gnu
getpagesize
+getprogname
gettext-h
git-version-gen
gitlog-to-changelog
@@ -65,7 +66,6 @@ minmax
obstack
openat-safer
perl
-progname
propername
quote
readme-release
diff --git a/gnulib b/gnulib
index cffe9ac..7a10276 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit cffe9acc622fe5aa274c5c78ea860c9c17f8664c
+Subproject commit 7a10276e59a05f4176464e0fbadc3f743c8ed244
diff --git a/src/grep.c b/src/grep.c
index 15c6dc6..d07f5da 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -38,9 +38,9 @@
#include "fcntl-safer.h"
#include "fts_.h"
#include "getopt.h"
+#include "getprogname.h"
#include "grep.h"
#include "intprops.h"
-#include "progname.h"
#include "propername.h"
#include "quote.h"
#include "safe-read.h"
@@ -1897,19 +1897,19 @@ usage (int status)
if (status != 0)
{
fprintf (stderr, _("Usage: %s [OPTION]... PATTERN [FILE]...\n"),
- program_name);
+ getprogname());
fprintf (stderr, _("Try '%s --help' for more information.\n"),
- program_name);
+ getprogname());
}
else
{
- printf (_("Usage: %s [OPTION]... PATTERN [FILE]...\n"), program_name);
+ printf (_("Usage: %s [OPTION]... PATTERN [FILE]...\n"), getprogname());
printf (_("Search for PATTERN in each FILE or standard input.\n"));
printf (_("PATTERN is, by default, a basic regular expression
(BRE).\n"));
printf (_("\
Example: %s -i 'hello world' menu.h main.c\n\
\n\
-Regexp selection and interpretation:\n"), program_name);
+Regexp selection and interpretation:\n"), getprogname());
printf (_("\
-E, --extended-regexp PATTERN is an extended regular expression (ERE)\n\
-F, --fixed-strings PATTERN is a set of newline-separated strings\n\
@@ -2358,8 +2358,6 @@ main (int argc, char **argv)
FILE *fp;
exit_failure = EXIT_TROUBLE;
initialize_main (&argc, &argv);
- set_program_name (argv[0]);
- program_name = argv[0];
keys = NULL;
keycc = 0;
@@ -2689,7 +2687,7 @@ main (int argc, char **argv)
if (show_version)
{
- version_etc (stdout, program_name, PACKAGE_NAME, VERSION, AUTHORS,
+ version_etc (stdout, getprogname(), PACKAGE_NAME, VERSION, AUTHORS,
(char *) NULL);
return EXIT_SUCCESS;
}
diff --git a/tests/dfa-match-aux.c b/tests/dfa-match-aux.c
index 070089c..af80628 100644
--- a/tests/dfa-match-aux.c
+++ b/tests/dfa-match-aux.c
@@ -26,7 +26,7 @@
#include <dfa.h>
#include <localeinfo.h>
-#include "progname.h"
+#include "getprogname.h"
_Noreturn void
dfaerror (char const *mesg)
@@ -50,7 +50,6 @@ main (int argc, char **argv)
int allow_nl;
struct localeinfo localeinfo;
- set_program_name (argv[0]);
if (argc < 3)
exit (EXIT_FAILURE);
diff --git a/tests/get-mb-cur-max.c b/tests/get-mb-cur-max.c
index 403beb4..6e92796 100644
--- a/tests/get-mb-cur-max.c
+++ b/tests/get-mb-cur-max.c
@@ -21,12 +21,11 @@
#include <stdio.h>
#include <stdlib.h>
-#include "progname.h"
+#include "getprogname.h"
int
main (int argc, char **argv)
{
- set_program_name (argv[0]);
if (1 < argc && setlocale (LC_ALL, argv[1]))
{
printf ("%d\n", (int) MB_CUR_MAX);
-----------------------------------------------------------------------
Summary of changes:
bootstrap.conf | 2 +-
gnulib | 2 +-
src/grep.c | 14 ++++++--------
tests/dfa-match-aux.c | 3 +--
tests/get-mb-cur-max.c | 3 +--
5 files changed, 10 insertions(+), 14 deletions(-)
hooks/post-receive
--
grep
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grep branch, master, updated. v2.25-84-g6c96214,
Jim Meyering <=