| 1 |
pippijn |
1.4 |
/** |
| 2 |
|
|
* match.h: String matching |
| 3 |
|
|
* |
| 4 |
|
|
* Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team |
| 5 |
|
|
* Rights to this code are as documented in COPYING. |
| 6 |
|
|
* |
| 7 |
|
|
* |
| 8 |
|
|
* Portions of this file were derived from sources bearing the following license: |
| 9 |
pippijn |
1.3 |
* Copyright © 2003-2004 E. Will et al. |
| 10 |
|
|
* Copyright © 2005-2006 Atheme Development Group |
| 11 |
pippijn |
1.2 |
* Rights to this code are as defined in doc/pod/license.pod. |
| 12 |
pippijn |
1.1 |
* |
| 13 |
pippijn |
1.5 |
* $Id: match.h,v 1.4 2007-09-16 18:54:42 pippijn Exp $ |
| 14 |
pippijn |
1.1 |
*/ |
| 15 |
|
|
|
| 16 |
|
|
#ifndef _MATCH_H |
| 17 |
|
|
#define _MATCH_H |
| 18 |
|
|
|
| 19 |
|
|
/* cidr.c */ |
| 20 |
pippijn |
1.3 |
E int match_ips (char const * const mask, char const * const address); |
| 21 |
|
|
E int match_cidr (char const * const mask, char const * const address); |
| 22 |
pippijn |
1.1 |
|
| 23 |
pippijn |
1.3 |
E int match (char const * const mask, char const * const name); |
| 24 |
pippijn |
1.1 |
E char *collapse (char *); |
| 25 |
|
|
|
| 26 |
|
|
/* regex_create() flags */ |
| 27 |
|
|
#define AREGEX_ICASE 1 /* case insensitive */ |
| 28 |
|
|
|
| 29 |
|
|
E regex_t *regex_create (char *pattern, int flags); |
| 30 |
|
|
E char *regex_extract (char *pattern, char **pend, int *pflags); |
| 31 |
|
|
E bool regex_match (regex_t * preg, char *string); |
| 32 |
|
|
E bool regex_destroy (regex_t * preg); |
| 33 |
|
|
|
| 34 |
|
|
#endif |