File: regexp.h

package info (click to toggle)
imapfilter 1%3A1.2.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 300 kB
  • ctags: 315
  • sloc: ansic: 3,392; sh: 182; makefile: 103
file content (24 lines) | stat: -rw-r--r-- 532 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef REGEXP_H
#define REGEXP_H


#include <stdio.h>
#include <sys/types.h>
#include <regex.h>


/* Regular expression convenience structure. */
typedef struct regexp {
	const char *pattern;	/* Regular expression pattern string. */	
	regex_t *preg;		/* Compiled regular expression. */
	size_t nmatch;		/* Number of subexpressions in pattern. */
	regmatch_t *pmatch;	/* Structure for substrings that matched. */
} regexp;


/*	regexp.c	*/
void regexp_compile(regexp *reg);
void regexp_free(regexp *reg);


#endif				/* REGEXP_H */