bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] dfa: spell out "unsigned int"


From: Paolo Bonzini
Subject: [PATCH] dfa: spell out "unsigned int"
Date: Wed, 17 Mar 2010 15:45:32 +0100

* dfa.c (setbit, tstbit, clrbit, setbit_case_fold, lex, dfaoptimize,
free_mbdata): Put "int" after unsigned.
* dfa.h (struct position, struct dfa): Likewise.
---
 src/dfa.c |   16 ++++++++--------
 src/dfa.h |    6 +++---
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/dfa.c b/src/dfa.c
index 919f349..d0b7f2f 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -158,19 +158,19 @@ prtok (token t)
 /* Stuff pertaining to charclasses. */
 
 static int
-tstbit (unsigned b, charclass c)
+tstbit (unsigned int b, charclass c)
 {
   return c[b / INTBITS] & 1 << b % INTBITS;
 }
 
 static void
-setbit (unsigned b, charclass c)
+setbit (unsigned int b, charclass c)
 {
   c[b / INTBITS] |= 1 << b % INTBITS;
 }
 
 static void
-clrbit (unsigned b, charclass c)
+clrbit (unsigned int b, charclass c)
 {
   c[b / INTBITS] &= ~(1 << b % INTBITS);
 }
@@ -243,7 +243,7 @@ dfasyntax (reg_syntax_t bits, int fold, unsigned char eol)
    For MB_CUR_MAX > 1, one or both of the two cases may not be set,
    so the resulting charset may only be used as an optimization.  */
 static void
-setbit_case_fold (unsigned b, charclass c)
+setbit_case_fold (unsigned int b, charclass c)
 {
   if (case_fold)
     {
@@ -764,7 +764,7 @@ parse_bracket_exp (void)
 static token
 lex (void)
 {
-  unsigned c, c2;
+  unsigned int c, c2;
   int backslash = 0;
   charclass ccl;
   int i;
@@ -2934,14 +2934,14 @@ dfaexec (struct dfa *d, char const *begin, char *end,
 static void
 free_mbdata (struct dfa *d)
 {
-  unsigned i;
+  unsigned int i;
 
   free(d->multibyte_prop);
   d->multibyte_prop = NULL;
 
   for (i = 0; i < d->nmbcsets; ++i)
     {
-      unsigned j;
+      unsigned int j;
       struct mb_char_classes *p = &(d->mbcsets[i]);
       free(p->chars);
       free(p->ch_classes);
@@ -3005,7 +3005,7 @@ dfainit (struct dfa *d)
 static void
 dfaoptimize (struct dfa *d)
 {
-  unsigned i;
+  unsigned int i;
   if (!using_utf8())
     return;
 
diff --git a/src/dfa.h b/src/dfa.h
index 594e25c..276a098 100644
--- a/src/dfa.h
+++ b/src/dfa.h
@@ -198,8 +198,8 @@ typedef enum
    a constraint. */
 typedef struct
 {
-  unsigned index;              /* Index into the parse array. */
-  unsigned constraint;         /* Constraint for matching this position. */
+  unsigned int index;          /* Index into the parse array. */
+  unsigned int constraint;     /* Constraint for matching this position. */
 } position;
 
 /* Sets of positions are stored as arrays. */
@@ -278,7 +278,7 @@ struct dfa
   int nregexps;                        /* Count of parallel regexps being built
                                   with dfaparse(). */
 #ifdef MBS_SUPPORT
-  unsigned mb_cur_max;         /* Cached value of MB_CUR_MAX.  */
+  unsigned int mb_cur_max;     /* Cached value of MB_CUR_MAX.  */
 
   /* The following are used only if MB_CUR_MAX > 1.  */
 
-- 
1.6.6.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]