3 #if defined(__cplusplus)
11 typedef struct Resub Resub;
12 typedef struct Reclass Reclass;
13 typedef struct Reinst Reinst;
14 typedef struct Reprog Reprog;
17 * Sub expression matches
33 * character class, each pair of rune's defines a range
41 * Machine instructions
46 Reclass *cp; /* class pointer */
47 Rune r; /* character */
48 int subid; /* sub-expression id for RBRA and LBRA */
49 Reinst *right; /* right child of OR */
51 union { /* regexp relies on these two being in the same union */
52 Reinst *left; /* left child of OR */
53 Reinst *next; /* next instruction for CAT & LBRA */
58 * Reprogram definition
61 Reinst *startinst; /* start pc */
62 Reclass class[16]; /* .data */
63 Reinst firstinst[5]; /* .text */
66 extern Reprog *regcomp9(char*);
67 extern Reprog *regcomplit9(char*);
68 extern Reprog *regcompnl9(char*);
69 extern void regerror9(char*);
70 extern int regexec9(Reprog*, char*, Resub*, int);
71 extern void regsub9(char*, char*, int, Resub*, int);
73 extern int rregexec9(Reprog*, Rune*, Resub*, int);
74 extern void rregsub9(Rune*, Rune*, int, Resub*, int);
77 * Darwin simply cannot handle having routines that
78 * override other library routines.
80 #ifndef NOPLAN9DEFINES
81 #define regcomp regcomp9
82 #define regcomplit regcomplit9
83 #define regcompnl regcompnl9
84 #define regerror regerror9
85 #define regexec regexec9
86 #define regsub regsub9
87 #define rregexec rregexec9
88 #define rregsub rregsub9
91 #if defined(__cplusplus)