newlib/newlib/libc
Eric Blake 40617efc8b Make strstr and strcasestr O(n), not O(n^2); add memmem.
* libc/string/str-two-way.h: New file.
* libc/string/memmem.c (memmem): New file.
* libc/include/string.h (memmem): Declare for all platforms.
* libc/string/strstr.c (strstr): Provide O(n) implementation when
not optimizing for space.
* libc/string/strcasestr.c (strcasestr): Likewise.
* libc/string/Makefile.am (ELIX_SOURCES): Rename to...
(ELIX_2_SOURCES): ...this.
(ELIX_4_SOURCES): New category, for memmem.
(lib_a_SOURCES, libstring_la_SOURCES): Build new file.
(CHEWOUT_FILES): Build documentation for memmem.
* libc/string/strings.tex: Include new docs.
2008-01-12 04:25:55 +00:00
..
argz 2007-12-19 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 22:36:48 +00:00
ctype 2007-12-19 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 22:36:48 +00:00
errno 2007-12-19 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 22:36:48 +00:00
iconv 2007-12-19 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 22:36:48 +00:00
include Make strstr and strcasestr O(n), not O(n^2); add memmem. 2008-01-12 04:25:55 +00:00
locale 2007-12-19 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 22:36:48 +00:00
machine 2008-01-08 Jeff Johnston <jjohnstn@redhat.com> 2008-01-08 21:48:06 +00:00
misc 2007-12-19 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 22:36:48 +00:00
posix 2008-01-03 Jeff Johnston <jjohnstn@redhat.com> 2008-01-03 22:33:37 +00:00
reent 2008-01-03 Jeff Johnston <jjohnstn@redhat.com> 2008-01-03 22:33:37 +00:00
search 2007-12-19 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 22:36:48 +00:00
signal 2007-12-19 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 22:36:48 +00:00
stdio 2008-01-03 Jeff Johnston <jjohnstn@redhat.com> 2008-01-03 22:33:37 +00:00
stdio64 2007-12-19 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 22:36:48 +00:00
stdlib 2007-12-19 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 22:36:48 +00:00
string Make strstr and strcasestr O(n), not O(n^2); add memmem. 2008-01-12 04:25:55 +00:00
sys 2008-01-03 Jeff Johnston <jjohnstn@redhat.com> 2008-01-03 22:33:37 +00:00
syscalls 2008-01-03 Jeff Johnston <jjohnstn@redhat.com> 2008-01-03 22:33:37 +00:00
time 2007-07-06 Jeff Johnston <jjohnstn@redhat.com> 2007-07-06 16:56:30 +00:00
unix * ltmain.sh: Update from GCC. 2007-05-24 17:33:42 +00:00
Makefile.am * ltmain.sh: Update from GCC. 2007-05-24 17:33:42 +00:00
Makefile.in * ltmain.sh: Update from GCC. 2007-05-24 17:33:42 +00:00
aclocal.m4 2007-12-19 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 22:36:48 +00:00
configure 2007-12-19 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 22:36:48 +00:00
configure.in * ltmain.sh: Update from GCC. 2007-05-24 17:33:42 +00:00
libc.texinfo 2007-12-19 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 22:36:48 +00:00
saber import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00
sys.tex 2005-10-28 Bob Wilson <bob.wilson@acm.org> 2005-10-28 21:36:05 +00:00