Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1098)

Unified Diff: third_party/libxml/src/testXPath.c

Issue 1193533007: Upgrade to libxml 2.9.2 and libxslt 1.1.28 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no iconv Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libxml/src/testThreadsWin32.c ('k') | third_party/libxml/src/testapi.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libxml/src/testXPath.c
diff --git a/third_party/libxml/src/testXPath.c b/third_party/libxml/src/testXPath.c
index 677419aade55f8fa09e56c2bf7aabd05bb5d3852..ebb9ff7bbd854eb35b6b07d4de6a39800ad869ca 100644
--- a/third_party/libxml/src/testXPath.c
+++ b/third_party/libxml/src/testXPath.c
@@ -51,7 +51,7 @@ static xmlDocPtr document = NULL;
/*
* Default document
*/
-static xmlChar buffer[] =
+static xmlChar buffer[] =
"<?xml version=\"1.0\"?>\n\
<EXAMPLE prop1=\"gnome is great\" prop2=\"&amp; linux too\">\n\
<head>\n\
@@ -79,7 +79,7 @@ static void
testXPath(const char *str) {
xmlXPathObjectPtr res;
xmlXPathContextPtr ctxt;
-
+
#if defined(LIBXML_XPTR_ENABLED)
if (xptr) {
ctxt = xmlXPtrNewContext(document, NULL, NULL);
@@ -96,7 +96,7 @@ testXPath(const char *str) {
comp = xmlXPathCompile(BAD_CAST str);
if (comp != NULL) {
- if (tree)
+ if (tree)
xmlXPathDebugDumpCompExpr(stdout, comp, 0);
res = xmlXPathCompiledEval(comp, ctxt);
@@ -127,10 +127,10 @@ testXPathFile(const char *filename) {
while (fgets(expression, 4500, input) != NULL) {
len = strlen(expression);
len--;
- while ((len >= 0) &&
+ while ((len >= 0) &&
((expression[len] == '\n') || (expression[len] == '\t') ||
(expression[len] == '\r') || (expression[len] == ' '))) len--;
- expression[len + 1] = 0;
+ expression[len + 1] = 0;
if (len >= 0) {
printf("\n========================\nExpression: %s\n", expression) ;
testXPath(expression);
@@ -150,7 +150,7 @@ int main(int argc, char **argv) {
#if defined(LIBXML_XPTR_ENABLED)
if ((!strcmp(argv[i], "-xptr")) || (!strcmp(argv[i], "--xptr")))
xptr++;
- else
+ else
#endif
if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug")))
debug++;
@@ -172,10 +172,12 @@ int main(int argc, char **argv) {
xmlLoadExtDtdDefaultValue |= XML_DETECT_IDS;
xmlLoadExtDtdDefaultValue |= XML_COMPLETE_ATTRS;
xmlSubstituteEntitiesDefaultValue = 1;
+#ifdef LIBXML_SAX1_ENABLED
if (nocdata != 0) {
xmlDefaultSAXHandlerInit();
xmlDefaultSAXHandler.cdataBlock = NULL;
}
+#endif
if (document == NULL) {
if (filename == NULL)
document = xmlReadDoc(buffer,NULL,NULL,XML_PARSE_COMPACT);
@@ -211,7 +213,7 @@ int main(int argc, char **argv) {
printf("\t--file : or\n");
printf("\t-f : read queries from files, args\n");
}
- if (document != NULL)
+ if (document != NULL)
xmlFreeDoc(document);
xmlCleanupParser();
xmlMemoryDump();
« no previous file with comments | « third_party/libxml/src/testThreadsWin32.c ('k') | third_party/libxml/src/testapi.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698