* lib/dfa.c (struct regex_syntax.sbit): (struct dfa.success): Use char, not int, for array elements, since they are all in the range 0..7. --- ChangeLog | 5 +++++ lib/dfa.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog index db2817f..6dfa3c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2016-12-30 Paul Eggert <[email protected]> + dfa: shorten sbit, success + * lib/dfa.c (struct regex_syntax.sbit): + (struct dfa.success): Use char, not int, for array elements, since + they are all in the range 0..7. + dfa: simplify multibyte_prop etc. This follows up on a change made when dfa.c was in grep, namely grep commit c797046c7c13c2647182b919a79a4c5b4ecf82b1 diff --git a/lib/dfa.c b/lib/dfa.c index c5c1d7f..41be5a9 100644 --- a/lib/dfa.c +++ b/lib/dfa.c @@ -353,7 +353,7 @@ struct regex_syntax unsigned char eolbyte; /* Cache of char-context values. */ - int sbit[NOTCHAR]; + char sbit[NOTCHAR]; /* If never_trail[B], the byte B cannot be a non-initial byte in a multibyte character. */ @@ -501,7 +501,7 @@ struct dfa on a state that potentially could do so. If trans[i] is non-null, fails[i] must be null. */ - int *success; /* Table of acceptance conditions used in + char *success; /* Table of acceptance conditions used in dfaexec and computed in build_state. */ state_num *newlines; /* Transitions on newlines. The entry for a newline in any transition table is always -- 2.7.4
