src/utils.[ch]: _icase_search clean up

_icase_search and icase_search stuff has been removed,
    because it's not used for now (it is also buggy)

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
This commit is contained in:
Mikhail S. Pobolovets 2009-05-11 11:40:33 +03:00
parent 0a08e13a6c
commit 31332a2f00
2 changed files with 0 additions and 33 deletions

View File

@ -680,37 +680,6 @@ extract_line (const char *s, const char *top)
return tmp_line;
}
/* FIXME: I should write a faster version of this (Aho-Corasick stuff) */
const char *
_icase_search (const char *text, const char *data, int *lng)
{
const char *d = text;
const char *e = data;
int dlng = 0;
if (lng)
*lng = 0;
for (;*e; e++) {
while (*(e+1) == '\b' && *(e+2)) {
e += 2;
dlng += 2;
}
if (g_ascii_toupper((gchar) *d) == g_ascii_toupper((gchar) *e))
d++;
else {
e -= d - text;
d = text;
dlng = 0;
}
if (!*d) {
if (lng)
*lng = strlen (text) + dlng;
return e+1;
}
}
return 0;
}
/* The basename routine */
const char *
x_basename (const char *s)

View File

@ -121,8 +121,6 @@ int exist_file (const char *name);
/* Returns a copy of *s until a \n is found and is below top */
const char *extract_line (const char *s, const char *top);
const char *_icase_search (const char *text, const char *data, int *lng);
#define icase_search(T,D) _icase_search((T), (D), NULL)
/* Matching */
enum {