Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Chromium
third_party/libxml/src/parser.c
**/ /** * xmlCreateMemoryParserCtxt: * @buffer: a pointer to a char array * @size: the size of the array * * Create a parser context for an XML in-memory document. * * Returns the new parser context or NULL */ xmlParserCtxtPtr xmlCreateMemoryParserCtxt(const char *buffer, i...
[ 0, 1 ]
Chromium
third_party/libxml/src/parser.c
xmlDocPtr xmlRecoverMemory(const char *buffer, int size) { return (xmlSAXParseMemory(NULL, buffer, size, 1)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/parser.c
int xmlSAXUserParseMemory(xmlSAXHandlerPtr sax, void *user_data, const char *buffer, int size) { int ret = 0; xmlParserCtxtPtr ctxt; xmlInitParser(); ctxt = xmlCreateMemoryParserCtxt(buffer, size); if (ctxt == NULL) return -1; if (ctxt->sax != (xmlSAXHandlerPtr)&xmlDefaultSAX...
[ 0, 0 ]
Chromium
third_party/libxml/src/parser.c
xmlDocPtr xmlParseDoc(const xmlChar *cur) { return (xmlSAXParseDoc(NULL, cur, 0)); } #endif #ifdef LIBXML_LEGACY_ENABLED
[ 0, 0 ]
Chromium
third_party/libxml/src/parser.c
static void xmlAddEntityReference(xmlEntityPtr ent, xmlNodePtr firstNode, xmlNodePtr lastNode) { if (xmlEntityRefFunc != NULL) { (*xmlEntityRefFunc)(ent, firstNode, lastNode); } }
[ 0, 0 ]
Chromium
third_party/libxml/src/parser.c
xmlDocPtr xmlReadFile(const char *filename, const char *encoding, int options) { xmlParserCtxtPtr ctxt; xmlInitParser(); ctxt = xmlCreateURLParserCtxt(filename, options); if (ctxt == NULL) return (NULL); return (xmlDoRead(ctxt, NULL, encoding, options, 0)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/parser.c
xmlDocPtr xmlCtxtReadFile(xmlParserCtxtPtr ctxt, const char *filename, const char *encoding, int options) { xmlParserInputPtr stream; if (filename == NULL) return (NULL); if (ctxt == NULL) return (NULL); xmlInitParser(); xmlCtxtReset(ctxt); stream = xmlLoadExternalEntity...
[ 0, 0 ]
Chromium
third_party/libxml/src/parserInternals.c
void __xmlErrEncoding(xmlParserCtxtPtr ctxt, xmlParserErrors xmlerr, const char *msg, const xmlChar *str1, const xmlChar *str2) { if ((ctxt != NULL) && (ctxt->disableSAX != 0) && (ctxt->instate == XML_PARSER_EOF)) return; if (ctxt != NULL) ctxt->errNo = xmle...
[ 0, 0 ]
Chromium
third_party/libxml/src/parserInternals.c
int xmlParserInputRead(xmlParserInputPtr in ATTRIBUTE_UNUSED, int len ATTRIBUTE_UNUSED) { return (-1); }
[ 0, 0 ]
Chromium
third_party/libxml/src/parserInternals.c
int xmlCopyChar(int len ATTRIBUTE_UNUSED, xmlChar *out, int val) { if (out == NULL) return (0); if (val >= 0x80) { return (xmlCopyCharMultiByte(out, val)); } *out = (xmlChar)val; return 1; }
[ 0, 0 ]
Chromium
third_party/libxml/src/parserInternals.c
int xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler) { return (xmlSwitchToEncodingInt(ctxt, handler, -1)); }
[ 0, 0 ]
Chromium
third_party/libxml/src/parserInternals.c
xmlParserInputPtr xmlNewInputFromFile(xmlParserCtxtPtr ctxt, const char *filename) { xmlParserInputBufferPtr buf; xmlParserInputPtr inputStream; char *directory = NULL; xmlChar *URI = NULL; if (xmlParserDebugEntities) xmlGenericError(xmlGenericErrorContext, "new inpu...
[ 0, 0 ]
Chromium
third_party/libxml/src/parserInternals.c
void xmlParserAddNodeInfo(xmlParserCtxtPtr ctxt, const xmlParserNodeInfoPtr info) { unsigned long pos; if ((ctxt == NULL) || (info == NULL)) return; pos = xmlParserFindNodeInfoIndex(&ctxt->node_seq, (xmlNodePtr)info->node); if ((pos < ctxt->node_seq.length) && (ctxt->node_seq.bu...
[ 1, 0 ]
Chromium
third_party/libxml/src/pattern.c
void xmlFreePattern(xmlPatternPtr comp) { xmlFreePatternList(comp); }
[ 0, 0 ]
Chromium
third_party/libxml/src/pattern.c
static int xmlPatternAdd(xmlPatParserContextPtr ctxt ATTRIBUTE_UNUSED, xmlPatternPtr comp, xmlPatOp op, xmlChar *value, xmlChar *value2) { if (comp->nbStep >= comp->maxStep) { xmlStepOpPtr temp; temp = (xmlStepOpPtr)xmlRealloc(comp->steps, ...
[ 1, 0 ]
Chromium
third_party/libxml/src/pattern.c
static int xmlReversePattern(xmlPatternPtr comp) { int i, j; if ((comp->nbStep > 0) && (comp->steps[0].op == XML_OP_ANCESTOR)) { for (i = 0, j = 1; j < comp->nbStep; i++, j++) { comp->steps[i].value = comp->steps[j].value; comp->steps[i].value2 = comp->steps[j].value2; comp->steps[i].op = com...
[ 1, 0 ]
Chromium
third_party/libxml/src/pattern.c
static void xmlDebugStreamComp(xmlStreamCompPtr stream) { int i; if (stream == NULL) { printf("Stream: NULL\n"); return; } printf("Stream: %d steps\n", stream->nbStep); for (i = 0; i < stream->nbStep; i++) { if (stream->steps[i].ns != NULL) { printf("{%s}", stream->steps[i].ns); } i...
[ 0, 0 ]
Chromium
third_party/libxml/src/pattern.c
static void xmlDebugStreamCtxt(xmlStreamCtxtPtr ctxt, int match) { int i; if (ctxt == NULL) { printf("Stream: NULL\n"); return; } printf("Stream: level %d, %d states: ", ctxt->level, ctxt->nbState); if (match) printf("matches\n"); else printf("\n"); for (i = 0; i < ctxt->nbState; i++) { ...
[ 1, 0 ]
Chromium
third_party/libxml/src/pattern.c
static int xmlStreamCompAddStep(xmlStreamCompPtr comp, const xmlChar *name, const xmlChar *ns, int nodeType, int flags) { xmlStreamStepPtr cur; if (comp->nbStep >= comp->maxStep) { cur = (xmlStreamStepPtr)xmlRealloc(comp->steps, comp->maxStep * 2 * ...
[ 1, 0 ]
Chromium
third_party/libxml/src/pattern.c
int xmlStreamWantsAnyNode(xmlStreamCtxtPtr streamCtxt) { if (streamCtxt == NULL) return (-1); while (streamCtxt != NULL) { if (streamCtxt->comp->flags & XML_STREAM_FINAL_IS_ANY_NODE) return (1); streamCtxt = streamCtxt->next; } return (0); }
[ 1, 0 ]
Chromium
third_party/libxml/src/pattern.c
xmlStreamCtxtPtr xmlPatternGetStreamCtxt(xmlPatternPtr comp) { xmlStreamCtxtPtr ret = NULL, cur; if ((comp == NULL) || (comp->stream == NULL)) return (NULL); while (comp != NULL) { if (comp->stream == NULL) goto failed; cur = xmlNewStreamCtxt(comp->stream); if (cur == NULL) goto fail...
[ 0, 0 ]
Chromium
third_party/libxml/src/pattern.c
int xmlPatternStreamable(xmlPatternPtr comp) { if (comp == NULL) return (-1); while (comp != NULL) { if (comp->stream == NULL) return (0); comp = comp->next; } return (1); }
[ 0, 0 ]
Chromium
third_party/libxml/src/pattern.c
int xmlPatternFromRoot(xmlPatternPtr comp) { if (comp == NULL) return (-1); while (comp != NULL) { if (comp->stream == NULL) return (-1); if (comp->flags & PAT_FROM_ROOT) return (1); comp = comp->next; } return (0); }
[ 0, 0 ]
Chromium
third_party/libxml/src/runsuite.c
static void resetEntities(void) { int i; for (i = 0; i < nb_entities; i++) { if (testEntitiesName[i] != NULL) xmlFree(testEntitiesName[i]); if (testEntitiesValue[i] != NULL) xmlFree(testEntitiesValue[i]); } nb_entities = 0; }
[ 0, 0 ]
Chromium
third_party/libxml/src/runsuite.c
static void test_log(const char *msg, ...) { va_list args; if (logfile != NULL) { fprintf(logfile, "\n------------\n"); va_start(args, msg); vfprintf(logfile, msg, args); va_end(args); fprintf(logfile, "%s", testErrors); testErrorsSize = 0; testErrors[0] = 0; } if (verbose) { va...
[ 0, 0 ]
Chromium
third_party/libxml/src/runsuite.c
static xmlNodePtr getNext(xmlNodePtr cur, const char *xpath) { xmlNodePtr ret = NULL; xmlXPathObjectPtr res; xmlXPathCompExprPtr comp; if ((cur == NULL) || (cur->doc == NULL) || (xpath == NULL)) return (NULL); ctxtXPath->doc = cur->doc; ctxtXPath->node = cur; comp = xmlXPathCompile(BAD_CAST xpath); ...
[ 1, 0 ]
Chromium
third_party/libxml/src/runsuite.c
static int xstcMetadata(const char *metadata, const char *base) { xmlDocPtr doc; xmlNodePtr cur; xmlChar *contributor; xmlChar *name; int ret = 0; doc = xmlReadFile(metadata, NULL, XML_PARSE_NOENT); if (doc == NULL) { fprintf(stderr, "Failed to parse %s\n", metadata); return (-1); } cur = x...
[ 0, 0 ]
Chromium
third_party/libxml/src/runtest.c
static int fatalError(void) { fprintf(stderr, "Exitting tests on fatal error\n"); exit(1); }
[ 0, 0 ]
Chromium
third_party/libxml/src/runtest.c
static void XMLCDECL channel(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) { va_list args; int res; if (testErrorsSize >= 32768) return; va_start(args, msg); res = vsnprintf(&testErrors[testErrorsSize], 32768 - testErrorsSize, msg, args); va_end(args); if (testErrorsSize + res >= 32768) { ...
[ 1, 0 ]
Chromium
third_party/libxml/src/runtest.c
static void initializeLibxml2(void) { xmlGetWarningsDefaultValue = 0; xmlPedanticParserDefault(0); xmlMemSetup(xmlMemFree, xmlMemMalloc, xmlMemRealloc, xmlMemoryStrdup); xmlInitParser(); xmlSetExternalEntityLoader(testExternalEntityLoader); xmlSetStructuredErrorFunc(NULL, testStructuredErrorHandler); #ifd...
[ 0, 0 ]
Chromium
third_party/libxml/src/runtest.c
static const char *baseFilename(const char *filename) { const char *cur; if (filename == NULL) return (NULL); cur = &filename[strlen(filename)]; while ((cur > filename) && (*cur != '/')) cur--; if (*cur == '/') return (cur + 1); return (cur); }
[ 0, 0 ]
Chromium
third_party/libxml/src/runtest.c
static char *resultFilename(const char *filename, const char *out, const char *suffix) { const char *base; char res[500]; char suffixbuff[500]; base = baseFilename(filename); if (suffix == NULL) suffix = ".tmp"; if (out == NULL) out = ""; strncpy(suffixbuff, suffix, 4...
[ 1, 0 ]
Chromium
third_party/libxml/src/runtest.c
static int checkTestFile(const char *filename) { struct stat buf; if (stat(filename, &buf) == -1) return (0); #if defined(_WIN32) && !defined(__CYGWIN__) if (!(buf.st_mode & _S_IFREG)) return (0); #else if (!S_ISREG(buf.st_mode)) return (0); #endif return (1); }
[ 0, 0 ]
Chromium
third_party/libxml/src/runtest.c
static xmlEntityPtr getEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name) { callbacks++; if (quiet) return (NULL); fprintf(SAXdebug, "SAX.getEntity(%s)\n", name); return (NULL); }
[ 0, 0 ]
Chromium
third_party/libxml/src/runtest.c
static void attributeDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *elem, const xmlChar *name, int type, int def, const xmlChar *defaultValue, xmlEnumerationPtr tree) { callbacks++; if (quiet) return; if (defaul...
[ 1, 0 ]
Chromium
third_party/libxml/src/runtest.c
static void setDocumentLocatorDebug(void *ctx ATTRIBUTE_UNUSED, xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED) { callbacks++; if (quiet) return; fprintf(SAXdebug, "SAX.setDocumentLocator()\n"); }
[ 0, 0 ]
Chromium
third_party/libxml/src/runtest.c
static void startDocumentDebug(void *ctx ATTRIBUTE_UNUSED) { callbacks++; if (quiet) return; fprintf(SAXdebug, "SAX.startDocument()\n"); }
[ 0, 0 ]
Chromium
third_party/libxml/src/runtest.c
static void endDocumentDebug(void *ctx ATTRIBUTE_UNUSED) { callbacks++; if (quiet) return; fprintf(SAXdebug, "SAX.endDocument()\n"); }
[ 0, 0 ]
Chromium
third_party/libxml/src/runtest.c
static void processingInstructionDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *target, const xmlChar *data) { callbacks++; if (quiet) return; if (data != NULL) fprintf(SAXdebug, "SAX.processingInstruction(%s, %s)\n", (char *)...
[ 0, 0 ]
Chromium
third_party/libxml/src/runtest.c
static void htmlcharactersDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len) { unsigned char output[40]; int inlen = len, outlen = 30; htmlEncodeEntities(output, &outlen, ch, &inlen, 0); output[outlen] = 0; fprintf(SAXdebug, "SAX.characters(%s, %d)\n", output, len)...
[ 0, 0 ]
Chromium
third_party/libxml/src/runtest.c
static void htmlcdataDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len) { unsigned char output[40]; int inlen = len, outlen = 30; htmlEncodeEntities(output, &outlen, ch, &inlen, 0); output[outlen] = 0; fprintf(SAXdebug, "SAX.cdata(%s, %d)\n", output, len); }
[ 0, 0 ]
Chromium
third_party/libxml/src/runtest.c
static int streamParseTest(const char *filename, const char *result, const char *err, int options) { xmlTextReaderPtr reader; int ret; reader = xmlReaderForFile(filename, NULL, options); ret = streamProcessTest(filename, result, err, reader, NULL, options); xmlFreeTextReader(reader...
[ 0, 0 ]
Chromium
third_party/libxml/src/runtest.c
static int streamMemParseTest(const char *filename, const char *result, const char *err, int options) { xmlTextReaderPtr reader; int ret; const char *base; int size; if (loadMem(filename, &base, &size) != 0) { fprintf(stderr, "Failed to load %s\n", filename); return (-1)...
[ 1, 0 ]
Chromium
third_party/libxml/src/runtest.c
static void handleURI(const char *str, const char *base, FILE *o) { int ret; xmlURIPtr uri; xmlChar *res = NULL; uri = xmlCreateURI(); if (base == NULL) { ret = xmlParseURIReference(uri, str); if (ret != 0) fprintf(o, "%s : error %d\n", str, ret); else { xmlNormalizeURIPath(uri->path...
[ 0, 0 ]
Chromium
third_party/libxml/src/runtest.c
static int uriCommonTest(const char *filename, const char *result, const char *err, const char *base) { char *temp; FILE *o, *f; char str[1024]; int res = 0, i, ret; temp = resultFilename(filename, temp_directory, ".res"); if (temp == NULL) { fprintf(stderr, "Out of memory\n");...
[ 1, 0 ]
Chromium
third_party/libxml/src/runtest.c
static int uriBaseTest(const char *filename, const char *result, const char *err, int options ATTRIBUTE_UNUSED) { return (uriCommonTest(filename, result, err, "http://foo.com/path/to/index.html?orig#help")); }
[ 0, 0 ]
Chromium
third_party/libxml/src/runtest.c
static void *uripOpen(const char *URI) { if ((URI == NULL) || (!strcmp(URI, "file:/ return(NULL); /* Verify we received the escaped URL */ if (strcmp(urip_rcvsURLs[urip_current], URI)) urip_success = 0; urip_cur = urip_res; urip_rlen = strlen(urip_res); return((void *) urip_cur); }
[ 1, 0 ]
Chromium
third_party/libxml/src/runtest.c
static int uripRead(void *context, char *buffer, int len) { const char *ptr = (const char *)context; if ((context == NULL) || (buffer == NULL) || (len < 0)) return (-1); if (len > urip_rlen) len = urip_rlen; memcpy(buffer, ptr, len); urip_rlen -= len; return (len); }
[ 1, 0 ]
Chromium
third_party/libxml/src/runtest.c
static int testThread(void) { unsigned int i, repeat; BOOL ret; int res = 0; xmlInitParser(); for (repeat = 0; repeat < TEST_REPEAT_COUNT; repeat++) { xmlLoadCatalog(catalog); nb_tests++; for (i = 0; i < num_threads; i++) { tid[i] = (HANDLE)-1; } for (i = 0; i < num_threads; i++)...
[ 0, 0 ]
Chromium
third_party/libxml/src/runtest.c
int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { fprintf(stderr, "runtest requires output to be enabled in libxml2\n"); return (1); } #endif
[ 0, 0 ]
Chromium
third_party/libxml/src/runxmlconf.c
static void testErrorHandler(void *userData ATTRIBUTE_UNUSED, xmlErrorPtr error) { int res; if (testErrorsSize >= 32768) return; res = snprintf(&testErrors[testErrorsSize], 32768 - testErrorsSize, "%s:%d: %s\n", (error->file ? error->file : "entity"), ...
[ 1, 0 ]
Chromium
third_party/libxml/src/runxmlconf.c
static void initializeLibxml2(void) { xmlGetWarningsDefaultValue = 0; xmlPedanticParserDefault(0); xmlMemSetup(xmlMemFree, xmlMemMalloc, xmlMemRealloc, xmlMemoryStrdup); xmlInitParser(); xmlSetExternalEntityLoader(testExternalEntityLoader); ctxtXPath = xmlXPathNewContext(NULL); if (ctxtXPath->cache != N...
[ 0, 0 ]
Chromium
third_party/libxml/src/runxmlconf.c
static int xmlconfTestInvalid(const char *id, const char *filename, int options) { xmlDocPtr doc; xmlParserCtxtPtr ctxt; int ret = 1; ctxt = xmlNewParserCtxt(); if (ctxt == NULL) { test_log("test %s : %s out of memory\n", id, filename); return (0); } doc = xmlCtxtRea...
[ 1, 0 ]
Chromium
third_party/libxml/src/runxmlconf.c
static int xmlconfTestSuite(xmlDocPtr doc, xmlNodePtr cur) { xmlChar *profile; int ret = 0; profile = xmlGetProp(cur, BAD_CAST "PROFILE"); if (profile != NULL) { printf("Test suite: %s\n", (char *)profile); xmlFree(profile); } else printf("Test suite\n"); cur = cur->children; while (cur != NU...
[ 1, 0 ]
Chromium
third_party/libxml/src/runxmlconf.c
static void xmlconfInfo(void) { fprintf(stderr, " you need to fetch and extract the\n"); fprintf(stderr, " latest XML Conformance Test Suites\n"); fprintf(stderr, " http://www.w3.org/XML/Test/xmlts20080827.tar.gz\n"); fprintf(stderr, " see http://www.w3.org/XML/Test/ for information\n"); }
[ 0, 0 ]
Chromium
third_party/libxml/src/runxmlconf.c
int main(int argc, char **argv) { fprintf(stderr, "%s need XPath support\n", argv[0]); } #endif
[ 0, 0 ]
Chromium
third_party/libxml/src/SAX2.c
int xmlSAX2IsStandalone(void *ctx) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr)ctx; if ((ctx == NULL) || (ctxt->myDoc == NULL)) return (0); return (ctxt->myDoc->standalone == 1); }
[ 1, 0 ]
Chromium
third_party/libxml/src/SAX2.c
int xmlSAX2HasInternalSubset(void *ctx) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr)ctx; if ((ctxt == NULL) || (ctxt->myDoc == NULL)) return (0); return (ctxt->myDoc->intSubset != NULL); }
[ 1, 0 ]
Chromium
third_party/libxml/src/SAX2.c
xmlEntityPtr xmlSAX2GetParameterEntity(void *ctx, const xmlChar *name) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr)ctx; xmlEntityPtr ret; if (ctx == NULL) return (NULL); #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2GetParameterEntity(%s)\n", name); #endif ret = ...
[ 0, 0 ]
Chromium
third_party/libxml/src/SAX2.c
void xmlSAX2StartDocument(void *ctx) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr)ctx; xmlDocPtr doc; if (ctx == NULL) return; #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2StartDocument()\n"); #endif if (ctxt->html) { #ifdef LIBXML_HTML_ENABLED if (ctxt->myDoc == NULL) c...
[ 1, 0 ]
Chromium
third_party/libxml/src/SAX2.c
void xmlSAX2EndDocument(void *ctx) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr)ctx; #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2EndDocument()\n"); #endif if (ctx == NULL) return; #ifdef LIBXML_VALID_ENABLED if (ctxt->validate && ctxt->wellFormed && ctxt->myDoc && ctxt->myDoc->...
[ 1, 0 ]
Chromium
third_party/libxml/src/SAX2.c
void xmlSAX2EndElementNs(void *ctx, const xmlChar *localname ATTRIBUTE_UNUSED, const xmlChar *prefix ATTRIBUTE_UNUSED, const xmlChar *URI ATTRIBUTE_UNUSED) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr)ctx; xmlParserNodeInfo node_info; xmlNodePtr cur; if (ctx == ...
[ 1, 0 ]
Chromium
third_party/libxml/src/SAX2.c
void xmlSAX2InitDefaultSAXHandler(xmlSAXHandler *hdlr, int warning) { if ((hdlr == NULL) || (hdlr->initialized != 0)) return; xmlSAXVersion(hdlr, xmlSAX2DefaultVersionValue); if (warning == 0) hdlr->warning = NULL; else hdlr->warning = xmlParserWarning; }
[ 1, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void structured_errors(void *userData ATTRIBUTE_UNUSED, xmlErrorPtr error ATTRIBUTE_UNUSED) { generic_errors++; }
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void free_api_doc(void) { xmlFreeDoc(api_doc); api_doc = NULL; api_dtd = NULL; api_root = NULL; api_attr = NULL; api_ns = NULL; }
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static xmlAttrPtr get_api_attr(void) { #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \ defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) static int nr = 0; xmlChar name[20]; #endif if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) { get_api_ro...
[ 1, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void *gen_void_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { return (NULL); }
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void des_void_ptr(int no ATTRIBUTE_UNUSED, void *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {} #if 0 #define gen_nb_const_void_ptr 2 static const void *gen_const_void_ptr(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return((const void *) "immutable string"); return(NULL)...
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void *gen_userdata(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return ((void *)&call_tests); if (no == 1) return ((void *)-1); return (NULL); }
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static int gen_int(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return (0); if (no == 1) return (1); if (no == 2) return (-1); if (no == 3) return (122); return (-1); }
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void des_int(int no ATTRIBUTE_UNUSED, int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {} #define gen_nb_parseroptions 5
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void des_xmlChar(int no ATTRIBUTE_UNUSED, xmlChar val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {} #define gen_nb_unsigned_int 3
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void des_unsigned_long(int no ATTRIBUTE_UNUSED, unsigned long val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {} #define gen_nb_double 4
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void des_double(int no ATTRIBUTE_UNUSED, double val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {} #define gen_nb_unsigned_long_ptr 2
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static xmlChar *gen_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return (&chartab[0]); return (NULL); }
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void des_xmlChar_ptr(int no ATTRIBUTE_UNUSED, xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {} #define gen_nb_FILE_ptr 2
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void des_const_xmlChar_ptr(int no ATTRIBUTE_UNUSED, const xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {} #define gen_nb_filepath 8
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void des_xmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlParserCtxtPtr val, int nr ATTRIBUTE_UNUSED) { if (val != NULL) xmlFreeParserCtxt(val); } #define gen_nb_xmlSAXHandlerPtr 2
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static xmlSAXHandlerPtr gen_xmlSAXHandlerPtr(int no, int nr ATTRIBUTE_UNUSED) { #ifdef LIBXML_SAX1_ENABLED if (no == 0) return ((xmlSAXHandlerPtr)&xmlDefaultSAXHandler); #endif return (NULL); }
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static xmlAttrPtr gen_xmlAttrPtr(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return (get_api_attr()); return (NULL); }
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void des_xmlAttrPtr(int no, xmlAttrPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { if (no == 0) free_api_doc(); } #define gen_nb_xmlDictPtr 2
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void des_xmlNodePtr(int no, xmlNodePtr val, int nr ATTRIBUTE_UNUSED) { if (no == 1) { free_api_doc(); } else if (val != NULL) { xmlUnlinkNode(val); xmlFreeNode(val); } }
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void des_xmlNsPtr(int no, xmlNsPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { if (no == 0) free_api_doc(); } #define gen_nb_xmlNodePtr_in 3
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static xmlNodePtr gen_xmlNodePtr_in(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return (xmlNewPI(BAD_CAST "test", NULL)); if (no == 0) return (xmlNewText(BAD_CAST "text")); return (NULL); }
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static xmlTextWriterPtr gen_xmlTextWriterPtr(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return (xmlNewTextWriterFilename("test.out", 0)); return (NULL); }
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static xmlListPtr gen_xmlListPtr(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return (xmlListCreate(NULL, NULL)); return (NULL); }
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static xmlHashTablePtr gen_xmlHashTablePtr(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return (xmlHashCreate(10)); return (NULL); }
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static xmlXPathObjectPtr gen_xmlXPathObjectPtr(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return (xmlXPathNewString(BAD_CAST "string object")); if (no == 1) return (xmlXPathNewFloat(1.1)); if (no == 2) return (xmlXPathNewBoolean(1)); if (no == 3) ...
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void *gen_xmlNanoFTPCtxtPtr(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return (xmlNanoFTPNewCtxt(REMOTE2GOOD)); if (no == 1) return (xmlNanoFTPNewCtxt(REMOTE1GOOD)); if (no == 2) return (xmlNanoFTPNewCtxt("foo")); return (NULL); }
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void des_xmlNanoFTPCtxtPtr(int no ATTRIBUTE_UNUSED, void *val, int nr ATTRIBUTE_UNUSED) { if (val != NULL) { xmlNanoFTPFreeCtxt(val); } } #endif #ifdef LIBXML_HTTP_ENABLED #define gen_nb_xmlNanoHTTPCtxtPtr 1
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static xmlSchemaPtr gen_xmlSchemaPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { return (NULL); }
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static xmlSchemaValidCtxtPtr gen_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { return (NULL); }
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void desret_xmlTextReaderPtr(xmlTextReaderPtr val) { xmlFreeTextReader(val); } #endif
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void desret_xmlNodePtr(xmlNodePtr val) { if ((val != NULL) && (val != api_root) && (val != (xmlNodePtr)api_doc)) { xmlUnlinkNode(val); xmlFreeNode(val); } }
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void desret_xmlNodeSetPtr(xmlNodeSetPtr val) { xmlXPathFreeNodeSet(val); } #endif
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void desret_xmlRelaxNGParserCtxtPtr(xmlRelaxNGParserCtxtPtr val) { xmlRelaxNGFreeParserCtxt(val); } #endif #ifdef LIBXML_HTML_ENABLED
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void desret_const_htmlEntityDesc_ptr(const htmlEntityDesc *val ATTRIBUTE_UNUSED) {} #endif #ifdef LIBXML_HTTP_ENABLED
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static unsigned char *gen_unsigned_char_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { return (NULL); }
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static void des_const_unsigned_char_ptr(int no ATTRIBUTE_UNUSED, const unsigned char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {} #ifdef LIBXML_HTML_ENABLED #define gen_nb_const_htmlNodePtr 1
[ 0, 0 ]
Chromium
third_party/libxml/src/testapi.c
static htmlNodePtr gen_const_htmlNodePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { return (NULL); }
[ 0, 0 ]