Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Chromium
third_party/libxml/src/valid.c
int xmlValidGetPotentialChildren(xmlElementContent *ctree, const xmlChar **names, int *len, int max) { int i; if ((ctree == NULL) || (names == NULL) || (len == NULL)) return (-1); if (*len >= max) return (*len); switch (ctree->type) { case XML_ELEMENT_CONTENT_PCDATA:...
[ 1, 0 ]
Chromium
third_party/libxml/src/valid.c
static void XMLCDECL xmlNoValidityErr(void *ctx ATTRIBUTE_UNUSED, const char *msg ATTRIBUTE_UNUSED, ...) { return; }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
static void xmlIOErrMemory(const char *extra) { __xmlSimpleError(XML_FROM_IO, XML_ERR_NO_MEMORY, NULL, NULL, extra); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
xmlChar *xmlNormalizeWindowsPath(const xmlChar *path) { return xmlCanonicPath(path); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
void xmlCleanupOutputCallbacks(void) { int i; if (!xmlOutputCallbackInitialized) return; for (i = xmlOutputCallbackNr - 1; i >= 0; i--) { xmlOutputCallbackTable[i].matchcallback = NULL; xmlOutputCallbackTable[i].opencallback = NULL; xmlOutputCallbackTable[i].writecallback = NULL; xmlOutputCa...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
static FILE *xmlWrapOpenUtf8(const char *path, int mode) { FILE *fd = NULL; wchar_t *wPath; wPath = __xmlIOWin32UTF8ToWChar(path); if (wPath) { fd = _wfopen(wPath, mode ? L"wb" : L"rb"); xmlFree(wPath); } if (fd == NULL) fd = fopen(path, mode ? "wb" : "rb"); return fd; }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
static gzFile xmlWrapGzOpenUtf8(const char *path, const char *mode) { gzFile fd; wchar_t *wPath; fd = gzopen(path, mode); if (fd) return fd; wPath = __xmlIOWin32UTF8ToWChar(path); if (wPath) { int d, m = (strstr(mode, "r") ? O_RDONLY : O_RDWR); #ifdef _O_BINARY m |= (strstr(mode, "b") ? _O_BIN...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
static int xmlFdClose(void *context) { int ret; ret = close((int)(ptrdiff_t)context); if (ret < 0) xmlIOErr(0, "close()"); return (ret); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
static void *xmlFileOpenW(const char *filename) { const char *path = NULL; FILE *fd; if (!strcmp(filename, "-")) { fd = stdout; return ((void *)fd); } if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17)) #if defined(_WIN32) || defined(__DJGPP__) && !defined(__CYGWIN__) path ...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
static void *xmlGzfileOpen_real(const char *filename) { const char *path = NULL; gzFile fd; if (!strcmp(filename, "-")) { int duped_fd = dup(fileno(stdin)); fd = gzdopen(duped_fd, "rb"); if (fd == Z_NULL && duped_fd >= 0) { close(duped_fd); } return ((void *)fd); } if (!xmlStrncas...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
static void *xmlXzfileOpen_real(const char *filename) { const char *path = NULL; xzFile fd; if (!strcmp(filename, "-")) { fd = __libxml2_xzdopen(dup(fileno(stdin)), "rb"); return ((void *)fd); } if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17)) { path = &filename[16]; ...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
static void *xmlXzfileOpen(const char *filename) { char *unescaped; void *retval; retval = xmlXzfileOpen_real(filename); if (retval == NULL) { unescaped = xmlURIUnescapeString(filename, 0, NULL); if (unescaped != NULL) { retval = xmlXzfileOpen_real(unescaped); } xmlFree(unescaped); } ...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
static void append_reverse_ulong(xmlZMemBuff *buff, unsigned long data) { int idx; if (buff == NULL) return; for (idx = 0; idx < 4; idx++) { *buff->zctrl.next_out = (data & 0xff); data >>= 8; buff->zctrl.next_out++; } return; }
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
static void xmlFreeZMemBuff(xmlZMemBuffPtr buff) { #ifdef DEBUG_HTTP int z_err; #endif if (buff == NULL) return; xmlFree(buff->zbuff); #ifdef DEBUG_HTTP z_err = deflateEnd(&buff->zctrl); if (z_err != Z_OK) xmlGenericError(xmlGenericErrorContext, "xmlFreeZMemBuff: Error releasin...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
static void *xmlCreateZMemBuff(int compression) { int z_err; int hdr_lgth; xmlZMemBuffPtr buff = NULL; if ((compression < 1) || (compression > 9)) return (NULL); buff = xmlMalloc(sizeof(xmlZMemBuff)); if (buff == NULL) { xmlIOErrMemory("creating buffer context"); return (NULL); } (void)m...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
void *xmlIOHTTPOpen(const char *filename) { return (xmlNanoHTTPOpen(filename, NULL)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
static void *xmlIOHTTPDfltOpenW(const char *post_uri) { return (xmlIOHTTPOpenW(post_uri, 0)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
int xmlIOHTTPRead(void *context, char *buffer, int len) { if ((buffer == NULL) || (len < 0)) return (-1); return (xmlNanoHTTPRead(context, &buffer[0], len)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
static int xmlIOHTTPWrite(void *context, const char *buffer, int len) { xmlIOHTTPWriteCtxtPtr ctxt = context; if ((ctxt == NULL) || (ctxt->doc_buff == NULL) || (buffer == NULL)) return (-1); if (len > 0) { #ifdef LIBXML_ZLIB_ENABLED if (ctxt->compression > 0) len = xmlZMemBuffAppend(ctxt->doc_bu...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
int xmlIOHTTPClose(void *context) { xmlNanoHTTPClose(context); return 0; }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
int xmlRegisterInputCallbacks(xmlInputMatchCallback matchFunc, xmlInputOpenCallback openFunc, xmlInputReadCallback readFunc, xmlInputCloseCallback closeFunc) { if (xmlInputCallbackNr >= MAX_INPUT_CALLBACK) { return (-1); }...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
xmlOutputBufferPtr xmlAllocOutputBuffer(xmlCharEncodingHandlerPtr encoder) { xmlOutputBufferPtr ret; ret = (xmlOutputBufferPtr)xmlMalloc(sizeof(xmlOutputBuffer)); if (ret == NULL) { xmlIOErrMemory("creating output buffer"); return (NULL); } memset(ret, 0, (size_t)sizeof(xmlOutputBuffer)); ret->buff...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
xmlParserInputBufferPtr xmlParserInputBufferCreateFile(FILE *file, xmlCharEncoding enc) { xmlParserInputBufferPtr ret; if (xmlInputCallbackInitialized == 0) xmlRegisterDefaultInputCallbacks(); if (file == NULL) return (NULL); ret = xmlAllocParser...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
const xmlChar *xmlOutputBufferGetContent(xmlOutputBufferPtr out) { if ((out == NULL) || (out->buffer == NULL)) return (NULL); return (xmlBufContent(out->buffer)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
xmlParserInputBufferPtr xmlParserInputBufferCreateFd(int fd, xmlCharEncoding enc) { xmlParserInputBufferPtr ret; if (fd < 0) return (NULL); ret = xmlAllocParserInputBuffer(enc); if (ret != NULL) { ret->context = (void *)(ptrdiff_t)fd; ret->readc...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
xmlParserInputBufferPtr xmlParserInputBufferCreateStatic(const char *mem, int size, xmlCharEncoding enc) { xmlParserInputBufferPtr ret; if (size < 0) return (NULL); if (mem == NULL) return (N...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func) { xmlOutputBufferCreateFilenameFunc old = xmlOutputBufferCreateFilenameValue; #ifdef LIBXML_OUTPUT_ENABLED if (old == NULL) { old = __xmlOutputBufferCreateFilename; } #endif xmlOutputBufferCreateFi...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
xmlParserInputPtr xmlCheckHTTPInput(xmlParserCtxtPtr ctxt, xmlParserInputPtr ret) { #ifdef LIBXML_HTTP_ENABLED if ((ret != NULL) && (ret->buf != NULL) && (ret->buf->readcallback == xmlIOHTTPRead) && (ret->buf->context != NULL)) { const char *encoding; const char...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
static xmlParserInputPtr xmlDefaultExternalEntityLoader(const char *URL, const char *ID, xmlParserCtxtPtr ctxt) { xmlParserInputPtr ret = NULL; xmlChar *resource = NULL; #ifdef DEBUG_EXTERNAL_ENTITIES ...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlIO.c
xmlParserInputPtr xmlNoNetExternalEntityLoader(const char *URL, const char *ID, xmlParserCtxtPtr ctxt) { xmlParserInputPtr input = NULL; xmlChar *resource = NULL; #ifdef LIBXML_CATALOG_ENABLED resource = xmlResolveResourceFromCatalog(URL, ID, ctxt); #endif if (re...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlmemory.c
void *xmlMallocLoc(size_t size, const char *file, int line) { MEMHDR *p; void *ret; if (!xmlMemInitialized) xmlInitMemory(); #ifdef DEBUG_MEMORY xmlGenericError(xmlGenericErrorContext, "Malloc(%d)\n", size); #endif TEST_POINT if (size > (MAX_SIZE_T - RESERVE_SIZE)) { xmlGenericError(xmlGenericErr...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlmemory.c
void *xmlMallocAtomicLoc(size_t size, const char *file, int line) { MEMHDR *p; void *ret; if (!xmlMemInitialized) xmlInitMemory(); #ifdef DEBUG_MEMORY xmlGenericError(xmlGenericErrorContext, "Malloc(%d)\n", size); #endif TEST_POINT if (size > (MAX_SIZE_T - RESERVE_SIZE)) { xmlGenericError(xmlGene...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlmemory.c
char *xmlMemStrdupLoc(const char *str, const char *file, int line) { char *s; size_t size = strlen(str) + 1; MEMHDR *p; if (!xmlMemInitialized) xmlInitMemory(); TEST_POINT if (size > (MAX_SIZE_T - RESERVE_SIZE)) { xmlGenericError(xmlGenericErrorContext, "xmlMemStrdupLoc : Unsig...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlmemory.c
int xmlGcMemGet(xmlFreeFunc *freeFunc, xmlMallocFunc *mallocFunc, xmlMallocFunc *mallocAtomicFunc, xmlReallocFunc *reallocFunc, xmlStrdupFunc *strdupFunc) { if (freeFunc != NULL) *freeFunc = xmlFree; if (mallocFunc != NULL) *mallocFunc = xmlMalloc; if (mallocAtomicFunc != N...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
static int xmlTextReaderRemoveID(xmlDocPtr doc, xmlAttrPtr attr) { xmlIDTablePtr table; xmlIDPtr id; xmlChar *ID; if (doc == NULL) return (-1); if (attr == NULL) return (-1); table = (xmlIDTablePtr)doc->ids; if (table == NULL) return (-1); ID = xmlNodeListGetString(doc, attr->children, 1);...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
static int xmlTextReaderWalkRemoveRef(const void *data, void *user) { xmlRefPtr ref = (xmlRefPtr)data; xmlAttrPtr attr = (xmlAttrPtr)user; if (ref->attr == attr) { ref->name = xmlStrdup(attr->name); ref->attr = NULL; return 0; } return 1; }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
static void xmlTextReaderFreeIDTable(xmlIDTablePtr table) { xmlHashFree(table, xmlTextReaderFreeIDTableEntry); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
static void xmlTextReaderDebug(xmlTextReaderPtr reader) { if ((reader == NULL) || (reader->ctxt == NULL)) { fprintf(stderr, "xmlTextReader NULL\n"); return; } fprintf(stderr, "xmlTextReader: state %d depth %d ", reader->state, reader->depth); if (reader->node == NULL) { fprintf(stderr, "no...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
static xmlChar *xmlTextReaderCollectSiblings(xmlNodePtr node) { xmlBufferPtr buffer; xmlChar *ret; if ((node == NULL) || (node->type == XML_NAMESPACE_DECL)) return (NULL); buffer = xmlBufferCreate(); if (buffer == NULL) return NULL; for (; node != NULL; node = node->next) { switch (node->type...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
int xmlTextReaderNext(xmlTextReaderPtr reader) { int ret; xmlNodePtr cur; if (reader == NULL) return (-1); if (reader->doc != NULL) return (xmlTextReaderNextTree(reader)); cur = reader->node; if ((cur == NULL) || (cur->type != XML_ELEMENT_NODE)) return (xmlTextReaderRead(reader)); if (reader-...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
xmlChar *xmlTextReaderReadInnerXml(xmlTextReaderPtr reader ATTRIBUTE_UNUSED) { xmlChar *resbuf; xmlNodePtr node, cur_node; xmlBufferPtr buff, buff2; xmlDocPtr doc; if (xmlTextReaderExpand(reader) == NULL) { return NULL; } doc = reader->node->doc; buff = xmlBufferCreate(); if (buff == NULL) re...
[ 1, 1 ]
Chromium
third_party/libxml/src/xmlreader.c
xmlChar *xmlTextReaderReadOuterXml(xmlTextReaderPtr reader ATTRIBUTE_UNUSED) { xmlChar *resbuf; xmlNodePtr node; xmlBufferPtr buff; xmlDocPtr doc; if (xmlTextReaderExpand(reader) == NULL) { return NULL; } node = reader->node; doc = node->doc; /* XXX: Why is the node copied? */ if (node->type ==...
[ 0, 1 ]
Chromium
third_party/libxml/src/xmlreader.c
static int xmlTextReaderNextTree(xmlTextReaderPtr reader) { if (reader == NULL) return (-1); if (reader->state == XML_TEXTREADER_END) return (0); if (reader->node == NULL) { if (reader->doc->children == NULL) { reader->state = XML_TEXTREADER_END; return (0); } reader->node = rea...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
int xmlTextReaderNextSibling(xmlTextReaderPtr reader) { if (reader == NULL) return (-1); if (reader->doc == NULL) { /* TODO */ return (-1); } if (reader->state == XML_TEXTREADER_END) return (0); if (reader->node == NULL) return (xmlTextReaderNextTree(reader)); if (reader->node->next !...
[ 1, 1 ]
Chromium
third_party/libxml/src/xmlreader.c
xmlTextReaderPtr xmlNewTextReaderFilename(const char *URI) { xmlParserInputBufferPtr input; xmlTextReaderPtr ret; char *directory = NULL; input = xmlParserInputBufferCreateFilename(URI, XML_CHAR_ENCODING_NONE); if (input == NULL) return (NULL); ret = xmlNewTextReader(input, URI); if (ret == NULL) { ...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
int xmlTextReaderClose(xmlTextReaderPtr reader) { if (reader == NULL) return (-1); reader->node = NULL; reader->curnode = NULL; reader->mode = XML_TEXTREADER_MODE_CLOSED; if (reader->ctxt != NULL) { xmlStopParser(reader->ctxt); if (reader->ctxt->myDoc != NULL) { if (reader->preserve == 0) ...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
xmlChar *xmlTextReaderGetAttributeNo(xmlTextReaderPtr reader, int no) { xmlChar *ret; int i; xmlAttrPtr cur; xmlNsPtr ns; if (reader == NULL) return (NULL); if (reader->node == NULL) return (NULL); if (reader->curnode != NULL) return (NULL); if (reader->node->type != XML_ELEMENT_NODE) ...
[ 1, 1 ]
Chromium
third_party/libxml/src/xmlreader.c
xmlChar *xmlTextReaderLookupNamespace(xmlTextReaderPtr reader, const xmlChar *prefix) { xmlNsPtr ns; if (reader == NULL) return (NULL); if (reader->node == NULL) return (NULL); ns = xmlSearchNs(reader->node->doc, reader->node, prefix); if (ns == NULL) return...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
int xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader, int no) { int i; xmlAttrPtr cur; xmlNsPtr ns; if (reader == NULL) return (-1); if (reader->node == NULL) return (-1); if (reader->node->type != XML_ELEMENT_NODE) return (-1); reader->curnode = NULL; ns = reader->node->nsDef; f...
[ 1, 1 ]
Chromium
third_party/libxml/src/xmlreader.c
int xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader, const xmlChar *localName, const xmlChar *namespaceURI) { xmlAttrPtr prop; xmlNodePtr node; xmlNsPtr ns; xmlChar *prefix = NULL; if ((reader == NULL) || (localName == NULL) || (nam...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
int xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader) { if (reader == NULL) return (-1); if (reader->node == NULL) return (-1); if (reader->node->type != XML_ELEMENT_NODE) return (0); if (reader->node->nsDef != NULL) { reader->curnode = (xmlNodePtr)reader->node->nsDef; return (1); ...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
int xmlTextReaderMoveToElement(xmlTextReaderPtr reader) { if (reader == NULL) return (-1); if (reader->node == NULL) return (-1); if (reader->node->type != XML_ELEMENT_NODE) return (0); if (reader->curnode != NULL) { reader->curnode = NULL; return (1); } return (0); }
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
int xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader) { if (reader == NULL) return (-1); if (reader->node == NULL) return (-1); if (reader->curnode == NULL) return (0); if (reader->curnode->type == XML_ATTRIBUTE_NODE) { if (reader->curnode->children == NULL) return (0); reader->...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
int xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader) { if ((reader == NULL) || (reader->node == NULL)) return (-1); if (reader->node->type != XML_ELEMENT_NODE) return (0); if (reader->curnode != NULL) return (0); if (reader->node->children != NULL) return (0); if (reader->state == XML_TEXT...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
xmlChar *xmlTextReaderPrefix(xmlTextReaderPtr reader) { xmlNodePtr node; if ((reader == NULL) || (reader->node == NULL)) return (NULL); if (reader->curnode != NULL) node = reader->curnode; else node = reader->node; if (node->type == XML_NAMESPACE_DECL) { xmlNsPtr ns = (xmlNsPtr)node; if (n...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
xmlChar *xmlTextReaderBaseUri(xmlTextReaderPtr reader) { if ((reader == NULL) || (reader->node == NULL)) return (NULL); return (xmlNodeGetBase(NULL, reader->node)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
int xmlTextReaderQuoteChar(xmlTextReaderPtr reader) { if (reader == NULL) return (-1); /* TODO maybe lookup the attribute value for " first */ return ((int)'"'); }
[ 0, 1 ]
Chromium
third_party/libxml/src/xmlreader.c
const xmlChar *xmlTextReaderConstXmlLang(xmlTextReaderPtr reader) { xmlChar *tmp; const xmlChar *ret; if (reader == NULL) return (NULL); if (reader->node == NULL) return (NULL); tmp = xmlNodeGetLang(reader->node); if (tmp == NULL) return (NULL); ret = CONSTSTR(tmp); xmlFree(tmp); return (...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
const xmlChar *xmlTextReaderConstString(xmlTextReaderPtr reader, const xmlChar *str) { if (reader == NULL) return (NULL); return (CONSTSTR(str)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
int xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader) { if ((reader == NULL) || (reader->ctxt == NULL) || (reader->ctxt->input == NULL)) { return (0); } return (reader->ctxt->input->line); }
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
int xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader, xmlRelaxNGPtr schema) { if (reader == NULL) return (-1); if (schema == NULL) { if (reader->rngSchemas != NULL) { xmlRelaxNGFree(reader->rngSchemas); reader->rngSchemas = NULL; } if (reader->rngVa...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
int xmlTextReaderSchemaValidate(xmlTextReaderPtr reader, const char *xsd) { return (xmlTextReaderSchemaValidateInternal(reader, xsd, NULL, 0)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
static char *xmlTextReaderBuildMessage(const char *msg, va_list ap) { int size = 0; int chars; char *larger; char *str = NULL; va_list aq; while (1) { VA_COPY(aq, ap); chars = vsnprintf(str, size, msg, aq); va_end(aq); if (chars < 0) { xmlGenericError(xmlGenericErrorContext, "vsnprint...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
static void xmlTextReaderStructuredError(void *ctxt, xmlErrorPtr error) { xmlParserCtxtPtr ctx = (xmlParserCtxtPtr)ctxt; xmlTextReaderPtr reader = (xmlTextReaderPtr)ctx->_private; if (error && reader->sErrorFunc) { reader->sErrorFunc(reader->errorFuncArg, (xmlErrorPtr)error); } }
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
int xmlTextReaderIsValid(xmlTextReaderPtr reader) { if (reader == NULL) return (-1); #ifdef LIBXML_SCHEMAS_ENABLED if (reader->validate == XML_TEXTREADER_VALIDATE_RNG) return (reader->rngValidErrors == 0); if (reader->validate == XML_TEXTREADER_VALIDATE_XSD) return (reader->xsdValidErrors == 0); #endi...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
xmlTextReaderPtr xmlReaderWalker(xmlDocPtr doc) { xmlTextReaderPtr ret; if (doc == NULL) return (NULL); ret = xmlMalloc(sizeof(xmlTextReader)); if (ret == NULL) { xmlGenericError(xmlGenericErrorContext, "xmlNewTextReader : malloc failed\n"); return (NULL); } memset(ret, 0, ...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
xmlTextReaderPtr xmlReaderForIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, const char *URL, const char *encoding, int options) { xmlTextReaderPtr reader; xmlParserInputBufferPtr input; if...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
int xmlReaderNewWalker(xmlTextReaderPtr reader, xmlDocPtr doc) { if (doc == NULL) return (-1); if (reader == NULL) return (-1); if (reader->input != NULL) { xmlFreeParserInputBuffer(reader->input); } if (reader->ctxt != NULL) { xmlCtxtReset(reader->ctxt); } reader->entNr = 0; reader->i...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlreader.c
int xmlReaderNewDoc(xmlTextReaderPtr reader, const xmlChar *cur, const char *URL, const char *encoding, int options) { int len; if (cur == NULL) return (-1); if (reader == NULL) return (-1); len = xmlStrlen(cur); return (xmlReaderNewMemory(reader, (const char *)cur, len, URL, en...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlsave.c
int xmlIsXHTML(const xmlChar *systemID, const xmlChar *publicID) { if ((systemID == NULL) && (publicID == NULL)) return (-1); if (publicID != NULL) { if (xmlStrEqual(publicID, XHTML_STRICT_PUBLIC_ID)) return (1); if (xmlStrEqual(publicID, XHTML_FRAME_PUBLIC_ID)) return (1); if (xmlStrEqu...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlsave.c
static unsigned char *xmlSerializeHexCharRef(unsigned char *out, int val) { unsigned char *ptr; *out++ = '&'; *out++ = '#'; *out++ = 'x'; if (val < 0x10) ptr = out; else if (val < 0x100) ptr = out + 1; else if (val < 0x1000) ptr = out + 2; else if (val < 0x10000) ptr = out + 3; else i...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlsave.c
static void xmlSaveCtxtInit(xmlSaveCtxtPtr ctxt) { int i; int len; if (ctxt == NULL) return; if ((ctxt->encoding == NULL) && (ctxt->escape == NULL)) ctxt->escape = xmlEscapeEntities; len = xmlStrlen((xmlChar *)xmlTreeIndentString); if ((xmlTreeIndentString == NULL) || (len == 0)) { memset(&ctxt...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlsave.c
void xmlBufDumpElementDecl(xmlBufPtr buf, xmlElementPtr elem) { xmlBufferPtr buffer; buffer = xmlBufferCreate(); if (buffer == NULL) { /* * TODO set the error in buf */ return; } xmlDumpElementDecl(buffer, elem); xmlBufMergeBuffer(buf, buffer); }
[ 0, 1 ]
Chromium
third_party/libxml/src/xmlsave.c
void xmlBufDumpAttributeDecl(xmlBufPtr buf, xmlAttributePtr attr) { xmlBufferPtr buffer; buffer = xmlBufferCreate(); if (buffer == NULL) { /* * TODO set the error in buf */ return; } xmlDumpAttributeDecl(buffer, attr); xmlBufMergeBuffer(buf, buffer); }
[ 0, 1 ]
Chromium
third_party/libxml/src/xmlsave.c
static void xmlNsDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur, xmlSaveCtxtPtr ctxt) { if ((cur == NULL) || (buf == NULL)) return; if ((cur->type == XML_LOCAL_NAMESPACE) && (cur->href != NULL)) { if (xmlStrEqual(cur->prefix, BAD_CAST "xml")) return; if (ctxt != NULL ...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlsave.c
static void xmlAttrDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) { xmlOutputBufferPtr buf; if (cur == NULL) return; buf = ctxt->buf; if (buf == NULL) return; if (ctxt->format == 2) xmlOutputBufferWriteWSNonSig(ctxt, 2); else xmlOutputBufferWrite(buf, 1, " "); if ((cur->ns != NULL) && (c...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlsave.c
static int htmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { const xmlChar *oldenc = NULL; const xmlChar *oldctxtenc = ctxt->encoding; const xmlChar *encoding = ctxt->encoding; xmlOutputBufferPtr buf = ctxt->buf; int switched_encoding = 0; xmlDocPtr doc; xmlInitParser(); doc = cur->doc...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlsave.c
static int xhtmlIsEmpty(xmlNodePtr node) { if (node == NULL) return (-1); if (node->type != XML_ELEMENT_NODE) return (0); if ((node->ns != NULL) && (!xmlStrEqual(node->ns->href, XHTML_NS_NAME))) return (0); if (node->children != NULL) return (0); switch (node->name[0]) { case 'a': if (xm...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlsave.c
xmlSaveCtxtPtr xmlSaveToFilename(const char *filename, const char *encoding, int options) { xmlSaveCtxtPtr ret; int compression = 0; /* TODO handle compression option */ ret = xmlNewSaveCtxt(encoding, options); if (ret == NULL) return (NULL); ret->buf = xmlOutputBufferCre...
[ 0, 1 ]
Chromium
third_party/libxml/src/xmlsave.c
xmlSaveCtxtPtr xmlSaveToIO(xmlOutputWriteCallback iowrite, xmlOutputCloseCallback ioclose, void *ioctx, const char *encoding, int options) { xmlSaveCtxtPtr ret; ret = xmlNewSaveCtxt(encoding, options); if (ret == NULL) return (NULL); ret->buf = xmlOutpu...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlsave.c
long xmlSaveTree(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { long ret = 0; if ((ctxt == NULL) || (cur == NULL)) return (-1); #ifdef LIBXML_HTML_ENABLED if (ctxt->options & XML_SAVE_XHTML) { xhtmlNodeDumpOutput(ctxt, cur); return (ret); } if (((cur->type != XML_NAMESPACE_DECL) && (cur->doc != NULL) && ...
[ 0, 1 ]
Chromium
third_party/libxml/src/xmlsave.c
int xmlSaveSetEscape(xmlSaveCtxtPtr ctxt, xmlCharEncodingOutputFunc escape) { if (ctxt == NULL) return (-1); ctxt->escape = escape; return (0); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlsave.c
void xmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, int format, const char *encoding) { xmlSaveCtxt ctxt; #ifdef LIBXML_HTML_ENABLED xmlDtdPtr dtd; int is_xhtml = 0; #endif xmlInitParser(); if ((buf == NULL) || (cur == NULL)) return; if (enc...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlsave.c
int xmlDocFormatDump(FILE *f, xmlDocPtr cur, int format) { xmlSaveCtxt ctxt; xmlOutputBufferPtr buf; const char *encoding; xmlCharEncodingHandlerPtr handler = NULL; int ret; if (cur == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlDocDump : document == NULL\n"); #endif retur...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlsave.c
int xmlSaveFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding) { xmlSaveCtxt ctxt; int ret; if (buf == NULL) return (-1); if (cur == NULL) { xmlOutputBufferClose(buf); return (-1); } memset(&ctxt, 0, sizeof(ctxt)); ctxt.buf = buf; ctxt.level = 0; ctxt.format = 0; ctxt.en...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlsave.c
int xmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char *encoding) { return (xmlSaveFormatFileEnc(filename, cur, encoding, 0)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlstring.c
int xmlStrncmp(const xmlChar *str1, const xmlChar *str2, int len) { if (len <= 0) return (0); if (str1 == str2) return (0); if (str1 == NULL) return (-1); if (str2 == NULL) return (1); #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION return (strncmp((const char *)str1, (const char *)str2, len))...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlstring.c
int xmlStrcasecmp(const xmlChar *str1, const xmlChar *str2) { register int tmp; if (str1 == str2) return (0); if (str1 == NULL) return (-1); if (str2 == NULL) return (1); do { tmp = casemap[*str1++] - casemap[*str2]; if (tmp != 0) return (tmp); } while (*str2++ != 0); return 0; ...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlstring.c
xmlChar *xmlStrsub(const xmlChar *str, int start, int len) { int i; if (str == NULL) return (NULL); if (start < 0) return (NULL); if (len < 0) return (NULL); for (i = 0; i < start; i++) { if (*str == 0) return (NULL); str++; } if (*str == 0) return (NULL); return (xmlStrn...
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlstring.c
int xmlStrlen(const xmlChar *str) { int len = 0; if (str == NULL) return (0); while (*str != 0) { str++; len++; } return (len); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlstring.c
xmlChar *xmlStrcat(xmlChar *cur, const xmlChar *add) { const xmlChar *p = add; if (add == NULL) return (cur); if (cur == NULL) return (xmlStrdup(add)); while (*p != 0) p++; return (xmlStrncat(cur, add, p - add)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlstring.c
int XMLCDECL xmlStrPrintf(xmlChar *buf, int len, const char *msg, ...) { va_list args; int ret; if ((buf == NULL) || (msg == NULL)) { return (-1); } va_start(args, msg); ret = vsnprintf((char *)buf, len, (const char *)msg, args); va_end(args); buf[len - 1] = 0; return (ret); }
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlstring.c
int xmlUTF8Charcmp(const xmlChar *utf1, const xmlChar *utf2) { if (utf1 == NULL) { if (utf2 == NULL) return 0; return -1; } return xmlStrncmp(utf1, utf2, xmlUTF8Size(utf1)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlstring.c
int xmlGetUTF8Char(const unsigned char *utf, int *len) { unsigned int c; if (utf == NULL) goto error; if (len == NULL) goto error; if (*len < 1) goto error; c = utf[0]; if (c & 0x80) { if (*len < 2) goto error; if ((utf[1] & 0xc0) != 0x80) goto error; if ((c & 0xe0) == ...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlstring.c
const xmlChar *xmlUTF8Strpos(const xmlChar *utf, int pos) { xmlChar ch; if (utf == NULL) return (NULL); if (pos < 0) return (NULL); while (pos--) { if ((ch = *utf++) == 0) return (NULL); if (ch & 0x80) { if ((ch & 0xc0) != 0xc0) return (NULL); /* then skip over remain...
[ 1, 0 ]
Chromium
third_party/libxml/src/xmlunicode.c
int xmlUCSIsAegeanNumbers(int code) { return (((code >= 0x10100) && (code <= 0x1013F))); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlunicode.c
int xmlUCSIsArabic(int code) { return (((code >= 0x0600) && (code <= 0x06FF))); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlunicode.c
int xmlUCSIsBasicLatin(int code) { return (((code >= 0x0000) && (code <= 0x007F))); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlunicode.c
int xmlUCSIsBopomofo(int code) { return (((code >= 0x3100) && (code <= 0x312F))); }
[ 0, 0 ]
Chromium
third_party/libxml/src/xmlunicode.c
int xmlUCSIsBraillePatterns(int code) { return (((code >= 0x2800) && (code <= 0x28FF))); }
[ 0, 0 ]