line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#include "EXTERN.h" |
2
|
|
|
|
|
|
|
#include "perl.h" |
3
|
|
|
|
|
|
|
#include "XSUB.h" |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
#include "ppport.h" |
6
|
|
|
|
|
|
|
#include "engine.h" |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
MODULE = Regexp::Compare PACKAGE = Regexp::Compare |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
PROTOTYPES: ENABLE |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
BOOT: |
14
|
1
|
|
|
|
|
|
rc_init(); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
SV * |
17
|
|
|
|
|
|
|
_is_less_or_equal(rs1, rs2) |
18
|
|
|
|
|
|
|
SV *rs1; |
19
|
|
|
|
|
|
|
SV *rs2; |
20
|
|
|
|
|
|
|
CODE: |
21
|
|
|
|
|
|
|
{ |
22
|
9068
|
|
|
|
|
|
REGEXP *r1 = 0, *r2 = 0; |
23
|
|
|
|
|
|
|
int rv; |
24
|
|
|
|
|
|
|
|
25
|
9068
|
|
|
|
|
|
ENTER; |
26
|
|
|
|
|
|
|
|
27
|
9068
|
|
|
|
|
|
r1 = rc_regcomp(rs1); |
28
|
9065
|
|
|
|
|
|
SAVEDESTRUCTOR(rc_regfree, r1); |
29
|
|
|
|
|
|
|
|
30
|
9065
|
|
|
|
|
|
r2 = rc_regcomp(rs2); |
31
|
9063
|
|
|
|
|
|
SAVEDESTRUCTOR(rc_regfree, r2); |
32
|
|
|
|
|
|
|
|
33
|
9063
|
|
|
|
|
|
rv = rc_compare(r1, r2); |
34
|
|
|
|
|
|
|
|
35
|
9063
|
|
|
|
|
|
LEAVE; |
36
|
|
|
|
|
|
|
|
37
|
9063
|
50
|
|
|
|
|
if (rv < 0) |
38
|
|
|
|
|
|
|
{ |
39
|
0
|
0
|
|
|
|
|
if (!rc_error) |
40
|
|
|
|
|
|
|
{ |
41
|
0
|
|
|
|
|
|
rc_error = "???"; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
croak("Regexp::Compare: %s", rc_error); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
9063
|
|
|
|
|
|
RETVAL = newSViv(rv); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
OUTPUT: |
50
|
|
|
|
|
|
|
RETVAL |