]>
Commit | Line | Data |
---|---|---|
1 | /** @file match.h | |
2 | * @brief Interface for matching strings to IRC masks. | |
3 | * @version $Id: match.h,v 1.7 2005/09/12 03:40:17 entrope Exp $ | |
4 | */ | |
5 | #ifndef INCLUDED_match_h | |
6 | #define INCLUDED_match_h | |
7 | #ifndef INCLUDED_sys_types_h | |
8 | #include <sys/types.h> /* XXX - broken BSD system headers */ | |
9 | #define INCLUDED_sys_types_h | |
10 | #endif | |
11 | #ifndef INCLUDED_res_h | |
12 | #include "res.h" | |
13 | #endif | |
14 | ||
15 | /* | |
16 | * Prototypes | |
17 | */ | |
18 | ||
19 | /* | |
20 | * XXX - match returns 0 if a match is found. Smelly interface | |
21 | * needs to be fixed. --Bleep | |
22 | */ | |
23 | extern int mmatch(const char *old_mask, const char *new_mask); | |
24 | extern int match(const char *ma, const char *na); | |
25 | extern char *collapse(char *pattern); | |
26 | ||
27 | extern int matchcomp(char *cmask, int *minlen, int *charset, const char *mask); | |
28 | extern int matchexec(const char *string, const char *cmask, int minlen); | |
29 | extern int matchdecomp(char *mask, const char *cmask); | |
30 | extern int mmexec(const char *wcm, int wminlen, const char *rcm, int rminlen); | |
31 | ||
32 | extern int ipmask_check(const struct irc_in_addr *addr, const struct irc_in_addr *mask, unsigned char bits); | |
33 | ||
34 | #endif /* INCLUDED_match_h */ |