Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Chromium
third_party/libxml/src/testSAX.c
int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { printf("%s : SAX1 parsing support not compiled in\n", argv[0]); return (0); } #endif
[ 0, 0 ]
Chromium
third_party/libxml/src/testThreads.c
int main(void) { unsigned int i, repeat; int ret; xmlInitParser(); for (repeat = 0; repeat < TEST_REPEAT_COUNT; repeat++) { xmlLoadCatalog(catalog); memset(tid, 0xff, sizeof(*tid) * num_threads); for (i = 0; i < num_threads; i++) { ret = pthread_create(&tid[i], NULL, thread_specific_data, ...
[ 1, 0 ]
Chromium
third_party/libxml/src/testThreads.c
static DWORD WINAPI win32_thread_specific_data(void *private_data) { thread_specific_data(private_data); return (0); }
[ 0, 0 ]
Chromium
third_party/libxml/src/testThreads.c
int main(void) { unsigned int i, repeat; status_t ret; xmlInitParser(); printf("Parser initialized\n"); for (repeat = 0; repeat < TEST_REPEAT_COUNT; repeat++) { printf("repeat: %d\n", repeat); xmlLoadCatalog(catalog); printf("loaded catalog: %s\n", catalog); for (i = 0; i < num_threads; i++) ...
[ 0, 0 ]
Chromium
third_party/libxml/src/testXPath.c
int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { printf("%s : XPath/Debug support not compiled in\n", argv[0]); return (0); } #endif
[ 0, 0 ]
Chromium
third_party/libxml/src/threads.c
void xmlRMutexUnlock(xmlRMutexPtr tok ATTRIBUTE_UNUSED) { if (tok == NULL) return; #ifdef HAVE_PTHREAD_H if (libxml_is_threaded == 0) return; pthread_mutex_lock(&tok->lock); tok->held--; if (tok->held == 0) { if (tok->waiters) pthread_cond_signal(&tok->cv); memset(&tok->tid, 0, sizeof(t...
[ 1, 0 ]
Chromium
third_party/libxml/src/threads.c
void __xmlGlobalInitMutexLock(void) { #ifdef HAVE_PTHREAD_H /* The mutex is statically initialized, so we just lock it. */ #ifdef XML_PTHREAD_WEAK if (pthread_mutex_lock == NULL) return; #endif /* XML_PTHREAD_WEAK */ pthread_mutex_lock(&global_init_lock); #elif defined HAVE_WIN32_THREADS LPCRITICAL_SECTION...
[ 1, 0 ]
Chromium
third_party/libxml/src/threads.c
static void xmlFreeGlobalState(void *state) { xmlGlobalState *gs = (xmlGlobalState *)state; xmlResetError(&(gs->xmlLastError)); free(state); }
[ 1, 0 ]
Chromium
third_party/libxml/src/threads.c
static xmlGlobalStatePtr xmlNewGlobalState(void) { xmlGlobalState *gs; gs = malloc(sizeof(xmlGlobalState)); if (gs == NULL) { xmlGenericError(xmlGenericErrorContext, "xmlGetGlobalState: out of memory\n"); return (NULL); } memset(gs, 0, sizeof(xmlGlobalState)); xmlInitializeGlob...
[ 1, 0 ]
Chromium
third_party/libxml/src/threads.c
void xmlGlobalStateCleanup(void *data) { void *globalval = tls_get(globalkey); if (globalval != NULL) xmlFreeGlobalState(globalval); }
[ 0, 0 ]
Chromium
third_party/libxml/src/threads.c
int xmlIsMainThread(void) { #ifdef HAVE_PTHREAD_H if (libxml_is_threaded == -1) xmlInitThreads(); if (libxml_is_threaded == 0) return (1); pthread_once(&once_control, xmlOnceInit); #elif defined HAVE_WIN32_THREADS xmlOnceInit(); #elif defined HAVE_BEOS_THREADS xmlOnceInit(); #endif #ifdef DEBUG_THREA...
[ 0, 0 ]
Chromium
third_party/libxml/src/threads.c
void xmlUnlockLibrary(void) { #ifdef DEBUG_THREADS xmlGenericError(xmlGenericErrorContext, "xmlUnlockLibrary()\n"); #endif xmlRMutexUnlock(xmlLibraryLock); }
[ 0, 0 ]
Chromium
third_party/libxml/src/timsort.h
static int clzll(uint64_t x) { int n; if (x == 0) { return 64; } n = 0; if (x <= 0x00000000FFFFFFFFL) { n = n + 32; x = x << 32; } if (x <= 0x0000FFFFFFFFFFFFL) { n = n + 16; x = x << 16; } if (x <= 0x00FFFFFFFFFFFFFFL) { n = n + 8; x = x << 8; } if (x <= 0x0FFFFF...
[ 0, 1 ]
Chromium
third_party/libxml/src/timsort.h
static void TIM_SORT_RESIZE(TEMP_STORAGE_T *store, const size_t new_size) { if (store->alloc < new_size) { SORT_TYPE *tempstore = (SORT_TYPE *)realloc(store->storage, new_size * sizeof(SORT_TYPE)); if (tempstore == NULL) { fprintf(stderr, "Error allocating temporary storage for t...
[ 1, 0 ]
Chromium
third_party/libxml/src/tree.c
static xmlEntityPtr xmlGetParameterEntityFromDtd(const xmlDtd *dtd, const xmlChar *name) { xmlEntitiesTablePtr table; if ((dtd != NULL) && (dtd->pentities != NULL)) { table = (xmlEntitiesTablePtr)dtd->pentities; return ((xmlEntityPtr)xmlHashLookup(table, nam...
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlChar *xmlBuildQName(const xmlChar *ncname, const xmlChar *prefix, xmlChar *memory, int len) { int lenn, lenp; xmlChar *ret; if (ncname == NULL) return (NULL); if (prefix == NULL) return ((xmlChar *)ncname); lenn = strlen((char *)ncname); lenp = strlen((char *)prefix); ...
[ 1, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlChar *xmlSplitQName2(const xmlChar *name, xmlChar **prefix) { int len = 0; xmlChar *ret = NULL; if (prefix == NULL) return (NULL); *prefix = NULL; if (name == NULL) return (NULL); #ifndef XML_XML_NAMESPACE if ((name[0] == 'x') && (name[1] == 'm') && (name[2] == 'l') && (name[3] == ':')) ...
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
int xmlValidateNCName(const xmlChar *value, int space) { const xmlChar *cur = value; int c, l; if (value == NULL) return (-1); if (space) while (IS_BLANK_CH(*cur)) cur++; if (((*cur >= 'a') && (*cur <= 'z')) || ((*cur >= 'A') && (*cur <= 'Z')) || (*cur == '_')) cur++; else goto...
[ 1, 0 ]
Chromium
third_party/libxml/src/tree.c
void xmlSetNs(xmlNodePtr node, xmlNsPtr ns) { if (node == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlSetNs: node == NULL\n"); #endif return; } if ((node->type == XML_ELEMENT_NODE) || (node->type == XML_ATTRIBUTE_NODE)) node->ns = ns; }
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlDtdPtr xmlNewDtd(xmlDocPtr doc, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID) { xmlDtdPtr cur; if ((doc != NULL) && (doc->extSubset != NULL)) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlNewDtd(%s): document %s already hav...
[ 1, 0 ]
Chromium
third_party/libxml/src/tree.c
void xmlFreeDtd(xmlDtdPtr cur) { xmlDictPtr dict = NULL; if (cur == NULL) { return; } if (cur->doc != NULL) dict = cur->doc->dict; if ((__xmlRegisterCallbacks) && (xmlDeregisterNodeDefaultValue)) xmlDeregisterNodeDefaultValue((xmlNodePtr)cur); if (cur->children != NULL) { xmlNodePtr next,...
[ 1, 1 ]
Chromium
third_party/libxml/src/tree.c
xmlDocPtr xmlNewDoc(const xmlChar *version) { xmlDocPtr cur; if (version == NULL) version = (const xmlChar *)"1.0"; cur = (xmlDocPtr)xmlMalloc(sizeof(xmlDoc)); if (cur == NULL) { xmlTreeErrMemory("building doc"); return (NULL); } memset(cur, 0, sizeof(xmlDoc)); cur->type = XML_DOCUMENT_NODE;...
[ 1, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlAttrPtr xmlNewDocProp(xmlDocPtr doc, const xmlChar *name, const xmlChar *value) { xmlAttrPtr cur; if (name == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlNewDocProp : name == NULL\n"); #endif return (NULL); } cur = (xmlAttrPtr)xmlMalloc(sizeof(xmlA...
[ 1, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlNodePtr xmlNewDocPI(xmlDocPtr doc, const xmlChar *name, const xmlChar *content) { xmlNodePtr cur; if (name == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlNewPI : name == NULL\n"); #endif return (NULL); } cur = (xmlNodePtr)xmlMalloc(sizeof(xmlNode)); ...
[ 1, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlNodePtr xmlNewDocNode(xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content) { xmlNodePtr cur; if ((doc != NULL) && (doc->dict != NULL)) cur = xmlNewNodeEatName(ns, (xmlChar *)xmlDictLookup(doc->dict, name, -1)); else cur = xmlNewNode(ns, name); if (cur != ...
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlNodePtr xmlNewCharRef(xmlDocPtr doc, const xmlChar *name) { xmlNodePtr cur; if (name == NULL) return (NULL); cur = (xmlNodePtr)xmlMalloc(sizeof(xmlNode)); if (cur == NULL) { xmlTreeErrMemory("building character reference"); return (NULL); } memset(cur, 0, sizeof(xmlNode)); cur->type = XML...
[ 1, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlNodePtr xmlNewTextLen(const xmlChar *content, int len) { xmlNodePtr cur; cur = (xmlNodePtr)xmlMalloc(sizeof(xmlNode)); if (cur == NULL) { xmlTreeErrMemory("building text"); return (NULL); } memset(cur, 0, sizeof(xmlNode)); cur->type = XML_TEXT_NODE; cur->name = xmlStringText; if (content !=...
[ 1, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlNodePtr xmlNewComment(const xmlChar *content) { xmlNodePtr cur; cur = (xmlNodePtr)xmlMalloc(sizeof(xmlNode)); if (cur == NULL) { xmlTreeErrMemory("building comment"); return (NULL); } memset(cur, 0, sizeof(xmlNode)); cur->type = XML_COMMENT_NODE; cur->name = xmlStringComment; if (content !=...
[ 1, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlNodePtr xmlNewDocComment(xmlDocPtr doc, const xmlChar *content) { xmlNodePtr cur; cur = xmlNewComment(content); if (cur != NULL) cur->doc = doc; return (cur); }
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
void xmlSetTreeDoc(xmlNodePtr tree, xmlDocPtr doc) { xmlAttrPtr prop; if ((tree == NULL) || (tree->type == XML_NAMESPACE_DECL)) return; if (tree->doc != doc) { if (tree->type == XML_ELEMENT_NODE) { prop = tree->properties; while (prop != NULL) { if (prop->atype == XML_ATTRIBUTE_ID) { ...
[ 0, 1 ]
Chromium
third_party/libxml/src/tree.c
xmlNodePtr xmlNewChild(xmlNodePtr parent, xmlNsPtr ns, const xmlChar *name, const xmlChar *content) { xmlNodePtr cur, prev; if (parent == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlNewChild : parent == NULL\n"); #endif return (NULL); } if (name == NULL...
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
static xmlNodePtr xmlAddPropSibling(xmlNodePtr prev, xmlNodePtr cur, xmlNodePtr prop) { xmlAttrPtr attr; if ((cur == NULL) || (cur->type != XML_ATTRIBUTE_NODE) || (prop == NULL) || (prop->type != XML_ATTRIBUTE_NODE) || ((prev != NULL) && (prev->type != XML_ATTRIBUTE_...
[ 1, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlNodePtr xmlAddPrevSibling(xmlNodePtr cur, xmlNodePtr elem) { if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlAddPrevSibling : cur == NULL\n"); #endif return (NULL); } if ((elem == NULL) || (elem->type == XML_NAM...
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlNodePtr xmlFirstElementChild(xmlNodePtr parent) { xmlNodePtr cur = NULL; if (parent == NULL) return (NULL); switch (parent->type) { case XML_ELEMENT_NODE: case XML_ENTITY_NODE: case XML_DOCUMENT_NODE: case XML_DOCUMENT_FRAG_NODE: case XML_HTML_DOCUMENT_NODE: cur = parent->children; break...
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlNodePtr xmlNextElementSibling(xmlNodePtr node) { if (node == NULL) return (NULL); switch (node->type) { case XML_ELEMENT_NODE: case XML_TEXT_NODE: case XML_CDATA_SECTION_NODE: case XML_ENTITY_REF_NODE: case XML_ENTITY_NODE: case XML_PI_NODE: case XML_COMMENT_NODE: case XML_DTD_NODE: case XM...
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlNsPtr xmlCopyNamespaceList(xmlNsPtr cur) { xmlNsPtr ret = NULL; xmlNsPtr p = NULL, q; while (cur != NULL) { q = xmlCopyNamespace(cur); if (p == NULL) { ret = p = q; } else { p->next = q; p = q; } cur = cur->next; } return (ret); }
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlNodePtr xmlDocSetRootElement(xmlDocPtr doc, xmlNodePtr root) { xmlNodePtr old = NULL; if (doc == NULL) return (NULL); if ((root == NULL) || (root->type == XML_NAMESPACE_DECL)) return (NULL); xmlUnlinkNode(root); xmlSetTreeDoc(root, doc); root->parent = (xmlNodePtr)doc; old = doc->children; w...
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlChar *xmlNodeGetLang(const xmlNode *cur) { xmlChar *lang; if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) return (NULL); while (cur != NULL) { lang = xmlGetNsProp(cur, BAD_CAST "lang", XML_XML_NAMESPACE); if (lang != NULL) return (lang); cur = cur->parent; } return (NULL); }
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
void xmlNodeSetName(xmlNodePtr cur, const xmlChar *name) { xmlDocPtr doc; xmlDictPtr dict; const xmlChar *freeme = NULL; if (cur == NULL) return; if (name == NULL) return; switch (cur->type) { case XML_TEXT_NODE: case XML_CDATA_SECTION_NODE: case XML_COMMENT_NODE: case XML_DOCUMENT_TYPE_NOD...
[ 1, 0 ]
Chromium
third_party/libxml/src/tree.c
void xmlNodeSetBase(xmlNodePtr cur, const xmlChar *uri) { xmlNsPtr ns; xmlChar *fixed; if (cur == NULL) return; switch (cur->type) { case XML_TEXT_NODE: case XML_CDATA_SECTION_NODE: case XML_COMMENT_NODE: case XML_DOCUMENT_TYPE_NODE: case XML_DOCUMENT_FRAG_NODE: case XML_NOTATION_NODE: case X...
[ 1, 0 ]
Chromium
third_party/libxml/src/tree.c
void xmlNodeSetContent(xmlNodePtr cur, const xmlChar *content) { if (cur == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlNodeSetContent : node == NULL\n"); #endif return; } switch (cur->type) { case XML_DOCUMENT_FRAG_NODE: case XML_ELEMENT_NODE: case XML_...
[ 1, 1 ]
Chromium
third_party/libxml/src/tree.c
xmlNsPtr *xmlGetNsList(const xmlDoc *doc ATTRIBUTE_UNUSED, const xmlNode *node) { xmlNsPtr cur; xmlNsPtr *ret = NULL; int nbns = 0; int maxns = 10; int i; if ((node == NULL) || (node->type == XML_NAMESPACE_DECL)) return (NULL); while (node != NULL) { if (node->type == XML_...
[ 1, 0 ]
Chromium
third_party/libxml/src/tree.c
static int xmlNsInScope(xmlDocPtr doc ATTRIBUTE_UNUSED, xmlNodePtr node, xmlNodePtr ancestor, const xmlChar *prefix) { xmlNsPtr tst; while ((node != NULL) && (node != ancestor)) { if ((node->type == XML_ENTITY_REF_NODE) || (node->type == XML_ENTITY_NODE) || (node->type == XML_EN...
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlAttrPtr xmlHasProp(const xmlNode *node, const xmlChar *name) { xmlAttrPtr prop; xmlDocPtr doc; if ((node == NULL) || (node->type != XML_ELEMENT_NODE) || (name == NULL)) return (NULL); prop = node->properties; while (prop != NULL) { if (xmlStrEqual(prop->name, name)) { return (prop); } ...
[ 1, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlChar *xmlGetNsProp(const xmlNode *node, const xmlChar *name, const xmlChar *nameSpace) { xmlAttrPtr prop; prop = xmlGetPropNodeInternal(node, name, nameSpace, xmlCheckDTD); if (prop == NULL) return (NULL); return (xmlGetPropNodeValueInternal(prop)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
int xmlIsBlankNode(const xmlNode *node) { const xmlChar *cur; if (node == NULL) return (0); if ((node->type != XML_TEXT_NODE) && (node->type != XML_CDATA_SECTION_NODE)) return (0); if (node->content == NULL) return (1); cur = node->content; while (*cur != 0) { if (!IS_BLANK_CH(*cur)) ...
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlBufferPtr xmlBufferCreate(void) { xmlBufferPtr ret; ret = (xmlBufferPtr)xmlMalloc(sizeof(xmlBuffer)); if (ret == NULL) { xmlTreeErrMemory("creating buffer"); return (NULL); } ret->use = 0; ret->size = xmlDefaultBufferSize; ret->alloc = xmlBufferAllocScheme; ret->content = (xmlChar *)xmlMallo...
[ 1, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlBufferPtr xmlBufferCreateSize(size_t size) { xmlBufferPtr ret; ret = (xmlBufferPtr)xmlMalloc(sizeof(xmlBuffer)); if (ret == NULL) { xmlTreeErrMemory("creating buffer"); return (NULL); } ret->use = 0; ret->alloc = xmlBufferAllocScheme; ret->size = (size ? size + 2 : 0); if (ret->size) { r...
[ 1, 0 ]
Chromium
third_party/libxml/src/tree.c
void xmlBufferSetAllocationScheme(xmlBufferPtr buf, xmlBufferAllocationScheme scheme) { if (buf == NULL) { #ifdef DEBUG_BUFFER xmlGenericError(xmlGenericErrorContext, "xmlBufferSetAllocationScheme: buf == NULL\n"); #endif return; } if ((buf->alloc == X...
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
void xmlBufferFree(xmlBufferPtr buf) { if (buf == NULL) { #ifdef DEBUG_BUFFER xmlGenericError(xmlGenericErrorContext, "xmlBufferFree: buf == NULL\n"); #endif return; } if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) { xmlFree(buf->contentIO); } else if ((buf->content != NULL) &...
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
void xmlBufferEmpty(xmlBufferPtr buf) { if (buf == NULL) return; if (buf->content == NULL) return; buf->use = 0; if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) { buf->content = BAD_CAST ""; } else if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) { size_t start_buf = buf->con...
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
int xmlBufferDump(FILE *file, xmlBufferPtr buf) { int ret; if (buf == NULL) { #ifdef DEBUG_BUFFER xmlGenericError(xmlGenericErrorContext, "xmlBufferDump: buf == NULL\n"); #endif return (0); } if (buf->content == NULL) { #ifdef DEBUG_BUFFER xmlGenericError(xmlGenericErrorContext, ...
[ 1, 0 ]
Chromium
third_party/libxml/src/tree.c
int xmlGetCompressMode(void) { return (xmlCompressMode); }
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
void xmlSetCompressMode(int mode) { if (mode < 0) xmlCompressMode = 0; else if (mode > 9) xmlCompressMode = 9; else xmlCompressMode = mode; }
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
static void xmlDOMWrapNsMapFree(xmlNsMapPtr nsmap) { xmlNsMapItemPtr cur, tmp; if (nsmap == NULL) return; cur = nsmap->pool; while (cur != NULL) { tmp = cur; cur = cur->next; xmlFree(tmp); } cur = nsmap->first; while (cur != NULL) { tmp = cur; cur = cur->next; xmlFree(tmp); ...
[ 0, 0 ]
Chromium
third_party/libxml/src/tree.c
xmlDOMWrapCtxtPtr xmlDOMWrapNewCtxt(void) { xmlDOMWrapCtxtPtr ret; ret = xmlMalloc(sizeof(xmlDOMWrapCtxt)); if (ret == NULL) { xmlTreeErrMemory("allocating DOM-wrapper context"); return (NULL); } memset(ret, 0, sizeof(xmlDOMWrapCtxt)); return (ret); }
[ 1, 0 ]
Chromium
third_party/libxml/src/tree.c
static int xmlDOMWrapNSNormAddNsMapItem2(xmlNsPtr **list, int *size, int *number, xmlNsPtr oldNs, xmlNsPtr newNs) { if (*list == NULL) { *list = (xmlNsPtr *)xmlMalloc(6 * sizeof(xmlNsPtr)); if (*list == NULL) { xmlTreeErrM...
[ 1, 0 ]
Chromium
third_party/libxml/src/trionan.c
TRIO_PUBLIC double trio_nzero(TRIO_NOARGS) { #if defined(USE_IEEE_754) return trio_make_double(ieee_754_negzero_array); #else TRIO_VOLATILE double zero = 0.0; return -zero; #endif }
[ 0, 0 ]
Chromium
third_party/libxml/src/trionan.c
TRIO_PUBLIC double trio_nan(TRIO_NOARGS) { static double result = 0.0; if (result == 0.0) { #if defined(TRIO_COMPILER_SUPPORTS_C99) result = nan(""); #elif defined(NAN) && defined(__STDC_IEC_559__) result = (double)NAN; #elif defined(USE_IEEE_754) result = trio_make_double(ieee_754_qnan_array); #e...
[ 0, 0 ]
Chromium
third_party/libxml/src/uri.c
static int xmlParse3986Fragment(xmlURIPtr uri, const char **str) { const char *cur; if (str == NULL) return (-1); cur = *str; while ((ISA_PCHAR(cur)) || (*cur == '/') || (*cur == '?') || (*cur == '[') || (*cur == ']') || ((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur)))) NEX...
[ 0, 0 ]
Chromium
third_party/libxml/src/uri.c
static int xmlParse3986Userinfo(xmlURIPtr uri, const char **str) { const char *cur; cur = *str; while (ISA_UNRESERVED(cur) || ISA_PCT_ENCODED(cur) || ISA_SUB_DELIM(cur) || (*cur == ':')) NEXT(cur); if (*cur == '@') { if (uri != NULL) { if (uri->user != NULL) xmlFree(uri->user); ...
[ 0, 0 ]
Chromium
third_party/libxml/src/uri.c
static int xmlParse3986Host(xmlURIPtr uri, const char **str) { const char *cur = *str; const char *host; host = cur; if (*cur == '[') { cur++; while ((*cur != ']') && (*cur != 0)) cur++; if (*cur != ']') return (1); cur++; goto found; } /* * try to parse an IPv4 */ ...
[ 1, 0 ]
Chromium
third_party/libxml/src/uri.c
static int xmlParse3986PathRootless(xmlURIPtr uri, const char **str) { const char *cur; int ret; cur = *str; ret = xmlParse3986Segment(&cur, 0, 0); if (ret != 0) return (ret); while (*cur == '/') { cur++; ret = xmlParse3986Segment(&cur, 0, 1); if (ret != 0) return (ret); } if (ur...
[ 1, 0 ]
Chromium
third_party/libxml/src/uri.c
xmlURIPtr xmlParseURI(const char *str) { xmlURIPtr uri; int ret; if (str == NULL) return (NULL); uri = xmlCreateURI(); if (uri != NULL) { ret = xmlParse3986URIReference(uri, str); if (ret) { xmlFreeURI(uri); return (NULL); } } return (uri); }
[ 0, 0 ]
Chromium
third_party/libxml/src/uri.c
xmlURIPtr xmlCreateURI(void) { xmlURIPtr ret; ret = (xmlURIPtr)xmlMalloc(sizeof(xmlURI)); if (ret == NULL) { xmlURIErrMemory("creating URI structure\n"); return (NULL); } memset(ret, 0, sizeof(xmlURI)); return (ret); }
[ 1, 0 ]
Chromium
third_party/libxml/src/uri.c
char *xmlURIUnescapeString(const char *str, int len, char *target) { char *ret, *out; const char *in; if (str == NULL) return (NULL); if (len <= 0) len = strlen(str); if (len < 0) return (NULL); if (target == NULL) { ret = (char *)xmlMallocAtomic(len + 1); if (ret == NULL) { xmlU...
[ 0, 0 ]
Chromium
third_party/libxml/src/uri.c
xmlChar *xmlURIEscapeStr(const xmlChar *str, const xmlChar *list) { xmlChar *ret, ch; xmlChar *temp; const xmlChar *in; int len, out; if (str == NULL) return (NULL); if (str[0] == 0) return (xmlStrdup(str)); len = xmlStrlen(str); if (!(len > 0)) return (NULL); len += 20; ret = (xmlChar...
[ 1, 0 ]
Chromium
third_party/libxml/src/uri.c
xmlChar *xmlPathToURI(const xmlChar *path) { xmlURIPtr uri; xmlURI temp; xmlChar *ret, *cal; if (path == NULL) return (NULL); if ((uri = xmlParseURI((const char *)path)) != NULL) { xmlFreeURI(uri); return xmlStrdup(path); } cal = xmlCanonicPath(path); if (cal == NULL) return (NULL); #i...
[ 1, 0 ]
Chromium
third_party/libxml/src/valid.c
static int vstateVPush(xmlValidCtxtPtr ctxt, xmlElementPtr elemDecl, xmlNodePtr node) { if ((ctxt->vstateMax == 0) || (ctxt->vstateTab == NULL)) { ctxt->vstateMax = 10; ctxt->vstateTab = (xmlValidState *)xmlMalloc(ctxt->vstateMax * size...
[ 1, 0 ]
Chromium
third_party/libxml/src/valid.c
static int vstateVPush(xmlValidCtxtPtr ctxt, xmlElementContentPtr cont, xmlNodePtr node, unsigned char depth, long occurs, unsigned char state) { int i = ctxt->vstateNr - 1; if (ctxt->vstateNr > MAX_RECURSE) { return (-1); } if (ctxt->vstateTab == NULL) { c...
[ 1, 0 ]
Chromium
third_party/libxml/src/valid.c
static int nodeVPush(xmlValidCtxtPtr ctxt, xmlNodePtr value) { if (ctxt->nodeMax <= 0) { ctxt->nodeMax = 4; ctxt->nodeTab = (xmlNodePtr *)xmlMalloc(ctxt->nodeMax * sizeof(ctxt->nodeTab[0])); if (ctxt->nodeTab == NULL) { xmlVErrMemory(ctxt, "malloc failed"); ctxt->nodeMax = 0; re...
[ 1, 0 ]
Chromium
third_party/libxml/src/valid.c
static void xmlValidPrintNodeList(xmlNodePtr cur) { if (cur == NULL) xmlGenericError(xmlGenericErrorContext, "null "); while (cur != NULL) { xmlValidPrintNode(cur); cur = cur->next; } }
[ 0, 0 ]
Chromium
third_party/libxml/src/valid.c
static void xmlValidStateDebug(xmlValidCtxtPtr ctxt) { int i, j; xmlGenericError(xmlGenericErrorContext, "state: "); xmlValidDebugState(ctxt->vstate); xmlGenericError(xmlGenericErrorContext, " stack: %d ", ctxt->vstateNr - 1); for (i = 0, j = ctxt->vstateNr - 1; (i < 3) && (j > 0); i++, j--) xmlValidDebu...
[ 1, 1 ]
Chromium
third_party/libxml/src/valid.c
xmlElementContentPtr xmlNewDocElementContent(xmlDocPtr doc, const xmlChar *name, xmlElementContentType type) { xmlElementContentPtr ret; xmlDictPtr dict = NULL; if (doc != NULL) dict = doc->dict; switch (type) { case XML_ELEMENT_CONTENT_ELEMENT: if (name ...
[ 1, 0 ]
Chromium
third_party/libxml/src/valid.c
void xmlFreeDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) { xmlDictPtr dict = NULL; size_t depth = 0; if (cur == NULL) return; if (doc != NULL) dict = doc->dict; while (1) { xmlElementContentPtr parent; while ((cur->c1 != NULL) || (cur->c2 != NULL)) { cur = (cur->c1 != NU...
[ 1, 0 ]
Chromium
third_party/libxml/src/valid.c
static void xmlDumpElementOccur(xmlBufferPtr buf, xmlElementContentPtr cur) { switch (cur->ocur) { case XML_ELEMENT_CONTENT_ONCE: break; case XML_ELEMENT_CONTENT_OPT: xmlBufferWriteChar(buf, "?"); break; case XML_ELEMENT_CONTENT_MULT: xmlBufferWriteChar(buf, "*"); break; case XML_ELEMENT_C...
[ 1, 0 ]
Chromium
third_party/libxml/src/valid.c
void xmlSprintfElementContent(char *buf ATTRIBUTE_UNUSED, xmlElementContentPtr content ATTRIBUTE_UNUSED, int englob ATTRIBUTE_UNUSED) {}
[ 0, 0 ]
Chromium
third_party/libxml/src/valid.c
static void *xmlCopyElement(void *payload, const xmlChar *name ATTRIBUTE_UNUSED) { xmlElementPtr elem = (xmlElementPtr)payload; xmlElementPtr cur; cur = (xmlElementPtr)xmlMalloc(sizeof(xmlElement)); if (cur == NULL) { xmlVErrMemory(NULL, "malloc failed"); return (NULL); } ...
[ 1, 1 ]
Chromium
third_party/libxml/src/valid.c
static void xmlDumpElementDeclScan(void *elem, void *buf, const xmlChar *name ATTRIBUTE_UNUSED) { xmlDumpElementDecl((xmlBufferPtr)buf, (xmlElementPtr)elem); }
[ 0, 0 ]
Chromium
third_party/libxml/src/valid.c
void xmlDumpElementTable(xmlBufferPtr buf, xmlElementTablePtr table) { if ((buf == NULL) || (table == NULL)) return; xmlHashScan(table, xmlDumpElementDeclScan, buf); }
[ 0, 0 ]
Chromium
third_party/libxml/src/valid.c
static int xmlScanIDAttributeDecl(xmlValidCtxtPtr ctxt, xmlElementPtr elem, int err) { xmlAttributePtr cur; int ret = 0; if (elem == NULL) return (0); cur = elem->attributes; while (cur != NULL) { if (cur->atype == XML_ATTRIBUTE_ID) { ret++; if ((ret > 1)...
[ 0, 0 ]
Chromium
third_party/libxml/src/valid.c
static void xmlFreeAttributeTableEntry(void *attr, const xmlChar *name ATTRIBUTE_UNUSED) { xmlFreeAttribute((xmlAttributePtr)attr); }
[ 0, 0 ]
Chromium
third_party/libxml/src/valid.c
void xmlFreeAttributeTable(xmlAttributeTablePtr table) { xmlHashFree(table, xmlFreeAttributeTableEntry); }
[ 0, 0 ]
Chromium
third_party/libxml/src/valid.c
static void xmlDumpAttributeDeclScan(void *attr, void *buf, const xmlChar *name ATTRIBUTE_UNUSED) { xmlDumpAttributeDecl((xmlBufferPtr)buf, (xmlAttributePtr)attr); }
[ 0, 0 ]
Chromium
third_party/libxml/src/valid.c
void xmlDumpNotationDecl(xmlBufferPtr buf, xmlNotationPtr nota) { if ((buf == NULL) || (nota == NULL)) return; xmlBufferWriteChar(buf, "<!NOTATION "); xmlBufferWriteCHAR(buf, nota->name); if (nota->PublicID != NULL) { xmlBufferWriteChar(buf, " PUBLIC "); xmlBufferWriteQuotedString(buf, nota->PublicI...
[ 0, 0 ]
Chromium
third_party/libxml/src/valid.c
void xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table) { if ((buf == NULL) || (table == NULL)) return; xmlHashScan(table, xmlDumpNotationDeclScan, buf); } #endif /************************************************************************ * * * IDs * * * ****************...
[ 1, 0 ]
Chromium
third_party/libxml/src/valid.c
xmlIDPtr xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value, xmlAttrPtr attr) { xmlIDPtr ret; xmlIDTablePtr table; if (doc == NULL) { return (NULL); } if (value == NULL) { return (NULL); } if (attr == NULL) { return (NULL); } table = (xmlIDTablePtr)doc->...
[ 1, 0 ]
Chromium
third_party/libxml/src/valid.c
static void xmlFreeIDTableEntry(void *id, const xmlChar *name ATTRIBUTE_UNUSED) { xmlFreeID((xmlIDPtr)id); }
[ 0, 0 ]
Chromium
third_party/libxml/src/valid.c
int xmlRemoveID(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); if (ID == NUL...
[ 1, 0 ]
Chromium
third_party/libxml/src/valid.c
void xmlFreeRefTable(xmlRefTablePtr table) { xmlHashFree(table, xmlFreeRefTableEntry); }
[ 0, 0 ]
Chromium
third_party/libxml/src/valid.c
xmlElementPtr xmlGetDtdElementDesc(xmlDtdPtr dtd, const xmlChar *name) { xmlElementTablePtr table; xmlElementPtr cur; xmlChar *uqname = NULL, *prefix = NULL; if ((dtd == NULL) || (name == NULL)) return (NULL); if (dtd->elements == NULL) return (NULL); table = (xmlElementTablePtr)dtd->elements; u...
[ 0, 0 ]
Chromium
third_party/libxml/src/valid.c
static xmlElementPtr xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name, int create) { xmlElementTablePtr table; xmlElementPtr cur; xmlChar *uqname = NULL, *prefix = NULL; if (dtd == NULL) return (NULL); if (dtd->elements == NULL) { xmlDictPtr dict = N...
[ 1, 0 ]
Chromium
third_party/libxml/src/valid.c
xmlAttributePtr xmlGetDtdQAttrDesc(xmlDtdPtr dtd, const xmlChar *elem, const xmlChar *name, const xmlChar *prefix) { xmlAttributeTablePtr table; if (dtd == NULL) return (NULL); if (dtd->attributes == NULL) return (NULL); table = (xmlAttributeTablePtr)dtd->attributes; ...
[ 0, 0 ]
Chromium
third_party/libxml/src/valid.c
static int xmlIsDocNameStartChar(xmlDocPtr doc, int c) { if ((doc == NULL) || (doc->properties & XML_DOC_OLD10) == 0) { if (((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) || (c == '_') || (c == ':') || ((c >= 0xC0) && (c <= 0xD6)) || ((c >= 0xD8) && (c <= 0xF6)) || ((c >= 0xF8) && (c <=...
[ 1, 0 ]
Chromium
third_party/libxml/src/valid.c
static int xmlValidateNmtokenValueInternal(xmlDocPtr doc, const xmlChar *value) { const xmlChar *cur; int val, len; if (value == NULL) return (0); cur = value; val = xmlStringCurrentChar(NULL, cur, &len); cur += len; if (!xmlIsDocNameChar(doc, val)) ret...
[ 0, 0 ]
Chromium
third_party/libxml/src/valid.c
static int xmlValidateNmtokensValueInternal(xmlDocPtr doc, const xmlChar *value) { const xmlChar *cur; int val, len; if (value == NULL) return (0); cur = value; val = xmlStringCurrentChar(NULL, cur, &len); cur += len; while (IS_BLANK(val)) { val = xmlS...
[ 0, 0 ]
Chromium
third_party/libxml/src/valid.c
static int xmlValidateAttributeValueInternal(xmlDocPtr doc, xmlAttributeType type, const xmlChar *value) { switch (type) { case XML_ATTRIBUTE_ENTITIES: case XML_ATTRIBUTE_IDREFS: return (xmlValidateNamesValueInternal(doc...
[ 1, 0 ]
Chromium
third_party/libxml/src/valid.c
xmlChar *xmlValidNormalizeAttributeValue(xmlDocPtr doc, xmlNodePtr elem, const xmlChar *name, const xmlChar *value) { xmlChar *ret, *dst; const xmlChar *src; xmlAttributePtr attrDecl = NULL; if (doc == NULL) return (NULL); ...
[ 1, 0 ]
Chromium
third_party/libxml/src/valid.c
int xmlValidateElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem) { xmlNodePtr child; xmlAttrPtr attr; xmlNsPtr ns; const xmlChar *value; int ret = 1; if (elem == NULL) return (0); if ((elem->type == XML_XINCLUDE_START) || (elem->type == XML_XINCLUDE_END) || (elem->type == XML_NAMES...
[ 0, 0 ]
Chromium
third_party/libxml/src/valid.c
int xmlValidateDtdFinal(xmlValidCtxtPtr ctxt, xmlDocPtr doc) { xmlDtdPtr dtd; xmlAttributeTablePtr table; xmlEntitiesTablePtr entities; if ((doc == NULL) || (ctxt == NULL)) return (0); if ((doc->intSubset == NULL) && (doc->extSubset == NULL)) return (0); ctxt->doc = doc; ctxt->valid = 1; dtd = ...
[ 0, 0 ]