nokolexbor 0.2.5 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/ext/nokolexbor/CMakeLists.txt +7 -4
  3. data/ext/nokolexbor/config.h.cmake.in +2 -0
  4. data/ext/nokolexbor/extconf.rb +47 -25
  5. data/ext/nokolexbor/libxml/SAX2.h +4 -4
  6. data/ext/nokolexbor/libxml/chvalid.h +21 -21
  7. data/ext/nokolexbor/libxml/dict.h +13 -13
  8. data/ext/nokolexbor/libxml/globals.h +202 -202
  9. data/ext/nokolexbor/libxml/hash.h +25 -25
  10. data/ext/nokolexbor/libxml/parser.h +5 -5
  11. data/ext/nokolexbor/libxml/parserInternals.h +4 -4
  12. data/ext/nokolexbor/libxml/pattern.h +14 -14
  13. data/ext/nokolexbor/libxml/threads.h +15 -15
  14. data/ext/nokolexbor/libxml/tree.h +5 -5
  15. data/ext/nokolexbor/libxml/xmlerror.h +5 -5
  16. data/ext/nokolexbor/libxml/xmlmemory.h +16 -16
  17. data/ext/nokolexbor/libxml/xmlstring.h +30 -30
  18. data/ext/nokolexbor/libxml/xpath.h +43 -43
  19. data/ext/nokolexbor/libxml/xpathInternals.h +128 -128
  20. data/ext/nokolexbor/memory.c +6 -6
  21. data/ext/nokolexbor/nl_cdata.c +44 -0
  22. data/ext/nokolexbor/nl_comment.c +44 -0
  23. data/ext/nokolexbor/nl_document.c +23 -9
  24. data/ext/nokolexbor/nl_node.c +191 -178
  25. data/ext/nokolexbor/nl_node_set.c +38 -73
  26. data/ext/nokolexbor/nl_text.c +44 -0
  27. data/ext/nokolexbor/nl_xpath_context.c +33 -42
  28. data/ext/nokolexbor/nokolexbor.c +7 -3
  29. data/ext/nokolexbor/nokolexbor.h +9 -7
  30. data/ext/nokolexbor/private/buf.h +1 -1
  31. data/ext/nokolexbor/private/error.h +3 -3
  32. data/ext/nokolexbor/xml_SAX2.c +8 -8
  33. data/ext/nokolexbor/xml_buf.c +19 -19
  34. data/ext/nokolexbor/xml_chvalid.c +25 -25
  35. data/ext/nokolexbor/xml_dict.c +69 -69
  36. data/ext/nokolexbor/xml_encoding.c +2 -2
  37. data/ext/nokolexbor/xml_error.c +51 -51
  38. data/ext/nokolexbor/xml_globals.c +329 -329
  39. data/ext/nokolexbor/xml_hash.c +131 -131
  40. data/ext/nokolexbor/xml_memory.c +25 -25
  41. data/ext/nokolexbor/xml_parser.c +3 -3
  42. data/ext/nokolexbor/xml_parserInternals.c +15 -15
  43. data/ext/nokolexbor/xml_pattern.c +103 -103
  44. data/ext/nokolexbor/xml_string.c +93 -93
  45. data/ext/nokolexbor/xml_threads.c +61 -61
  46. data/ext/nokolexbor/xml_tree.c +12 -12
  47. data/ext/nokolexbor/xml_xpath.c +1194 -1203
  48. data/lib/nokolexbor/document.rb +92 -1
  49. data/lib/nokolexbor/node.rb +64 -0
  50. data/lib/nokolexbor/node_set.rb +6 -5
  51. data/lib/nokolexbor/version.rb +1 -1
  52. data/lib/nokolexbor.rb +21 -1
  53. data/patches/0001-lexbor-support-text-pseudo-element.patch +1 -1
  54. metadata +7 -4
@@ -32,7 +32,7 @@
32
32
  * Helpful Macro
33
33
  */
34
34
  #ifdef LIBXML_THREAD_ENABLED
35
- #define IS_MAIN_THREAD (xmlIsMainThread())
35
+ #define IS_MAIN_THREAD (nl_xmlIsMainThread())
36
36
  #else
37
37
  #define IS_MAIN_THREAD 1
38
38
  #endif
@@ -43,12 +43,12 @@
43
43
  static xmlMutex xmlThrDefMutex;
44
44
 
45
45
  /**
46
- * xmlInitGlobals:
46
+ * nl_xmlInitGlobals:
47
47
  *
48
- * DEPRECATED: Alias for xmlInitParser.
48
+ * DEPRECATED: Alias for nl_xmlInitParser.
49
49
  */
