[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep branch, master, updated. v2.26-28-g575bdb1
From: |
Paul Eggert |
Subject: |
grep branch, master, updated. v2.26-28-g575bdb1 |
Date: |
Sat, 19 Nov 2016 10:51:03 +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 575bdb1bc65d0aa73df127ec1bf70ab6ec3db174 (commit)
via 928af46ede5d5bd3b564466042531d57b0e506bf (commit)
via a99b612d1a2ce392a7ca6c59724013a965e81e04 (commit)
from 16c0d20ba4923c496ef4e499319b6d18ca81711a (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=575bdb1bc65d0aa73df127ec1bf70ab6ec3db174
commit 575bdb1bc65d0aa73df127ec1bf70ab6ec3db174
Author: Paul Eggert <address@hidden>
Date: Sat Nov 19 02:49:15 2016 -0800
grep: simplify by using PRIuMAX
* configure.ac (HAVE_PRINTF_C99_SIZES): Remove; no longer needed.
* src/grep.c (print_offset): Simplify (Bug#24451).
diff --git a/configure.ac b/configure.ac
index 0dd4d84..8a20317 100644
--- a/configure.ac
+++ b/configure.ac
@@ -206,12 +206,6 @@ fi
gl_FUNC_PCRE
-gl_PRINTF_SIZES_C99
-if test "$gl_cv_func_printf_sizes_c99" = yes; then
- AC_DEFINE([HAVE_PRINTF_C99_SIZES], [1],
- [Define to 1 if printf formats %j, %z, %t and %L work.])
-fi
-
case $host_os in
mingw*) suffix=w32 ;;
*) suffix=posix ;;
diff --git a/src/grep.c b/src/grep.c
index 62866cb..f120bcf 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -1084,32 +1084,8 @@ print_sep (char sep)
static void
print_offset (uintmax_t pos, const char *color)
{
-#if !HAVE_PRINTF_C99_SIZES
- /* Do not rely on printf to print pos, since uintmax_t may be longer
- than long, and long long is not portable. */
-
- int min_width = offset_width;
- char buf[sizeof pos * CHAR_BIT];
- char *p = buf + sizeof buf;
-
- do
- {
- *--p = '0' + pos % 10;
- --min_width;
- }
- while ((pos /= 10) != 0);
-
- /* Do this to maximize the probability of alignment across lines. */
- while (--min_width >= 0)
- *--p = ' ';
-#endif /* !HAVE_PRINTF_C99_SIZES */
-
pr_sgr_start_if (color);
-#if HAVE_PRINTF_C99_SIZES
- printf_errno ("%*ju", offset_width, pos);
-#else
- fwrite_errno (p, 1, buf + sizeof buf - p);
-#endif
+ printf_errno ("%*"PRIuMAX, offset_width, pos);
pr_sgr_end_if (color);
}
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=928af46ede5d5bd3b564466042531d57b0e506bf
commit 575bdb1bc65d0aa73df127ec1bf70ab6ec3db174
Author: Paul Eggert <address@hidden>
Date: Sat Nov 19 02:49:15 2016 -0800
grep: simplify by using PRIuMAX
* configure.ac (HAVE_PRINTF_C99_SIZES): Remove; no longer needed.
* src/grep.c (print_offset): Simplify (Bug#24451).
diff --git a/configure.ac b/configure.ac
index 0dd4d84..8a20317 100644
--- a/configure.ac
+++ b/configure.ac
@@ -206,12 +206,6 @@ fi
gl_FUNC_PCRE
-gl_PRINTF_SIZES_C99
-if test "$gl_cv_func_printf_sizes_c99" = yes; then
- AC_DEFINE([HAVE_PRINTF_C99_SIZES], [1],
- [Define to 1 if printf formats %j, %z, %t and %L work.])
-fi
-
case $host_os in
mingw*) suffix=w32 ;;
*) suffix=posix ;;
diff --git a/src/grep.c b/src/grep.c
index 62866cb..f120bcf 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -1084,32 +1084,8 @@ print_sep (char sep)
static void
print_offset (uintmax_t pos, const char *color)
{
-#if !HAVE_PRINTF_C99_SIZES
- /* Do not rely on printf to print pos, since uintmax_t may be longer
- than long, and long long is not portable. */
-
- int min_width = offset_width;
- char buf[sizeof pos * CHAR_BIT];
- char *p = buf + sizeof buf;
-
- do
- {
- *--p = '0' + pos % 10;
- --min_width;
- }
- while ((pos /= 10) != 0);
-
- /* Do this to maximize the probability of alignment across lines. */
- while (--min_width >= 0)
- *--p = ' ';
-#endif /* !HAVE_PRINTF_C99_SIZES */
-
pr_sgr_start_if (color);
-#if HAVE_PRINTF_C99_SIZES
- printf_errno ("%*ju", offset_width, pos);
-#else
- fwrite_errno (p, 1, buf + sizeof buf - p);
-#endif
+ printf_errno ("%*"PRIuMAX, offset_width, pos);
pr_sgr_end_if (color);
}
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=a99b612d1a2ce392a7ca6c59724013a965e81e04
commit 575bdb1bc65d0aa73df127ec1bf70ab6ec3db174
Author: Paul Eggert <address@hidden>
Date: Sat Nov 19 02:49:15 2016 -0800
grep: simplify by using PRIuMAX
* configure.ac (HAVE_PRINTF_C99_SIZES): Remove; no longer needed.
* src/grep.c (print_offset): Simplify (Bug#24451).
diff --git a/configure.ac b/configure.ac
index 0dd4d84..8a20317 100644
--- a/configure.ac
+++ b/configure.ac
@@ -206,12 +206,6 @@ fi
gl_FUNC_PCRE
-gl_PRINTF_SIZES_C99
-if test "$gl_cv_func_printf_sizes_c99" = yes; then
- AC_DEFINE([HAVE_PRINTF_C99_SIZES], [1],
- [Define to 1 if printf formats %j, %z, %t and %L work.])
-fi
-
case $host_os in
mingw*) suffix=w32 ;;
*) suffix=posix ;;
diff --git a/src/grep.c b/src/grep.c
index 62866cb..f120bcf 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -1084,32 +1084,8 @@ print_sep (char sep)
static void
print_offset (uintmax_t pos, const char *color)
{
-#if !HAVE_PRINTF_C99_SIZES
- /* Do not rely on printf to print pos, since uintmax_t may be longer
- than long, and long long is not portable. */
-
- int min_width = offset_width;
- char buf[sizeof pos * CHAR_BIT];
- char *p = buf + sizeof buf;
-
- do
- {
- *--p = '0' + pos % 10;
- --min_width;
- }
- while ((pos /= 10) != 0);
-
- /* Do this to maximize the probability of alignment across lines. */
- while (--min_width >= 0)
- *--p = ' ';
-#endif /* !HAVE_PRINTF_C99_SIZES */
-
pr_sgr_start_if (color);
-#if HAVE_PRINTF_C99_SIZES
- printf_errno ("%*ju", offset_width, pos);
-#else
- fwrite_errno (p, 1, buf + sizeof buf - p);
-#endif
+ printf_errno ("%*"PRIuMAX, offset_width, pos);
pr_sgr_end_if (color);
}
-----------------------------------------------------------------------
Summary of changes:
NEWS | 8 ++++
configure.ac | 6 ---
doc/grep.texi | 6 +--
src/grep.c | 71 +++++++++++----------------------
tests/Makefile.am | 1 +
tests/{unibyte-binary => initial-tab} | 21 ++++++----
6 files changed, 47 insertions(+), 66 deletions(-)
copy tests/{unibyte-binary => initial-tab} (64%)
hooks/post-receive
--
grep
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grep branch, master, updated. v2.26-28-g575bdb1,
Paul Eggert <=