summaryrefslogtreecommitdiff
path: root/lib/regex.c
Commit message (Collapse)AuthorAgeFilesLines
* autoupdatePaul Eggert2022-01-011-1/+1
|
* regex: also break glibc lib/regex.c link for nowPaul Eggert2021-08-271-0/+1
|
* autoupdateKarl Berry2021-08-271-1/+0
|
* regex: use C99-style array arg syntaxPaul Eggert2021-08-261-0/+1
| | | | | | | | | | | | | | | | | | | | This should help with some static checking. Derived from a suggestion by Martin Sebor in: https://sourceware.org/pipermail/libc-alpha/2021-August/130336.html This also ports recent and relevant Glibc changes to Gnulib and prepares to copy back. * lib/cdefs.h (__ARG_NELTS): New macro. * lib/regex.c: Ignore -Wvla for the whole file. * lib/regex.h (_ARG_NELTS_, _Attr_access_): New macros. Ignore -Wvla when declaring regexec. * lib/regex.h (re_compile_pattern, re_search, re_search_2) (re_match, re_match_2, regcomp, regerror): Use _Attr_access_ where that could help static checking. * lib/regexec.c (regexec, __compat_regexec, re_copy_regs) (re_search_internal, proceed_next_node, push_fail_stack) (pop_fail_stack, set_regs, update_regs): Use __ARG_NELTS for each array parameter whose size is another arg, but which might be null.
* autoupdateKarl Berry2021-01-031-1/+1
|
* regex: simplify definition of BITSET_WORD_BITSPaul Eggert2020-01-211-0/+2
| | | | | | | | * config/srclist.txt: Remove regex.c, regex_internal.h temporarily. * lib/regex.c (__STDC_WANT_IEC_60559_BFP_EXT__): Define. * lib/regex_internal.h (BITSET_WORD_BITS): * modules/regex (Depends-on): Add limits-h. Simplify now that we can use ULONG_WIDTH.
* autoupdatePaul Eggert2019-12-311-1/+1
|
* autoupdatePaul Eggert2018-12-311-1/+1
|
* autoupdatePaul Eggert2018-12-271-2/+2
|
* autoupdatePaul Eggert2018-10-141-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* regex: ignore old-style-definition warningsPaul Eggert2013-02-201-0/+1
| | | | | * lib/regex.c: Add pragma to ignore these warnings. Problem reported for GNU tar by Pavel Raiskup.
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* regex: merge glibc changesPaul Eggert2012-12-301-10/+11
| | | | | | | | | Also, copy the license wording from glibc. This simplifies merging changes. gnulib-tool will change the wording to GPL as appropriate, when importing it to other packages. The only glibc change made since the last merge, which needs merging, is: 2012-05-24 Andreas Schwab <schwab@linux-m68k.org> * lib/regex_internal.h (gettext): Remove use of INTUSE.
* regex: correct #pragma guard expressionJim Meyering2012-04-041-1/+3
| | | | | * lib/regex.c: -Wsuggest-attribute=pure was introduced in gcc-4.6, not 4.3. Correct its cpp guard expression.
* maint: replace FSF snail-mail addresses with URLsPaul Eggert2012-02-091-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * config/argz.mk, lib/accept4.c, lib/alignof.h, lib/alloca.in.h: * lib/alphasort.c, lib/arcfour.c, lib/arcfour.h, lib/arctwo.c: * lib/arctwo.h, lib/argz.c, lib/arpa_inet.in.h, lib/asnprintf.c: * lib/asprintf.c, lib/assert.in.h, lib/base32.c, lib/base32.h: * lib/base64.c, lib/base64.h, lib/c-ctype.c, lib/c-ctype.h: * lib/c-strcase.h, lib/c-strcasecmp.c, lib/c-strncasecmp.c: * lib/check-version.c, lib/check-version.h, lib/config.charset: * lib/ctype.in.h, lib/des.c, lib/des.h, lib/dup3.c, lib/errno.in.h: * lib/float+.h, lib/fnmatch.c, lib/fnmatch.in.h, lib/fnmatch_loop.c: * lib/fseeko.c, lib/gai_strerror.c, lib/gc-gnulib.c: * lib/gc-libgcrypt.c, lib/gc-pbkdf2-sha1.c, lib/gc.h: * lib/getaddrinfo.c, lib/getdelim.c, lib/getfilecon.c, lib/getline.c: * lib/getlogin_r.c, lib/getpass.c, lib/getpass.h, lib/gettext.h: * lib/gettimeofday.c, lib/glob.in.h, lib/glthread/cond.c: * lib/glthread/cond.h, lib/glthread/lock.c, lib/glthread/lock.h: * lib/glthread/thread.c, lib/glthread/thread.h: * lib/glthread/threadlib.c, lib/glthread/yield.h, lib/hmac-md5.c: * lib/hmac-sha1.c, lib/hmac.h, lib/iconv.c, lib/iconv.in.h: * lib/iconv_close.c, lib/iconv_open.c, lib/inet_ntop.c, lib/isfinite.c: * lib/isinf.c, lib/iswblank.c, lib/langinfo.in.h, lib/link.c: * lib/localcharset.c, lib/localcharset.h, lib/lseek.c, lib/malloc.c: * lib/malloca.c, lib/malloca.h, lib/md2.c, lib/md2.h, lib/md4.c: * lib/md4.h, lib/md5.c, lib/md5.h, lib/memmem.c, lib/mempcpy.c: * lib/memset.c, lib/memxor.c, lib/memxor.h, lib/minmax.h, lib/mktime.c: * lib/msvc-inval.c, lib/msvc-inval.h, lib/msvc-nothrow.c: * lib/msvc-nothrow.h, lib/netdb.in.h, lib/netinet_in.in.h, lib/nproc.c: * lib/nproc.h, lib/obstack_printf.c, lib/pathmax.h, lib/pipe.c: * lib/pipe2.c, lib/poll.c, lib/poll.in.h, lib/printf-args.c: * lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h: * lib/pselect.c, lib/pthread.in.h, lib/pty-private.h, lib/pty.in.h: * lib/read-file.c, lib/read-file.h, lib/ref-add.sin, lib/ref-del.sin: * lib/regcomp.c, lib/regex.c, lib/regex.h, lib/regex_internal.c: * lib/regex_internal.h, lib/regexec.c, lib/rijndael-alg-fst.c: * lib/rijndael-alg-fst.h, lib/rijndael-api-fst.c: * lib/rijndael-api-fst.h, lib/rint.c, lib/rintf.c, lib/rintl.c: * lib/round.c, lib/roundf.c, lib/roundl.c, lib/scandir.c, lib/select.c: * lib/sha1.c, lib/sha1.h, lib/size_max.h, lib/snprintf.c: * lib/stdalign.in.h, lib/stdarg.in.h, lib/stdbool.in.h: * lib/stddef.in.h, lib/stdint.in.h, lib/stdio.in.h, lib/str-kmp.h: * lib/str-two-way.h, lib/strcasecmp.c, lib/strcasestr.c, lib/strdup.c: * lib/striconv.c, lib/striconv.h, lib/string.in.h, lib/strings.in.h: * lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c, lib/strpbrk.c: * lib/strptime.c, lib/strsep.c, lib/strstr.c, lib/strverscmp.c: * lib/sys_file.in.h, lib/sys_ioctl.in.h, lib/sys_select.in.h: * lib/sys_socket.in.h, lib/sys_stat.in.h, lib/sys_time.in.h: * lib/sys_times.in.h, lib/sys_types.in.h, lib/sys_uio.in.h: * lib/sys_utsname.in.h, lib/sys_wait.in.h, lib/tcgetsid.c: * lib/termios.in.h, lib/time.in.h, lib/time_r.c, lib/timegm.c: * lib/times.c, lib/unictype/3level.h, lib/unictype/3levelbit.h: * lib/unistd.in.h, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c: * lib/vsnprintf.c, lib/waitpid.c, lib/wchar.in.h, lib/wctype.in.h: * lib/xsize.h, tests/test-closein.c, tests/test-des.c: * tests/test-fclose.c, tests/test-fgetc.c, tests/test-filevercmp.c: * tests/test-fputc.c, tests/test-fread.c, tests/test-fwrite.c: * tests/test-gc-arcfour.c, tests/test-gc-arctwo.c, tests/test-gc-des.c: * tests/test-gc-hmac-md5.c, tests/test-gc-hmac-sha1.c: * tests/test-gc-md2.c, tests/test-gc-md4.c, tests/test-gc-md5.c: * tests/test-gc-pbkdf2-sha1.c, tests/test-gc-rijndael.c: * tests/test-gc-sha1.c, tests/test-gc.c, tests/test-getdelim.c: * tests/test-getline.c, tests/test-getndelim2.c, tests/test-md2.c: * tests/test-md4.c, tests/test-parse-datetime.c, tests/test-perror.c: * tests/test-perror2.c, tests/test-pipe.c, tests/test-pipe2.c: * tests/test-poll.c, tests/test-quotearg-simple.c: * tests/test-quotearg.c, tests/test-quotearg.h: * tests/test-round-ieee.c, tests/test-round1.c: * tests/test-roundf-ieee.c, tests/test-roundf1.c: * tests/test-roundl-ieee.c, tests/test-roundl.c: * tests/test-safe-alloc.c, tests/test-sigpipe.c: * tests/test-spawn-pipe-child.c, tests/test-spawn-pipe-main.c: * tests/test-strerror.c, tests/test-strerror_r.c: * tests/test-strsignal.c, tests/test-strverscmp.c: * tests/test-xmemdup0.c: Replace FSF snail mail addresses with URLs, as per GNU coding standards. See glibc bug <http://sourceware.org/bugzilla/show_bug.cgi?id=13673>.
* regex: merge glibc changesPaul Eggert2012-02-071-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/regcomp.c (init_dfa): Tighten overflow checks to test for IDX_MAX too, since IDX_MAX can be much less than SIZE_MAX. (init_word_char): Work even if bitset words are not exactly 32 or 64 bits wide. Don't assume there are no padding bits. * lib/regex.c [_LIBC]: Do not include <config.h>. [!_LIBC]: Add pragmas to ignore -Wsuggest-attributes=pure and -Wtype-limits. * lib/regex.h (__USE_GNU): Renamed from __USE_GNU_REGEX, to avoid needless disagreement with glibc. All uses changed. Define it to 1 only if _GNU_SOURCE, to match glibc. (_REG_RM_NAME): Remove; no longer needed, since the names in question are now all protected by __USE_GNU. (_REG_RE_NAME): Remove; replaced by glibc's __REPB_PREFIX. (REG_TRANSLATE_TYPE): Remove; replaced by glibc's __RE_TRANSLATE_TYPE. * lib/regex_internal.h (MIN): New macro. 2012-01-03 Ulrich Drepper <drepper@gmail.com> * lib/regcomp.c (init_word_char): Optimize regex a bit. 2011-12-30 Jakub Jelinek <jakub@redhat.com> * lib/regex_internal.c (re_string_fetch_byte_case): Fix up regcomp/regexec. The problem is that parse_bracket_symbol is miscompiled, and it turns out it is because of an incorrect attribute on re_string_fetch_byte_case. Unlike re_string_peek_byte_case, this one is really not pure, it modifies memory (increments pstr->cur_idx), and with the pure attribute GCC assumed it doesn't and it cached the presumed value of regexp->cur_idx in a variable across the for (;; ++i) { if (i >= BRACKET_NAME_BUF_SIZE) return REG_EBRACK; if (token->type == OP_OPEN_CHAR_CLASS) ch = re_string_fetch_byte_case (regexp); else ch = re_string_fetch_byte (regexp); if (re_string_eoi(regexp)) return REG_EBRACK; if (ch == delim && re_string_peek_byte (regexp, 0) == ']') break; elem->opr.name[i] = ch; } 2011-11-29 Andreas Schwab <schwab@redhat.com> * lib/regcomp.c (build_equiv_class): Fix access after end of search string in regex matcher. 2011-11-12 Ulrich Drepper <drepper@redhat.com> * lib/regex_internal.c, lib/regex_internal.h: Fix warnings in regex. 2011-10-12 Ulrich Drepper <drepper@redhat.com> * lib/regcomp.c (parse_branch): One more regex memory leak fixed. 2011-10-11 Ulrich Drepper <drepper@redhat.com> * lib/regcomp.c (parse_branch, parse_sub_exp): More regex memory leak fixes and tests. (parse_sub_exp, parse_bracket_exp): Fix memory leak for some invalid regular expressions. 2011-05-28 Ulrich Drepper <drepper@gmail.com> * lib/regex_internal.c, lib/regexec.c: Fix unnecessary overallocation due to incomplete character. When incomplete characters are found at the end of a string the code ran amok and allocated lots of memory. Stricter limits are now in place. 2011-05-20 Reuben Thomas <rrt@sc3d.org> * lib/regex.h: Update documentation. 2011-05-16 Aharon Robbins <arnold@skeeve.com> * lib/regex.h: Update RE_SYNTAX*_AWK constants. 2010-05-05 Andreas Schwab <schwab@redhat.com> * lib/regexec.c (find_collation_sequence_value): Fix lookup of collation sequence value during regexp matching. 2010-01-22 Ulrich Drepper <drepper@redhat.com> * lib/regex_internal.c (re_dfa_add_node): Extend overflow detection. 2008-01-16 Ulrich Drepper <drepper@redhat.com> * lib/regex.h: Cleanup namespace. 2007-11-26 Ulrich Drepper <drepper@redhat.com> * lib/regex.h (REG_ENOSYS): Define REG_ENOSYS also for __USE_XOPEN2K. 2007-08-26 Ulrich Drepper <drepper@redhat.com> * lib/regex_internal.h: Prevent some declarations and definitions to be seen when used in tests. 2005-05-06 Ulrich Drepper <drepper@redhat.com> * lib/regex_internal.h: Include bits/libc-lock.h or define dummy __libc_lock_* macros if not _LIBC. (struct re_dfa_t): Add lock.
* maint: spelling fixesPaul Eggert2012-02-051-1/+1
|
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* regex: avoid compiler warningEric Blake2011-07-111-0/+1
| | | | | | | | | | | Although glibc leaks strcasecmp through <string.h>, this behavior is not required by POSIX, and HP NonStop needs <strings.h> * lib/regex.c (includes): Include <strings.h>, for use of strcasecmp in regcomp.c. Reported by Jachim Schmitz. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-2/+1
| | | | Run the new "make update-copyright" rule.
* update nearly all FSF copyright year lists to include 2010Jim Meyering2010-01-011-1/+2
| | | | | Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
* update nearly all FSF copyright year lists to include 2009Jim Meyering2009-12-291-1/+1
| | | | | | | | | | | | | | | | | | The files named by the following are exempted: grep -v '^#' config/srclist.txt|grep -v '^$' \ | while read src dst; do test -f "$dst" && { echo "$dst"; continue; } test -d "$dst" || continue echo "$dst"/$(basename "$src") done > exempt git ls-files tests/unictype >> exempt In the remaining files, convert to all-interval notation if - there is already at least one year interval like 2000-2003 - the file is maintained by me - the file is in lib/uni*/, where that style already prevails Otherwise, use update-copyright's default.
* * _fpending.c: Include <config.h> unconditionally, since we noPaul Eggert2006-09-131-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | longer worry about uses that don't define HAVE_CONFIG_H. * acl.c, alloca.c, argmatch.c, atexit.c, backupfile.c: * basename.c, c-stack.c, c-strtod.c, calloc.c, canon-host.c: * canonicalize.c, chdir-long.c, chdir-safer.c, chown.c: * cloexec.c, close-stream.c, closeout.c, creat-safer.c: * cycle-check.c, diacrit.c, dirchownmod.c, dirfd.c, dirname.c: * dup-safer.c, dup2.c, error.c, euidaccess.c, exclude.c: * exitfail.c, fchmodat.c, fchown-stub.c, fd-safer.c: * file-type.c, fileblocks.c, filemode.c, filenamecat.c: * fnmatch.c, fopen-safer.c, fprintftime.c, free.c, fsusage.c: * ftruncate.c, fts-cycle.c, fts.c, full-write.c, gai_strerror.c: * getcwd.c, getdate.y, getdomainname.c, getgroups.c: * gethostname.c, gethrxtime.c, getloadavg.c, getlogin_r.c: * getndelim2.c, getnline.c, getopt.c, getopt1.c, getpass.c: * gettime.c, gettimeofday.c, getugroups.c, getusershell.c: * glob.c, group-member.c, hard-locale.c, hash-pjw.c, hash.c: * human.c, idcache.c, inet_ntop.c, inet_pton.c, inttostr.c: * isdir.c, lchown.c, linebuffer.c, long-options.c, lstat.c: * malloc.c, md5.c, memcasecmp.c, memchr.c, memcmp.c, memcoll.c: * memcpy.c, memmove.c, memrchr.c, mkancesdirs.c, mkdir-p.c: * mkdir.c, mkdirat.c, mkstemp-safer.c, mkstemp.c, modechange.c: * mountlist.c, nanosleep.c, obstack.c, open-safer.c: * openat-die.c, openat.c, pagealign_alloc.c, physmem.c: * pipe-safer.c, posixtm.c, posixver.c, putenv.c, quote.c: * quotearg.c, raise.c, readtokens.c, readtokens0.c, readutmp.c: * realloc.c, regex.c, rename.c, rmdir.c, rpmatch.c, safe-read.c: * same.c, save-cwd.c, savedir.c, setenv.c, settime.c, sha1.c: * sig2str.c, snprintf.c, strdup.c, strerror.c, strftime.c: * stripslash.c, strndup.c, strnlen.c, strpbrk.c, strtod.c: * strtoimax.c, strtol.c, strverscmp.c, tempname.c, time_r.c: * timegm.c, tmpfile-safer.c, unlinkdir.c, userspec.c, utime.c: * utimecmp.c, utimens.c, version-etc-fsf.c, version-etc.c: * xalloc-die.c, xgetcwd.c, xgethostname.c, xmalloc.c: * xmemcoll.c, xnanosleep.c, xreadlink.c, xstrtod.c: * xstrtoimax.c, xstrtol.c, xstrtoumax.c, yesno.c: Likewise.
* Merge regex changes from libc, removing some of ourPaul Eggert2006-04-101-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | POSIX-conformance changes that were rejected and redoing them in a less-intrusive way. * lib/regcomp.c (re_compile_internal, init_dfa): Length arg is now size_t, not Idx. All uses changed. (peek_token): Forward decl now says internal_function. (__re_error_msgid, __re_error_msgid_idx): Now static rather than extern with attribute_hidden. (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn. For some reason libc prefers K&R style defns for external functions. (regerror) [!defined _LIBC]: Likewise. (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp): (seek_collating_symbol_entry, lookup_collation_sequence_value): (build_range_exp, build_collating_symbol): Use K&R-style defn. (re_compile_fastmap): Use '\0' to memset, not 0. (utf8_sb_map): Make the calculations more obvious. (init_dfa, parse_bracket_exp, build_charclass_op): Call calloc and cast result, as glibc does. (init_word_char, fetch_token, peek_token, peek_token_bracket): (build_range_exp, build_collating_symbol): Now internal functions. * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers. * lib/regex.h (__USE_GNU_REGEX): New macro. Don't depend on _REGEX_SOURCE any more; depend on _GNU_SOURCE instead. Don't depend on VMS; depend on __VMS instead, for POSIX namespace cleanness. (regoff_t): Define to ssize_t, not long int. Remove the REG_ macros named below. Instead, make the old names (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if __USE_GNU_REGEX. (REG_BACKSLASH_ESCAPE_IN_LISTS): (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS): (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS): (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE): (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT): (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS): (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES): (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING): (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD): (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE): (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS): (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK): (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP): (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON): (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC): (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED): (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED): (REG_NREGS): Remove. All uses replaced by the old RE_* names. (RE_BACKSLASH_ESCAPE_IN_LISTS): (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS): (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS): (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE): (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT): (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS): (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES): (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING): (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD): (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE): (RE_CONTEXT_INVALID_DUP, RE_NO_SUB): Don't bother having these macros be independent of each others' values, since they no longer exist in the POSIX name space. Rename the following member names back to their old names, unless !__USE_GNU_REGEX. All uses changed back. (buffer): Renamed from re_buffer. (allocated): Renamed from re_allocated. (used): Renamed from re_used. (syntax): Renamed from re_syntax. (fastmap): Renamed from re_fastmap. (translate): Renamed from re_translate. (can_be_null): Renamed from re_can_be_null. (regs_allocated): Renamed from re_regs_allocated. (fastmap_accurate): Renamed from re_fastmap_accurate. (no_sub): Renamed from re_no_sub. (not_bol): Renamed from re_not_bol. (not_eol): Renamed from re_not_eol. (newline_anchor): Renamed from re_newline_anchor. (num_regs): Renamed from rm_num_regs. (start): Renamed from rm_start. (end): Renamed from rm_end. (free_state): Move up a bit. * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]: #define to be empty. (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2 when that is what is intended. (SBC_MAX): Define to UCHAR_MAX + 1, not 256. (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed. (MAX): New macro. (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove. All uses changed back to re_malloc, etc. It's now the caller's responsibility to check for overflow; all callers changed. (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc): (re_x2nrealloc): Remove. (free_state): Remove decl. * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2): (re_set_registers, re_exec): Use K&R-style defn. 2006-01-31 Roland McGrath <roland@redhat.com> * lib/regcomp.c (calc_eclosure_iter): Remove dead variables. Reported by Mike Frysinger <vapier@gentoo.org>. 2006-01-15 Andreas Jaeger <aj@suse.de> [BZ #1950] * lib/regex_internal.c (re_string_reconstruct): Adjust for build_wcs_upper_buffer change. (build_wcs_upper_buffer): Change return type. 2005-12-10 Ulrich Drepper <drepper@redhat.com> * lib/regex_internal.h: Include <stdint.h> if available. 2005-12-06 Paolo Bonzini <bonzini@gnu.org> * lib/regex_internal.h (SIZE_MAX): Provide a default definition. 2005-10-14 Ulrich Drepper <drepper@redhat.com> * lib/regcomp.c: Adjust for changed secondary hash function. 2005-09-30 Ulrich Drepper <drepper@redhat.com> * lib/regex.h: Pretty printing. Clean up namespace a bit. 2005-09-30 Jakub Jelinek <jakub@redhat.com> * lib/regexec.c (update_cur_sifted_state, check_arrival, check_arrival_add_next_nodes): Avoid using uninitialized variable. 2005-09-06 Paul Eggert <eggert@cs.ucla.edu> Ulrich Drepper <drepper@redhat.com> [BZ #1302] * lib/regex_internal.h (bitset_t): Renamed from bitset. All uses changed. (bitset_word_t): Renamed from bitset_word. All uses changed. 2005-09-22 Ulrich Drepper <drepper@redhat.com> [BZ #281] * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *. * lib/regcomp.c: Remove unnecessary uses of unsigned RE_TRANSLATE_TYPE. * lib/regex_internal.h: Likewise. * lib/regex_internal.c: Likewise. * lib/regexec.c: Likewise. Based on a patch by Stepan Kasal <kasal@ucw.cz>. 2005-09-07 Ulrich Drepper <drepper@redhat.com> * lib/regexec.c (find_recover_state): Remove unnecessary initialization. (transit_state_bkref): Make DFA a const pointer. (get_subexp): Likewise. (check_arrival): Likewise. (update_cur_sifted_state): Likewise. (re_search_internal): Likewise. (prune_impossible_nodes): Likewise. (acquire_init_state_context): Likewise. (proceed_next_node): Likewise. (set_regs): Likewise. (free_fail_stack_return): Likewise. (check_arrival_expand_ecl): Mark DFA parameter as const. (check_arrival_expand_ecl_sub): Likewise. (check_subexp_limits): Likewise. (sub_epsilon_src_nodes): Likewise. (add_epsilon_src_nodes): Likewise. (merge_state_array): Likewise. (update_regs): Likewise. (build_trtable): Likewise. (sift_states_backward): Mark MCTX parameter as const. (build_sifted_states): Likewise. (update_cur_sifted_state): Likewise. (sift_states_mkref): Likewise. (check_arrival_expand_ecl): Mark eclosure as const. (check_dst_limits_calc_pos_1): Likewise. * lib/regex_internal.h (re_match_context_t): Make dfa a const pointer. 2005-09-06 Ulrich Drepper <drepper@redhat.com> * lib/regexec.c (merge_state_with_log): Define dfa as const pointer. (transit_state_sb): Likewise. (transit_state_mb): Likewise. (sift_states_iter_mb): Likewise. (check_arrival_add_next_nodes): Likewise. (check_node_accept_bytes): Change first parameter to pointer-to-const. [_LIBC] (re_search_2_stub): Use mempcpy. * lib/regex_internal.c (re_string_reconstruct): Avoid calling mbrtowc for very simple UTF-8 case. * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg a pointer-to-const. (re_acquire_state_context): Likewise. * lib/regex_internal.h: Adjust prototypes. * lib/regex.c: Prevent using C++ compilers. * lib/regex_internal.c (re_acquire_state): Minor code rearrangement. (re_acquire_state_context): Likewise.
* Use a consistent style for including <config.h>.Paul Eggert2005-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * __fpending.c, acl.c, argmatch.c, argp-help.c, argp-parse.c, argp-pvh.c, backupfile.c, basename.c, c-stack.c, calloc.c, check-version.c, cloexec.c, closeout.c, copy-file.c, creat-safer.c, cycle-check.c, dirfd.c, dirname.c, dup-safer.c, dup2.c, euidaccess.c, exclude.c, exitfail.c, fatal-signal.c, fd-safer.c, file-type.c, fileblocks.c, filemode.c, filenamecat.c, findprog.c, fnmatch.c, fopen-safer.c, free.c, fsusage.c, ftruncate.c, full-write.c, fwriteerror.c, getaddrinfo.c, getcwd.c, getdelim.c, getline.c, getlogin_r.c, getndelim2.c, getnline.c, getopt1.c, getpass.c, group-member.c, hard-locale.c, hash-pjw.c, hash.c, human.c, idcache.c, inet_ntop.c, isdir.c, long-options.c, malloc.c, memcasecmp.c, memcmp.c, memcoll.c, memcpy.c, memmove.c, mkdir-p.c, modechange.c, mountlist.c, open-safer.c, physmem.c, pipe-safer.c, pipe.c, poll.c, posixver.c, progname.c, progreloc.c, putenv.c, quote.c, quotearg.c, readline.c, readlink.c, realloc.c, regex.c, rename.c, rmdir.c, rpmatch.c, safe-read.c, same.c, save-cwd.c, savedir.c, sig2str.c, strcspn.c, strerror.c, stripslash.c, strncasecmp.c, strndup.c, strnlen.c, strnlen1.c, strsep.c, strstr.c, strtod.c, strtoimax.c, strtol.c, strverscmp.c, tempname.c, time_r.c, userspec.c, utimecmp.c, version-etc-fsf.c, version-etc.c, wait-process.c, xalloc-die.c, xgetcwd.c, xmalloc.c, xmemcoll.c, xnanosleep.c, xreadlink.c, xsetenv.c, xstrndup.c, xstrtoimax.c, xstrtol.c, xstrtoumax.c, yesno.c: Standardize inclusion of config.h. * __fpending.h, dirfd.h, getdate.h, human.h, inttostr.h: Removed inclusion of config.h from header files. * inttostr.c: Adjusted in-tree users. * timespec.h: Remove superfluous warning to include config.h. * atexit.c, chdir-long.c chown.c, fchown-stub.c, getgroups.c, gettimeofday.c, lchown.c, lstat.c, mkdir.c, mkstemp.c, nanosleep.c, openat.c, raise.c, readtokens0.c, readutmp.c, unlinkdir.c: Guard inclusion of config.h with HAVE_CONFIG_H.
* * config/srclist.txt: Add glibc bug 1245.Paul Eggert2005-08-261-24/+0
| | | | | | | | | | | | | * lib/regexec.c (set_regs): Don't alloca with an unbounded size. alloca modernization/simplification for regex. * lib/regex.c: Remove portability cruft for alloca. This no longer needs to be at the start of the file, and can be moved into regex_internal.h and simplified. * lib/regex_internal.h: Include <alloca.h>. (__libc_use_alloca) [!defined _LIBC]: New macro. * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code now works outside glibc.
* * srclist.txt: Comment out lib/regex.c. Add glibc bug 1238.Paul Eggert2005-08-241-4/+0
| | | | | * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer requires this. (The code never needed it.)
* * modules/regex (Files): Add lib/regex_internal.c,Paul Eggert2005-07-071-8266/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4. (Depends-on): Add extensions. (Makefile.am): Remove lib_SOURCES; now done by m4 code. * config/srclist.txt: Add regcomp.c, regex.c, regex.h, regex_internal.c, regexec.c. Add regex_internal.h too, but as a comment, since the libc version is currently broken in gnulib mode. * lib/regex.c, lib/regex.h: Sync from libc. * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h, lib/regexec.c: New files, synced from libc, except that regex_internal.h currently has a small porting fix. * m4/regex.m4: Adjust to new libc regex implementation. (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for all the .c and .h parts of (the new) regex. Quote the m4 stuff better. Check for RE_ICASE bug of old gnulib. Check for REG_STARTEND of recent libc. Rename local variables from jm_* to gl_*. Quote operand of "test -f". Say "recent enough" version of libc, not "version 2". (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a prerequisite module. Remove AC_HEADER_STDC; no longer needed. Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll. Remove check for btowc, isascii. Require AM_LANGINFO_CODESET.
* *** empty log message ***Paul Eggert2005-05-141-1/+1
|
* Workaround. From Albert Chin <bug-gnulib@mlists.thewrittenword.com>.Bruno Haible2005-04-261-0/+3
|
* Cast the malloc/realloc results. Needed when CC=g++.Bruno Haible2005-03-151-5/+7
|
* Avoid goto-ing inside the scope of a local variable. Needed when CC=g++.Bruno Haible2005-03-151-10/+13
|
* Rename local variable 'not'. Needed when CC=g++.Bruno Haible2005-03-151-10/+10
|
* * regex.c (re_comp): Cast gettext return value to char *,Paul Eggert2004-10-041-1/+1
|
* error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead ofSimon Josefsson2004-10-041-1/+1
| | | | '#ifdef USE_UNLOCKED_IO'.
* Remove dependencies on unlocked-io.Paul Eggert2004-10-041-1/+4
|
* alloca cleanup: always include <alloca.h>.Paul Eggert2004-05-171-8/+2
|
* Remove K&R cruft.Paul Eggert2003-09-101-358/+230
|
* change license to gpl.Karl Berry2002-11-251-11/+10
|
* Include gettext.h instead of <libintl.h> with #ifdefs.Bruno Haible2002-11-051-14/+8
|
* tweak to align with libcJim Meyering2001-12-081-4/+4
|
* [!__BOUNDED_POINTERS__]: Define away __bounded, __unbounded, and __ptrvalue.Jim Meyering2001-12-021-0/+7
|
* Merge with version from libc.Jim Meyering2001-11-271-199/+314
|
* Include unlocked-io.h.Jim Meyering2001-11-171-0/+1
|