50
- void xmlInitGlobals(void) {
51
- xmlInitParser();
50
+ void nl_xmlInitGlobals(void) {
51
+ nl_xmlInitParser();
52
52
  }
53
53
 
54
54
  /**
@@ -69,37 +69,37 @@ void xmlInitGlobalsInternal(void) {
69
69
  /*
70
70
  * Memory allocation routines
71
71
  */
72
- #undef xmlFree
73
- #undef xmlMalloc
74
- #undef xmlMallocAtomic
75
- #undef xmlMemStrdup
76
- #undef xmlRealloc
72
+ #undef nl_xmlFree
73
+ #undef nl_xmlMalloc
74
+ #undef nl_xmlMallocAtomic
75
+ #undef nl_xmlMemStrdup
76
+ #undef nl_xmlRealloc
77
77
 
78
78
  #if defined(DEBUG_MEMORY_LOCATION) || defined(DEBUG_MEMORY)
79
- xmlFreeFunc xmlFree = (xmlFreeFunc) xmlMemFree;
80
- xmlMallocFunc xmlMalloc = (xmlMallocFunc) xmlMemMalloc;
81
- xmlMallocFunc xmlMallocAtomic = (xmlMallocFunc) xmlMemMalloc;
82
- xmlReallocFunc xmlRealloc = (xmlReallocFunc) xmlMemRealloc;
83
- xmlStrdupFunc xmlMemStrdup = (xmlStrdupFunc) xmlMemoryStrdup;
79
+ xmlFreeFunc nl_xmlFree = (xmlFreeFunc) xmlMemFree;
80
+ xmlMallocFunc nl_xmlMalloc = (xmlMallocFunc) xmlMemMalloc;
81
+ xmlMallocFunc nl_xmlMallocAtomic = (xmlMallocFunc) xmlMemMalloc;
82
+ xmlReallocFunc nl_xmlRealloc = (xmlReallocFunc) xmlMemRealloc;
83
+ xmlStrdupFunc nl_xmlMemStrdup = (xmlStrdupFunc) xmlMemoryStrdup;
84
84
  #else
85
85
  /**
86
- * xmlFree:
86
+ * nl_xmlFree:
87
87
  * @mem: an already allocated block of memory
88
88
  *
89
89
  * The variable holding the libxml free() implementation
90
90
  */
91
- xmlFreeFunc xmlFree = free;
91
+ xmlFreeFunc nl_xmlFree = free;
92
92
  /**
93
- * xmlMalloc:
93
+ * nl_xmlMalloc:
94
94
  * @size: the size requested in bytes
95
95
  *
96
96
  * The variable holding the libxml malloc() implementation
97
97
  *
98
98
  * Returns a pointer to the newly allocated block or NULL in case of error
99
99
  */
100
- xmlMallocFunc xmlMalloc = malloc;
100
+ xmlMallocFunc nl_xmlMalloc = malloc;
101
101
  /**
102
- * xmlMallocAtomic:
102
+ * nl_xmlMallocAtomic:
103
103
  * @size: the size requested in bytes
104
104
  *
105
105
  * The variable holding the libxml malloc() implementation for atomic
@@ -108,9 +108,9 @@ xmlMallocFunc xmlMalloc = malloc;
108
108
  *
109
109
  * Returns a pointer to the newly allocated block or NULL in case of error
110
110
  */
111
- xmlMallocFunc xmlMallocAtomic = malloc;
111
+ xmlMallocFunc nl_xmlMallocAtomic = malloc;
112
112
  /**
113
- * xmlRealloc:
113
+ * nl_xmlRealloc:
114
114
  * @mem: an already allocated block of memory
115
115
  * @size: the new size requested in bytes
116
116
  *
@@ -118,7 +118,7 @@ xmlMallocFunc xmlMallocAtomic = malloc;
118
118
  *
119
119
  * Returns a pointer to the newly reallocated block or NULL in case of error
120
120
  */
121
- xmlReallocFunc xmlRealloc = realloc;
121
+ xmlReallocFunc nl_xmlRealloc = realloc;
122
122
  /**
123
123
  * xmlPosixStrdup
124
124
  * @cur: the input char *
@@ -129,17 +129,17 @@ xmlReallocFunc xmlRealloc = realloc;
129
129
  */
130
130
  static char *
131
131
  xmlPosixStrdup(const char *cur) {
132
- return((char*) xmlCharStrdup(cur));
132
+ return((char*) nl_xmlCharStrdup(cur));
133
133
  }
134
134
  /**
135
- * xmlMemStrdup:
135
+ * nl_xmlMemStrdup:
136
136
  * @str: a zero terminated string
137
137
  *
138
138
  * The variable holding the libxml strdup() implementation
139
139
  *
140
140
  * Returns the copy of the string or NULL in case of error
141
141
  */
142
- xmlStrdupFunc xmlMemStrdup = xmlPosixStrdup;
142
+ xmlStrdupFunc nl_xmlMemStrdup = xmlPosixStrdup;
143
143
  #endif /* DEBUG_MEMORY_LOCATION || DEBUG_MEMORY */
144
144
 
145
145
  #include "libxml/threads.h"
@@ -147,58 +147,58 @@ xmlStrdupFunc xmlMemStrdup = xmlPosixStrdup;
147
147
  // #include "libxml/SAX.h"
148
148
 
149
149
  #undef htmlDefaultSAXHandler
150
- #undef oldXMLWDcompatibility
151
- #undef xmlBufferAllocScheme
152
- #undef xmlDefaultBufferSize
150
+ #undef nl_oldXMLWDcompatibility
151
+ #undef nl_xmlBufferAllocScheme
152
+ #undef nl_xmlDefaultBufferSize
153
153
  #undef xmlDefaultSAXHandler
154
- #undef xmlDefaultSAXLocator
155
- #undef xmlDoValidityCheckingDefaultValue
156
- #undef xmlGenericError
157
- #undef xmlStructuredError
158
- #undef xmlGenericErrorContext
159
- #undef xmlStructuredErrorContext
160
- #undef xmlGetWarningsDefaultValue
161
- #undef xmlIndentTreeOutput
162
- #undef xmlTreeIndentString
163
- #undef xmlKeepBlanksDefaultValue
164
- #undef xmlLineNumbersDefaultValue
165
- #undef xmlLoadExtDtdDefaultValue
166
- #undef xmlParserDebugEntities
167
- #undef xmlParserVersion
168
- #undef xmlPedanticParserDefaultValue
169
- #undef xmlSaveNoEmptyTags
170
- #undef xmlSubstituteEntitiesDefaultValue
171
- #undef xmlRegisterNodeDefaultValue
172
- #undef xmlDeregisterNodeDefaultValue
173
- #undef xmlLastError
174
-
175
- #undef xmlParserInputBufferCreateFilenameValue
176
- #undef xmlOutputBufferCreateFilenameValue
154
+ #undef nl_xmlDefaultSAXLocator
155
+ #undef nl_xmlDoValidityCheckingDefaultValue
156
+ #undef nl_xmlGenericError
157
+ #undef nl_xmlStructuredError
158
+ #undef nl_xmlGenericErrorContext
159
+ #undef nl_xmlStructuredErrorContext
160
+ #undef nl_xmlGetWarningsDefaultValue
161
+ #undef nl_xmlIndentTreeOutput
162
+ #undef nl_xmlTreeIndentString
163
+ #undef nl_xmlKeepBlanksDefaultValue
164
+ #undef nl_xmlLineNumbersDefaultValue
165
+ #undef nl_xmlLoadExtDtdDefaultValue
166
+ #undef nl_xmlParserDebugEntities
167
+ #undef nl_xmlParserVersion
168
+ #undef nl_xmlPedanticParserDefaultValue
169
+ #undef nl_xmlSaveNoEmptyTags
170
+ #undef nl_xmlSubstituteEntitiesDefaultValue
171
+ #undef nl_xmlRegisterNodeDefaultValue
172
+ #undef nl_xmlDeregisterNodeDefaultValue
173
+ #undef nl_xmlLastError
174
+
175
+ #undef nl_xmlParserInputBufferCreateFilenameValue
176
+ #undef nl_xmlOutputBufferCreateFilenameValue
177
177
  /**
178
- * xmlParserVersion:
178
+ * nl_xmlParserVersion:
179
179
  *
180
180
  * Constant string describing the internal version of the library
181
181
  */
182
- const char *xmlParserVersion = LIBXML_VERSION_STRING LIBXML_VERSION_EXTRA;
182
+ const char *nl_xmlParserVersion = LIBXML_VERSION_STRING LIBXML_VERSION_EXTRA;
183
183
 
184
184
  /**
185
- * xmlBufferAllocScheme:
185
+ * nl_xmlBufferAllocScheme:
186
186
  *
187
187
  * DEPRECATED: Don't use.
188
188
  *
189
189
  * Global setting, default allocation policy for buffers, default is
190
190
  * XML_BUFFER_ALLOC_EXACT
191
191
  */
192
- xmlBufferAllocationScheme xmlBufferAllocScheme = XML_BUFFER_ALLOC_EXACT;
192
+ xmlBufferAllocationScheme nl_xmlBufferAllocScheme = XML_BUFFER_ALLOC_EXACT;
193
193
  static xmlBufferAllocationScheme xmlBufferAllocSchemeThrDef = XML_BUFFER_ALLOC_EXACT;
194
194
  /**
195
- * xmlDefaultBufferSize:
195
+ * nl_xmlDefaultBufferSize:
196
196
  *
197
197
  * DEPRECATED: Don't use.
198
198
  *
199
199
  * Global setting, default buffer size. Default value is BASE_BUFFER_SIZE
200
200
  */
201
- int xmlDefaultBufferSize = BASE_BUFFER_SIZE;
201
+ int nl_xmlDefaultBufferSize = BASE_BUFFER_SIZE;
202
202
  static int xmlDefaultBufferSizeThrDef = BASE_BUFFER_SIZE;
203
203
 
204
204
  /*
@@ -206,13 +206,13 @@ static int xmlDefaultBufferSizeThrDef = BASE_BUFFER_SIZE;
206
206
  */
207
207
 
208
208
  /**
209
- * oldXMLWDcompatibility:
209
+ * nl_oldXMLWDcompatibility:
210
210
  *
211
211
  * Global setting, DEPRECATED.
212
212
  */
213
- int oldXMLWDcompatibility = 0; /* DEPRECATED */
213
+ int nl_oldXMLWDcompatibility = 0; /* DEPRECATED */
214
214
  /**
215
- * xmlParserDebugEntities:
215
+ * nl_xmlParserDebugEntities:
216
216
  *
217
217
  * DEPRECATED: Don't use
218
218
  *
@@ -220,30 +220,30 @@ int oldXMLWDcompatibility = 0; /* DEPRECATED */
220
220
  * while handling entities.
221
221
  * Disabled by default
222
222
  */
223
- int xmlParserDebugEntities = 0;
223
+ int nl_xmlParserDebugEntities = 0;
224
224
  static int xmlParserDebugEntitiesThrDef = 0;
225
225
  /**
226
- * xmlDoValidityCheckingDefaultValue:
226
+ * nl_xmlDoValidityCheckingDefaultValue:
227
227
  *
228
228
  * DEPRECATED: Use the modern options API with XML_PARSE_DTDVALID.
229
229
  *
230
230
  * Global setting, indicate that the parser should work in validating mode.
231
231
  * Disabled by default.
232
232
  */
233
- int xmlDoValidityCheckingDefaultValue = 0;
233
+ int nl_xmlDoValidityCheckingDefaultValue = 0;
234
234
  static int xmlDoValidityCheckingDefaultValueThrDef = 0;
235
235
  /**
236
- * xmlGetWarningsDefaultValue:
236
+ * nl_xmlGetWarningsDefaultValue:
237
237
  *
238
238
  * DEPRECATED: Don't use
239
239
  *
240
240
  * Global setting, indicate that the DTD validation should provide warnings.
241
241
  * Activated by default.
242
242
  */
243
- int xmlGetWarningsDefaultValue = 1;
243
+ int nl_xmlGetWarningsDefaultValue = 1;
244
244
  static int xmlGetWarningsDefaultValueThrDef = 1;
245
245
  /**
246
- * xmlLoadExtDtdDefaultValue:
246
+ * nl_xmlLoadExtDtdDefaultValue:
247
247
  *
248
248
  * DEPRECATED: Use the modern options API with XML_PARSE_DTDLOAD.
249
249
  *
@@ -251,20 +251,20 @@ static int xmlGetWarningsDefaultValueThrDef = 1;
251
251
  * validating.
252
252
  * Disabled by default.
253
253
  */
254
- int xmlLoadExtDtdDefaultValue = 0;
254
+ int nl_xmlLoadExtDtdDefaultValue = 0;
255
255
  static int xmlLoadExtDtdDefaultValueThrDef = 0;
256
256
  /**
257
- * xmlPedanticParserDefaultValue:
257
+ * nl_xmlPedanticParserDefaultValue:
258
258
  *
259
259
  * DEPRECATED: Use the modern options API with XML_PARSE_PEDANTIC.
260
260
  *
261
261
  * Global setting, indicate that the parser be pedantic
262
262
  * Disabled by default.
263
263
  */
264
- int xmlPedanticParserDefaultValue = 0;
264
+ int nl_xmlPedanticParserDefaultValue = 0;
265
265
  static int xmlPedanticParserDefaultValueThrDef = 0;
266
266
  /**
267
- * xmlLineNumbersDefaultValue:
267
+ * nl_xmlLineNumbersDefaultValue:
268
268
  *
269
269
  * DEPRECATED: The modern options API always enables line numbers.
270
270
  *
@@ -273,10 +273,10 @@ static int xmlPedanticParserDefaultValueThrDef = 0;
273
273
  * Disabled by default since this may not be safe for old classes of
274
274
  * application.
275
275
  */
276
- int xmlLineNumbersDefaultValue = 0;
276
+ int nl_xmlLineNumbersDefaultValue = 0;
277
277
  static int xmlLineNumbersDefaultValueThrDef = 0;
278
278
  /**
279
- * xmlKeepBlanksDefaultValue:
279
+ * nl_xmlKeepBlanksDefaultValue:
280
280
  *
281
281
  * DEPRECATED: Use the modern options API with XML_PARSE_NOBLANKS.
282
282
  *
@@ -286,10 +286,10 @@ static int xmlLineNumbersDefaultValueThrDef = 0;
286
286
  * conformant to the XML Recommendation, however the option is kept
287
287
  * for some applications since this was libxml1 default behaviour.
288
288
  */
289
- int xmlKeepBlanksDefaultValue = 1;
289
+ int nl_xmlKeepBlanksDefaultValue = 1;
290
290
  static int xmlKeepBlanksDefaultValueThrDef = 1;
291
291
  /**
292
- * xmlSubstituteEntitiesDefaultValue:
292
+ * nl_xmlSubstituteEntitiesDefaultValue:
293
293
  *
294
294
  * DEPRECATED: Use the modern options API with XML_PARSE_NOENT.
295
295
  *
@@ -299,100 +299,100 @@ static int xmlKeepBlanksDefaultValueThrDef = 1;
299
299
  * the XPath data model requires entities replacement and the XPath
300
300
  * engine does not handle entities references transparently.
301
301
  */
302
- int xmlSubstituteEntitiesDefaultValue = 0;
302
+ int nl_xmlSubstituteEntitiesDefaultValue = 0;
303
303
  static int xmlSubstituteEntitiesDefaultValueThrDef = 0;
304
304
 
305
305
  /**
306
- * xmlRegisterNodeDefaultValue:
306
+ * nl_xmlRegisterNodeDefaultValue:
307
307
  *
308
308
  * DEPRECATED: Don't use
309
309
  */
310
- xmlRegisterNodeFunc xmlRegisterNodeDefaultValue = NULL;
310
+ xmlRegisterNodeFunc nl_xmlRegisterNodeDefaultValue = NULL;
311
311
  static xmlRegisterNodeFunc xmlRegisterNodeDefaultValueThrDef = NULL;
312
312
 
313
313
  /**
314
- * xmlDeregisterNodeDefaultValue:
314
+ * nl_xmlDeregisterNodeDefaultValue:
315
315
  *
316
316
  * DEPRECATED: Don't use
317
317
  */
318
- xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue = NULL;
318
+ xmlDeregisterNodeFunc nl_xmlDeregisterNodeDefaultValue = NULL;
319
319
  static xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValueThrDef = NULL;
320
320
 
321
321
  /**
322
- * xmlParserInputBufferCreateFilenameValue:
322
+ * nl_xmlParserInputBufferCreateFilenameValue:
323
323
  *
324
324
  * DEPRECATED: Don't use
325
325
  */
326
- xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue = NULL;
326
+ xmlParserInputBufferCreateFilenameFunc nl_xmlParserInputBufferCreateFilenameValue = NULL;
327
327
  static xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValueThrDef = NULL;
328
328
 
329
329
  /**
330
- * xmlOutputBufferCreateFilenameValue:
330
+ * nl_xmlOutputBufferCreateFilenameValue:
331
331
  *
332
332
  * DEPRECATED: Don't use
333
333
  */
334
- xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue = NULL;
334
+ xmlOutputBufferCreateFilenameFunc nl_xmlOutputBufferCreateFilenameValue = NULL;
335
335
  static xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValueThrDef = NULL;
336
336
 
337
337
  /**
338
- * xmlGenericError:
338
+ * nl_xmlGenericError:
339
339
  *
340
340
  * Global setting: function used for generic error callbacks
341
341
  */
342
- xmlGenericErrorFunc xmlGenericError = xmlGenericErrorDefaultFunc;
343
- static xmlGenericErrorFunc xmlGenericErrorThrDef = xmlGenericErrorDefaultFunc;
342
+ xmlGenericErrorFunc nl_xmlGenericError = nl_xmlGenericErrorDefaultFunc;
343
+ static xmlGenericErrorFunc xmlGenericErrorThrDef = nl_xmlGenericErrorDefaultFunc;
344
344
  /**
345
- * xmlStructuredError:
345
+ * nl_xmlStructuredError:
346
346
  *
347
347
  * Global setting: function used for structured error callbacks
348
348
  */
349
- xmlStructuredErrorFunc xmlStructuredError = NULL;
349
+ xmlStructuredErrorFunc nl_xmlStructuredError = NULL;
350
350
  static xmlStructuredErrorFunc xmlStructuredErrorThrDef = NULL;
351
351
  /**
352
- * xmlGenericErrorContext:
352
+ * nl_xmlGenericErrorContext:
353
353
  *
354
354
  * Global setting passed to generic error callbacks
355
355
  */
356
- void *xmlGenericErrorContext = NULL;
356
+ void *nl_xmlGenericErrorContext = NULL;
357
357
  static void *xmlGenericErrorContextThrDef = NULL;
358
358
  /**
359
- * xmlStructuredErrorContext:
359
+ * nl_xmlStructuredErrorContext:
360
360
  *
361
361
  * Global setting passed to structured error callbacks
362
362
  */
363
- void *xmlStructuredErrorContext = NULL;
363
+ void *nl_xmlStructuredErrorContext = NULL;
364
364
  static void *xmlStructuredErrorContextThrDef = NULL;
365
- xmlError xmlLastError;
365
+ xmlError nl_xmlLastError;
366
366
 
367
367
  /*
368
368
  * output defaults
369
369
  */
370
370
  /**
371
- * xmlIndentTreeOutput:
371
+ * nl_xmlIndentTreeOutput:
372
372
  *
373
373
  * Global setting, asking the serializer to indent the output tree by default
374
374
  * Enabled by default
375
375
  */
376
- int xmlIndentTreeOutput = 1;
376
+ int nl_xmlIndentTreeOutput = 1;
377
377
  static int xmlIndentTreeOutputThrDef = 1;
378
378
 
379
379
  /**
380
- * xmlTreeIndentString:
380
+ * nl_xmlTreeIndentString:
381
381
  *
382
382
  * The string used to do one-level indent. By default is equal to " " (two spaces)
383
383
  */
384
- const char *xmlTreeIndentString = " ";
384
+ const char *nl_xmlTreeIndentString = " ";
385
385
  static const char *xmlTreeIndentStringThrDef = " ";
386
386
 
387
387
  /**
388
- * xmlSaveNoEmptyTags:
388
+ * nl_xmlSaveNoEmptyTags:
389
389
  *
390
390
  * Global setting, asking the serializer to not output empty tags
391
391
  * as <empty/> but <empty></empty>. those two forms are indistinguishable
392
392
  * once parsed.
393
393
  * Disabled by default
394
394
  */
395
- int xmlSaveNoEmptyTags = 0;
395
+ int nl_xmlSaveNoEmptyTags = 0;
396
396
  static int xmlSaveNoEmptyTagsThrDef = 0;
397
397
 
398
398
  #ifdef LIBXML_SAX1_ENABLED
@@ -437,18 +437,18 @@ xmlSAXHandlerV1 xmlDefaultSAXHandler = {
437
437
  #endif /* LIBXML_SAX1_ENABLED */
438
438
 
439
439
  /**
440
- * xmlDefaultSAXLocator:
440
+ * nl_xmlDefaultSAXLocator:
441
441
  *
442
442
  * DEPRECATED: Don't use
443
443
  *
444
444
  * The default SAX Locator
445
445
  * { getPublicId, getSystemId, getLineNumber, getColumnNumber}
446
446
  */
447
- xmlSAXLocator xmlDefaultSAXLocator = {
448
- xmlSAX2GetPublicId,
449
- xmlSAX2GetSystemId,
450
- xmlSAX2GetLineNumber,
451
- xmlSAX2GetColumnNumber
447
+ xmlSAXLocator nl_xmlDefaultSAXLocator = {
448
+ nl_xmlSAX2GetPublicId,
449
+ nl_xmlSAX2GetSystemId,
450
+ nl_xmlSAX2GetLineNumber,
451
+ nl_xmlSAX2GetColumnNumber
452
452
  };
453
453
 
454
454
  #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_SAX1_ENABLED)
@@ -493,87 +493,87 @@ xmlSAXHandlerV1 htmlDefaultSAXHandler = {
493
493
  #endif /* LIBXML_HTML_ENABLED */
494
494
 
495
495
  /**
496
- * xmlInitializeGlobalState:
496
+ * nl_xmlInitializeGlobalState:
497
497
  * @gs: a pointer to a newly allocated global state
498
498
  *
499
- * xmlInitializeGlobalState() initialize a global state with all the
499
+ * nl_xmlInitializeGlobalState() initialize a global state with all the
500
500
  * default values of the library.
501
501
  */
502
502
  void
503
- xmlInitializeGlobalState(xmlGlobalStatePtr gs)
503
+ nl_xmlInitializeGlobalState(xmlGlobalStatePtr gs)
504
504
  {
505
505
  #ifdef DEBUG_GLOBALS
506
506
  fprintf(stderr, "Initializing globals at %p for thread %d\n",
507
- (void *) gs, xmlGetThreadId());
507
+ (void *) gs, nl_xmlGetThreadId());
508
508
  #endif
509
509
 
510
- xmlMutexLock(&xmlThrDefMutex);
510
+ nl_xmlMutexLock(&xmlThrDefMutex);
511
511
 
512
512
  #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_LEGACY_ENABLED) && defined(LIBXML_SAX1_ENABLED)
513
513
  inithtmlDefaultSAXHandler(&gs->htmlDefaultSAXHandler);
514
514
  #endif
515
515
 
516
- gs->oldXMLWDcompatibility = 0;
517
- gs->xmlBufferAllocScheme = xmlBufferAllocSchemeThrDef;
518
- gs->xmlDefaultBufferSize = xmlDefaultBufferSizeThrDef;
516
+ gs->nl_oldXMLWDcompatibility = 0;
517
+ gs->nl_xmlBufferAllocScheme = xmlBufferAllocSchemeThrDef;
518
+ gs->nl_xmlDefaultBufferSize = xmlDefaultBufferSizeThrDef;
519
519
  #if defined(LIBXML_SAX1_ENABLED) && defined(LIBXML_LEGACY_ENABLED)
520
520
  initxmlDefaultSAXHandler(&gs->xmlDefaultSAXHandler, 1);
521
521
  #endif /* LIBXML_SAX1_ENABLED */
522
- gs->xmlDefaultSAXLocator.getPublicId = xmlSAX2GetPublicId;
523
- gs->xmlDefaultSAXLocator.getSystemId = xmlSAX2GetSystemId;
524
- gs->xmlDefaultSAXLocator.getLineNumber = xmlSAX2GetLineNumber;
525
- gs->xmlDefaultSAXLocator.getColumnNumber = xmlSAX2GetColumnNumber;
526
- gs->xmlDoValidityCheckingDefaultValue =
522
+ gs->nl_xmlDefaultSAXLocator.getPublicId = nl_xmlSAX2GetPublicId;
523
+ gs->nl_xmlDefaultSAXLocator.getSystemId = nl_xmlSAX2GetSystemId;
524
+ gs->nl_xmlDefaultSAXLocator.getLineNumber = nl_xmlSAX2GetLineNumber;
525
+ gs->nl_xmlDefaultSAXLocator.getColumnNumber = nl_xmlSAX2GetColumnNumber;
526
+ gs->nl_xmlDoValidityCheckingDefaultValue =
527
527
  xmlDoValidityCheckingDefaultValueThrDef;
528
528
  #if defined(DEBUG_MEMORY_LOCATION) | defined(DEBUG_MEMORY)
529
- gs->xmlFree = (xmlFreeFunc) xmlMemFree;
530
- gs->xmlMalloc = (xmlMallocFunc) xmlMemMalloc;
531
- gs->xmlMallocAtomic = (xmlMallocFunc) xmlMemMalloc;
532
- gs->xmlRealloc = (xmlReallocFunc) xmlMemRealloc;
533
- gs->xmlMemStrdup = (xmlStrdupFunc) xmlMemoryStrdup;
529
+ gs->nl_xmlFree = (xmlFreeFunc) xmlMemFree;
530
+ gs->nl_xmlMalloc = (xmlMallocFunc) xmlMemMalloc;
531
+ gs->nl_xmlMallocAtomic = (xmlMallocFunc) xmlMemMalloc;
532
+ gs->nl_xmlRealloc = (xmlReallocFunc) xmlMemRealloc;
533
+ gs->nl_xmlMemStrdup = (xmlStrdupFunc) xmlMemoryStrdup;
534
534
  #else
535
- gs->xmlFree = (xmlFreeFunc) free;
536
- gs->xmlMalloc = (xmlMallocFunc) malloc;
537
- gs->xmlMallocAtomic = (xmlMallocFunc) malloc;
538
- gs->xmlRealloc = (xmlReallocFunc) realloc;
539
- gs->xmlMemStrdup = (xmlStrdupFunc) xmlStrdup;
535
+ gs->nl_xmlFree = (xmlFreeFunc) free;
536
+ gs->nl_xmlMalloc = (xmlMallocFunc) malloc;
537
+ gs->nl_xmlMallocAtomic = (xmlMallocFunc) malloc;
538
+ gs->nl_xmlRealloc = (xmlReallocFunc) realloc;
539
+ gs->nl_xmlMemStrdup = (xmlStrdupFunc) nl_xmlStrdup;
540
540
  #endif
541
- gs->xmlGetWarningsDefaultValue = xmlGetWarningsDefaultValueThrDef;
542
- gs->xmlIndentTreeOutput = xmlIndentTreeOutputThrDef;
543
- gs->xmlTreeIndentString = xmlTreeIndentStringThrDef;
544
- gs->xmlKeepBlanksDefaultValue = xmlKeepBlanksDefaultValueThrDef;
545
- gs->xmlLineNumbersDefaultValue = xmlLineNumbersDefaultValueThrDef;
546
- gs->xmlLoadExtDtdDefaultValue = xmlLoadExtDtdDefaultValueThrDef;
547
- gs->xmlParserDebugEntities = xmlParserDebugEntitiesThrDef;
548
- gs->xmlParserVersion = LIBXML_VERSION_STRING;
549
- gs->xmlPedanticParserDefaultValue = xmlPedanticParserDefaultValueThrDef;
550
- gs->xmlSaveNoEmptyTags = xmlSaveNoEmptyTagsThrDef;
551
- gs->xmlSubstituteEntitiesDefaultValue =
541
+ gs->nl_xmlGetWarningsDefaultValue = xmlGetWarningsDefaultValueThrDef;
542
+ gs->nl_xmlIndentTreeOutput = xmlIndentTreeOutputThrDef;
543
+ gs->nl_xmlTreeIndentString = xmlTreeIndentStringThrDef;
544
+ gs->nl_xmlKeepBlanksDefaultValue = xmlKeepBlanksDefaultValueThrDef;
545
+ gs->nl_xmlLineNumbersDefaultValue = xmlLineNumbersDefaultValueThrDef;
546
+ gs->nl_xmlLoadExtDtdDefaultValue = xmlLoadExtDtdDefaultValueThrDef;
547
+ gs->nl_xmlParserDebugEntities = xmlParserDebugEntitiesThrDef;
548
+ gs->nl_xmlParserVersion = LIBXML_VERSION_STRING;
549
+ gs->nl_xmlPedanticParserDefaultValue = xmlPedanticParserDefaultValueThrDef;
550
+ gs->nl_xmlSaveNoEmptyTags = xmlSaveNoEmptyTagsThrDef;
551
+ gs->nl_xmlSubstituteEntitiesDefaultValue =
552
552
  xmlSubstituteEntitiesDefaultValueThrDef;
553
553
 
554
- gs->xmlGenericError = xmlGenericErrorThrDef;
555
- gs->xmlStructuredError = xmlStructuredErrorThrDef;
556
- gs->xmlGenericErrorContext = xmlGenericErrorContextThrDef;
557
- gs->xmlStructuredErrorContext = xmlStructuredErrorContextThrDef;
558
- gs->xmlRegisterNodeDefaultValue = xmlRegisterNodeDefaultValueThrDef;
559
- gs->xmlDeregisterNodeDefaultValue = xmlDeregisterNodeDefaultValueThrDef;
554
+ gs->nl_xmlGenericError = xmlGenericErrorThrDef;
555
+ gs->nl_xmlStructuredError = xmlStructuredErrorThrDef;
556
+ gs->nl_xmlGenericErrorContext = xmlGenericErrorContextThrDef;
557
+ gs->nl_xmlStructuredErrorContext = xmlStructuredErrorContextThrDef;
558
+ gs->nl_xmlRegisterNodeDefaultValue = xmlRegisterNodeDefaultValueThrDef;
559
+ gs->nl_xmlDeregisterNodeDefaultValue = xmlDeregisterNodeDefaultValueThrDef;
560
560
 
561
- gs->xmlParserInputBufferCreateFilenameValue = xmlParserInputBufferCreateFilenameValueThrDef;
562
- gs->xmlOutputBufferCreateFilenameValue = xmlOutputBufferCreateFilenameValueThrDef;
563
- memset(&gs->xmlLastError, 0, sizeof(xmlError));
561
+ gs->nl_xmlParserInputBufferCreateFilenameValue = xmlParserInputBufferCreateFilenameValueThrDef;
562
+ gs->nl_xmlOutputBufferCreateFilenameValue = xmlOutputBufferCreateFilenameValueThrDef;
563
+ memset(&gs->nl_xmlLastError, 0, sizeof(xmlError));
564
564
 
565
- xmlMutexUnlock(&xmlThrDefMutex);
565
+ nl_xmlMutexUnlock(&xmlThrDefMutex);
566
566
  }
567
567
 
568
568
  /**
569
- * xmlCleanupGlobals:
569
+ * nl_xmlCleanupGlobals:
570
570
  *
571
571
  * DEPRECATED: This function is a no-op. Call xmlCleanupParser
572
572
  * to free global state but see the warnings there. xmlCleanupParser
573
573
  * should be only called once at program exit. In most cases, you don't
574
574
  * have call cleanup functions at all.
575
575
  */
576
- void xmlCleanupGlobals(void) {
576
+ void nl_xmlCleanupGlobals(void) {
577
577
  }
578
578
 
579
579
  /**
@@ -582,33 +582,33 @@ void xmlCleanupGlobals(void) {
582
582
  * Additional cleanup for multi-threading
583
583
  */
584
584
  void xmlCleanupGlobalsInternal(void) {
585
- xmlResetError(&xmlLastError);
585
+ nl_xmlResetError(&nl_xmlLastError);
586
586
 
587
587
  xmlCleanupMutex(&xmlThrDefMutex);
588
588
  __xmlGlobalInitMutexDestroy();
589
589
  }
590
590
 
591
591
  void
592
- xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler) {
593
- xmlMutexLock(&xmlThrDefMutex);
592
+ nl_xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler) {
593
+ nl_xmlMutexLock(&xmlThrDefMutex);
594
594
  xmlGenericErrorContextThrDef = ctx;
595
595
  if (handler != NULL)
596
596
  xmlGenericErrorThrDef = handler;
597
597
  else
598
- xmlGenericErrorThrDef = xmlGenericErrorDefaultFunc;
599
- xmlMutexUnlock(&xmlThrDefMutex);
598
+ xmlGenericErrorThrDef = nl_xmlGenericErrorDefaultFunc;
599
+ nl_xmlMutexUnlock(&xmlThrDefMutex);
600
600
  }
601
601
 
602
602
  void
603
- xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler) {
604
- xmlMutexLock(&xmlThrDefMutex);
603
+ nl_xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler) {
604
+ nl_xmlMutexLock(&xmlThrDefMutex);
605
605
  xmlStructuredErrorContextThrDef = ctx;
606
606
  xmlStructuredErrorThrDef = handler;
607
- xmlMutexUnlock(&xmlThrDefMutex);
607
+ nl_xmlMutexUnlock(&xmlThrDefMutex);
608
608
  }
609
609
 
610
610
  /**
611
- * xmlRegisterNodeDefault:
611
+ * nl_xmlRegisterNodeDefault:
612
612
  * @func: function pointer to the new RegisterNodeFunc
613
613
  *
614
614
  * Registers a callback for node creation
@@ -616,32 +616,32 @@ xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler) {
616
616
  * Returns the old value of the registration function
617
617
  */
618
618
  xmlRegisterNodeFunc
619
- xmlRegisterNodeDefault(xmlRegisterNodeFunc func)
619
+ nl_xmlRegisterNodeDefault(xmlRegisterNodeFunc func)
620
620
  {
621
- xmlRegisterNodeFunc old = xmlRegisterNodeDefaultValue;
621
+ xmlRegisterNodeFunc old = nl_xmlRegisterNodeDefaultValue;
622
622
 
623
623
  __xmlRegisterCallbacks = 1;
624
- xmlRegisterNodeDefaultValue = func;
624
+ nl_xmlRegisterNodeDefaultValue = func;
625
625
  return(old);
626
626
  }
627
627
 
628
628
  xmlRegisterNodeFunc
629
- xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func)
629
+ nl_xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func)
630
630
  {
631
631
  xmlRegisterNodeFunc old;
632
632
 
633
- xmlMutexLock(&xmlThrDefMutex);
633
+ nl_xmlMutexLock(&xmlThrDefMutex);
634
634
  old = xmlRegisterNodeDefaultValueThrDef;
635
635
 
636
636
  __xmlRegisterCallbacks = 1;
637
637
  xmlRegisterNodeDefaultValueThrDef = func;
638
- xmlMutexUnlock(&xmlThrDefMutex);
638
+ nl_xmlMutexUnlock(&xmlThrDefMutex);
639
639
 
640
640
  return(old);
641
641
  }
