perlbug does not report usage on invalid flags
[p5sagit/p5-mst-13.2.git] / ext / re / re.xs
CommitLineData
b9d5759e 1/* We need access to debugger hooks */
2#ifndef DEBUGGING
3# define DEBUGGING
4#endif
5
56953603 6#include "EXTERN.h"
7#include "perl.h"
8#include "XSUB.h"
9
10extern regexp* my_regcomp _((char* exp, char* xend, PMOP* pm));
11extern I32 my_regexec _((regexp* prog, char* stringarg, char* strend,
12 char* strbeg, I32 minend, SV* screamer,
13 void* data, U32 flags));
14
15static int oldfl;
16
17#define R_DB 512
18
19static void
20deinstall(void)
21{
5c0ca799 22 dTHR;
3280af22 23 PL_regexecp = &regexec_flags;
24 PL_regcompp = &pregcomp;
56953603 25 if (!oldfl)
3280af22 26 PL_debug &= ~R_DB;
56953603 27}
28
29static void
30install(void)
31{
5c0ca799 32 dTHR;
3280af22 33 PL_regexecp = &my_regexec;
34 PL_regcompp = &my_regcomp;
35 oldfl = PL_debug & R_DB;
36 PL_debug |= R_DB;
56953603 37}
38
39MODULE = re PACKAGE = re
40
41void
42install()
43
44void
45deinstall()