summaryrefslogtreecommitdiffstats
path: root/lib/libc/regex
Commit message (Collapse)AuthorAgeFilesLines
* Revert r265367:pfg2014-05-051-1/+1
| | | | | | | | Use of calloc instead of malloc in regex (from OpenBSD). In this case the change makes no sense since we are using realloc() later. Reported by: ache
* regex: Use calloc instead of malloc.pfg2014-05-051-1/+1
| | | | | | | Mostly to reduce differences with OpenBSD. Obtained from: OpenBSD (CVS rev. 1.17) MFC after: 3 days
* regex: Remove some unreachable breaks.pfg2014-05-012-7/+1
| | | | | | | | | This is based on a much bigger cleanup done in Illumos. Reference: https://www.illumos.org/issues/2077 MFC after: 1 week
* Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP}marcel2014-03-041-2/+2
| | | | | | | | | | | if not already defined. This allows building libc from outside of lib/libc using a reach-over makefile. A typical use-case is to build a standard ILP32 version and a COMPAT32 version in a single iteration by building the COMPAT32 version using a reach-over makefile. Obtained from: Juniper Networks, Inc.
* Fix assignment of maximum bounadary.delphij2013-03-011-1/+1
| | | | | | Submitted by: Sascha Wildner <saw online de> Obtained from: DragonFly rev fd39c81ba220f7ad6e4dc9b30d45e828cf58a1ad MFC after: 2 weeks
* Remove some duplicated copyright notices.theraven2012-03-061-5/+0
| | | | Approved by: dim (mentor)
* Implement xlocale APIs from Darwin, mainly for use by libc++. This adds atheraven2011-11-201-4/+16
| | | | | | | | | | | | load of _l suffixed versions of various standard library functions that use the global locale, making them take an explicit locale parameter. Also adds support for per-thread locales. This work was funded by the FreeBSD Foundation. Please test any code you have that uses the C standard locale functions! Reviewed by: das (gdtoa changes) Approved by: dim (mentor)
* Converting int to wint_t leads to broekn comparison of raw charkevlo2011-11-111-8/+8
| | | | | | and encoded wint_t. Spotted by: ache
* - Don't handle out-of-memory conditionkevlo2011-11-101-20/+21
| | | | | | | - Fix types of function arguments match their declaration Reviewed by: delphij Obtained from: NetBSD
* mdoc: drop redundant .Pp and .LP callsuqs2010-10-081-1/+0
| | | | They have no effect when coming in pairs, or before .Bl/.Bd
* Fix an off-by-one error in the marking of the O_CH operatordds2009-09-161-1/+1
| | | | | | | following an OOR2 operator. PR: 130504 MFC after: 2 weeks
* Add a couple of debugging statements.dds2009-09-161-0/+3
|
* Add two test cases from PR 130504.dds2009-09-151-0/+3
| | | | | | | | | | An additional one coming from http://www.research.att.com/~gsf/testregex/ was not added; at some point the entire AT&T regression test harness should be imported here. But that would also mean commitment to fix the uncovered errors. PR: 130504 Submitted by: Chris Kuklewicz
* Add two example regexps: (1) one for matching all the characterskeramida2008-09-051-0/+8
| | | | | | | | that belong in a character class, and (2) one for matching all the characters *not* in a character class. Submitted by: Mark B, mkbucc at gmail.com MFC after: 3 days
* getopt(3) returns -1, not EOF.kevlo2008-02-181-1/+1
|
* Diff reduction against other *BSDs: ANSIfy functiondelphij2007-06-114-141/+66
| | | | prototypes. No function changes.
* Const'ify and ANSIfy the internal interfaces of regex(3).delphij2007-05-251-109/+100
| | | | | This is the final change that makes libc to compile with WERROR on my amd64 crashbox.
* Use C comments since we now preprocess these files with CPP.deischen2007-04-291-1/+3
|
* Test cases for back references.delphij2007-03-051-0/+24
| | | | Obtained from: OpenBSD
* Only stop evaluation of a back reference if the match length isdelphij2007-03-051-15/+17
| | | | | | zero and the recursion level is too deep. Obtained from: OpenBSD
* Avoid infinite recursion on:delphij2007-03-051-0/+2
| | | | | | echo "foo foo bar bar bar baz" | sed 's/\([^ ]*\)\( *\1\)*/\1/g' Obtained from: OpenBSD via NetBSD (rev. 1.18)
* Per Regents of the University of Calfornia letter, remove advertisingimp2007-01-099-36/+0
| | | | | | clause. # If I've done so improperly on a file, please let me know.
* Add each directory's symbol map file to SYM_MAPS.deischen2006-03-131-0/+2
|
* Add symbol maps and initial symbol version definitions to libc.deischen2006-03-131-0/+8
| | | | Reviewed by: davidxu
* Use prototypes for CHIN1() and CHIN().stefanf2005-09-121-6/+2
|
* Fix a boundary condition error in slow() and fast() in multibyte locales:tjr2005-08-171-6/+7
| | | | | we must allow the character beginning at "p" to be converted to a wide character for the purposes of EOL processing and word-boundary matching.
* Document the fact that word-boundary matching does not worktjr2005-08-171-1/+3
| | | | properly in multibyte locales.
* Change OUT from -2 to CHAR_MIN-1, making it impossible for it totjr2005-08-131-1/+1
| | | | | | | | | inadvertently match a negative char in the RE being compiled. This fixes compilation of "\376" (as an ERE) and "\376\376" (as a BRE). PR: 84740 MFC after: 1 week
* Remove unused file.delphij2005-04-251-63/+0
| | | | | | | Confirmed by: tjr [1] [1] PERFORCE CHANGESET 57044: http://perforce.freebsd.org/changeView.cgi?CH=57044
* Expand *n't contractions.ru2005-02-131-3/+3
|
* Sort sections.ru2005-01-201-8/+8
|
* Plug memory leak.dds2004-12-301-0/+4
| | | | | PR: bin/75656 MFC after: 2 weeks
* Fix computation of the 'n' argument to mbrtowc (through XMBRTOWC) to avoidtjr2004-11-211-4/+4
| | | | | | | | | | reading past 'stop' in various places when converting multibyte characters. Reading too far caused truncation to not be detected when it should have been, eventually causing regexec() to loop infinitely in with certain combinations of patterns and strings in multibyte locales. PR: 74020 MFC after: 4 weeks
* Directly include <runetype.h> for _CurrentRuneLocale, <_ctype.h> doesn'tstefanf2004-10-031-0/+1
| | | | include it in all cases.
* Fix two problems with REG_ICASE that were introduced with the addition oftjr2004-09-051-13/+10
| | | | | | | | | | | multibyte character support: - In CHadd(), avoid writing past the end of the character set bitmap when the opposite-case counterpart of wide characters with values less than NC have values greater than or equal to NC. - In CHaddtype(), fix a braino that caused alphabetic characters to be added to all character classes! (but only with REG_ICASE) PR: 71367
* Update paths to reg*.c and regex2.h. Add a target to build regex.h.tjr2004-07-191-1/+3
|
* Update for removal of cclass.h. Trim some useless targets. Invoke mkhtjr2004-07-191-34/+6
| | | | with "sh mkh" so it works if the script is not executable.
* Update for recent changes to struct re_guts. Disable printing the contentstjr2004-07-191-38/+5
| | | | of OANYOF sets for the moment.
* Remove unused files.tjr2004-07-192-12/+0
|
* Remove an entry from the BUGS section: we have multibyte charactertjr2004-07-121-2/+0
| | | | support now.
* Make regular expression matching aware of multibyte characters. The generaltjr2004-07-125-324/+478
| | | | | | | | | | | | | | | | | idea is that we perform multibyte->wide character conversion while parsing and compiling, then convert byte sequences to wide characters when they're needed for comparison and stepping through the string during execution. As with tr(1), the main complication is to efficiently represent sets of characters in bracket expressions. The old bitmap representation is replaced by a bitmap for the first 256 characters combined with a vector of individual wide characters, a vector of character ranges (for [A-Z] etc.), and a vector of character classes (for [[:alpha:]] etc.). One other point of interest is that although the Boyer-Moore algorithm had to be disabled in the general multibyte case, it is still enabled for UTF-8 because of its self-synchronizing nature. This greatly speeds up matching by reducing the number of multibyte conversions that need to be done.
* Add a new error code, REG_ILLSEQ, to indicate that a regular expressiontjr2004-07-122-1/+5
| | | | contains an illegal multibyte character sequence.
* Remove incomplete support for multi-character collating elements. Removetjr2004-07-112-262/+8
| | | | unused character category calculations.
* Document incorrect handling of multibyte characters.tjr2004-07-061-1/+3
|
* Mechanically kill hard sentence breaks.ru2004-07-022-3/+3
|
* mdoc(7): Use the new feature of the .In macro.ru2003-09-081-1/+1
|
* Eliminate 61 warnings emitted at WARNS=2 (leaving 53 to go).nectar2003-02-163-6/+6
| | | | | | | Only warnings that could be fixed without changing the generated object code and without restructuring the source code have been handled. Reviewed by: /sbin/md5
* mdoc(7) police: "The .Fa argument.".ru2002-12-191-2/+6
|
* mdoc(7) police: "The .Fn function".ru2002-12-181-10/+31
|
* libc_r wasn't so tied to libc for 22 months.ru2002-11-181-3/+1
|
OpenPOWER on IntegriCloud