642
642
 
643
643
  /**
644
- * xmlDeregisterNodeDefault:
644
+ * nl_xmlDeregisterNodeDefault:
645
645
  * @func: function pointer to the new DeregisterNodeFunc
646
646
  *
647
647
  * Registers a callback for node destruction
@@ -649,26 +649,26 @@ xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func)
649
649
  * Returns the previous value of the deregistration function
650
650
  */
651
651
  xmlDeregisterNodeFunc
652
- xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func)
652
+ nl_xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func)
653
653
  {
654
- xmlDeregisterNodeFunc old = xmlDeregisterNodeDefaultValue;
654
+ xmlDeregisterNodeFunc old = nl_xmlDeregisterNodeDefaultValue;
655
655
 
656
656
  __xmlRegisterCallbacks = 1;
657
- xmlDeregisterNodeDefaultValue = func;
657
+ nl_xmlDeregisterNodeDefaultValue = func;
658
658
  return(old);
659
659
  }
660
660
 
661
661
  xmlDeregisterNodeFunc
662
- xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func)
662
+ nl_xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func)
663
663
  {
664
664
  xmlDeregisterNodeFunc old;
665
665
 
666
- xmlMutexLock(&xmlThrDefMutex);
666
+ nl_xmlMutexLock(&xmlThrDefMutex);
667
667
  old = xmlDeregisterNodeDefaultValueThrDef;
668
668
 
669
669
  __xmlRegisterCallbacks = 1;
670
670
  xmlDeregisterNodeDefaultValueThrDef = func;
671
- xmlMutexUnlock(&xmlThrDefMutex);
671
+ nl_xmlMutexUnlock(&xmlThrDefMutex);
672
672
 
673
673
  return(old);
674
674
  }
