1#![allow(non_snake_case)]
37#![allow(unused_variables)]
38#![allow(clippy::missing_safety_doc)]
39#![allow(clippy::not_unsafe_ptr_arg_deref)]
40
41use core::ffi::c_void;
42use core::ptr;
43use std::mem::size_of;
44use std::os::raw::{c_char, c_int, c_uint};
45
46use crate::abi::allocator::*;
47use crate::abi::callbacks::*;
48use crate::abi::ownership::*;
49use crate::abi::structs::*;
50use crate::abi::types::xmlAttributeType::XML_ATTRIBUTE_CDATA;
51use crate::abi::types::xmlElementType::*;
52use crate::abi::types::xmlErrorLevel::XML_ERR_NONE;
53use crate::abi::types::*;
54use crate::abi::versioning::*;
55
56#[no_mangle]
71pub unsafe extern "C" fn xmlInitParser() {
72 crate::internal::globals::init_parser();
73}
74
75#[no_mangle]
85pub unsafe extern "C" fn xmlCleanupParser() {
86 crate::internal::globals::cleanup_parser();
87}
88
89#[no_mangle]
99pub unsafe extern "C" fn xmlInitThreads() -> c_int {
100 crate::internal::globals::init_threads()
101}
102
103#[no_mangle]
111pub unsafe extern "C" fn xmlCleanupThreads() {
112 crate::xml::threads::cleanup_threads();
113}
114
115#[no_mangle]
123pub extern "C" fn xmlIsInitialized() -> c_int {
124 if crate::abi::versioning::is_initialized() {
125 1
126 } else {
127 0
128 }
129}
130
131#[no_mangle]
140pub unsafe extern "C" fn xmlLockLibrary() {
141 crate::xml::threads::lock_library();
142}
143
144#[no_mangle]
152pub unsafe extern "C" fn xmlUnlockLibrary() {
153 crate::xml::threads::unlock_library();
154}
155
156#[no_mangle]
173pub unsafe extern "C" fn xmlSetGenericErrorFunc(
174 ctx: *mut c_void,
175 handler: Option<xmlGenericErrorFunc>,
176) {
177 unsafe { crate::xml::errors::set_generic_error_func(ctx, handler) };
179}
180
181#[no_mangle]
193pub unsafe extern "C" fn xmlSetStructuredErrorFunc(
194 ctx: *mut c_void,
195 handler: Option<xmlStructuredErrorFunc>,
196) {
197 unsafe { crate::xml::errors::set_structured_error_func(ctx, handler) };
199}
200
201#[no_mangle]
212pub extern "C" fn xmlGetLastError() -> *mut _xmlError {
213 crate::xml::errors::get_last_error()
214}
215
216#[no_mangle]
230pub unsafe extern "C" fn xmlCopyError(from: *const _xmlError, to: *mut _xmlError) -> c_int {
231 unsafe { crate::xml::errors::copy_error(from, to) }
233}
234
235#[no_mangle]
247pub unsafe extern "C" fn xmlResetError(err: *mut _xmlError) {
248 unsafe { crate::xml::errors::reset_error(err) };
250}
251
252#[no_mangle]
265pub unsafe extern "C" fn xmlRaiseError(
266 ctxt: *mut c_void,
267 ctxt2: *mut c_void,
268 ctxt3: *mut c_void,
269 ctxt4: *mut c_void,
270 ctxt5: *mut c_void,
271 domain: c_int,
272 code: c_int,
273 level: c_int,
274 file: *const c_char,
275 line: c_int,
276 str1: *const c_char,
277 str2: *const c_char,
278 str3: *const c_char,
279 int1: c_int,
280 int2: c_int,
281 msg: *const c_char,
282) {
283 unsafe {
285 crate::xml::errors::raise_error(
286 ctxt, ctxt2, ctxt3, ctxt4, ctxt5, domain, code, level, file, line, str1, str2, str3,
287 int1, int2, msg,
288 );
289 }
290}
291
292#[no_mangle]
300pub extern "C" fn xmlResetLastError() {
301 crate::xml::errors::reset_last_error();
302}
303
304#[no_mangle]
320pub unsafe extern "C" fn xmlStrdup(cur: *const xmlChar) -> *mut xmlChar {
321 if cur.is_null() {
322 return ptr::null_mut();
323 }
324 let len = unsafe { xmlStrlen(cur) };
325 let size = len + 1;
326 let new_ptr = unsafe { xmlMalloc(size as usize) };
327 if new_ptr.is_null() {
328 return ptr::null_mut();
329 }
330 unsafe {
331 ptr::copy_nonoverlapping(cur as *const u8, new_ptr as *mut u8, size as usize);
332 }
333 new_ptr as *mut xmlChar
334}
335
336#[no_mangle]
348pub unsafe extern "C" fn xmlStrndup(cur: *const xmlChar, len: c_int) -> *mut xmlChar {
349 if cur.is_null() || len <= 0 {
350 return ptr::null_mut();
351 }
352 let size = len as usize + 1;
353 let new_ptr = unsafe { xmlMalloc(size) };
354 if new_ptr.is_null() {
355 return ptr::null_mut();
356 }
357 unsafe {
358 ptr::copy_nonoverlapping(cur as *const u8, new_ptr as *mut u8, len as usize);
359 *(new_ptr.add(len as usize) as *mut u8) = 0;
360 }
361 new_ptr as *mut xmlChar
362}
363
364#[no_mangle]
376pub unsafe extern "C" fn xmlStrlen(str: *const xmlChar) -> c_int {
377 if str.is_null() {
378 return 0;
379 }
380 unsafe { libc::strlen(str as *const c_char) as c_int }
381}
382
383#[no_mangle]
394pub unsafe extern "C" fn xmlStrcmp(str1: *const xmlChar, str2: *const xmlChar) -> c_int {
395 if str1.is_null() && str2.is_null() {
396 return 0;
397 }
398 if str1.is_null() {
399 return -1;
400 }
401 if str2.is_null() {
402 return 1;
403 }
404 unsafe { libc::strcmp(str1 as *const c_char, str2 as *const c_char) as c_int }
405}
406
407#[no_mangle]
415pub unsafe extern "C" fn xmlStrncmp(
416 str1: *const xmlChar,
417 str2: *const xmlChar,
418 len: c_int,
419) -> c_int {
420 if len <= 0 {
421 return 0;
422 }
423 if str1.is_null() && str2.is_null() {
424 return 0;
425 }
426 if str1.is_null() {
427 return -1;
428 }
429 if str2.is_null() {
430 return 1;
431 }
432 unsafe { libc::strncmp(str1 as *const c_char, str2 as *const c_char, len as usize) as c_int }
433}
434
435#[no_mangle]
443pub unsafe extern "C" fn xmlStrcasecmp(str1: *const xmlChar, str2: *const xmlChar) -> c_int {
444 if str1.is_null() && str2.is_null() {
445 return 0;
446 }
447 if str1.is_null() {
448 return -1;
449 }
450 if str2.is_null() {
451 return 1;
452 }
453 unsafe { libc::strcasecmp(str1 as *const c_char, str2 as *const c_char) as c_int }
454}
455
456#[no_mangle]
464pub unsafe extern "C" fn xmlStrncasecmp(
465 str1: *const xmlChar,
466 str2: *const xmlChar,
467 len: c_int,
468) -> c_int {
469 if len <= 0 {
470 return 0;
471 }
472 if str1.is_null() && str2.is_null() {
473 return 0;
474 }
475 if str1.is_null() {
476 return -1;
477 }
478 if str2.is_null() {
479 return 1;
480 }
481 unsafe {
482 libc::strncasecmp(str1 as *const c_char, str2 as *const c_char, len as usize) as c_int
483 }
484}
485
486#[no_mangle]
496pub unsafe extern "C" fn xmlStrEqual(str1: *const xmlChar, str2: *const xmlChar) -> c_int {
497 if str1.is_null() && str2.is_null() {
498 return 1;
499 }
500 if str1.is_null() || str2.is_null() {
501 return 0;
502 }
503 unsafe { (libc::strcmp(str1 as *const c_char, str2 as *const c_char) == 0) as c_int }
504}
505
506#[no_mangle]
517pub unsafe extern "C" fn xmlStrQEqual(
518 pref: *const xmlChar,
519 name: *const xmlChar,
520 str: *const xmlChar,
521) -> c_int {
522 if name.is_null() || str.is_null() {
523 return 0;
524 }
525 if pref.is_null() {
526 return unsafe { xmlStrEqual(name, str) };
527 }
528 let pref_len = unsafe { xmlStrlen(pref) };
530 let name_len = unsafe { xmlStrlen(name) };
531 let total_len = pref_len + 1 + name_len;
532 let str_len = unsafe { xmlStrlen(str) };
533 if total_len != str_len {
534 return 0;
535 }
536 if unsafe {
538 libc::strncmp(
539 pref as *const c_char,
540 str as *const c_char,
541 pref_len as usize,
542 )
543 } != 0
544 {
545 return 0;
546 }
547 if unsafe { *str.add(pref_len as usize) } != b':' as xmlChar {
549 return 0;
550 }
551 (unsafe {
553 libc::strncmp(
554 name as *const c_char,
555 str.add((pref_len + 1) as usize) as *const c_char,
556 name_len as usize,
557 ) == 0
558 }) as c_int
559}
560
561#[no_mangle]
575pub unsafe extern "C" fn xmlStrcat(cur: *mut xmlChar, add: *const xmlChar) -> *mut xmlChar {
576 if add.is_null() {
577 return cur;
578 }
579 if cur.is_null() {
580 return unsafe { xmlStrdup(add) };
581 }
582 let cur_len = unsafe { xmlStrlen(cur) } as usize;
583 let add_len = unsafe { xmlStrlen(add) } as usize;
584 let new_size = cur_len + add_len + 1;
585 let new_ptr = unsafe { xmlRealloc(cur as *mut c_void, new_size) };
586 if new_ptr.is_null() {
587 return ptr::null_mut();
588 }
589 unsafe {
590 ptr::copy_nonoverlapping(add as *const u8, (new_ptr as *mut u8).add(cur_len), add_len);
591 *((new_ptr as *mut u8).add(cur_len + add_len)) = 0;
592 }
593 new_ptr as *mut xmlChar
594}
595
596#[no_mangle]
608pub unsafe extern "C" fn xmlStrncat(
609 cur: *mut xmlChar,
610 add: *const xmlChar,
611 len: c_int,
612) -> *mut xmlChar {
613 if add.is_null() || len <= 0 {
614 return cur;
615 }
616 let len = len as usize;
617 if cur.is_null() {
618 return unsafe { xmlStrndup(add, len as c_int) };
619 }
620 let cur_len = unsafe { xmlStrlen(cur) } as usize;
621 let new_size = cur_len + len + 1;
622 let new_ptr = unsafe { xmlRealloc(cur as *mut c_void, new_size) };
623 if new_ptr.is_null() {
624 return ptr::null_mut();
625 }
626 unsafe {
627 ptr::copy_nonoverlapping(add as *const u8, (new_ptr as *mut u8).add(cur_len), len);
628 *((new_ptr as *mut u8).add(cur_len + len)) = 0;
629 }
630 new_ptr as *mut xmlChar
631}
632
633#[no_mangle]
641pub unsafe extern "C" fn xmlStrncatNew(
642 str1: *const xmlChar,
643 str2: *const xmlChar,
644 len: c_int,
645) -> *mut xmlChar {
646 let mut result: *mut xmlChar = ptr::null_mut();
647 if !str1.is_null() {
648 result = unsafe { xmlStrdup(str1) };
649 }
650 if !str2.is_null() && len > 0 {
651 result = unsafe { xmlStrncat(result, str2, len) };
652 }
653 result
654}
655
656#[no_mangle]
669pub unsafe extern "C" fn xmlStrcpy(dst: *mut xmlChar, src: *const xmlChar) -> *mut xmlChar {
670 if dst.is_null() || src.is_null() {
671 return dst;
672 }
673 let len = unsafe { xmlStrlen(src) } as usize + 1;
674 unsafe {
675 ptr::copy_nonoverlapping(src as *const u8, dst as *mut u8, len);
676 }
677 dst
678}
679
680#[no_mangle]
688pub unsafe extern "C" fn xmlStrncpy(
689 dst: *mut xmlChar,
690 src: *const xmlChar,
691 len: c_int,
692) -> *mut xmlChar {
693 if dst.is_null() || src.is_null() || len <= 0 {
694 return dst;
695 }
696 let len = len as usize;
697 let src_len = unsafe { xmlStrlen(src) } as usize;
698 let copy_len = if src_len < len { src_len } else { len - 1 };
699 unsafe {
700 ptr::copy_nonoverlapping(src as *const u8, dst as *mut u8, copy_len);
701 *dst.add(copy_len) = 0;
702 }
703 dst
704}
705
706#[no_mangle]
716pub unsafe extern "C" fn xmlStrsub(str: *const xmlChar, start: c_int, len: c_int) -> *mut xmlChar {
717 if str.is_null() || start < 0 || len < 0 {
718 return ptr::null_mut();
719 }
720 let str_len = unsafe { xmlStrlen(str) };
721 if start >= str_len {
722 return unsafe { xmlStrdup(b"\0" as *const u8 as *const xmlChar) };
723 }
724 let actual_len = if start + len > str_len {
725 str_len - start
726 } else {
727 len
728 };
729 unsafe { xmlStrndup(str.add(start as usize), actual_len) }
730}
731
732#[no_mangle]
749pub unsafe extern "C" fn xmlNewDoc(version: *const xmlChar) -> *mut _xmlDoc {
750 crate::xml::tree::new_doc(version)
751}
752
753#[no_mangle]
765pub unsafe extern "C" fn xmlFreeDoc(doc: *mut _xmlDoc) {
766 crate::xml::tree::free_doc(doc);
767}
768
769#[no_mangle]
783pub unsafe extern "C" fn xmlNewNode(ns: *mut _xmlNs, name: *const xmlChar) -> *mut _xmlNode {
784 crate::xml::tree::new_node(ns, name)
785}
786
787#[no_mangle]
800pub unsafe extern "C" fn xmlFreeNode(node: *mut _xmlNode) {
801 crate::xml::tree::free_node(node);
802}
803
804#[no_mangle]
816pub unsafe extern "C" fn xmlUnlinkNode(node: *mut _xmlNode) {
817 crate::xml::tree::unlink_node(node);
818}
819
820#[no_mangle]
834pub unsafe extern "C" fn xmlAddChild(parent: *mut _xmlNode, cur: *mut _xmlNode) -> *mut _xmlNode {
835 crate::xml::tree::add_child(parent, cur)
836}
837
838#[no_mangle]
850pub unsafe extern "C" fn xmlAddSibling(
851 cur: *mut _xmlNode,
852 sibling: *mut _xmlNode,
853) -> *mut _xmlNode {
854 crate::xml::tree::add_sibling(cur, sibling)
855}
856
857#[no_mangle]
876pub unsafe extern "C" fn xmlNewChild(
877 parent: *mut _xmlNode,
878 ns: *mut _xmlNs,
879 name: *const xmlChar,
880 content: *const xmlChar,
881) -> *mut _xmlNode {
882 crate::xml::tree::new_child(parent, ns, name)
883}
884
885#[no_mangle]
900pub unsafe extern "C" fn xmlDocSetRootElement(
901 doc: *mut _xmlDoc,
902 root: *mut _xmlNode,
903) -> *mut _xmlNode {
904 crate::xml::tree::doc_set_root_element(doc, root)
905}
906
907#[no_mangle]
917pub extern "C" fn xmlDocGetRootElement(doc: *const _xmlDoc) -> *mut _xmlNode {
918 crate::xml::tree::doc_get_root_element(doc as *mut _xmlDoc)
919}
920
921#[no_mangle]
934pub unsafe extern "C" fn xmlCopyNode(node: *const _xmlNode, extended: c_int) -> *mut _xmlNode {
935 crate::xml::tree::copy_node(node, extended)
936}
937
938#[no_mangle]
948pub unsafe extern "C" fn xmlCopyDoc(doc: *const _xmlDoc, recursive: c_int) -> *mut _xmlDoc {
949 crate::xml::tree::copy_doc(doc, recursive)
950}
951
952#[no_mangle]
963pub unsafe extern "C" fn xmlNewText(content: *const xmlChar) -> *mut _xmlNode {
964 crate::xml::tree::new_text(content)
965}
966
967#[no_mangle]
975pub unsafe extern "C" fn xmlNewComment(content: *const xmlChar) -> *mut _xmlNode {
976 crate::xml::tree::new_comment(content)
977}
978
979#[no_mangle]
987pub unsafe extern "C" fn xmlNewPI(name: *const xmlChar, content: *const xmlChar) -> *mut _xmlNode {
988 crate::xml::tree::new_pi(name, content)
989}
990
991#[no_mangle]
999pub unsafe extern "C" fn xmlNewCDataBlock(
1000 doc: *mut _xmlDoc,
1001 content: *const xmlChar,
1002 len: c_int,
1003) -> *mut _xmlNode {
1004 crate::xml::tree::new_cdata_block(doc, content, len)
1005}
1006
1007#[no_mangle]
1021pub unsafe extern "C" fn xmlNewNs(
1022 node: *mut _xmlNode,
1023 href: *const xmlChar,
1024 prefix: *const xmlChar,
1025) -> *mut _xmlNs {
1026 crate::xml::tree::new_ns(node, href, prefix)
1027}
1028
1029#[no_mangle]
1037pub unsafe extern "C" fn xmlSetNs(node: *mut _xmlNode, ns: *mut _xmlNs) {
1038 crate::xml::tree::set_ns(node, ns);
1039}
1040
1041#[no_mangle]
1049pub unsafe extern "C" fn xmlGetNsList(
1050 doc: *mut _xmlDoc,
1051 node: *const _xmlNode,
1052) -> *mut *mut _xmlNs {
1053 crate::xml::tree::get_ns_list(doc, node as *mut _xmlNode)
1054}
1055
1056#[no_mangle]
1064pub unsafe extern "C" fn xmlSearchNs(
1065 doc: *mut _xmlDoc,
1066 node: *mut _xmlNode,
1067 nameSpace: *const xmlChar,
1068) -> *mut _xmlNs {
1069 crate::xml::tree::search_ns(doc, node, nameSpace)
1070}
1071
1072#[no_mangle]
1080pub unsafe extern "C" fn xmlSearchNsByHref(
1081 doc: *mut _xmlDoc,
1082 node: *mut _xmlNode,
1083 href: *const xmlChar,
1084) -> *mut _xmlNs {
1085 crate::xml::tree::search_ns_by_href(doc, node, href)
1086}
1087
1088#[no_mangle]
1105pub unsafe extern "C" fn xmlSetProp(
1106 node: *mut _xmlNode,
1107 name: *const xmlChar,
1108 value: *const xmlChar,
1109) -> *mut _xmlAttr {
1110 crate::xml::tree::set_prop(node, name, value)
1111}
1112
1113#[no_mangle]
1123pub unsafe extern "C" fn xmlGetProp(node: *const _xmlNode, name: *const xmlChar) -> *mut xmlChar {
1124 crate::xml::tree::get_prop(node as *mut _xmlNode, name)
1125}
1126
1127#[no_mangle]
1135pub unsafe extern "C" fn xmlGetNsProp(
1136 node: *const _xmlNode,
1137 name: *const xmlChar,
1138 nameSpace: *const xmlChar,
1139) -> *mut xmlChar {
1140 crate::xml::tree::get_ns_prop(node as *mut _xmlNode, name, nameSpace)
1141}
1142
1143#[no_mangle]
1152pub unsafe extern "C" fn xmlSetNsProp(
1153 node: *mut _xmlNode,
1154 ns: *mut _xmlNs,
1155 name: *const xmlChar,
1156 value: *const xmlChar,
1157) -> *mut _xmlAttr {
1158 crate::xml::tree::set_ns_prop(node, ns, name, value)
1159}
1160
1161#[no_mangle]
1171pub unsafe extern "C" fn xmlRemoveProp(attr: *mut _xmlAttr) -> c_int {
1172 crate::xml::tree::remove_prop(attr)
1173}
1174
1175#[no_mangle]
1183pub extern "C" fn xmlGetIntSubset(doc: *const _xmlDoc) -> *mut _xmlDtd {
1184 crate::xml::tree::get_int_subset(doc)
1185}
1186
1187#[no_mangle]
1196pub unsafe extern "C" fn xmlNewDtd(
1197 doc: *mut _xmlDoc,
1198 name: *const xmlChar,
1199 ExternalID: *const xmlChar,
1200 SystemID: *const xmlChar,
1201) -> *mut _xmlDtd {
1202 crate::xml::tree::new_dtd(doc, name, ExternalID, SystemID)
1203}
1204
1205#[no_mangle]
1215pub unsafe extern "C" fn xmlNewEntity(
1216 doc: *mut _xmlDoc,
1217 name: *const xmlChar,
1218 type_: c_int,
1219 ExternalID: *const xmlChar,
1220 SystemID: *const xmlChar,
1221 content: *const xmlChar,
1222) -> *mut _xmlEntity {
1223 crate::xml::tree::new_entity(doc, name, type_, ExternalID, SystemID, content)
1224}
1225
1226#[no_mangle]
1234pub unsafe extern "C" fn xmlGetDocEntity(
1235 doc: *const _xmlDoc,
1236 name: *const xmlChar,
1237) -> *mut _xmlEntity {
1238 crate::xml::tree::get_doc_entity(doc, name)
1239}
1240
1241#[no_mangle]
1249pub unsafe extern "C" fn xmlGetParameterEntity(
1250 doc: *const _xmlDoc,
1251 name: *const xmlChar,
1252) -> *mut _xmlEntity {
1253 crate::xml::tree::get_parameter_entity(doc, name)
1254}
1255
1256#[no_mangle]
1264pub extern "C" fn xmlGetLineNo(node: *const _xmlNode) -> c_int {
1265 crate::xml::tree::get_line_no(node)
1266}
1267
1268#[no_mangle]
1280pub unsafe extern "C" fn xmlNodeDump(
1281 buf: *mut _xmlBuffer,
1282 doc: *mut _xmlDoc,
1283 cur: *mut _xmlNode,
1284 level: c_int,
1285 format: c_int,
1286) -> c_int {
1287 if buf.is_null() || cur.is_null() {
1288 return -1;
1289 }
1290 crate::xml::tree::xmlNodeDump(buf, doc, cur, level, format)
1291}
1292
1293#[no_mangle]
1301pub unsafe extern "C" fn xmlDocDump(fp: *mut c_void, doc: *mut _xmlDoc) -> c_int {
1302 if fp.is_null() || doc.is_null() {
1303 return -1;
1304 }
1305 crate::xml::tree::xmlDocDump(fp, doc)
1306}
1307
1308#[no_mangle]
1316pub unsafe extern "C" fn xmlDocDumpFormatMemory(
1317 doc: *mut _xmlDoc,
1318 mem: *mut *mut xmlChar,
1319 size: *mut c_int,
1320 format: c_int,
1321) {
1322 if doc.is_null() || mem.is_null() || size.is_null() {
1323 return;
1324 }
1325 crate::xml::tree::xmlDocDumpFormatMemory(doc, mem, size, format)
1326}
1327
1328#[no_mangle]
1336pub unsafe extern "C" fn xmlDocDumpMemory(
1337 doc: *mut _xmlDoc,
1338 mem: *mut *mut xmlChar,
1339 size: *mut c_int,
1340) {
1341 if doc.is_null() || mem.is_null() || size.is_null() {
1342 return;
1343 }
1344 crate::xml::tree::xmlDocDumpMemory(doc, mem, size)
1345}
1346
1347#[no_mangle]
1355pub unsafe extern "C" fn xmlSaveFile(filename: *const c_char, cur: *mut _xmlDoc) -> c_int {
1356 if filename.is_null() || cur.is_null() {
1357 return -1;
1358 }
1359 crate::xml::tree::xmlSaveFile(filename, cur)
1360}
1361
1362#[no_mangle]
1370pub unsafe extern "C" fn xmlSaveFileEnc(
1371 filename: *const c_char,
1372 cur: *mut _xmlDoc,
1373 encoding: *const c_char,
1374) -> c_int {
1375 if filename.is_null() || cur.is_null() {
1376 return -1;
1377 }
1378 crate::xml::tree::xmlSaveFileEnc(filename, cur, encoding)
1379}
1380
1381#[no_mangle]
1389pub unsafe extern "C" fn xmlSaveFormatFile(
1390 filename: *const c_char,
1391 cur: *mut _xmlDoc,
1392 format: c_int,
1393) -> c_int {
1394 if filename.is_null() || cur.is_null() {
1395 return -1;
1396 }
1397 crate::xml::tree::xmlSaveFormatFile(filename, cur, format)
1398}
1399
1400#[no_mangle]
1408pub unsafe extern "C" fn xmlSaveFormatFileEnc(
1409 filename: *const c_char,
1410 cur: *mut _xmlDoc,
1411 encoding: *const c_char,
1412 format: c_int,
1413) -> c_int {
1414 if filename.is_null() || cur.is_null() {
1415 return -1;
1416 }
1417 crate::xml::tree::xmlSaveFormatFileEnc(filename, cur, encoding, format)
1418}
1419
1420#[no_mangle]
1435pub unsafe extern "C" fn xmlReadDoc(
1436 cur: *const xmlChar,
1437 URL: *const c_char,
1438 encoding: *const c_char,
1439 options: c_int,
1440) -> *mut _xmlDoc {
1441 if cur.is_null() {
1443 return ptr::null_mut();
1444 }
1445 let ctxt = crate::xml::parser::helpers::create_parser_ctxt();
1446 if ctxt.is_null() {
1447 return ptr::null_mut();
1448 }
1449 let len = crate::xml::string::xml_strlen(cur);
1450 let input = crate::xml::parser::helpers::input_from_memory(cur as *const c_char, len as c_int);
1451 crate::xml::parser::helpers::setup_parser_input(ctxt, input);
1452 (*ctxt).options = options;
1453 if crate::xml::parser::helpers::parse_document(ctxt) != 0 {
1454 let doc = (*ctxt).myDoc;
1455 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1456 return doc;
1457 }
1458 let doc = (*ctxt).myDoc;
1459 if !doc.is_null() {
1460 (*doc).URL = crate::xml::string::xml_strdup(URL as *const xmlChar);
1461 }
1462 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1463 doc
1464}
1465
1466#[no_mangle]
1474pub unsafe extern "C" fn xmlReadFile(
1475 URL: *const c_char,
1476 encoding: *const c_char,
1477 options: c_int,
1478) -> *mut _xmlDoc {
1479 if URL.is_null() {
1481 return ptr::null_mut();
1482 }
1483 let ctxt = crate::xml::parser::helpers::create_parser_ctxt();
1484 if ctxt.is_null() {
1485 return ptr::null_mut();
1486 }
1487 let input = match crate::xml::parser::helpers::input_from_file(URL) {
1488 Ok(input) => input,
1489 Err(_) => {
1490 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1491 return ptr::null_mut();
1492 }
1493 };
1494 crate::xml::parser::helpers::setup_parser_input(ctxt, input);
1495 (*ctxt).options = options;
1496 if crate::xml::parser::helpers::parse_document(ctxt) != 0 {
1497 let doc = (*ctxt).myDoc;
1498 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1499 return doc;
1500 }
1501 let doc = (*ctxt).myDoc;
1502 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1503 doc
1504}
1505
1506#[no_mangle]
1515pub unsafe extern "C" fn xmlReadMemory(
1516 buffer: *const c_char,
1517 size: c_int,
1518 URL: *const c_char,
1519 encoding: *const c_char,
1520 options: c_int,
1521) -> *mut _xmlDoc {
1522 if buffer.is_null() || size <= 0 {
1524 return ptr::null_mut();
1525 }
1526 let ctxt = crate::xml::parser::helpers::create_parser_ctxt();
1527 if ctxt.is_null() {
1528 return ptr::null_mut();
1529 }
1530 let input = crate::xml::parser::helpers::input_from_memory(buffer, size);
1531 crate::xml::parser::helpers::setup_parser_input(ctxt, input);
1532 (*ctxt).options = options;
1533 if crate::xml::parser::helpers::parse_document(ctxt) != 0 {
1534 let doc = (*ctxt).myDoc;
1535 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1536 return doc;
1537 }
1538 let doc = (*ctxt).myDoc;
1539 if !doc.is_null() && !URL.is_null() {
1540 (*doc).URL = crate::xml::string::xml_strdup(URL as *const xmlChar);
1541 }
1542 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1543 doc
1544}
1545
1546#[no_mangle]
1554pub unsafe extern "C" fn xmlReadFd(
1555 fd: c_int,
1556 URL: *const c_char,
1557 encoding: *const c_char,
1558 options: c_int,
1559) -> *mut _xmlDoc {
1560 let ctxt = crate::xml::parser::helpers::create_parser_ctxt();
1562 if ctxt.is_null() {
1563 return ptr::null_mut();
1564 }
1565 let mut buf = Vec::new();
1567 let mut tmp = [0u8; 4096];
1568 loop {
1569 let n = libc::read(fd, tmp.as_mut_ptr() as *mut c_void, tmp.len());
1570 if n <= 0 {
1571 break;
1572 }
1573 buf.extend_from_slice(&tmp[..n as usize]);
1574 }
1575 let input = crate::xml::parser::helpers::input_from_memory(
1576 buf.as_ptr() as *const c_char,
1577 buf.len() as c_int,
1578 );
1579 crate::xml::parser::helpers::setup_parser_input(ctxt, input);
1580 (*ctxt).options = options;
1581 if crate::xml::parser::helpers::parse_document(ctxt) != 0 {
1582 let doc = (*ctxt).myDoc;
1583 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1584 return doc;
1585 }
1586 let doc = (*ctxt).myDoc;
1587 if !doc.is_null() && !URL.is_null() {
1588 (*doc).URL = crate::xml::string::xml_strdup(URL as *const xmlChar);
1589 }
1590 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1591 doc
1592}
1593
1594#[no_mangle]
1603pub unsafe extern "C" fn xmlReadIO(
1604 ioread: Option<xmlInputReadCallback>,
1605 ioclose: Option<xmlInputCloseCallback>,
1606 ioctx: *mut c_void,
1607 URL: *const c_char,
1608 encoding: *const c_char,
1609 options: c_int,
1610) -> *mut _xmlDoc {
1611 let ctxt = crate::xml::parser::helpers::create_parser_ctxt();
1613 if ctxt.is_null() {
1614 return ptr::null_mut();
1615 }
1616 let input = crate::xml::parser::helpers::input_from_io(ioread, ioclose, ioctx);
1617 crate::xml::parser::helpers::setup_parser_input(ctxt, input);
1618 (*ctxt).options = options;
1619 if crate::xml::parser::helpers::parse_document(ctxt) != 0 {
1620 let doc = (*ctxt).myDoc;
1621 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1622 return doc;
1623 }
1624 let doc = (*ctxt).myDoc;
1625 if !doc.is_null() && !URL.is_null() {
1626 (*doc).URL = crate::xml::string::xml_strdup(URL as *const xmlChar);
1627 }
1628 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1629 doc
1630}
1631
1632#[no_mangle]
1640pub unsafe extern "C" fn xmlSAXParseDoc(
1641 sax: *mut _xmlSAXHandler,
1642 cur: *const xmlChar,
1643 recovery: c_int,
1644) -> *mut _xmlDoc {
1645 if cur.is_null() {
1647 return ptr::null_mut();
1648 }
1649 let ctxt = crate::xml::parser::helpers::create_parser_ctxt();
1650 if ctxt.is_null() {
1651 return ptr::null_mut();
1652 }
1653 if !sax.is_null() {
1654 (*ctxt).sax = sax;
1655 (*ctxt).userData = (*ctxt).sax as *mut c_void;
1656 }
1657 if recovery != 0 {
1658 (*ctxt).recovery = 1;
1659 (*ctxt).options |= 1; }
1661 let len = crate::xml::string::xml_strlen(cur);
1662 let input = crate::xml::parser::helpers::input_from_memory(cur as *const c_char, len as c_int);
1663 crate::xml::parser::helpers::setup_parser_input(ctxt, input);
1664 crate::xml::parser::helpers::parse_document(ctxt);
1665 let doc = (*ctxt).myDoc;
1666 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1667 doc
1668}
1669
1670#[no_mangle]
1678pub unsafe extern "C" fn xmlSAXParseFile(
1679 sax: *mut _xmlSAXHandler,
1680 filename: *const c_char,
1681 recovery: c_int,
1682) -> *mut _xmlDoc {
1683 if filename.is_null() {
1685 return ptr::null_mut();
1686 }
1687 let ctxt = crate::xml::parser::helpers::create_parser_ctxt();
1688 if ctxt.is_null() {
1689 return ptr::null_mut();
1690 }
1691 if !sax.is_null() {
1692 (*ctxt).sax = sax;
1693 (*ctxt).userData = (*ctxt).sax as *mut c_void;
1694 }
1695 if recovery != 0 {
1696 (*ctxt).recovery = 1;
1697 (*ctxt).options |= 1;
1698 }
1699 let input = match crate::xml::parser::helpers::input_from_file(filename) {
1700 Ok(input) => input,
1701 Err(_) => {
1702 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1703 return ptr::null_mut();
1704 }
1705 };
1706 crate::xml::parser::helpers::setup_parser_input(ctxt, input);
1707 crate::xml::parser::helpers::parse_document(ctxt);
1708 let doc = (*ctxt).myDoc;
1709 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1710 doc
1711}
1712
1713#[no_mangle]
1722pub unsafe extern "C" fn xmlSAXParseMemory(
1723 sax: *mut _xmlSAXHandler,
1724 buffer: *const c_char,
1725 size: c_int,
1726 recovery: c_int,
1727) -> *mut _xmlDoc {
1728 if buffer.is_null() || size <= 0 {
1730 return ptr::null_mut();
1731 }
1732 let ctxt = crate::xml::parser::helpers::create_parser_ctxt();
1733 if ctxt.is_null() {
1734 return ptr::null_mut();
1735 }
1736 if !sax.is_null() {
1737 (*ctxt).sax = sax;
1738 (*ctxt).userData = (*ctxt).sax as *mut c_void;
1739 }
1740 if recovery != 0 {
1741 (*ctxt).recovery = 1;
1742 (*ctxt).options |= 1;
1743 }
1744 let input = crate::xml::parser::helpers::input_from_memory(buffer, size);
1745 crate::xml::parser::helpers::setup_parser_input(ctxt, input);
1746 crate::xml::parser::helpers::parse_document(ctxt);
1747 let doc = (*ctxt).myDoc;
1748 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1749 doc
1750}
1751
1752#[no_mangle]
1761pub unsafe extern "C" fn xmlSAXUserParseFile(
1762 sax: *mut _xmlSAXHandler,
1763 user_data: *mut c_void,
1764 filename: *const c_char,
1765) -> c_int {
1766 if filename.is_null() {
1768 return -1;
1769 }
1770 let ctxt = crate::xml::parser::helpers::create_parser_ctxt();
1771 if ctxt.is_null() {
1772 return -1;
1773 }
1774 if !sax.is_null() {
1775 (*ctxt).sax = sax;
1776 }
1777 (*ctxt).userData = if !user_data.is_null() {
1778 user_data
1779 } else {
1780 ctxt as *mut c_void
1781 };
1782 let input = match crate::xml::parser::helpers::input_from_file(filename) {
1783 Ok(input) => input,
1784 Err(_) => {
1785 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1786 return -1;
1787 }
1788 };
1789 crate::xml::parser::helpers::setup_parser_input(ctxt, input);
1790 let ret = crate::xml::parser::helpers::parse_document(ctxt);
1791 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1792 ret
1793}
1794
1795#[no_mangle]
1804pub unsafe extern "C" fn xmlSAXUserParseMemory(
1805 sax: *mut _xmlSAXHandler,
1806 user_data: *mut c_void,
1807 buffer: *const c_char,
1808 size: c_int,
1809) -> c_int {
1810 if buffer.is_null() || size <= 0 {
1812 return -1;
1813 }
1814 let ctxt = crate::xml::parser::helpers::create_parser_ctxt();
1815 if ctxt.is_null() {
1816 return -1;
1817 }
1818 if !sax.is_null() {
1819 (*ctxt).sax = sax;
1820 }
1821 (*ctxt).userData = if !user_data.is_null() {
1822 user_data
1823 } else {
1824 ctxt as *mut c_void
1825 };
1826 let input = crate::xml::parser::helpers::input_from_memory(buffer, size);
1827 crate::xml::parser::helpers::setup_parser_input(ctxt, input);
1828 let ret = crate::xml::parser::helpers::parse_document(ctxt);
1829 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1830 ret
1831}
1832
1833#[no_mangle]
1841pub unsafe extern "C" fn xmlParseDoc(cur: *const xmlChar) -> *mut _xmlDoc {
1842 if cur.is_null() {
1844 return ptr::null_mut();
1845 }
1846 xmlReadDoc(cur, ptr::null(), ptr::null(), 0)
1847}
1848
1849#[no_mangle]
1857pub unsafe extern "C" fn xmlParseFile(filename: *const c_char) -> *mut _xmlDoc {
1858 if filename.is_null() {
1860 return ptr::null_mut();
1861 }
1862 xmlReadFile(filename, ptr::null(), 0)
1863}
1864
1865#[no_mangle]
1873pub unsafe extern "C" fn xmlParseMemory(buffer: *const c_char, size: c_int) -> *mut _xmlDoc {
1874 if buffer.is_null() || size <= 0 {
1876 return ptr::null_mut();
1877 }
1878 xmlReadMemory(buffer, size, ptr::null(), ptr::null(), 0)
1879}
1880
1881#[no_mangle]
1889pub unsafe extern "C" fn xmlCreateFileParserCtxt(filename: *const c_char) -> *mut _xmlParserCtxt {
1890 if filename.is_null() {
1892 return ptr::null_mut();
1893 }
1894 let ctxt = crate::xml::parser::helpers::create_parser_ctxt();
1895 if ctxt.is_null() {
1896 return ptr::null_mut();
1897 }
1898 let input = match crate::xml::parser::helpers::input_from_file(filename) {
1899 Ok(input) => input,
1900 Err(_) => {
1901 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1902 return ptr::null_mut();
1903 }
1904 };
1905 crate::xml::parser::helpers::setup_parser_input(ctxt, input);
1906 ctxt
1907}
1908
1909#[no_mangle]
1917pub unsafe extern "C" fn xmlCreateDocParserCtxt(cur: *const xmlChar) -> *mut _xmlParserCtxt {
1918 if cur.is_null() {
1920 return ptr::null_mut();
1921 }
1922 let ctxt = crate::xml::parser::helpers::create_parser_ctxt();
1923 if ctxt.is_null() {
1924 return ptr::null_mut();
1925 }
1926 let len = crate::xml::string::xml_strlen(cur);
1927 let input = crate::xml::parser::helpers::input_from_memory(cur as *const c_char, len as c_int);
1928 crate::xml::parser::helpers::setup_parser_input(ctxt, input);
1929 ctxt
1930}
1931
1932#[no_mangle]
1940pub unsafe extern "C" fn xmlParseDocument(ctxt: *mut _xmlParserCtxt) -> c_int {
1941 if ctxt.is_null() {
1943 return -1;
1944 }
1945 crate::xml::parser::helpers::parse_document(ctxt)
1946}
1947
1948#[no_mangle]
1956pub unsafe extern "C" fn xmlFreeParserCtxt(ctxt: *mut _xmlParserCtxt) {
1957 if ctxt.is_null() {
1958 return;
1959 }
1960 crate::xml::parser::helpers::free_parser_ctxt(ctxt);
1961}
1962
1963#[no_mangle]
1971pub unsafe extern "C" fn xmlCtxtUseOptions(ctxt: *mut _xmlParserCtxt, options: c_int) -> c_int {
1972 if ctxt.is_null() {
1973 return -1;
1974 }
1975 unsafe {
1977 (*ctxt).options = options;
1978 }
1979 0
1980}
1981
1982#[no_mangle]
1991pub unsafe extern "C" fn xmlParseChunk(
1992 ctxt: *mut _xmlParserCtxt,
1993 chunk: *const c_char,
1994 size: c_int,
1995 terminate: c_int,
1996) -> c_int {
1997 if ctxt.is_null() {
2000 return -1;
2001 }
2002 crate::xml::parser::helpers::parse_chunk(ctxt, chunk, size, terminate)
2003}
2004
2005#[no_mangle]
2013pub unsafe extern "C" fn xmlParserInputBufferCreateMem(
2014 buffer: *const c_char,
2015 size: c_int,
2016 enc: c_int,
2017) -> *mut _xmlParserInputBuffer {
2018 if buffer.is_null() || size <= 0 {
2020 return ptr::null_mut();
2021 }
2022 crate::xml::parser::helpers::alloc_parser_input_buffer()
2023}
2024
2025#[no_mangle]
2033pub unsafe extern "C" fn xmlParserInputBufferCreateFilename(
2034 URI: *const c_char,
2035 enc: c_int,
2036) -> *mut _xmlParserInputBuffer {
2037 if URI.is_null() {
2039 return ptr::null_mut();
2040 }
2041 crate::xml::parser::helpers::alloc_parser_input_buffer()
2042}
2043
2044#[no_mangle]
2054pub unsafe extern "C" fn xmlParserInputBufferCreateIO(
2055 ioread: Option<xmlInputReadCallback>,
2056 ioclose: Option<xmlInputCloseCallback>,
2057 ioctx: *mut c_void,
2058 enc: c_int,
2059) -> *mut _xmlParserInputBuffer {
2060 let buf = crate::xml::parser::helpers::alloc_parser_input_buffer();
2062 if !buf.is_null() {
2063 (*buf).readcallback = ioread;
2064 (*buf).closecallback = ioclose;
2065 (*buf).context = ioctx;
2066 }
2067 buf
2068}
2069
2070#[no_mangle]
2078pub unsafe extern "C" fn xmlFreeParserInputBuffer(buf: *mut _xmlParserInputBuffer) {
2079 if buf.is_null() {
2080 return;
2081 }
2082 crate::xml::parser::helpers::free_parser_input_buffer(buf);
2083}
2084
2085#[no_mangle]
2093pub unsafe extern "C" fn xmlNewInputFromFile(
2094 ctxt: *mut _xmlParserCtxt,
2095 filename: *const c_char,
2096) -> *mut _xmlParserInput {
2097 if filename.is_null() {
2102 return ptr::null_mut();
2103 }
2104 crate::xml::parser::helpers::alloc_parser_input_buffer() as *mut _xmlParserInput
2105}
2106
2107#[no_mangle]
2115pub unsafe extern "C" fn xmlFreeInputStream(input: *mut _xmlParserInput) {
2116 if input.is_null() {
2117 return;
2118 }
2119 crate::xml::parser::helpers::free_parser_input(input);
2120}
2121
2122#[no_mangle]
2136pub unsafe extern "C" fn xmlOutputBufferCreateFilename(
2137 URI: *const c_char,
2138 encoder: *mut c_void,
2139 compression: c_int,
2140) -> *mut _xmlOutputBuffer {
2141 let _ = compression;
2142 if URI.is_null() {
2143 return ptr::null_mut();
2144 }
2145 crate::xml::io::output_buffer_create_filename(
2146 URI,
2147 encoder as *mut crate::abi::structs::_xmlCharEncodingHandler,
2148 0,
2149 )
2150}
2151
2152#[no_mangle]
2161pub unsafe extern "C" fn xmlOutputBufferCreateFd(
2162 fd: c_int,
2163 encoder: *mut c_void,
2164) -> *mut _xmlOutputBuffer {
2165 if fd < 0 {
2166 return ptr::null_mut();
2167 }
2168 crate::xml::io::output_buffer_create_fd(
2169 fd,
2170 encoder as *mut crate::abi::structs::_xmlCharEncodingHandler,
2171 )
2172}
2173
2174#[no_mangle]
2184pub unsafe extern "C" fn xmlOutputBufferCreateIO(
2185 iowrite: Option<xmlOutputWriteCallback>,
2186 ioclose: Option<xmlOutputCloseCallback>,
2187 ioctx: *mut c_void,
2188 encoder: *mut c_void,
2189) -> *mut _xmlOutputBuffer {
2190 crate::xml::io::output_buffer_create_io(
2191 iowrite,
2192 ioclose,
2193 ioctx,
2194 encoder as *mut crate::abi::structs::_xmlCharEncodingHandler,
2195 )
2196}
2197
2198#[no_mangle]
2206pub unsafe extern "C" fn xmlOutputBufferClose(out: *mut _xmlOutputBuffer) -> c_int {
2207 if out.is_null() {
2208 return -1;
2209 }
2210 crate::xml::io::output_buffer_close(out)
2211}
2212
2213#[no_mangle]
2221pub unsafe extern "C" fn xmlOutputBufferFlush(out: *mut _xmlOutputBuffer) -> c_int {
2222 if out.is_null() {
2223 return -1;
2224 }
2225 crate::xml::io::output_buffer_flush(out)
2226}
2227
2228#[no_mangle]
2236pub unsafe extern "C" fn xmlOutputBufferWrite(
2237 out: *mut _xmlOutputBuffer,
2238 len: c_int,
2239 data: *const c_char,
2240) -> c_int {
2241 if out.is_null() || data.is_null() || len <= 0 {
2242 return -1;
2243 }
2244 crate::xml::io::output_buffer_write(out, len, data)
2245}
2246
2247#[no_mangle]
2255pub unsafe extern "C" fn xmlOutputBufferWriteString(
2256 out: *mut _xmlOutputBuffer,
2257 str: *const c_char,
2258) -> c_int {
2259 if str.is_null() {
2260 return 0;
2261 }
2262 unsafe { xmlOutputBufferWrite(out, xmlStrlen(str as *const xmlChar), str) }
2263}
2264
2265#[no_mangle]
2277pub extern "C" fn xmlDictCreate() -> *mut c_void {
2278 ptr::null_mut()
2280}
2281
2282#[no_mangle]
2290pub extern "C" fn xmlDictCreateSub(_sub: *mut c_void) -> *mut c_void {
2291 ptr::null_mut()
2293}
2294
2295#[no_mangle]
2307pub unsafe extern "C" fn xmlDictLookup(
2308 dict: *mut c_void,
2309 name: *const xmlChar,
2310 len: c_int,
2311) -> *const xmlChar {
2312 name
2314}
2315
2316#[no_mangle]
2324pub unsafe extern "C" fn xmlDictExists(
2325 dict: *mut c_void,
2326 name: *const xmlChar,
2327 len: c_int,
2328) -> *const xmlChar {
2329 ptr::null()
2331}
2332
2333#[no_mangle]
2341pub extern "C" fn xmlDictSize(dict: *const c_void) -> c_uint {
2342 0
2344}
2345
2346#[no_mangle]
2354pub extern "C" fn xmlDictFree(_dict: *mut c_void) {
2355 }
2357
2358#[no_mangle]
2366pub extern "C" fn xmlDictSetLimit(_dict: *mut c_void, _limit: c_uint) -> c_uint {
2367 0
2369}
2370
2371#[no_mangle]
2379pub extern "C" fn xmlDictGetUsage(_dict: *const c_void) -> c_uint {
2380 0
2382}
2383
2384#[no_mangle]
2396pub extern "C" fn xmlHashCreate(_size: c_int) -> *mut c_void {
2397 ptr::null_mut()
2399}
2400
2401#[no_mangle]
2409pub extern "C" fn xmlHashCreateDict(_size: c_int, _dict: *mut c_void) -> *mut c_void {
2410 ptr::null_mut()
2412}
2413
2414#[no_mangle]
2422pub extern "C" fn xmlHashFree(
2423 _table: *mut c_void,
2424 _f: Option<unsafe extern "C" fn(*mut c_void, *mut xmlChar)>,
2425) {
2426 }
2428
2429#[no_mangle]
2437pub unsafe extern "C" fn xmlHashAddEntry(
2438 _table: *mut c_void,
2439 _name: *const xmlChar,
2440 _userdata: *mut c_void,
2441) -> c_int {
2442 0
2444}
2445
2446#[no_mangle]
2455pub unsafe extern "C" fn xmlHashAddEntry2(
2456 _table: *mut c_void,
2457 _name: *const xmlChar,
2458 _name2: *const xmlChar,
2459 _userdata: *mut c_void,
2460) -> c_int {
2461 0
2463}
2464
2465#[no_mangle]
2474pub unsafe extern "C" fn xmlHashAddEntry3(
2475 _table: *mut c_void,
2476 _name: *const xmlChar,
2477 _name2: *const xmlChar,
2478 _name3: *const xmlChar,
2479 _userdata: *mut c_void,
2480) -> c_int {
2481 0
2483}
2484
2485#[no_mangle]
2494pub unsafe extern "C" fn xmlHashUpdateEntry(
2495 _table: *mut c_void,
2496 _name: *const xmlChar,
2497 _userdata: *mut c_void,
2498 _f: Option<unsafe extern "C" fn(*mut c_void, *mut xmlChar)>,
2499) -> c_int {
2500 0
2502}
2503
2504#[no_mangle]
2506pub unsafe extern "C" fn xmlHashUpdateEntry2(
2507 _table: *mut c_void,
2508 _name: *const xmlChar,
2509 _name2: *const xmlChar,
2510 _userdata: *mut c_void,
2511 _f: Option<unsafe extern "C" fn(*mut c_void, *mut xmlChar)>,
2512) -> c_int {
2513 0
2515}
2516
2517#[no_mangle]
2519pub unsafe extern "C" fn xmlHashUpdateEntry3(
2520 _table: *mut c_void,
2521 _name: *const xmlChar,
2522 _name2: *const xmlChar,
2523 _name3: *const xmlChar,
2524 _userdata: *mut c_void,
2525 _f: Option<unsafe extern "C" fn(*mut c_void, *mut xmlChar)>,
2526) -> c_int {
2527 0
2529}
2530
2531#[no_mangle]
2539pub unsafe extern "C" fn xmlHashLookup(_table: *mut c_void, _name: *const xmlChar) -> *mut c_void {
2540 ptr::null_mut()
2542}
2543
2544#[no_mangle]
2546pub unsafe extern "C" fn xmlHashLookup2(
2547 _table: *mut c_void,
2548 _name: *const xmlChar,
2549 _name2: *const xmlChar,
2550) -> *mut c_void {
2551 ptr::null_mut()
2553}
2554
2555#[no_mangle]
2557pub unsafe extern "C" fn xmlHashLookup3(
2558 _table: *mut c_void,
2559 _name: *const xmlChar,
2560 _name2: *const xmlChar,
2561 _name3: *const xmlChar,
2562) -> *mut c_void {
2563 ptr::null_mut()
2565}
2566
2567#[no_mangle]
2575pub extern "C" fn xmlHashSize(_table: *mut c_void) -> c_int {
2576 0
2578}
2579
2580#[no_mangle]
2589pub unsafe extern "C" fn xmlHashRemoveEntry(
2590 _table: *mut c_void,
2591 _name: *const xmlChar,
2592 _f: Option<unsafe extern "C" fn(*mut c_void, *mut xmlChar)>,
2593) -> c_int {
2594 0
2596}
2597
2598#[no_mangle]
2600pub unsafe extern "C" fn xmlHashRemoveEntry2(
2601 _table: *mut c_void,
2602 _name: *const xmlChar,
2603 _name2: *const xmlChar,
2604 _f: Option<unsafe extern "C" fn(*mut c_void, *mut xmlChar)>,
2605) -> c_int {
2606 0
2608}
2609
2610#[no_mangle]
2612pub unsafe extern "C" fn xmlHashRemoveEntry3(
2613 _table: *mut c_void,
2614 _name: *const xmlChar,
2615 _name2: *const xmlChar,
2616 _name3: *const xmlChar,
2617 _f: Option<unsafe extern "C" fn(*mut c_void, *mut xmlChar)>,
2618) -> c_int {
2619 0
2621}
2622
2623#[no_mangle]
2631pub extern "C" fn xmlHashScan(
2632 _table: *mut c_void,
2633 _f: Option<unsafe extern "C" fn(*mut c_void, *const xmlChar, *mut c_void)>,
2634 _data: *mut c_void,
2635) {
2636 }
2638
2639#[no_mangle]
2641pub extern "C" fn xmlHashScanFull(
2642 _table: *mut c_void,
2643 _f: Option<unsafe extern "C" fn(*mut c_void, *const xmlChar, *mut c_void, *mut c_void)>,
2644 _data: *mut c_void,
2645) {
2646 }
2648
2649#[no_mangle]
2657pub extern "C" fn xmlHashCopy(
2658 _table: *mut c_void,
2659 _f: Option<unsafe extern "C" fn(*mut c_void, *const xmlChar) -> *mut c_void>,
2660) -> *mut c_void {
2661 ptr::null_mut()
2663}
2664
2665#[no_mangle]
2678pub extern "C" fn xmlListCreate(
2679 _deallocator: Option<unsafe extern "C" fn(*mut c_void)>,
2680 _compare: Option<unsafe extern "C" fn(*const c_void, *const c_void) -> c_int>,
2681) -> *mut c_void {
2682 ptr::null_mut()
2684}
2685
2686#[no_mangle]
2694pub extern "C" fn xmlListDelete(_list: *mut c_void) {
2695 }
2697
2698#[no_mangle]
2706pub extern "C" fn xmlListSearch(_list: *mut c_void, _data: *mut c_void) -> *mut c_void {
2707 ptr::null_mut()
2709}
2710
2711#[no_mangle]
2719pub extern "C" fn xmlListWalk(
2720 _list: *mut c_void,
2721 _walker: Option<unsafe extern "C" fn(*mut c_void, *mut c_void) -> c_int>,
2722 _data: *mut c_void,
2723) {
2724 }
2726
2727#[no_mangle]
2735pub extern "C" fn xmlListPushBack(_list: *mut c_void, _data: *mut c_void) -> c_int {
2736 0
2738}
2739
2740#[no_mangle]
2748pub extern "C" fn xmlListPushFront(_list: *mut c_void, _data: *mut c_void) -> c_int {
2749 0
2751}
2752
2753#[no_mangle]
2755pub extern "C" fn xmlListPopBack(_list: *mut c_void) {
2756 }
2758
2759#[no_mangle]
2761pub extern "C" fn xmlListPopFront(_list: *mut c_void) {
2762 }
2764
2765#[no_mangle]
2773pub extern "C" fn xmlListInsert(_list: *mut c_void, _data: *mut c_void) -> c_int {
2774 0
2776}
2777
2778#[no_mangle]
2780pub extern "C" fn xmlListAppend(_list: *mut c_void, _data: *mut c_void) -> c_int {
2781 0
2783}
2784
2785#[no_mangle]
2787pub extern "C" fn xmlListRemoveFirst(_list: *mut c_void, _data: *mut c_void) -> c_int {
2788 0
2790}
2791
2792#[no_mangle]
2794pub extern "C" fn xmlListRemoveLast(_list: *mut c_void, _data: *mut c_void) -> c_int {
2795 0
2797}
2798
2799#[no_mangle]
2801pub extern "C" fn xmlListRemoveAll(_list: *mut c_void, _data: *mut c_void) -> c_int {
2802 0
2804}
2805
2806#[no_mangle]
2808pub extern "C" fn xmlListClear(_list: *mut c_void) {
2809 }
2811
2812#[no_mangle]
2820pub extern "C" fn xmlListEmpty(_list: *mut c_void) -> c_int {
2821 1
2823}
2824
2825#[no_mangle]
2833pub extern "C" fn xmlListFront(_list: *mut c_void) -> *mut c_void {
2834 ptr::null_mut()
2836}
2837
2838#[no_mangle]
2846pub extern "C" fn xmlListBack(_list: *mut c_void) -> *mut c_void {
2847 ptr::null_mut()
2849}
2850
2851#[no_mangle]
2859pub extern "C" fn xmlListSize(_list: *mut c_void) -> c_int {
2860 0
2862}
2863
2864#[no_mangle]
2866pub extern "C" fn xmlListSort(_list: *mut c_void) {
2867 }
2869
2870#[no_mangle]
2872pub extern "C" fn xmlListReverse(_list: *mut c_void) {
2873 }
2875
2876#[no_mangle]
2878pub extern "C" fn xmlListReverseSplice(_list: *mut c_void, _list2: *mut c_void) {
2879 }
2881
2882#[no_mangle]
2884pub extern "C" fn xmlListMerge(_list: *mut c_void, _list2: *mut c_void) {
2885 }
2887
2888#[no_mangle]
2900pub extern "C" fn xmlBufferCreate() -> *mut _xmlBuffer {
2901 crate::xml::io::buf_create(-1)
2902}
2903
2904#[no_mangle]
2912pub extern "C" fn xmlBufferCreateSize(size: usize) -> *mut _xmlBuffer {
2913 crate::xml::io::buf_create(size as c_int)
2914}
2915
2916#[no_mangle]
2924pub extern "C" fn xmlBufferCreateStatic(mem: *mut c_void, size: usize) -> *mut _xmlBuffer {
2925 if mem.is_null() || size == 0 {
2926 return ptr::null_mut();
2927 }
2928 crate::xml::io::buf_create_static(mem as *const xmlChar, size as c_int)
2929}
2930
2931#[no_mangle]
2939pub extern "C" fn xmlBufferFree(buf: *mut _xmlBuffer) {
2940 crate::xml::io::buf_free(buf)
2941}
2942
2943#[no_mangle]
2951pub extern "C" fn xmlBufferEmpty(buf: *mut _xmlBuffer) {
2952 if buf.is_null() {
2953 return;
2954 }
2955 unsafe {
2956 if !(*buf).content.is_null() {
2957 *(*buf).content = 0;
2958 }
2959 (*buf).use_ = 0;
2960 }
2961}
2962
2963#[no_mangle]
2971pub extern "C" fn xmlBufferContent(buf: *const _xmlBuffer) -> *mut xmlChar {
2972 crate::xml::io::buf_content(buf as *mut _xmlBuffer)
2973}
2974
2975#[no_mangle]
2983pub extern "C" fn xmlBufferLength(buf: *const _xmlBuffer) -> c_int {
2984 crate::xml::io::buf_length(buf as *mut _xmlBuffer)
2985}
2986
2987#[no_mangle]
2995pub unsafe extern "C" fn xmlBufferAdd(
2996 buf: *mut _xmlBuffer,
2997 str: *const xmlChar,
2998 len: c_int,
2999) -> c_int {
3000 crate::xml::io::buf_add(buf, str, len)
3001}
3002
3003#[no_mangle]
3011pub unsafe extern "C" fn xmlBufferAddHead(
3012 buf: *mut _xmlBuffer,
3013 str: *const xmlChar,
3014 len: c_int,
3015) -> c_int {
3016 crate::xml::io::buf_add_head(buf, str, len)
3017}
3018
3019#[no_mangle]
3027pub unsafe extern "C" fn xmlBufferCat(buf: *mut _xmlBuffer, str: *const xmlChar) -> c_int {
3028 if str.is_null() {
3029 return -1;
3030 }
3031 let len = crate::xml::string::xml_strlen(str) as c_int;
3032 crate::xml::io::buf_add(buf, str, len)
3033}
3034
3035#[no_mangle]
3044pub extern "C" fn xmlBufferSetAllocationScheme(buf: *mut _xmlBuffer, scheme: c_int) {
3045 if buf.is_null() {
3046 return;
3047 }
3048 unsafe {
3049 (*buf).alloc = scheme;
3050 }
3051}
3052
3053#[no_mangle]
3061pub extern "C" fn xmlBufferShrink(buf: *mut _xmlBuffer, len: c_int) -> c_int {
3062 if buf.is_null() || len <= 0 {
3063 return 0;
3064 }
3065 unsafe {
3066 let b = &mut *buf;
3067 let shrink_len = (len as c_uint).min(b.use_);
3068 if shrink_len > 0 {
3069 let remaining = b.use_ - shrink_len;
3070 if remaining > 0 {
3071 core::ptr::copy(
3072 b.content.add(shrink_len as usize),
3073 b.content,
3074 remaining as usize,
3075 );
3076 }
3077 *b.content.add(remaining as usize) = 0;
3078 b.use_ = remaining;
3079 }
3080 }
3081 len
3082}
3083
3084#[no_mangle]
3092pub extern "C" fn xmlBufferGrow(buf: *mut _xmlBuffer, len: c_int) -> c_int {
3093 if buf.is_null() || len <= 0 {
3094 return 0;
3095 }
3096 let cur_use = unsafe { (*buf).use_ };
3097 let new_size = cur_use + len as c_uint + 1;
3098 crate::xml::io::buf_grow(buf, new_size)
3099}
3100
3101#[no_mangle]
3109pub extern "C" fn xmlBufferReserve(buf: *mut _xmlBuffer, len: c_int) -> c_int {
3110 xmlBufferGrow(buf, len)
3111}
3112
3113#[no_mangle]
3121pub extern "C" fn xmlBufferDetach(buf: *mut _xmlBuffer) -> *mut xmlChar {
3122 if buf.is_null() {
3123 return ptr::null_mut();
3124 }
3125 unsafe {
3126 let content = (*buf).content;
3127 (*buf).content = ptr::null_mut();
3128 (*buf).use_ = 0;
3129 (*buf).size = 0;
3130 content
3131 }
3132}
3133
3134#[no_mangle]
3146pub extern "C" fn xmlGetCharEncoding(name: *const c_char) -> c_int {
3147 if name.is_null() {
3148 return 0; }
3150 let name_bytes = unsafe {
3151 let len = libc::strlen(name);
3152 core::slice::from_raw_parts(name as *const u8, len)
3153 };
3154 crate::xml::encoding::encoding_from_name(name_bytes) as c_int
3155}
3156
3157#[no_mangle]
3165pub extern "C" fn xmlFindCharEncodingHandler(name: *const c_char) -> *mut c_void {
3166 if name.is_null() {
3167 return ptr::null_mut();
3168 }
3169 crate::xml::encoding::find_encoding_handler(name as *const xmlChar) as *mut c_void
3170}
3171
3172#[no_mangle]
3180pub extern "C" fn xmlCharEncCloseFunc(handler: *mut c_void) -> c_int {
3181 if handler.is_null() {
3182 return -1;
3183 }
3184 unsafe {
3186 let h = handler as *mut crate::abi::structs::_xmlCharEncodingHandler;
3187 if !(*h).name.is_null() {
3188 crate::abi::allocator::xmlFree((*h).name as *mut c_void);
3189 }
3190 crate::abi::allocator::xmlFree(handler);
3191 }
3192 0
3193}
3194
3195#[no_mangle]
3203pub unsafe extern "C" fn xmlCharEncInput(input: *mut _xmlParserInputBuffer, _to: c_int) -> c_int {
3204 if input.is_null() {
3205 return -1;
3206 }
3207 let handler = (*input).encoder as *mut crate::abi::structs::_xmlCharEncodingHandler;
3208 if handler.is_null() {
3209 return -1;
3210 }
3211 let raw = (*input).raw as *mut crate::abi::structs::_xmlBuffer;
3212 let buf = (*input).buffer as *mut crate::abi::structs::_xmlBuffer;
3213 if raw.is_null() || buf.is_null() {
3214 return -1;
3215 }
3216 crate::xml::encoding::char_enc_in(handler, buf, raw)
3217}
3218
3219#[no_mangle]
3227pub unsafe extern "C" fn xmlCharEncOutput(output: *mut _xmlOutputBuffer, _to: c_int) -> c_int {
3228 if output.is_null() {
3229 return -1;
3230 }
3231 let handler = (*output).encoder as *mut crate::abi::structs::_xmlCharEncodingHandler;
3232 if handler.is_null() {
3233 return -1;
3234 }
3235 let buf = (*output).buffer as *mut crate::abi::structs::_xmlBuffer;
3236 let conv = (*output).conv as *mut crate::abi::structs::_xmlBuffer;
3237 if buf.is_null() || conv.is_null() {
3238 return -1;
3239 }
3240 crate::xml::encoding::char_enc_out(handler, conv, buf)
3241}
3242
3243#[no_mangle]
3255pub unsafe extern "C" fn xmlParseURI(str: *const c_char) -> *mut c_void {
3256 crate::xml::uri::xmlParseURI(str)
3257}
3258
3259#[no_mangle]
3267pub unsafe extern "C" fn xmlParseURIRaw(str: *const c_char, raw: c_int) -> *mut c_void {
3268 let _ = raw;
3269 crate::xml::uri::xmlParseURI(str)
3270}
3271
3272#[no_mangle]
3280pub unsafe extern "C" fn xmlFreeURI(uri: *mut c_void) {
3281 crate::xml::uri::xmlFreeURI(uri)
3282}
3283
3284#[no_mangle]
3292pub extern "C" fn xmlCreateURI() -> *mut c_void {
3293 crate::xml::uri::xmlCreateURI()
3294}
3295
3296#[no_mangle]
3304pub unsafe extern "C" fn xmlSaveUri(uri: *mut c_void) -> *mut xmlChar {
3305 crate::xml::uri::xmlSaveUri(uri)
3306}
3307
3308#[no_mangle]
3316pub unsafe extern "C" fn xmlURIEscapeStr(
3317 str: *const xmlChar,
3318 list: *const xmlChar,
3319) -> *mut xmlChar {
3320 crate::xml::uri::xmlURIEscapeStr(str, list)
3321}
3322
3323#[no_mangle]
3331pub unsafe extern "C" fn xmlURIUnescapeString(
3332 str: *const c_char,
3333 len: c_int,
3334 target: *mut c_char,
3335) -> *mut c_char {
3336 crate::xml::uri::xmlURIUnescapeString(str, len, target)
3337}
3338
3339#[no_mangle]
3351pub unsafe extern "C" fn xmlXPathNewContext(_doc: *mut _xmlDoc) -> *mut _xmlXPathContext {
3352 ptr::null_mut()
3354}
3355
3356#[no_mangle]
3364pub extern "C" fn xmlXPathFreeContext(_ctxt: *mut _xmlXPathContext) {
3365 }
3367
3368#[no_mangle]
3377pub unsafe extern "C" fn xmlXPathEvalExpression(
3378 _str: *const xmlChar,
3379 _ctxt: *mut _xmlXPathContext,
3380) -> *mut _xmlXPathObject {
3381 ptr::null_mut()
3383}
3384
3385#[no_mangle]
3393pub unsafe extern "C" fn xmlXPathEval(
3394 _str: *const xmlChar,
3395 _ctxt: *mut _xmlXPathContext,
3396) -> *mut _xmlXPathObject {
3397 ptr::null_mut()
3399}
3400
3401#[no_mangle]
3409pub extern "C" fn xmlXPathFreeObject(_obj: *mut _xmlXPathObject) {
3410 }
3412
3413#[no_mangle]
3421pub unsafe extern "C" fn xmlXPathCompile(_str: *const xmlChar) -> *mut c_void {
3422 ptr::null_mut()
3424}
3425
3426#[no_mangle]
3434pub extern "C" fn xmlXPathFreeCompExpr(_comp: *mut c_void) {
3435 }
3437
3438#[no_mangle]
3447pub unsafe extern "C" fn xmlXPathRegisterNs(
3448 _ctxt: *mut _xmlXPathContext,
3449 _prefix: *const xmlChar,
3450 _ns_uri: *const xmlChar,
3451) -> c_int {
3452 0
3454}
3455
3456#[no_mangle]
3465pub unsafe extern "C" fn xmlXPathRegisterFunc(
3466 _ctxt: *mut _xmlXPathContext,
3467 _name: *const xmlChar,
3468 _f: Option<unsafe extern "C" fn(*mut c_void, c_int)>,
3469) -> c_int {
3470 0
3472}
3473
3474#[no_mangle]
3484pub unsafe extern "C" fn xmlXPathRegisterFuncNS(
3485 _ctxt: *mut _xmlXPathContext,
3486 _name: *const xmlChar,
3487 _ns_uri: *const xmlChar,
3488 _f: Option<unsafe extern "C" fn(*mut c_void, c_int)>,
3489) -> c_int {
3490 0
3492}
3493
3494#[no_mangle]
3503pub unsafe extern "C" fn xmlXPathRegisterVariable(
3504 _ctxt: *mut _xmlXPathContext,
3505 _name: *const xmlChar,
3506 _value: *mut _xmlXPathObject,
3507) -> c_int {
3508 0
3510}
3511
3512#[no_mangle]
3520pub unsafe extern "C" fn xmlXPathNewNodeSet(_val: *mut _xmlNode) -> *mut _xmlXPathObject {
3521 ptr::null_mut()
3523}
3524
3525#[no_mangle]
3533pub unsafe extern "C" fn xmlXPathNewCString(_val: *const xmlChar) -> *mut _xmlXPathObject {
3534 ptr::null_mut()
3536}
3537
3538#[no_mangle]
3546pub extern "C" fn xmlXPathNewFloat(_val: f64) -> *mut _xmlXPathObject {
3547 ptr::null_mut()
3549}
3550
3551#[no_mangle]
3559pub extern "C" fn xmlXPathNewBoolean(_val: c_int) -> *mut _xmlXPathObject {
3560 ptr::null_mut()
3562}
3563
3564#[no_mangle]
3576pub extern "C" fn xmlXIncludeProcess(_doc: *mut _xmlDoc) -> c_int {
3577 -1
3579}
3580
3581#[no_mangle]
3589pub extern "C" fn xmlXIncludeProcessFlags(_doc: *mut _xmlDoc, _flags: c_int) -> c_int {
3590 -1
3592}
3593
3594#[no_mangle]
3606pub extern "C" fn xmlCatalogLoad(catalogs: *const c_char) -> *mut c_void {
3607 if catalogs.is_null() {
3608 return ptr::null_mut();
3609 }
3610 crate::xml::catalog::load_catalog(catalogs)
3611}
3612
3613#[no_mangle]
3621pub unsafe extern "C" fn xmlCatalogResolvePublic(pubID: *const xmlChar) -> *mut xmlChar {
3622 if pubID.is_null() {
3623 return ptr::null_mut();
3624 }
3625 crate::xml::catalog::resolve_public(pubID)
3626}
3627
3628#[no_mangle]
3636pub unsafe extern "C" fn xmlCatalogResolveSystem(sysID: *const xmlChar) -> *mut xmlChar {
3637 if sysID.is_null() {
3638 return ptr::null_mut();
3639 }
3640 crate::xml::catalog::resolve_system(sysID)
3641}
3642
3643#[no_mangle]
3651pub unsafe extern "C" fn xmlCatalogResolveURI(URI: *const xmlChar) -> *mut xmlChar {
3652 if URI.is_null() {
3653 return ptr::null_mut();
3654 }
3655 crate::xml::catalog::resolve_uri(URI)
3656}
3657
3658#[no_mangle]
3666pub extern "C" fn xmlCatalogSetDefaults(allow: c_int) {
3667 crate::xml::catalog::set_defaults(allow)
3668}
3669
3670#[no_mangle]
3678pub extern "C" fn xmlCatalogGetDefaults() -> c_int {
3679 crate::xml::catalog::get_defaults()
3680}
3681
3682#[no_mangle]
3690pub unsafe extern "C" fn xmlCatalogAdd(
3691 type_: *const xmlChar,
3692 orig: *const xmlChar,
3693 replace: *const xmlChar,
3694) -> c_int {
3695 if type_.is_null() || orig.is_null() || replace.is_null() {
3696 return -1;
3697 }
3698 crate::xml::catalog::add(type_, orig, replace)
3699}
3700
3701#[no_mangle]
3709pub unsafe extern "C" fn xmlCatalogRemove(value: *const xmlChar) -> c_int {
3710 if value.is_null() {
3711 return 0;
3712 }
3713 crate::xml::catalog::remove(value)
3714}
3715
3716#[no_mangle]
3724pub extern "C" fn xmlCatalogCleanup() {
3725 crate::xml::catalog::cleanup();
3726}
3727
3728#[no_mangle]
3736pub extern "C" fn xmlCatalogConvert() -> *mut _xmlDoc {
3737 unsafe { crate::xml::catalog::convert() }
3739}
3740
3741#[no_mangle]
3753pub unsafe extern "C" fn htmlParseFile(
3754 _filename: *const c_char,
3755 _encoding: *const c_char,
3756) -> *mut _xmlDoc {
3757 ptr::null_mut()
3759}
3760
3761#[no_mangle]
3769pub unsafe extern "C" fn htmlParseMemory(_buffer: *const c_char, _size: c_int) -> *mut _xmlDoc {
3770 ptr::null_mut()
3772}
3773
3774#[no_mangle]
3782pub unsafe extern "C" fn htmlParseDoc(
3783 _cur: *const xmlChar,
3784 _encoding: *const c_char,
3785) -> *mut _xmlDoc {
3786 ptr::null_mut()
3788}
3789
3790#[no_mangle]
3799pub unsafe extern "C" fn htmlCreateFileParserCtxt(
3800 _filename: *const c_char,
3801 _encoding: *const c_char,
3802) -> *mut c_void {
3803 ptr::null_mut()
3805}
3806
3807#[no_mangle]
3815pub extern "C" fn htmlFreeParserCtxt(_ctxt: *mut c_void) {
3816 }
3818
3819#[no_mangle]
3827pub extern "C" fn htmlInitParser() {
3828 }
3830
3831#[no_mangle]
3839pub extern "C" fn htmlCleanupParser() {
3840 }
3842
3843#[no_mangle]
3855pub unsafe extern "C" fn xmlDebugDumpDocument(_output: *mut c_void, _doc: *mut _xmlDoc) {
3856 }
3858
3859#[no_mangle]
3867pub unsafe extern "C" fn xmlDebugDumpNode(_output: *mut c_void, _node: *mut _xmlNode) {
3868 }
3870
3871#[no_mangle]
3879pub unsafe extern "C" fn xmlDebugDumpNodeList(_output: *mut c_void, _node: *mut _xmlNode) {
3880 }
3882
3883#[no_mangle]
3891pub extern "C" fn xmlGetBinaryPath() -> *mut c_char {
3892 ptr::null_mut()
3894}
3895
3896#[no_mangle]
3904pub extern "C" fn xmlGetHomeOfBinary() -> *mut c_char {
3905 ptr::null_mut()
3907}