summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Drop the references to index(3) and rindex(3), which are non-standardalex2000-07-189-18/+0
| | | | | | and people shouldn't be encouraged to use them. Asked by: sheldonh
* Change my email address in the copyright notices for the sake of consistencyjasone2000-07-187-7/+7
| | | | (jasone@canonware.com --> jasone@freebsd.org).
* Reshuffle the SEE ALSO section.jasone2000-07-173-7/+7
| | | | Prompted by: sheldonh
* Add SEE ALSO section, as with the other string functions.alex2000-07-171-0/+11
| | | | Submitted by: dcs
* Make the NAME section a bit less confusing.ben2000-07-152-2/+2
| | | | | | PR: 19262 Submitted by: NOKUBI Hirotaka <nokubi@ff.iij4u.or.jp> Reviewed by: sheldonh
* Fix typo, teh -> the.asmodai2000-07-141-1/+1
|
* Fix typo; sa_siginfo -> sa_sigactionben2000-07-111-1/+1
| | | | | PR: 19602 Submitted by: Tony Finch <dot@dotat.at>
* Try and fix the worst of some highly bogus malloc/free resourcepeter2000-07-111-1/+1
| | | | | | | | | | | management involving rcmd_af(), getaddrinfo(), freeaddrinfo(), etc. We set *ahost to point to ai->canonname; and later free the ai-> stuff and still leave the old pointers in *ahost to the freed data. Perhaps the best way to deal with this is a static buffer or a static strdup() that is freed on the next iteration or something. This gives me headaches just thinking about this. The new 'AJ' default for malloc() tripped this up.
* Actually make it so this Makefile can build grot.green2000-07-101-1/+8
|
* Add a test case for one of the bugs found on the new additions todcs2000-07-091-0/+1
| | | | regex(3).
* Spencer's regex(3) test code.dcs2000-07-098-0/+1727
| | | | Obtained from: BSD/OS
* altoffset() always returned whenever it recursed, because at the enddcs2000-07-091-0/+4
| | | | | | | | | | | | | | of the processing of the recursion, "scan" would be pointing to O_CH (or O_QUEST), which would then be interpreted as being the end character for altoffset(). We avoid this by properly increasing scan before leaving the switch. Without this, something like (a?b?)?cc would result in a g->moffset of 1 instead of 2. I added a case to the soon-to-be-imported regex(3) test code to catch this error.
* Since g->moffset points to the _maximum_ offset at which the mustdcs2000-07-091-1/+1
| | | | | | | | | | | | | string may be found (from the beginning of the pattern), the point at which must is found minus that offset may actually point to some place before the start of the text. In that case, make start = start. Alternatively, this could be tested for in the preceding if, but it did not occur to me. :-) Caught by: regex(3) test code
* Add some casts here and there.dcs2000-07-091-3/+3
|
* Turn malloc options "AJ" on by default.phk2000-07-091-2/+2
| | | | | | | | These will be turned off again as we approach 5.0-RELEASE. If you benchmark things, make sure to ln -sf j /etc/malloc.conf to see "true" performance.
* reject empty scopeid. use strtoul() for checking all-numericness ofitojun2000-07-091-8/+15
| | | | | portname. explicitly reject empty numeric portname. sync with kame. based on comments from itohy@netbsd.org
* First appeared in 2.9BSD, not 3.0.dannyboy2000-07-081-1/+1
| | | | | | PR: 19263 Submitted by: NOKUBI Hirotaka <nokubi@ff.iij4u.or.jp> Obtained from: Open|NetBSD
* Since we have modified charjump to be CHAR_MIN-based, we have todcs2000-07-081-1/+2
| | | | | | correct the offset when we free it. Caught by: phkmalloc
* Change the dllockinit() interface from "experimental" tojdp2000-07-081-3/+4
| | | | "deprecated" and warn that it will disappear eventually.
* fix commentache2000-07-071-1/+1
|
* Do not free NULL pointers.dcs2000-07-071-1/+1
|
* Deal with the signed/unsigned chars issue in a more proper manner. Wedcs2000-07-072-21/+17
| | | | | | | | | use a CHAR_MIN-based array, like elsewhere in the code. Remove a number of unused variables (some due to the above change, one that was left after a number of optimizing steps through the source). Brucified by: bde
* remove sys/time.h by instruction from bde.jmg2000-07-061-1/+0
|
* cleanup the tsearch import.alfred2000-07-062-53/+4
| | | | | | | | | | | | remove (comment out) functions defined or depricated elsewhere: bsearch, lfind, lsearch, insque, remque change hcreate to take a size_t rather than uint (essentially the same) since hcreate/hdestroy are now in <search.h>, remove private search.h in lib/libc/db/hash/ add $FreeBSD tags to hsearch.c
* I hate signed chars.^W^W^W^W^WCast to unsigned char before using signeddcs2000-07-061-1/+1
| | | | chars as array indices.
* Correct comment to work with test code.dcs2000-07-061-2/+2
| | | | Prevent out of bounds array access in some specific cases.
* Use UCHAR_MAX consistently.dcs2000-07-061-1/+1
|
* sync with more recent kame tree.itojun2000-07-052-45/+254
| | | | | - correct scoped notation separator (s/@/%/) - include example and more references
* sync with latest kame.itojun2000-07-051-70/+208
| | | | | | | | - permit numeric scopeid, be more careful about buffer size TODO: 2nd arg type should be socklen_t for RFC2553 conformance, but due to include file dependency it is not a easy thing to do (netdb.h does not have socklen_t)
* sync with kame.itojun2000-07-051-29/+50
| | | | | - better return code. from enami@netbsd - do not use "class" as variable name. C++ guy had trouble with it.
* o Enable building of libposix1e capability state utility functions andrwatson2000-07-051-8/+12
| | | | | | capability-related syscall wrappers. Obtained from: TrustedBSD Project
* o Introduce cap_{get,set}_{file,fd}() syscall wrappers, associated withrwatson2000-07-054-0/+196
| | | | | | | soon to be committed syscall stubs. These calls will be used to get and set capability state associated with executables. Obtained from: TrustedBSD Project
* o When calling the syscall, use &cap instead of cap. Apparently thisrwatson2000-07-051-1/+1
| | | | | | | error was introduced during the merge; fixing it corrects a (correct) warning about types. Obtained from: TrustedBSD Project
* o Comment out <sys/audit.h> and <sys/mac.h> since they are not yetrwatson2000-07-051-2/+2
| | | | | | committed Obtained from: TrustedBSD Project
* add getifaddrs(3) from bsdi. this is a magic function which lets you grabitojun2000-07-053-2/+545
| | | | | | interface addresses in a portable manner, without headache of SIOCGIFCONF or sysctl. it is in bsdi/openbsd/netbsd already. from kame tree (actually, mandatory for latest kame tree).
* Describe agrument range correctly, according to multibyte(3)ache2000-07-032-23/+21
| | | | Remove unneded comment
* Remove trailing whitespace only.sheldonh2000-07-032-18/+18
|
* Fix overlong line and trailing whitespace introduced in rev 1.8.sheldonh2000-07-031-1/+2
|
* Add to the SEE ALSO section, a reference to the RFC mentioned insheldonh2000-07-032-1/+12
| | | | text introduced in the previous commit.
* Re-pair the MLINKS of unvis.3 with strunvisx.3. This undoubtedly was agreen2000-07-031-1/+1
| | | | world breakage.
* Previous commit broke the case of chained CNAME entries. Instead handlekris2000-07-031-6/+18
| | | | | | | the bogus case by being stricter about errors. Submitted by: itojun Obtained from: KAME
* Fix a nasty bug which would leave the struct hostent incompletely filled outkris2000-07-031-1/+1
| | | | | | | | when parsing certain DNS records during a reverse address resolution. Thus when code tries to examine the returned host name, it dereferences a null pointer :-( Problem noticed by: ps
* Add strunvisx.3 MLINK.alex2000-07-021-1/+1
|
* Document VIS_HTTPSTYLE:alex2000-07-022-4/+34
| | | | | | | | | | | | | VIS_HTTPSTYLE is a new encoding style for use in vis(), strvis() and strvisx() that escapes characters according to RFC 1808 (URI encoding). Since decoding of these require different detection of start-points of escaped characters, VIS_HTTPSTYLE can be given as flag to unvis(). unvis() will then properly decode URIs. A new function appeared, strunvisx(): strunvisx() behaves similar as strunvis(), with one exception: It has an additional flag parameter, which is passed to unvis() to archive the effect I described above.
* Fix memory leak introduced with regcomp.c rev 1.14.dcs2000-07-021-0/+6
|
* Enhance the optimization provided by pre-matching. Fix style bugs withdcs2000-07-023-12/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | previous commits. At the time we search the pattern for the "must" string, we now compute the longest offset from the beginning of the pattern at which the must string might be found. If that offset is found to be infinite (through use of "+" or "*"), we set it to -1 to disable the heuristics applied later. After we are done with pre-matching, we use that offset and the point in the text at which the must string was found to compute the earliest point at which the pattern might be found. Special care should be taken here. The variable "start" is passed to the automata-processing functions fast() and slow() to indicate the point in the text at which they should start working from. The real beginning of the text is passed in a struct match variable m, which is used to check for anchors. That variable, though, is initialized with "start", so we must not adjust "start" before "m" is properly initialized. Simple tests showed a speed increase from 100% to 400%, but they were biased in that regexec() was called for the whole file instead of line by line, and parenthized subexpressions were not searched for. This change adds a single integer to the size of the "guts" structure, and does not change the ABI. Further improvements possible: Since the speed increase observed here is so huge, one intuitive optimization would be to introduce a bias in the function that computes the "must" string so as to prefer a smaller string with a finite offset over a larger one with an infinite offset. Tests have shown this to be a bad idea, though, as the cost of false pre-matches far outweights the benefits of a must offset, even in biased situations. A number of other improvements suggest themselves, though: * identify the cases where the pattern is identical to the must string, and avoid entering fast() and slow() in these cases. * compute the maximum offset from the must string to the end of the pattern, and use that to set the point at which fast() and slow() should give up trying to find a match, and return then return to pre-matching. * return all the way to pre-matching if a "match" was found and later invalidated by back reference processing. Since back references are evil and should be avoided anyway, this is of little use.
* 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
* Style fixes.dan2000-07-011-11/+12
|
* Add URI encoding to the vis/unvis routines courtesy of VIS_HTTPSTYLE.dan2000-07-012-1/+73
| | | | | | | | Since alex is a -doc committer, he can update his own manpage. :-) Also add $FreeBSD$ while I'm here. Submitted by: alex
* bring in binary search tree code.alfred2000-07-016-2/+347
| | | | Obtained from: NetBSD
OpenPOWER on IntegriCloud