aboutsummaryrefslogtreecommitdiffstats
path: root/testXPath.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2001-03-24 17:00:36 +0000
committerDaniel Veillard <veillard@src.gnome.org>2001-03-24 17:00:36 +0000
commit56a4cb8c4d3eab4ab3295a61c87e8e92483922c6 (patch)
tree24cdc196bdb98eb6980c2d27e405fc7e1f1d7bdf /testXPath.c
parentc7ad7ce598261a447cfceb7837219fcd93151336 (diff)
downloadandroid_external_libxml2-56a4cb8c4d3eab4ab3295a61c87e8e92483922c6.tar.gz
android_external_libxml2-56a4cb8c4d3eab4ab3295a61c87e8e92483922c6.tar.bz2
android_external_libxml2-56a4cb8c4d3eab4ab3295a61c87e8e92483922c6.zip
Huge cleanup, I switched to compile with
-Wall -g -O -ansi -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline - HTMLparser.[ch] HTMLtree.c SAX.c debugXML.c encoding.[ch] encoding.h entities.c error.c list.[ch] nanoftp.c nanohttp.c parser.[ch] parserInternals.[ch] testHTML.c testSAX.c testURI.c testXPath.c tree.[ch] uri.c valid.[ch] xinclude.c xmlIO.[ch] xmllint.c xmlmemory.c xpath.c xpathInternals.h xpointer.[ch] example/gjobread.c: Cleanup, staticfied a number of non-exported functions, detected and cleaned up a dozen of problem found this way, avoided a lot of public function name/typedef/system names clashes - doc/xml.html: updated - configure.in: switched private flags to the really pedantic ones. Daniel
Diffstat (limited to 'testXPath.c')
-rw-r--r--testXPath.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/testXPath.c b/testXPath.c
index 2bd5eb59..d7f2a976 100644
--- a/testXPath.c
+++ b/testXPath.c
@@ -87,7 +87,8 @@ static xmlChar buffer[] =
";
-void testXPath(const char *str) {
+static void
+testXPath(const char *str) {
xmlXPathObjectPtr res;
xmlXPathContextPtr ctxt;
@@ -111,9 +112,10 @@ void testXPath(const char *str) {
xmlXPathFreeContext(ctxt);
}
-void testXPathFile(const char *filename) {
+static void
+testXPathFile(const char *filename) {
FILE *input;
- char expr[5000];
+ char expression[5000];
int len;
input = fopen(filename, "r");
@@ -122,16 +124,16 @@ void testXPathFile(const char *filename) {
"Cannot open %s for reading\n", filename);
return;
}
- while (fgets(expr, 4500, input) != NULL) {
- len = strlen(expr);
+ while (fgets(expression, 4500, input) != NULL) {
+ len = strlen(expression);
len--;
while ((len >= 0) &&
- ((expr[len] == '\n') || (expr[len] == '\t') ||
- (expr[len] == '\r') || (expr[len] == ' '))) len--;
- expr[len + 1] = 0;
+ ((expression[len] == '\n') || (expression[len] == '\t') ||
+ (expression[len] == '\r') || (expression[len] == ' '))) len--;
+ expression[len + 1] = 0;
if (len >= 0) {
- printf("\n========================\nExpression: %s\n", expr) ;
- testXPath(expr);
+ printf("\n========================\nExpression: %s\n", expression) ;
+ testXPath(expression);
}
}