]> Savannah Git Hosting - gnulib.git/commitdiff
dfa: shorten sbit, success
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 30 Dec 2016 08:57:21 +0000 (00:57 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 30 Dec 2016 09:02:50 +0000 (01:02 -0800)
* 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
lib/dfa.c

index db2817fd386f0caede6b167a243c70ea23b484cb..6dfa3c7e8a52bceced773309be00004bfc636941 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index c5c1d7f942e9654d3cbfc038111595d979c29a42..41be5a943348fc0da807c2349fe6dc1f8b022ce8 100644 (file)
--- 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