ts_bm.c (9e8238020c5beba64e7ffafbb7ea0fb02fe68270) ts_bm.c (d89775fc929c5a1d91ed518a71b456da0865e5ff)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * lib/ts_bm.c Boyer-Moore text search implementation
4 *
5 * Authors: Pablo Neira Ayuso <pablo@eurodev.net>
6 *
7 * ==========================================================================
8 *
9 * Implements Boyer-Moore string matching algorithm:
10 *
11 * [1] A Fast String Searching Algorithm, R.S. Boyer and Moore.
12 * Communications of the Association for Computing Machinery,
13 * 20(10), 1977, pp. 762-772.
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * lib/ts_bm.c Boyer-Moore text search implementation
4 *
5 * Authors: Pablo Neira Ayuso <pablo@eurodev.net>
6 *
7 * ==========================================================================
8 *
9 * Implements Boyer-Moore string matching algorithm:
10 *
11 * [1] A Fast String Searching Algorithm, R.S. Boyer and Moore.
12 * Communications of the Association for Computing Machinery,
13 * 20(10), 1977, pp. 762-772.
14 * http://www.cs.utexas.edu/users/moore/publications/fstrpos.pdf
14 * https://www.cs.utexas.edu/users/moore/publications/fstrpos.pdf
15 *
16 * [2] Handbook of Exact String Matching Algorithms, Thierry Lecroq, 2004
17 * http://www-igm.univ-mlv.fr/~lecroq/string/string.pdf
18 *
19 * Note: Since Boyer-Moore (BM) performs searches for matchings from right
20 * to left, it's still possible that a matching could be spread over
21 * multiple blocks, in that case this algorithm won't find any coincidence.
22 *

--- 181 unchanged lines hidden ---
15 *
16 * [2] Handbook of Exact String Matching Algorithms, Thierry Lecroq, 2004
17 * http://www-igm.univ-mlv.fr/~lecroq/string/string.pdf
18 *
19 * Note: Since Boyer-Moore (BM) performs searches for matchings from right
20 * to left, it's still possible that a matching could be spread over
21 * multiple blocks, in that case this algorithm won't find any coincidence.
22 *

--- 181 unchanged lines hidden ---