mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-02-24 05:57:54 +03:00
space and tabs cleanup Daniel
* xpath.c: space and tabs cleanup Daniel svn path=/trunk/; revision=3756
This commit is contained in:
parent
34e3f64191
commit
45490aebe7
@ -1,3 +1,7 @@
|
||||
Tue Jul 29 11:12:40 CEST 2008 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* xpath.c: space and tabs cleanup
|
||||
|
||||
Tue Jul 29 10:59:36 CEST 2008 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* include/libxml/parser.h include/libxml/xmlerror.h parser.c:
|
||||
|
72
xpath.c
72
xpath.c
@ -59,7 +59,7 @@
|
||||
#define XPATH_STREAMING
|
||||
#endif
|
||||
|
||||
#define TODO \
|
||||
#define TODO \
|
||||
xmlGenericError(xmlGenericErrorContext, \
|
||||
"Unimplemented block at %s:%d\n", \
|
||||
__FILE__, __LINE__);
|
||||
@ -99,9 +99,9 @@
|
||||
#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Floating point stuff *
|
||||
* *
|
||||
* *
|
||||
* Floating point stuff *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
#ifndef TRIO_REPLACE_STDIO
|
||||
@ -390,9 +390,9 @@ xmlXPatherror(xmlXPathParserContextPtr ctxt, const char *file ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Utilities *
|
||||
* *
|
||||
* *
|
||||
* Utilities *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
@ -486,9 +486,9 @@ xmlPointerListFree(xmlPointerListPtr list)
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Parser Types *
|
||||
* *
|
||||
* *
|
||||
* Parser Types *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/*
|
||||
@ -587,9 +587,9 @@ struct _xmlXPathCompExpr {
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Forward declarations *
|
||||
* *
|
||||
* *
|
||||
* Forward declarations *
|
||||
* *
|
||||
************************************************************************/
|
||||
static void
|
||||
xmlXPathFreeValueTree(xmlNodeSetPtr obj);
|
||||
@ -604,9 +604,9 @@ xmlXPathCompOpEvalToBoolean(xmlXPathParserContextPtr ctxt,
|
||||
int isPredicate);
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Parser Type functions *
|
||||
* *
|
||||
* *
|
||||
* Parser Type functions *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
@ -796,19 +796,19 @@ xmlXPathCompSwap(xmlXPathStepOpPtr op) {
|
||||
xmlXPathCompExprAdd(ctxt->comp, ctxt->comp->last, -1, \
|
||||
(op), (val), (val2), (val3), (val4), (val5))
|
||||
|
||||
#define PUSH_LEAVE_EXPR(op, val, val2) \
|
||||
#define PUSH_LEAVE_EXPR(op, val, val2) \
|
||||
xmlXPathCompExprAdd(ctxt->comp, -1, -1, (op), (val), (val2), 0 ,NULL ,NULL)
|
||||
|
||||
#define PUSH_UNARY_EXPR(op, ch, val, val2) \
|
||||
#define PUSH_UNARY_EXPR(op, ch, val, val2) \
|
||||
xmlXPathCompExprAdd(ctxt->comp, (ch), -1, (op), (val), (val2), 0 ,NULL ,NULL)
|
||||
|
||||
#define PUSH_BINARY_EXPR(op, ch1, ch2, val, val2) \
|
||||
#define PUSH_BINARY_EXPR(op, ch1, ch2, val, val2) \
|
||||
xmlXPathCompExprAdd(ctxt->comp, (ch1), (ch2), (op), \
|
||||
(val), (val2), 0 ,NULL ,NULL)
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* XPath object cache structures *
|
||||
* XPath object cache structures *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
@ -860,11 +860,11 @@ struct _xmlXPathContextCache {
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Debugging related functions *
|
||||
* Debugging related functions *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
#define STRANGE \
|
||||
#define STRANGE \
|
||||
xmlGenericError(xmlGenericErrorContext, \
|
||||
"Internal error at %s:%d\n", \
|
||||
__FILE__, __LINE__);
|
||||
@ -2393,7 +2393,7 @@ xmlXPathCacheConvertNumber(xmlXPathContextPtr ctxt, xmlXPathObjectPtr val) {
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Parser stacks related functions and macros *
|
||||
* Parser stacks related functions and macros *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
@ -2632,7 +2632,7 @@ xmlXPathPopExternal (xmlXPathParserContextPtr ctxt) {
|
||||
|
||||
#define NEXTL(l) ctxt->cur += l
|
||||
|
||||
#define SKIP_BLANKS \
|
||||
#define SKIP_BLANKS \
|
||||
while (IS_BLANK_CH(*(ctxt->cur))) NEXT
|
||||
|
||||
#define CURRENT (*ctxt->cur)
|
||||
@ -5419,7 +5419,7 @@ xmlXPathReleaseObject(xmlXPathContextPtr ctxt, xmlXPathObjectPtr obj)
|
||||
case XPATH_XSLT_TREE:
|
||||
if (obj->nodesetval != NULL) {
|
||||
if (obj->boolval) {
|
||||
/*
|
||||
/*
|
||||
* It looks like the @boolval is used for
|
||||
* evaluation if this an XSLT Result Tree Fragment.
|
||||
* TODO: Check if this assumption is correct.
|
||||
@ -6055,7 +6055,7 @@ xmlXPathFreeContext(xmlXPathContextPtr ctxt) {
|
||||
************************************************************************/
|
||||
|
||||
#define CHECK_CTXT(ctxt) \
|
||||
if (ctxt == NULL) { \
|
||||
if (ctxt == NULL) { \
|
||||
__xmlRaiseError(NULL, NULL, NULL, \
|
||||
NULL, NULL, XML_FROM_XPATH, \
|
||||
XML_ERR_INTERNAL_ERROR, XML_ERR_FATAL, \
|
||||
@ -6066,7 +6066,7 @@ xmlXPathFreeContext(xmlXPathContextPtr ctxt) {
|
||||
} \
|
||||
|
||||
#define CHECK_CTXT_NEG(ctxt) \
|
||||
if (ctxt == NULL) { \
|
||||
if (ctxt == NULL) { \
|
||||
__xmlRaiseError(NULL, NULL, NULL, \
|
||||
NULL, NULL, XML_FROM_XPATH, \
|
||||
XML_ERR_INTERNAL_ERROR, XML_ERR_FATAL, \
|
||||
@ -6079,7 +6079,7 @@ xmlXPathFreeContext(xmlXPathContextPtr ctxt) {
|
||||
|
||||
#define CHECK_CONTEXT(ctxt) \
|
||||
if ((ctxt == NULL) || (ctxt->doc == NULL) || \
|
||||
(ctxt->doc->children == NULL)) { \
|
||||
(ctxt->doc->children == NULL)) { \
|
||||
xmlXPatherror(ctxt, __FILE__, __LINE__, XPATH_INVALID_CTXT); \
|
||||
return(NULL); \
|
||||
}
|
||||
@ -6892,7 +6892,7 @@ xmlXPathEqualValuesCommon(xmlXPathParserContextPtr ctxt,
|
||||
case XPATH_NUMBER:
|
||||
/* Hand check NaN and Infinity equalities */
|
||||
if (xmlXPathIsNaN(arg1->floatval) ||
|
||||
xmlXPathIsNaN(arg2->floatval)) {
|
||||
xmlXPathIsNaN(arg2->floatval)) {
|
||||
ret = 0;
|
||||
} else if (xmlXPathIsInf(arg1->floatval) == 1) {
|
||||
if (xmlXPathIsInf(arg2->floatval) == 1)
|
||||
@ -6953,7 +6953,7 @@ xmlXPathEqualValuesCommon(xmlXPathParserContextPtr ctxt,
|
||||
arg1 = valuePop(ctxt);
|
||||
/* Hand check NaN and Infinity equalities */
|
||||
if (xmlXPathIsNaN(arg1->floatval) ||
|
||||
xmlXPathIsNaN(arg2->floatval)) {
|
||||
xmlXPathIsNaN(arg2->floatval)) {
|
||||
ret = 0;
|
||||
} else if (xmlXPathIsInf(arg1->floatval) == 1) {
|
||||
if (xmlXPathIsInf(arg2->floatval) == 1)
|
||||
@ -7760,7 +7760,7 @@ xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
|
||||
/*
|
||||
* Do not descend on entities declarations
|
||||
*/
|
||||
if (cur->children->type != XML_ENTITY_DECL) {
|
||||
if (cur->children->type != XML_ENTITY_DECL) {
|
||||
cur = cur->children;
|
||||
/*
|
||||
* Skip DTDs
|
||||
@ -10461,7 +10461,7 @@ xmlXPathCompPathExpr(xmlXPathParserContextPtr ctxt) {
|
||||
|
||||
SKIP_BLANKS;
|
||||
if ((CUR == '$') || (CUR == '(') ||
|
||||
(IS_ASCII_DIGIT(CUR)) ||
|
||||
(IS_ASCII_DIGIT(CUR)) ||
|
||||
(CUR == '\'') || (CUR == '"') ||
|
||||
(CUR == '.' && IS_ASCII_DIGIT(NXT(1)))) {
|
||||
lc = 0;
|
||||
@ -11392,7 +11392,7 @@ xmlXPathCompLocationPath(xmlXPathParserContextPtr ctxt) {
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* XPath precompiled expression evaluation *
|
||||
* XPath precompiled expression evaluation *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
@ -13172,7 +13172,7 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
|
||||
total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
|
||||
CHECK_ERROR0;
|
||||
if (op->value)
|
||||
equal = xmlXPathEqualValues(ctxt);
|
||||
equal = xmlXPathEqualValues(ctxt);
|
||||
else
|
||||
equal = xmlXPathNotEqualValues(ctxt);
|
||||
valuePush(ctxt, xmlXPathCacheNewBoolean(ctxt->context, equal));
|
||||
@ -14351,7 +14351,7 @@ xmlXPathRunEval(xmlXPathParserContextPtr ctxt, int toBool)
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Public interfaces *
|
||||
* Public interfaces *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
@ -14507,7 +14507,7 @@ xmlXPathTryStreamCompile(xmlXPathContextPtr ctxt, const xmlChar *str) {
|
||||
&namespaces[0]);
|
||||
if (namespaces != NULL) {
|
||||
xmlFree((xmlChar **)namespaces);
|
||||
}
|
||||
}
|
||||
if ((stream != NULL) && (xmlPatternStreamable(stream) == 1)) {
|
||||
comp = xmlXPathNewCompExpr();
|
||||
if (comp == NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user