grep-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grep branch, master, updated. v2.6.2-22-gcb3fb19


From: Jim Meyering
Subject: grep branch, master, updated. v2.6.2-22-gcb3fb19
Date: Thu, 01 Apr 2010 10:22:39 +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  cb3fb19a4bf5e07cc0813e1fca7ae20e51e90206 (commit)
       via  f4d75a8bf63eb2f3b884768e0fefd3f4dd08107b (commit)
       via  32d5db19e87a3a52fe67e028d828c136b659660b (commit)
      from  de88933b28523882e38ca5332791cb55d85ce9ee (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=cb3fb19a4bf5e07cc0813e1fca7ae20e51e90206


commit cb3fb19a4bf5e07cc0813e1fca7ae20e51e90206
Author: Jim Meyering <address@hidden>
Date:   Thu Apr 1 12:17:09 2010 +0200

    tests: remove all unportable uses of echo
    
    * src/main.c: Use printf rather than echo -ne in a comment.
    * tests/fedora: Use printf (not echo) also in ok/fail functions.
    * cfg.mk (sc_prohibit_echo_minus_en): New rule, to prohibit
    any future introduction.

diff --git a/cfg.mk b/cfg.mk
index 5e4a890..a392797 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -42,6 +42,11 @@ sc_prohibit_jm_in_m4:
            { echo '$(ME): do not use jm_ in m4 macro names'            \
              1>&2; exit 1; } || :
 
+sc_prohibit_echo_minus_en:
+       @re='\<echo -[en]'                                              \
+       msg='do not use echo ''-e or echo ''-n; use printf instead'     \
+         $(_prohibit_regexp)
+
 update-copyright-env = \
   UPDATE_COPYRIGHT_USE_INTERVALS=1 \
   UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79
diff --git a/src/main.c b/src/main.c
index 8c9e776..0bb4098 100644
--- a/src/main.c
+++ b/src/main.c
@@ -158,7 +158,7 @@ static const char *context_line_color  = "";        /* 
default color pair */
            of 1 ("\33[I"), i.e., it performs pure movement to the next
            tab stop, without any clearing of either content or screen
            attributes (including background color); try
-              echo -ne 'asdfqwerzxcv\rASDF\tZXCV\n'
+              printf 'asdfqwerzxcv\rASDF\tZXCV\n'
            in a bash(1) shell to demonstrate this.  This is not what the
            user would instinctively expect of HT (but is ok for CHT).
            The instinctive behavior would include clearing the terminal
diff --git a/tests/fedora b/tests/fedora
index 20c0dc1..336d913 100644
--- a/tests/fedora
+++ b/tests/fedora
@@ -15,8 +15,8 @@ then
        D='\033[0m'
 fi
 
-ok ()  { echo -e "${G}OK${D}"; }
-fail () { echo -e "${R}FAIL${D} (See ${U})"; failures=1; }
+ok ()  { printf "${G}OK${D}"; }
+fail () { printf "${R}FAIL${D} (See ${U})"; failures=1; }
 
 U=https://bugzilla.redhat.com/show_bug.cgi?id=116909
 printf "fgrep false negatives: "

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=f4d75a8bf63eb2f3b884768e0fefd3f4dd08107b


commit cb3fb19a4bf5e07cc0813e1fca7ae20e51e90206
Author: Jim Meyering <address@hidden>
Date:   Thu Apr 1 12:17:09 2010 +0200

    tests: remove all unportable uses of echo
    
    * src/main.c: Use printf rather than echo -ne in a comment.
    * tests/fedora: Use printf (not echo) also in ok/fail functions.
    * cfg.mk (sc_prohibit_echo_minus_en): New rule, to prohibit
    any future introduction.

diff --git a/cfg.mk b/cfg.mk
index 5e4a890..a392797 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -42,6 +42,11 @@ sc_prohibit_jm_in_m4:
            { echo '$(ME): do not use jm_ in m4 macro names'            \
              1>&2; exit 1; } || :
 
+sc_prohibit_echo_minus_en:
+       @re='\<echo -[en]'                                              \
+       msg='do not use echo ''-e or echo ''-n; use printf instead'     \
+         $(_prohibit_regexp)
+
 update-copyright-env = \
   UPDATE_COPYRIGHT_USE_INTERVALS=1 \
   UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79
diff --git a/src/main.c b/src/main.c
index 8c9e776..0bb4098 100644
--- a/src/main.c
+++ b/src/main.c
@@ -158,7 +158,7 @@ static const char *context_line_color  = "";        /* 
default color pair */
            of 1 ("\33[I"), i.e., it performs pure movement to the next
            tab stop, without any clearing of either content or screen
            attributes (including background color); try
-              echo -ne 'asdfqwerzxcv\rASDF\tZXCV\n'
+              printf 'asdfqwerzxcv\rASDF\tZXCV\n'
            in a bash(1) shell to demonstrate this.  This is not what the
            user would instinctively expect of HT (but is ok for CHT).
            The instinctive behavior would include clearing the terminal
diff --git a/tests/fedora b/tests/fedora
index 20c0dc1..336d913 100644
--- a/tests/fedora
+++ b/tests/fedora
@@ -15,8 +15,8 @@ then
        D='\033[0m'
 fi
 
-ok ()  { echo -e "${G}OK${D}"; }
-fail () { echo -e "${R}FAIL${D} (See ${U})"; failures=1; }
+ok ()  { printf "${G}OK${D}"; }
+fail () { printf "${R}FAIL${D} (See ${U})"; failures=1; }
 
 U=https://bugzilla.redhat.com/show_bug.cgi?id=116909
 printf "fgrep false negatives: "

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=32d5db19e87a3a52fe67e028d828c136b659660b


commit cb3fb19a4bf5e07cc0813e1fca7ae20e51e90206
Author: Jim Meyering <address@hidden>
Date:   Thu Apr 1 12:17:09 2010 +0200

    tests: remove all unportable uses of echo
    
    * src/main.c: Use printf rather than echo -ne in a comment.
    * tests/fedora: Use printf (not echo) also in ok/fail functions.
    * cfg.mk (sc_prohibit_echo_minus_en): New rule, to prohibit
    any future introduction.

diff --git a/cfg.mk b/cfg.mk
index 5e4a890..a392797 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -42,6 +42,11 @@ sc_prohibit_jm_in_m4:
            { echo '$(ME): do not use jm_ in m4 macro names'            \
              1>&2; exit 1; } || :
 
+sc_prohibit_echo_minus_en:
+       @re='\<echo -[en]'                                              \
+       msg='do not use echo ''-e or echo ''-n; use printf instead'     \
+         $(_prohibit_regexp)
+
 update-copyright-env = \
   UPDATE_COPYRIGHT_USE_INTERVALS=1 \
   UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79
diff --git a/src/main.c b/src/main.c
index 8c9e776..0bb4098 100644
--- a/src/main.c
+++ b/src/main.c
@@ -158,7 +158,7 @@ static const char *context_line_color  = "";        /* 
default color pair */
            of 1 ("\33[I"), i.e., it performs pure movement to the next
            tab stop, without any clearing of either content or screen
            attributes (including background color); try
-              echo -ne 'asdfqwerzxcv\rASDF\tZXCV\n'
+              printf 'asdfqwerzxcv\rASDF\tZXCV\n'
            in a bash(1) shell to demonstrate this.  This is not what the
            user would instinctively expect of HT (but is ok for CHT).
            The instinctive behavior would include clearing the terminal
diff --git a/tests/fedora b/tests/fedora
index 20c0dc1..336d913 100644
--- a/tests/fedora
+++ b/tests/fedora
@@ -15,8 +15,8 @@ then
        D='\033[0m'
 fi
 
-ok ()  { echo -e "${G}OK${D}"; }
-fail () { echo -e "${R}FAIL${D} (See ${U})"; failures=1; }
+ok ()  { printf "${G}OK${D}"; }
+fail () { printf "${R}FAIL${D} (See ${U})"; failures=1; }
 
 U=https://bugzilla.redhat.com/show_bug.cgi?id=116909
 printf "fgrep false negatives: "

-----------------------------------------------------------------------

Summary of changes:
 THANKS                     |    3 ++-
 cfg.mk                     |    5 +++++
 src/main.c                 |    2 +-
 tests/char-class-multibyte |    7 ++-----
 tests/fedora               |    4 ++--
 tests/fgrep-infloop        |    1 +
 tests/init.cfg             |   11 +++++++++++
 tests/prefix-of-multibyte  |    2 ++
 8 files changed, 26 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
grep




reply via email to

[Prev in Thread] Current Thread [Next in Thread]