#![allow(non_snake_case)]
#![allow(unused_variables)]
#![allow(clippy::missing_safety_doc)]
#![allow(clippy::not_unsafe_ptr_arg_deref)]
use core::ffi::c_void;
use core::ptr;
use std::mem::size_of;
use std::os::raw::{c_char, c_int, c_uint};
use crate::abi::allocator::*;
use crate::abi::callbacks::*;
use crate::abi::ownership::*;
use crate::abi::structs::*;
use crate::abi::types::xmlAttributeType::XML_ATTRIBUTE_CDATA;
use crate::abi::types::xmlElementType::*;
use crate::abi::types::xmlErrorLevel::XML_ERR_NONE;
use crate::abi::types::*;
use crate::abi::versioning::*;
#[no_mangle]
pub unsafe extern "C" fn xmlInitParser() {
crate::internal::globals::init_parser();
}
#[no_mangle]
pub unsafe extern "C" fn xmlCleanupParser() {
crate::internal::globals::cleanup_parser();
}
#[no_mangle]
pub unsafe extern "C" fn xmlInitThreads() -> c_int {
crate::internal::globals::init_threads()
}
#[no_mangle]
pub unsafe extern "C" fn xmlCleanupThreads() {
crate::xml::threads::cleanup_threads();
}
#[no_mangle]
pub extern "C" fn xmlIsInitialized() -> c_int {
if crate::abi::versioning::is_initialized() {
1
} else {
0
}
}
#[no_mangle]
pub unsafe extern "C" fn xmlLockLibrary() {
crate::xml::threads::lock_library();
}
#[no_mangle]
pub unsafe extern "C" fn xmlUnlockLibrary() {
crate::xml::threads::unlock_library();
}
#[no_mangle]
pub unsafe extern "C" fn xmlSetGenericErrorFunc(
ctx: *mut c_void,
handler: Option<xmlGenericErrorFunc>,
) {
unsafe { crate::xml::errors::set_generic_error_func(ctx, handler) };
}
#[no_mangle]
pub unsafe extern "C" fn xmlSetStructuredErrorFunc(
ctx: *mut c_void,
handler: Option<xmlStructuredErrorFunc>,
) {
unsafe { crate::xml::errors::set_structured_error_func(ctx, handler) };
}
#[no_mangle]
pub extern "C" fn xmlGetLastError() -> *mut _xmlError {
crate::xml::errors::get_last_error()
}
#[no_mangle]
pub unsafe extern "C" fn xmlCopyError(from: *const _xmlError, to: *mut _xmlError) -> c_int {
unsafe { crate::xml::errors::copy_error(from, to) }
}
#[no_mangle]
pub unsafe extern "C" fn xmlResetError(err: *mut _xmlError) {
unsafe { crate::xml::errors::reset_error(err) };
}
#[no_mangle]
pub unsafe extern "C" fn xmlRaiseError(
ctxt: *mut c_void,
ctxt2: *mut c_void,
ctxt3: *mut c_void,
ctxt4: *mut c_void,
ctxt5: *mut c_void,
domain: c_int,
code: c_int,
level: c_int,
file: *const c_char,
line: c_int,
str1: *const c_char,
str2: *const c_char,
str3: *const c_char,
int1: c_int,
int2: c_int,
msg: *const c_char,
) {
unsafe {
crate::xml::errors::raise_error(
ctxt, ctxt2, ctxt3, ctxt4, ctxt5, domain, code, level, file, line, str1, str2, str3,
int1, int2, msg,
);
}
}
#[no_mangle]
pub extern "C" fn xmlResetLastError() {
crate::xml::errors::reset_last_error();
}
#[no_mangle]
pub unsafe extern "C" fn xmlStrdup(cur: *const xmlChar) -> *mut xmlChar {
if cur.is_null() {
return ptr::null_mut();
}
let len = unsafe { xmlStrlen(cur) };
let size = len + 1;
let new_ptr = unsafe { xmlMalloc(size as usize) };
if new_ptr.is_null() {
return ptr::null_mut();
}
unsafe {
ptr::copy_nonoverlapping(cur as *const u8, new_ptr as *mut u8, size as usize);
}
new_ptr as *mut xmlChar
}
#[no_mangle]
pub unsafe extern "C" fn xmlStrndup(cur: *const xmlChar, len: c_int) -> *mut xmlChar {
if cur.is_null() || len <= 0 {
return ptr::null_mut();
}
let size = len as usize + 1;
let new_ptr = unsafe { xmlMalloc(size) };
if new_ptr.is_null() {
return ptr::null_mut();
}
unsafe {
ptr::copy_nonoverlapping(cur as *const u8, new_ptr as *mut u8, len as usize);
*(new_ptr.add(len as usize) as *mut u8) = 0;
}
new_ptr as *mut xmlChar
}
#[no_mangle]
pub unsafe extern "C" fn xmlStrlen(str: *const xmlChar) -> c_int {
if str.is_null() {
return 0;
}
unsafe { libc::strlen(str as *const c_char) as c_int }
}
#[no_mangle]
pub unsafe extern "C" fn xmlStrcmp(str1: *const xmlChar, str2: *const xmlChar) -> c_int {
if str1.is_null() && str2.is_null() {
return 0;
}
if str1.is_null() {
return -1;
}
if str2.is_null() {
return 1;
}
unsafe { libc::strcmp(str1 as *const c_char, str2 as *const c_char) as c_int }
}
#[no_mangle]
pub unsafe extern "C" fn xmlStrncmp(
str1: *const xmlChar,
str2: *const xmlChar,
len: c_int,
) -> c_int {
if len <= 0 {
return 0;
}
if str1.is_null() && str2.is_null() {
return 0;
}
if str1.is_null() {
return -1;
}
if str2.is_null() {
return 1;
}
unsafe { libc::strncmp(str1 as *const c_char, str2 as *const c_char, len as usize) as c_int }
}
#[no_mangle]
pub unsafe extern "C" fn xmlStrcasecmp(str1: *const xmlChar, str2: *const xmlChar) -> c_int {
if str1.is_null() && str2.is_null() {
return 0;
}
if str1.is_null() {
return -1;
}
if str2.is_null() {
return 1;
}
unsafe { libc::strcasecmp(str1 as *const c_char, str2 as *const c_char) as c_int }
}
#[no_mangle]
pub unsafe extern "C" fn xmlStrncasecmp(
str1: *const xmlChar,
str2: *const xmlChar,
len: c_int,
) -> c_int {
if len <= 0 {
return 0;
}
if str1.is_null() && str2.is_null() {
return 0;
}
if str1.is_null() {
return -1;
}
if str2.is_null() {
return 1;
}
unsafe {
libc::strncasecmp(str1 as *const c_char, str2 as *const c_char, len as usize) as c_int
}
}
#[no_mangle]
pub unsafe extern "C" fn xmlStrEqual(str1: *const xmlChar, str2: *const xmlChar) -> c_int {
if str1.is_null() && str2.is_null() {
return 1;
}
if str1.is_null() || str2.is_null() {
return 0;
}
unsafe { (libc::strcmp(str1 as *const c_char, str2 as *const c_char) == 0) as c_int }
}
#[no_mangle]
pub unsafe extern "C" fn xmlStrQEqual(
pref: *const xmlChar,
name: *const xmlChar,
str: *const xmlChar,
) -> c_int {
if name.is_null() || str.is_null() {
return 0;
}
if pref.is_null() {
return unsafe { xmlStrEqual(name, str) };
}
let pref_len = unsafe { xmlStrlen(pref) };
let name_len = unsafe { xmlStrlen(name) };
let total_len = pref_len + 1 + name_len;
let str_len = unsafe { xmlStrlen(str) };
if total_len != str_len {
return 0;
}
if unsafe {
libc::strncmp(
pref as *const c_char,
str as *const c_char,
pref_len as usize,
)
} != 0
{
return 0;
}
if unsafe { *str.add(pref_len as usize) } != b':' as xmlChar {
return 0;
}
(unsafe {
libc::strncmp(
name as *const c_char,
str.add((pref_len + 1) as usize) as *const c_char,
name_len as usize,
) == 0
}) as c_int
}
#[no_mangle]
pub unsafe extern "C" fn xmlStrcat(cur: *mut xmlChar, add: *const xmlChar) -> *mut xmlChar {
if add.is_null() {
return cur;
}
if cur.is_null() {
return unsafe { xmlStrdup(add) };
}
let cur_len = unsafe { xmlStrlen(cur) } as usize;
let add_len = unsafe { xmlStrlen(add) } as usize;
let new_size = cur_len + add_len + 1;
let new_ptr = unsafe { xmlRealloc(cur as *mut c_void, new_size) };
if new_ptr.is_null() {
return ptr::null_mut();
}
unsafe {
ptr::copy_nonoverlapping(add as *const u8, (new_ptr as *mut u8).add(cur_len), add_len);
*((new_ptr as *mut u8).add(cur_len + add_len)) = 0;
}
new_ptr as *mut xmlChar
}
#[no_mangle]
pub unsafe extern "C" fn xmlStrncat(
cur: *mut xmlChar,
add: *const xmlChar,
len: c_int,
) -> *mut xmlChar {
if add.is_null() || len <= 0 {
return cur;
}
let len = len as usize;
if cur.is_null() {
return unsafe { xmlStrndup(add, len as c_int) };
}
let cur_len = unsafe { xmlStrlen(cur) } as usize;
let new_size = cur_len + len + 1;
let new_ptr = unsafe { xmlRealloc(cur as *mut c_void, new_size) };
if new_ptr.is_null() {
return ptr::null_mut();
}
unsafe {
ptr::copy_nonoverlapping(add as *const u8, (new_ptr as *mut u8).add(cur_len), len);
*((new_ptr as *mut u8).add(cur_len + len)) = 0;
}
new_ptr as *mut xmlChar
}
#[no_mangle]
pub unsafe extern "C" fn xmlStrncatNew(
str1: *const xmlChar,
str2: *const xmlChar,
len: c_int,
) -> *mut xmlChar {
let mut result: *mut xmlChar = ptr::null_mut();
if !str1.is_null() {
result = unsafe { xmlStrdup(str1) };
}
if !str2.is_null() && len > 0 {
result = unsafe { xmlStrncat(result, str2, len) };
}
result
}
#[no_mangle]
pub unsafe extern "C" fn xmlStrcpy(dst: *mut xmlChar, src: *const xmlChar) -> *mut xmlChar {
if dst.is_null() || src.is_null() {
return dst;
}
let len = unsafe { xmlStrlen(src) } as usize + 1;
unsafe {
ptr::copy_nonoverlapping(src as *const u8, dst as *mut u8, len);
}
dst
}
#[no_mangle]
pub unsafe extern "C" fn xmlStrncpy(
dst: *mut xmlChar,
src: *const xmlChar,
len: c_int,
) -> *mut xmlChar {
if dst.is_null() || src.is_null() || len <= 0 {
return dst;
}
let len = len as usize;
let src_len = unsafe { xmlStrlen(src) } as usize;
let copy_len = if src_len < len { src_len } else { len - 1 };
unsafe {
ptr::copy_nonoverlapping(src as *const u8, dst as *mut u8, copy_len);
*dst.add(copy_len) = 0;
}
dst
}
#[no_mangle]
pub unsafe extern "C" fn xmlStrsub(str: *const xmlChar, start: c_int, len: c_int) -> *mut xmlChar {
if str.is_null() || start < 0 || len < 0 {
return ptr::null_mut();
}
let str_len = unsafe { xmlStrlen(str) };
if start >= str_len {
return unsafe { xmlStrdup(b"\0" as *const u8 as *const xmlChar) };
}
let actual_len = if start + len > str_len {
str_len - start
} else {
len
};
unsafe { xmlStrndup(str.add(start as usize), actual_len) }
}
#[no_mangle]
pub unsafe extern "C" fn xmlNewDoc(version: *const xmlChar) -> *mut _xmlDoc {
crate::xml::tree::new_doc(version)
}
#[no_mangle]
pub unsafe extern "C" fn xmlFreeDoc(doc: *mut _xmlDoc) {
crate::xml::tree::free_doc(doc);
}
#[no_mangle]
pub unsafe extern "C" fn xmlNewNode(ns: *mut _xmlNs, name: *const xmlChar) -> *mut _xmlNode {
crate::xml::tree::new_node(ns, name)
}
#[no_mangle]
pub unsafe extern "C" fn xmlFreeNode(node: *mut _xmlNode) {
crate::xml::tree::free_node(node);
}
#[no_mangle]
pub unsafe extern "C" fn xmlUnlinkNode(node: *mut _xmlNode) {
crate::xml::tree::unlink_node(node);
}
#[no_mangle]
pub unsafe extern "C" fn xmlAddChild(parent: *mut _xmlNode, cur: *mut _xmlNode) -> *mut _xmlNode {
crate::xml::tree::add_child(parent, cur)
}
#[no_mangle]
pub unsafe extern "C" fn xmlAddSibling(
cur: *mut _xmlNode,
sibling: *mut _xmlNode,
) -> *mut _xmlNode {
crate::xml::tree::add_sibling(cur, sibling)
}
#[no_mangle]
pub unsafe extern "C" fn xmlNewChild(
parent: *mut _xmlNode,
ns: *mut _xmlNs,
name: *const xmlChar,
content: *const xmlChar,
) -> *mut _xmlNode {
crate::xml::tree::new_child(parent, ns, name)
}
#[no_mangle]
pub unsafe extern "C" fn xmlDocSetRootElement(
doc: *mut _xmlDoc,
root: *mut _xmlNode,
) -> *mut _xmlNode {
crate::xml::tree::doc_set_root_element(doc, root)
}
#[no_mangle]
pub extern "C" fn xmlDocGetRootElement(doc: *const _xmlDoc) -> *mut _xmlNode {
crate::xml::tree::doc_get_root_element(doc as *mut _xmlDoc)
}
#[no_mangle]
pub unsafe extern "C" fn xmlCopyNode(node: *const _xmlNode, extended: c_int) -> *mut _xmlNode {
crate::xml::tree::copy_node(node, extended)
}
#[no_mangle]
pub unsafe extern "C" fn xmlCopyDoc(doc: *const _xmlDoc, recursive: c_int) -> *mut _xmlDoc {
crate::xml::tree::copy_doc(doc, recursive)
}
#[no_mangle]
pub unsafe extern "C" fn xmlNewText(content: *const xmlChar) -> *mut _xmlNode {
crate::xml::tree::new_text(content)
}
#[no_mangle]
pub unsafe extern "C" fn xmlNewComment(content: *const xmlChar) -> *mut _xmlNode {
crate::xml::tree::new_comment(content)
}
#[no_mangle]
pub unsafe extern "C" fn xmlNewPI(name: *const xmlChar, content: *const xmlChar) -> *mut _xmlNode {
crate::xml::tree::new_pi(name, content)
}
#[no_mangle]
pub unsafe extern "C" fn xmlNewCDataBlock(
doc: *mut _xmlDoc,
content: *const xmlChar,
len: c_int,
) -> *mut _xmlNode {
crate::xml::tree::new_cdata_block(doc, content, len)
}
#[no_mangle]
pub unsafe extern "C" fn xmlNewNs(
node: *mut _xmlNode,
href: *const xmlChar,
prefix: *const xmlChar,
) -> *mut _xmlNs {
crate::xml::tree::new_ns(node, href, prefix)
}
#[no_mangle]
pub unsafe extern "C" fn xmlSetNs(node: *mut _xmlNode, ns: *mut _xmlNs) {
crate::xml::tree::set_ns(node, ns);
}
#[no_mangle]
pub unsafe extern "C" fn xmlGetNsList(
doc: *mut _xmlDoc,
node: *const _xmlNode,
) -> *mut *mut _xmlNs {
crate::xml::tree::get_ns_list(doc, node as *mut _xmlNode)
}
#[no_mangle]
pub unsafe extern "C" fn xmlSearchNs(
doc: *mut _xmlDoc,
node: *mut _xmlNode,
nameSpace: *const xmlChar,
) -> *mut _xmlNs {
crate::xml::tree::search_ns(doc, node, nameSpace)
}
#[no_mangle]
pub unsafe extern "C" fn xmlSearchNsByHref(
doc: *mut _xmlDoc,
node: *mut _xmlNode,
href: *const xmlChar,
) -> *mut _xmlNs {
crate::xml::tree::search_ns_by_href(doc, node, href)
}
#[no_mangle]
pub unsafe extern "C" fn xmlSetProp(
node: *mut _xmlNode,
name: *const xmlChar,
value: *const xmlChar,
) -> *mut _xmlAttr {
crate::xml::tree::set_prop(node, name, value)
}
#[no_mangle]
pub unsafe extern "C" fn xmlGetProp(node: *const _xmlNode, name: *const xmlChar) -> *mut xmlChar {
crate::xml::tree::get_prop(node as *mut _xmlNode, name)
}
#[no_mangle]
pub unsafe extern "C" fn xmlGetNsProp(
node: *const _xmlNode,
name: *const xmlChar,
nameSpace: *const xmlChar,
) -> *mut xmlChar {
crate::xml::tree::get_ns_prop(node as *mut _xmlNode, name, nameSpace)
}
#[no_mangle]
pub unsafe extern "C" fn xmlSetNsProp(
node: *mut _xmlNode,
ns: *mut _xmlNs,
name: *const xmlChar,
value: *const xmlChar,
) -> *mut _xmlAttr {
crate::xml::tree::set_ns_prop(node, ns, name, value)
}
#[no_mangle]
pub unsafe extern "C" fn xmlRemoveProp(attr: *mut _xmlAttr) -> c_int {
crate::xml::tree::remove_prop(attr)
}
#[no_mangle]
pub extern "C" fn xmlGetIntSubset(doc: *const _xmlDoc) -> *mut _xmlDtd {
crate::xml::tree::get_int_subset(doc)
}
#[no_mangle]
pub unsafe extern "C" fn xmlNewDtd(
doc: *mut _xmlDoc,
name: *const xmlChar,
ExternalID: *const xmlChar,
SystemID: *const xmlChar,
) -> *mut _xmlDtd {
crate::xml::tree::new_dtd(doc, name, ExternalID, SystemID)
}
#[no_mangle]
pub unsafe extern "C" fn xmlNewEntity(
doc: *mut _xmlDoc,
name: *const xmlChar,
type_: c_int,
ExternalID: *const xmlChar,
SystemID: *const xmlChar,
content: *const xmlChar,
) -> *mut _xmlEntity {
crate::xml::tree::new_entity(doc, name, type_, ExternalID, SystemID, content)
}
#[no_mangle]
pub unsafe extern "C" fn xmlGetDocEntity(
doc: *const _xmlDoc,
name: *const xmlChar,
) -> *mut _xmlEntity {
crate::xml::tree::get_doc_entity(doc, name)
}
#[no_mangle]
pub unsafe extern "C" fn xmlGetParameterEntity(
doc: *const _xmlDoc,
name: *const xmlChar,
) -> *mut _xmlEntity {
crate::xml::tree::get_parameter_entity(doc, name)
}
#[no_mangle]
pub extern "C" fn xmlGetLineNo(node: *const _xmlNode) -> c_int {
crate::xml::tree::get_line_no(node)
}
#[no_mangle]
pub unsafe extern "C" fn xmlReadDoc(
cur: *const xmlChar,
URL: *const c_char,
encoding: *const c_char,
options: c_int,
) -> *mut _xmlDoc {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlReadFile(
URL: *const c_char,
encoding: *const c_char,
options: c_int,
) -> *mut _xmlDoc {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlReadMemory(
buffer: *const c_char,
size: c_int,
URL: *const c_char,
encoding: *const c_char,
options: c_int,
) -> *mut _xmlDoc {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlReadFd(
fd: c_int,
URL: *const c_char,
encoding: *const c_char,
options: c_int,
) -> *mut _xmlDoc {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlReadIO(
ioread: Option<xmlInputReadCallback>,
ioclose: Option<xmlInputCloseCallback>,
ioctx: *mut c_void,
URL: *const c_char,
encoding: *const c_char,
options: c_int,
) -> *mut _xmlDoc {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlSAXParseDoc(
sax: *mut _xmlSAXHandler,
cur: *const xmlChar,
recovery: c_int,
) -> *mut _xmlDoc {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlSAXParseFile(
sax: *mut _xmlSAXHandler,
filename: *const c_char,
recovery: c_int,
) -> *mut _xmlDoc {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlSAXParseMemory(
sax: *mut _xmlSAXHandler,
buffer: *const c_char,
size: c_int,
recovery: c_int,
) -> *mut _xmlDoc {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlSAXUserParseFile(
sax: *mut _xmlSAXHandler,
user_data: *mut c_void,
filename: *const c_char,
) -> c_int {
-1
}
#[no_mangle]
pub unsafe extern "C" fn xmlSAXUserParseMemory(
sax: *mut _xmlSAXHandler,
user_data: *mut c_void,
buffer: *const c_char,
size: c_int,
) -> c_int {
-1
}
#[no_mangle]
pub unsafe extern "C" fn xmlParseDoc(cur: *const xmlChar) -> *mut _xmlDoc {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlParseFile(filename: *const c_char) -> *mut _xmlDoc {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlParseMemory(buffer: *const c_char, size: c_int) -> *mut _xmlDoc {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlCreateFileParserCtxt(filename: *const c_char) -> *mut _xmlParserCtxt {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlCreateDocParserCtxt(cur: *const xmlChar) -> *mut _xmlParserCtxt {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlParseDocument(ctxt: *mut _xmlParserCtxt) -> c_int {
-1
}
#[no_mangle]
pub unsafe extern "C" fn xmlFreeParserCtxt(ctxt: *mut _xmlParserCtxt) {
if ctxt.is_null() {
return;
}
unsafe {
xmlFree(ctxt as *mut c_void);
}
}
#[no_mangle]
pub unsafe extern "C" fn xmlCtxtUseOptions(ctxt: *mut _xmlParserCtxt, options: c_int) -> c_int {
if ctxt.is_null() {
return -1;
}
unsafe {
(*ctxt).options = options;
}
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlParseChunk(
ctxt: *mut _xmlParserCtxt,
chunk: *const c_char,
size: c_int,
terminate: c_int,
) -> c_int {
-1
}
#[no_mangle]
pub unsafe extern "C" fn xmlParserInputBufferCreateMem(
buffer: *const c_char,
size: c_int,
enc: c_int,
) -> *mut _xmlParserInputBuffer {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlParserInputBufferCreateFilename(
URI: *const c_char,
enc: c_int,
) -> *mut _xmlParserInputBuffer {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlParserInputBufferCreateIO(
ioread: Option<xmlInputReadCallback>,
ioclose: Option<xmlInputCloseCallback>,
ioctx: *mut c_void,
enc: c_int,
) -> *mut _xmlParserInputBuffer {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlFreeParserInputBuffer(buf: *mut _xmlParserInputBuffer) {
if buf.is_null() {
return;
}
unsafe {
xmlFree(buf as *mut c_void);
}
}
#[no_mangle]
pub unsafe extern "C" fn xmlNewInputFromFile(
ctxt: *mut _xmlParserCtxt,
filename: *const c_char,
) -> *mut _xmlParserInput {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlFreeInputStream(input: *mut _xmlParserInput) {
if input.is_null() {
return;
}
unsafe {
xmlFree(input as *mut c_void);
}
}
#[no_mangle]
pub unsafe extern "C" fn xmlOutputBufferCreateFilename(
URI: *const c_char,
encoder: *mut c_void,
compression: c_int,
) -> *mut _xmlOutputBuffer {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlOutputBufferCreateFd(
fd: c_int,
encoder: *mut c_void,
) -> *mut _xmlOutputBuffer {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlOutputBufferCreateIO(
iowrite: Option<xmlOutputWriteCallback>,
ioclose: Option<xmlOutputCloseCallback>,
ioctx: *mut c_void,
encoder: *mut c_void,
) -> *mut _xmlOutputBuffer {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlOutputBufferClose(out: *mut _xmlOutputBuffer) -> c_int {
if out.is_null() {
return 0;
}
unsafe {
xmlFree(out as *mut c_void);
}
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlOutputBufferFlush(out: *mut _xmlOutputBuffer) -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlOutputBufferWrite(
out: *mut _xmlOutputBuffer,
len: c_int,
data: *const c_char,
) -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlOutputBufferWriteString(
out: *mut _xmlOutputBuffer,
str: *const c_char,
) -> c_int {
if str.is_null() {
return 0;
}
unsafe { xmlOutputBufferWrite(out, xmlStrlen(str as *const xmlChar), str) }
}
#[no_mangle]
pub extern "C" fn xmlDictCreate() -> *mut c_void {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlDictCreateSub(_sub: *mut c_void) -> *mut c_void {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlDictLookup(
dict: *mut c_void,
name: *const xmlChar,
len: c_int,
) -> *const xmlChar {
name
}
#[no_mangle]
pub unsafe extern "C" fn xmlDictExists(
dict: *mut c_void,
name: *const xmlChar,
len: c_int,
) -> *const xmlChar {
ptr::null()
}
#[no_mangle]
pub extern "C" fn xmlDictSize(dict: *const c_void) -> c_uint {
0
}
#[no_mangle]
pub extern "C" fn xmlDictFree(_dict: *mut c_void) {
}
#[no_mangle]
pub extern "C" fn xmlDictSetLimit(_dict: *mut c_void, _limit: c_uint) -> c_uint {
0
}
#[no_mangle]
pub extern "C" fn xmlDictGetUsage(_dict: *const c_void) -> c_uint {
0
}
#[no_mangle]
pub extern "C" fn xmlHashCreate(_size: c_int) -> *mut c_void {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlHashCreateDict(_size: c_int, _dict: *mut c_void) -> *mut c_void {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlHashFree(
_table: *mut c_void,
_f: Option<unsafe extern "C" fn(*mut c_void, *mut xmlChar)>,
) {
}
#[no_mangle]
pub unsafe extern "C" fn xmlHashAddEntry(
_table: *mut c_void,
_name: *const xmlChar,
_userdata: *mut c_void,
) -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlHashAddEntry2(
_table: *mut c_void,
_name: *const xmlChar,
_name2: *const xmlChar,
_userdata: *mut c_void,
) -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlHashAddEntry3(
_table: *mut c_void,
_name: *const xmlChar,
_name2: *const xmlChar,
_name3: *const xmlChar,
_userdata: *mut c_void,
) -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlHashUpdateEntry(
_table: *mut c_void,
_name: *const xmlChar,
_userdata: *mut c_void,
_f: Option<unsafe extern "C" fn(*mut c_void, *mut xmlChar)>,
) -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlHashUpdateEntry2(
_table: *mut c_void,
_name: *const xmlChar,
_name2: *const xmlChar,
_userdata: *mut c_void,
_f: Option<unsafe extern "C" fn(*mut c_void, *mut xmlChar)>,
) -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlHashUpdateEntry3(
_table: *mut c_void,
_name: *const xmlChar,
_name2: *const xmlChar,
_name3: *const xmlChar,
_userdata: *mut c_void,
_f: Option<unsafe extern "C" fn(*mut c_void, *mut xmlChar)>,
) -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlHashLookup(_table: *mut c_void, _name: *const xmlChar) -> *mut c_void {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlHashLookup2(
_table: *mut c_void,
_name: *const xmlChar,
_name2: *const xmlChar,
) -> *mut c_void {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlHashLookup3(
_table: *mut c_void,
_name: *const xmlChar,
_name2: *const xmlChar,
_name3: *const xmlChar,
) -> *mut c_void {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlHashSize(_table: *mut c_void) -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlHashRemoveEntry(
_table: *mut c_void,
_name: *const xmlChar,
_f: Option<unsafe extern "C" fn(*mut c_void, *mut xmlChar)>,
) -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlHashRemoveEntry2(
_table: *mut c_void,
_name: *const xmlChar,
_name2: *const xmlChar,
_f: Option<unsafe extern "C" fn(*mut c_void, *mut xmlChar)>,
) -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlHashRemoveEntry3(
_table: *mut c_void,
_name: *const xmlChar,
_name2: *const xmlChar,
_name3: *const xmlChar,
_f: Option<unsafe extern "C" fn(*mut c_void, *mut xmlChar)>,
) -> c_int {
0
}
#[no_mangle]
pub extern "C" fn xmlHashScan(
_table: *mut c_void,
_f: Option<unsafe extern "C" fn(*mut c_void, *const xmlChar, *mut c_void)>,
_data: *mut c_void,
) {
}
#[no_mangle]
pub extern "C" fn xmlHashScanFull(
_table: *mut c_void,
_f: Option<unsafe extern "C" fn(*mut c_void, *const xmlChar, *mut c_void, *mut c_void)>,
_data: *mut c_void,
) {
}
#[no_mangle]
pub extern "C" fn xmlHashCopy(
_table: *mut c_void,
_f: Option<unsafe extern "C" fn(*mut c_void, *const xmlChar) -> *mut c_void>,
) -> *mut c_void {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlListCreate(
_deallocator: Option<unsafe extern "C" fn(*mut c_void)>,
_compare: Option<unsafe extern "C" fn(*const c_void, *const c_void) -> c_int>,
) -> *mut c_void {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlListDelete(_list: *mut c_void) {
}
#[no_mangle]
pub extern "C" fn xmlListSearch(_list: *mut c_void, _data: *mut c_void) -> *mut c_void {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlListWalk(
_list: *mut c_void,
_walker: Option<unsafe extern "C" fn(*mut c_void, *mut c_void) -> c_int>,
_data: *mut c_void,
) {
}
#[no_mangle]
pub extern "C" fn xmlListPushBack(_list: *mut c_void, _data: *mut c_void) -> c_int {
0
}
#[no_mangle]
pub extern "C" fn xmlListPushFront(_list: *mut c_void, _data: *mut c_void) -> c_int {
0
}
#[no_mangle]
pub extern "C" fn xmlListPopBack(_list: *mut c_void) {
}
#[no_mangle]
pub extern "C" fn xmlListPopFront(_list: *mut c_void) {
}
#[no_mangle]
pub extern "C" fn xmlListInsert(_list: *mut c_void, _data: *mut c_void) -> c_int {
0
}
#[no_mangle]
pub extern "C" fn xmlListAppend(_list: *mut c_void, _data: *mut c_void) -> c_int {
0
}
#[no_mangle]
pub extern "C" fn xmlListRemoveFirst(_list: *mut c_void, _data: *mut c_void) -> c_int {
0
}
#[no_mangle]
pub extern "C" fn xmlListRemoveLast(_list: *mut c_void, _data: *mut c_void) -> c_int {
0
}
#[no_mangle]
pub extern "C" fn xmlListRemoveAll(_list: *mut c_void, _data: *mut c_void) -> c_int {
0
}
#[no_mangle]
pub extern "C" fn xmlListClear(_list: *mut c_void) {
}
#[no_mangle]
pub extern "C" fn xmlListEmpty(_list: *mut c_void) -> c_int {
1
}
#[no_mangle]
pub extern "C" fn xmlListFront(_list: *mut c_void) -> *mut c_void {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlListBack(_list: *mut c_void) -> *mut c_void {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlListSize(_list: *mut c_void) -> c_int {
0
}
#[no_mangle]
pub extern "C" fn xmlListSort(_list: *mut c_void) {
}
#[no_mangle]
pub extern "C" fn xmlListReverse(_list: *mut c_void) {
}
#[no_mangle]
pub extern "C" fn xmlListReverseSplice(_list: *mut c_void, _list2: *mut c_void) {
}
#[no_mangle]
pub extern "C" fn xmlListMerge(_list: *mut c_void, _list2: *mut c_void) {
}
#[no_mangle]
pub extern "C" fn xmlBufferCreate() -> *mut _xmlBuffer {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlBufferCreateSize(_size: usize) -> *mut _xmlBuffer {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlBufferCreateStatic(_mem: *mut c_void, _size: usize) -> *mut _xmlBuffer {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlBufferFree(_buf: *mut _xmlBuffer) {
}
#[no_mangle]
pub extern "C" fn xmlBufferEmpty(_buf: *mut _xmlBuffer) {
}
#[no_mangle]
pub extern "C" fn xmlBufferContent(_buf: *const _xmlBuffer) -> *mut xmlChar {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlBufferLength(_buf: *const _xmlBuffer) -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlBufferAdd(
_buf: *mut _xmlBuffer,
_str: *const xmlChar,
_len: c_int,
) -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlBufferAddHead(
_buf: *mut _xmlBuffer,
_str: *const xmlChar,
_len: c_int,
) -> c_int {
0
}
#[no_mangle]
pub extern "C" fn xmlBufferSetAllocationScheme(_buf: *mut _xmlBuffer, _scheme: c_int) {
}
#[no_mangle]
pub extern "C" fn xmlBufferShrink(_buf: *mut _xmlBuffer, _len: c_int) -> c_int {
0
}
#[no_mangle]
pub extern "C" fn xmlBufferGrow(_buf: *mut _xmlBuffer, _len: c_int) -> c_int {
0
}
#[no_mangle]
pub extern "C" fn xmlBufferReserve(_buf: *mut _xmlBuffer, _len: c_int) -> c_int {
0
}
#[no_mangle]
pub extern "C" fn xmlBufferDetach(_buf: *mut _xmlBuffer) -> *mut xmlChar {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlGetCharEncoding(_name: *const c_char) -> c_int {
0
}
#[no_mangle]
pub extern "C" fn xmlFindCharEncodingHandler(_name: *const c_char) -> *mut c_void {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlCharEncCloseFunc(_handler: *mut c_void) -> c_int {
0
}
#[no_mangle]
pub extern "C" fn xmlCharEncInput(_input: *mut _xmlParserInputBuffer, _to: c_int) -> c_int {
0
}
#[no_mangle]
pub extern "C" fn xmlCharEncOutput(_output: *mut _xmlOutputBuffer, _to: c_int) -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlXPathNewContext(_doc: *mut _xmlDoc) -> *mut _xmlXPathContext {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlXPathFreeContext(_ctxt: *mut _xmlXPathContext) {
}
#[no_mangle]
pub unsafe extern "C" fn xmlXPathEvalExpression(
_str: *const xmlChar,
_ctxt: *mut _xmlXPathContext,
) -> *mut _xmlXPathObject {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlXPathEval(
_str: *const xmlChar,
_ctxt: *mut _xmlXPathContext,
) -> *mut _xmlXPathObject {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlXPathFreeObject(_obj: *mut _xmlXPathObject) {
}
#[no_mangle]
pub unsafe extern "C" fn xmlXPathCompile(_str: *const xmlChar) -> *mut c_void {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlXPathFreeCompExpr(_comp: *mut c_void) {
}
#[no_mangle]
pub unsafe extern "C" fn xmlXPathRegisterNs(
_ctxt: *mut _xmlXPathContext,
_prefix: *const xmlChar,
_ns_uri: *const xmlChar,
) -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlXPathRegisterFunc(
_ctxt: *mut _xmlXPathContext,
_name: *const xmlChar,
_f: Option<unsafe extern "C" fn(*mut c_void, c_int)>,
) -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlXPathRegisterFuncNS(
_ctxt: *mut _xmlXPathContext,
_name: *const xmlChar,
_ns_uri: *const xmlChar,
_f: Option<unsafe extern "C" fn(*mut c_void, c_int)>,
) -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlXPathRegisterVariable(
_ctxt: *mut _xmlXPathContext,
_name: *const xmlChar,
_value: *mut _xmlXPathObject,
) -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlXPathNewNodeSet(_val: *mut _xmlNode) -> *mut _xmlXPathObject {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlXPathNewCString(_val: *const xmlChar) -> *mut _xmlXPathObject {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlXPathNewFloat(_val: f64) -> *mut _xmlXPathObject {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlXPathNewBoolean(_val: c_int) -> *mut _xmlXPathObject {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlXIncludeProcess(_doc: *mut _xmlDoc) -> c_int {
-1
}
#[no_mangle]
pub extern "C" fn xmlXIncludeProcessFlags(_doc: *mut _xmlDoc, _flags: c_int) -> c_int {
-1
}
#[no_mangle]
pub extern "C" fn xmlCatalogLoad(_catalogs: *const c_char) -> *mut c_void {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlCatalogResolvePublic(_pubID: *const xmlChar) -> *mut xmlChar {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlCatalogResolveSystem(_sysID: *const xmlChar) -> *mut xmlChar {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn xmlCatalogResolveURI(_URI: *const xmlChar) -> *mut xmlChar {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlCatalogSetDefaults(_allow: c_int) {
}
#[no_mangle]
pub extern "C" fn xmlCatalogGetDefaults() -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlCatalogAdd(
_type: *const xmlChar,
_orig: *const xmlChar,
_replace: *const xmlChar,
) -> c_int {
0
}
#[no_mangle]
pub unsafe extern "C" fn xmlCatalogRemove(_value: *const xmlChar) -> c_int {
0
}
#[no_mangle]
pub extern "C" fn xmlCatalogCleanup() {
}
#[no_mangle]
pub extern "C" fn xmlCatalogConvert() -> *mut _xmlDoc {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn htmlParseFile(
_filename: *const c_char,
_encoding: *const c_char,
) -> *mut _xmlDoc {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn htmlParseMemory(_buffer: *const c_char, _size: c_int) -> *mut _xmlDoc {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn htmlParseDoc(
_cur: *const xmlChar,
_encoding: *const c_char,
) -> *mut _xmlDoc {
ptr::null_mut()
}
#[no_mangle]
pub unsafe extern "C" fn htmlCreateFileParserCtxt(
_filename: *const c_char,
_encoding: *const c_char,
) -> *mut c_void {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn htmlFreeParserCtxt(_ctxt: *mut c_void) {
}
#[no_mangle]
pub extern "C" fn htmlInitParser() {
}
#[no_mangle]
pub extern "C" fn htmlCleanupParser() {
}
#[no_mangle]
pub unsafe extern "C" fn xmlDebugDumpDocument(_output: *mut c_void, _doc: *mut _xmlDoc) {
}
#[no_mangle]
pub unsafe extern "C" fn xmlDebugDumpNode(_output: *mut c_void, _node: *mut _xmlNode) {
}
#[no_mangle]
pub unsafe extern "C" fn xmlDebugDumpNodeList(_output: *mut c_void, _node: *mut _xmlNode) {
}
#[no_mangle]
pub extern "C" fn xmlGetBinaryPath() -> *mut c_char {
ptr::null_mut()
}
#[no_mangle]
pub extern "C" fn xmlGetHomeOfBinary() -> *mut c_char {
ptr::null_mut()
}