diff options
author | Eric Blake <eblake@redhat.com> | 2008-01-12 04:25:55 +0000 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2008-01-12 04:25:55 +0000 |
commit | 40617efc8b9309006af1f0c72425fc4a404f40d4 (patch) | |
tree | 5f97df24fcf156b492ae2123f201de1528abf0cf /winsup/utils/cygcheck.cc | |
parent | 978e84cf602994e44570fbac0c7adcd2ef5690e1 (diff) | |
download | cygnal-40617efc8b9309006af1f0c72425fc4a404f40d4.tar.gz cygnal-40617efc8b9309006af1f0c72425fc4a404f40d4.tar.bz2 cygnal-40617efc8b9309006af1f0c72425fc4a404f40d4.zip |
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.
Diffstat (limited to 'winsup/utils/cygcheck.cc')
0 files changed, 0 insertions, 0 deletions