Skip to content

Commit 1ce2a9a

Browse files
committed
Remove the autogeneration from the user end and store the two header files in the dist to be shipped. Add that to the manifest, remove the autogen from the Makefile.PL. Record it in the Changes
1 parent 0323ebf commit 1ce2a9a

File tree

6 files changed

+320
-36
lines changed

6 files changed

+320
-36
lines changed

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ pm_to_blib
33
Parser.c
44
Parser.bs
55
Makefile
6-
hctype.h
7-
pfunc.h
86
*.o
97
*.old
108
*.tar.gz

Changes

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Change history for HTML-Parser
77
* Add the .mailmap to the MANIFEST
88
* Change the META information to point to the new GH repository
99
* Add a .perltidyrc to use going forward
10+
* Add hctype.h and pfunc.h to the dist as static files and stop asking
11+
for them to be built on the user's end.
1012

1113
2016-01-19 3.72
1214
* Avoid more clang casting warnings

MANIFEST

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ eg/htext Leave only the text
1515
eg/htextsub Do substitutions only on the text content
1616
eg/htitle Extract document title
1717
hints/solaris.pl Avoid compiler bug
18+
hctype.h
1819
hparser.c Parser implementation
1920
hparser.h Parser implementation (data structures)
2021
lib/HTML/Entities.pm Encode and decode entities in strings
@@ -25,6 +26,7 @@ lib/HTML/PullParser.pm HTML::PullParser class
2526
lib/HTML/TokeParser.pm HTML::TokeParser class
2627
mkhctype Generates 'hctype.h'
2728
mkpfunc Generates 'pfunc.h'
29+
pfunc.h
2830
t/api_version.t Test api_version constructor option
2931
t/argspec-bad.t Test various bad argspec arguments
3032
t/argspec.t Test argspec

Makefile.PL

+2-34
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use strict;
22
use ExtUtils::MakeMaker;
33

