[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep branch, master, updated. v2.10-33-g4919250
From: |
Paul Eggert |
Subject: |
grep branch, master, updated. v2.10-33-g4919250 |
Date: |
Sun, 01 Jan 2012 03:40:25 +0000 |
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 491925040894701c72c9f7d34bea68f3f1865a3a (commit)
via 4f61a0530c565bed2e8d0cf74ac9fd4322313093 (commit)
from ca0d4f3bae56c486ec1d49d72c9ed6924236babc (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=491925040894701c72c9f7d34bea68f3f1865a3a
commit 491925040894701c72c9f7d34bea68f3f1865a3a
Author: Paul Eggert <address@hidden>
Date: Sat Dec 31 19:38:45 2011 -0800
grep: lower-case function names
These names used to be macros, but they're functions now.
All callers changed.
* src/main.c (pr_sgr_start): Rename from PR_SGR_START.
(pr_sgr_end): Rename from PR_SGR_END.
(pr_sgr_start_if): Rename from PR_SGR_START_IF.
(pr_sgr_end_if): Rename from PR_SGR_END_IF.
diff --git a/src/main.c b/src/main.c
index 8e4142a..f0a8085 100644
--- a/src/main.c
+++ b/src/main.c
@@ -214,28 +214,28 @@ static const char *sgr_end = "\33[m\33[K";
/* SGR utility functions. */
static void
-PR_SGR_START (char const *s)
+pr_sgr_start (char const *s)
{
if (*s)
print_start_colorize (sgr_start, s);
}
static void
-PR_SGR_END (char const *s)
+pr_sgr_end (char const *s)
{
if (*s)
print_end_colorize (sgr_end);
}
static void
-PR_SGR_START_IF (char const *s)
+pr_sgr_start_if (char const *s)
{
if (color_option)
- PR_SGR_START (s);
+ pr_sgr_start (s);
}
static void
-PR_SGR_END_IF (char const *s)
+pr_sgr_end_if (char const *s)
{
if (color_option)
- PR_SGR_END (s);
+ pr_sgr_end (s);
}
struct color_cap
@@ -663,18 +663,18 @@ nlscan (char const *lim)
static void
print_filename (void)
{
- PR_SGR_START_IF (filename_color);
+ pr_sgr_start_if (filename_color);
fputs (filename, stdout);
- PR_SGR_END_IF (filename_color);
+ pr_sgr_end_if (filename_color);
}
/* Print a character separator. */
static void
print_sep (char sep)
{
- PR_SGR_START_IF (sep_color);
+ pr_sgr_start_if (sep_color);
fputc (sep, stdout);
- PR_SGR_END_IF (sep_color);
+ pr_sgr_end_if (sep_color);
}
/* Print a line number or a byte offset. */
@@ -699,9 +699,9 @@ print_offset (uintmax_t pos, int min_width, const char
*color)
while (--min_width >= 0)
*--p = ' ';
- PR_SGR_START_IF (color);
+ pr_sgr_start_if (color);
fwrite (p, 1, buf + sizeof buf - p, stdout);
- PR_SGR_END_IF (color);
+ pr_sgr_end_if (color);
}
/* Print a whole line head (filename, line, byte). */
@@ -795,7 +795,7 @@ print_line_middle (const char *beg, const char *lim,
: SEP_CHAR_SELECTED));
else
{
- PR_SGR_START (line_color);
+ pr_sgr_start (line_color);
if (mid)
{
cur = mid;
@@ -804,9 +804,9 @@ print_line_middle (const char *beg, const char *lim,
fwrite (cur, sizeof (char), b - cur, stdout);
}
- PR_SGR_START_IF (match_color);
+ pr_sgr_start_if (match_color);
fwrite (b, sizeof (char), match_size, stdout);
- PR_SGR_END_IF (match_color);
+ pr_sgr_end_if (match_color);
if (only_matching)
fputs ("\n", stdout);
}
@@ -833,10 +833,10 @@ print_line_tail (const char *beg, const char *lim, const
char *line_color)
if (tail_size > 0)
{
- PR_SGR_START (line_color);
+ pr_sgr_start (line_color);
fwrite (beg, 1, tail_size, stdout);
beg += tail_size;
- PR_SGR_END (line_color);
+ pr_sgr_end (line_color);
}
return beg;
@@ -941,9 +941,9 @@ prtext (char const *beg, char const *lim, int *nlinesp)
discontiguous from the last output in the file. */
if ((out_before || out_after) && used && p != lastout && group_separator)
{
- PR_SGR_START_IF (sep_color);
+ pr_sgr_start_if (sep_color);
fputs (group_separator, stdout);
- PR_SGR_END_IF (sep_color);
+ pr_sgr_end_if (sep_color);
fputc ('\n', stdout);
}
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=4f61a0530c565bed2e8d0cf74ac9fd4322313093
commit 491925040894701c72c9f7d34bea68f3f1865a3a
Author: Paul Eggert <address@hidden>
Date: Sat Dec 31 19:38:45 2011 -0800
grep: lower-case function names
These names used to be macros, but they're functions now.
All callers changed.
* src/main.c (pr_sgr_start): Rename from PR_SGR_START.
(pr_sgr_end): Rename from PR_SGR_END.
(pr_sgr_start_if): Rename from PR_SGR_START_IF.
(pr_sgr_end_if): Rename from PR_SGR_END_IF.
diff --git a/src/main.c b/src/main.c
index 8e4142a..f0a8085 100644
--- a/src/main.c
+++ b/src/main.c
@@ -214,28 +214,28 @@ static const char *sgr_end = "\33[m\33[K";
/* SGR utility functions. */
static void
-PR_SGR_START (char const *s)
+pr_sgr_start (char const *s)
{
if (*s)
print_start_colorize (sgr_start, s);
}
static void
-PR_SGR_END (char const *s)
+pr_sgr_end (char const *s)
{
if (*s)
print_end_colorize (sgr_end);
}
static void
-PR_SGR_START_IF (char const *s)
+pr_sgr_start_if (char const *s)
{
if (color_option)
- PR_SGR_START (s);
+ pr_sgr_start (s);
}
static void
-PR_SGR_END_IF (char const *s)
+pr_sgr_end_if (char const *s)
{
if (color_option)
- PR_SGR_END (s);
+ pr_sgr_end (s);
}
struct color_cap
@@ -663,18 +663,18 @@ nlscan (char const *lim)
static void
print_filename (void)
{
- PR_SGR_START_IF (filename_color);
+ pr_sgr_start_if (filename_color);
fputs (filename, stdout);
- PR_SGR_END_IF (filename_color);
+ pr_sgr_end_if (filename_color);
}
/* Print a character separator. */
static void
print_sep (char sep)
{
- PR_SGR_START_IF (sep_color);
+ pr_sgr_start_if (sep_color);
fputc (sep, stdout);
- PR_SGR_END_IF (sep_color);
+ pr_sgr_end_if (sep_color);
}
/* Print a line number or a byte offset. */
@@ -699,9 +699,9 @@ print_offset (uintmax_t pos, int min_width, const char
*color)
while (--min_width >= 0)
*--p = ' ';
- PR_SGR_START_IF (color);
+ pr_sgr_start_if (color);
fwrite (p, 1, buf + sizeof buf - p, stdout);
- PR_SGR_END_IF (color);
+ pr_sgr_end_if (color);
}
/* Print a whole line head (filename, line, byte). */
@@ -795,7 +795,7 @@ print_line_middle (const char *beg, const char *lim,
: SEP_CHAR_SELECTED));
else
{
- PR_SGR_START (line_color);
+ pr_sgr_start (line_color);
if (mid)
{
cur = mid;
@@ -804,9 +804,9 @@ print_line_middle (const char *beg, const char *lim,
fwrite (cur, sizeof (char), b - cur, stdout);
}
- PR_SGR_START_IF (match_color);
+ pr_sgr_start_if (match_color);
fwrite (b, sizeof (char), match_size, stdout);
- PR_SGR_END_IF (match_color);
+ pr_sgr_end_if (match_color);
if (only_matching)
fputs ("\n", stdout);
}
@@ -833,10 +833,10 @@ print_line_tail (const char *beg, const char *lim, const
char *line_color)
if (tail_size > 0)
{
- PR_SGR_START (line_color);
+ pr_sgr_start (line_color);
fwrite (beg, 1, tail_size, stdout);
beg += tail_size;
- PR_SGR_END (line_color);
+ pr_sgr_end (line_color);
}
return beg;
@@ -941,9 +941,9 @@ prtext (char const *beg, char const *lim, int *nlinesp)
discontiguous from the last output in the file. */
if ((out_before || out_after) && used && p != lastout && group_separator)
{
- PR_SGR_START_IF (sep_color);
+ pr_sgr_start_if (sep_color);
fputs (group_separator, stdout);
- PR_SGR_END_IF (sep_color);
+ pr_sgr_end_if (sep_color);
fputc ('\n', stdout);
}
-----------------------------------------------------------------------
Summary of changes:
cfg.mk | 3 +
configure.ac | 6 +
lib/Makefile.am | 4 +-
tests/get-mb-cur-max.c => lib/colorize-impl.c | 28 ++--
lib/colorize.c | 1 +
tests/get-mb-cur-max.c => lib/colorize.h | 30 ++--
lib/ms/colorize-impl.c | 216 +++++++++++++++++++
lib/ms/colorize.h | 4 +
src/Makefile.am | 1 +
src/main.c | 278 ++++---------------------
10 files changed, 304 insertions(+), 267 deletions(-)
copy tests/get-mb-cur-max.c => lib/colorize-impl.c (67%)
create mode 100644 lib/colorize.c
copy tests/get-mb-cur-max.c => lib/colorize.h (57%)
create mode 100644 lib/ms/colorize-impl.c
create mode 100644 lib/ms/colorize.h
hooks/post-receive
--
grep
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grep branch, master, updated. v2.10-33-g4919250,
Paul Eggert <=