summaryrefslogtreecommitdiff
path: root/lib/libc/string
AgeCommit message (Collapse)Author
2012-08-02remove leftover NOLINT, WANTLINT, LINTFLAGS, LOBJ vars and lint targets.Okan Demirmen
ok guenther@
2012-07-11fix an off-by-one error where the return value would point to theChristian Weisgerber
character after the '\0'; ok guenther@
2012-04-26Add strnlen() to libkern.Matthew Dempsky
ok deraadt
2012-04-03tweak previous;Jason McIntyre
2012-04-02simplify the strlcpy/strlcat manual page substantially. do lessTheo de Raadt
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
2012-03-26Bump standards years, as we conform to the new versions tooPhilip Guenthe
ok jmc@
2012-03-26strsignal() was standardized in POSIX-2008Philip Guenthe
ok millert@
2012-01-17fix SEE ALSO;Jason McIntyre
2012-01-17Add stpcpy() and stpncpy(), pointless crap that made it into POSIX.Philip Guenthe
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
2012-01-14grammar;Jason McIntyre
2012-01-14this is sparta^WPOSIX 2008Marc Espie
okay millert@
2011-12-08strdup and strndup both use malloc. Make this fact explicit.lum
ok jmc@
2011-07-25tweak previous;Jason McIntyre
2011-07-25update HISTORY and SEE ALSO for all of string(3), together with variousIngo Schwarze
smaller improvements; jmc@ and nicm@ both ask me to get this in because further tweaking will be easier in-tree
2011-07-24Sync wcslcpy and wcslcat with strlcpy and strlcat. OK deraadt@Todd C. Miller
2011-07-09Minor function name tweaks.Nicholas Marriott
2011-07-09Instead of documenting all the wide string functions in wmemchr(3), addNicholas Marriott
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
2011-07-08After a certain amount of fighting with the mbstowcs API, remove L fromNicholas Marriott
the wcsdup example. ok stsp
2011-07-05Fix some awful code in the example, pointed out by millert@.Nicholas Marriott
2011-07-04Add wcsdup(), from NetBSD.Nicholas Marriott
ok deraadt matthew
2011-06-01fix wcscasecmp() parameters; <wchar.h> was correctChristian Weisgerber
2011-05-28tweak previous (my fault);Jason McIntyre
2011-05-28wcs(n)casecmp support, manpage comments from jmc@, okay deraadt@Marc Espie
2011-04-04Add a wcswidth man page (based on FreeBSD), and fix the implementationStefan Sperling
to return -1 in case of an unprintable character. ok nicm jmc
2010-09-24Add timingsafe_bcmp(3) to libc, mention that it's already in theMatthew Dempsky
kernel in kern(9), and remove it from OpenSSH. ok deraadt@, djm@
2010-09-10observe the following spelling:Jason McIntyre
- 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;
2010-06-02Avoid using and end pointer since strnlen(string, -1) is legalTodd C. Miller
and would otherwise result in overflowing the end pointer and cause strnlen() to return 0. OK sthen@
2010-05-24Add HISTORY section, mostly for strnlen() but include strlen() forTodd C. Miller
completeness (verified).
2010-05-21remove unused variable.Charles Longeau
ok millert@ tedu@
2010-05-19tweak previous;Jason McIntyre
2010-05-18add posix_madvise, posix_memalign, strndup, and strnlen. mostly fromTed Unangst
brad and millert, with hints from guenther, jmc, and otto I think. ok previous.
2010-03-24Modify example not to use an assignment in the if statement. We shouldn'tMark Kettenis
teach people bad habits! ok krw@, jmc@, dlg@, thib@
2010-02-03Use MACHINE_CPU instead of MACHINE_ARCH to pick the correct machine dependentMiod Vallat
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@
2009-12-05missing word;Jason McIntyre
from trhodes@freebsd, r200095;
2008-08-23unbreak wcschr(string, L'\0') which was incorrectly returning NULLDamien Miller
rather than a pointer to the terminating nul; ok deraadt@
2008-03-19bcmp(3) tries to return length, which is a size_t, as an int.Ray Lai
Instead, just return 1 if there is a difference. Found by lint. OK millert.
2008-03-15- len is size_t, but n uses len and is an int. Matching those typesRay Lai
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.
2008-03-15Convert c to unsigned char, like it says in the manual. Also addRay Lai
cast to make it explicit. Found by lint, OK millert.
2007-11-27typos; ok jmc@Martynas Venckus
sys/dev/pci/pciide.c from naddy@
2007-10-25Make sure to use unique target names so that make -j does not break;Miod Vallat
feedback and ok espie@
2007-09-19add HISTORY; shortened version of diff from Ilya A. KovalenkoJason McIntyre
ok millert
2007-09-03remove trailing whitespace;Jason McIntyre
2007-09-03add memrchr(3)Todd C. Miller
2007-09-02use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgTheo de Raadt
2007-08-08Show how to use strcspn(3) to trim newlines.Ray Lai
OK jmc and millert.
2007-05-31convert to new .Dd format;Jason McIntyre
2007-03-01If NLS is disabled, strerror does not print the correct error string.Alexander Bluhm
No binary change with NLS enabled. ok otto millert espie
2007-02-19wording fix from wiz@netbsd, -r1.11;Jason McIntyre
2007-02-19from hubertf@netbsd:Jason McIntyre
Try to tell what this really does. Including a BUGS section on why it doesn't. *roff code by wiz@, with some input from Slava Semushin <slava.semushin@gmail.com> ok millert
2006-05-05Convert do {} while loop -> while {} for clarity. No binary changeTodd C. Miller
on most architectures. From Oliver Smith. OK deraadt@ and henning@