4-
WriteMakefile(
4+
my %WriteMakefileArgs = (
55
NAME => 'HTML::Parser',
66
VERSION_FROM => 'Parser.pm',
77
ABSTRACT_FROM => 'Parser.pm',
@@ -24,38 +24,6 @@ WriteMakefile(
2424
"hparser.h", "hctype.h", "tokenpos.h", "pfunc.h",
2525
"hparser.c", "util.c",
2626
],
27-
clean => {FILES => 'hctype.h pfunc.h'},
2827
);
2928

30-
31-
sub MY::postamble {
32-
'
33-
pfunc.h : mkpfunc
34-
$(PERLRUN) mkpfunc >pfunc.h
35-
36-
hctype.h : mkhctype
37-
$(PERLRUN) mkhctype >hctype.h
38-
'
39-
}
40-
41-
BEGIN {
42-
# compatibility with older versions of MakeMaker
43-
my $developer = -f "MANIFEST.SKIP";
44-
my %mm_req = (
45-
LICENCE => 6.31,
46-
META_MERGE => 6.45,
47-
META_ADD => 6.45,
48-
MIN_PERL_VERSION => 6.48,
49-
);
50-
undef(*WriteMakefile);
51-
*WriteMakefile = sub {
52-
my %arg = @_;
53-
for (keys %mm_req) {
54-
unless (eval { ExtUtils::MakeMaker->VERSION($mm_req{$_}) }) {
55-
warn "$_ $@" if $developer;
56-
delete $arg{$_};
57-
}
58-
}
59-
ExtUtils::MakeMaker::WriteMakefile(%arg);
60-
};
61-
}
29+
WriteMakefile(%WriteMakefileArgs);

hctype.h

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/* This file is autogenerated by mkhctype */
2+
3+
#define HCTYPE_SPACE 0x01
4+
#define HCTYPE_NAME_FIRST 0x02
5+
#define HCTYPE_NAME_CHAR 0x04
6+
#define HCTYPE_NOT_SPACE_GT 0x08
7+
#define HCTYPE_NOT_SPACE_EQ_GT 0x10
8+
#define HCTYPE_NOT_SPACE_SLASH_GT 0x20
9+
#define HCTYPE_NOT_SPACE_EQ_SLASH_GT 0x40
10+
11+
#define HCTYPE(c) hctype[(unsigned char)(c)]
12+
#define isHCTYPE(c, w) (HCTYPE(c) & (w))
13+
14+
#define isHSPACE(c) isHCTYPE(c, HCTYPE_SPACE)
15+
#define isHNAME_FIRST(c) isHCTYPE(c, HCTYPE_NAME_FIRST)
16+
#define isHNAME_CHAR(c) isHCTYPE(c, HCTYPE_NAME_CHAR)
17+
#define isHNOT_SPACE_GT(c) isHCTYPE(c, HCTYPE_NOT_SPACE_GT)
18+
19+
typedef unsigned char hctype_t;
20+
21+
static hctype_t hctype[] = {
22+
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 0 - 7 */
23+
0x78, 0x01, 0x01, 0x01, 0x01, 0x01, 0x78, 0x78, /* 8 - 15 */
24+
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 16 - 23 */
25+
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 24 - 31 */
26+
0x01, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 32 - 39 */
27+
0x78, 0x78, 0x78, 0x78, 0x78, 0x7c, 0x7c, 0x58, /* 40 - 47 */
28+
0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, /* 48 - 55 */
29+
0x7c, 0x7c, 0x7e, 0x78, 0x78, 0x28, 0x00, 0x78, /* 56 - 63 */
30+
0x78, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, /* 64 - 71 */
31+
0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, /* 72 - 79 */
32+
0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, /* 80 - 87 */
33+
0x7e, 0x7e, 0x7e, 0x78, 0x78, 0x78, 0x78, 0x7e, /* 88 - 95 */
34+
0x78, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, /* 96 - 103 */
35+
0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, /* 104 - 111 */
36+
0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, /* 112 - 119 */
37+
0x7e, 0x7e, 0x7e, 0x78, 0x78, 0x78, 0x78, 0x78, /* 120 - 127 */
38+
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 128 - 135 */
39+
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 136 - 143 */
40+
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 144 - 151 */
41+
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 152 - 159 */
42+
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 160 - 167 */
43+
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 168 - 175 */
44+
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 176 - 183 */
45+
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 184 - 191 */
46+
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 192 - 199 */
47+
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 200 - 207 */
48+
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 208 - 215 */
49+
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 216 - 223 */
50+
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 224 - 231 */
51+
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 232 - 239 */
52+
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 240 - 247 */
53+
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, /* 248 - 255 */
54+
};

pfunc.h

+260
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,260 @@
1+
/* This file is autogenerated by mkpfunc */
2+
typedef char*(*PFUNC)(PSTATE*, char *beg, char *end, U32 utf8, SV* self);
3+
static PFUNC parsefunc[] = {
4+
parse_null, /* 0 */
5+
parse_null, /* 1 */
6+
parse_null, /* 2 */
7+
parse_null, /* 3 */
8+
parse_null, /* 4 */
9+
parse_null, /* 5 */
10+
parse_null, /* 6 */
11+
parse_null, /* 7 */
12+
parse_null, /* 8 */
13+
parse_null, /* 9 */
14+
parse_null, /* 10 */
15+
parse_null, /* 11 */
16+
parse_null, /* 12 */
17+
parse_null, /* 13 */
18+
parse_null, /* 14 */
19+
parse_null, /* 15 */
20+
parse_null, /* 16 */
21+
parse_null, /* 17 */
22+
parse_null, /* 18 */
23+
parse_null, /* 19 */
24+
parse_null, /* 20 */
25+
parse_null, /* 21 */
26+
parse_null, /* 22 */
27+
parse_null, /* 23 */
28+
parse_null, /* 24 */
29+
parse_null, /* 25 */
30+
parse_null, /* 26 */
31+
parse_null, /* 27 */
32+
parse_null, /* 28 */
33+
parse_null, /* 29 */
34+
parse_null, /* 30 */
35+
parse_null, /* 31 */
36+
parse_null, /* 32 */
37+
parse_decl, /* 33 */
38+
parse_null, /* 34 */
39+
parse_null, /* 35 */
40+
parse_null, /* 36 */
41+
parse_null, /* 37 */
42+
parse_null, /* 38 */
43+
parse_null, /* 39 */
44+
parse_null, /* 40 */
45+
parse_null, /* 41 */
46+
parse_null, /* 42 */
47+
parse_null, /* 43 */
48+
parse_null, /* 44 */
49+
parse_null, /* 45 */
50+
parse_null, /* 46 */
51+
parse_end, /* 47 */
52+
parse_null, /* 48 */
53+
parse_null, /* 49 */
54+
parse_null, /* 50 */
55+
parse_null, /* 51 */
56+
parse_null, /* 52 */
57+
parse_null, /* 53 */
58+
parse_null, /* 54 */
59+
parse_null, /* 55 */
60+
parse_null, /* 56 */
61+
parse_null, /* 57 */
62+
parse_null, /* 58 */
63+
parse_null, /* 59 */
64+
parse_null, /* 60 */
65+
parse_null, /* 61 */
66+
parse_null, /* 62 */
67+
parse_process, /* 63 */
68+
parse_null, /* 64 */
69+
parse_start, /* 65 */
70+
parse_start, /* 66 */
71+
parse_start, /* 67 */
72+
parse_start, /* 68 */
73+
parse_start, /* 69 */
74+
parse_start, /* 70 */
75+
parse_start, /* 71 */
76+
parse_start, /* 72 */
77+
parse_start, /* 73 */
78+
parse_start, /* 74 */
79+
parse_start, /* 75 */
80+
parse_start, /* 76 */
81+
parse_start, /* 77 */
82+
parse_start, /* 78 */
83+
parse_start, /* 79 */
84+
parse_start, /* 80 */
85+
parse_start, /* 81 */
86+
parse_start, /* 82 */
87+
parse_start, /* 83 */
88+
parse_start, /* 84 */
89+
parse_start, /* 85 */
90+
parse_start, /* 86 */
91+
parse_start, /* 87 */
92+
parse_start, /* 88 */
93+
parse_start, /* 89 */
94+
parse_start, /* 90 */
95+
parse_null, /* 91 */
96+
parse_null, /* 92 */
97+
parse_null, /* 93 */
98+
parse_null, /* 94 */
99+
parse_null, /* 95 */
100+
parse_null, /* 96 */
101+
parse_start, /* 97 */
102+
parse_start, /* 98 */
103+
parse_start, /* 99 */
104+
parse_start, /* 100 */
105+
parse_start, /* 101 */
106+
parse_start, /* 102 */
107+
parse_start, /* 103 */
108+
parse_start, /* 104 */
109+
parse_start, /* 105 */
110+
parse_start, /* 106 */
111+
parse_start, /* 107 */
112+
parse_start, /* 108 */
113+
parse_start, /* 109 */
114+
parse_start, /* 110 */
115+
parse_start, /* 111 */
116+
parse_start, /* 112 */
117+
parse_start, /* 113 */
118+
parse_start, /* 114 */
119+
parse_start, /* 115 */
120+
parse_start, /* 116 */
121+
parse_start, /* 117 */
122+
parse_start, /* 118 */
123+
parse_start, /* 119 */
124+
parse_start, /* 120 */
125+
parse_start, /* 121 */
126+
parse_start, /* 122 */
127+
parse_null, /* 123 */
128+
parse_null, /* 124 */
129+
parse_null, /* 125 */
130+
parse_null, /* 126 */
131+
parse_null, /* 127 */
132+
parse_null, /* 128 */
133+
parse_null, /* 129 */
134+
parse_null, /* 130 */
135+
parse_null, /* 131 */
136+
parse_null, /* 132 */
137+
parse_null, /* 133 */
138+
parse_null, /* 134 */
139+
parse_null, /* 135 */
140+
parse_null, /* 136 */
141+
parse_null, /* 137 */
142+
parse_null, /* 138 */
143+
parse_null, /* 139 */
144+
parse_null, /* 140 */
145+
parse_null, /* 141 */
146+
parse_null, /* 142 */
147+
parse_null, /* 143 */
148+
parse_null, /* 144 */
149+
parse_null, /* 145 */
150+
parse_null, /* 146 */
151+
parse_null, /* 147 */
152+
parse_null, /* 148 */
153+
parse_null, /* 149 */
154+
parse_null, /* 150 */
155+
parse_null, /* 151 */
156+
parse_null, /* 152 */
157+
parse_null, /* 153 */
158+
parse_null, /* 154 */
159+
parse_null, /* 155 */
160+
parse_null, /* 156 */
161+
parse_null, /* 157 */
162+
parse_null, /* 158 */
163+
parse_null, /* 159 */
164+
parse_null, /* 160 */
165+
parse_null, /* 161 */
166+
parse_null, /* 162 */
167+
parse_null, /* 163 */
168+
parse_null, /* 164 */
169+
parse_null, /* 165 */
170+
parse_null, /* 166 */
171+
parse_null, /* 167 */
172+
parse_null, /* 168 */
173+
parse_null, /* 169 */
174+
parse_null, /* 170 */
175+
parse_null, /* 171 */
176+
parse_null, /* 172 */
177+
parse_null, /* 173 */
178+
parse_null, /* 174 */
179+
parse_null, /* 175 */
180+
parse_null, /* 176 */
181+
parse_null, /* 177 */
182+
parse_null, /* 178 */
183+
parse_null, /* 179 */
184+
parse_null, /* 180 */
185+
parse_null, /* 181 */
186+
parse_null, /* 182 */
187+
parse_null, /* 183 */
188+
parse_null, /* 184 */
189+
parse_null, /* 185 */
190+
parse_null, /* 186 */
191+
parse_null, /* 187 */
192+
parse_null, /* 188 */
193+
parse_null, /* 189 */
194+
parse_null, /* 190 */
195+
parse_null, /* 191 */
196+
parse_null, /* 192 */
197+
parse_null, /* 193 */
198+
parse_null, /* 194 */
199+
parse_null, /* 195 */
200+
parse_null, /* 196 */
201+
parse_null, /* 197 */
202+
parse_null, /* 198 */
203+
parse_null, /* 199 */
204+
parse_null, /* 200 */
205+
parse_null, /* 201 */
206+
parse_null, /* 202 */
207+
parse_null, /* 203 */
208+
parse_null, /* 204 */
209+
parse_null, /* 205 */
210+
parse_null, /* 206 */
211+
parse_null, /* 207 */
212+
parse_null, /* 208 */
213+
parse_null, /* 209 */
214+
parse_null, /* 210 */
215+
parse_null, /* 211 */
216+
parse_null, /* 212 */
217+
parse_null, /* 213 */
218+
parse_null, /* 214 */
219+
parse_null, /* 215 */
220+
parse_null, /* 216 */
221+
parse_null, /* 217 */
222+
parse_null, /* 218 */
223+
parse_null, /* 219 */
224+
parse_null, /* 220 */
225+
parse_null, /* 221 */
226+
parse_null, /* 222 */
227+
parse_null, /* 223 */
228+
parse_null, /* 224 */
229+
parse_null, /* 225 */
230+
parse_null, /* 226 */
231+
parse_null, /* 227 */
232+
parse_null, /* 228 */
233+
parse_null, /* 229 */
234+
parse_null, /* 230 */
235+
parse_null, /* 231 */
236+
parse_null, /* 232 */
237+
parse_null, /* 233 */
238+
parse_null, /* 234 */
239+
parse_null, /* 235 */
240+
parse_null, /* 236 */
241+
parse_null, /* 237 */
242+
parse_null, /* 238 */
243+
parse_null, /* 239 */
244+
parse_null, /* 240 */
245+
parse_null, /* 241 */
246+
parse_null, /* 242 */
247+
parse_null, /* 243 */
248+
parse_null, /* 244 */
249+
parse_null, /* 245 */
250+
parse_null, /* 246 */
251+
parse_null, /* 247 */
252+
parse_null, /* 248 */
253+
parse_null, /* 249 */
254+
parse_null, /* 250 */
255+
parse_null, /* 251 */
256+
parse_null, /* 252 */
257+
parse_null, /* 253 */
258+
parse_null, /* 254 */
259+
parse_null, /* 255 */
260+
};

0 commit comments

Comments
 (0)