3 #if defined(__cplusplus)
9 typedef struct Resub Resub;
10 typedef struct Reclass Reclass;
11 typedef struct Reinst Reinst;
12 typedef struct Reprog Reprog;
15 * Sub expression matches
31 * character class, each pair of rune's defines a range
39 * Machine instructions
44 Reclass *cp; /* class pointer */
45 Rune r; /* character */
46 int subid; /* sub-expression id for RBRA and LBRA */
47 Reinst *right; /* right child of OR */
49 union { /* regexp relies on these two being in the same union */
50 Reinst *left; /* left child of OR */
51 Reinst *next; /* next instruction for CAT & LBRA */
56 * Reprogram definition
59 Reinst *startinst; /* start pc */
60 Reclass class[16]; /* .data */
61 Reinst firstinst[5]; /* .text */
64 extern Reprog *regcomp9(char*);
65 extern Reprog *regcomplit9(char*);
66 extern Reprog *regcompnl9(char*);
67 extern void regerror9(char*);
68 extern int regexec9(Reprog*, char*, Resub*, int);
69 extern void regsub9(char*, char*, int, Resub*, int);
71 extern int rregexec9(Reprog*, Rune*, Resub*, int);
72 extern void rregsub9(Rune*, Rune*, int, Resub*, int);
75 * Darwin simply cannot handle having routines that
76 * override other library routines.
78 #ifndef NOPLAN9DEFINES
79 #define regcomp regcomp9
80 #define regcomplit regcomplit9
81 #define regcompnl regcompnl9
82 #define regerror regerror9
83 #define regexec regexec9
84 #define regsub regsub9
85 #define rregexec rregexec9
86 #define rregsub rregsub9
89 #if defined(__cplusplus)