line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#include "EXTERN.h" |
2
|
|
|
|
|
|
|
#include "perl.h" |
3
|
|
|
|
|
|
|
#include "XSUB.h" |
4
|
|
|
|
|
|
|
#include "ppport.h" |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
#include "tidy-html5.h" |
7
|
|
|
|
|
|
|
#include "html-valid-perl.c" |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
typedef html_valid_t * HTML__Valid; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
MODULE=HTML::Valid PACKAGE=HTML::Valid |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
HTML::Valid |
16
|
|
|
|
|
|
|
html_valid_new () |
17
|
|
|
|
|
|
|
CODE: |
18
|
4
|
|
|
|
|
|
Newxz (RETVAL, 1, html_valid_t); |
19
|
4
|
|
|
|
|
|
RETVAL->n_mallocs++; |
20
|
4
|
|
|
|
|
|
html_valid_create (RETVAL); |
21
|
|
|
|
|
|
|
OUTPUT: |
22
|
|
|
|
|
|
|
RETVAL |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
void |
25
|
|
|
|
|
|
|
set_filename (htv, filename) |
26
|
|
|
|
|
|
|
HTML::Valid htv; |
27
|
|
|
|
|
|
|
const char * filename; |
28
|
|
|
|
|
|
|
CODE: |
29
|
0
|
|
|
|
|
|
SetFilename (htv->tdoc, filename); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
void |
32
|
|
|
|
|
|
|
set_option_unsafe (htv, option, value) |
33
|
|
|
|
|
|
|
HTML::Valid htv; |
34
|
|
|
|
|
|
|
SV * option; |
35
|
|
|
|
|
|
|
SV * value; |
36
|
|
|
|
|
|
|
CODE: |
37
|
6
|
|
|
|
|
|
html_valid_set_option (htv, option, value); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
void |
40
|
|
|
|
|
|
|
run (htv, html) |
41
|
|
|
|
|
|
|
HTML::Valid htv; |
42
|
|
|
|
|
|
|
SV * html; |
43
|
|
|
|
|
|
|
PREINIT: |
44
|
|
|
|
|
|
|
SV * output; |
45
|
|
|
|
|
|
|
SV * errors; |
46
|
|
|
|
|
|
|
PPCODE: |
47
|
3
|
|
|
|
|
|
html_valid_run (htv, html, & output, & errors); |
48
|
3
|
50
|
|
|
|
|
EXTEND (SP, 2); |
49
|
3
|
|
|
|
|
|
SvREFCNT_inc_simple_void_NN (output); |
50
|
3
|
|
|
|
|
|
PUSHs (sv_2mortal (output)); |
51
|
3
|
|
|
|
|
|
SvREFCNT_inc_simple_void_NN (errors); |
52
|
3
|
|
|
|
|
|
PUSHs (sv_2mortal (errors)); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
void |
55
|
|
|
|
|
|
|
DESTROY (htv) |
56
|
|
|
|
|
|
|
HTML::Valid htv; |
57
|
|
|
|
|
|
|
CODE: |
58
|
4
|
|
|
|
|
|
html_valid_destroy (htv); |
59
|
4
|
|
|
|
|
|
htv->n_mallocs--; |
60
|
4
|
50
|
|
|
|
|
if (htv->n_mallocs != 0) { |
61
|
0
|
|
|
|
|
|
fprintf (stderr, "%s:%d: memory leak: n_mallocs=%d\n", |
62
|
|
|
|
|
|
|
__FILE__, __LINE__, htv->n_mallocs); |
63
|
|
|
|
|
|
|
} |
64
|
4
|
|
|
|
|
|
Safefree (htv); |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
HV * |
67
|
|
|
|
|
|
|
tag_information () |
68
|
|
|
|
|
|
|
CODE: |
69
|
2
|
|
|
|
|
|
RETVAL = newHV (); |
70
|
2
|
|
|
|
|
|
html_valid_tag_information (RETVAL); |
71
|
|
|
|
|
|
|
OUTPUT: |
72
|
|
|
|
|
|
|
RETVAL |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
AV * |
75
|
|
|
|
|
|
|
tag_attr (tag_id, version) |
76
|
|
|
|
|
|
|
unsigned int tag_id; |
77
|
|
|
|
|
|
|
unsigned int version; |
78
|
|
|
|
|
|
|
CODE: |
79
|
4
|
|
|
|
|
|
RETVAL = newAV (); |
80
|
4
|
|
|
|
|
|
html_valid_tag_attr (RETVAL, tag_id, version); |
81
|
|
|
|
|
|
|
OUTPUT: |
82
|
|
|
|
|
|
|
RETVAL |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
AV * |
85
|
|
|
|
|
|
|
all_attributes () |
86
|
|
|
|
|
|
|
CODE: |
87
|
1
|
|
|
|
|
|
RETVAL = newAV (); |
88
|
1
|
|
|
|
|
|
html_valid_all_attributes (RETVAL); |
89
|
|
|
|
|
|
|
OUTPUT: |
90
|
|
|
|
|
|
|
RETVAL |
91
|
|
|
|
|
|
|
|