]> sourceware.org Git - newlib-cygwin.git/commit - newlib/ChangeLog
Make strstr and strcasestr O(n), not O(n^2); add memmem.
authorEric Blake <eblake@redhat.com>
Sat, 12 Jan 2008 04:25:55 +0000 (04:25 +0000)
committerEric Blake <eblake@redhat.com>
Sat, 12 Jan 2008 04:25:55 +0000 (04:25 +0000)
commit40617efc8b9309006af1f0c72425fc4a404f40d4
tree5f97df24fcf156b492ae2123f201de1528abf0cf
parent978e84cf602994e44570fbac0c7adcd2ef5690e1
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.
newlib/ChangeLog
newlib/libc/include/string.h
newlib/libc/string/Makefile.am
newlib/libc/string/memmem.c [new file with mode: 0644]
newlib/libc/string/str-two-way.h [new file with mode: 0644]
newlib/libc/string/strcasestr.c
newlib/libc/string/strings.tex
newlib/libc/string/strstr.c
This page took 0.028331 seconds and 5 git commands to generate.