diff ChangeLog @ 8122:32bd3344417d

Ensure O(n) worst-case complexity of c_strcasestr.
author Bruno Haible <bruno@clisp.org>
date Sun, 11 Feb 2007 15:02:50 +0000
parents 03da4921af94
children fa2aa1620003
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2007-02-11  Bruno Haible  <bruno@clisp.org>
+
+	Ensure O(n) worst-case complexity of c_strcasestr.
+	* lib/c-strcasestr.c: Include stdbool.h, string.h.
+	(knuth_morris_pratt): New function.
+	(c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
+	the bookkeeping indicates that it's worth it.
+	* modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
+
+	* modules/c-strcasestr-tests: New file.
+	* tests/test-c-strcasestr.c: New file.
+
 2007-02-11  Bruno Haible  <bruno@clisp.org>
 
 	Ensure O(n) worst-case complexity of c_strstr.