summaryrefslogtreecommitdiff
path: root/src/lib/libc/string (follow)
Commit message (Collapse)AuthorAgeFilesLines
* According to POSIX, if the src and dst strings overlap, the behaviormillert2013-09-256-12/+48
| | | | is undefined. Add a warning to that effect. OK deraadt@ jmc@
* more library historyschwarze2013-07-174-15/+22
| | | | | facts checked by sobrado@ style tweaks and ok jmc@
* use .Mt for email addresses; from Jan Stary <hans at stare dot cz>; ok jmc@schwarze2013-07-164-12/+12
|
* Use the fancy .In macro for includes. From Jan Klemkow. ok jmc schwarzetedu2013-06-0552-157/+157
|
* remove some incredible lies about overlapping buffersderaadt2013-06-042-22/+10
| | | | ok guenther
* Fix catopen(3) for UTF-8 locales and update the implementation to POSIX-2008.stsp2013-06-011-2/+2
| | | | | | | | | Catalogs had an arbitrary character set which was used regardless of locale. Add UTF-8-encoded catalogs for libc error messages, and rename existing ones to indicate their character sets. catopen(3) now chooses a catalog which matches the locale's encoding, if available. help & ok matthew, man page bits ok jmc, input from naddy and bluhm
* Remove useless include.ajacoutot2013-05-301-2/+1
| | | | ok millert@
* typo: compare len against null needle, not haystackajacoutot2013-05-151-2/+2
| | | | | | from Alf Schlichting ok millert@
* Add an implementation of memmem() -- from FreeBSD with some tweaks.ajacoutot2013-05-133-4/+145
| | | | | | | | | Requires a libc minor bump, committing now so that we have up-to-date snapshots for the upcoming hackathon. joint work with millert@ man page bits ok jmc@ input and ok millert@, guenther@, deraadt@
* remove leftover NOLINT, WANTLINT, LINTFLAGS, LOBJ vars and lint targets.okan2012-08-021-21/+1
| | | | ok guenther@
* fix an off-by-one error where the return value would point to thenaddy2012-07-111-2/+2
| | | | character after the '\0'; ok guenther@
* Add strnlen() to libkern.matthew2012-04-261-1/+5
| | | | ok deraadt
* tweak previous;jmc2012-04-031-3/+3
|
* simplify the strlcpy/strlcat manual page substantially. do lessderaadt2012-04-021-70/+58
| | | | | | | | | | | | explaining of "what a C string is", and make it more clear that these functiosn BEHAVE EXACTLY LIKE snprintf with "%s"! (anyone who wants to write a 'strlcpy considered harmful' paper should probably write a 'strlcpy and snprintf considered harmful' paper instead). note to those from other projects reading this commit message: It would be very good if this new manual was picked up in your project. ok jmc millert krw
* Bump standards years, as we conform to the new versions tooguenther2012-03-261-4/+4
| | | | ok jmc@
* strsignal() was standardized in POSIX-2008guenther2012-03-261-2/+7
| | | | ok millert@
* fix SEE ALSO;jmc2012-01-171-2/+2
|
* Add stpcpy() and stpncpy(), pointless crap that made it into POSIX.guenther2012-01-174-3/+222
| | | | | | Includes friendly linker warning to wake up those dumb enough to use it. Committing for kettenis@, who ran away to the hills after writing it
* grammar;jmc2012-01-141-2/+2
|
* this is sparta^WPOSIX 2008espie2012-01-141-2/+7
| | | | okay millert@
* strdup and strndup both use malloc. Make this fact explicit.lum2011-12-081-3/+5
| | | | ok jmc@
* tweak previous;jmc2011-07-253-6/+6
|
* update HISTORY and SEE ALSO for all of string(3), together with variousschwarze2011-07-2553-237/+642
| | | | | smaller improvements; jmc@ and nicm@ both ask me to get this in because further tweaking will be easier in-tree
* Sync wcslcpy and wcslcat with strlcpy and strlcat. OK deraadt@millert2011-07-242-50/+26
|
* Minor function name tweaks.nicm2011-07-093-8/+8
|
* Instead of documenting all the wide string functions in wmemchr(3), addnicm2011-07-0918-139/+1327
| | | | | | | individual pages (based on the existing string man pages). By Tim van der Molen (tbvdm at xs4all dot nl) after a suggestion by millert@. ok deraadt
* After a certain amount of fighting with the mbstowcs API, remove L fromnicm2011-07-081-4/+12
| | | | | | the wcsdup example. ok stsp
* Fix some awful code in the example, pointed out by millert@.nicm2011-07-051-3/+3
|
* Add wcsdup(), from NetBSD.nicm2011-07-043-3/+120
| | | | ok deraadt matthew
* fix wcscasecmp() parameters; <wchar.h> was correctnaddy2011-06-011-2/+2
|
* tweak previous (my fault);jmc2011-05-281-4/+4
|
* wcs(n)casecmp support, manpage comments from jmc@, okay deraadt@espie2011-05-283-5/+82
|
* Add a wcswidth man page (based on FreeBSD), and fix the implementationstsp2011-04-043-5/+68
| | | | | to return -1 in case of an unprintable character. ok nicm jmc
* Add timingsafe_bcmp(3) to libc, mention that it's already in thematthew2010-09-243-5/+62
| | | | | | kernel in kern(9), and remove it from OpenSSH. ok deraadt@, djm@
* observe the following spelling:jmc2010-09-102-9/+9
| | | | | | | | | - wide character (noun) - wide-character (adjective) this is the "fix of least resistance", and appears to be in line with posix style; a tiny fix still needed for curses, but i'll mail that upstream;
* Avoid using and end pointer since strnlen(string, -1) is legalmillert2010-06-021-4/+3
| | | | | and would otherwise result in overflowing the end pointer and cause strnlen() to return 0. OK sthen@
* Add HISTORY section, mostly for strnlen() but include strlen() formillert2010-05-241-2/+11
| | | | completeness (verified).
* remove unused variable.chl2010-05-211-2/+1
| | | | ok millert@ tedu@
* tweak previous;jmc2010-05-192-13/+11
|
* add posix_madvise, posix_memalign, strndup, and strnlen. mostly fromtedu2010-05-185-9/+142
| | | | | brad and millert, with hints from guenther, jmc, and otto I think. ok previous.
* Modify example not to use an assignment in the if statement. We shouldn'tkettenis2010-03-241-3/+4
| | | | | | teach people bad habits! ok krw@, jmc@, dlg@, thib@
* Use MACHINE_CPU instead of MACHINE_ARCH to pick the correct machine dependentmiod2010-02-031-3/+3
| | | | | | | files or directories when applicable. The inspiration and name of MACHINE_CPU come from NetBSD, although the way to provide it to Makefiles is completely different. ok kettenis@
* missing word;jmc2009-12-051-3/+3
| | | | from trhodes@freebsd, r200095;
* unbreak wcschr(string, L'\0') which was incorrectly returning NULLdjm2008-08-231-3/+5
| | | | rather than a pointer to the terminating nul; ok deraadt@
* bcmp(3) tries to return length, which is a size_t, as an int.ray2008-03-191-4/+4
| | | | | | | | Instead, just return 1 if there is a difference. Found by lint. OK millert.
* - len is size_t, but n uses len and is an int. Matching those typesray2008-03-151-6/+12
| | | | | | | | | | | | | | | should be good, plus it prevents weird things from happening if len > INT_MAX. - Since n is now size_t, compare it against 0 instead of >= 0. - temp is used to store individual bytes, so use char instead (matches fp and tp). - millert noted that the comma operator may not guarantee order of execution, so replace with semicolons. Found by lint, OK millert.
* Convert c to unsigned char, like it says in the manual. Also addray2008-03-151-4/+3
| | | | | | cast to make it explicit. Found by lint, OK millert.
* typos; ok jmc@martynas2007-11-271-2/+2
| | | | sys/dev/pci/pciide.c from naddy@
* Make sure to use unique target names so that make -j does not break;miod2007-10-251-25/+25
| | | | feedback and ok espie@
* add HISTORY; shortened version of diff from Ilya A. Kovalenkojmc2007-09-191-2/+7
| | | | ok millert