summaryrefslogtreecommitdiffstats
path: root/lib/libc/regex
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove from the notes a bug that it's said to have been fixed.dcs2000-07-021-5/+0
| | | | | | PR: 15561 Submitted by: Martin Kammerhofer <mkamm@gmx.net> Confirmed by: ache
* Initialize variables used by the Boyer-Moore algorithm.dcs2000-06-291-0/+2
| | | | | | | This should fix core dumps when the must pattern is of length three or less. Bug found by: knu
* Add Boyler-Moore algorithm to pre-matching test.dcs2000-06-293-6/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BM algorithm works by scanning the pattern from right to left, and jumping as many characters as viable based on the text's mismatched character and the pattern's already matched suffix. This typically enable us to test only a fraction of the text's characters, but has a worse performance than the straight-forward method for small patterns. Because of this, the BM algorithm will only be used if the pattern size is at least 4 characters. Notice that this pre-matching is done on the largest substring of the regular expression that _must_ be present on the text for a succesful match to be possible at all. For instance, "(xyzzy|grues)" will yield a null "must" substring, and, therefore, not benefit from the BM algorithm at all. Because of the lack of intelligence of the algorithm that finds the "must" string, things like "charjump|matchjump" will also yield a null string. To optimize that, "(char|match)jump" should be used. The setup time (at regcomp()) for the BM algorithm will most likely outweight any benefits for one-time matches. Given the slow regex(3) we have, this is unlikely to be even perceptible, though. The size of a regex_t structure is increased by 2*sizeof(char*) + 256*sizeof(int) + strlen(must)*sizeof(int). This is all inside the regex_t's "guts", which is allocated dynamically by regcomp(). If allocation of either of the two tables fail, the other one is freed. In this case, the straight-forward algorithm is used for pre-matching. Tests exercising the code path affected have shown a speed increase of 50% for "must" strings of length four or five. API and ABI remain unchanged by this commit. The patch submitted on the PR was not used, as it was non-functional. PR: 14342
* $Id$ -> $FreeBSD$peter1999-08-283-3/+3
|
* remove <ctype.h> - not neededache1999-07-261-1/+0
|
* unsigned char cleanupache1999-07-261-17/+17
| | | | | | | fix wrong index from p_simp_re() PR: 8790 Submitted by: Alexander Viro <viro@math.psu.edu> (partially)
* Add $Id$, to make it simpler for members of the translation teams tonik1999-07-122-0/+2
| | | | | | | | | | | | | | | | | track. The $Id$ line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde
* Replace memory leaking instances of realloc with non-leaking reallocf.imp1998-09-161-4/+4
| | | | | | | | | | | In some cases replace if (a == null) a = malloc(x); else a = realloc(a, x); with simple reallocf(a, x). Per ANSI-C, this is guaranteed to be the same thing. I've been running these on my system here w/o ill effects for some time. However, the CTM-express is at part 6 of 34 for the CAM changes, so I've not been able to do a build world with the CAM in the tree with these changes. Shouldn't impact anything, but...
* int -> long changes that reduce the diffs with the NetBSD version tojb1998-05-142-34/+34
| | | | work in a 64-bit environment.
* Note that '+' and '?' are not special characters in basic REs but theysteve1998-02-141-2/+5
| | | | | | | can be simulated using bounds. PR: 5708 Submitted by: Oliver Fromme <oliver.fromme@heim3.tu-clausthal.de>
* Removed the subdirectory paths from the definitions of MAN[1-9]. Theybde1997-10-151-4/+3
| | | | | were a workaround for limitations in bsd.man.mk that were fixed about 2 years ago.
* Changed all paths to be relative to src/lib instead of src/lib/libcjb1997-05-031-2/+6
| | | | | | | | | | so that all these makefiles can be used to build libc_r too. Added .if ${LIB} == "c" tests to restrict man page builds to libc to avoid needlessly building them with libc_r too. Split libc Makefile into Makefile and Makefile.inc to allow the libc_r Makefile to include Makefile.inc too.
* Speedup in case locale not usedache1997-04-041-5/+11
|
* collate_range_cmp -> __collate_range_cmpache1996-10-311-4/+5
|
* Correctly use .Fn instead of .Nm to reference function namesmpp1996-08-221-1/+3
| | | | | | | | in a bunch of man pages. Use the correct .Bx (BSD UNIX) or .At (AT&T UNIX) macros instead of explicitly specifying the version in the text in a bunch of man pages.
* Convert to newly aded collate compare functionache1996-08-121-4/+4
|
* Remove static collcmp, use new internal function nowache1996-08-121-37/+4
|
* Use collate data for national alpha character ranges like [a-z]ache1996-08-111-4/+45
|
* Short value is better for hash due to easy overflow in 8bit charactersache1996-08-111-1/+1
|
* Use locale for character classes instead of hardcoded valuesache1996-08-114-37/+89
| | | | Misc 8bit cleanup
* General -Wall warning cleanup, part I.jkh1996-07-125-165/+169
| | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu>
* 8bit clean fixesache1996-03-251-3/+5
|
* More cleanup.phk1995-10-223-4/+1
| | | | Uhm, I also forgot: I took "EXTRA_SANITY" out of malloc.c
* Remove trailing whitespace.rgrimes1995-05-302-2/+2
|
* First crack at making libc work with the new make macros. It compiles onwollman1994-08-051-2/+2
| | | | | my machine, and a simple static (genassym) and shared (sysctl) executable both work. Still to be done: RPCand YP merge.
* BSD 4.4 Lite Lib Sourcesrgrimes1994-05-2714-0/+4642
OpenPOWER on IntegriCloud