summaryrefslogtreecommitdiffstats
path: root/lib/libc/regex (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Delete casts to off_t and size_t that are implied by assignmentsguenther2016-09-212-5/+4
| | | | | | | or prototypes. Ditto for some of the char* and void* casts too. verified no change to instructions on ILP32 (i386) and LP64 (amd64) ok natano@ abluhm@ deraadt@ millert@
* Change the way regexec handles REG_STARTEND combined with REG_NOTBOL.martijn2016-05-262-20/+62
| | | | | | | | | | | | | The new code sees this combination as a continuation of string at offset pmatch[0].rm_so, instead of a new string which starts at that offset. This change fixes a search quirk in vi and is needed for upcoming fixes in ed/sed/vi. This new behaviour is also used in gnu regex. Lots of help from schwarze@ Manpage bits by schwarze@ OK schwarze@ and millert@
* KNF with respect to indentation; no code changeschwarze2016-05-251-28/+27
|
* Fix another one-byte buffer underflow (read access only).schwarze2016-05-251-7/+4
| | | | | | | | | | | | This change touches code that only runs when REG_BASIC is given and the regular expression is anchored with [[:<:]] or \< _and_ uses backreferences. Simplify the logic while here, already looking at the previous character if REG_STARTEND and REG_NOTBOL are both in use, in anticipation of martijn@'s upcoming patch which will further improve REG_STARTEND. OK millert@ martijn@ Also tested by Pedro Giffuni (pfg) on FreeBSD.
* Fix a one-byte buffer underflow (read access only).schwarze2016-05-171-4/+4
| | | | | | | | | | This change touches code that only runs when REG_BASIC is given and the regular expression is anchored with ^ _and_ uses backreferences. The segfault could only be triggered when the ^ anchor was inside a leading () subexpression quantified with *. OK martijn@ Patch also proofread by Pedro Giffuni <pfg at FreeBSD dot org>.
* Remove old cruft.zhuk2016-05-041-95/+0
| | | | okay millert@
* for some time now mandoc has not required MLINKS to functionjmc2016-03-301-3/+1
| | | | | | | | | | | | correctly - logically complete that now by removing MLINKS from base; authors need only to ensure there is an entry in NAME for any function/ util being added. MLINKS will still work, and remain for perl to ease upgrades; ok nicm (curses) bcook (ssl) ok schwarze, who provided a lot of feedback and assistance ok tb natano jung
* Remove NULL-checks before free() and needless argument casts.mmcc2015-12-281-5/+3
| | | | ok tb@
* Remove NULL-checks before free() and unnecessary argument casts.mmcc2015-12-281-8/+5
| | | | ok tb@
* Remove NULL-checks before free() and a few related dead assignments.mmcc2015-12-282-6/+4
| | | | ok and valuable input from millert@
* update NAME section to include all documented functions,jmc2015-11-101-3/+3
| | | | | | or otherwise change Dt to reflect the name of an existing function; feedback/ok schwarze
* delete old lint ARGSUSED commentsguenther2015-11-012-5/+2
|
* Avoid .Ns right after .Pf, it's pointless.schwarze2015-09-141-3/+3
| | | | In some cases, do additional cleanup in the immediate vicinity.
* Wrap <langinfo.h> and <regexp.h> so internal calls go direct andguenther2015-09-141-1/+2
| | | | the symbols are weak
* Reduce usage of predefined strings in manpages.bentley2015-02-281-6/+6
| | | | | | | | | | | Predefined strings are not very portable across troff implementations, and they make the source much harder to read. Usually the intended character can be written directly. No output changes, except for two instances where the incorrect escape was used in the first place. tweaks + ok schwarze@
* put back some information what the character classes actually mean;schwarze2014-12-091-2/+5
| | | | | | while here, remove the lie that regex(3) character classes would depend on the locale; ok jmc@
* no more ctype(3);jmc2014-12-091-7/+4
|
* reallocarray() -- a little tricky to reviewderaadt2014-10-181-3/+3
| | | | ok doug millert
* Userland reallocarray() audit.doug2014-10-111-2/+3
| | | | | | | Avoid potential integer overflow in the size argument of malloc() and realloc() by using reallocarray() to avoid unchecked multiplication. ok deraadt@
* use reallocarray(NULL, a, b) instead of malloc(a, b), which gives usderaadt2014-10-091-5/+5
| | | | | proper mult int overflow detection. The existing code already handles malloc failure properly, of course.
* zap trailing whitespace;jmc2014-09-101-3/+3
|
* document \<word\> as being non standardjsg2014-09-101-2/+8
| | | | | from Pedro F. Giffuni in FreeBSD pr 153257 ok millert@ tedu@
* add \<word\> support to regcomp. prompted by renewed interest from jsgtedu2014-09-081-2/+28
| | | | | | because such support is reportedly common and in somewhat wide use. undocumented for now because we don't endorse this. ok jsg millert
* reallocarray for things which are arrays. ok deraadttedu2014-05-061-8/+8
|
* Use consistent phrasing for bitmask flags.guenther2014-01-221-5/+6
| | | | tweaking and ok millert@ jmc@
* obvious .Pa fixes; found with mandocdb(8)schwarze2014-01-211-3/+3
|
* The print() routine here can be passed at least some of the non-charactersguenther2013-11-281-6/+17
| | | | | | | | | | OUT to EOW, making its domain CHAR_MIN...CODEMAX. It makes sense to have pchar() take the same domain and output those non-characters appropriately, so the (unsigned char) cast for isprint() goes in pchar(). Constipate pchar() while we're here, and let print() pass through NUL to it, as it knows how to output it unambiguously. ok otto@ millert@
* unsigned char cast for ctype; ok guentherderaadt2013-11-261-2/+2
|
* more library historyschwarze2013-07-171-4/+13
| | | | | facts checked by sobrado@ style tweaks and ok jmc@
* [[:>:]] anchors the character preceding it to end of word, not thejmc2013-06-051-3/+3
| | | | | | character following it; From: Peter Fraser
* Use the fancy .In macro for includes. From Jan Klemkow. ok jmc schwarzetedu2013-06-051-4/+4
|
* silence some warnings by adding prototypes, casts, and headers astedu2013-04-175-11/+14
| | | | appropriate. in regex, stop using the struct hack for a fixed size array
* don't handle out-of-mem conditions using compiled out asserts (ugh). Fromotto2011-11-071-9/+10
| | | | netbsd; ok deraadt@
* the posix regex mistake is here to stay. ok deraadttedu2010-11-212-16/+2
|
* More delimiters that need quoting inside macros, hunted down by jmc@,schwarze2010-07-151-5/+5
| | | | who asked me to commit because he is just running out of the door.
* if the first call to allocset() fails, the second might deref a NULLotto2008-02-231-1/+4
| | | | | pointer, so add a safety-net. From Gianluigi Tiesi via Torok Edwin. ok chl@ millert@
* add a proper test around allocsetchl2007-10-101-51/+33
| | | | | | | | | | | use a simpler way to allocated memory in allocset, mostly done by replacing malloc/realloc dance, by only one realloc add comments about variables that are not used uninitialized, even if gcc told the contrary another malloc/realloc -> realloc change Work initially started by otto@, and then I joined him ok otto@ ray@
* use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgderaadt2007-09-021-3/+3
|
* convert to new .Dd format;jmc2007-05-312-4/+4
|
* (char)to{upper,lower}()deraadt2006-03-311-3/+3
|
* zap rcsidespie2005-08-055-37/+5
|
* s/-p1003.1-2003/-p1003.1-2004/gjmc2005-06-051-3/+3
|
* regsub(3) should not be a link to regex(3) as it is not a POSIX regexmillert2005-04-151-3/+2
| | | | routine and is not described in regex(3).
* Be correct in our man pages when talking about NUL termination (that is,cloder2005-02-251-3/+3
| | | | | termination with '\0') vs. null termination. Input from krw@, jaredy@, jmc@. OK deraadt@
* Plug a mem leak. Now you can run hanoi.sed witt a lot of pegs and nototto2005-01-031-2/+4
| | | | | | run out of mem! From FreeBSD PR 75656. ok millert@ deraadt@
* remove useless comments, once used for header file generation and deleteotto2004-11-306-210/+54
| | | | parameter names from prototypes. ok millert@
* Better fix for the "unbounded recursion case", for exampleotto2004-11-291-17/+18
| | | | | | | | \(b*\)\(a*\1\)*, more cases in regress/lib/libc/regexp/test. Only stop evaluation of a back reference if the match lenght is zero and the recursion level is too deep. With help from jaredy@ Problem case found by Andrew Brown in NetBSD PR 28126. ok deraadt@ millert@
* ansify and deregister; no change in obj code. ok millert@otto2004-10-175-402/+284
|
* various fixes to make this page more readable/helpful;jmc2004-09-281-136/+596
| | | | | | | also split into 2 sections (ere and bre) and add a list of the expressions supported (nicked/adapted from ed(1)); includes fixes/feedback from otto and jared;
* Change an assert into a loop termination condition. Fixes a coremillert2004-08-131-3/+4
| | | | dump found by jmc@. OK otto@