nokolexbor 0.3.4 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/ext/nokolexbor/extconf.rb +9 -5
  3. data/ext/nokolexbor/nl_attribute.c +46 -0
  4. data/ext/nokolexbor/nl_cdata.c +8 -0
  5. data/ext/nokolexbor/nl_comment.c +6 -0
  6. data/ext/nokolexbor/nl_document.c +53 -7
  7. data/ext/nokolexbor/nl_document_fragment.c +9 -0
  8. data/ext/nokolexbor/nl_error.c +21 -19
  9. data/ext/nokolexbor/nl_node.c +255 -50
  10. data/ext/nokolexbor/nl_node_set.c +56 -1
  11. data/ext/nokolexbor/nl_processing_instruction.c +6 -0
  12. data/ext/nokolexbor/nl_text.c +6 -0
  13. data/ext/nokolexbor/nokolexbor.h +1 -0
  14. data/lib/nokolexbor/document.rb +52 -5
  15. data/lib/nokolexbor/document_fragment.rb +11 -0
  16. data/lib/nokolexbor/node.rb +367 -18
  17. data/lib/nokolexbor/node_set.rb +56 -0
  18. data/lib/nokolexbor/version.rb +1 -1
  19. metadata +2 -24
  20. data/vendor/lexbor/source/lexbor/encoding/base.h +0 -218
  21. data/vendor/lexbor/source/lexbor/encoding/big5.c +0 -42839
  22. data/vendor/lexbor/source/lexbor/encoding/config.cmake +0 -12
  23. data/vendor/lexbor/source/lexbor/encoding/const.h +0 -65
  24. data/vendor/lexbor/source/lexbor/encoding/decode.c +0 -3193
  25. data/vendor/lexbor/source/lexbor/encoding/decode.h +0 -370
  26. data/vendor/lexbor/source/lexbor/encoding/encode.c +0 -1931
  27. data/vendor/lexbor/source/lexbor/encoding/encode.h +0 -377
  28. data/vendor/lexbor/source/lexbor/encoding/encoding.c +0 -252
  29. data/vendor/lexbor/source/lexbor/encoding/encoding.h +0 -475
  30. data/vendor/lexbor/source/lexbor/encoding/euc_kr.c +0 -53883
  31. data/vendor/lexbor/source/lexbor/encoding/gb18030.c +0 -47905
  32. data/vendor/lexbor/source/lexbor/encoding/iso_2022_jp_katakana.c +0 -159
  33. data/vendor/lexbor/source/lexbor/encoding/jis0208.c +0 -22477
  34. data/vendor/lexbor/source/lexbor/encoding/jis0212.c +0 -15787
  35. data/vendor/lexbor/source/lexbor/encoding/multi.h +0 -53
  36. data/vendor/lexbor/source/lexbor/encoding/range.c +0 -71
  37. data/vendor/lexbor/source/lexbor/encoding/range.h +0 -34
  38. data/vendor/lexbor/source/lexbor/encoding/res.c +0 -222
  39. data/vendor/lexbor/source/lexbor/encoding/res.h +0 -34
  40. data/vendor/lexbor/source/lexbor/encoding/single.c +0 -13748
  41. data/vendor/lexbor/source/lexbor/encoding/single.h +0 -116
