1 | /* |
1 | /* |
2 | * Copyright © 2003-2004 E. Will et al. |
2 | * Copyright © 2003-2004 E. Will et al. |
3 | * Copyright © 2005-2006 Atheme Development Group |
3 | * Copyright © 2005-2006 Atheme Development Group |
4 | * Rights to this code are as defined in doc/pod/license.pod. |
4 | * Rights to this code are as defined in doc/pod/license.pod. |
5 | * |
5 | * |
6 | * String matching |
6 | * String matching |
7 | * |
7 | * |
8 | * $Id: match.h,v 1.2 2007/07/21 01:29:07 pippijn Exp $ |
8 | * $Id: match.h,v 1.3 2007/08/28 17:08:06 pippijn Exp $ |
9 | */ |
9 | */ |
10 | |
10 | |
11 | #ifndef _MATCH_H |
11 | #ifndef _MATCH_H |
12 | #define _MATCH_H |
12 | #define _MATCH_H |
13 | |
13 | |
14 | /* cidr.c */ |
14 | /* cidr.c */ |
15 | E int match_ips (const char *mask, const char *address); |
15 | E int match_ips (char const * const mask, char const * const address); |
16 | E int match_cidr (const char *mask, const char *address); |
16 | E int match_cidr (char const * const mask, char const * const address); |
17 | |
17 | |
18 | /* match.c */ |
18 | /* match.c */ |
19 | #define MATCH_RFC1459 0 |
19 | #define MATCH_RFC1459 0 |
20 | #define MATCH_ASCII 1 |
20 | #define MATCH_ASCII 1 |
21 | |
21 | |
… | |
… | |
40 | void set_match_mapping (int); |
40 | void set_match_mapping (int); |
41 | |
41 | |
42 | E int ToLower (int); |
42 | E int ToLower (int); |
43 | E int ToUpper (int); |
43 | E int ToUpper (int); |
44 | |
44 | |
45 | E int irccasecmp (const char *, const char *); |
45 | E int match (char const * const mask, char const * const name); |
46 | E int ircncasecmp (const char *, const char *, int); |
|
|
47 | |
|
|
48 | E int match (const char *, const char *); |
|
|
49 | E char *collapse (char *); |
46 | E char *collapse (char *); |
50 | |
47 | |
51 | /* regex_create() flags */ |
48 | /* regex_create() flags */ |
52 | #define AREGEX_ICASE 1 /* case insensitive */ |
49 | #define AREGEX_ICASE 1 /* case insensitive */ |
53 | |
50 | |