File: regexp.h

package info (click to toggle)
elvis-tiny 1.4-26
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,128 kB
  • sloc: ansic: 13,810; sh: 25; makefile: 13
file content (21 lines) | stat: -rw-r--r-- 664 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * Definitions etc. for regexp(3) routines.
 *
 * Caveat:  this is V8 regexp(3) [actually, a reimplementation thereof],
 * not the System V one.
 */
#define NSUBEXP  10

typedef struct regexp {
	char	*startp[NSUBEXP];
	char	*endp[NSUBEXP];
	int	minlen;		/* length of shortest possible match */
	char	first;		/* first character, if known; else \0 */
	char	bol;		/* boolean: must start at beginning of line? */
	char	program[1];	/* Unwarranted chumminess with compiler. */
} regexp;

extern regexp *regcomp(char *);
extern int regexec(regexp *re, char *str, int bol);
extern void regsub(regexp *re, REG char *src, REG char *dst);
extern void regerror(char *txt);