summaryrefslogtreecommitdiff
path: root/spat.h
blob: d1d2dc30d9094098e8be7d8ec4dfcbb3bc6cdb56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* $Header: spat.h,v 1.0 87/12/18 13:06:10 root Exp $
 *
 * $Log:	spat.h,v $
 * Revision 1.0  87/12/18  13:06:10  root
 * Initial revision
 * 
 */

struct scanpat {
    SPAT	*spat_next;		/* list of all scanpats */
    COMPEX	spat_compex;		/* compiled expression */
    ARG		*spat_repl;		/* replacement string for subst */
    ARG		*spat_runtime;		/* compile pattern at runtime */
    STR		*spat_first;		/* for a fast bypass of execute() */
    bool	spat_flags;
    char	spat_flen;
};

#define SPAT_USED 1			/* spat has been used once already */
#define SPAT_USE_ONCE 2			/* use pattern only once per article */
#define SPAT_SCANFIRST 4		/* initial constant not anchored */
#define SPAT_SCANALL 8			/* initial constant is whole pat */

EXT SPAT *spat_root;		/* list of all spats */
EXT SPAT *curspat;		/* what to do \ interps from */

#define Nullspat Null(SPAT*)