diff options
| author | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-07-09 16:47:01 +0000 |
|---|---|---|
| committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-07-09 16:47:01 +0000 |
| commit | 62a21af8006ab04282fdc354c5b4dc765f56d058 (patch) | |
| tree | 568761d58289238aa14cced3f0010809d4d28c00 /libc/misc/regex | |
| parent | ef250238dc1572caf859c2b64652f9cdfb0d9e42 (diff) | |
| download | uClibc-alpine-62a21af8006ab04282fdc354c5b4dc765f56d058.tar.bz2 uClibc-alpine-62a21af8006ab04282fdc354c5b4dc765f56d058.tar.xz | |
BIG BIG commit: all left files merged from trunk [rev 22714]. Currenntly NPTL sh4 port build and work fine. All committed to allow Khem Ray working on a working branch to integrate the ARM nptl port. MIPS nptl port not tested but should still building and working fine. There are some other part non yet merged with trunk (misc/internals and some headers file that need some more work). Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libc/misc/regex')
| -rw-r--r-- | libc/misc/regex/regex.c | 22 | ||||
| -rw-r--r-- | libc/misc/regex/regex_internal.h | 2 | ||||
| -rw-r--r-- | libc/misc/regex/regex_old.c | 26 |
3 files changed, 24 insertions, 26 deletions
diff --git a/libc/misc/regex/regex.c b/libc/misc/regex/regex.c index f39492bdf..10229a265 100644 --- a/libc/misc/regex/regex.c +++ b/libc/misc/regex/regex.c @@ -69,7 +69,7 @@ libc_hidden_proto(wctype) #ifdef __UCLIBC_HAS_XLOCALE__ libc_hidden_proto(__ctype_b_loc) libc_hidden_proto(__ctype_toupper_loc) -#elif __UCLIBC_HAS_CTYPE_TABLES__ +#elif defined __UCLIBC_HAS_CTYPE_TABLES__ libc_hidden_proto(__ctype_b) libc_hidden_proto(__ctype_toupper) #else @@ -77,19 +77,19 @@ libc_hidden_proto(isascii) #endif libc_hidden_proto(toupper) libc_hidden_proto(tolower) -libc_hidden_proto(memcmp) -libc_hidden_proto(memcpy) -libc_hidden_proto(memmove) -libc_hidden_proto(memset) -libc_hidden_proto(strchr) -libc_hidden_proto(strcmp) -libc_hidden_proto(strlen) -libc_hidden_proto(strncpy) +/* Experimentally off - libc_hidden_proto(memcmp) */ +/* Experimentally off - libc_hidden_proto(memcpy) */ +/* Experimentally off - libc_hidden_proto(memmove) */ +/* Experimentally off - libc_hidden_proto(memset) */ +/* Experimentally off - libc_hidden_proto(strchr) */ +/* Experimentally off - libc_hidden_proto(strcmp) */ +/* Experimentally off - libc_hidden_proto(strlen) */ +/* Experimentally off - libc_hidden_proto(strncpy) */ libc_hidden_proto(getenv) -libc_hidden_proto(strcasecmp) +/* Experimentally off - libc_hidden_proto(strcasecmp) */ libc_hidden_proto(abort) #ifdef __USE_GNU -libc_hidden_proto(mempcpy) +/* Experimentally off - libc_hidden_proto(mempcpy) */ #endif #endif diff --git a/libc/misc/regex/regex_internal.h b/libc/misc/regex/regex_internal.h index a0dd28247..af38acc42 100644 --- a/libc/misc/regex/regex_internal.h +++ b/libc/misc/regex/regex_internal.h @@ -386,7 +386,7 @@ static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, internal_function; #ifdef RE_ENABLE_I18N static void build_wcs_buffer (re_string_t *pstr) internal_function; -static int build_wcs_upper_buffer (re_string_t *pstr) internal_function; +static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) internal_function; #endif /* RE_ENABLE_I18N */ static void build_upper_buffer (re_string_t *pstr) internal_function; static void re_string_translate_buffer (re_string_t *pstr) internal_function; diff --git a/libc/misc/regex/regex_old.c b/libc/misc/regex/regex_old.c index cf5843ec5..dc5781967 100644 --- a/libc/misc/regex/regex_old.c +++ b/libc/misc/regex/regex_old.c @@ -35,17 +35,18 @@ #include <stdlib.h> #include <stdint.h> #include <string.h> +#include <unistd.h> #include <stdio.h> -libc_hidden_proto(memset) -libc_hidden_proto(memcmp) -libc_hidden_proto(memcpy) -libc_hidden_proto(strcmp) -libc_hidden_proto(strlen) +/* Experimentally off - libc_hidden_proto(memset) */ +/* Experimentally off - libc_hidden_proto(memcmp) */ +/* Experimentally off - libc_hidden_proto(memcpy) */ +/* Experimentally off - libc_hidden_proto(strcmp) */ +/* Experimentally off - libc_hidden_proto(strlen) */ libc_hidden_proto(printf) libc_hidden_proto(abort) #ifdef __USE_GNU -libc_hidden_proto(mempcpy) +/* Experimentally off - libc_hidden_proto(mempcpy) */ #endif /* AIX requires this to be the first thing in the file. */ @@ -794,7 +795,7 @@ PREFIX(extract_number_and_incr) (destination, source) /* It is useful to test things that ``must'' be true when debugging. */ # include <assert.h> -static int debug; +static smallint debug; # define DEBUG_STATEMENT(e) e # define DEBUG_PRINT1(x) if (debug) printf (x) @@ -5128,7 +5129,7 @@ strong_alias(__re_search_2, re_search_2) #ifdef MATCH_MAY_ALLOCATE # define FREE_VAR(var) if (var) REGEX_FREE (var); var = NULL #else -# define FREE_VAR(var) if (var) free (var); var = NULL +# define FREE_VAR(var) free (var); var = NULL #endif #ifdef WCHAR @@ -8309,20 +8310,17 @@ void regfree (preg) regex_t *preg; { - if (preg->buffer != NULL) - free (preg->buffer); + free (preg->buffer); preg->buffer = NULL; preg->allocated = 0; preg->used = 0; - if (preg->fastmap != NULL) - free (preg->fastmap); + free (preg->fastmap); preg->fastmap = NULL; preg->fastmap_accurate = 0; - if (preg->translate != NULL) - free (preg->translate); + free (preg->translate); preg->translate = NULL; } #if defined _LIBC || defined __UCLIBC__ |
