From MAILER-DAEMON Sun Feb 05 11:28:33 2012 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Ru4x7-0002o7-CZ for mharc-grep-commit@gnu.org; Sun, 05 Feb 2012 11:28:33 -0500 Received: from eggs.gnu.org ([140.186.70.92]:46666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru4x5-0002o1-Jh for grep-commit@gnu.org; Sun, 05 Feb 2012 11:28:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ru4x4-0002LY-CS for grep-commit@gnu.org; Sun, 05 Feb 2012 11:28:31 -0500 Received: from vcs.savannah.gnu.org ([140.186.70.72]:37167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru4x4-0002LU-9d for grep-commit@gnu.org; Sun, 05 Feb 2012 11:28:30 -0500 Received: from bonzini by vcs.savannah.gnu.org with local (Exim 4.72) (envelope-from ) id 1Ru4x3-0004uD-S8 for grep-commit@gnu.org; Sun, 05 Feb 2012 16:28:30 +0000 Date: Sun, 05 Feb 2012 16:28:30 +0000 Message-Id: To: grep-commit@gnu.org Subject: grep branch, master, updated. v2.10-67-gba63674 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 75b74e442f993c03e6af8b9e2e74cd657e6cce14 X-Git-Newrev: ba63674a816d93ee4a69d0c78a34a7d9b391d33b From: Paolo Bonzini X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.72 X-BeenThere: grep-commit@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: bug-grep@gnu.org List-Id: CVS commit notices for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Feb 2012 16:28:32 -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 ba63674a816d93ee4a69d0c78a34a7d9b391d33b (commit) from 75b74e442f993c03e6af8b9e2e74cd657e6cce14 (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=ba63674a816d93ee4a69d0c78a34a7d9b391d33b commit ba63674a816d93ee4a69d0c78a34a7d9b391d33b Author: Paolo Bonzini Date: Tue Jan 3 11:22:09 2012 +0100 dfa: remove useless check * src/dfa.c (state_index): There is nothing that is a newline *and* a letter. Remove redundant call to SUCCEEDS_IN_CONTEXT. diff --git a/src/dfa.c b/src/dfa.c index 6ab0ab4..ac3fb18 100644 --- a/src/dfa.c +++ b/src/dfa.c @@ -1964,8 +1964,7 @@ state_index (struct dfa *d, position_set const *s, int newline, int letter) constraint = s->elems[j].constraint; if (SUCCEEDS_IN_CONTEXT(constraint, newline, 0, letter, 0) || SUCCEEDS_IN_CONTEXT(constraint, newline, 0, letter, 1) - || SUCCEEDS_IN_CONTEXT(constraint, newline, 1, letter, 0) - || SUCCEEDS_IN_CONTEXT(constraint, newline, 1, letter, 1)) + || SUCCEEDS_IN_CONTEXT(constraint, newline, 1, letter, 0)) d->states[i].constraint |= constraint; if (! d->states[i].first_end) d->states[i].first_end = d->tokens[s->elems[j].index]; ----------------------------------------------------------------------- Summary of changes: src/dfa.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) hooks/post-receive -- grep From MAILER-DAEMON Sun Feb 05 11:35:36 2012 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Ru53w-0004Fo-1B for mharc-grep-commit@gnu.org; Sun, 05 Feb 2012 11:35:36 -0500 Received: from eggs.gnu.org ([140.186.70.92]:53101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru53t-0004Fe-Qr for grep-commit@gnu.org; Sun, 05 Feb 2012 11:35:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ru53s-0003u7-9y for grep-commit@gnu.org; Sun, 05 Feb 2012 11:35:33 -0500 Received: from vcs.savannah.gnu.org ([140.186.70.72]:42210) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru53s-0003u1-6w for grep-commit@gnu.org; Sun, 05 Feb 2012 11:35:32 -0500 Received: from bonzini by vcs.savannah.gnu.org with local (Exim 4.72) (envelope-from ) id 1Ru53s-0006Ra-3C for grep-commit@gnu.org; Sun, 05 Feb 2012 16:35:32 +0000 Date: Sun, 05 Feb 2012 16:35:32 +0000 Message-Id: To: grep-commit@gnu.org Subject: grep branch, master, updated. v2.10-68-g8b47c4c X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: ba63674a816d93ee4a69d0c78a34a7d9b391d33b X-Git-Newrev: 8b47c4cf6556933f59226c234b0fe984f6c77dc7 From: Paolo Bonzini X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.72 X-BeenThere: grep-commit@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: bug-grep@gnu.org List-Id: CVS commit notices for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Feb 2012 16:35:35 -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 8b47c4cf6556933f59226c234b0fe984f6c77dc7 (commit) from ba63674a816d93ee4a69d0c78a34a7d9b391d33b (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=8b47c4cf6556933f59226c234b0fe984f6c77dc7 commit 8b47c4cf6556933f59226c234b0fe984f6c77dc7 Author: Paolo Bonzini Date: Tue Jan 3 11:22:09 2012 +0100 dfa: introduce contexts for the values in d->success Also initialize all tables in a single place in dfasyntax. * src/dfa.c (CTX_NONE, CTX_LETTER, CTX_NEWLINE, char_context): New. (sbit, letters, newline): New. (dfasyntax): Fill them. (dfastate): Remove letters, newline, initialized. (build_state): Use CTX_* constants. (dfaexec): Remove sbit and sbit_init. diff --git a/src/dfa.c b/src/dfa.c index ac3fb18..53307ae 100644 --- a/src/dfa.c +++ b/src/dfa.c @@ -91,6 +91,13 @@ typedef int charclass[CHARCLASS_INTS]; errors that the cast doesn't. */ static inline unsigned char to_uchar (char ch) { return ch; } +/* Contexts tell us whether a character is a newline or a word constituent. + Word-constituent characters are those that satisfy iswalnum(), plus '_'. */ + +#define CTX_NONE 1 +#define CTX_LETTER 2 +#define CTX_NEWLINE 4 + /* Sometimes characters can only be matched depending on the surrounding context. Such context decisions depend on what the previous character was, and the value of the current (lookahead) character. Context @@ -107,8 +114,6 @@ static inline unsigned char to_uchar (char ch) { return ch; } bit 1 - previous wasn't word-constituent, current is bit 0 - neither previous nor current is word-constituent - Word-constituent characters are those that satisfy isalnum(). - The macro SUCCEEDS_IN_CONTEXT determines whether a given constraint succeeds in a particular context. Prevn is true if the previous character was a newline, currn is true if the lookahead character is a newline. @@ -553,14 +558,62 @@ static int case_fold; /* End-of-line byte in data. */ static unsigned char eolbyte; +/* Cache of char-context values. */ +static int sbit[NOTCHAR]; + +/* Set of characters considered letters. */ +static charclass letters; + +/* Set of characters that are newline. */ +static charclass newline; + +/* Add this to the test for whether a byte is word-constituent, since on + BSD-based systems, many values in the 128..255 range are classified as + alphabetic, while on glibc-based systems, they are not. */ +#ifdef __GLIBC__ +# define is_valid_unibyte_character(c) 1 +#else +# define is_valid_unibyte_character(c) (! (MBS_SUPPORT && btowc (c) == WEOF)) +#endif + +/* Return non-zero if C is a 'word-constituent' byte; zero otherwise. */ +#define IS_WORD_CONSTITUENT(C) \ + (is_valid_unibyte_character (C) && (isalnum (C) || (C) == '_')) + +static int +char_context (unsigned char c) +{ + if (c == eolbyte || c == 0) + return CTX_NEWLINE; + if (IS_WORD_CONSTITUENT (c)) + return CTX_LETTER; + return CTX_NONE; +} + /* Entry point to set syntax options. */ void dfasyntax (reg_syntax_t bits, int fold, unsigned char eol) { + unsigned int i; + syntax_bits_set = 1; syntax_bits = bits; case_fold = fold; eolbyte = eol; + + for (i = 0; i < NOTCHAR; ++i) + { + sbit[i] = char_context (i); + switch (sbit[i]) + { + case CTX_LETTER: + setbit (i, letters); + break; + case CTX_NEWLINE: + setbit (i, newline); + break; + } + } } /* Set a bit in the charclass for the given wchar_t. Do nothing if WC @@ -1073,19 +1126,6 @@ parse_bracket_exp (void) return CSET + charclass_index(ccl); } -/* Add this to the test for whether a byte is word-constituent, since on - BSD-based systems, many values in the 128..255 range are classified as - alphabetic, while on glibc-based systems, they are not. */ -#ifdef __GLIBC__ -# define is_valid_unibyte_character(c) 1 -#else -# define is_valid_unibyte_character(c) (! (MBS_SUPPORT && btowc (c) == WEOF)) -#endif - -/* Return non-zero if C is a `word-constituent' byte; zero otherwise. */ -#define IS_WORD_CONSTITUENT(C) \ - (is_valid_unibyte_character(C) && (isalnum(C) || (C) == '_')) - static token lex (void) { @@ -2362,8 +2402,6 @@ dfastate (int s, struct dfa *d, int trans[]) int intersectf; /* True if intersect is nonempty. */ charclass leftovers; /* Stuff in the label that didn't match. */ int leftoversf; /* True if leftovers is nonempty. */ - static charclass letters; /* Set of characters considered letters. */ - static charclass newline; /* Set of characters that are newline. */ position_set follows; /* Union of the follows of some group. */ position_set tmp; /* Temporary space for merging sets. */ int state; /* New state. */ @@ -2371,23 +2409,12 @@ dfastate (int s, struct dfa *d, int trans[]) int state_newline; /* New state on a newline transition. */ int wants_letter; /* New state wants to know letter context. */ int state_letter; /* New state on a letter transition. */ - static int initialized; /* Flag for static initialization. */ int next_isnt_1st_byte = 0; /* Flag if we can't add state0. */ int i, j, k; MALLOC (grps, NOTCHAR); MALLOC (labels, NOTCHAR); - /* Initialize the set of letters, if necessary. */ - if (! initialized) - { - initialized = 1; - for (i = 0; i < NOTCHAR; ++i) - if (IS_WORD_CONSTITUENT(i)) - setbit(i, letters); - setbit(eolbyte, newline); - } - zeroset(matches); for (i = 0; i < d->states[s].elems.nelem; ++i) @@ -2672,13 +2699,13 @@ build_state (int s, struct dfa *d) d->success[s] = 0; if (ACCEPTS_IN_CONTEXT(d->states[s].newline, 1, d->states[s].letter, 0, s, *d)) - d->success[s] |= 4; + d->success[s] |= CTX_NEWLINE; if (ACCEPTS_IN_CONTEXT(d->states[s].newline, 0, d->states[s].letter, 1, s, *d)) - d->success[s] |= 2; + d->success[s] |= CTX_LETTER; if (ACCEPTS_IN_CONTEXT(d->states[s].newline, 0, d->states[s].letter, 0, s, *d)) - d->success[s] |= 1; + d->success[s] |= CTX_NONE; MALLOC(trans, NOTCHAR); dfastate(s, d, trans); @@ -3226,18 +3253,6 @@ dfaexec (struct dfa *d, char const *begin, char *end, into a register. */ unsigned char eol = eolbyte; /* Likewise for eolbyte. */ unsigned char saved_end; - static int sbit[NOTCHAR]; /* Table for anding with d->success. */ - static int sbit_init; - - if (! sbit_init) - { - unsigned int i; - - sbit_init = 1; - for (i = 0; i < NOTCHAR; ++i) - sbit[i] = (IS_WORD_CONSTITUENT(i)) ? 2 : 1; - sbit[eol] = 4; - } if (! d->tralloc) build_state_zero(d); ----------------------------------------------------------------------- Summary of changes: src/dfa.c | 101 +++++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 58 insertions(+), 43 deletions(-) hooks/post-receive -- grep From MAILER-DAEMON Sun Feb 05 11:36:58 2012 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Ru55G-00059m-O8 for mharc-grep-commit@gnu.org; Sun, 05 Feb 2012 11:36:58 -0500 Received: from eggs.gnu.org ([140.186.70.92]:53293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru55D-00059Z-2p for grep-commit@gnu.org; Sun, 05 Feb 2012 11:36:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ru55A-00040U-Rd for grep-commit@gnu.org; Sun, 05 Feb 2012 11:36:55 -0500 Received: from vcs.savannah.gnu.org ([140.186.70.72]:42245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru55A-00040O-MV for grep-commit@gnu.org; Sun, 05 Feb 2012 11:36:52 -0500 Received: from bonzini by vcs.savannah.gnu.org with local (Exim 4.72) (envelope-from ) id 1Ru55A-0006vH-Ag for grep-commit@gnu.org; Sun, 05 Feb 2012 16:36:52 +0000 Date: Sun, 05 Feb 2012 16:36:52 +0000 Message-Id: To: grep-commit@gnu.org Subject: grep branch, master, updated. v2.10-69-g0828253 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 8b47c4cf6556933f59226c234b0fe984f6c77dc7 X-Git-Newrev: 082825355ffe94d6f5600ec96928ac5373307ad5 From: Paolo Bonzini X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.72 X-BeenThere: grep-commit@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: bug-grep@gnu.org List-Id: CVS commit notices for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Feb 2012 16:36:57 -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 082825355ffe94d6f5600ec96928ac5373307ad5 (commit) from 8b47c4cf6556933f59226c234b0fe984f6c77dc7 (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=082825355ffe94d6f5600ec96928ac5373307ad5 commit 082825355ffe94d6f5600ec96928ac5373307ad5 Author: Paolo Bonzini Date: Tue Jan 3 11:21:08 2012 +0100 dfa: change newline/letter to a single context value * src/dfa.c (MATCHES_NEWLINE_CONTEXT, MATCHES_LETTER_CONTEXT, SUCCEEDS_IN_CONTEXT, ACCEPTS_IN_CONTEXT): Take a single context value for prev and curr. (struct dfa_state): Replace newline and letter with context. (wchar_context): New. (state_index): Replace newline and letter with context. Compare context values in the state struct. Adjust calls to pass contexts. (wants_newline): Replace with wanted_context. Adjust calls to pass contexts. (dfastate): Replace wants_newline and wants_letter with wanted_context. Adjust calls to pass contexts. (build_state): Adjust calls to pass contexts. (match_anychar, match_mb_charset, transit_state): Use wchar_context. Adjust calls to pass contexts. diff --git a/src/dfa.c b/src/dfa.c index 53307ae..8302352 100644 --- a/src/dfa.c +++ b/src/dfa.c @@ -92,7 +92,12 @@ typedef int charclass[CHARCLASS_INTS]; static inline unsigned char to_uchar (char ch) { return ch; } /* Contexts tell us whether a character is a newline or a word constituent. - Word-constituent characters are those that satisfy iswalnum(), plus '_'. */ + Word-constituent characters are those that satisfy iswalnum(), plus '_'. + + A state also stores a context value, which is nonzero if its + predecessors always matches a newline or a word constituent. + The definition of a state's context is a bit unclear, but will be + modified soon anyway. */ #define CTX_NONE 1 #define CTX_LETTER 2 @@ -115,17 +120,18 @@ static inline unsigned char to_uchar (char ch) { return ch; } bit 0 - neither previous nor current is word-constituent The macro SUCCEEDS_IN_CONTEXT determines whether a given constraint - succeeds in a particular context. Prevn is true if the previous character - was a newline, currn is true if the lookahead character is a newline. - Prevl and currl similarly depend upon whether the previous and current - characters are word-constituent letters. */ -#define MATCHES_NEWLINE_CONTEXT(constraint, prevn, currn) \ - ((constraint) & 1 << (((prevn) ? 2 : 0) + ((currn) ? 1 : 0) + 4)) -#define MATCHES_LETTER_CONTEXT(constraint, prevl, currl) \ - ((constraint) & 1 << (((prevl) ? 2 : 0) + ((currl) ? 1 : 0))) -#define SUCCEEDS_IN_CONTEXT(constraint, prevn, currn, prevl, currl) \ - (MATCHES_NEWLINE_CONTEXT(constraint, prevn, currn) \ - && MATCHES_LETTER_CONTEXT(constraint, prevl, currl)) + succeeds in a particular context. Prev is the context value for + the previous character, curr is the context value for the lookahead + character. */ +#define MATCHES_NEWLINE_CONTEXT(constraint, prev, curr) \ + ((constraint) & \ + 1 << (((prev & CTX_NEWLINE) ? 2 : 0) + ((curr & CTX_NEWLINE) ? 1 : 0) + 4)) +#define MATCHES_LETTER_CONTEXT(constraint, prev, curr) \ + ((constraint) & \ + 1 << (((prev & CTX_LETTER) ? 2 : 0) + ((curr & CTX_LETTER) ? 1 : 0))) +#define SUCCEEDS_IN_CONTEXT(constraint, prev, curr) \ + (MATCHES_NEWLINE_CONTEXT(constraint, prev, curr) \ + && MATCHES_LETTER_CONTEXT(constraint, prev, curr)) /* The following macros give information about what a constraint depends on. */ #define PREV_NEWLINE_DEPENDENT(constraint) \ @@ -269,9 +275,8 @@ typedef struct { int hash; /* Hash of the positions of this state. */ position_set elems; /* Positions this state could match. */ - char newline; /* True if previous state matched newline. */ - char letter; /* True if previous state matched a letter. */ - char backref; /* True if this state matches a \. */ + unsigned char context; /* Context from previous state. */ + char backref; /* True if this state matches a \. */ unsigned char constraint; /* Constraint for this state to accept. */ int first_end; /* Token value of the first END in elems. */ position_set mbps; /* Positions which can match multibyte @@ -403,9 +408,8 @@ struct dfa /* ACCEPTS_IN_CONTEXT returns true if the given state accepts in the specified context. */ -#define ACCEPTS_IN_CONTEXT(prevn, currn, prevl, currl, state, dfa) \ - SUCCEEDS_IN_CONTEXT((dfa).states[state].constraint, \ - prevn, currn, prevl, currl) +#define ACCEPTS_IN_CONTEXT(prev, curr, state, dfa) \ + SUCCEEDS_IN_CONTEXT((dfa).states[state].constraint, prev, curr) static void dfamust (struct dfa *dfa); static void regexp (void); @@ -590,6 +594,16 @@ char_context (unsigned char c) return CTX_NONE; } +static int +wchar_context(wint_t wc) +{ + if (wc == (wchar_t)eolbyte || wc == 0) + return CTX_NEWLINE; + if (wc == L'_' || iswalnum (wc)) + return CTX_LETTER; + return CTX_NONE; +} + /* Entry point to set syntax options. */ void dfasyntax (reg_syntax_t bits, int fold, unsigned char eol) @@ -1953,18 +1967,15 @@ delete (position p, position_set *s) /* Find the index of the state corresponding to the given position set with the given preceding context, or create a new state if there is no such - state. Newline and letter tell whether we got here on a newline or - letter, respectively. */ + state. Context tells whether we got here on a newline or letter. */ static int -state_index (struct dfa *d, position_set const *s, int newline, int letter) +state_index (struct dfa *d, position_set const *s, int context) { int hash = 0; int constraint; int i, j; - newline = newline ? 1 : 0; - letter = letter ? 1 : 0; - + context &= ~CTX_NONE; for (i = 0; i < s->nelem; ++i) hash ^= s->elems[i].index + s->elems[i].constraint; @@ -1972,7 +1983,7 @@ state_index (struct dfa *d, position_set const *s, int newline, int letter) for (i = 0; i < d->sindex; ++i) { if (hash != d->states[i].hash || s->nelem != d->states[i].elems.nelem - || newline != d->states[i].newline || letter != d->states[i].letter) + || context != d->states[i].context) continue; for (j = 0; j < s->nelem; ++j) if (s->elems[j].constraint @@ -1988,8 +1999,7 @@ state_index (struct dfa *d, position_set const *s, int newline, int letter) d->states[i].hash = hash; alloc_position_set(&d->states[i].elems, s->nelem); copy(s, &d->states[i].elems); - d->states[i].newline = newline; - d->states[i].letter = letter; + d->states[i].context = context; d->states[i].backref = 0; d->states[i].constraint = 0; d->states[i].first_end = 0; @@ -2002,9 +2012,9 @@ state_index (struct dfa *d, position_set const *s, int newline, int letter) if (d->tokens[s->elems[j].index] < 0) { constraint = s->elems[j].constraint; - if (SUCCEEDS_IN_CONTEXT(constraint, newline, 0, letter, 0) - || SUCCEEDS_IN_CONTEXT(constraint, newline, 0, letter, 1) - || SUCCEEDS_IN_CONTEXT(constraint, newline, 1, letter, 0)) + if (SUCCEEDS_IN_CONTEXT(constraint, context, CTX_NONE) + || SUCCEEDS_IN_CONTEXT(constraint, context, CTX_NEWLINE) + || SUCCEEDS_IN_CONTEXT(constraint, context, CTX_LETTER)) d->states[i].constraint |= constraint; if (! d->states[i].first_end) d->states[i].first_end = d->tokens[s->elems[j].index]; @@ -2149,7 +2159,7 @@ dfaanalyze (struct dfa *d, int searchflag) position *lastpos; /* Array where lastpos elements are stored. */ position_set tmp; /* Temporary set for merging sets. */ position_set merged; /* Result of merging sets. */ - int wants_newline; /* True if some position wants newline info. */ + int prev_context; /* Context wanted by some position. */ int *o_nullable; int *o_nfirst, *o_nlast; position *o_firstpos, *o_lastpos; @@ -2340,16 +2350,16 @@ dfaanalyze (struct dfa *d, int searchflag) epsclosure(&merged, d); /* Check if any of the positions of state 0 will want newline context. */ - wants_newline = 0; + prev_context = 0; for (i = 0; i < merged.nelem; ++i) if (PREV_NEWLINE_DEPENDENT(merged.elems[i].constraint)) - wants_newline = 1; + prev_context |= CTX_NEWLINE; /* Build the initial state. */ d->salloc = 1; d->sindex = 0; MALLOC(d->states, d->salloc); - state_index(d, &merged, wants_newline, 0); + state_index(d, &merged, prev_context); free(o_nullable); free(o_nfirst); @@ -2404,10 +2414,9 @@ dfastate (int s, struct dfa *d, int trans[]) int leftoversf; /* True if leftovers is nonempty. */ position_set follows; /* Union of the follows of some group. */ position_set tmp; /* Temporary space for merging sets. */ + int prev_context; /* Context that new state wants to know. */ int state; /* New state. */ - int wants_newline; /* New state wants to know newline context. */ int state_newline; /* New state on a newline transition. */ - int wants_letter; /* New state wants to know letter context. */ int state_letter; /* New state on a letter transition. */ int next_isnt_1st_byte = 0; /* Flag if we can't add state0. */ int i, j, k; @@ -2445,18 +2454,20 @@ dfastate (int s, struct dfa *d, int trans[]) if (pos.constraint != 0xFF) { if (! MATCHES_NEWLINE_CONTEXT(pos.constraint, - d->states[s].newline, 1)) + d->states[s].context & CTX_NEWLINE, + CTX_NEWLINE)) clrbit(eolbyte, matches); if (! MATCHES_NEWLINE_CONTEXT(pos.constraint, - d->states[s].newline, 0)) + d->states[s].context & CTX_NEWLINE, 0)) for (j = 0; j < CHARCLASS_INTS; ++j) matches[j] &= newline[j]; if (! MATCHES_LETTER_CONTEXT(pos.constraint, - d->states[s].letter, 1)) + d->states[s].context & CTX_LETTER, + CTX_LETTER)) for (j = 0; j < CHARCLASS_INTS; ++j) matches[j] &= ~letters[j]; if (! MATCHES_LETTER_CONTEXT(pos.constraint, - d->states[s].letter, 0)) + d->states[s].context & CTX_LETTER, 0)) for (j = 0; j < CHARCLASS_INTS; ++j) matches[j] &= letters[j]; @@ -2538,25 +2549,27 @@ dfastate (int s, struct dfa *d, int trans[]) is to fail miserably. */ if (d->searchflag) { - wants_newline = 0; - wants_letter = 0; + prev_context = 0; for (i = 0; i < d->states[0].elems.nelem; ++i) { if (PREV_NEWLINE_DEPENDENT(d->states[0].elems.elems[i].constraint)) - wants_newline = 1; + prev_context |= CTX_NEWLINE; if (PREV_LETTER_DEPENDENT(d->states[0].elems.elems[i].constraint)) - wants_letter = 1; + prev_context |= CTX_LETTER; } + + /* Find the state(s) corresponding to the positions of state 0. */ copy(&d->states[0].elems, &follows); - state = state_index(d, &follows, 0, 0); - if (wants_newline) - state_newline = state_index(d, &follows, 1, 0); + state = state_index(d, &follows, 0); + if (prev_context & CTX_NEWLINE) + state_newline = state_index(d, &follows, CTX_NEWLINE); else state_newline = state; - if (wants_letter) - state_letter = state_index(d, &follows, 0, 1); + if (prev_context & CTX_LETTER) + state_letter = state_index(d, &follows, CTX_LETTER); else state_letter = state; + for (i = 0; i < NOTCHAR; ++i) trans[i] = (IS_WORD_CONSTITUENT(i)) ? state_letter : state; trans[eolbyte] = state_newline; @@ -2615,29 +2628,28 @@ dfastate (int s, struct dfa *d, int trans[]) insert(d->states[0].elems.elems[j], &follows); /* Find out if the new state will want any context information. */ - wants_newline = 0; + prev_context = 0; if (tstbit(eolbyte, labels[i])) for (j = 0; j < follows.nelem; ++j) if (PREV_NEWLINE_DEPENDENT(follows.elems[j].constraint)) - wants_newline = 1; + prev_context |= CTX_NEWLINE; - wants_letter = 0; for (j = 0; j < CHARCLASS_INTS; ++j) if (labels[i][j] & letters[j]) break; if (j < CHARCLASS_INTS) for (j = 0; j < follows.nelem; ++j) if (PREV_LETTER_DEPENDENT(follows.elems[j].constraint)) - wants_letter = 1; + prev_context |= CTX_LETTER; /* Find the state(s) corresponding to the union of the follows. */ - state = state_index(d, &follows, 0, 0); - if (wants_newline) - state_newline = state_index(d, &follows, 1, 0); + state = state_index(d, &follows, 0); + if (prev_context & CTX_NEWLINE) + state_newline = state_index(d, &follows, CTX_NEWLINE); else state_newline = state; - if (wants_letter) - state_letter = state_index(d, &follows, 0, 1); + if (prev_context & CTX_LETTER) + state_letter = state_index(d, &follows, CTX_LETTER); else state_letter = state; @@ -2697,14 +2709,11 @@ build_state (int s, struct dfa *d) /* Set up the success bits for this state. */ d->success[s] = 0; - if (ACCEPTS_IN_CONTEXT(d->states[s].newline, 1, d->states[s].letter, 0, - s, *d)) + if (ACCEPTS_IN_CONTEXT(d->states[s].context, CTX_NEWLINE, s, *d)) d->success[s] |= CTX_NEWLINE; - if (ACCEPTS_IN_CONTEXT(d->states[s].newline, 0, d->states[s].letter, 1, - s, *d)) + if (ACCEPTS_IN_CONTEXT(d->states[s].context, CTX_LETTER, s, *d)) d->success[s] |= CTX_LETTER; - if (ACCEPTS_IN_CONTEXT(d->states[s].newline, 0, d->states[s].letter, 0, - s, *d)) + if (ACCEPTS_IN_CONTEXT(d->states[s].context, CTX_NONE, s, *d)) d->success[s] |= CTX_NONE; MALLOC(trans, NOTCHAR); @@ -2865,33 +2874,27 @@ transit_state_singlebyte (struct dfa *d, int s, unsigned char const *p, static int match_anychar (struct dfa *d, int s, position pos, int idx) { - int newline = 0; - int letter = 0; + int context; wchar_t wc; int mbclen; wc = inputwcs[idx]; mbclen = (mblen_buf[idx] == 0)? 1 : mblen_buf[idx]; - /* Check context. */ + /* Check syntax bits. */ if (wc == (wchar_t)eolbyte) { if (!(syntax_bits & RE_DOT_NEWLINE)) return 0; - newline = 1; } else if (wc == (wchar_t)'\0') { if (syntax_bits & RE_DOT_NOT_NULL) return 0; - newline = 1; } - if (iswalnum(wc) || wc == L'_') - letter = 1; - - if (!SUCCEEDS_IN_CONTEXT(pos.constraint, d->states[s].newline, - newline, d->states[s].letter, letter)) + context = wchar_context(wc); + if (!SUCCEEDS_IN_CONTEXT(pos.constraint, d->states[s].context, context)) return 0; return mbclen; @@ -2915,29 +2918,25 @@ match_mb_charset (struct dfa *d, int s, position pos, int idx) /* Pointer to the structure to which we are currently refering. */ struct mb_char_classes *work_mbc; - int newline = 0; - int letter = 0; + int context; wchar_t wc; /* Current refering character. */ wc = inputwcs[idx]; - /* Check context. */ + /* Check syntax bits. */ if (wc == (wchar_t)eolbyte) { if (!(syntax_bits & RE_DOT_NEWLINE)) return 0; - newline = 1; } else if (wc == (wchar_t)'\0') { if (syntax_bits & RE_DOT_NOT_NULL) return 0; - newline = 1; } - if (iswalnum(wc) || wc == L'_') - letter = 1; - if (!SUCCEEDS_IN_CONTEXT(pos.constraint, d->states[s].newline, - newline, d->states[s].letter, letter)) + + context = wchar_context(wc); + if (!SUCCEEDS_IN_CONTEXT(pos.constraint, d->states[s].context, context)) return 0; /* Assign the current refering operator to work_mbc. */ @@ -3156,7 +3155,7 @@ transit_state (struct dfa *d, int s, unsigned char const **pp) transit_state_consume_1char(d, s, pp, match_lens, &mbclen, &follows); wc = inputwcs[*pp - mbclen - buf_begin]; - s1 = state_index(d, &follows, wc == L'\n', iswalnum(wc)); + s1 = state_index(d, &follows, wchar_context (wc)); realloc_trans_if_necessary(d, s1); while (*pp - p1 < maxlen) @@ -3173,7 +3172,7 @@ transit_state (struct dfa *d, int s, unsigned char const **pp) } wc = inputwcs[*pp - mbclen - buf_begin]; - s1 = state_index(d, &follows, wc == L'\n', iswalnum(wc)); + s1 = state_index(d, &follows, wchar_context (wc)); realloc_trans_if_necessary(d, s1); } free(match_lens); ----------------------------------------------------------------------- Summary of changes: src/dfa.c | 169 ++++++++++++++++++++++++++++++------------------------------- 1 files changed, 84 insertions(+), 85 deletions(-) hooks/post-receive -- grep From MAILER-DAEMON Sun Feb 05 11:51:53 2012 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Ru5Jh-0008VQ-EI for mharc-grep-commit@gnu.org; Sun, 05 Feb 2012 11:51:53 -0500 Received: from eggs.gnu.org ([140.186.70.92]:43291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru5Je-0008VG-MG for grep-commit@gnu.org; Sun, 05 Feb 2012 11:51:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ru5Jc-00068x-JS for grep-commit@gnu.org; Sun, 05 Feb 2012 11:51:50 -0500 Received: from vcs.savannah.gnu.org ([140.186.70.72]:57525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru5Jc-00068t-Hq for grep-commit@gnu.org; Sun, 05 Feb 2012 11:51:48 -0500 Received: from bonzini by vcs.savannah.gnu.org with local (Exim 4.72) (envelope-from ) id 1Ru5Jc-0002jE-9q for grep-commit@gnu.org; Sun, 05 Feb 2012 16:51:48 +0000 Date: Sun, 05 Feb 2012 16:51:48 +0000 Message-Id: To: grep-commit@gnu.org Subject: grep branch, master, updated. v2.10-70-g7a98af1 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 082825355ffe94d6f5600ec96928ac5373307ad5 X-Git-Newrev: 7a98af1c1fe90b1681565ac21a49d37b91e594b9 From: Paolo Bonzini X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.72 X-BeenThere: grep-commit@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: bug-grep@gnu.org List-Id: CVS commit notices for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Feb 2012 16:51:52 -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 7a98af1c1fe90b1681565ac21a49d37b91e594b9 (commit) from 082825355ffe94d6f5600ec96928ac5373307ad5 (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=7a98af1c1fe90b1681565ac21a49d37b91e594b9 commit 7a98af1c1fe90b1681565ac21a49d37b91e594b9 Author: Paolo Bonzini Date: Tue Jan 3 15:40:34 2012 +0100 dfa: refactor common context computations * src/dfa.c (CTX_ANY, charclass_context, state_separate_contexts): New. (dfaanalyze): Use state_separate_contexts. (dfastate): Use charclass_context and state_separate_contexts. Rename prev_context to separate_contexts. diff --git a/src/dfa.c b/src/dfa.c index 8302352..b46cd35 100644 --- a/src/dfa.c +++ b/src/dfa.c @@ -102,6 +102,7 @@ static inline unsigned char to_uchar (char ch) { return ch; } #define CTX_NONE 1 #define CTX_LETTER 2 #define CTX_NEWLINE 4 +#define CTX_ANY 7 /* Sometimes characters can only be matched depending on the surrounding context. Such context decisions depend on what the previous character @@ -2097,6 +2098,55 @@ epsclosure (position_set *s, struct dfa const *d) free(visited); } +/* Returns the set of contexts for which there is at least one + character included in C. */ + +static int +charclass_context(charclass c) +{ + int context = 0; + unsigned int j; + + if (tstbit(eolbyte, c)) + context |= CTX_NEWLINE; + + for (j = 0; j < CHARCLASS_INTS; ++j) + { + if (c[j] & letters[j]) + context |= CTX_LETTER; + if (c[j] & ~(letters[j] | newline[j])) + context |= CTX_NONE; + } + + return context; +} + +/* Returns the subset of POSSIBLE_CONTEXTS on which the position set S + depends. Each context in the set of returned contexts (let's call it + SC) may have a different follow set than other contexts in SC, and + also different from the follow set of the complement set. However, + all contexts in the complement set will have the same follow set. */ + +static int +state_separate_contexts(position_set *s, int possible_contexts) +{ + int separate_context = 0; + unsigned int j; + + for (j = 0; j < s->nelem; ++j) + { + if ((possible_contexts & CTX_NEWLINE) + && PREV_NEWLINE_DEPENDENT(s->elems[j].constraint)) + separate_context |= CTX_NEWLINE; + if ((possible_contexts & CTX_LETTER) + && PREV_LETTER_DEPENDENT(s->elems[j].constraint)) + separate_context |= CTX_LETTER; + } + + return separate_context; +} + + /* Perform bottom-up analysis on the parse tree, computing various functions. Note that at this point, we're pretending constructs like \< are real characters rather than constraints on what can follow them. @@ -2159,7 +2209,7 @@ dfaanalyze (struct dfa *d, int searchflag) position *lastpos; /* Array where lastpos elements are stored. */ position_set tmp; /* Temporary set for merging sets. */ position_set merged; /* Result of merging sets. */ - int prev_context; /* Context wanted by some position. */ + int separate_contexts; /* Context wanted by some position. */ int *o_nullable; int *o_nfirst, *o_nlast; position *o_firstpos, *o_lastpos; @@ -2349,17 +2399,13 @@ dfaanalyze (struct dfa *d, int searchflag) insert(firstpos[i], &merged); epsclosure(&merged, d); - /* Check if any of the positions of state 0 will want newline context. */ - prev_context = 0; - for (i = 0; i < merged.nelem; ++i) - if (PREV_NEWLINE_DEPENDENT(merged.elems[i].constraint)) - prev_context |= CTX_NEWLINE; - /* Build the initial state. */ d->salloc = 1; d->sindex = 0; MALLOC(d->states, d->salloc); - state_index(d, &merged, prev_context); + + separate_contexts = state_separate_contexts(&merged, CTX_NEWLINE); + state_index(d, &merged, separate_contexts); free(o_nullable); free(o_nfirst); @@ -2369,6 +2415,7 @@ dfaanalyze (struct dfa *d, int searchflag) free(merged.elems); } + /* Find, for each character, the transition out of state s of d, and store it in the appropriate slot of trans. @@ -2414,7 +2461,8 @@ dfastate (int s, struct dfa *d, int trans[]) int leftoversf; /* True if leftovers is nonempty. */ position_set follows; /* Union of the follows of some group. */ position_set tmp; /* Temporary space for merging sets. */ - int prev_context; /* Context that new state wants to know. */ + int possible_contexts; /* Contexts that this group can match. */ + int separate_contexts; /* Context that new state wants to know. */ int state; /* New state. */ int state_newline; /* New state on a newline transition. */ int state_letter; /* New state on a letter transition. */ @@ -2549,23 +2597,15 @@ dfastate (int s, struct dfa *d, int trans[]) is to fail miserably. */ if (d->searchflag) { - prev_context = 0; - for (i = 0; i < d->states[0].elems.nelem; ++i) - { - if (PREV_NEWLINE_DEPENDENT(d->states[0].elems.elems[i].constraint)) - prev_context |= CTX_NEWLINE; - if (PREV_LETTER_DEPENDENT(d->states[0].elems.elems[i].constraint)) - prev_context |= CTX_LETTER; - } - /* Find the state(s) corresponding to the positions of state 0. */ copy(&d->states[0].elems, &follows); + separate_contexts = state_separate_contexts(&follows, CTX_ANY); state = state_index(d, &follows, 0); - if (prev_context & CTX_NEWLINE) + if (separate_contexts & CTX_NEWLINE) state_newline = state_index(d, &follows, CTX_NEWLINE); else state_newline = state; - if (prev_context & CTX_LETTER) + if (separate_contexts & CTX_LETTER) state_letter = state_index(d, &follows, CTX_LETTER); else state_letter = state; @@ -2628,27 +2668,16 @@ dfastate (int s, struct dfa *d, int trans[]) insert(d->states[0].elems.elems[j], &follows); /* Find out if the new state will want any context information. */ - prev_context = 0; - if (tstbit(eolbyte, labels[i])) - for (j = 0; j < follows.nelem; ++j) - if (PREV_NEWLINE_DEPENDENT(follows.elems[j].constraint)) - prev_context |= CTX_NEWLINE; - - for (j = 0; j < CHARCLASS_INTS; ++j) - if (labels[i][j] & letters[j]) - break; - if (j < CHARCLASS_INTS) - for (j = 0; j < follows.nelem; ++j) - if (PREV_LETTER_DEPENDENT(follows.elems[j].constraint)) - prev_context |= CTX_LETTER; + possible_contexts = charclass_context(labels[i]); + separate_contexts = state_separate_contexts(&follows, possible_contexts); /* Find the state(s) corresponding to the union of the follows. */ state = state_index(d, &follows, 0); - if (prev_context & CTX_NEWLINE) + if (separate_contexts & CTX_NEWLINE) state_newline = state_index(d, &follows, CTX_NEWLINE); else state_newline = state; - if (prev_context & CTX_LETTER) + if (separate_contexts & CTX_LETTER) state_letter = state_index(d, &follows, CTX_LETTER); else state_letter = state; ----------------------------------------------------------------------- Summary of changes: src/dfa.c | 99 +++++++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 64 insertions(+), 35 deletions(-) hooks/post-receive -- grep From MAILER-DAEMON Sun Feb 05 12:04:46 2012 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Ru5WA-0003Sh-LU for mharc-grep-commit@gnu.org; Sun, 05 Feb 2012 12:04:46 -0500 Received: from eggs.gnu.org ([140.186.70.92]:57844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru5W8-0003S5-CF for grep-commit@gnu.org; Sun, 05 Feb 2012 12:04:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ru5W7-0008Fa-Bb for grep-commit@gnu.org; Sun, 05 Feb 2012 12:04:44 -0500 Received: from vcs.savannah.gnu.org ([140.186.70.72]:52079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru5W7-0008FW-8A for grep-commit@gnu.org; Sun, 05 Feb 2012 12:04:43 -0500 Received: from meyering by vcs.savannah.gnu.org with local (Exim 4.72) (envelope-from ) id 1Ru5W7-00061e-0Y for grep-commit@gnu.org; Sun, 05 Feb 2012 17:04:43 +0000 Date: Sun, 05 Feb 2012 17:04:43 +0000 Message-Id: To: grep-commit@gnu.org Subject: grep branch, master, updated. v2.10-71-g3ade04b X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 7a98af1c1fe90b1681565ac21a49d37b91e594b9 X-Git-Newrev: 3ade04b83128c0b0edbb17a83e98cadaf03b4fa4 From: Jim Meyering X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.72 X-BeenThere: grep-commit@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: bug-grep@gnu.org List-Id: CVS commit notices for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Feb 2012 17:04:45 -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 3ade04b83128c0b0edbb17a83e98cadaf03b4fa4 (commit) from 7a98af1c1fe90b1681565ac21a49d37b91e594b9 (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=3ade04b83128c0b0edbb17a83e98cadaf03b4fa4 commit 3ade04b83128c0b0edbb17a83e98cadaf03b4fa4 Author: Jim Meyering Date: Sun Feb 5 17:58:25 2012 +0100 build: accommodate -Wshadow and -Werror=suggest-attribute=pure * src/dfa.c (state_separate_contexts): Add _GL_ATTRIBUTE_PURE. (dfaexec): Rename parameter, s/newline/allow_nl/, to avoid shadowing the global. diff --git a/src/dfa.c b/src/dfa.c index b46cd35..01f3645 100644 --- a/src/dfa.c +++ b/src/dfa.c @@ -2127,8 +2127,8 @@ charclass_context(charclass c) also different from the follow set of the complement set. However, all contexts in the complement set will have the same follow set. */ -static int -state_separate_contexts(position_set *s, int possible_contexts) +static int _GL_ATTRIBUTE_PURE +state_separate_contexts (position_set *s, int possible_contexts) { int separate_context = 0; unsigned int j; @@ -3266,14 +3266,14 @@ prepare_wc_buf (const char *begin, const char *end) points to the beginning of the buffer, and END points to the first byte after its end. Note however that we store a sentinel byte (usually newline) in *END, so the actual buffer must be one byte longer. - When NEWLINE is nonzero, newlines may appear in the matching string. + When ALLOW_NL is nonzero, newlines may appear in the matching string. If COUNT is non-NULL, increment *COUNT once for each newline processed. Finally, if BACKREF is non-NULL set *BACKREF to indicate whether we encountered a back-reference (1) or not (0). The caller may use this to decide whether to fall back on a backtracking matcher. */ char * dfaexec (struct dfa *d, char const *begin, char *end, - int newline, int *count, int *backref) + int allow_nl, int *count, int *backref) { int s, s1; /* Current state. */ unsigned char const *p; /* Current input character. */ @@ -3404,7 +3404,7 @@ dfaexec (struct dfa *d, char const *begin, char *end, continue; } - if (p[-1] == eol && newline) + if (p[-1] == eol && allow_nl) { s = d->newlines[s1]; continue; ----------------------------------------------------------------------- Summary of changes: src/dfa.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) hooks/post-receive -- grep From MAILER-DAEMON Wed Feb 08 01:17:48 2012 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Rv0qi-00064x-1f for mharc-grep-commit@gnu.org; Wed, 08 Feb 2012 01:17:48 -0500 Received: from eggs.gnu.org ([140.186.70.92]:36055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rv0qe-00064N-JZ for grep-commit@gnu.org; Wed, 08 Feb 2012 01:17:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rv0qd-0001JC-8f for grep-commit@gnu.org; Wed, 08 Feb 2012 01:17:44 -0500 Received: from vcs.savannah.gnu.org ([140.186.70.72]:47262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rv0qd-0001J8-7C for grep-commit@gnu.org; Wed, 08 Feb 2012 01:17:43 -0500 Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72) (envelope-from ) id 1Rv0qc-00007Z-7a for grep-commit@gnu.org; Wed, 08 Feb 2012 06:17:43 +0000 Date: Wed, 08 Feb 2012 06:17:42 +0000 Message-Id: To: grep-commit@gnu.org Subject: grep branch, master, updated. v2.10-72-ge1ee9d9 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 3ade04b83128c0b0edbb17a83e98cadaf03b4fa4 X-Git-Newrev: e1ee9d96cc24a865016050aaae34178aa85f2437 From: Paul Eggert X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.72 X-BeenThere: grep-commit@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: bug-grep@gnu.org List-Id: CVS commit notices for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2012 06:17:45 -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 e1ee9d96cc24a865016050aaae34178aa85f2437 (commit) from 3ade04b83128c0b0edbb17a83e98cadaf03b4fa4 (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=e1ee9d96cc24a865016050aaae34178aa85f2437 commit e1ee9d96cc24a865016050aaae34178aa85f2437 Author: Paul Eggert Date: Tue Feb 7 22:16:32 2012 -0800 tests: work even if SIGPIPE is ignored * tests/epipe: Do not infinite-loop if SIGPIPE is already ignored. It could be that the invoker of 'make check' ignores SIGPIPE, for example. diff --git a/tests/epipe b/tests/epipe index 336d994..f9cb3f6 100755 --- a/tests/epipe +++ b/tests/epipe @@ -6,7 +6,7 @@ if ( - while :; do echo x; done | + (trap - PIPE; while echo x; do :; done) 3>&- | (trap '' PIPE; exec grep x 2>&3) | : ) 3>&1 | ( ----------------------------------------------------------------------- Summary of changes: tests/epipe | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- grep From MAILER-DAEMON Wed Feb 08 14:18:35 2012 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1RvD2J-00005i-MO for mharc-grep-commit@gnu.org; Wed, 08 Feb 2012 14:18:35 -0500 Received: from eggs.gnu.org ([140.186.70.92]:34973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvD2C-0008Oi-GB for grep-commit@gnu.org; Wed, 08 Feb 2012 14:18:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvD2A-0003H9-3h for grep-commit@gnu.org; Wed, 08 Feb 2012 14:18:28 -0500 Received: from vcs.savannah.gnu.org ([140.186.70.72]:36428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvD2A-0003H5-2D for grep-commit@gnu.org; Wed, 08 Feb 2012 14:18:26 -0500 Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72) (envelope-from ) id 1RvD2A-0001xb-EY for grep-commit@gnu.org; Wed, 08 Feb 2012 19:18:27 +0000 Date: Wed, 08 Feb 2012 19:18:26 +0000 Message-Id: To: grep-commit@gnu.org Subject: grep branch, master, updated. v2.10-73-ga25effe X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: e1ee9d96cc24a865016050aaae34178aa85f2437 X-Git-Newrev: a25effe4c8ffcc34a1698459f5a1e43df1e11c31 From: Paul Eggert X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.72 X-BeenThere: grep-commit@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: bug-grep@gnu.org List-Id: CVS commit notices for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2012 19:18:34 -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 a25effe4c8ffcc34a1698459f5a1e43df1e11c31 (commit) from e1ee9d96cc24a865016050aaae34178aa85f2437 (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=a25effe4c8ffcc34a1698459f5a1e43df1e11c31 commit a25effe4c8ffcc34a1698459f5a1e43df1e11c31 Author: Paul Eggert Date: Wed Feb 8 11:17:35 2012 -0800 tests: work portably even if SIGPIPE is ignored * tests/epipe: Don't rely on "trap - PIPE"; that's not portable. Problem reported by Eric Blake in . Also, use "ls -al" rather than "echo", in case "echo" is done by a buggy shell that ignores write errors. And close grep's fd 3, as a sanity check. diff --git a/tests/epipe b/tests/epipe index f9cb3f6..1d9ef05 100755 --- a/tests/epipe +++ b/tests/epipe @@ -6,8 +6,8 @@ if ( - (trap - PIPE; while echo x; do :; done) 3>&- | - (trap '' PIPE; exec grep x 2>&3) | + while ls -al; do :; done 3>&- | + (trap '' PIPE; exec grep . 2>&3 3>&-) | : ) 3>&1 | ( read line1 && echo >&2 "$line1" && ----------------------------------------------------------------------- Summary of changes: tests/epipe | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- grep From MAILER-DAEMON Mon Feb 13 03:28:55 2012 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1RwrHL-00019e-Hn for mharc-grep-commit@gnu.org; Mon, 13 Feb 2012 03:28:55 -0500 Received: from eggs.gnu.org ([140.186.70.92]:40043) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwrHE-00019E-RP for grep-commit@gnu.org; Mon, 13 Feb 2012 03:28:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RwrH8-0004WT-WE for grep-commit@gnu.org; Mon, 13 Feb 2012 03:28:48 -0500 Received: from vcs.savannah.gnu.org ([140.186.70.72]:33176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwrH8-0004WP-TP for grep-commit@gnu.org; Mon, 13 Feb 2012 03:28:42 -0500 Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72) (envelope-from ) id 1RwrH7-0005q8-Os for grep-commit@gnu.org; Mon, 13 Feb 2012 08:28:42 +0000 Date: Mon, 13 Feb 2012 08:28:42 +0000 Message-Id: To: grep-commit@gnu.org Subject: grep branch, master, updated. v2.10-74-ga41991d X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: a25effe4c8ffcc34a1698459f5a1e43df1e11c31 X-Git-Newrev: a41991d620c7663c0027e25a708c80a70bb70646 From: Paul Eggert X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.72 X-BeenThere: grep-commit@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: bug-grep@gnu.org List-Id: CVS commit notices for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 08:28:54 -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 a41991d620c7663c0027e25a708c80a70bb70646 (commit) from a25effe4c8ffcc34a1698459f5a1e43df1e11c31 (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=a41991d620c7663c0027e25a708c80a70bb70646 commit a41991d620c7663c0027e25a708c80a70bb70646 Author: Paul Eggert Date: Mon Feb 13 00:25:55 2012 -0800 tests: fix loop in epipe test * tests/epipe: Don't loop forever if the bug is present. Problem reported by Jaroslav Skarvada. diff --git a/tests/epipe b/tests/epipe index 1d9ef05..3b568e3 100755 --- a/tests/epipe +++ b/tests/epipe @@ -5,8 +5,17 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src if + # Use awk to output a bounded amount of data to the grep in question, + # so that the test doesn't loop forever if grep is buggy. + # Use an explicit /dev/null for the benefit of older (pre-POSIX) awks. + # + # Carefully close fd 3 when not needed, as a sanity check. + # + # Do not use "trap - PIPE" or "trap 'something' PIPE" here, since we may + # be running in an environment where SIGPIPE is ignored, and in such an + # environment POSIX says that "trap '' PIPE" is all we can do portably. ( - while ls -al; do :; done 3>&- | + ${AWK-awk} 'BEGIN { for (i=0; i<1000000; i++) print i; }' /dev/null 3>&- | (trap '' PIPE; exec grep . 2>&3 3>&-) | : ) 3>&1 | ( ----------------------------------------------------------------------- Summary of changes: tests/epipe | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) hooks/post-receive -- grep From MAILER-DAEMON Sun Feb 26 08:53:17 2012 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1S1eXN-0002cS-7j for mharc-grep-commit@gnu.org; Sun, 26 Feb 2012 08:53:17 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1eXJ-0002c3-Ke for grep-commit@gnu.org; Sun, 26 Feb 2012 08:53:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1eXH-0006wq-Qd for grep-commit@gnu.org; Sun, 26 Feb 2012 08:53:13 -0500 Received: from vcs.savannah.gnu.org ([140.186.70.72]:47687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1eXH-0006wk-MD for grep-commit@gnu.org; Sun, 26 Feb 2012 08:53:11 -0500 Received: from meyering by vcs.savannah.gnu.org with local (Exim 4.72) (envelope-from ) id 1S1eXE-0005WT-MQ for grep-commit@gnu.org; Sun, 26 Feb 2012 13:53:11 +0000 Date: Sun, 26 Feb 2012 13:53:10 +0000 Message-Id: To: grep-commit@gnu.org Subject: grep branch, master, updated. v2.10-78-g9894f82 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: a41991d620c7663c0027e25a708c80a70bb70646 X-Git-Newrev: 9894f828d474e73b81c3c7a33323a9ca0c9914c2 From: Jim Meyering X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.72 X-BeenThere: grep-commit@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: bug-grep@gnu.org List-Id: CVS commit notices for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Feb 2012 13:53:15 -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 9894f828d474e73b81c3c7a33323a9ca0c9914c2 (commit) via 74dc111398feff35e54978d442b9a488c05829b5 (commit) via d7acc337e47563b8334b56c5d479c81a4a060c8f (commit) via d8951d3f4e1bbd564809aa8e713d8333bda2f802 (commit) from a41991d620c7663c0027e25a708c80a70bb70646 (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=9894f828d474e73b81c3c7a33323a9ca0c9914c2 commit 9894f828d474e73b81c3c7a33323a9ca0c9914c2 Author: Paolo Bonzini Date: Sun Feb 5 18:00:46 2012 +0100 dfa: merge calls to SUCCEEDS_IN_CONTEXT * src/dfa.c (state_index): use a single call to SUCCEEDS_IN_CONTEXT. diff --git a/src/dfa.c b/src/dfa.c index 3e19b40..f3e414d 100644 --- a/src/dfa.c +++ b/src/dfa.c @@ -2014,9 +2014,7 @@ state_index (struct dfa *d, position_set const *s, int context) if (d->tokens[s->elems[j].index] < 0) { constraint = s->elems[j].constraint; - if (SUCCEEDS_IN_CONTEXT(constraint, context, CTX_NONE) - || SUCCEEDS_IN_CONTEXT(constraint, context, CTX_NEWLINE) - || SUCCEEDS_IN_CONTEXT(constraint, context, CTX_LETTER)) + if (SUCCEEDS_IN_CONTEXT (constraint, context, CTX_ANY)) d->states[i].constraint |= constraint; if (! d->states[i].first_end) d->states[i].first_end = d->tokens[s->elems[j].index]; http://git.savannah.gnu.org/cgit/grep.git/commit/?id=74dc111398feff35e54978d442b9a488c05829b5 commit 9894f828d474e73b81c3c7a33323a9ca0c9914c2 Author: Paolo Bonzini Date: Sun Feb 5 18:00:46 2012 +0100 dfa: merge calls to SUCCEEDS_IN_CONTEXT * src/dfa.c (state_index): use a single call to SUCCEEDS_IN_CONTEXT. diff --git a/src/dfa.c b/src/dfa.c index 3e19b40..f3e414d 100644 --- a/src/dfa.c +++ b/src/dfa.c @@ -2014,9 +2014,7 @@ state_index (struct dfa *d, position_set const *s, int context) if (d->tokens[s->elems[j].index] < 0) { constraint = s->elems[j].constraint; - if (SUCCEEDS_IN_CONTEXT(constraint, context, CTX_NONE) - || SUCCEEDS_IN_CONTEXT(constraint, context, CTX_NEWLINE) - || SUCCEEDS_IN_CONTEXT(constraint, context, CTX_LETTER)) + if (SUCCEEDS_IN_CONTEXT (constraint, context, CTX_ANY)) d->states[i].constraint |= constraint; if (! d->states[i].first_end) d->states[i].first_end = d->tokens[s->elems[j].index]; http://git.savannah.gnu.org/cgit/grep.git/commit/?id=d7acc337e47563b8334b56c5d479c81a4a060c8f commit 9894f828d474e73b81c3c7a33323a9ca0c9914c2 Author: Paolo Bonzini Date: Sun Feb 5 18:00:46 2012 +0100 dfa: merge calls to SUCCEEDS_IN_CONTEXT * src/dfa.c (state_index): use a single call to SUCCEEDS_IN_CONTEXT. diff --git a/src/dfa.c b/src/dfa.c index 3e19b40..f3e414d 100644 --- a/src/dfa.c +++ b/src/dfa.c @@ -2014,9 +2014,7 @@ state_index (struct dfa *d, position_set const *s, int context) if (d->tokens[s->elems[j].index] < 0) { constraint = s->elems[j].constraint; - if (SUCCEEDS_IN_CONTEXT(constraint, context, CTX_NONE) - || SUCCEEDS_IN_CONTEXT(constraint, context, CTX_NEWLINE) - || SUCCEEDS_IN_CONTEXT(constraint, context, CTX_LETTER)) + if (SUCCEEDS_IN_CONTEXT (constraint, context, CTX_ANY)) d->states[i].constraint |= constraint; if (! d->states[i].first_end) d->states[i].first_end = d->tokens[s->elems[j].index]; http://git.savannah.gnu.org/cgit/grep.git/commit/?id=d8951d3f4e1bbd564809aa8e713d8333bda2f802 commit 9894f828d474e73b81c3c7a33323a9ca0c9914c2 Author: Paolo Bonzini Date: Sun Feb 5 18:00:46 2012 +0100 dfa: merge calls to SUCCEEDS_IN_CONTEXT * src/dfa.c (state_index): use a single call to SUCCEEDS_IN_CONTEXT. diff --git a/src/dfa.c b/src/dfa.c index 3e19b40..f3e414d 100644 --- a/src/dfa.c +++ b/src/dfa.c @@ -2014,9 +2014,7 @@ state_index (struct dfa *d, position_set const *s, int context) if (d->tokens[s->elems[j].index] < 0) { constraint = s->elems[j].constraint; - if (SUCCEEDS_IN_CONTEXT(constraint, context, CTX_NONE) - || SUCCEEDS_IN_CONTEXT(constraint, context, CTX_NEWLINE) - || SUCCEEDS_IN_CONTEXT(constraint, context, CTX_LETTER)) + if (SUCCEEDS_IN_CONTEXT (constraint, context, CTX_ANY)) d->states[i].constraint |= constraint; if (! d->states[i].first_end) d->states[i].first_end = d->tokens[s->elems[j].index]; ----------------------------------------------------------------------- Summary of changes: NEWS | 5 ++ src/dfa.c | 146 ++++++++++++++++++++++++------------------------- tests/spencer1.tests | 12 ++++ 3 files changed, 89 insertions(+), 74 deletions(-) hooks/post-receive -- grep From MAILER-DAEMON Sun Feb 26 09:30:14 2012 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1S1f78-0007Gi-Kj for mharc-grep-commit@gnu.org; Sun, 26 Feb 2012 09:30:14 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1f76-0007EX-7Y for grep-commit@gnu.org; Sun, 26 Feb 2012 09:30:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1f74-00046N-Cs for grep-commit@gnu.org; Sun, 26 Feb 2012 09:30:11 -0500 Received: from vcs.savannah.gnu.org ([140.186.70.72]:41093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1f74-00046J-85 for grep-commit@gnu.org; Sun, 26 Feb 2012 09:30:10 -0500 Received: from meyering by vcs.savannah.gnu.org with local (Exim 4.72) (envelope-from ) id 1S1f71-0004g4-DJ for grep-commit@gnu.org; Sun, 26 Feb 2012 14:30:09 +0000 Date: Sun, 26 Feb 2012 14:30:09 +0000 Message-Id: To: grep-commit@gnu.org Subject: grep branch, master, updated. v2.10-79-g23c3e9c X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 9894f828d474e73b81c3c7a33323a9ca0c9914c2 X-Git-Newrev: 23c3e9cc24c7b20b55e3fa67c4d1fd599abc6e1a From: Jim Meyering X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.72 X-BeenThere: grep-commit@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: bug-grep@gnu.org List-Id: CVS commit notices for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Feb 2012 14:30:14 -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 23c3e9cc24c7b20b55e3fa67c4d1fd599abc6e1a (commit) from 9894f828d474e73b81c3c7a33323a9ca0c9914c2 (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=23c3e9cc24c7b20b55e3fa67c4d1fd599abc6e1a commit 23c3e9cc24c7b20b55e3fa67c4d1fd599abc6e1a Author: Jim Meyering Date: Sun Feb 26 15:01:09 2012 +0100 build: update submodule, bootstrap, tests/init.sh from gnulib * gl/lib/regcomp.c.diff: Adjust. * bootstrap: Update from gnulib. * tests/init.sh: Update from gnulib. diff --git a/bootstrap b/bootstrap index bb046b4..31eb651 100755 --- a/bootstrap +++ b/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh # Print a version string. -scriptversion=2012-01-22.10; # UTC +scriptversion=2012-02-11.09; # UTC # Bootstrap this package from checked-out sources. @@ -423,7 +423,7 @@ check_versions() { $use_git || continue fi # Honor $APP variables ($TAR, $AUTOCONF, etc.) - appvar=`echo $app | tr '[a-z]-' '[A-Z]_'` + appvar=`echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_'` test "$appvar" = TAR && appvar=AMTAR case $appvar in GZIP) ;; # Do not use $GZIP: it contains gzip options. @@ -604,7 +604,7 @@ if $bootstrap_sync; then fi gnulib_tool=$GNULIB_SRCDIR/gnulib-tool -<$gnulib_tool || exit +<$gnulib_tool || exit $? # Get translations. diff --git a/gl/lib/regcomp.c.diff b/gl/lib/regcomp.c.diff index 63fc187..e965673 100644 --- a/gl/lib/regcomp.c.diff +++ b/gl/lib/regcomp.c.diff @@ -11,7 +11,7 @@ index d5968bd..4926676 100644 char *_Restrict_ errbuf, size_t errbuf_size) #endif { -@@ -1383,7 +1383,7 @@ calc_first (void *extra, bin_tree_t *node) +@@ -1415,7 +1415,7 @@ calc_first (void *extra, bin_tree_t *node) /* Pass 2: compute NEXT on the tree. Preorder visit. */ static reg_errcode_t @@ -20,17 +20,20 @@ index d5968bd..4926676 100644 { switch (node->token.type) { -@@ -2744,7 +2744,8 @@ static reg_errcode_t +@@ -2792,8 +2792,10 @@ build_range_exp (const reg_syntax_t synt + static reg_errcode_t internal_function - build_collating_symbol (bitset_t sbcset, # ifdef RE_ENABLE_I18N -- re_charset_t *mbcset, Idx *coll_sym_alloc, -+ re_charset_t *mbcset _UNUSED_PARAMETER_, +-build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset, +- Idx *coll_sym_alloc, const unsigned char *name) ++build_collating_symbol (bitset_t sbcset, ++ re_charset_t *mbcset _UNUSED_PARAMETER_, + Idx *coll_sym_alloc _UNUSED_PARAMETER_, - # endif - const unsigned char *name) - { -@@ -3323,7 +3324,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, ++ const unsigned char *name) + # else /* not RE_ENABLE_I18N */ + build_collating_symbol (bitset_t sbcset, const unsigned char *name) + # endif /* not RE_ENABLE_I18N */ +@@ -3377,7 +3379,8 @@ parse_bracket_exp (re_string_t *regexp, static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, @@ -40,19 +43,20 @@ index d5968bd..4926676 100644 reg_syntax_t syntax, bool accept_hyphen) { #ifdef RE_ENABLE_I18N -@@ -3410,8 +3412,9 @@ parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, +@@ -3464,8 +3467,10 @@ parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, static reg_errcode_t #ifdef RE_ENABLE_I18N -build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, - Idx *equiv_class_alloc, const unsigned char *name) -+build_equiv_class (bitset_t sbcset, re_charset_t *mbcset _UNUSED_PARAMETER_, ++build_equiv_class (bitset_t sbcset, ++ re_charset_t *mbcset _UNUSED_PARAMETER_, + Idx *equiv_class_alloc _UNUSED_PARAMETER_, + const unsigned char *name) #else /* not RE_ENABLE_I18N */ build_equiv_class (bitset_t sbcset, const unsigned char *name) #endif /* not RE_ENABLE_I18N */ -@@ -3816,7 +3819,7 @@ free_token (re_token_t *node) +@@ -3869,7 +3874,7 @@ free_token (re_token_t *node) and its children. */ static reg_errcode_t diff --git a/gnulib b/gnulib index 6f37b9d..9a25aef 160000 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 6f37b9dd8977f231e79d7a69277ed8a43af9625c +Subproject commit 9a25aef6918949dd5c7f5e9209409db9aa5b145b diff --git a/tests/init.sh b/tests/init.sh index 5985552..ae86714 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -255,7 +255,10 @@ compare_dev_null_ () return 2 } -if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null`; then +if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null` \ + && diff -u Makefile "$0" 2>/dev/null | grep '^[+]#!' >/dev/null; then + # diff accepts the -u option and does not (like AIX 7 'diff') produce an + # extra space on column 1 of every content line. if test -z "$diff_out_"; then compare_ () { diff -u "$@"; } else ----------------------------------------------------------------------- Summary of changes: bootstrap | 6 +++--- gl/lib/regcomp.c.diff | 28 ++++++++++++++++------------ gnulib | 2 +- tests/init.sh | 5 ++++- 4 files changed, 24 insertions(+), 17 deletions(-) hooks/post-receive -- grep From MAILER-DAEMON Wed Feb 29 03:56:14 2012 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1S2fKX-000345-VJ for mharc-grep-commit@gnu.org; Wed, 29 Feb 2012 03:56:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2fKN-0002lx-5y for grep-commit@gnu.org; Wed, 29 Feb 2012 03:56:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2fKE-0008Uh-Kj for grep-commit@gnu.org; Wed, 29 Feb 2012 03:56:02 -0500 Received: from vcs.savannah.gnu.org ([140.186.70.72]:57462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2fKE-0008UR-HH for grep-commit@gnu.org; Wed, 29 Feb 2012 03:55:54 -0500 Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72) (envelope-from ) id 1S2fKD-0002au-7n for grep-commit@gnu.org; Wed, 29 Feb 2012 08:55:53 +0000 Date: Wed, 29 Feb 2012 08:55:53 +0000 Message-Id: To: grep-commit@gnu.org Subject: grep branch, master, updated. v2.10-80-g3732fd2 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 23c3e9cc24c7b20b55e3fa67c4d1fd599abc6e1a X-Git-Newrev: 3732fd2b98692a1e58fa7254fc0cacab8136fb11 From: Paul Eggert X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.72 X-BeenThere: grep-commit@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: bug-grep@gnu.org List-Id: CVS commit notices for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Feb 2012 08:56:13 -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 3732fd2b98692a1e58fa7254fc0cacab8136fb11 (commit) from 23c3e9cc24c7b20b55e3fa67c4d1fd599abc6e1a (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=3732fd2b98692a1e58fa7254fc0cacab8136fb11 commit 3732fd2b98692a1e58fa7254fc0cacab8136fb11 Author: Paul Eggert Date: Sun Feb 26 11:28:37 2012 -0800 maint: use gnulib _Noreturn rather than __attribute__ ((noreturn)) * src/grep.h (__attribute__): Remove. * src/dfa.h (__attribute__): Likewise. (dfaerror): Use noreturn rather than __attribute__ ((noreturn)). * src/main.c (usage): Likewise. diff --git a/src/dfa.h b/src/dfa.h index 17a4778..351a470 100644 --- a/src/dfa.h +++ b/src/dfa.h @@ -18,10 +18,6 @@ /* Written June, 1988 by Mike Haertel */ -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6) || __STRICT_ANSI__ -# define __attribute__(x) -#endif - /* Element of a list of strings, at least one of which is known to appear in any R.E. matching the DFA. */ struct dfamust @@ -99,4 +95,4 @@ extern void dfawarn (const char *); /* dfaerror() is called by the regexp routines whenever an error occurs. It takes a single argument, a NUL-terminated string describing the error. The user must supply a dfaerror. */ -extern void dfaerror (const char *) __attribute__ ((noreturn)); +extern _Noreturn void dfaerror (const char *); diff --git a/src/grep.h b/src/grep.h index 744a889..f5ab8bf 100644 --- a/src/grep.h +++ b/src/grep.h @@ -20,10 +20,6 @@ #ifndef GREP_GREP_H #define GREP_GREP_H 1 -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6) || __STRICT_ANSI__ -# define __attribute__(x) -#endif - /* Function pointer types. */ typedef void (*compile_fp_t) (char const *, size_t); typedef size_t (*execute_fp_t) (char const *, size_t, size_t *, char const *); diff --git a/src/main.c b/src/main.c index e593871..6151cac 100644 --- a/src/main.c +++ b/src/main.c @@ -1432,7 +1432,7 @@ grepdir (char const *dir, struct stats const *stats) return status; } -void usage (int status) __attribute__ ((noreturn)); +_Noreturn void usage (int); void usage (int status) { ----------------------------------------------------------------------- Summary of changes: src/dfa.h | 6 +----- src/grep.h | 4 ---- src/main.c | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) hooks/post-receive -- grep