mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Remove unused regexp_match
This commit is contained in:
parent
7a3c6fe86c
commit
0f9d2b3570
@ -375,24 +375,6 @@ char *stristr_full(const char *data, const char *key)
|
|||||||
return strstr_full_case(data, key, TRUE);
|
return strstr_full_case(data, key, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
int regexp_match(const char *str, const char *regexp)
|
|
||||||
{
|
|
||||||
#ifdef HAVE_REGEX_H
|
|
||||||
regex_t preg;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (regcomp(&preg, regexp, REG_EXTENDED|REG_ICASE|REG_NOSUB) != 0)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
ret = regexec(&preg, str, 0, NULL, 0);
|
|
||||||
regfree(&preg);
|
|
||||||
|
|
||||||
return ret == 0;
|
|
||||||
#else
|
|
||||||
return FALSE;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/* convert ~/ to $HOME */
|
/* convert ~/ to $HOME */
|
||||||
char *convert_home(const char *path)
|
char *convert_home(const char *path)
|
||||||
{
|
{
|
||||||
|
@ -36,9 +36,6 @@ char *gslist_to_string(GSList *list, const char *delimiter);
|
|||||||
items while using this list, use g_slist_free() after you're done with it */
|
items while using this list, use g_slist_free() after you're done with it */
|
||||||
GSList *hashtable_get_keys(GHashTable *hash);
|
GSList *hashtable_get_keys(GHashTable *hash);
|
||||||
|
|
||||||
/* easy way to check if regexp matches */
|
|
||||||
int regexp_match(const char *str, const char *regexp);
|
|
||||||
|
|
||||||
/* convert ~/ to $HOME */
|
/* convert ~/ to $HOME */
|
||||||
char *convert_home(const char *path);
|
char *convert_home(const char *path);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user