[LIB]: Boyer-Moore extension for textsearch infrastructure strike #2
authorPablo Neira Ayuso <pablo@eurodev.net>
Thu, 25 Aug 2005 23:12:22 +0000 (16:12 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 29 Aug 2005 23:11:06 +0000 (16:11 -0700)
Attached the implementation of the Boyer-Moore string search
algorithm for the new textsearch infrastructure.

I've added as well a note about the limitations that this approach
presents, as Thomas has remarked.

Signed-off-by: Pablo Neira Ayuso <pablo@eurodev.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
lib/Kconfig
lib/Makefile
lib/ts_bm.c [new file with mode: 0644]

index eeb429a..b62f685 100644 (file)
@@ -72,6 +72,16 @@ config TEXTSEARCH
 config TEXTSEARCH_KMP
        tristate
 
+config TEXTSEARCH_BM
+        depends on TEXTSEARCH
+        tristate "Boyer-Moore"
+        help
+          Say Y here if you want to be able to search text using the
+          Boyer-Moore textsearch algorithm.
+
+          To compile this code as a module, choose M here: the
+          module will be called ts_bm.
+
 config TEXTSEARCH_FSM
        tristate
 
index f28d903..52f8338 100644 (file)
@@ -38,6 +38,7 @@ obj-$(CONFIG_REED_SOLOMON) += reed_solomon/
 
 obj-$(CONFIG_TEXTSEARCH) += textsearch.o
 obj-$(CONFIG_TEXTSEARCH_KMP) += ts_kmp.o
+obj-$(CONFIG_TEXTSEARCH_BM) += ts_bm.o
 obj-$(CONFIG_TEXTSEARCH_FSM) += ts_fsm.o
 
 hostprogs-y    := gen_crc32table
diff --cc lib/ts_bm.c
Simple merge