/[emacs]/emacs/src/regex.c
ViewVC logotype

Diff of /emacs/src/regex.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.197 by rms, Sun Dec 5 23:34:16 2004 UTC revision 1.198 by monnier, Mon Dec 6 00:41:40 2004 UTC
# Line 1950  struct range_table_work_area Line 1950  struct range_table_work_area
1950    
1951  /* Get the next unsigned number in the uncompiled pattern.  */  /* Get the next unsigned number in the uncompiled pattern.  */
1952  #define GET_UNSIGNED_NUMBER(num)                                        \  #define GET_UNSIGNED_NUMBER(num)                                        \
1953   do { if (p != pend)                                                    \    do {                                                                  \
1954       {                                                                  \      if (p == pend)                                                      \
1955         PATFETCH (c);                                                    \        FREE_STACK_RETURN (REG_EBRACE);                                   \
1956         if (c == ' ')                                                    \      else                                                                \
1957           FREE_STACK_RETURN (REG_BADBR);                                 \        {                                                                 \
1958         while ('0' <= c && c <= '9')                                     \          PATFETCH (c);                                                   \
1959           {                                                              \          while ('0' <= c && c <= '9')                                    \
1960             int prev;                                                    \            {                                                             \
1961             if (num < 0)                                                 \              int prev;                                                   \
1962               num = 0;                                                   \              if (num < 0)                                                \
1963             prev = num;                                                  \                num = 0;                                                  \
1964             num = num * 10 + c - '0';                                    \              prev = num;                                                 \
1965             if (num / 10 != prev)                                        \              num = num * 10 + c - '0';                                   \
1966               FREE_STACK_RETURN (REG_BADBR);                             \              if (num / 10 != prev)                                       \
1967             if (p == pend)                                               \                FREE_STACK_RETURN (REG_BADBR);                            \
1968               break;                                                     \              if (p == pend)                                              \
1969             PATFETCH (c);                                                \                FREE_STACK_RETURN (REG_EBRACE);                           \
1970           }                                                              \              PATFETCH (c);                                               \
1971         if (c == ' ')                                                    \            }                                                             \
1972           FREE_STACK_RETURN (REG_BADBR);                                 \        }                                                                 \
1973         }                                                                \    } while (0)
     } while (0)  
1974    
1975  #if ! WIDE_CHAR_SUPPORT  #if ! WIDE_CHAR_SUPPORT
1976    
# Line 3234  regex_compile (pattern, size, syntax, bu Line 3233  regex_compile (pattern, size, syntax, bu
3233    
3234                  beg_interval = p;                  beg_interval = p;
3235    
                 if (p == pend)  
                   FREE_STACK_RETURN (REG_EBRACE);  
   
3236                  GET_UNSIGNED_NUMBER (lower_bound);                  GET_UNSIGNED_NUMBER (lower_bound);
3237    
3238                  if (c == ',')                  if (c == ',')
# Line 3253  regex_compile (pattern, size, syntax, bu Line 3249  regex_compile (pattern, size, syntax, bu
3249                    {                    {
3250                      if (c != '\\')                      if (c != '\\')
3251                        FREE_STACK_RETURN (REG_BADBR);                        FREE_STACK_RETURN (REG_BADBR);
3252                        if (p == pend)
3253                          FREE_STACK_RETURN (REG_EESCAPE);
3254                      PATFETCH (c);                      PATFETCH (c);
3255                    }                    }
3256    

Legend:
Removed from v.1.197  
changed lines
  Added in v.1.198

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26