@@ -680,17 +680,17 @@ __htmlDefaultSAXHandler(void) {
680
680
  if (IS_MAIN_THREAD)
681
681
  return (&htmlDefaultSAXHandler);
682
682
  else
683
- return (&xmlGetGlobalState()->htmlDefaultSAXHandler);
683
+ return (&nl_xmlGetGlobalState()->htmlDefaultSAXHandler);
684
684
  }
685
685
  #endif
686
686
 
687
- #undef xmlLastError
687
+ #undef nl_xmlLastError
688
688
  xmlError *
689
- __xmlLastError(void) {
689
+ __nl_xmlLastError(void) {
690
690
  if (IS_MAIN_THREAD)
691
- return (&xmlLastError);
691
+ return (&nl_xmlLastError);
692
692
  else
693
- return (&xmlGetGlobalState()->xmlLastError);
693
+ return (&nl_xmlGetGlobalState()->nl_xmlLastError);
694
694
  }
695
695
 
696
696
  /*
@@ -699,48 +699,48 @@ __xmlLastError(void) {
699
699
  * the right place for them :-)
700
700
  */
701
701
  #if defined(LIBXML_THREAD_ALLOC_ENABLED) && defined(LIBXML_THREAD_ENABLED)
702
- #undef xmlMalloc
702
+ #undef nl_xmlMalloc
703
703
  xmlMallocFunc *
704
704
  __xmlMalloc(void){
705
705
  if (IS_MAIN_THREAD)
706
- return (&xmlMalloc);
706
+ return (&nl_xmlMalloc);
707
707
  else
708
- return (&xmlGetGlobalState()->xmlMalloc);
708
+ return (&nl_xmlGetGlobalState()->nl_xmlMalloc);
709
709
  }
710
710
 
711
- #undef xmlMallocAtomic
711
+ #undef nl_xmlMallocAtomic
712
712
  xmlMallocFunc *
713
713
  __xmlMallocAtomic(void){
714
714
  if (IS_MAIN_THREAD)
715
- return (&xmlMallocAtomic);
715
+ return (&nl_xmlMallocAtomic);
716
716
  else
717
- return (&xmlGetGlobalState()->xmlMallocAtomic);
717
+ return (&nl_xmlGetGlobalState()->nl_xmlMallocAtomic);
718
718
  }
719
719
 
720
- #undef xmlRealloc
720
+ #undef nl_xmlRealloc
721
721
  xmlReallocFunc *
722
722
  __xmlRealloc(void){
723
723
  if (IS_MAIN_THREAD)
724
- return (&xmlRealloc);
724
+ return (&nl_xmlRealloc);
725
725
  else
726
- return (&xmlGetGlobalState()->xmlRealloc);
726
+ return (&nl_xmlGetGlobalState()->nl_xmlRealloc);
727
727
  }
728
728
 
729
- #undef xmlFree
729
+ #undef nl_xmlFree
730
730
  xmlFreeFunc *
731
731
  __xmlFree(void){
732
732
  if (IS_MAIN_THREAD)
733
- return (&xmlFree);
733
+ return (&nl_xmlFree);
734
734
  else
735
- return (&xmlGetGlobalState()->xmlFree);
735
+ return (&nl_xmlGetGlobalState()->nl_xmlFree);
736
736
  }
737
737
 
738
738
  xmlStrdupFunc *
739
739
  __xmlMemStrdup(void){
740
740
  if (IS_MAIN_THREAD)
741
- return (&xmlMemStrdup);
741
+ return (&nl_xmlMemStrdup);
742
742
  else
743
- return (&xmlGetGlobalState()->xmlMemStrdup);
743
+ return (&nl_xmlGetGlobalState()->nl_xmlMemStrdup);
744
744
  }
745
745
 
746
746
  #endif
@@ -752,46 +752,46 @@ __xmlMemStrdup(void){
752
752
  */
753
753
 
754
754
 
755
- #undef oldXMLWDcompatibility
755
+ #undef nl_oldXMLWDcompatibility
756
756
  int *
757
- __oldXMLWDcompatibility(void) {
757
+ __nl_oldXMLWDcompatibility(void) {
758
758
  if (IS_MAIN_THREAD)
759
- return (&oldXMLWDcompatibility);
759
+ return (&nl_oldXMLWDcompatibility);
760
760
  else
761
- return (&xmlGetGlobalState()->oldXMLWDcompatibility);
761
+ return (&nl_xmlGetGlobalState()->nl_oldXMLWDcompatibility);
762
762
  }
763
763
 
764
- #undef xmlBufferAllocScheme
764
+ #undef nl_xmlBufferAllocScheme
765
765
  xmlBufferAllocationScheme *
766
- __xmlBufferAllocScheme(void) {
766
+ __nl_xmlBufferAllocScheme(void) {
767
767
  if (IS_MAIN_THREAD)
768
- return (&xmlBufferAllocScheme);
768
+ return (&nl_xmlBufferAllocScheme);
769
769
  else
770
- return (&xmlGetGlobalState()->xmlBufferAllocScheme);
770
+ return (&nl_xmlGetGlobalState()->nl_xmlBufferAllocScheme);
771
771
  }
772
- xmlBufferAllocationScheme xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v) {
772
+ xmlBufferAllocationScheme nl_xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v) {
773
773
  xmlBufferAllocationScheme ret;
774
- xmlMutexLock(&xmlThrDefMutex);
774
+ nl_xmlMutexLock(&xmlThrDefMutex);
775
775
  ret = xmlBufferAllocSchemeThrDef;
776
776
  xmlBufferAllocSchemeThrDef = v;
777
- xmlMutexUnlock(&xmlThrDefMutex);
777
+ nl_xmlMutexUnlock(&xmlThrDefMutex);
778
778
  return ret;
779
779
  }
780
780
 
781
- #undef xmlDefaultBufferSize
781
+ #undef nl_xmlDefaultBufferSize
782
782
  int *
783
- __xmlDefaultBufferSize(void) {
783
+ __nl_xmlDefaultBufferSize(void) {
784
784
  if (IS_MAIN_THREAD)
785
- return (&xmlDefaultBufferSize);
785
+ return (&nl_xmlDefaultBufferSize);
786
786
  else
787
- return (&xmlGetGlobalState()->xmlDefaultBufferSize);
787
+ return (&nl_xmlGetGlobalState()->nl_xmlDefaultBufferSize);
788
788
  }
789
- int xmlThrDefDefaultBufferSize(int v) {
789
+ int nl_xmlThrDefDefaultBufferSize(int v) {
790
790
  int ret;
791
- xmlMutexLock(&xmlThrDefMutex);
791
+ nl_xmlMutexLock(&xmlThrDefMutex);
792
792
  ret = xmlDefaultBufferSizeThrDef;
793
793
  xmlDefaultBufferSizeThrDef = v;
794
- xmlMutexUnlock(&xmlThrDefMutex);
794
+ nl_xmlMutexUnlock(&xmlThrDefMutex);
795
795
  return ret;
796
796
  }
797
797
 
@@ -802,284 +802,284 @@ __xmlDefaultSAXHandler(void) {
802
802
  if (IS_MAIN_THREAD)
803
803
  return (&xmlDefaultSAXHandler);
804
804
  else
805
- return (&xmlGetGlobalState()->xmlDefaultSAXHandler);
805
+ return (&nl_xmlGetGlobalState()->xmlDefaultSAXHandler);
806
806
  }
807
807
  #endif /* LIBXML_SAX1_ENABLED */
808
808
 
809
- #undef xmlDefaultSAXLocator
809
+ #undef nl_xmlDefaultSAXLocator
810
810
  xmlSAXLocator *
811
- __xmlDefaultSAXLocator(void) {
811
+ __nl_xmlDefaultSAXLocator(void) {
812
812
  if (IS_MAIN_THREAD)
813
- return (&xmlDefaultSAXLocator);
813
+ return (&nl_xmlDefaultSAXLocator);
814
814
  else
815
- return (&xmlGetGlobalState()->xmlDefaultSAXLocator);
815
+ return (&nl_xmlGetGlobalState()->nl_xmlDefaultSAXLocator);
816
816
  }
817
817
 
818
- #undef xmlDoValidityCheckingDefaultValue
818
+ #undef nl_xmlDoValidityCheckingDefaultValue
819
819
  int *
820
- __xmlDoValidityCheckingDefaultValue(void) {
820
+ __nl_xmlDoValidityCheckingDefaultValue(void) {
821
821
  if (IS_MAIN_THREAD)
822
- return (&xmlDoValidityCheckingDefaultValue);
822
+ return (&nl_xmlDoValidityCheckingDefaultValue);
823
823
  else
824
- return (&xmlGetGlobalState()->xmlDoValidityCheckingDefaultValue);
824
+ return (&nl_xmlGetGlobalState()->nl_xmlDoValidityCheckingDefaultValue);
825
825
  }
826
- int xmlThrDefDoValidityCheckingDefaultValue(int v) {
826
+ int nl_xmlThrDefDoValidityCheckingDefaultValue(int v) {
827
827
  int ret;
828
- xmlMutexLock(&xmlThrDefMutex);
828
+ nl_xmlMutexLock(&xmlThrDefMutex);
829
829
  ret = xmlDoValidityCheckingDefaultValueThrDef;
830
830
  xmlDoValidityCheckingDefaultValueThrDef = v;
831
- xmlMutexUnlock(&xmlThrDefMutex);
831
+ nl_xmlMutexUnlock(&xmlThrDefMutex);
832
832
  return ret;
833
833
  }
834
834
 
835
- #undef xmlGenericError
835
+ #undef nl_xmlGenericError
836
836
  xmlGenericErrorFunc *
837
- __xmlGenericError(void) {
837
+ __nl_xmlGenericError(void) {
838
838
  if (IS_MAIN_THREAD)
839
- return (&xmlGenericError);
839
+ return (&nl_xmlGenericError);
840
840
  else
841
- return (&xmlGetGlobalState()->xmlGenericError);
841
+ return (&nl_xmlGetGlobalState()->nl_xmlGenericError);
842
842
  }
843
843
 
844
- #undef xmlStructuredError
844
+ #undef nl_xmlStructuredError
845
845
  xmlStructuredErrorFunc *
846
- __xmlStructuredError(void) {
846
+ __nl_xmlStructuredError(void) {
847
847
  if (IS_MAIN_THREAD)
848
- return (&xmlStructuredError);
848
+ return (&nl_xmlStructuredError);
849
849
  else
850
- return (&xmlGetGlobalState()->xmlStructuredError);
850
+ return (&nl_xmlGetGlobalState()->nl_xmlStructuredError);
851
851
  }
852
852
 
853
- #undef xmlGenericErrorContext
853
+ #undef nl_xmlGenericErrorContext
854
854
  void * *
855
- __xmlGenericErrorContext(void) {
855
+ __nl_xmlGenericErrorContext(void) {
856
856
  if (IS_MAIN_THREAD)
857
- return (&xmlGenericErrorContext);
857
+ return (&nl_xmlGenericErrorContext);
858
858
  else
859
- return (&xmlGetGlobalState()->xmlGenericErrorContext);
859
+ return (&nl_xmlGetGlobalState()->nl_xmlGenericErrorContext);
860
860
  }
861
861
 
862
- #undef xmlStructuredErrorContext
862
+ #undef nl_xmlStructuredErrorContext
863
863
  void * *
864
- __xmlStructuredErrorContext(void) {
864
+ __nl_xmlStructuredErrorContext(void) {
865
865
  if (IS_MAIN_THREAD)
866
- return (&xmlStructuredErrorContext);
866
+ return (&nl_xmlStructuredErrorContext);
867
867
  else
868
- return (&xmlGetGlobalState()->xmlStructuredErrorContext);
868
+ return (&nl_xmlGetGlobalState()->nl_xmlStructuredErrorContext);
869
869
  }
870
870
 
871
- #undef xmlGetWarningsDefaultValue
871
+ #undef nl_xmlGetWarningsDefaultValue
872
872
  int *
873
- __xmlGetWarningsDefaultValue(void) {
873
+ __nl_xmlGetWarningsDefaultValue(void) {
874
874
  if (IS_MAIN_THREAD)
875
- return (&xmlGetWarningsDefaultValue);
875
+ return (&nl_xmlGetWarningsDefaultValue);
876
876
  else
877
- return (&xmlGetGlobalState()->xmlGetWarningsDefaultValue);
877
+ return (&nl_xmlGetGlobalState()->nl_xmlGetWarningsDefaultValue);
878
878
  }
879
- int xmlThrDefGetWarningsDefaultValue(int v) {
879
+ int nl_xmlThrDefGetWarningsDefaultValue(int v) {
880
880
  int ret;
881
- xmlMutexLock(&xmlThrDefMutex);
881
+ nl_xmlMutexLock(&xmlThrDefMutex);
882
882
  ret = xmlGetWarningsDefaultValueThrDef;
883
883
  xmlGetWarningsDefaultValueThrDef = v;
884
- xmlMutexUnlock(&xmlThrDefMutex);
884
+ nl_xmlMutexUnlock(&xmlThrDefMutex);
885
885
  return ret;
886
886
  }
887
887
 
888
- #undef xmlIndentTreeOutput
888
+ #undef nl_xmlIndentTreeOutput
889
889
  int *
890
- __xmlIndentTreeOutput(void) {
890
+ __nl_xmlIndentTreeOutput(void) {
891
891
  if (IS_MAIN_THREAD)
892
- return (&xmlIndentTreeOutput);
892
+ return (&nl_xmlIndentTreeOutput);
893
893
  else
894
- return (&xmlGetGlobalState()->xmlIndentTreeOutput);
894
+ return (&nl_xmlGetGlobalState()->nl_xmlIndentTreeOutput);
895
895
  }
896
- int xmlThrDefIndentTreeOutput(int v) {
896
+ int nl_xmlThrDefIndentTreeOutput(int v) {
897
897
  int ret;
898
- xmlMutexLock(&xmlThrDefMutex);
898
+ nl_xmlMutexLock(&xmlThrDefMutex);
899
899
  ret = xmlIndentTreeOutputThrDef;
900
900
  xmlIndentTreeOutputThrDef = v;
901
- xmlMutexUnlock(&xmlThrDefMutex);
901
+ nl_xmlMutexUnlock(&xmlThrDefMutex);
902
902
  return ret;
903
903
  }
904
904
 
905
- #undef xmlTreeIndentString
905
+ #undef nl_xmlTreeIndentString
906
906
  const char * *
907
- __xmlTreeIndentString(void) {
907
+ __nl_xmlTreeIndentString(void) {
908
908
  if (IS_MAIN_THREAD)
909
- return (&xmlTreeIndentString);
909
+ return (&nl_xmlTreeIndentString);
910
910
  else
911
- return (&xmlGetGlobalState()->xmlTreeIndentString);
911
+ return (&nl_xmlGetGlobalState()->nl_xmlTreeIndentString);
912
912
  }
913
- const char * xmlThrDefTreeIndentString(const char * v) {
913
+ const char * nl_xmlThrDefTreeIndentString(const char * v) {
914
914
  const char * ret;
915
- xmlMutexLock(&xmlThrDefMutex);
915
+ nl_xmlMutexLock(&xmlThrDefMutex);
916
916
  ret = xmlTreeIndentStringThrDef;
917
917
  xmlTreeIndentStringThrDef = v;
918
- xmlMutexUnlock(&xmlThrDefMutex);
918
+ nl_xmlMutexUnlock(&xmlThrDefMutex);
919
919
  return ret;
920
920
  }
921
921
 
922
- #undef xmlKeepBlanksDefaultValue
922
+ #undef nl_xmlKeepBlanksDefaultValue
923
923
  int *
924
- __xmlKeepBlanksDefaultValue(void) {
924
+ __nl_xmlKeepBlanksDefaultValue(void) {
925
925
  if (IS_MAIN_THREAD)
926
- return (&xmlKeepBlanksDefaultValue);
926
+ return (&nl_xmlKeepBlanksDefaultValue);
927
927
  else
928
- return (&xmlGetGlobalState()->xmlKeepBlanksDefaultValue);
928
+ return (&nl_xmlGetGlobalState()->nl_xmlKeepBlanksDefaultValue);
929
929
  }
930
- int xmlThrDefKeepBlanksDefaultValue(int v) {
930
+ int nl_xmlThrDefKeepBlanksDefaultValue(int v) {
931
931
  int ret;
932
- xmlMutexLock(&xmlThrDefMutex);
932
+ nl_xmlMutexLock(&xmlThrDefMutex);
933
933
  ret = xmlKeepBlanksDefaultValueThrDef;
934
934
  xmlKeepBlanksDefaultValueThrDef = v;
935
- xmlMutexUnlock(&xmlThrDefMutex);
935
+ nl_xmlMutexUnlock(&xmlThrDefMutex);
936
936
  return ret;
937
937
  }
938
938
 
939
- #undef xmlLineNumbersDefaultValue
939
+ #undef nl_xmlLineNumbersDefaultValue
940
940
  int *
941
- __xmlLineNumbersDefaultValue(void) {
941
+ __nl_xmlLineNumbersDefaultValue(void) {
942
942
  if (IS_MAIN_THREAD)
943
- return (&xmlLineNumbersDefaultValue);
943
+ return (&nl_xmlLineNumbersDefaultValue);
944
944
  else
945
- return (&xmlGetGlobalState()->xmlLineNumbersDefaultValue);
945
+ return (&nl_xmlGetGlobalState()->nl_xmlLineNumbersDefaultValue);
946
946
  }
947
- int xmlThrDefLineNumbersDefaultValue(int v) {
947
+ int nl_xmlThrDefLineNumbersDefaultValue(int v) {
948
948
  int ret;
949
- xmlMutexLock(&xmlThrDefMutex);
949
+ nl_xmlMutexLock(&xmlThrDefMutex);
950
950
  ret = xmlLineNumbersDefaultValueThrDef;
951
951
  xmlLineNumbersDefaultValueThrDef = v;
952
- xmlMutexUnlock(&xmlThrDefMutex);
952
+ nl_xmlMutexUnlock(&xmlThrDefMutex);
953
953
  return ret;
954
954
  }
955
955
 
956
- #undef xmlLoadExtDtdDefaultValue
956
+ #undef nl_xmlLoadExtDtdDefaultValue
957
957
  int *
958
- __xmlLoadExtDtdDefaultValue(void) {
958
+ __nl_xmlLoadExtDtdDefaultValue(void) {
959
959
  if (IS_MAIN_THREAD)
960
- return (&xmlLoadExtDtdDefaultValue);
960
+ return (&nl_xmlLoadExtDtdDefaultValue);
961
961
  else
962
- return (&xmlGetGlobalState()->xmlLoadExtDtdDefaultValue);
962
+ return (&nl_xmlGetGlobalState()->nl_xmlLoadExtDtdDefaultValue);
963
963
  }
964
- int xmlThrDefLoadExtDtdDefaultValue(int v) {
964
+ int nl_xmlThrDefLoadExtDtdDefaultValue(int v) {
965
965
  int ret;
966
- xmlMutexLock(&xmlThrDefMutex);
966
+ nl_xmlMutexLock(&xmlThrDefMutex);
967
967
  ret = xmlLoadExtDtdDefaultValueThrDef;
968
968
  xmlLoadExtDtdDefaultValueThrDef = v;
969
- xmlMutexUnlock(&xmlThrDefMutex);
969
+ nl_xmlMutexUnlock(&xmlThrDefMutex);
970
970
  return ret;
971
971
  }
972
972
 
973
- #undef xmlParserDebugEntities
973
+ #undef nl_xmlParserDebugEntities
974
974
  int *
975
- __xmlParserDebugEntities(void) {
975
+ __nl_xmlParserDebugEntities(void) {
976
976
  if (IS_MAIN_THREAD)
977
- return (&xmlParserDebugEntities);
977
+ return (&nl_xmlParserDebugEntities);
978
978
  else
979
- return (&xmlGetGlobalState()->xmlParserDebugEntities);
979
+ return (&nl_xmlGetGlobalState()->nl_xmlParserDebugEntities);
980
980
  }
981
- int xmlThrDefParserDebugEntities(int v) {
981
+ int nl_xmlThrDefParserDebugEntities(int v) {
982
982
  int ret;
983
- xmlMutexLock(&xmlThrDefMutex);
983
+ nl_xmlMutexLock(&xmlThrDefMutex);
984
984
  ret = xmlParserDebugEntitiesThrDef;
985
985
  xmlParserDebugEntitiesThrDef = v;
986
- xmlMutexUnlock(&xmlThrDefMutex);
986
+ nl_xmlMutexUnlock(&xmlThrDefMutex);
987
987
  return ret;
988
988
  }
989
989
 
990
- #undef xmlParserVersion
990
+ #undef nl_xmlParserVersion
991
991
  const char * *
992
- __xmlParserVersion(void) {
992
+ __nl_xmlParserVersion(void) {
993
993
  if (IS_MAIN_THREAD)
994
- return (&xmlParserVersion);
994
+ return (&nl_xmlParserVersion);
995
995
  else
996
- return (&xmlGetGlobalState()->xmlParserVersion);
996
+ return (&nl_xmlGetGlobalState()->nl_xmlParserVersion);
997
997
  }
998
998
 
999
- #undef xmlPedanticParserDefaultValue
999
+ #undef nl_xmlPedanticParserDefaultValue
1000
1000
  int *
1001
- __xmlPedanticParserDefaultValue(void) {
1001
+ __nl_xmlPedanticParserDefaultValue(void) {
1002
1002
  if (IS_MAIN_THREAD)
1003
- return (&xmlPedanticParserDefaultValue);
1003
+ return (&nl_xmlPedanticParserDefaultValue);
1004
1004
  else
1005
- return (&xmlGetGlobalState()->xmlPedanticParserDefaultValue);
1005
+ return (&nl_xmlGetGlobalState()->nl_xmlPedanticParserDefaultValue);
1006
1006
  }
1007
- int xmlThrDefPedanticParserDefaultValue(int v) {
1007
+ int nl_xmlThrDefPedanticParserDefaultValue(int v) {
1008
1008
  int ret;
1009
- xmlMutexLock(&xmlThrDefMutex);
1009
+ nl_xmlMutexLock(&xmlThrDefMutex);
1010
1010
  ret = xmlPedanticParserDefaultValueThrDef;
1011
1011
  xmlPedanticParserDefaultValueThrDef = v;
1012
- xmlMutexUnlock(&xmlThrDefMutex);
1012
+ nl_xmlMutexUnlock(&xmlThrDefMutex);
1013
1013
  return ret;
1014
1014
  }
1015
1015
 
1016
- #undef xmlSaveNoEmptyTags
1016
+ #undef nl_xmlSaveNoEmptyTags
1017
1017
  int *
1018
- __xmlSaveNoEmptyTags(void) {
1018
+ __nl_xmlSaveNoEmptyTags(void) {
1019
1019
  if (IS_MAIN_THREAD)
1020
- return (&xmlSaveNoEmptyTags);
1020
+ return (&nl_xmlSaveNoEmptyTags);
1021
1021
  else
1022
- return (&xmlGetGlobalState()->xmlSaveNoEmptyTags);
1022
+ return (&nl_xmlGetGlobalState()->nl_xmlSaveNoEmptyTags);
1023
1023
  }
1024
- int xmlThrDefSaveNoEmptyTags(int v) {
1024
+ int nl_xmlThrDefSaveNoEmptyTags(int v) {
1025
1025
  int ret;
1026
- xmlMutexLock(&xmlThrDefMutex);
1026
+ nl_xmlMutexLock(&xmlThrDefMutex);
1027
1027
  ret = xmlSaveNoEmptyTagsThrDef;
1028
1028
  xmlSaveNoEmptyTagsThrDef = v;
1029
- xmlMutexUnlock(&xmlThrDefMutex);
1029
+ nl_xmlMutexUnlock(&xmlThrDefMutex);
1030
1030
  return ret;
1031
1031
  }
1032
1032
 
1033
- #undef xmlSubstituteEntitiesDefaultValue
1033
+ #undef nl_xmlSubstituteEntitiesDefaultValue
1034
1034
  int *
1035
- __xmlSubstituteEntitiesDefaultValue(void) {
1035
+ __nl_xmlSubstituteEntitiesDefaultValue(void) {
1036
1036
  if (IS_MAIN_THREAD)
1037
- return (&xmlSubstituteEntitiesDefaultValue);
1037
+ return (&nl_xmlSubstituteEntitiesDefaultValue);
1038
1038
  else
1039
- return (&xmlGetGlobalState()->xmlSubstituteEntitiesDefaultValue);
1039
+ return (&nl_xmlGetGlobalState()->nl_xmlSubstituteEntitiesDefaultValue);
1040
1040
  }
1041
- int xmlThrDefSubstituteEntitiesDefaultValue(int v) {
1041
+ int nl_xmlThrDefSubstituteEntitiesDefaultValue(int v) {
1042
1042
  int ret;
1043
- xmlMutexLock(&xmlThrDefMutex);
1043
+ nl_xmlMutexLock(&xmlThrDefMutex);
1044
1044
  ret = xmlSubstituteEntitiesDefaultValueThrDef;
1045
1045
  xmlSubstituteEntitiesDefaultValueThrDef = v;
1046
- xmlMutexUnlock(&xmlThrDefMutex);
1046
+ nl_xmlMutexUnlock(&xmlThrDefMutex);
1047
1047
  return ret;
1048
1048
  }
1049
1049
 
1050
- #undef xmlRegisterNodeDefaultValue
1050
+ #undef nl_xmlRegisterNodeDefaultValue
1051
1051
  xmlRegisterNodeFunc *
1052
- __xmlRegisterNodeDefaultValue(void) {
1052
+ __nl_xmlRegisterNodeDefaultValue(void) {
1053
1053
  if (IS_MAIN_THREAD)
1054
- return (&xmlRegisterNodeDefaultValue);
1054
+ return (&nl_xmlRegisterNodeDefaultValue);
1055
1055
  else
1056
- return (&xmlGetGlobalState()->xmlRegisterNodeDefaultValue);
1056
+ return (&nl_xmlGetGlobalState()->nl_xmlRegisterNodeDefaultValue);
1057
1057
  }
1058
1058
 
1059
- #undef xmlDeregisterNodeDefaultValue
1059
+ #undef nl_xmlDeregisterNodeDefaultValue
1060
1060
  xmlDeregisterNodeFunc *
1061
- __xmlDeregisterNodeDefaultValue(void) {
1061
+ __nl_xmlDeregisterNodeDefaultValue(void) {
1062
1062
  if (IS_MAIN_THREAD)
1063
- return (&xmlDeregisterNodeDefaultValue);
1063
+ return (&nl_xmlDeregisterNodeDefaultValue);
1064
1064
  else
1065
- return (&xmlGetGlobalState()->xmlDeregisterNodeDefaultValue);
1065
+ return (&nl_xmlGetGlobalState()->nl_xmlDeregisterNodeDefaultValue);
1066
1066
  }
1067
1067
 
1068
- #undef xmlParserInputBufferCreateFilenameValue
1068
+ #undef nl_xmlParserInputBufferCreateFilenameValue
1069
1069
  xmlParserInputBufferCreateFilenameFunc *
1070
- __xmlParserInputBufferCreateFilenameValue(void) {
1070
+ __nl_xmlParserInputBufferCreateFilenameValue(void) {
1071
1071
  if (IS_MAIN_THREAD)
1072
- return (&xmlParserInputBufferCreateFilenameValue);
1072
+ return (&nl_xmlParserInputBufferCreateFilenameValue);
1073
1073
  else
1074
- return (&xmlGetGlobalState()->xmlParserInputBufferCreateFilenameValue);
1074
+ return (&nl_xmlGetGlobalState()->nl_xmlParserInputBufferCreateFilenameValue);
1075
1075
  }
1076
1076
 
1077
- #undef xmlOutputBufferCreateFilenameValue
1077
+ #undef nl_xmlOutputBufferCreateFilenameValue
1078
1078
  xmlOutputBufferCreateFilenameFunc *
1079
- __xmlOutputBufferCreateFilenameValue(void) {
1079
+ __nl_xmlOutputBufferCreateFilenameValue(void) {
1080
1080
  if (IS_MAIN_THREAD)
1081
- return (&xmlOutputBufferCreateFilenameValue);
1081
+ return (&nl_xmlOutputBufferCreateFilenameValue);
1082
1082
  else
1083
- return (&xmlGetGlobalState()->xmlOutputBufferCreateFilenameValue);
1083
+ return (&nl_xmlGetGlobalState()->nl_xmlOutputBufferCreateFilenameValue);
1084
1084
  }
1085
1085