18 Commits

Author SHA1 Message Date
Rich Felker
e0614f7cd4 add all missing wchar functions except floating point parsers
these are mostly untested and adapted directly from corresponding byte
string functions and similar.
2012-03-01 23:24:45 -05:00
Rich Felker
a6540174be add dummied strverscmp (obnoxious GNU function)
programs that use this tend to horribly botch international text
support, so it's questionable whether we want to support it even in
the long term... for now, it's just a dummy that calls strcmp.
2011-09-11 22:45:56 -04:00
Rich Felker
73d2fde119 fix wrong type for wcsrchr argument 2 2011-06-13 14:06:04 -04:00
Rich Felker
86339bc4ba fix strncat and wcsncat (double null termination)
also modify wcsncpy to use the same loop logic
2011-05-22 21:58:43 -04:00
Rich Felker
e98136207a fix wcsncpy writing past end of buffer 2011-05-22 21:54:42 -04:00
Rich Felker
b5b41212a6 function signature fix: add const qualifier to mempcpy src arg 2011-04-26 12:28:41 -04:00
Rich Felker
6597f9ac13 implement memrchr (nonstandard) and optimize strrchr in terms of it 2011-04-13 08:36:29 -04:00
Rich Felker
cb8dff2149 fix misplaced *'s in string functions (harmless) 2011-04-07 16:19:30 -04:00
Rich Felker
1fee6186fe fix prototype for strsep 2011-04-06 14:28:29 -04:00
Rich Felker
16675df793 fix misaligned read on early string termination in strchr
this could actually cause rare crashes in the case where a short
string is located at the end of a page and the following page is not
readable, and in fact this was seen in gcc compiling certain files.
2011-04-05 09:27:41 -04:00
Rich Felker
c68b26369e fix serious bug in strchr - char signedness
search for bytes with high bit set was giving (potentially dangerous)
wrong results. i've tested, cleaned up, and hopefully sped up this
function now.
2011-04-03 18:16:11 -04:00
Rich Felker
9ae8d5fc71 fix all implicit conversion between signed/unsigned pointers
sadly the C language does not specify any such implicit conversion, so
this is not a matter of just fixing warnings (as gcc treats it) but
actual errors. i would like to revisit a number of these changes and
possibly revise the types used to reduce the number of casts required.
2011-03-25 16:34:03 -04:00
Rich Felker
a012aa879f fix broken wmemchr (unbounded search) 2011-03-17 22:38:45 -04:00
Rich Felker
2a195dd31c fix missing prototype for strsignal 2011-02-26 23:50:26 -05:00
Rich Felker
b8ff2aaabb add implementation of memccpy function 2011-02-24 12:35:42 -05:00
Rich Felker
9f19b3ec8d fix backwards conditional in stpncpy
this only made the function unnecessarily slow on systems with
unaligned access, but would of course crash on systems that can't do
unaligned accesses (none of which have ports yet).
2011-02-24 12:34:31 -05:00
Rich Felker
ca1aa5bae9 more header cleanup and conformance fixes - string.h 2011-02-14 20:53:15 -05:00
Rich Felker
0b44a0315b initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00