@@ -1,370 +0,0 @@
1
- /*
2
- * Copyright (C) 2019 Alexander Borisov
3
- *
4
- * Author: Alexander Borisov <borisov@lexbor.com>
5
- */
6
-
7
- #ifndef LEXBOR_ENCODING_DECODE_H
8
- #define LEXBOR_ENCODING_DECODE_H
9
-
10
- #ifdef __cplusplus
11
- extern "C" {
12
- #endif
13
-
14
-
15
- #include "lexbor/encoding/base.h"
16
-
17
-
18
- LXB_API lxb_status_t
19
- lxb_encoding_decode_default(lxb_encoding_decode_t *ctx,
20
- const lxb_char_t **data, const lxb_char_t *end);
21
-
22
- LXB_API lxb_status_t
23
- lxb_encoding_decode_auto(lxb_encoding_decode_t *ctx,
24
- const lxb_char_t **data, const lxb_char_t *end);
25
-
26
- LXB_API lxb_status_t
27
- lxb_encoding_decode_undefined(lxb_encoding_decode_t *ctx,
28
- const lxb_char_t **data, const lxb_char_t *end);
29
-
30
- LXB_API lxb_status_t
31
- lxb_encoding_decode_big5(lxb_encoding_decode_t *ctx,
32
- const lxb_char_t **data, const lxb_char_t *end);
33
-
34
- LXB_API lxb_status_t
35
- lxb_encoding_decode_euc_jp(lxb_encoding_decode_t *ctx,
36
- const lxb_char_t **data, const lxb_char_t *end);
37
-
38
- LXB_API lxb_status_t
39
- lxb_encoding_decode_euc_kr(lxb_encoding_decode_t *ctx,
40
- const lxb_char_t **data, const lxb_char_t *end);
41
-
42
- LXB_API lxb_status_t
43
- lxb_encoding_decode_gbk(lxb_encoding_decode_t *ctx,
44
- const lxb_char_t **data, const lxb_char_t *end);
45
-
46
- LXB_API lxb_status_t
47
- lxb_encoding_decode_ibm866(lxb_encoding_decode_t *ctx,
48
- const lxb_char_t **data, const lxb_char_t *end);
49
-
50
- LXB_API lxb_status_t
51
- lxb_encoding_decode_iso_2022_jp(lxb_encoding_decode_t *ctx,
52
- const lxb_char_t **data, const lxb_char_t *end);
53
-
54
- LXB_API lxb_status_t
55
- lxb_encoding_decode_iso_8859_10(lxb_encoding_decode_t *ctx,
56
- const lxb_char_t **data, const lxb_char_t *end);
57
-
58
- LXB_API lxb_status_t
59
- lxb_encoding_decode_iso_8859_13(lxb_encoding_decode_t *ctx,
60
- const lxb_char_t **data, const lxb_char_t *end);
61
-
62
- LXB_API lxb_status_t
63
- lxb_encoding_decode_iso_8859_14(lxb_encoding_decode_t *ctx,
64
- const lxb_char_t **data, const lxb_char_t *end);
65
-
66
- LXB_API lxb_status_t
67
- lxb_encoding_decode_iso_8859_15(lxb_encoding_decode_t *ctx,
68
- const lxb_char_t **data, const lxb_char_t *end);
69
-
70
- LXB_API lxb_status_t
71
- lxb_encoding_decode_iso_8859_16(lxb_encoding_decode_t *ctx,
72
- const lxb_char_t **data, const lxb_char_t *end);
73
-
74
- LXB_API lxb_status_t
75
- lxb_encoding_decode_iso_8859_2(lxb_encoding_decode_t *ctx,
76
- const lxb_char_t **data, const lxb_char_t *end);
77
-
78
- LXB_API lxb_status_t
79
- lxb_encoding_decode_iso_8859_3(lxb_encoding_decode_t *ctx,
80
- const lxb_char_t **data, const lxb_char_t *end);
81
-
82
- LXB_API lxb_status_t
83
- lxb_encoding_decode_iso_8859_4(lxb_encoding_decode_t *ctx,
84
- const lxb_char_t **data, const lxb_char_t *end);
85
-
86
- LXB_API lxb_status_t
87
- lxb_encoding_decode_iso_8859_5(lxb_encoding_decode_t *ctx,
88
- const lxb_char_t **data, const lxb_char_t *end);
89
-
90
- LXB_API lxb_status_t
91
- lxb_encoding_decode_iso_8859_6(lxb_encoding_decode_t *ctx,
92
- const lxb_char_t **data, const lxb_char_t *end);
93
-
94
- LXB_API lxb_status_t
95
- lxb_encoding_decode_iso_8859_7(lxb_encoding_decode_t *ctx,
96
- const lxb_char_t **data, const lxb_char_t *end);
97
-
98
- LXB_API lxb_status_t
99
- lxb_encoding_decode_iso_8859_8(lxb_encoding_decode_t *ctx,
100
- const lxb_char_t **data, const lxb_char_t *end);
101
-
102
- LXB_API lxb_status_t
103
- lxb_encoding_decode_iso_8859_8_i(lxb_encoding_decode_t *ctx,
104
- const lxb_char_t **data, const lxb_char_t *end);
105
-
106
- LXB_API lxb_status_t
107
- lxb_encoding_decode_koi8_r(lxb_encoding_decode_t *ctx,
108
- const lxb_char_t **data, const lxb_char_t *end);
109
-
110
- LXB_API lxb_status_t
111
- lxb_encoding_decode_koi8_u(lxb_encoding_decode_t *ctx,
112
- const lxb_char_t **data, const lxb_char_t *end);
113
-
114
- LXB_API lxb_status_t
115
- lxb_encoding_decode_shift_jis(lxb_encoding_decode_t *ctx,
116
- const lxb_char_t **data, const lxb_char_t *end);
117
-
118
- LXB_API lxb_status_t
119
- lxb_encoding_decode_utf_16be(lxb_encoding_decode_t *ctx,
120
- const lxb_char_t **data, const lxb_char_t *end);
121
-
122
- LXB_API lxb_status_t
123
- lxb_encoding_decode_utf_16le(lxb_encoding_decode_t *ctx,
124
- const lxb_char_t **data, const lxb_char_t *end);
125
-
126
- LXB_API lxb_status_t
127
- lxb_encoding_decode_utf_8(lxb_encoding_decode_t *ctx,
128
- const lxb_char_t **data, const lxb_char_t *end);
129
-
130
- LXB_API lxb_status_t
131
- lxb_encoding_decode_gb18030(lxb_encoding_decode_t *ctx,
132
- const lxb_char_t **data, const lxb_char_t *end);
133
-
134
- LXB_API lxb_status_t
135
- lxb_encoding_decode_macintosh(lxb_encoding_decode_t *ctx,
136
- const lxb_char_t **data, const lxb_char_t *end);
137
-
138
- LXB_API lxb_status_t
139
- lxb_encoding_decode_replacement(lxb_encoding_decode_t *ctx,
140
- const lxb_char_t **data, const lxb_char_t *end);
141
-
142
- LXB_API lxb_status_t
143
- lxb_encoding_decode_windows_1250(lxb_encoding_decode_t *ctx,
144
- const lxb_char_t **data, const lxb_char_t *end);
145
-
146
- LXB_API lxb_status_t
147
- lxb_encoding_decode_windows_1251(lxb_encoding_decode_t *ctx,
148
- const lxb_char_t **data, const lxb_char_t *end);
149
-
150
- LXB_API lxb_status_t
151
- lxb_encoding_decode_windows_1252(lxb_encoding_decode_t *ctx,
152
- const lxb_char_t **data, const lxb_char_t *end);
153
-
154
- LXB_API lxb_status_t
155
- lxb_encoding_decode_windows_1253(lxb_encoding_decode_t *ctx,
156
- const lxb_char_t **data, const lxb_char_t *end);
157
-
158
- LXB_API lxb_status_t
159
- lxb_encoding_decode_windows_1254(lxb_encoding_decode_t *ctx,
160
- const lxb_char_t **data, const lxb_char_t *end);
161
-
162
- LXB_API lxb_status_t
163
- lxb_encoding_decode_windows_1255(lxb_encoding_decode_t *ctx,
164
- const lxb_char_t **data, const lxb_char_t *end);
165
-
166
- LXB_API lxb_status_t
167
- lxb_encoding_decode_windows_1256(lxb_encoding_decode_t *ctx,
168
- const lxb_char_t **data, const lxb_char_t *end);
169
-
170
- LXB_API lxb_status_t
171
- lxb_encoding_decode_windows_1257(lxb_encoding_decode_t *ctx,
172
- const lxb_char_t **data, const lxb_char_t *end);
173
-
174
- LXB_API lxb_status_t
175
- lxb_encoding_decode_windows_1258(lxb_encoding_decode_t *ctx,
176
- const lxb_char_t **data, const lxb_char_t *end);
177
-
178
- LXB_API lxb_status_t
179
- lxb_encoding_decode_windows_874(lxb_encoding_decode_t *ctx,
180
- const lxb_char_t **data, const lxb_char_t *end);
181
-
182
- LXB_API lxb_status_t
183
- lxb_encoding_decode_x_mac_cyrillic(lxb_encoding_decode_t *ctx,
184
- const lxb_char_t **data, const lxb_char_t *end);
185
-
186
- LXB_API lxb_status_t
187
- lxb_encoding_decode_x_user_defined(lxb_encoding_decode_t *ctx,
188
- const lxb_char_t **data, const lxb_char_t *end);
189
-
190
- /*
191
- * Single
192
- */
193
- LXB_API lxb_codepoint_t
194
- lxb_encoding_decode_default_single(lxb_encoding_decode_t *ctx,
195
- const lxb_char_t **data, const lxb_char_t *end);
196
-
197
- LXB_API lxb_codepoint_t
198
- lxb_encoding_decode_auto_single(lxb_encoding_decode_t *ctx,
199
- const lxb_char_t **data, const lxb_char_t *end);
200
-
201
- LXB_API lxb_codepoint_t
202
- lxb_encoding_decode_undefined_single(lxb_encoding_decode_t *ctx,
203
- const lxb_char_t **data, const lxb_char_t *end);
204
-
205
- LXB_API lxb_codepoint_t
206
- lxb_encoding_decode_big5_single(lxb_encoding_decode_t *ctx,
207
- const lxb_char_t **data, const lxb_char_t *end);
208
-
209
- LXB_API lxb_codepoint_t
210
- lxb_encoding_decode_euc_jp_single(lxb_encoding_decode_t *ctx,
211
- const lxb_char_t **data, const lxb_char_t *end);
212
-
213
- LXB_API lxb_codepoint_t
214
- lxb_encoding_decode_euc_kr_single(lxb_encoding_decode_t *ctx,
215
- const lxb_char_t **data, const lxb_char_t *end);
216
-
217
- LXB_API lxb_codepoint_t
218
- lxb_encoding_decode_gbk_single(lxb_encoding_decode_t *ctx,
219
- const lxb_char_t **data, const lxb_char_t *end);
220
-
221
- LXB_API lxb_codepoint_t
222
- lxb_encoding_decode_ibm866_single(lxb_encoding_decode_t *ctx,
223
- const lxb_char_t **data, const lxb_char_t *end);
224
-
225
- LXB_API lxb_codepoint_t
226
- lxb_encoding_decode_iso_2022_jp_single(lxb_encoding_decode_t *ctx,
227
- const lxb_char_t **data, const lxb_char_t *end);
228
-
229
- LXB_API lxb_codepoint_t
230
- lxb_encoding_decode_iso_8859_10_single(lxb_encoding_decode_t *ctx,
231
- const lxb_char_t **data, const lxb_char_t *end);
232
-
233
- LXB_API lxb_codepoint_t
234
- lxb_encoding_decode_iso_8859_13_single(lxb_encoding_decode_t *ctx,
235
- const lxb_char_t **data, const lxb_char_t *end);
236
-
237
- LXB_API lxb_codepoint_t
238
- lxb_encoding_decode_iso_8859_14_single(lxb_encoding_decode_t *ctx,
239
- const lxb_char_t **data, const lxb_char_t *end);
240
-
241
- LXB_API lxb_codepoint_t
242
- lxb_encoding_decode_iso_8859_15_single(lxb_encoding_decode_t *ctx,
243
- const lxb_char_t **data, const lxb_char_t *end);
244
-
245
- LXB_API lxb_codepoint_t
246
- lxb_encoding_decode_iso_8859_16_single(lxb_encoding_decode_t *ctx,
247
- const lxb_char_t **data, const lxb_char_t *end);
248
-
249
- LXB_API lxb_codepoint_t
250
- lxb_encoding_decode_iso_8859_2_single(lxb_encoding_decode_t *ctx,
251
- const lxb_char_t **data, const lxb_char_t *end);
252
-
253
- LXB_API lxb_codepoint_t
254
- lxb_encoding_decode_iso_8859_3_single(lxb_encoding_decode_t *ctx,
255
- const lxb_char_t **data, const lxb_char_t *end);
256
-
257
- LXB_API lxb_codepoint_t
258
- lxb_encoding_decode_iso_8859_4_single(lxb_encoding_decode_t *ctx,
259
- const lxb_char_t **data, const lxb_char_t *end);
260
-
261
- LXB_API lxb_codepoint_t
262
- lxb_encoding_decode_iso_8859_5_single(lxb_encoding_decode_t *ctx,
263
- const lxb_char_t **data, const lxb_char_t *end);
264
-
265
- LXB_API lxb_codepoint_t
266
- lxb_encoding_decode_iso_8859_6_single(lxb_encoding_decode_t *ctx,
267
- const lxb_char_t **data, const lxb_char_t *end);
268
-
269
- LXB_API lxb_codepoint_t
270
- lxb_encoding_decode_iso_8859_7_single(lxb_encoding_decode_t *ctx,
271
- const lxb_char_t **data, const lxb_char_t *end);
272
-
273
- LXB_API lxb_codepoint_t
274
- lxb_encoding_decode_iso_8859_8_single(lxb_encoding_decode_t *ctx,
275
- const lxb_char_t **data, const lxb_char_t *end);
276
-
277
- LXB_API lxb_codepoint_t
278
- lxb_encoding_decode_iso_8859_8_i_single(lxb_encoding_decode_t *ctx,
279
- const lxb_char_t **data, const lxb_char_t *end);
280
-
281
- LXB_API lxb_codepoint_t
282
- lxb_encoding_decode_koi8_r_single(lxb_encoding_decode_t *ctx,
283
- const lxb_char_t **data, const lxb_char_t *end);
284
-
285
- LXB_API lxb_codepoint_t
286
- lxb_encoding_decode_koi8_u_single(lxb_encoding_decode_t *ctx,
287
- const lxb_char_t **data, const lxb_char_t *end);
288
-
289
- LXB_API lxb_codepoint_t
290
- lxb_encoding_decode_shift_jis_single(lxb_encoding_decode_t *ctx,
291
- const lxb_char_t **data, const lxb_char_t *end);
292
-
293
- LXB_API lxb_codepoint_t
294
- lxb_encoding_decode_utf_16be_single(lxb_encoding_decode_t *ctx,
295
- const lxb_char_t **data, const lxb_char_t *end);
296
-
297
- LXB_API lxb_codepoint_t
298
- lxb_encoding_decode_utf_16le_single(lxb_encoding_decode_t *ctx,
299
- const lxb_char_t **data, const lxb_char_t *end);
300
-
301
- LXB_API lxb_codepoint_t
302
- lxb_encoding_decode_utf_8_single(lxb_encoding_decode_t *ctx,
303
- const lxb_char_t **data, const lxb_char_t *end);
304
-
305
- LXB_API lxb_codepoint_t
306
- lxb_encoding_decode_gb18030_single(lxb_encoding_decode_t *ctx,
307
- const lxb_char_t **data, const lxb_char_t *end);
308
-
309
- LXB_API lxb_codepoint_t
310
- lxb_encoding_decode_macintosh_single(lxb_encoding_decode_t *ctx,
311
- const lxb_char_t **data, const lxb_char_t *end);
312
-
313
- LXB_API lxb_codepoint_t
314
- lxb_encoding_decode_replacement_single(lxb_encoding_decode_t *ctx,
315
- const lxb_char_t **data, const lxb_char_t *end);
316
-
317
- LXB_API lxb_codepoint_t
318
- lxb_encoding_decode_windows_1250_single(lxb_encoding_decode_t *ctx,
319
- const lxb_char_t **data, const lxb_char_t *end);
320
-
321
- LXB_API lxb_codepoint_t
322
- lxb_encoding_decode_windows_1251_single(lxb_encoding_decode_t *ctx,
323
- const lxb_char_t **data, const lxb_char_t *end);
324
-
325
- LXB_API lxb_codepoint_t
326
- lxb_encoding_decode_windows_1252_single(lxb_encoding_decode_t *ctx,
327
- const lxb_char_t **data, const lxb_char_t *end);
328
-
329
- LXB_API lxb_codepoint_t
330
- lxb_encoding_decode_windows_1253_single(lxb_encoding_decode_t *ctx,
331
- const lxb_char_t **data, const lxb_char_t *end);
332
-
333
- LXB_API lxb_codepoint_t
334
- lxb_encoding_decode_windows_1254_single(lxb_encoding_decode_t *ctx,
335
- const lxb_char_t **data, const lxb_char_t *end);
336
-
337
- LXB_API lxb_codepoint_t
338
- lxb_encoding_decode_windows_1255_single(lxb_encoding_decode_t *ctx,
339
- const lxb_char_t **data, const lxb_char_t *end);
340
-
341
- LXB_API lxb_codepoint_t
342
- lxb_encoding_decode_windows_1256_single(lxb_encoding_decode_t *ctx,
343
- const lxb_char_t **data, const lxb_char_t *end);
344
-
345
- LXB_API lxb_codepoint_t
346
- lxb_encoding_decode_windows_1257_single(lxb_encoding_decode_t *ctx,
347
- const lxb_char_t **data, const lxb_char_t *end);
348
-
349
- LXB_API lxb_codepoint_t
350
- lxb_encoding_decode_windows_1258_single(lxb_encoding_decode_t *ctx,
351
- const lxb_char_t **data, const lxb_char_t *end);
352
-
353
- LXB_API lxb_codepoint_t
354
- lxb_encoding_decode_windows_874_single(lxb_encoding_decode_t *ctx,
355
- const lxb_char_t **data, const lxb_char_t *end);
356
-
357
- LXB_API lxb_codepoint_t
358
- lxb_encoding_decode_x_mac_cyrillic_single(lxb_encoding_decode_t *ctx,
359
- const lxb_char_t **data, const lxb_char_t *end);
360
-
361
- LXB_API lxb_codepoint_t
362
- lxb_encoding_decode_x_user_defined_single(lxb_encoding_decode_t *ctx,
363
- const lxb_char_t **data, const lxb_char_t *end);
364
-
365
-
366
- #ifdef __cplusplus
367
- } /* extern "C" */
368
- #endif
369
-
370
- #endif /* LEXBOR_ENCODING_DECODE_H */