3 #if defined(__cplusplus)
13 typedef struct Resub Resub;
14 typedef struct Reclass Reclass;
15 typedef struct Reinst Reinst;
16 typedef struct Reprog Reprog;
19 * Sub expression matches
35 * character class, each pair of rune's defines a range
43 * Machine instructions
48 Reclass *cp; /* class pointer */
49 Rune r; /* character */
50 int subid; /* sub-expression id for RBRA and LBRA */
51 Reinst *right; /* right child of OR */
53 union { /* regexp relies on these two being in the same union */
54 Reinst *left; /* left child of OR */
55 Reinst *next; /* next instruction for CAT & LBRA */
60 * Reprogram definition
63 Reinst *startinst; /* start pc */
64 Reclass class[16]; /* .data */
65 Reinst firstinst[5]; /* .text */
68 extern Reprog *regcomp9(char*);
69 extern Reprog *regcomplit9(char*);
70 extern Reprog *regcompnl9(char*);
71 extern void regerror9(char*);
72 extern int regexec9(Reprog*, char*, Resub*, int);
73 extern void regsub9(char*, char*, int, Resub*, int);
75 extern int rregexec9(Reprog*, Rune*, Resub*, int);
76 extern void rregsub9(Rune*, Rune*, int, Resub*, int);
79 * Darwin simply cannot handle having routines that
80 * override other library routines.
82 #ifndef NOPLAN9DEFINES
83 #define regcomp regcomp9
84 #define regcomplit regcomplit9
85 #define regcompnl regcompnl9
86 #define regerror regerror9
87 #define regexec regexec9
88 #define regsub regsub9
89 #define rregexec rregexec9
90 #define rregsub rregsub9
93 #if defined(__cplusplus)