/*
 * Definitions etc. for regexp(3) routines.
 *
 * Caveat:  this is V8 regexp(3) [actually, a reimplementation thereof],
 * not the System V one.
 */

/* FILE MODIFIED fROM Henry Spencer's distribution
 * By: Colas Nahaboo (Bull Research) December 1991, for Klone distrib
 * colas@sophia.inria.fr
 * Mods are marked "COLAS"
 */

#ifdef DEBUG2
#ifndef DEBUG
#define DEBUG
#endif
#endif

/* COLAS: no more #define NSUBEXP  10, dynamic now ==> 2^16 */
/* but the first 10 ones are stored the old way (smaller space) */
#define NSUBEXP_BUILTIN 10

typedef struct regexp {
    char **startp;			/* the only one malloced */
    char **endp;			/* points into previous */
    int nsubexp;		/* size of the startp and endp arrays */
    short *o_parnums;			/* stores extended numbers ( */
    short *c_parnums;			/* stores extended numbers ) */
    char regstart;		/* Internal use only. */
    char reganch;		/* Internal use only. */
    char *regmust;		/* Internal use only. */
    int regmlen;		/* Internal use only. */
    char program[1];	/* Unwarranted chumminess with compiler. */
} regexp;

extern regexp *Klregcomp();
extern int Klregexec();
/* extern void regsub(); /* COLAS: modification for Klone */
extern char *Kl_regsub();

extern void Kl_regerror();

/* COLAS: following is the inclusion of file "regmagic.h",
 * and the renaming of MAGIC into REGMAGIC
 */
/*
 * The first byte of the regexp internal "program" is actually this magic
 * number; the start node begins in the second byte.
 */
#define	REGMAGIC	0234


syntax highlighted by Code2HTML, v. 0.9.1