[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, gawk-4.0-stable, updated. dbce70b09d1a8a
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, gawk-4.0-stable, updated. dbce70b09d1a8a34c91d968aea196fdc1a979dbf |
Date: |
Fri, 16 Sep 2011 10:19: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 "gawk".
The branch, gawk-4.0-stable has been updated
via dbce70b09d1a8a34c91d968aea196fdc1a979dbf (commit)
from 86d47bad93db0031e87f09afabaceebd90ffea02 (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.sv.gnu.org/cgit/gawk.git/commit/?id=dbce70b09d1a8a34c91d968aea196fdc1a979dbf
commit dbce70b09d1a8a34c91d968aea196fdc1a979dbf
Author: Arnold D. Robbins <address@hidden>
Date: Fri Sep 16 13:19:23 2011 +0300
More updates from gnu grep in dfa.c.
diff --git a/ChangeLog b/ChangeLog
index 924ef82..0a2d55a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-09-16 Arnold D. Robbins <address@hidden>
+
+ * dfa.c: Sync with GNU grep.
+
2011-09-03 Arnold D. Robbins <address@hidden>
* dfa.c: Sync with GNU grep.
diff --git a/dfa.c b/dfa.c
index 02bdd89..ce5e944 100644
--- a/dfa.c
+++ b/dfa.c
@@ -2866,11 +2866,9 @@ transit_state_singlebyte (struct dfa *d, int s, unsigned
char const *p,
return rval;
}
-/* Check whether period can match or not in the current context. If it can,
- return the amount of the bytes with which period can match, otherwise
- return 0.
- `pos' is the position of the period. `idx' is the index from the
- buf_begin, and it is the current position in the buffer. */
+/* Match a "." against the current context. buf_begin[IDX] is the
+ current position. Return the length of the match, in bytes.
+ POS is the position of the ".". */
static int
match_anychar (struct dfa *d, int s, position pos, int idx)
{
@@ -2906,11 +2904,10 @@ match_anychar (struct dfa *d, int s, position pos, int
idx)
return mbclen;
}
-/* Check whether bracket expression can match or not in the current context.
- If it can, return the amount of the bytes with which expression can match,
- otherwise return 0.
- `pos' is the position of the bracket expression. `idx' is the index
- from the buf_begin, and it is the current position in the buffer. */
+/* Match a bracket expression against the current context.
+ buf_begin[IDX] is the current position.
+ Return the length of the match, in bytes.
+ POS is the position of the bracket expression. */
static int
match_mb_charset (struct dfa *d, int s, position pos, int idx)
{
@@ -3258,7 +3255,7 @@ char *
dfaexec (struct dfa *d, char const *begin, char *end,
int newline, int *count, int *backref)
{
- int s, s1, tmp; /* Current state. */
+ int s, s1; /* Current state. */
unsigned char const *p; /* Current input character. */
int **trans, *t; /* Copy of d->trans so it can be optimized
into a register. */
@@ -3333,14 +3330,16 @@ dfaexec (struct dfa *d, char const *begin, char *end,
}
else
#endif /* MBS_SUPPORT */
- while ((t = trans[s]) != 0) { /* hand-optimized loop */
- s1 = t[*p++];
- if ((t = trans[s1]) == 0) {
- tmp = s ; s = s1 ; s1 = tmp ; /* swap */
- break;
+ while ((t = trans[s]) != 0)
+ {
+ s1 = t[*p++];
+ if ((t = trans[s1]) == 0)
+ {
+ int tmp = s; s = s1; s1 = tmp; /* swap */
+ break;
+ }
+ s = t[*p++];
}
- s = t[*p++];
- }
if (s >= 0 && (char *) p <= end && d->fails[s])
{
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 4 ++++
dfa.c | 35 +++++++++++++++++------------------
2 files changed, 21 insertions(+), 18 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, gawk-4.0-stable, updated. dbce70b09d1a8a34c91d968aea196fdc1a979dbf,
Arnold Robbins <=