[LIBXML2]

- Trim trailing whitespace. Remove spaces before tabs. No code changes.
CORE-6907

svn path=/trunk/; revision=58294
This commit is contained in:
Thomas Faber 2013-02-09 09:25:56 +00:00
parent 28bb645017
commit 54a7a551a2
110 changed files with 4235 additions and 4235 deletions

View file

@ -32,7 +32,7 @@
/************************************************************************
* *
* Getting/Setting encoding meta tags *
* Getting/Setting encoding meta tags *
* *
************************************************************************/
@ -332,7 +332,7 @@ xmlOutputBufferPtr
xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder);
/************************************************************************
* *
* Output error handlers *
* Output error handlers *
* *
************************************************************************/
/**
@ -381,7 +381,7 @@ htmlSaveErr(int code, xmlNodePtr node, const char *extra)
/************************************************************************
* *
* Dumping HTML tree content to a simple buffer *
* Dumping HTML tree content to a simple buffer *
* *
************************************************************************/
@ -617,7 +617,7 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
/************************************************************************
* *
* Dumping HTML tree content to an I/O output buffer *
* Dumping HTML tree content to an I/O output buffer *
* *
************************************************************************/

View file

@ -45,7 +45,7 @@
*> values "system" and "public". I have made the default be "system" to
*> match yours.
*/
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);

View file

