summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/regex
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-232-6/+4
|
* Adapt to changes in newlib's sys/cdefs.h:Corinna Vinschen2013-04-221-4/+0
| | | | | | * include/sys/sysinfo.h (struct sysinfo): Rename __unused member to __f. * libc/fts.c (__FBSDID): Drop definition. * regex/regexec.c (__unused): Drop definition.
* * 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-122-2/+3
| | | | | what's returned by mbrtowc. * regex/regexec.c (xmbrtowc): Ditto.
* * regex/regcomp.c (xwcrtomb): New function to convert wide charsCorinna Vinschen2010-02-122-5/+54
| | | | | | | 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-113-22/+25
| | | | | | | | | | | | | | | | (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-042-3/+3
| | | | | * regerror.c (regatoi): Return non-const string or compiler complains in certain inexplicable situations.
* * regex/engine.c (step): Declare and define with `int ch' rather thanCorinna Vinschen2010-02-041-6/+11
| | | | | `wint_t ch' parameter. Explain why. (NONCHAR): Remove related Cygwin patch here, including wrong comment.
* Replace regex files with multibyte-aware version from FreeBSD.Corinna Vinschen2010-02-0418-2103/+2658
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-062-8/+8
| | | | | | 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-042-8/+8
| | | | | | unadorned char argument to is* macros. * regex/regcomp.c: Ditto, throughout. * regex/regex2.h (ISWORD): Ditto.
* * Makefile.in (DLL_OFILES): Remove v8 regexp files.Corinna Vinschen2008-07-291-7/+0
| | | | | | | | | | | (OBSOLETE_FUNCTIONS): Remove v8 regexp functions. (NEW_FUNCTIONS): Remove POSIX regex functions. * cygwin.din: Export POSIX regex functions with their correct symbol name. Export with posix_ prefix for backward compatibility. * syscalls.cc (regfree): Remove ancient fake function. * regex/regex.h: Remove renaming regex functions within Cygwin. * regexp/*: Remove. * include /cygwin/version,.h: Bump API minor number.
* * cygtls.cc (_cygtls::handle_threadlist_exception): Make an error fatal.Christopher Faylor2005-12-232-2/+2
| | | | | | | | | | | | | | | | | | | | | * cygtls.h (sockaddr_in): Use header rather than defining our own structure. * exceptions.cc (_cygtls::interrupt_setup): Use exact contents of sa_mask rather than assuming tht current sig should be masked, too. (_cygtls::call_signal_handler): Use more aggressive locking. * gendef (_sigbe): Wait until later before releasing incyg. (_sigreturn): Remove more arguments to accommodate quasi-sa_sigaction support. (_sigdelayed): Push arguments for sa_sigaction. More work needed here. * signal.cc (sigaction): Implement SA_NODEFER. * tlsoffsets.h: Regenerate. * sigproc.cc (wait_sig): Use default buffer size of Windows 9x complains. * pinfo.cc (_onreturn::dummy_handle): Remove. (_onreturn::h): Make this a pointer. (_onreturn::~_onreturn): Detect whether pointer is NULL rather than value is NULL. (_onreturn::_onreturn): Set h to NULL initially. (_onreturn::no_close_p_handle): Set h to NULL. (winpids::add): Initialize onreturn with value from p.hProcess immediately.
* white space and minor comment cleanup.Christopher Faylor2005-05-021-1/+1
|
* * regex/regex.h: Define regoff_t as _off_t.Corinna Vinschen2003-04-102-2/+2
| | | | * regex/regex2.h: Ditto.
* * environ.cc (environ_init): Avoid a compiler warning.Christopher Faylor2002-09-303-6/+6
| | | | | | | | * 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-2018-0/+4655
(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.