diff options
Diffstat (limited to 'utils/misc.c')
-rw-r--r-- | utils/misc.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/utils/misc.c b/utils/misc.c deleted file mode 100644 index d88f743..0000000 --- a/utils/misc.c +++ /dev/null @@ -1,21 +0,0 @@ -#include <regex.h> -#include <netdb.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -int -re_match(const char *string, char *pattern) -{ - int status; - regex_t re; - if (regcomp(&re, pattern, REG_EXTENDED|REG_NOSUB) != 0) { - return 0; - } - status = regexec(&re, string, (size_t) 0, NULL, 0); - regfree(&re); - if (status != 0) { - return 0; - } - return 1; -} |