Mercurial > gnulib
changeset 18621:fd76a0964db1
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.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Fri, 30 Dec 2016 00:57:21 -0800 |
parents | 1c30554fd1dc |
children | 7faf67396166 |
files | ChangeLog lib/dfa.c |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Dec 30 00:42:22 2016 -0800 +++ b/ChangeLog Fri Dec 30 00:57:21 2016 -0800 @@ -1,5 +1,10 @@ 2016-12-30 Paul Eggert <eggert@cs.ucla.edu> + 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
--- a/lib/dfa.c Fri Dec 30 00:42:22 2016 -0800 +++ b/lib/dfa.c Fri Dec 30 00:57:21 2016 -0800 @@ -353,7 +353,7 @@ 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 @@ 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