diff options
Diffstat (limited to 'regex')
-rw-r--r-- | regex/.cvsignore | 5 | ||||
-rw-r--r--[-rwxr-xr-x] | regex/CMakeLists.txt | 12 | ||||
-rw-r--r-- | regex/Makefile.am | 3 | ||||
-rwxr-xr-x | regex/make-ccc | 3 | ||||
-rw-r--r-- | regex/regcomp.c | 72 | ||||
-rw-r--r-- | regex/regcomp.ih | 5 | ||||
-rw-r--r-- | regex/regex2.h | 4 |
7 files changed, 4 insertions, 100 deletions
diff --git a/regex/.cvsignore b/regex/.cvsignore deleted file mode 100644 index a9cd65d8ba0..00000000000 --- a/regex/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -re diff --git a/regex/CMakeLists.txt b/regex/CMakeLists.txt index 2e3b18c7bb0..83c13015671 100755..100644 --- a/regex/CMakeLists.txt +++ b/regex/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2006 MySQL AB +# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -11,15 +11,9 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX") -SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX") +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) SET(REGEX_SOURCES regcomp.c regerror.c regexec.c regfree.c reginit.c) - -IF(NOT SOURCE_SUBLIBS) - ADD_LIBRARY(regex ${REGEX_SOURCES}) -ENDIF(NOT SOURCE_SUBLIBS) +ADD_CONVENIENCE_LIBRARY(regex ${REGEX_SOURCES}) diff --git a/regex/Makefile.am b/regex/Makefile.am index e2304ff7309..0fd62a777f6 100644 --- a/regex/Makefile.am +++ b/regex/Makefile.am @@ -31,6 +31,3 @@ test: re tests ./re < tests ./re -el < tests ./re -er < tests - -# Don't update the files from bitkeeper -%::SCCS/s.% diff --git a/regex/make-ccc b/regex/make-ccc deleted file mode 100755 index 561c5a9bddc..00000000000 --- a/regex/make-ccc +++ /dev/null @@ -1,3 +0,0 @@ -ccc -DHAVE_CONFIG_H -I. -I. -I.. -I./../include -I../include -O -DDBUG_OFF -fast -O3 -c regerror.c regcomp.c regexec.c regfree.c reginit.c -rm libregex.a -ar -cr libregex.a regerror.o diff --git a/regex/regcomp.c b/regex/regcomp.c index 81c435ed552..b41a1ae6da9 100644 --- a/regex/regcomp.c +++ b/regex/regcomp.c @@ -285,18 +285,6 @@ register struct parse *p; EMIT(ORPAREN, subno); if(MUSTEAT(')', REG_EPAREN)) {} break; -#ifndef POSIX_MISTAKE - case ')': /* happens only if no current unmatched ( */ - /* - * You may ask, why the ifndef? Because I didn't notice - * this until slightly too late for 1003.2, and none of the - * other 1003.2 regular-expression reviewers noticed it at - * all. So an unmatched ) is legal POSIX, at least until - * we can get it fixed. - */ - SETERROR(REG_EPAREN); - break; -#endif case '^': EMIT(OBOL, 0); p->g->iflags |= USEBOL; @@ -1228,66 +1216,6 @@ register char *cp; } #endif -#ifdef NOT_USED -/* - - mcsub - subtract a collating element from a cset - == static void mcsub(register cset *cs, register char *cp); - */ -static void -mcsub(cs, cp) -register cset *cs; -register char *cp; -{ - register char *fp = mcfind(cs, cp); - register size_t len = strlen(fp); - - assert(fp != NULL); - (void) memmove(fp, fp + len + 1, - cs->smultis - (fp + len + 1 - cs->multis)); - cs->smultis -= len; - - if (cs->smultis == 0) { - free(cs->multis); - cs->multis = NULL; - return; - } - - cs->multis = realloc(cs->multis, cs->smultis); - assert(cs->multis != NULL); -} - -/* - - mcin - is a collating element in a cset? - == static int mcin(register cset *cs, register char *cp); - */ -static int -mcin(cs, cp) -register cset *cs; -register char *cp; -{ - return(mcfind(cs, cp) != NULL); -} - -/* - - mcfind - find a collating element in a cset - == static char *mcfind(register cset *cs, register char *cp); - */ -static char * -mcfind(cs, cp) -register cset *cs; -register char *cp; -{ - register char *p; - - if (cs->multis == NULL) - return(NULL); - for (p = cs->multis; *p != '\0'; p += strlen(p) + 1) - if (strcmp(cp, p) == 0) - return(p); - return(NULL); -} -#endif - /* - mcinvert - invert the list of collating elements in a cset == static void mcinvert(register struct parse *p, register cset *cs); diff --git a/regex/regcomp.ih b/regex/regcomp.ih index 5deba89217a..cb93286e32f 100644 --- a/regex/regcomp.ih +++ b/regex/regcomp.ih @@ -30,11 +30,6 @@ static int nch(register struct parse *p, register cset *cs); #ifdef USE_ORIG_REGEX_CODE static void mcadd(register struct parse *p, register cset *cs, register char *cp); #endif -#ifdef NOT_USED -static void mcsub(register cset *cs, register char *cp); -static int mcin(register cset *cs, register char *cp); -static char *mcfind(register cset *cs, register char *cp); -#endif static void mcinvert(register struct parse *p, register cset *cs); static void mccase(register struct parse *p, register cset *cs); static int isinsets(register struct re_guts *g, int c); diff --git a/regex/regex2.h b/regex/regex2.h index bba54ea2054..2ab32c62da8 100644 --- a/regex/regex2.h +++ b/regex/regex2.h @@ -83,9 +83,7 @@ typedef long sopno; * a string of multi-character elements, and decide the size of the * vectors at run time. */ -#ifdef __WIN__ -typedef unsigned char uch ; -#endif + typedef struct { uch *ptr; /* -> uch [csetsize] */ |