summaryrefslogtreecommitdiff
path: root/modules/strstr
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2008-01-10 07:38:11 -0700
committerEric Blake <ebb9@byu.net>2008-01-10 14:31:04 -0700
commit96facb24aa17b8d412d2f37fa91d59282d950ebb (patch)
treebbf196a18ac8c1b0c27df73862ce5b3d39a8dab0 /modules/strstr
parent619c189e199adf139ed298d1852e92987eb6289f (diff)
downloadgnulib-96facb24aa17b8d412d2f37fa91d59282d950ebb.tar.gz
Avoid quadratic strstr implementations.
* lib/strstr.c: New file. * m4/strstr.m4: Likewise. * modules/strstr: Likewise. * modules/strstr-tests: Likewise. * tests/test-strstr.c: Likewise. * lib/string.in.h (rpl_strstr): Declare. (memmem) [GNULIB_POSIXCHECK]: Document speed issue. * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Support strstr. * modules/string (Makefile.am): Likewise. * MODULES.html.sh (string handling): Mention new module. * doc/functions/strstr.texi (strstr): Document the bug. Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'modules/strstr')
-rw-r--r--modules/strstr27
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/strstr b/modules/strstr
new file mode 100644
index 0000000000..4f93df95e2
--- /dev/null
+++ b/modules/strstr
@@ -0,0 +1,27 @@
+Description:
+strstr() function: efficiently locate first substring in a buffer.
+
+Files:
+lib/strstr.c
+m4/strstr.m4
+
+Depends-on:
+string
+stdbool
+memchr
+memcmp
+
+configure.ac:
+gl_FUNC_STRSTR
+gl_STRING_MODULE_INDICATOR([strstr])
+
+Makefile.am:
+
+Include:
+<string.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all, Eric Blake