@@ -818,8 +818,7 @@ typedef enum
818818 REG_ESIZE , /* Compiled pattern bigger than 2^16 bytes. */
819819 REG_ERPAREN , /* Unmatched ) or \); not returned from regcomp. */
820820 REG_ERANGEX , /* Range striding over charsets. */
821- REG_ESIZEBR , /* n or m too big in \{n,m\} */
822- REG_ECLASSBR , /* Missing [] around [:class:]. */
821+ REG_ESIZEBR /* n or m too big in \{n,m\} */
823822} reg_errcode_t ;
824823
825824static const char * re_error_msgid [] =
@@ -843,7 +842,6 @@ static const char *re_error_msgid[] =
843842 [REG_ERPAREN ] = "Unmatched ) or \\)" ,
844843 [REG_ERANGEX ] = "Range striding over charsets" ,
845844 [REG_ESIZEBR ] = "Invalid content of \\{\\}" ,
846- [REG_ECLASSBR ] = "Class syntax is [[:digit:]]; missing brackets" ,
847845 };
848846
849847/* For 'regs_allocated'. */
@@ -2002,23 +2000,6 @@ regex_compile (re_char *pattern, ptrdiff_t size,
20022000
20032001 laststart = b ;
20042002
2005- /* Check for the mistake of forgetting the extra square brackets,
2006- as in "[:alpha:]". */
2007- if (* p == ':' )
2008- {
2009- re_char * q = p + 1 ;
2010- while (q != pend && * q != ']' )
2011- {
2012- if (* q == ':' )
2013- {
2014- if (q + 1 != pend && q [1 ] == ']' && q > p + 1 )
2015- FREE_STACK_RETURN (REG_ECLASSBR );
2016- break ;
2017- }
2018- q ++ ;
2019- }
2020- }
2021-
20222003 /* Test '*p == '^' twice, instead of using an if
20232004 statement, so we need only one BUF_PUSH. */
20242005 BUF_PUSH (* p == '^' ? charset_not : charset );
0 commit comments