summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/regex/regcomp.c
Commit message (Collapse)AuthorAgeFilesLines
* regex: Fix typo in CHaddrangeCorinna Vinschen2016-11-241-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Introduce __current_locale_charset/__locale_charsetCorinna Vinschen2016-08-201-2/+2
| | | | | | | | | The former __locale_charset always fetched the current locale's charset. We need the per-locale charset, too, in future. Rename __locale_charset to __current_locale_charset and change __locale_charset to take a locale_t as parameter. Accommodate througout. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* POSIX-1.2008 per-thread locales, groundwork part 2Corinna Vinschen2016-08-151-6/+2
| | | | | | | | | Move all locale category structure definitions into setlocale.h and remove other headers in locale subdir. Create inline accessor functions for current category struct pointers and use throughout. Use pointers to "C" locale category structs by default in __global_locale. Signed-off by: Corinna Vinschen <corinna@vinschen.de>
* POSIX-1.2008 per-thread locales, groundwork part 1Corinna Vinschen2016-08-151-4/+3
| | | | | | | | | | | | | | | | Introduce first cut of struct _thr_locale_t used for the locale_t definition. Introduce global instance called __global_locale used by default. Introduce internal inline functions __get_global_locale, __get_locale_r, __get_current_locale. Remove usage of global variables in favor of accessor functions pointing to __global_locale for now. Include all local headers in locale subdir from setlocale.h to get single include for internal locale access. Introduce __CTYPE_PTR macro to replace direct access to __ctype_ptr__ and use throughout in isxxx functions. Signed-off by: Corinna Vinschen <corinna@vinschen.de>
* Fix compiler errors/warnings when compiling with -O3Corinna Vinschen2015-10-201-1/+1
| | | | | | | | | * fhandler_socket.cc (fhandler_socket::wait_for_events): Fix compiler warning in -O3 case. (fhandler_socket::connect): Ditto. * regex/regcomp.c (singleton): Ditto. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* * regex/regcomp.c (computematchjumps): Free local memory in case ofCorinna Vinschen2014-06-231-0/+3
| | | | error (CID 59975).
* * regex/regcomp.c (wgetnext): Add a kludge to be more glibc compatible.Corinna Vinschen2013-07-211-0/+12
| | | | Add comment to explain.
* * Merge in cygwin-64bit-branch.Corinna Vinschen2013-04-231-4/+2
|
* * regex/regcomp.c (p_ere): Allow vertical-line followingYaakov Selkowitz2012-06-111-0/+3
| | | | left-parenthesis in ERE, as in glibc.
* * Makefile.in (clean): Remove non-existant regexp dir.Corinna Vinschen2012-02-131-13/+0
| | | | | | | | | | | | | | | | | * collate.h: New header. (__collate_range_cmp): Declare. (__collate_load_error): Define. * glob.cc: Pull in latest version from FreeBSD. Simplify and reduce Cygwin-specific changes. * regex/regcomp.c: Include collate.h on Cygwin as well. (__collate_range_cmp): Move from here... * nlsfuncs.cc (__collate_range_cmp): ...to here. * miscfuncs.cc (thread_wrapper): Fix typo in comment. (CygwinCreateThread): Take dead zone of Windows stack into account. Change the way how the stack is commited and how to handle guardpages. Explain how and why. * thread.h (PTHREAD_DEFAULT_STACKSIZE): Change definition. Explain why.
* * regex/regcomp.c (xwcrtomb): Fix one explicable and one inexcplicable CChristopher Faylor2010-02-141-2/+2
| | | | warning.
* * regex/regcomp.c (xwcrtomb): Don't convert Unicode chars outside theCorinna Vinschen2010-02-131-8/+11
| | | | | base plane always to UTF-8. Call wcsnrtombs instead to allow arbitrary multibyte charsets.
* * regex/regcomp.c (wgetnext): Use size_t as type for n2 since that'sCorinna Vinschen2010-02-121-1/+2
| | | | | what's returned by mbrtowc. * regex/regexec.c (xmbrtowc): Ditto.
* * regex/regcomp.c (xwcrtomb): New function to convert wide charsCorinna Vinschen2010-02-121-4/+37
| | | | | | | outside of the base plane to UTF-8. Call throughout instead of wcrtomb. (wgetnext): Handle surrogate pairs on UTF-16 systems. * regex/regexec.c (xmbrtowc): Ditto.
* * regex/engine.c (step): Drop Cygwin-specific definition.Corinna Vinschen2010-02-111-4/+8
| | | | | | | | | | | | | | | | (NONCHAR): Better cast here to make the test work. Move comment from step here. (matcher): Disable skipping initial string in multibyte case. * regex/regcomp.c (p_bracket): Don't simplify singleton in the invert case. (p_b_term): Handle early end of pattern after dash in bracket expression. (singleton): Don't ignore the wides just because there's already a singleton in the single byte chars. Fix condition for a singleton wide accordingly. (findmust): Check for LC_CTYPE charset, rather than LC_COLLATE charset. * regex2.h (CHIN): Fix condition in the icase & invert case. (ISWORD): Fix wrong cast to unsigned char.
* * regcomp.c (p_ere): Workaround incorrect compiler warning.Christopher Faylor2010-02-041-2/+2
| | | | | * regerror.c (regatoi): Return non-const string or compiler complains in certain inexplicable situations.
* Replace regex files with multibyte-aware version from FreeBSD.Corinna Vinschen2010-02-041-544/+842
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (install-headers): Remove extra command to install regex.h. (uninstall-headers): Remove extra command to uninstall regex.h. * nlsfuncs.cc (collate_lcid): Make externally available to allow access to collation internals from regex functions. (collate_charset): Ditto. * wchar.h: Add __cplusplus guards to make C-clean. * include/regex.h: New file, replacing regex/regex.h. Remove UCB advertising clause. * regex/COPYRIGHT: Accommodate BSD license. Remove UCB advertising clause. * regex/cclass.h: Remove. * regex/cname.h: New file from FreeBSD. * regex/engine.c: Ditto. (NONCHAR): Tweak for Cygwin. * regex/engine.ih: Remove. * regex/mkh: Remove. * regex/regcomp.c: New file from FreeBSD. Tweak slightly for Cygwin. Import required collate internals from nlsfunc.cc. (p_ere_exp): Add GNU-specific \< and \> handling for word boundaries. (p_simp_re): Ditto. (__collate_range_cmp): Define. (p_b_term): Use Cygwin-specific collate internals. (findmust): Ditto. * regex/regcomp.ih: Remove. * regex/regerror.c: New file from FreeBSD. Fix a few compiler warnings. * regex/regerror.ih: Remove. * regex/regex.7: New file from FreeBSD. Remove UCB advertising clause. * regex/regex.h: Remove. Replaced by include/regex.h. * regex/regexec.c: New file from FreeBSD. Fix a few compiler warnings. * regex/regfree.c: New file from FreeBSD. * regex/tests: Remove. * regex/utils.h: New file from FreeBSD.
* * libc/minires.c (scanline): Fix type in calls to ctype functionsCorinna Vinschen2009-05-061-7/+7
| | | | | | to stay in unsigned char range for char values >= 0x80. * regex/regcomp.c: Ditto, throughout. * regex/regex2.h (ISWORD): Ditto.
* * libc/minires.c (scanline): Accommodate ctype changes which disallow use of anChristopher Faylor2009-05-041-7/+7
| | | | | | unadorned char argument to is* macros. * regex/regcomp.c: Ditto, throughout. * regex/regex2.h (ISWORD): Ditto.
* * environ.cc (environ_init): Avoid a compiler warning.Christopher Faylor2002-09-301-4/+4
| | | | | | | | * path.cc (path_conv::check): Ditto. * path.h (path_conv::operator int): Ditto. * regex/engine.c: Ditto throughout. * regex/regcomp.c: Ditto throughout. * regex/regexec.c: Ditto throughout.
* * hires.h (hires::usecs): Rename from utime. Accept an argument.Christopher Faylor2002-02-151-1/+1
| | | | | | | | | | * strace.cc (strace::microseconds): Use hires class for calculating times. * sync.h (new_muto): Use NO_COPY explicitly in declaration. * times.cc (gettimeofday): Reflect change in usecs argument. (hires::usecs): Ditto. Changed name from utime. * winsup.h (NO_COPY): Add nocommon attribute to force setting aside space for variable. * regcomp.c (REQUIRE): Add a void cast to bypass a warning.
* * Makefile.in (VPATH): Add regex directory.Christopher Faylor2001-12-201-0/+1546
(NM): new variable. (OBSOLETE_FUNCTIONS): Ditto. (NEW_FUNCTIONS): Ditto. (install-headers): Install regex.h. (install-man): New target. (install): Use new target. (DLL_OFILES): Add v8_reg* stuff. (new-cygwin1.dll): Eliminate stamp-cygwin-lib creation. (libcygwin.a): Remove obsolete functions from import lib. Add new functions. * configure.in: Detect 'nm' tool. * configure: Regenerate. * cygwin.din: Export posix_reg* functions. Eliminate export of v8 reg* functions. This is now handled in object files themselves. * regex/*: New files. * regexp/v8_*.c: New files, renamed from non v8_ equivalents.