@ -44,7 +44,7 @@ typedef struct _xmlC14NVisibleNsStack {
int nsPrevStart; /* the begginning of the stack for previous visible node */
int nsPrevEnd; /* the end of the stack for previous visible node */
int nsMax; /* size of the array as allocated */
xmlNsPtr *nsTab; /* array of ns in no particular order */
xmlNsPtr *nsTab; /* array of ns in no particular order */
xmlNodePtr *nodeTab; /* array of nodes in no particular order */
} xmlC14NVisibleNsStack, *xmlC14NVisibleNsStackPtr;
@ -76,11 +76,11 @@ static void xmlC14NVisibleNsStackDestroy (xmlC14NVisibleNsStackPtr cur);
static void xmlC14NVisibleNsStackAdd (xmlC14NVisibleNsStackPtr cur,
xmlNsPtr ns,
xmlNodePtr node);
static void xmlC14NVisibleNsStackSave (xmlC14NVisibleNsStackPtr cur,
static void xmlC14NVisibleNsStackSave (xmlC14NVisibleNsStackPtr cur,
xmlC14NVisibleNsStackPtr state);
static void xmlC14NVisibleNsStackRestore (xmlC14NVisibleNsStackPtr cur,
static void xmlC14NVisibleNsStackRestore (xmlC14NVisibleNsStackPtr cur,
xmlC14NVisibleNsStackPtr state);
static void xmlC14NVisibleNsStackShift (xmlC14NVisibleNsStackPtr cur);
static void xmlC14NVisibleNsStackShift (xmlC14NVisibleNsStackPtr cur);
static int xmlC14NVisibleNsStackFind (xmlC14NVisibleNsStackPtr cur,
xmlNsPtr ns);
static int xmlExcC14NVisibleNsStackFind (xmlC14NVisibleNsStackPtr cur,
@ -105,26 +105,26 @@ typedef enum {
static xmlChar *xmlC11NNormalizeString(const xmlChar * input,
xmlC14NNormalizationMode mode);
#define xmlC11NNormalizeAttr( a ) \
#define xmlC11NNormalizeAttr( a ) \
xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_ATTR)
#define xmlC11NNormalizeComment( a ) \
#define xmlC11NNormalizeComment( a ) \
xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_COMMENT)
#define xmlC11NNormalizePI( a ) \
#define xmlC11NNormalizePI( a ) \
xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_PI)
#define xmlC11NNormalizeText( a ) \
#define xmlC11NNormalizeText( a ) \
xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_TEXT)
#define xmlC14NIsVisible( ctx, node, parent ) \
#define xmlC14NIsVisible( ctx, node, parent ) \
(((ctx)->is_visible_callback != NULL) ? \
(ctx)->is_visible_callback((ctx)->user_data, \
(xmlNodePtr)(node), (xmlNodePtr)(parent)) : 1)
#define xmlC14NIsExclusive( ctx ) \
#define xmlC14NIsExclusive( ctx ) \
( (ctx)->mode == XML_C14N_EXCLUSIVE_1_0 )
/************************************************************************
* *
* Some factorized error routines *
* Some factorized error routines *
* *
************************************************************************/
@ -468,7 +468,7 @@ xmlExcC14NVisibleNsStackFind(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns, xmlC14NC
if(xmlC14NStrEqual(prefix, (ns1 != NULL) ? ns1->prefix : NULL)) {
if(xmlC14NStrEqual(href, (ns1 != NULL) ? ns1->href : NULL)) {
return(xmlC14NIsVisible(ctx, ns1, cur->nodeTab[i]));
return(xmlC14NIsVisible(ctx, ns1, cur->nodeTab[i]));
} else {
return(0);
}
@ -483,7 +483,7 @@ xmlExcC14NVisibleNsStackFind(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns, xmlC14NC
/**
* xmlC14NIsXmlNs:
* @ns: the namespace to check
* @ns: the namespace to check
*
* Checks whether the given namespace is a default "xml:" namespace
* with href="http://www.w3.org/XML/1998/namespace"
@ -504,7 +504,7 @@ xmlC14NIsXmlNs(xmlNsPtr ns)
/**
* xmlC14NNsCompare:
* @ns1: the pointer to first namespace
* @ns2: the pointer to second namespace
* @ns2: the pointer to second namespace
*
* Compares the namespaces by names (prefixes).
*
@ -527,7 +527,7 @@ xmlC14NNsCompare(xmlNsPtr ns1, xmlNsPtr ns2)
/**
* xmlC14NPrintNamespaces:
* @ns: the pointer to namespace
* @ctx: the C14N context
* @ctx: the C14N context
*
* Prints the given namespace to the output buffer from C14N context.
*
@ -558,7 +558,7 @@ xmlC14NPrintNamespaces(const xmlNsPtr ns, xmlC14NCtxPtr ctx)
/**
* xmlC14NProcessNamespacesAxis:
* @ctx: the C14N context
* @ctx: the C14N context
* @node: the current node
*
* Prints out canonical namespace axis of the current node to the
@ -626,12 +626,12 @@ xmlC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
if((tmp == ns) && !xmlC14NIsXmlNs(ns) && xmlC14NIsVisible(ctx, ns, cur)) {
already_rendered = xmlC14NVisibleNsStackFind(ctx->ns_rendered, ns);
if(visible) {
xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur);
xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur);
}
if(!already_rendered) {
xmlListInsert(list, ns);
}
if(xmlStrlen(ns->prefix) == 0) {
if(xmlStrlen(ns->prefix) == 0) {
has_empty_ns = 1;
}
}
@ -652,7 +652,7 @@ xmlC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
memset(&ns_default, 0, sizeof(ns_default));
if(!xmlC14NVisibleNsStackFind(ctx->ns_rendered, &ns_default)) {
xmlC14NPrintNamespaces(&ns_default, ctx);
xmlC14NPrintNamespaces(&ns_default, ctx);
}
}
@ -672,7 +672,7 @@ xmlC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
/**
* xmlExcC14NProcessNamespacesAxis:
* @ctx: the C14N context
* @ctx: the C14N context
* @node: the current node
*
* Prints out exclusive canonical namespace axis of the current node to the
@ -755,12 +755,12 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
if((ns != NULL) && !xmlC14NIsXmlNs(ns) && xmlC14NIsVisible(ctx, ns, cur)) {
already_rendered = xmlC14NVisibleNsStackFind(ctx->ns_rendered, ns);
if(visible) {
xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur);
xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur);
}
if(!already_rendered) {
xmlListInsert(list, ns);
xmlListInsert(list, ns);
}
if(xmlStrlen(ns->prefix) == 0) {
if(xmlStrlen(ns->prefix) == 0) {
has_empty_ns = 1;
}
}
@ -781,7 +781,7 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
}
}
if(visible) {
xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur);
xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur);
}
if(xmlStrlen(ns->prefix) == 0) {
has_empty_ns = 1;
@ -794,7 +794,7 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
/*
* we need to check that attribute is visible and has non
* default namespace (XML Namespaces: "default namespaces
* do not apply directly to attributes")
* do not apply directly to attributes")
*/
if((attr->ns != NULL) && !xmlC14NIsXmlNs(attr->ns) && xmlC14NIsVisible(ctx, attr, cur)) {
already_rendered = xmlExcC14NVisibleNsStackFind(ctx->ns_rendered, attr->ns, ctx);
@ -821,14 +821,14 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
already_rendered = xmlExcC14NVisibleNsStackFind(ctx->ns_rendered, &ns_default, ctx);
if(!already_rendered) {
xmlC14NPrintNamespaces(&ns_default, ctx);
xmlC14NPrintNamespaces(&ns_default, ctx);
}
} else if(visible && !has_empty_ns && has_empty_ns_in_inclusive_list) {
static xmlNs ns_default;
memset(&ns_default, 0, sizeof(ns_default));
if(!xmlC14NVisibleNsStackFind(ctx->ns_rendered, &ns_default)) {
xmlC14NPrintNamespaces(&ns_default, ctx);
xmlC14NPrintNamespaces(&ns_default, ctx);
}
}
@ -849,7 +849,7 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
/**
* xmlC14NIsXmlAttr:
* @attr: the attr to check
* @attr: the attr to check
*
* Checks whether the given attribute is a default "xml:" namespace
* with href="http://www.w3.org/XML/1998/namespace"
@ -869,7 +869,7 @@ xmlC14NIsXmlAttr(xmlAttrPtr attr)
/**
* xmlC14NAttrsCompare:
* @attr1: the pointer tls o first attr
* @attr2: the pointer to second attr
* @attr2: the pointer to second attr
*
* Prints the given attribute to the output buffer from C14N context.
*
@ -918,7 +918,7 @@ xmlC14NAttrsCompare(xmlAttrPtr attr1, xmlAttrPtr attr2)
/**
* xmlC14NPrintAttrs:
* @attr: the pointer to attr
* @ctx: the C14N context
* @ctx: the C14N context
*
* Prints out canonical attribute urrent node to the
* buffer from C14N context as follows
@ -1088,7 +1088,7 @@ xmlC14NFixupBaseAttr(xmlC14NCtxPtr ctx, xmlAttrPtr xml_base_attr)
/**
* xmlC14NProcessAttrsAxis:
* @ctx: the C14N context
* @ctx: the C14N context
* @cur: the current node
* @parent_visible: the visibility of parent node
* @all_parents_visible: the visibility of all parent nodes
@ -1388,7 +1388,7 @@ xmlC14NCheckForRelativeNamespaces(xmlC14NCtxPtr ctx, xmlNodePtr cur)
/**
* xmlC14NProcessElementNode:
* @ctx: the pointer to C14N context object
* @ctx: the pointer to C14N context object
* @cur: the node to process
* @visible: this node is visible
* @all_parents_visible: whether all the parents of this node are visible
@ -1472,7 +1472,7 @@ xmlC14NProcessElementNode(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
ret = xmlC14NProcessAttrsAxis(ctx, cur, visible);
if (ret < 0) {
xmlC14NErrInternal("processing attributes axis");
return (-1);
return (-1);
}
if (visible) {
@ -1510,7 +1510,7 @@ xmlC14NProcessElementNode(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
/**
* xmlC14NProcessNode:
* @ctx: the pointer to C14N context object
* @ctx: the pointer to C14N context object
* @cur: the node to process
*
* Processes the given node
@ -1701,7 +1701,7 @@ xmlC14NProcessNode(xmlC14NCtxPtr ctx, xmlNodePtr cur)
/**
* xmlC14NProcessNodeList:
* @ctx: the pointer to C14N context object
* @ctx: the pointer to C14N context object
* @cur: the node to start from
*
* Processes all nodes in the row starting from cur.
@ -1748,18 +1748,18 @@ xmlC14NFreeCtx(xmlC14NCtxPtr ctx)
/**
* xmlC14NNewCtx:
* @doc: the XML document for canonization
* @doc: the XML document for canonization
* @is_visible_callback:the function to use to determine is node visible
* or not
* @user_data: the first parameter for @is_visible_callback function
* @user_data: the first parameter for @is_visible_callback function
* (in most cases, it is nodes set)
* @mode: the c14n mode (see @xmlC14NMode)
* @inclusive_ns_prefixe the list of inclusive namespace prefixes
* ended with a NULL or NULL if there is no
* inclusive namespaces (only for `
* canonicalization)
* @with_comments: include comments in the result (!=0) or not (==0)
* @buf: the output buffer to store canonical XML; this
* @with_comments: include comments in the result (!=0) or not (==0)
* @buf: the output buffer to store canonical XML; this
* buffer MUST have encoder==NULL because C14N requires
* UTF-8 output
*
@ -1840,18 +1840,18 @@ xmlC14NNewCtx(xmlDocPtr doc,
/**
* xmlC14NExecute:
* @doc: the XML document for canonization
* @doc: the XML document for canonization
* @is_visible_callback:the function to use to determine is node visible
* or not
* @user_data: the first parameter for @is_visible_callback function
* @user_data: the first parameter for @is_visible_callback function
* (in most cases, it is nodes set)
* @mode: the c14n mode (see @xmlC14NMode)
* @inclusive_ns_prefixes: the list of inclusive namespace prefixes
* ended with a NULL or NULL if there is no
* inclusive namespaces (only for exclusive
* canonicalization, ignored otherwise)
* @with_comments: include comments in the result (!=0) or not (==0)
* @buf: the output buffer to store canonical XML; this
* @with_comments: include comments in the result (!=0) or not (==0)
* @buf: the output buffer to store canonical XML; this
* buffer MUST have encoder==NULL because C14N requires
* UTF-8 output
*
@ -1944,16 +1944,16 @@ xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback,
/**
* xmlC14NDocSaveTo:
* @doc: the XML document for canonization
* @nodes: the nodes set to be included in the canonized image
* or NULL if all document nodes should be included
* @doc: the XML document for canonization
* @nodes: the nodes set to be included in the canonized image
* or NULL if all document nodes should be included
* @mode: the c14n mode (see @xmlC14NMode)
* @inclusive_ns_prefixes: the list of inclusive namespace prefixes
* ended with a NULL or NULL if there is no
* inclusive namespaces (only for exclusive
* canonicalization, ignored otherwise)
* @with_comments: include comments in the result (!=0) or not (==0)
* @buf: the output buffer to store canonical XML; this
* @with_comments: include comments in the result (!=0) or not (==0)
* @buf: the output buffer to store canonical XML; this
* buffer MUST have encoder==NULL because C14N requires
* UTF-8 output
*
@ -1979,16 +1979,16 @@ xmlC14NDocSaveTo(xmlDocPtr doc, xmlNodeSetPtr nodes,
/**
* xmlC14NDocDumpMemory:
* @doc: the XML document for canonization
* @nodes: the nodes set to be included in the canonized image
* or NULL if all document nodes should be included
* @doc: the XML document for canonization
* @nodes: the nodes set to be included in the canonized image
* or NULL if all document nodes should be included
* @mode: the c14n mode (see @xmlC14NMode)
* @inclusive_ns_prefixes: the list of inclusive namespace prefixes
* ended with a NULL or NULL if there is no
* inclusive namespaces (only for exclusive
* canonicalization, ignored otherwise)
* @with_comments: include comments in the result (!=0) or not (==0)
* @doc_txt_ptr: the memory pointer for allocated canonical XML text;
* @with_comments: include comments in the result (!=0) or not (==0)
* @doc_txt_ptr: the memory pointer for allocated canonical XML text;
* the caller of this functions is responsible for calling
* xmlFree() to free allocated memory
*
@ -2048,16 +2048,16 @@ xmlC14NDocDumpMemory(xmlDocPtr doc, xmlNodeSetPtr nodes,
/**
* xmlC14NDocSave:
* @doc: the XML document for canonization
* @nodes: the nodes set to be included in the canonized image
* or NULL if all document nodes should be included
* @doc: the XML document for canonization
* @nodes: the nodes set to be included in the canonized image
* or NULL if all document nodes should be included
* @mode: the c14n mode (see @xmlC14NMode)
* @inclusive_ns_prefixes: the list of inclusive namespace prefixes
* ended with a NULL or NULL if there is no
* inclusive namespaces (only for exclusive
* canonicalization, ignored otherwise)
* @with_comments: include comments in the result (!=0) or not (==0)
* @filename: the filename to store canonical XML image
* @with_comments: include comments in the result (!=0) or not (==0)
* @filename: the filename to store canonical XML image
* @compression: the compression level (zlib requred):
* -1 - libxml default,
* 0 - uncompressed,
@ -2121,7 +2121,7 @@ xmlC14NDocSave(xmlDocPtr doc, xmlNodeSetPtr nodes,
#define growBufferReentrant() { \
buffer_size *= 2; \
buffer = (xmlChar *) \
xmlRealloc(buffer, buffer_size * sizeof(xmlChar)); \
xmlRealloc(buffer, buffer_size * sizeof(xmlChar)); \
if (buffer == NULL) { \
xmlC14NErrMemory("growing buffer"); \
return(NULL); \

View file

@ -60,7 +60,7 @@
*> values "system" and "public". I have made the default be "system" to
*> match yours.
*/
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
@ -206,7 +206,7 @@ static int xmlCatalogInitialized = 0;
/************************************************************************
* *
* Catalog error handlers *
* Catalog error handlers *
* *
************************************************************************/
@ -567,7 +567,7 @@ static void xmlDumpXMLCatalogNode(xmlCatalogEntryPtr catal, xmlNodePtr catalog,
xns = xmlSearchNsByHref(doc, node, XML_XML_NAMESPACE);
if (xns != NULL)
xmlSetNsProp(node, xns, BAD_CAST "base",
cur->value);
cur->value);
}
switch (cur->prefer) {
case XML_CATA_PREFER_NONE:

View file

@ -1799,7 +1799,7 @@ xmlBoolToText(int boolval)
#ifdef LIBXML_XPATH_ENABLED
/****************************************************************
* *
* The XML shell related functions *
* The XML shell related functions *
* *
****************************************************************/

View file

@ -1825,7 +1825,7 @@ xmlIconvWrapper(iconv_t cd, unsigned char *out, int *outlen,
/************************************************************************
* *
* ICU based generic conversion functions *
* ICU based generic conversion functions *
* *
************************************************************************/
@ -2197,7 +2197,7 @@ retry:
else if (handler->uconv_out != NULL) {
ret = xmlUconvWrapper(handler->uconv_out, 0,
&out->content[out->use],
&written, NULL, &toconv);
&written, NULL, &toconv);
out->use += written;
out->content[out->use] = 0;
}
@ -2603,7 +2603,7 @@ UTF8ToISO8859x(unsigned char* out, int *outlen,
c2 = c2 & 0x3F;
d = d & 0x0F;
d = xlattable [48 + c2 + xlattable [48 + c1 +
xlattable [32 + d] * 64] * 64];
xlattable [32 + d] * 64] * 64];
if (d == 0) {
/* not in character set */
*outlen = out - outstart;

View file

@ -530,7 +530,7 @@ xmlGetDocEntity(xmlDocPtr doc, const xmlChar *name) {
#define growBufferReentrant() { \
buffer_size *= 2; \
buffer = (xmlChar *) \
xmlRealloc(buffer, buffer_size * sizeof(xmlChar)); \
xmlRealloc(buffer, buffer_size * sizeof(xmlChar)); \
if (buffer == NULL) { \
xmlEntitiesErrMemory("xmlEncodeEntitiesReentrant: realloc failed");\
return(NULL); \

View file

@ -33,7 +33,7 @@ void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
\
while (size < 64000) { \
va_start(ap, msg); \
chars = vsnprintf(str, size, msg, ap); \
chars = vsnprintf(str, size, msg, ap); \
va_end(ap); \
if ((chars > -1) && (chars < size)) { \
if (prev_size == chars) { \
@ -54,9 +54,9 @@ void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
}
/************************************************************************
* *
* Handling of out of context errors *
* *
* *
* Handling of out of context errors *
* *
************************************************************************/
/**
@ -137,9 +137,9 @@ xmlSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler) {
}
/************************************************************************
* *
* Handling of parsing errors *
* *
* *
* Handling of parsing errors *
* *
************************************************************************/
/**
@ -187,7 +187,7 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
n = 0;
/* search backwards for beginning-of-line (to max buff size) */
while ((n++ < (sizeof(content)-1)) && (cur > base) &&
(*(cur) != '\n') && (*(cur) != '\r'))
(*(cur) != '\n') && (*(cur) != '\r'))
cur--;
if ((*(cur) == '\n') || (*(cur) == '\r')) cur++;
/* calculate the error position in terms of the current position */
@ -197,7 +197,7 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
ctnt = content;
/* copy selected text to our buffer */
while ((*cur != 0) && (*(cur) != '\n') &&
(*(cur) != '\r') && (n < sizeof(content)-1)) {
(*(cur) != '\r') && (n < sizeof(content)-1)) {
*ctnt++ = *cur++;
n++;
}
@ -746,9 +746,9 @@ xmlParserWarning(void *ctx, const char *msg, ...)
}
/************************************************************************
* *
* Handling of validation errors *
* *
* *
* Handling of validation errors *
* *
************************************************************************/
/**

View file

@ -65,9 +65,9 @@ void xmlCleanupGlobals(void)
}
/************************************************************************
* *
* *
* All the user accessible global variables of the library *
* *
* *
************************************************************************/
/*
@ -732,7 +732,7 @@ __xmlMalloc(void){
if (IS_MAIN_THREAD)
return (&xmlMalloc);
else
return (&xmlGetGlobalState()->xmlMalloc);
return (&xmlGetGlobalState()->xmlMalloc);
}
#undef xmlMallocAtomic

View file

@ -155,8 +155,8 @@ xmlHashCreate(int size) {
table->nbElems = 0;
table->table = xmlMalloc(size * sizeof(xmlHashEntry));
if (table->table) {
memset(table->table, 0, size * sizeof(xmlHashEntry));
return(table);
memset(table->table, 0, size * sizeof(xmlHashEntry));
return(table);
}
xmlFree(table);
}
@ -254,8 +254,8 @@ xmlHashGrow(xmlHashTablePtr table, int size) {
table->table[key].next = NULL;
xmlFree(iter);
} else {
iter->next = table->table[key].next;
table->table[key].next = iter;
iter->next = table->table[key].next;
table->table[key].next = iter;
}
#ifdef DEBUG_GROW

View file

@ -740,7 +740,7 @@ xmlEncodeEntities(xmlDocPtr doc ATTRIBUTE_UNUSED,
/************************************************************************
* *
* Old set of SAXv1 functions *
* Old set of SAXv1 functions *
* *
************************************************************************/
static int deprecated_v1_msg = 0;

View file

@ -2042,9 +2042,9 @@ xmlNanoFTPClose(void *ctx) {
#ifdef STANDALONE
/************************************************************************
* *
* Basic test in Standalone mode *
* *
* *
* Basic test in Standalone mode *
* *
************************************************************************/
static
void ftpList(void *userData, const char *filename, const char* attrib,

View file

@ -1430,11 +1430,11 @@ retry:
if (ctxt->port != 80) {
p += snprintf( p, blen - (p - bp), "%s http://%s:%d%s",
method, ctxt->hostname,
ctxt->port, ctxt->path );
ctxt->port, ctxt->path );
}
else
p += snprintf( p, blen - (p - bp), "%s http://%s%s", method,
ctxt->hostname, ctxt->path);
ctxt->hostname, ctxt->path);
}
else
p += snprintf( p, blen - (p - bp), "%s %s", method, ctxt->path);
@ -1493,7 +1493,7 @@ retry:
if ( xmt_bytes != ilen )
xmlGenericError( xmlGenericErrorContext,
"xmlNanoHTTPMethodRedir: Only %d of %d %s %s\n",
"xmlNanoHTTPMethodRedir: Only %d of %d %s %s\n",
xmt_bytes, ilen,
"bytes of HTTP content sent to host",
ctxt->hostname );

View file

@ -229,7 +229,7 @@ xmlLoadEntityContent(xmlParserCtxtPtr ctxt, xmlEntityPtr entity);
/************************************************************************
* *
* Some factorized error routines *
* Some factorized error routines *
* *
************************************************************************/
@ -750,7 +750,7 @@ xmlNsWarn(xmlParserCtxtPtr ctxt, xmlParserErrors error,
/************************************************************************
* *
* Library wide options *
* Library wide options *
* *
************************************************************************/
@ -968,7 +968,7 @@ xmlHasFeature(xmlFeature feature)
/************************************************************************
* *
* SAX2 defaulted attributes handling *
* SAX2 defaulted attributes handling *
* *
************************************************************************/
@ -993,7 +993,7 @@ xmlDetectSAX2(xmlParserCtxtPtr ctxt) {
ctxt->str_xmlns = xmlDictLookup(ctxt->dict, BAD_CAST "xmlns", 5);
ctxt->str_xml_ns = xmlDictLookup(ctxt->dict, XML_XML_NAMESPACE, 36);
if ((ctxt->str_xml==NULL) || (ctxt->str_xmlns==NULL) ||
(ctxt->str_xml_ns == NULL)) {
(ctxt->str_xml_ns == NULL)) {
xmlErrMemory(ctxt, NULL);
}
}
@ -1962,10 +1962,10 @@ static int spacePop(xmlParserCtxtPtr ctxt) {
#define SKIPL(val) do { \
int skipl; \
for(skipl=0; skipl<val; skipl++) { \
if (*(ctxt->input->cur) == '\n') { \
if (*(ctxt->input->cur) == '\n') { \
ctxt->input->line++; ctxt->input->col = 1; \
} else ctxt->input->col++; \
ctxt->nbChars++; \
} else ctxt->input->col++; \
ctxt->nbChars++; \
ctxt->input->cur++; \
} \
if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt); \
@ -2367,7 +2367,7 @@ xmlNewBlanksWrapperInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
if (buffer == NULL) {
xmlErrMemory(ctxt, NULL);
xmlFree(input);
return(NULL);
return(NULL);
}
buffer [0] = ' ';
buffer [1] = '%';
@ -8517,7 +8517,7 @@ xmlParseQNameAndCompare(xmlParserCtxtPtr ctxt, xmlChar const *name,
cmp = prefix;
while (*in != 0 && *in == *cmp) {
++in;
++in;
++cmp;
}
if ((*cmp == 0) && (*in == ':')) {
@ -10482,7 +10482,7 @@ xmlParseExtParsedEnt(xmlParserCtxtPtr ctxt) {
#ifdef LIBXML_PUSH_ENABLED
/************************************************************************
* *
* Progressive parsing interfaces *
* Progressive parsing interfaces *
* *
************************************************************************/
@ -11783,7 +11783,7 @@ xmldecl_done:
/************************************************************************
* *
* I/O front end functions to the parser *
* I/O front end functions to the parser *
* *
************************************************************************/
@ -12002,7 +12002,7 @@ xmlCreateIOParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
#ifdef LIBXML_VALID_ENABLED
/************************************************************************
* *
* Front ends when parsing a DTD *
* Front ends when parsing a DTD *
* *
************************************************************************/
@ -12282,7 +12282,7 @@ xmlParseDTD(const xmlChar *ExternalID, const xmlChar *SystemID) {
/************************************************************************
* *
* Front ends when parsing an Entity *
* Front ends when parsing an Entity *
* *
************************************************************************/
@ -13771,7 +13771,7 @@ xmlSAXUserParseFile(xmlSAXHandlerPtr sax, void *user_data,
/************************************************************************
* *
* Front ends when parsing from memory *
* Front ends when parsing from memory *
* *
************************************************************************/
@ -14064,8 +14064,8 @@ xmlParseDoc(const xmlChar *cur) {
#ifdef LIBXML_LEGACY_ENABLED
/************************************************************************
* *
* Specific function to keep track of entities references *
* and used by the XSLT debugger *
* Specific function to keep track of entities references *
* and used by the XSLT debugger *
* *
************************************************************************/
@ -14104,7 +14104,7 @@ xmlSetEntityReferenceFunc(xmlEntityReferenceFunc func)
/************************************************************************
* *
* Miscellaneous *
* Miscellaneous *
* *
************************************************************************/
@ -14219,7 +14219,7 @@ xmlCleanupParser(void) {
* current scope
*/
#define DICT_FREE(str) \
if ((str) && ((!dict) || \
if ((str) && ((!dict) || \
(xmlDictOwns(dict, (const xmlChar *)(str)) == 0))) \
xmlFree((char *)(str));

View file

@ -90,7 +90,7 @@ xmlCheckVersion(int version) {
/************************************************************************
* *
* Some factorized error routines *
* Some factorized error routines *
* *
************************************************************************/
@ -225,7 +225,7 @@ xmlIsLetter(int c) {
/************************************************************************
* *
* Input handling functions for progressive parsing *
* Input handling functions for progressive parsing *
* *
************************************************************************/
@ -433,7 +433,7 @@ xmlParserInputShrink(xmlParserInputPtr in) {
/************************************************************************
* *
* UTF8 character input and related functions *
* UTF8 character input and related functions *
* *
************************************************************************/

View file

@ -159,7 +159,7 @@ struct _xmlStepOp {
#define PAT_FROM_CUR (1<<9)
struct _xmlPattern {
void *data; /* the associated template */
void *data; /* the associated template */
xmlDictPtr dict; /* the optional dictionary */
struct _xmlPattern *next; /* next pattern if | is used */
const xmlChar *pattern; /* the pattern */
@ -184,9 +184,9 @@ struct _xmlPatParserContext {
};
/************************************************************************
* *
* Type functions *
* *
* *
* Type functions *
* *
************************************************************************/
/**
@ -451,9 +451,9 @@ xmlReversePattern(xmlPatternPtr comp) {
}
/************************************************************************
* *
* The interpreter for the precompiled patterns *
* *
* *
* The interpreter for the precompiled patterns *
* *
************************************************************************/
static int
@ -705,7 +705,7 @@ rollback:
* *
************************************************************************/
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
@ -715,14 +715,14 @@ rollback:
#define PEEKPREV(val) ctxt->cur[-(val)]
#define CUR_PTR ctxt->cur
#define SKIP_BLANKS \
#define SKIP_BLANKS \
while (IS_BLANK_CH(CUR)) NEXT
#define CURRENT (*ctxt->cur)
#define NEXT ((*ctxt->cur) ? ctxt->cur++: ctxt->cur)
#define PUSH(op, val, val2) \
#define PUSH(op, val, val2) \
if (xmlPatternAdd(ctxt, ctxt->comp, (op), (val), (val2))) goto error;
#define XSLT_ERROR(X) \
@ -1927,7 +1927,7 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
/*
* Skip blocked expressions.
*/
stream->level++;
stream->level++;
goto stream_next;
}

View file

@ -71,7 +71,7 @@ static const xmlChar *xmlRelaxNGNs = (const xmlChar *)
#define MAX_ERROR 5
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
@ -421,7 +421,7 @@ struct _xmlRelaxNGDocument {
/************************************************************************
* *
* Some factorized error routines *
* Some factorized error routines *
* *
************************************************************************/
@ -564,9 +564,9 @@ xmlRngVErr(xmlRelaxNGValidCtxtPtr ctxt, xmlNodePtr node, int error,
}
/************************************************************************
* *
* Preliminary type checking interfaces *
* *
* *
* Preliminary type checking interfaces *
* *
************************************************************************/
/**
@ -654,9 +654,9 @@ struct _xmlRelaxNGTypeLibrary {
};
/************************************************************************
* *
* Allocation functions *
* *
* *
* Allocation functions *
* *
************************************************************************/
static void xmlRelaxNGFreeGrammar(xmlRelaxNGGrammarPtr grammar);
static void xmlRelaxNGFreeDefine(xmlRelaxNGDefinePtr define);
@ -1397,9 +1397,9 @@ xmlRelaxNGFreeValidState(xmlRelaxNGValidCtxtPtr ctxt,
}
/************************************************************************
* *
* Semi internal functions *
* *
* *
* Semi internal functions *
* *
************************************************************************/
/**
@ -1429,9 +1429,9 @@ xmlRelaxParserSetFlag(xmlRelaxNGParserCtxtPtr ctxt, int flags)
}
/************************************************************************
* *
* Document functions *
* *
* *
* Document functions *
* *
************************************************************************/
static xmlDocPtr xmlRelaxNGCleanupDoc(xmlRelaxNGParserCtxtPtr ctxt,
xmlDocPtr doc);
@ -2007,9 +2007,9 @@ xmlRelaxNGLoadExternalRef(xmlRelaxNGParserCtxtPtr ctxt,
}
/************************************************************************
* *
* Error functions *
* *
* *
* Error functions *
* *
************************************************************************/
#define VALID_ERR(a) xmlRelaxNGAddValidError(ctxt, a, NULL, NULL, 0);
@ -2360,7 +2360,7 @@ xmlRelaxNGAddValidError(xmlRelaxNGValidCtxtPtr ctxt,
* generate the error directly
*/
if (((ctxt->flags & FLAGS_IGNORABLE) == 0) ||
(ctxt->flags & FLAGS_NEGATIVE)) {
(ctxt->flags & FLAGS_NEGATIVE)) {
xmlNodePtr node, seq;
/*
@ -2390,9 +2390,9 @@ xmlRelaxNGAddValidError(xmlRelaxNGValidCtxtPtr ctxt,
/************************************************************************
* *
* Type library hooks *
* *
* *
* Type library hooks *
* *
************************************************************************/
static xmlChar *xmlRelaxNGNormalize(xmlRelaxNGValidCtxtPtr ctxt,
const xmlChar * str);
@ -2847,12 +2847,12 @@ xmlRelaxNGCleanupTypes(void)
}
/************************************************************************
* *
* Compiling element content into regexp *
* *
* *
* Compiling element content into regexp *
* *
* Sometime the element content can be compiled into a pure regexp, *
* This allows a faster execution and streamability at that level *
* *
* *
************************************************************************/
/* from automata.c but not exported */
@ -3325,9 +3325,9 @@ xmlRelaxNGTryCompile(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGDefinePtr def)
}
/************************************************************************
* *
* Parsing functions *
* *
* *
* Parsing functions *
* *
************************************************************************/
static xmlRelaxNGDefinePtr xmlRelaxNGParseAttribute(xmlRelaxNGParserCtxtPtr
@ -6705,9 +6705,9 @@ xmlRelaxNGParseDocument(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
}
/************************************************************************
* *
* Reading RelaxNGs *
* *
* *
* Reading RelaxNGs *
* *
************************************************************************/
/**
@ -7663,9 +7663,9 @@ xmlRelaxNGSetParserStructuredErrors(xmlRelaxNGParserCtxtPtr ctxt,
#ifdef LIBXML_OUTPUT_ENABLED
/************************************************************************
* *
* Dump back a compiled form *
* *
* *
* Dump back a compiled form *
* *
************************************************************************/
static void xmlRelaxNGDumpDefine(FILE * output,
xmlRelaxNGDefinePtr define);
@ -7899,9 +7899,9 @@ xmlRelaxNGDumpTree(FILE * output, xmlRelaxNGPtr schema)
#endif /* LIBXML_OUTPUT_ENABLED */
/************************************************************************
* *
* Validation of compiled content *
* *
* *
* Validation of compiled content *
* *
************************************************************************/
static int xmlRelaxNGValidateDefinition(xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGDefinePtr define);
@ -8044,9 +8044,9 @@ xmlRelaxNGValidateCompiledContent(xmlRelaxNGValidCtxtPtr ctxt,
}
/************************************************************************
* *
* Progressive validation of when possible *
* *
* *
* Progressive validation of when possible *
* *
************************************************************************/
static int xmlRelaxNGValidateAttributeList(xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGDefinePtr defines);
@ -8480,9 +8480,9 @@ xmlRelaxNGValidateFullElement(xmlRelaxNGValidCtxtPtr ctxt,
}
/************************************************************************
* *
* Generic interpreted validation implementation *
* *
* *
* Generic interpreted validation implementation *
* *
************************************************************************/
static int xmlRelaxNGValidateValue(xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGDefinePtr define);
@ -10813,9 +10813,9 @@ xmlRelaxNGCleanPSVI(xmlNodePtr node) {
return;
}
/************************************************************************
* *
* Validation interfaces *
* *
* *
* Validation interfaces *
* *
************************************************************************/
/**

View file

@ -53,7 +53,7 @@ static const xmlChar *xmlOldSchematronNs = SCT_OLD_NS;
#define NEXT_SCHEMATRON(node) \
while (node != NULL) { \
if ((node->type == XML_ELEMENT_NODE ) && (node->ns != NULL) && \
if ((node->type == XML_ELEMENT_NODE ) && (node->ns != NULL) && \
((xmlStrEqual(node->ns->href, xmlSchematronNs)) || \
(xmlStrEqual(node->ns->href, xmlOldSchematronNs)))) \
break; \
@ -65,7 +65,7 @@ static const xmlChar *xmlOldSchematronNs = SCT_OLD_NS;
*
* macro to flag unimplemented blocks
*/
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);

View file

@ -292,7 +292,7 @@ load_xpath_expr (xmlDocPtr parent_doc, const char* filename) {
while(ns != NULL) {
if(xmlXPathRegisterNs(ctx, ns->prefix, ns->href) != 0) {
fprintf(stderr,"Error: unable to register NS with prefix=\"%s\" and href=\"%s\"\n", ns->prefix, ns->href);
xmlFree(expr);
xmlFree(expr);
xmlXPathFreeContext(ctx);
xmlFreeDoc(doc);
return(NULL);
@ -306,7 +306,7 @@ load_xpath_expr (xmlDocPtr parent_doc, const char* filename) {
xpath = xmlXPathEvalExpression(expr, ctx);
if(xpath == NULL) {
fprintf(stderr,"Error: unable to evaluate xpath expression\n");
xmlFree(expr);
xmlFree(expr);
xmlXPathFreeContext(ctx);
xmlFreeDoc(doc);
return(NULL);

View file

@ -2455,7 +2455,7 @@ done:
* by the returned string. If there is insufficient memory available, or the
* argument is NULL, the function returns NULL.
*/
#define IS_WINDOWS_PATH(p) \
#define IS_WINDOWS_PATH(p) \
((p != NULL) && \
(((p[0] >= 'a') && (p[0] <= 'z')) || \
((p[0] >= 'A') && (p[0] <= 'Z'))) && \

View file

@ -31,7 +31,7 @@ static xmlElementPtr xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name,
/* #define DEBUG_VALID_ALGO */
/* #define DEBUG_REGEXP_ALGO */
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
@ -701,9 +701,9 @@ xmlValidBuildAContentModel(xmlElementContentPtr content,
break;
case XML_ELEMENT_CONTENT_MULT:
ctxt->state = xmlAutomataNewEpsilon(ctxt->am,
ctxt->state, NULL);
ctxt->state, NULL);
xmlAutomataNewTransition(ctxt->am,
ctxt->state, ctxt->state, fullname, NULL);
ctxt->state, ctxt->state, fullname, NULL);
break;
}
if ((fullname != fn) && (fullname != content->name))
@ -2535,7 +2535,7 @@ xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table) {
* current scope
*/
#define DICT_FREE(str) \
if ((str) && ((!dict) || \
if ((str) && ((!dict) || \
(xmlDictOwns(dict, (const xmlChar *)(str)) == 0))) \
xmlFree((char *)(str));
@ -6805,7 +6805,7 @@ xmlValidateDocument(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
xmlChar *sysID;
if (doc->intSubset->SystemID != NULL) {
sysID = xmlBuildURI(doc->intSubset->SystemID,
doc->URL);
doc->URL);
if (sysID == NULL) {
xmlErrValid(ctxt, XML_DTD_LOAD_ERROR,
"Could not build URI for external subset \"%s\"\n",

View file

@ -92,7 +92,7 @@ xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree);
/************************************************************************
* *
* XInclude error handler *
* XInclude error handler *
* *
************************************************************************/

View file

@ -988,7 +988,7 @@ xmlFileOpenW (const char *filename) {
#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
fd = xmlWrapOpen(path, 1);
#else
fd = fopen(path, "wb");
fd = fopen(path, "wb");
#endif /* WIN32 */
if (fd == NULL) xmlIOErr(0, path);
@ -3192,7 +3192,7 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) {
in->rawconsumed += (use - in->raw->use);
} else {
nbchars = len;
in->buffer->use += nbchars;
in->buffer->use += nbchars;
buffer[nbchars] = 0;
}
#ifdef DEBUG_INPUT
@ -3354,7 +3354,7 @@ xmlEscapeContent(unsigned char* out, int *outlen,
inend = in + (*inlen);
while ((in < inend) && (out < outend)) {
if (*in == '<') {
if (*in == '<') {
if (outend - out < 4) break;
*out++ = '&';
*out++ = 'l';

View file

@ -47,9 +47,9 @@ static char *filename = NULL;
#endif
/************************************************************************
* *
* Shell Interface *
* *
* *
* Shell Interface *
* *
************************************************************************/
/**
* xmlShellReadline:
@ -302,9 +302,9 @@ static void usershell(void) {
}
/************************************************************************
* *
* Main *
* *
* *
* Main *
* *
************************************************************************/
static void usage(const char *name) {
/* split into 2 printf's to avoid overly long string (gcc warning) */

View file

@ -58,7 +58,7 @@ void xmlMallocBreakpoint(void);
/************************************************************************
* *
* Macros, variables and associated types *
* Macros, variables and associated types *
* *
************************************************************************/

View file

@ -30,7 +30,7 @@ static int xmlModulePlatformSymbol(void *handle, const char *name, void **result
/************************************************************************
* *
* module memory error handler *
* module memory error handler *
* *
************************************************************************/

View file

@ -65,15 +65,15 @@
*
* macro to flag unimplemented blocks
*/
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
/************************************************************************
* *
* Datatypes and structures *
* *
* *
* Datatypes and structures *
* *
************************************************************************/
/*
@ -361,7 +361,7 @@ void xmlAutomataSetFlags(xmlAutomataPtr am, int flags);
/************************************************************************
* *
* Regexp memory error handler *
* Regexp memory error handler *
* *
************************************************************************/
/**
@ -408,9 +408,9 @@ xmlRegexpErrCompile(xmlRegParserCtxtPtr ctxt, const char *extra)
}
/************************************************************************
* *
* Allocation/Deallocation *
* *
* *
* Allocation/Deallocation *
* *
************************************************************************/
static int xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt);
@ -931,9 +931,9 @@ xmlRegFreeParserCtxt(xmlRegParserCtxtPtr ctxt) {
}
/************************************************************************
* *
* Display of Data structures *
* *
* *
* Display of Data structures *
* *
************************************************************************/
static void
@ -1204,9 +1204,9 @@ xmlRegPrintCtxt(FILE *output, xmlRegParserCtxtPtr ctxt) {
#endif
/************************************************************************
* *
* *
* Finite Automata structures manipulations *
* *
* *
************************************************************************/
static void
@ -1893,7 +1893,7 @@ xmlFAEliminateSimpleEpsilonTransitions(xmlRegParserCtxtPtr ctxt) {
#endif
tmp->trans[j].to = -1;
xmlRegStateAddTrans(ctxt, tmp, tmp->trans[j].atom,
ctxt->states[newto],
ctxt->states[newto],
tmp->trans[j].counter,
tmp->trans[j].count);
}
@ -2773,9 +2773,9 @@ xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) {
}
/************************************************************************
* *
* *
* Routines to check input against transition atoms *
* *
* *
************************************************************************/
static int
@ -3052,9 +3052,9 @@ xmlRegCheckCharacter(xmlRegAtomPtr atom, int codepoint) {
}
/************************************************************************
* *
* *
* Saving and restoring state of an execution context *
* *
* *
************************************************************************/
#ifdef DEBUG_REGEXP_EXEC
@ -3165,9 +3165,9 @@ xmlFARegExecRollBack(xmlRegExecCtxtPtr exec) {
}
/************************************************************************
* *
* *
* Verifier, running an input against a compiled regexp *
* *
* *
************************************************************************/
static int
@ -3466,9 +3466,9 @@ error:
}
/************************************************************************
* *
* *
* Progressive interface to the verifier one atom at a time *
* *
* *
************************************************************************/
#ifdef DEBUG_ERR
static void testerr(xmlRegExecCtxtPtr exec);
@ -4563,10 +4563,10 @@ progress:
}
#endif
/************************************************************************
* *
* *
* Parser for the Schemas Datatype Regular Expressions *
* http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#regexs *
* *
* *
************************************************************************/
/**
@ -5381,9 +5381,9 @@ xmlFAParseRegExp(xmlRegParserCtxtPtr ctxt, int top) {
}
/************************************************************************
* *
* The basic API *
* *
* *
* The basic API *
* *
************************************************************************/
/**
@ -5570,9 +5570,9 @@ xmlRegFreeRegexp(xmlRegexpPtr regexp) {
#ifdef LIBXML_AUTOMATA_ENABLED
/************************************************************************
* *
* The Automata interface *
* *
* *
* The Automata interface *
* *
************************************************************************/
/**
@ -7830,7 +7830,7 @@ xmlExpSubsume(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) {
/************************************************************************
* *
* Parsing expression *
* Parsing expression *
* *
************************************************************************/

View file

@ -66,7 +66,7 @@ xmlIsXHTML(const xmlChar *systemID, const xmlChar *publicID) {
#ifdef LIBXML_OUTPUT_ENABLED
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
@ -92,7 +92,7 @@ struct _xmlSaveCtxt {
/************************************************************************
* *
* Output error handlers *
* Output error handlers *
* *
************************************************************************/
/**
@ -212,7 +212,7 @@ xmlEscapeEntities(unsigned char* out, int *outlen,
inend = in + (*inlen);
while ((in < inend) && (out < outend)) {
if (*in == '<') {
if (*in == '<') {
if (outend - out < 4) break;
*out++ = '&';
*out++ = 'l';
@ -416,7 +416,7 @@ xmlNewSaveCtxt(const char *encoding, int options)
/************************************************************************
* *
* Dumping XML tree content to a simple buffer *
* Dumping XML tree content to a simple buffer *
* *
************************************************************************/
/**
@ -455,7 +455,7 @@ xmlAttrSerializeContent(xmlOutputBufferPtr buf, xmlAttrPtr attr)
/************************************************************************
* *
* Dumping XML tree content to an I/O output buffer *
* Dumping XML tree content to an I/O output buffer *
* *
************************************************************************/

View file

@ -107,7 +107,7 @@
#endif
#define UNBOUNDED (1 << 30)
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
@ -1043,9 +1043,9 @@ struct _xmlSchemaSubstGroup {
};
/************************************************************************
* *
* Some predeclarations *
* *
* *
* Some predeclarations *
* *
************************************************************************/
static int xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt,
@ -1098,7 +1098,7 @@ xmlSchemaParseAttributeGroupRef(xmlSchemaParserCtxtPtr pctxt,
/************************************************************************
* *
* Helper functions *
* Helper functions *
* *
************************************************************************/
@ -1836,7 +1836,7 @@ xmlSchemaFormatFacetEnumSet(xmlSchemaAbstractCtxtPtr actxt,
/************************************************************************
* *
* Error functions *
* Error functions *
* *
************************************************************************/
@ -1974,7 +1974,7 @@ xmlSchemaPErrExt(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, int error,
/************************************************************************
* *
* Allround error functions *
* Allround error functions *
* *
************************************************************************/
@ -3199,25 +3199,25 @@ xmlSchemaPContentErr(xmlSchemaParserCtxtPtr ctxt,
}
/************************************************************************
* *
* Streamable error functions *
* *
* *
* Streamable error functions *
* *
************************************************************************/
/************************************************************************
* *
* Validation helper functions *
* *
* *
* Validation helper functions *
* *
************************************************************************/
/************************************************************************
* *
* Allocation functions *
* *
* *
* Allocation functions *
* *
************************************************************************/
/**
@ -4135,9 +4135,9 @@ xmlSchemaFree(xmlSchemaPtr schema)
}
/************************************************************************
* *
* Debug functions *
* *
* *
* Debug functions *
* *
************************************************************************/
#ifdef LIBXML_OUTPUT_ENABLED
@ -4587,7 +4587,7 @@ xmlSchemaDebugDumpIDCTable(FILE * output,
/************************************************************************
* *
* Utilities *
* Utilities *
* *
************************************************************************/
@ -4692,9 +4692,9 @@ xmlSchemaGetProp(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node,
}
/************************************************************************
* *
* Parsing functions *
* *
* *
* Parsing functions *
* *
************************************************************************/
#define WXS_FIND_GLOBAL_ITEM(slot) \
@ -4966,9 +4966,9 @@ xmlSchemaGetNamedComponent(xmlSchemaPtr schema,
}
/************************************************************************
* *
* Parsing functions *
* *
* *
* Parsing functions *
* *
************************************************************************/
#define IS_BLANK_NODE(n) \
@ -5743,9 +5743,9 @@ xmlSchemaAddElementSubstitutionMember(xmlSchemaParserCtxtPtr pctxt,
}
/************************************************************************
* *
* *
* Utilities for parsing *
* *
* *
************************************************************************/
/**
@ -5939,7 +5939,7 @@ xmlSchemaPValAttrNodeID(xmlSchemaParserCtxtPtr ctxt, xmlAttrPtr attr)
xmlFree((xmlChar *) value);
value = strip;
}
res = xmlAddID(NULL, attr->doc, value, attr);
res = xmlAddID(NULL, attr->doc, value, attr);
if (res == NULL) {
ret = XML_SCHEMAP_S4S_ATTR_INVALID_VALUE;
xmlSchemaPSimpleTypeErr(ctxt,
@ -6191,9 +6191,9 @@ xmlGetBooleanProp(xmlSchemaParserCtxtPtr ctxt,
}
/************************************************************************
* *
* *
* Shema extraction from an Infoset *
* *
* *
************************************************************************/
static xmlSchemaTypePtr xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr
ctxt, xmlSchemaPtr schema,
@ -8227,7 +8227,7 @@ xmlSchemaParseIDCSelectorAndField(xmlSchemaParserCtxtPtr ctxt,
*/
attr = xmlSchemaGetPropNode(node, "xpath");
if (attr == NULL) {
xmlSchemaPMissingAttrErr(ctxt,
xmlSchemaPMissingAttrErr(ctxt,
XML_SCHEMAP_S4S_ATTR_MISSING,
NULL, node,
"name", NULL);
@ -12353,15 +12353,15 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
}
/************************************************************************
* *
* Validating using Schemas *
* *
* *
* Validating using Schemas *
* *
************************************************************************/
/************************************************************************
* *
* Reading/Writing Schemas *
* *
* *
* Reading/Writing Schemas *
* *
************************************************************************/
#if 0 /* Will be enabled if it is clear what options are needed. */
@ -20152,7 +20152,7 @@ xmlSchemaResolveAttrUseReferences(xmlSchemaAttributeUsePtr ause,
ref->name, ref->targetNamespace);
if (ause->attrDecl == NULL) {
xmlSchemaPResCompAttrErr(ctxt,
XML_SCHEMAP_SRC_RESOLVE,
XML_SCHEMAP_SRC_RESOLVE,
WXS_BASIC_CAST ause, ause->node,
"ref", ref->name, ref->targetNamespace,
XML_SCHEMA_TYPE_ATTRIBUTE, NULL);
@ -21532,16 +21532,16 @@ xmlSchemaGetWhiteSpaceFacetValue(xmlSchemaTypePtr type)
}
/************************************************************************
* *
* Simple type validation *
* *
* *
* Simple type validation *
* *
************************************************************************/
/************************************************************************
* *
* DOM Validation code *
* *
* *
* DOM Validation code *
* *
************************************************************************/
/**
@ -21935,9 +21935,9 @@ xmlSchemaVAddNodeQName(xmlSchemaValidCtxtPtr vctxt,
}
/************************************************************************
* *
* Validation of identity-constraints (IDC) *
* *
* *
* Validation of identity-constraints (IDC) *
* *
************************************************************************/
/**
@ -23865,9 +23865,9 @@ xmlSchemaCheckCVCIDCKeyRef(xmlSchemaValidCtxtPtr vctxt)
}
/************************************************************************
* *
* XML Reader validation code *
* *
* *
* XML Reader validation code *
* *
************************************************************************/
static xmlSchemaAttrInfoPtr
@ -24987,9 +24987,9 @@ xmlSchemaValidateElemDecl(xmlSchemaValidCtxtPtr vctxt)
return (vctxt->err);
}
if (actualType == NULL) {
VERROR(XML_SCHEMAV_CVC_TYPE_1, NULL,
"The type definition is absent");
return (XML_SCHEMAV_CVC_TYPE_1);
VERROR(XML_SCHEMAV_CVC_TYPE_1, NULL,
"The type definition is absent");
return (XML_SCHEMAV_CVC_TYPE_1);
}
if (vctxt->nbAttrInfos != 0) {
int ret;
@ -25079,9 +25079,9 @@ xmlSchemaValidateElemDecl(xmlSchemaValidCtxtPtr vctxt)
* No actual type definition.
*/
if (actualType == NULL) {
VERROR(XML_SCHEMAV_CVC_TYPE_1, NULL,
"The type definition is absent");
return (XML_SCHEMAV_CVC_TYPE_1);
VERROR(XML_SCHEMAV_CVC_TYPE_1, NULL,
"The type definition is absent");
return (XML_SCHEMAV_CVC_TYPE_1);
}
/*
* Remember the actual type definition.
@ -26909,15 +26909,15 @@ type_validation:
if (vctxt->inode->typeDef == NULL) {
vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_ERR_BAD_TYPE;
ret = XML_SCHEMAV_CVC_TYPE_1;
VERROR(ret, NULL,
"The type definition is absent");
VERROR(ret, NULL,
"The type definition is absent");
goto exit;
}
if (vctxt->inode->typeDef->flags & XML_SCHEMAS_TYPE_ABSTRACT) {
vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_ERR_BAD_TYPE;
ret = XML_SCHEMAV_CVC_TYPE_2;
VERROR(ret, NULL,
"The type definition is abstract");
VERROR(ret, NULL,
"The type definition is abstract");
goto exit;
}
/*
@ -27164,9 +27164,9 @@ internal_error:
#endif
/************************************************************************
* *
* SAX validation handlers *
* *
* *
* SAX validation handlers *
* *
************************************************************************/
/*
@ -27417,9 +27417,9 @@ internal_error:
}
/************************************************************************
* *
* Validation interfaces *
* *
* *
* Validation interfaces *
* *
************************************************************************/
/**
@ -28111,9 +28111,9 @@ xmlSchemaValidateDoc(xmlSchemaValidCtxtPtr ctxt, xmlDocPtr doc)
/************************************************************************
* *
* Function and data for SAX streaming API *
* *
* *
* Function and data for SAX streaming API *
* *
************************************************************************/
typedef struct _xmlSchemaSplitSAXData xmlSchemaSplitSAXData;
typedef xmlSchemaSplitSAXData *xmlSchemaSplitSAXDataPtr;

View file

@ -40,7 +40,7 @@ extern double xmlXPathPINF;
extern double xmlXPathNINF;
#endif
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
@ -75,7 +75,7 @@ typedef struct _xmlSchemaValDuration xmlSchemaValDuration;
typedef xmlSchemaValDuration *xmlSchemaValDurationPtr;
struct _xmlSchemaValDuration {
long mon; /* mon stores years also */
long day;
long day;
double sec; /* sec stores min and hour also */
};
@ -189,7 +189,7 @@ static xmlSchemaTypePtr xmlSchemaTypeNmtokensDef = NULL;
/************************************************************************
* *
* Datatype error handlers *
* Datatype error handlers *
* *
************************************************************************/
/**
@ -206,7 +206,7 @@ xmlSchemaTypeErrMemory(xmlNodePtr node, const char *extra)
/************************************************************************
* *
* Base types support *
* Base types support *
* *
************************************************************************/
@ -752,7 +752,7 @@ xmlSchemaGetBuiltInType(xmlSchemaValType type)
case XML_SCHEMAS_GMONTH:
return (xmlSchemaTypeGMonthDef);
case XML_SCHEMAS_GMONTHDAY:
return (xmlSchemaTypeGMonthDayDef);
return (xmlSchemaTypeGMonthDayDef);
case XML_SCHEMAS_GYEAR:
return (xmlSchemaTypeGYearDef);
case XML_SCHEMAS_GYEARMONTH:
@ -1614,7 +1614,7 @@ xmlSchemaValidateDates (xmlSchemaValType type,
const xmlChar *rewnd = cur;
cur++;
ret = _xmlSchemaParseGDay(&(dt->value.date), &cur);
ret = _xmlSchemaParseGDay(&(dt->value.date), &cur);
if ((ret == 0) && ((*cur == 0) || (*cur != ':'))) {
/*
@ -2327,8 +2327,8 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value,
v = xmlSchemaNewValue(XML_SCHEMAS_DECIMAL);
if (v != NULL) {
/*
* Now evaluate the significant digits of the number
*/
* Now evaluate the significant digits of the number
*/
if (len != 0) {
if (integ != ~0u) {
@ -4508,22 +4508,22 @@ xmlSchemaCompareReplacedStrings(const xmlChar *x,
if IS_WSP_BLANK_CH(*y) {
if (! IS_WSP_BLANK_CH(*x)) {
if ((*x - 0x20) < 0)
return(-1);
return(-1);
else
return(1);
}
} else {
if IS_WSP_BLANK_CH(*x) {
if ((0x20 - *y) < 0)
return(-1);
return(-1);
else
return(1);
}
tmp = *x - *y;
if (tmp < 0)
return(-1);
return(-1);
if (tmp > 0)
return(1);
return(1);
}
x++;
y++;
@ -5192,11 +5192,11 @@ xmlSchemaValidateLengthFacetInternal(xmlSchemaFacetPtr facet,
len = xmlSchemaNormLen(value);
break;
case XML_SCHEMAS_QNAME:
case XML_SCHEMAS_NOTATION:
/*
case XML_SCHEMAS_NOTATION:
/*
* For QName and NOTATION, those facets are
* deprecated and should be ignored.
*/
*/
return (0);
default:
TODO
@ -5427,7 +5427,7 @@ xmlSchemaValidateFacetInternal(xmlSchemaFacetPtr facet,
len = xmlUTF8Strlen(value);
}
break;
case XML_SCHEMAS_IDREF:
case XML_SCHEMAS_IDREF:
case XML_SCHEMAS_TOKEN:
case XML_SCHEMAS_LANGUAGE:
case XML_SCHEMAS_NMTOKEN:
@ -5436,11 +5436,11 @@ xmlSchemaValidateFacetInternal(xmlSchemaFacetPtr facet,
case XML_SCHEMAS_ID:
case XML_SCHEMAS_ANYURI:
if (value != NULL)
len = xmlSchemaNormLen(value);
break;
len = xmlSchemaNormLen(value);
break;
default:
TODO
}
}
}
if (facet->type == XML_SCHEMA_FACET_LENGTH) {
if (len != facet->val->value.decimal.lo)

View file

@ -1673,7 +1673,7 @@ xmlOutputBufferWriteBinHex(xmlOutputBufferPtr out,
int count;
int sum;
static char hex[16] =
{'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
{'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
int i;
if ((out == NULL) || (data == NULL) || (len < 0)) {
@ -2496,8 +2496,8 @@ xmlTextWriterEndPI(xmlTextWriterPtr writer)
if (writer->indent) {
count = xmlOutputBufferWriteString(writer->out, "\n");
if (count < 0)
return -1;
if (count < 0)
return -1;
sum += count;
}

View file

@ -47,19 +47,19 @@
#endif
#endif
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
#define STRANGE \
#define STRANGE \
xmlGenericError(xmlGenericErrorContext, \
"Internal error at %s:%d\n", \
__FILE__, __LINE__);
/************************************************************************
* *
* Some factorized error routines *
* Some factorized error routines *
* *
************************************************************************/
@ -903,7 +903,7 @@ static void xmlXPtrEvalChildSeq(xmlXPathParserContextPtr ctxt, xmlChar *name);
#define NXT(val) ctxt->cur[(val)]
#define CUR_PTR ctxt->cur
#define SKIP_BLANKS \
#define SKIP_BLANKS \
while (IS_BLANK_CH(*(ctxt->cur))) NEXT
#define CURRENT (*ctxt->cur)