(regex_compile): Last patch wasn't entirely correct.
authordrepper <drepper>
Wed, 25 Mar 1998 10:25:54 +0000 (10:25 +0000)
committerdrepper <drepper>
Wed, 25 Mar 1998 10:25:54 +0000 (10:25 +0000)
posix/regex.c

index 8c259d9..0778bb8 100644 (file)
@@ -2171,14 +2171,14 @@ regex_compile (pattern, size, syntax, bufp)
                     for (;;)
                       {
                         PATFETCH (c);
                     for (;;)
                       {
                         PATFETCH (c);
-                        if (c == ':' || c == ']' || !isalpha (c) || p == pend
+                        if ((c == ':' && *p == ']') || p == pend
                             || c1 == CHAR_CLASS_MAX_LENGTH)
                           break;
                         str[c1++] = c;
                       }
                     str[c1] = '\0';
 
                             || c1 == CHAR_CLASS_MAX_LENGTH)
                           break;
                         str[c1++] = c;
                       }
                     str[c1] = '\0';
 
-                    /* If isn't a word bracketed by `[:' and:`]':
+                    /* If isn't a word bracketed by `[:' and `:]':
                        undo the ending character, the letters, and leave
                        the leading `:' and `[' (but set bits for them).  */
                     if (c == ':' && *p == ']')
                        undo the ending character, the letters, and leave
                        the leading `:' and `[' (but set bits for them).  */
                     if (c == ':' && *p == ']')