Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Chromium
third_party/libxml/src/fuzz/xml.c
int LLVMFuzzerInitialize(int *argc ATTRIBUTE_UNUSED, char ***argv ATTRIBUTE_UNUSED) { xmlInitParser(); xmlSetGenericErrorFunc(NULL, xmlFuzzErrorFunc); xmlSetExternalEntityLoader(xmlFuzzEntityLoader); return 0; }
[ 0, 0 ]
Chromium
third_party/libxml/src/fuzz/xpath.c
int LLVMFuzzerTestOneInput(const char *data, size_t size) { xmlDocPtr doc; const char *expr, *xml; size_t exprSize, xmlSize; xmlFuzzDataInit(data, size); expr = xmlFuzzReadString(&exprSize); xml = xmlFuzzReadString(&xmlSize); doc = xmlReadMemory(xml, xmlSize, NULL, NULL, XML_PARSE_RECOVER); if (doc !...
[ 0, 0 ]
Chromium
third_party/libxml/src/globals.c
void xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler) { xmlMutexLock(xmlThrDefMutex); xmlGenericErrorContextThrDef = ctx; if (handler != NULL) xmlGenericErrorThrDef = handler; else xmlGenericErrorThrDef = xmlGenericErrorDefaultFunc; xmlMutexUnlock(xmlThrDefMutex); }
[ 0, 0 ]
Chromium
third_party/libxml/src/globals.c
xmlDeregisterNodeFunc xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func) { xmlDeregisterNodeFunc old; xmlMutexLock(xmlThrDefMutex); old = xmlDeregisterNodeDefaultValueThrDef; __xmlRegisterCallbacks = 1; xmlDeregisterNodeDefaultValueThrDef = func; xmlMutexUnlock(xmlThrDefMutex); return (old); }
[ 0, 0 ]
Chromium
third_party/libxml/src/globals.c
xmlOutputBufferCreateFilenameFunc xmlThrDefOutputBufferCreateFilenameDefault( xmlOutputBufferCreateFilenameFunc func) { xmlOutputBufferCreateFilenameFunc old; xmlMutexLock(xmlThrDefMutex); old = xmlOutputBufferCreateFilenameValueThrDef; #ifdef LIBXML_OUTPUT_ENABLED if (old == NULL) { old = __xmlOutput...
[ 0, 0 ]
Chromium
third_party/libxml/src/globals.c
xmlReallocFunc *__xmlRealloc(void) { if (IS_MAIN_THREAD) return (&xmlRealloc); else return (&xmlGetGlobalState()->xmlRealloc); } #undef xmlFree
[ 0, 0 ]
Chromium
third_party/libxml/src/globals.c
xmlGenericErrorFunc *__xmlGenericError(void) { if (IS_MAIN_THREAD) return (&xmlGenericError); else return (&xmlGetGlobalState()->xmlGenericError); } #undef xmlStructuredError
[ 0, 0 ]
Chromium
third_party/libxml/src/globals.c
int *__xmlIndentTreeOutput(void) { if (IS_MAIN_THREAD) return (&xmlIndentTreeOutput); else return (&xmlGetGlobalState()->xmlIndentTreeOutput); }
[ 0, 0 ]
Chromium
third_party/libxml/src/globals.c
int xmlThrDefIndentTreeOutput(int v) { int ret; xmlMutexLock(xmlThrDefMutex); ret = xmlIndentTreeOutputThrDef; xmlIndentTreeOutputThrDef = v; xmlMutexUnlock(xmlThrDefMutex); return ret; } #undef xmlTreeIndentString
[ 0, 0 ]
Chromium
third_party/libxml/src/globals.c
int *__xmlKeepBlanksDefaultValue(void) { if (IS_MAIN_THREAD) return (&xmlKeepBlanksDefaultValue); else return (&xmlGetGlobalState()->xmlKeepBlanksDefaultValue); }
[ 0, 0 ]
Chromium
third_party/libxml/src/globals.c
int xmlThrDefLoadExtDtdDefaultValue(int v) { int ret; xmlMutexLock(xmlThrDefMutex); ret = xmlLoadExtDtdDefaultValueThrDef; xmlLoadExtDtdDefaultValueThrDef = v; xmlMutexUnlock(xmlThrDefMutex); return ret; } #undef xmlParserDebugEntities
[ 0, 0 ]
Chromium
third_party/libxml/src/globals.c
int xmlThrDefPedanticParserDefaultValue(int v) { int ret; xmlMutexLock(xmlThrDefMutex); ret = xmlPedanticParserDefaultValueThrDef; xmlPedanticParserDefaultValueThrDef = v; xmlMutexUnlock(xmlThrDefMutex); return ret; } #undef xmlSaveNoEmptyTags
[ 0, 0 ]
Chromium
third_party/libxml/src/globals.c
int *__xmlSubstituteEntitiesDefaultValue(void) { if (IS_MAIN_THREAD) return (&xmlSubstituteEntitiesDefaultValue); else return (&xmlGetGlobalState()->xmlSubstituteEntitiesDefaultValue); }
[ 0, 0 ]
Chromium
third_party/libxml/src/globals.c
xmlParserInputBufferCreateFilenameFunc * __xmlParserInputBufferCreateFilenameValue(void) { if (IS_MAIN_THREAD) return (&xmlParserInputBufferCreateFilenameValue); else return (&xmlGetGlobalState()->xmlParserInputBufferCreateFilenameValue); } #undef xmlOutputBufferCreateFilenameValue
[ 0, 0 ]
Chromium
third_party/libxml/src/hash.c
xmlHashTablePtr xmlHashCreate(int size) { xmlHashTablePtr table; if (size <= 0) size = 256; table = xmlMalloc(sizeof(xmlHashTable)); if (table) { table->dict = NULL; table->size = size; table->nbElems = 0; table->table = xmlMalloc(size * sizeof(xmlHashEntry)); if (table->table) { ...
[ 1, 0 ]
Chromium
third_party/libxml/src/hash.c
int xmlHashAddEntry(xmlHashTablePtr table, const xmlChar *name, void *userdata) { return (xmlHashAddEntry3(table, name, NULL, NULL, userdata)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/hash.c
int xmlHashAddEntry2(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, void *userdata) { return (xmlHashAddEntry3(table, name, name2, NULL, userdata)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/hash.c
int xmlHashUpdateEntry(xmlHashTablePtr table, const xmlChar *name, void *userdata, xmlHashDeallocator f) { return (xmlHashUpdateEntry3(table, name, NULL, NULL, userdata, f)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/hash.c
int xmlHashUpdateEntry2(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, void *userdata, xmlHashDeallocator f) { return (xmlHashUpdateEntry3(table, name, name2, NULL, userdata, f)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/hash.c
void *xmlHashQLookup(xmlHashTablePtr table, const xmlChar *prefix, const xmlChar *name) { return (xmlHashQLookup3(table, prefix, name, NULL, NULL, NULL, NULL)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/hash.c
static void stubHashScannerFull(void *payload, void *data, const xmlChar *name, const xmlChar *name2 ATTRIBUTE_UNUSED, const xmlChar *name3 ATTRIBUTE_UNUSED) { stubData *stubdata = (stubData *)data; stubdata->hashscanner(payload, stubdata->data, (xmlC...
[ 0, 0 ]
Chromium
third_party/libxml/src/hash.c
void xmlHashScan(xmlHashTablePtr table, xmlHashScanner f, void *data) { stubData stubdata; stubdata.data = data; stubdata.hashscanner = f; xmlHashScanFull(table, stubHashScannerFull, &stubdata); }
[ 0, 0 ]
Chromium
third_party/libxml/src/hash.c
void xmlHashScan3(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, xmlHashScanner f, void *data) { stubData stubdata; stubdata.data = data; stubdata.hashscanner = f; xmlHashScanFull3(table, name, name2, name3, stubHashScannerFull, &stubd...
[ 0, 0 ]
Chromium
third_party/libxml/src/hash.c
int xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, xmlHashDeallocator f) { return (xmlHashRemoveEntry3(table, name, name2, NULL, f)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/HTMLparser.c
static void htmlErrMemory(xmlParserCtxtPtr ctxt, const char *extra) { if ((ctxt != NULL) && (ctxt->disableSAX != 0) && (ctxt->instate == XML_PARSER_EOF)) return; if (ctxt != NULL) { ctxt->errNo = XML_ERR_NO_MEMORY; ctxt->instate = XML_PARSER_EOF; ctxt->disableSAX = 1; } if (extra) __xm...
[ 0, 0 ]
Chromium
third_party/libxml/src/HTMLparser.c
static int htmlGetEndPriority(const xmlChar *name) { int i = 0; while ((htmlEndPriority[i].name != NULL) && (!xmlStrEqual((const xmlChar *)htmlEndPriority[i].name, name))) i++; return (htmlEndPriority[i].priority); }
[ 0, 0 ]
Chromium
third_party/libxml/src/HTMLparser.c
static int htmlCheckAutoClose(const xmlChar *newtag, const xmlChar *oldtag) { int i, indx; const char **closed = NULL; if (htmlStartCloseIndexinitialized == 0) htmlInitAutoClose(); for (indx = 0; indx < 100; indx++) { closed = htmlStartCloseIndex[indx]; if (closed == NULL) return (0); if...
[ 0, 0 ]
Chromium
third_party/libxml/src/HTMLparser.c
static void htmlAutoCloseOnClose(htmlParserCtxtPtr ctxt, const xmlChar *newtag) { const htmlElemDesc *info; int i, priority; priority = htmlGetEndPriority(newtag); for (i = (ctxt->nameNr - 1); i >= 0; i--) { if (xmlStrEqual(newtag, ctxt->nameTab[i])) break; if ...
[ 1, 0 ]
Chromium
third_party/libxml/src/HTMLparser.c
const htmlEntityDesc *htmlEntityValueLookup(unsigned int value) { unsigned int i; for (i = 0; i < (sizeof(html40EntitiesTable) / sizeof(html40EntitiesTable[0])); i++) { if (html40EntitiesTable[i].value >= value) { if (html40EntitiesTable[i].value > value) break; return ((htmlE...
[ 1, 1 ]
Chromium
third_party/libxml/src/HTMLparser.c
static htmlParserInputPtr htmlNewInputStream(htmlParserCtxtPtr ctxt) { htmlParserInputPtr input; input = (xmlParserInputPtr)xmlMalloc(sizeof(htmlParserInput)); if (input == NULL) { htmlErrMemory(ctxt, "couldn't allocate a new input stream\n"); return (NULL); } memset(input, 0, sizeof(htmlParserInput)...
[ 1, 0 ]
Chromium
third_party/libxml/src/HTMLparser.c
htmlDocPtr htmlNewDocNoDtD(const xmlChar *URI, const xmlChar *ExternalID) { xmlDocPtr cur; cur = (xmlDocPtr)xmlMalloc(sizeof(xmlDoc)); if (cur == NULL) { htmlErrMemory(NULL, "HTML document creation failed\n"); return (NULL); } memset(cur, 0, sizeof(xmlDoc)); cur->type = XML_HTML_DOCUMENT_NODE; c...
[ 1, 0 ]
Chromium
third_party/libxml/src/HTMLparser.c
static const xmlChar *htmlParseHTMLName_nonInvasive(htmlParserCtxtPtr ctxt) { int i = 0; xmlChar loc[HTML_PARSER_BUFFER_SIZE]; if (!IS_ASCII_LETTER(NXT(1)) && (NXT(1) != '_') && (NXT(1) != ':')) return (NULL); while ((i < HTML_PARSER_BUFFER_SIZE) && ((IS_ASCII_LETTER(NXT(1 + i))) || (IS_ASCII_DIG...
[ 1, 0 ]
Chromium
third_party/libxml/src/HTMLparser.c
const htmlEntityDesc *htmlParseEntityRef(htmlParserCtxtPtr ctxt, const xmlChar **str) { const xmlChar *name; const htmlEntityDesc *ent = NULL; if (str != NULL) *str = NULL; if ((ctxt == NULL) || (ctxt->input == NULL)) return (NULL); if (CUR == '&') { NEXT...
[ 1, 0 ]
Chromium
third_party/libxml/src/HTMLparser.c
static xmlChar *htmlParseAttValue(htmlParserCtxtPtr ctxt) { xmlChar *ret = NULL; if (CUR == '"') { NEXT; ret = htmlParseHTMLAttribute(ctxt, '"'); if (CUR != '"') { htmlParseErr(ctxt, XML_ERR_ATTRIBUTE_NOT_FINISHED, "AttValue: \" expected\n", NULL, NULL); } else NEXT; ...
[ 1, 0 ]
Chromium
third_party/libxml/src/HTMLparser.c
static xmlChar *htmlParseSystemLiteral(htmlParserCtxtPtr ctxt) { size_t len = 0, startPosition = 0; int err = 0; int quote; xmlChar *ret = NULL; if ((CUR != '"') && (CUR != '\'')) { htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_STARTED, "SystemLiteral \" or ' expected\n", NULL, NULL); retur...
[ 0, 1 ]
Chromium
third_party/libxml/src/HTMLparser.c
static xmlChar *htmlParsePubidLiteral(htmlParserCtxtPtr ctxt) { size_t len = 0, startPosition = 0; int err = 0; int quote; xmlChar *ret = NULL; if ((CUR != '"') && (CUR != '\'')) { htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_STARTED, "PubidLiteral \" or ' expected\n", NULL, NULL); return ...
[ 0, 0 ]
Chromium
third_party/libxml/src/HTMLparser.c
static xmlChar *htmlParseExternalID(htmlParserCtxtPtr ctxt, xmlChar **publicID) { xmlChar *URI = NULL; if ((UPPER == 'S') && (UPP(1) == 'Y') && (UPP(2) == 'S') && (UPP(3) == 'T') && (UPP(4) == 'E') && (UPP(5) == 'M')) { SKIP(6); if (!IS_BLANK_CH(CUR)) { htmlP...
[ 0, 0 ]
Chromium
third_party/libxml/src/HTMLparser.c
static void htmlParseDocTypeDecl(htmlParserCtxtPtr ctxt) { const xmlChar *name; xmlChar *ExternalID = NULL; xmlChar *URI = NULL; SKIP(9); SKIP_BLANKS; /* * Parse the DOCTYPE name. */ name = htmlParseName(ctxt); if (name == NULL) { htmlParseErr(ctxt, XML_ERR_NAME_REQUIRED, "...
[ 1, 0 ]
Chromium
third_party/libxml/src/HTMLparser.c
static void htmlCheckEncoding(htmlParserCtxtPtr ctxt, const xmlChar *attvalue) { const xmlChar *encoding; if (!attvalue) return; encoding = xmlStrcasestr(attvalue, BAD_CAST "charset"); if (encoding != NULL) { encoding += 7; } if (encoding && IS_BLANK_CH(*encoding)) encoding = xmlStrcasestr(at...
[ 1, 0 ]
Chromium
third_party/libxml/src/HTMLparser.c
static void htmlParserFinishElementParsing(htmlParserCtxtPtr ctxt) { if (ctxt->node != NULL && ctxt->record_info) { ctxt->nodeInfo->end_pos = ctxt->input->consumed + (CUR_PTR - ctxt->input->base); ctxt->nodeInfo->end_line = ctxt->input->line; ctxt->nodeInfo->node = ctxt->node; xmlParserAddNod...
[ 1, 0 ]
Chromium
third_party/libxml/src/HTMLparser.c
htmlStatus htmlAttrAllowed(const htmlElemDesc *elt, const xmlChar *attr, int legacy) { const char **p; if (!elt || !attr) return HTML_INVALID; if (elt->attrs_req) for (p = elt->attrs_req; *p; ++p) if (!xmlStrcmp((const xmlChar *)*p, attr)) return HTML_REQUIRED; ...
[ 1, 0 ]
Chromium
third_party/libxml/src/HTMLparser.c
int htmlCtxtUseOptions(htmlParserCtxtPtr ctxt, int options) { if (ctxt == NULL) return (-1); if (options & HTML_PARSE_NOWARNING) { ctxt->sax->warning = NULL; ctxt->vctxt.warning = NULL; options -= XML_PARSE_NOWARNING; ctxt->options |= XML_PARSE_NOWARNING; } if (options & HTML_PARSE_NOERROR)...
[ 1, 0 ]
Chromium
third_party/libxml/src/HTMLparser.c
htmlDocPtr htmlReadFd(int fd, const char *URL, const char *encoding, int options) { htmlParserCtxtPtr ctxt; xmlParserInputBufferPtr input; xmlParserInputPtr stream; if (fd < 0) return (NULL); xmlInitParser(); xmlInitParser(); input = xmlParserInputBufferCreateFd(fd, XML_CHAR_EN...
[ 0, 0 ]
Chromium
third_party/libxml/src/HTMLparser.c
htmlDocPtr htmlReadIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, const char *URL, const char *encoding, int options) { htmlParserCtxtPtr ctxt; xmlParserInputBufferPtr input; xmlParserInputPtr stream; if (ioread == NULL) return (NULL)...
[ 0, 0 ]
Chromium
third_party/libxml/src/HTMLparser.c
htmlDocPtr htmlCtxtReadFd(htmlParserCtxtPtr ctxt, int fd, const char *URL, const char *encoding, int options) { xmlParserInputBufferPtr input; xmlParserInputPtr stream; if (fd < 0) return (NULL); if (ctxt == NULL) return (NULL); xmlInitParser(); htmlCtxtReset(ctxt); in...
[ 0, 0 ]
Chromium
third_party/libxml/src/HTMLtree.c
void htmlNodeDumpFile(FILE *out, xmlDocPtr doc, xmlNodePtr cur) { htmlNodeDumpFileFormat(out, doc, cur, NULL, 1); }
[ 0, 0 ]
Chromium
third_party/libxml/src/HTMLtree.c
void htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding, int format) { htmlNodeDumpFormatOutput(buf, cur, (xmlNodePtr)cur, encoding, format); }
[ 0, 0 ]
Chromium
third_party/libxml/src/HTMLtree.c
int htmlSaveFile(const char *filename, xmlDocPtr cur) { xmlOutputBufferPtr buf; xmlCharEncodingHandlerPtr handler = NULL; const char *encoding; int ret; if ((cur == NULL) || (filename == NULL)) return (-1); xmlInitParser(); encoding = (const char *)htmlGetMetaEncoding(cur); if (encoding != NULL)...
[ 0, 0 ]
Chromium
third_party/libxml/src/include/win32config.h
static int isinf(double d) { int expon = 0; double val = frexp(d, &expon); if (expon == 1025) { if (val == 0.5) { return 1; } else if (val == -0.5) { return -1; } else { return 0; } } else { return 0; } }
[ 0, 0 ]
Chromium
third_party/libxml/src/list.c
static void xmlLinkDeallocator(xmlListPtr l, xmlLinkPtr lk) { (lk->prev)->next = lk->next; (lk->next)->prev = lk->prev; if (l->linkDeallocator) l->linkDeallocator(lk); xmlFree(lk); }
[ 0, 0 ]
Chromium
third_party/libxml/src/list.c
static xmlLinkPtr xmlListHigherSearch(xmlListPtr l, void *data) { xmlLinkPtr lk; if (l == NULL) return (NULL); for (lk = l->sentinel->prev; lk != l->sentinel && l->linkCompare(lk->data, data) > 0; lk = lk->prev) ; return lk; }
[ 1, 0 ]
Chromium
third_party/libxml/src/list.c
int xmlListInsert(xmlListPtr l, void *data) { xmlLinkPtr lkPlace, lkNew; if (l == NULL) return (1); lkPlace = xmlListLowerSearch(l, data); lkNew = (xmlLinkPtr)xmlMalloc(sizeof(xmlLink)); if (lkNew == NULL) { xmlGenericError(xmlGenericErrorContext, "Cannot initialize memory for ne...
[ 0, 0 ]
Chromium
third_party/libxml/src/list.c
void xmlListClear(xmlListPtr l) { xmlLinkPtr lk; if (l == NULL) return; lk = l->sentinel->next; while (lk != l->sentinel) { xmlLinkPtr next = lk->next; xmlLinkDeallocator(l, lk); lk = next; } }
[ 0, 0 ]
Chromium
third_party/libxml/src/list.c
int xmlListEmpty(xmlListPtr l) { if (l == NULL) return (-1); return (l->sentinel->next == l->sentinel); }
[ 1, 0 ]
Chromium
third_party/libxml/src/list.c
void xmlListPopFront(xmlListPtr l) { if (!xmlListEmpty(l)) xmlLinkDeallocator(l, l->sentinel->next); }
[ 0, 0 ]
Chromium
third_party/libxml/src/list.c
int xmlListPushBack(xmlListPtr l, void *data) { xmlLinkPtr lkPlace, lkNew; if (l == NULL) return (0); lkPlace = l->sentinel->prev; if (NULL == (lkNew = (xmlLinkPtr)xmlMalloc(sizeof(xmlLink)))) { xmlGenericError(xmlGenericErrorContext, "Cannot initialize memory for new link"); r...
[ 0, 0 ]
Chromium
third_party/libxml/src/list.c
void *xmlLinkGetData(xmlLinkPtr lk) { if (lk == NULL) return (NULL); return lk->data; }
[ 0, 0 ]
Chromium
third_party/libxml/src/list.c
void xmlListSort(xmlListPtr l) { xmlListPtr lTemp; if (l == NULL) return; if (xmlListEmpty(l)) return; if (NULL == (lTemp = xmlListDup(l))) return; xmlListClear(l); xmlListMerge(l, lTemp); xmlListDelete(lTemp); return; }
[ 0, 0 ]
Chromium
third_party/libxml/src/list.c
void xmlListWalk(xmlListPtr l, xmlListWalker walker, void *user) { xmlLinkPtr lk; if ((l == NULL) || (walker == NULL)) return; for (lk = l->sentinel->next; lk != l->sentinel; lk = lk->next) { if ((walker(lk->data, user)) == 0) break; } }
[ 1, 0 ]
Chromium
third_party/libxml/src/list.c
void xmlListReverseWalk(xmlListPtr l, xmlListWalker walker, void *user) { xmlLinkPtr lk; if ((l == NULL) || (walker == NULL)) return; for (lk = l->sentinel->prev; lk != l->sentinel; lk = lk->prev) { if ((walker(lk->data, user)) == 0) break; } }
[ 1, 0 ]
Chromium
third_party/libxml/src/nanoftp.c
static void xmlFTPErrMemory(const char *extra) { __xmlSimpleError(XML_FROM_FTP, XML_ERR_NO_MEMORY, NULL, NULL, extra); }
[ 0, 0 ]
Chromium
third_party/libxml/src/nanoftp.c
void xmlNanoFTPCleanup(void) { if (proxy != NULL) { xmlFree(proxy); proxy = NULL; } if (proxyUser != NULL) { xmlFree(proxyUser); proxyUser = NULL; } if (proxyPasswd != NULL) { xmlFree(proxyPasswd); proxyPasswd = NULL; } #ifdef _WINSOCKAPI_ if (initialized) WSACleanup(); #endif ...
[ 0, 0 ]
Chromium
third_party/libxml/src/nanoftp.c
int xmlNanoFTPUpdateURL(void *ctx, const char *URL) { xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr)ctx; xmlURIPtr uri; if (URL == NULL) return (-1); if (ctxt == NULL) return (-1); if (ctxt->protocol == NULL) return (-1); if (ctxt->hostname == NULL) return (-1); uri = xmlParseURIRaw(URL, 1...
[ 1, 0 ]
Chromium
third_party/libxml/src/nanoftp.c
void *xmlNanoFTPNewCtxt(const char *URL) { xmlNanoFTPCtxtPtr ret; char *unescaped; ret = (xmlNanoFTPCtxtPtr)xmlMalloc(sizeof(xmlNanoFTPCtxt)); if (ret == NULL) { xmlFTPErrMemory("allocating FTP context"); return (NULL); } memset(ret, 0, sizeof(xmlNanoFTPCtxt)); ret->port = 21; ret->passive = 1...
[ 1, 0 ]
Chromium
third_party/libxml/src/nanoftp.c
int xmlNanoFTPGetResponse(void *ctx) { int res; res = xmlNanoFTPReadResponse(ctx); return (res); }
[ 0, 0 ]
Chromium
third_party/libxml/src/nanoftp.c
void *xmlNanoFTPConnectTo(const char *server, int port) { xmlNanoFTPCtxtPtr ctxt; int res; xmlNanoFTPInit(); if (server == NULL) return (NULL); if (port <= 0) return (NULL); ctxt = (xmlNanoFTPCtxtPtr)xmlNanoFTPNewCtxt(NULL); if (ctxt == NULL) return (NULL); ctxt->hostname = xmlMemStrdup(ser...
[ 0, 0 ]
Chromium
third_party/libxml/src/nanoftp.c
void *xmlNanoFTPOpen(const char *URL) { xmlNanoFTPCtxtPtr ctxt; SOCKET sock; xmlNanoFTPInit(); if (URL == NULL) return (NULL); if (strncmp("ftp://", URL, 6)) return (NULL); ctxt = (xmlNanoFTPCtxtPtr)xmlNanoFTPNewCtxt(URL); if (ctxt == NULL) return (NULL); if (xmlNanoFTPConnect(ctxt) < 0) {...
[ 0, 0 ]
Chromium
third_party/libxml/src/nanoftp.c
int main(int argc, char **argv) { void *ctxt; FILE *output; char *tstfile = NULL; xmlNanoFTPInit(); if (argc > 1) { ctxt = xmlNanoFTPNewCtxt(argv[1]); if (xmlNanoFTPConnect(ctxt) < 0) { xmlGenericError(xmlGenericErrorContext, "Couldn't connect to %s\n", argv[1]); ex...
[ 0, 0 ]
Chromium
third_party/libxml/src/nanoftp.c
int main(int argc, char **argv) { xmlGenericError(xmlGenericErrorContext, "%s : FTP support not compiled in\n", argv[0]); return (0); }
[ 0, 0 ]
Chromium
third_party/libxml/src/nanohttp.c
static int have_ipv6(void) { SOCKET s; s = socket(AF_INET6, SOCK_STREAM, 0); if (s != INVALID_SOCKET) { close(s); return (1); } return (0); } #endif
[ 0, 0 ]
Chromium
third_party/libxml/src/nanohttp.c
static xmlNanoHTTPCtxtPtr xmlNanoHTTPNewCtxt(const char *URL) { xmlNanoHTTPCtxtPtr ret; ret = (xmlNanoHTTPCtxtPtr)xmlMalloc(sizeof(xmlNanoHTTPCtxt)); if (ret == NULL) { xmlHTTPErrMemory("allocating context"); return (NULL); } memset(ret, 0, sizeof(xmlNanoHTTPCtxt)); ret->port = 80; ret->returnVa...
[ 1, 0 ]
Chromium
third_party/libxml/src/nanohttp.c
static char *xmlNanoHTTPReadLine(xmlNanoHTTPCtxtPtr ctxt) { char buf[4096]; char *bp = buf; int rc; while (bp - buf < 4095) { if (ctxt->inrptr == ctxt->inptr) { if ((rc = xmlNanoHTTPRecv(ctxt)) == 0) { if (bp == buf) return (NULL); else *bp = 0; return (xml...
[ 0, 0 ]
Chromium
third_party/libxml/src/nanohttp.c
int xmlNanoHTTPRead(void *ctx, void *dest, int len) { xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)ctx; #ifdef LIBXML_ZLIB_ENABLED int bytes_read = 0; int orig_avail_in; int z_ret; #endif if (ctx == NULL) return (-1); if (dest == NULL) return (-1); if (len <= 0) return (0); #ifdef LIBXML_ZL...
[ 1, 0 ]
Chromium
third_party/libxml/src/nanohttp.c
const char *xmlNanoHTTPMimeType(void *ctx) { xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)ctx; return ((ctxt == NULL) ? NULL : ctxt->mimeType); }
[ 0, 0 ]
Chromium
third_party/libxml/src/parser.c
static void xmlDetectSAX2(xmlParserCtxtPtr ctxt) { xmlSAXHandlerPtr sax; if (ctxt == NULL) return; sax = ctxt->sax; #ifdef LIBXML_SAX1_ENABLED if ((sax) && (sax->initialized == XML_SAX2_MAGIC) && ((sax->startElementNs != NULL) || (sax->endElementNs != NULL) || ((sax->startElement == NULL) && (s...
[ 1, 0 ]
Chromium
third_party/libxml/src/parser.c
static void xmlCleanSpecialAttrCallback(void *payload, void *data, const xmlChar *fullname, const xmlChar *fullattr, const xmlChar *unused ATTRIBUTE_UNUSED) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr)data; if (((ptrdiff_t)payload) == XML_ATTRIBUTE_CDATA) { ...
[ 0, 0 ]
Chromium
third_party/libxml/src/parser.c
static int nsPush(xmlParserCtxtPtr ctxt, const xmlChar *prefix, const xmlChar *URL) { if (ctxt->options & XML_PARSE_NSCLEAN) { int i; for (i = ctxt->nsNr - 2; i >= 0; i -= 2) { if (ctxt->nsTab[i] == prefix) { if (ctxt->nsTab[i + 1] == URL) return (-2); /* out...
[ 1, 0 ]
Chromium
third_party/libxml/src/parser.c
static int nsPop(xmlParserCtxtPtr ctxt, int nr) { int i; if (ctxt->nsTab == NULL) return (0); if (ctxt->nsNr < nr) { xmlGenericError(xmlGenericErrorContext, "Pbm popping %d NS\n", nr); nr = ctxt->nsNr; } if (ctxt->nsNr <= 0) return (0); for (i = 0; i < nr; i++) { ctxt->nsNr--; ctxt...
[ 0, 0 ]
Chromium
third_party/libxml/src/parser.c
int inputPush(xmlParserCtxtPtr ctxt, xmlParserInputPtr value) { if ((ctxt == NULL) || (value == NULL)) return (-1); if (ctxt->inputNr >= ctxt->inputMax) { ctxt->inputMax *= 2; ctxt->inputTab = (xmlParserInputPtr *)xmlRealloc( ctxt->inputTab, ctxt->inputMax * sizeof(ctxt->inputTab[0])); if (c...
[ 1, 0 ]
Chromium
third_party/libxml/src/parser.c
static const xmlChar *nameNsPop(xmlParserCtxtPtr ctxt) { const xmlChar *ret; if (ctxt->nameNr <= 0) return (NULL); ctxt->nameNr--; if (ctxt->nameNr > 0) ctxt->name = ctxt->nameTab[ctxt->nameNr - 1]; else ctxt->name = NULL; ret = ctxt->nameTab[ctxt->nameNr]; ctxt->nameTab[ctxt->nameNr] = NULL;...
[ 1, 0 ]
Chromium
third_party/libxml/src/parser.c
int namePush(xmlParserCtxtPtr ctxt, const xmlChar *value) { if (ctxt == NULL) return (-1); if (ctxt->nameNr >= ctxt->nameMax) { const xmlChar **tmp; tmp = (const xmlChar **)xmlRealloc((xmlChar **)ctxt->nameTab, ctxt->nameMax * 2 * ...
[ 1, 0 ]
Chromium
third_party/libxml/src/parser.c
static int spacePush(xmlParserCtxtPtr ctxt, int val) { if (ctxt->spaceNr >= ctxt->spaceMax) { int *tmp; ctxt->spaceMax *= 2; tmp = (int *)xmlRealloc(ctxt->spaceTab, ctxt->spaceMax * sizeof(ctxt->spaceTab[0])); if (tmp == NULL) { xmlErrMemory(ctxt, NULL); ctxt-...
[ 1, 0 ]
Chromium
third_party/libxml/src/parser.c
int xmlSkipBlankChars(xmlParserCtxtPtr ctxt) { int res = 0; if (ctxt->instate != XML_PARSER_DTD) { const xmlChar *cur; /* * if we are in the document content, go really fast */ cur = ctxt->input->cur; while (IS_BLANK_CH(*cur)) { if (*cur == '\n') { ctxt->input->line++; ...
[ 1, 0 ]
Chromium
third_party/libxml/src/parser.c
int xmlPushInput(xmlParserCtxtPtr ctxt, xmlParserInputPtr input) { int ret; if (input == NULL) return (-1); if (xmlParserDebugEntities) { if ((ctxt->input != NULL) && (ctxt->input->filename)) xmlGenericError(xmlGenericErrorContext, "%s(%d): ", ctxt->input->filename, ctxt->inpu...
[ 1, 0 ]
Chromium
third_party/libxml/src/parser.c
const xmlChar *xmlParseName(xmlParserCtxtPtr ctxt) { const xmlChar *in; const xmlChar *ret; int count = 0; GROW; #ifdef DEBUG nbParseName++; #endif in = ctxt->input->cur; if (((*in >= 0x61) && (*in <= 0x7A)) || ((*in >= 0x41) && (*in <= 0x5A)) || (*in == '_') || (*in == ':')) { in++; whil...
[ 1, 0 ]
Chromium
third_party/libxml/src/parser.c
static const xmlChar *xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) { int len = 0, l; int c; int count = 0; size_t startPosition = 0; #ifdef DEBUG nbParseNCNameComplex++; #endif GROW; startPosition = CUR_PTR - BASE_PTR; c = CUR_CHAR(l); if ((c == ' ') || (c == '>') || (c == '/') || /* accelerators */...
[ 1, 0 ]
Chromium
third_party/libxml/src/parser.c
xmlChar *xmlParseAttValue(xmlParserCtxtPtr ctxt) { if ((ctxt == NULL) || (ctxt->input == NULL)) return (NULL); return (xmlParseAttValueInternal(ctxt, NULL, NULL, 0)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/parser.c
xmlChar *xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) { xmlChar *buf = NULL; int len = 0; int size = XML_PARSER_BUFFER_SIZE; xmlChar cur; xmlChar stop; int count = 0; xmlParserInputState oldstate = ctxt->instate; SHRINK; if (RAW == '"') { NEXT; stop = '"'; } else if (RAW == '\'') { NEXT;...
[ 1, 0 ]
Chromium
third_party/libxml/src/parser.c
void xmlParseNotationDecl(xmlParserCtxtPtr ctxt) { const xmlChar *name; xmlChar *Pubid; xmlChar *Systemid; if (CMP10(CUR_PTR, '<', '!', 'N', 'O', 'T', 'A', 'T', 'I', 'O', 'N')) { int inputid = ctxt->input->id; SHRINK; SKIP(10); if (SKIP_BLANKS == 0) { xmlFatalErrMsg(ctxt, XML_ERR_SPACE_RE...
[ 1, 0 ]
Chromium
third_party/libxml/src/parser.c
int xmlParseDefaultDecl(xmlParserCtxtPtr ctxt, xmlChar **value) { int val; xmlChar *ret; *value = NULL; if (CMP9(CUR_PTR, '#', 'R', 'E', 'Q', 'U', 'I', 'R', 'E', 'D')) { SKIP(9); return (XML_ATTRIBUTE_REQUIRED); } if (CMP8(CUR_PTR, '#', 'I', 'M', 'P', 'L', 'I', 'E', 'D')) { SKIP(8); return ...
[ 0, 0 ]
Chromium
third_party/libxml/src/parser.c
const xmlChar *xmlParseAttribute(xmlParserCtxtPtr ctxt, xmlChar **value) { const xmlChar *name; xmlChar *val; *value = NULL; GROW; name = xmlParseName(ctxt); if (name == NULL) { xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED, "error parsing attribute name\n"); return (NULL); } S...
[ 0, 0 ]
Chromium
third_party/libxml/src/parser.c
static void xmlParseEndTag1(xmlParserCtxtPtr ctxt, int line) { const xmlChar *name; GROW; if ((RAW != '<') || (NXT(1) != '/')) { xmlFatalErrMsg(ctxt, XML_ERR_LTSLASH_REQUIRED, "xmlParseEndTag: '</' not found\n"); return; } SKIP(2); name = xmlParseNameAndCompare(ctxt, ctxt->name)...
[ 1, 0 ]
Chromium
third_party/libxml/src/parser.c
xmlChar *xmlParseVersionInfo(xmlParserCtxtPtr ctxt) { xmlChar *version = NULL; if (CMP7(CUR_PTR, 'v', 'e', 'r', 's', 'i', 'o', 'n')) { SKIP(7); SKIP_BLANKS; if (RAW != '=') { xmlFatalErr(ctxt, XML_ERR_EQUAL_REQUIRED, NULL); return (NULL); } NEXT; SKIP_BLANKS; if (RAW == '"')...
[ 1, 0 ]
Chromium
third_party/libxml/src/parser.c
int xmlParseSDDecl(xmlParserCtxtPtr ctxt) { int standalone = -2; SKIP_BLANKS; if (CMP10(CUR_PTR, 's', 't', 'a', 'n', 'd', 'a', 'l', 'o', 'n', 'e')) { SKIP(10); SKIP_BLANKS; if (RAW != '=') { xmlFatalErr(ctxt, XML_ERR_EQUAL_REQUIRED, NULL); return (standalone); } NEXT; SKIP_BLA...
[ 1, 1 ]
Chromium
third_party/libxml/src/parser.c
static void xmlHaltParser(xmlParserCtxtPtr ctxt) { if (ctxt == NULL) return; ctxt->instate = XML_PARSER_EOF; ctxt->disableSAX = 1; while (ctxt->inputNr > 1) xmlFreeInputStream(inputPop(ctxt)); if (ctxt->input != NULL) { if (ctxt->input->free != NULL) { ctxt->input->free((xmlChar *)ctxt->inp...
[ 1, 0 ]
Chromium
third_party/libxml/src/parser.c
xmlParserCtxtPtr xmlCreateIOParserCtxt(xmlSAXHandlerPtr sax, void *user_data, xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, xmlCharEncoding enc) { xmlParserCtxtPtr ctxt; xm...
[ 1, 0 ]
Chromium
third_party/libxml/src/parser.c
xmlDocPtr xmlSAXParseEntity(xmlSAXHandlerPtr sax, const char *filename) { xmlDocPtr ret; xmlParserCtxtPtr ctxt; ctxt = xmlCreateFileParserCtxt(filename); if (ctxt == NULL) { return (NULL); } if (sax != NULL) { if (ctxt->sax != NULL) xmlFree(ctxt->sax); ctxt->sax = sax; ctxt->userData ...
[ 0, 0 ]
Chromium
third_party/libxml/src/parser.c
xmlDocPtr xmlParseEntity(const char *filename) { return (xmlSAXParseEntity(NULL, filename)); } #endif
[ 0, 0 ]
Chromium
third_party/libxml/src/parser.c
xmlDocPtr xmlSAXParseFileWithData(xmlSAXHandlerPtr sax, const char *filename, int recovery, void *data) { xmlDocPtr ret; xmlParserCtxtPtr ctxt; xmlInitParser(); ctxt = xmlCreateFileParserCtxt(filename); if (ctxt == NULL) { return (NULL); } if (sax != NULL) { if ...
[ 1, 0 ]
Chromium
third_party/libxml/src/parser.c
xmlDocPtr xmlRecoverFile(const char *filename) { return (xmlSAXParseFile(NULL, filename, 1)); }
[ 0, 0 ]