diff options
author | orivej <[email protected]> | 2022-02-10 16:45:01 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:45:01 +0300 |
commit | 2d37894b1b037cf24231090eda8589bbb44fb6fc (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/libs/libxml/xinclude.c | |
parent | 718c552901d703c502ccbefdfc3c9028d608b947 (diff) |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/libxml/xinclude.c')
-rw-r--r-- | contrib/libs/libxml/xinclude.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/contrib/libs/libxml/xinclude.c b/contrib/libs/libxml/xinclude.c index 99e88ca1482..ba850fa538d 100644 --- a/contrib/libs/libxml/xinclude.c +++ b/contrib/libs/libxml/xinclude.c @@ -125,7 +125,7 @@ xmlXIncludeErrMemory(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node, * * Handle an XInclude error */ -static void LIBXML_ATTR_FORMAT(4,0) +static void LIBXML_ATTR_FORMAT(4,0) xmlXIncludeErr(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node, int error, const char *msg, const xmlChar *extra) { @@ -147,7 +147,7 @@ xmlXIncludeErr(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node, int error, * * Emit an XInclude warning. */ -static void LIBXML_ATTR_FORMAT(4,0) +static void LIBXML_ATTR_FORMAT(4,0) xmlXIncludeWarn(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node, int error, const char *msg, const xmlChar *extra) { @@ -449,10 +449,10 @@ xmlXIncludeParseFile(xmlXIncludeCtxtPtr ctxt, const char *URL) { xmlCtxtUseOptions(pctxt, ctxt->parseFlags | XML_PARSE_DTDLOAD); - /* Don't read from stdin. */ - if ((URL != NULL) && (strcmp(URL, "-") == 0)) - URL = "./-"; - + /* Don't read from stdin. */ + if ((URL != NULL) && (strcmp(URL, "-") == 0)) + URL = "./-"; + inputStream = xmlLoadExternalEntity(URL, NULL, pctxt); if (inputStream == NULL) { xmlFreeParserCtxt(pctxt); @@ -671,7 +671,7 @@ xmlXIncludeRecurseDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, int i; /* - * Avoid recursion in already substituted resources + * Avoid recursion in already substituted resources for (i = 0;i < ctxt->urlNr;i++) { if (xmlStrEqual(doc->URL, ctxt->urlTab[i])) return; @@ -756,7 +756,7 @@ xmlXIncludeRecurseDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, * @txt: the new text node * @url: the associated URL * - * Add a new text node to the list + * Add a new text node to the list */ static void xmlXIncludeAddTxt(xmlXIncludeCtxtPtr ctxt, xmlNodePtr txt, const xmlURL url) { @@ -1262,13 +1262,13 @@ struct _xmlXIncludeMergeData { * @doc: the including doc * @nr: the entity name * - * Implements the merge of one entity + * Implements the merge of one entity */ static void -xmlXIncludeMergeEntity(void *payload, void *vdata, - const xmlChar *name ATTRIBUTE_UNUSED) { - xmlEntityPtr ent = (xmlEntityPtr) payload; - xmlXIncludeMergeDataPtr data = (xmlXIncludeMergeDataPtr) vdata; +xmlXIncludeMergeEntity(void *payload, void *vdata, + const xmlChar *name ATTRIBUTE_UNUSED) { + xmlEntityPtr ent = (xmlEntityPtr) payload; + xmlXIncludeMergeDataPtr data = (xmlXIncludeMergeDataPtr) vdata; xmlEntityPtr ret, prev; xmlDocPtr doc; xmlXIncludeCtxtPtr ctxt; @@ -1339,7 +1339,7 @@ error: * @doc: the including doc * @from: the included doc * - * Implements the entity merge + * Implements the entity merge * * Returns 0 if merge succeeded, -1 if some processing failed */ @@ -1373,7 +1373,7 @@ xmlXIncludeMergeEntities(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, data.doc = doc; xmlHashScan((xmlHashTablePtr) source->entities, - xmlXIncludeMergeEntity, &data); + xmlXIncludeMergeEntity, &data); } source = from->extSubset; if ((source != NULL) && (source->entities != NULL)) { @@ -1388,7 +1388,7 @@ xmlXIncludeMergeEntities(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, if ((!xmlStrEqual(target->ExternalID, source->ExternalID)) && (!xmlStrEqual(target->SystemID, source->SystemID))) { xmlHashScan((xmlHashTablePtr) source->entities, - xmlXIncludeMergeEntity, &data); + xmlXIncludeMergeEntity, &data); } } return(0); @@ -1810,10 +1810,10 @@ xmlXIncludeLoadTxt(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) { xmlParserInputPtr inputStream; int xinclude_multibyte_fallback_used = 0; - /* Don't read from stdin. */ - if (xmlStrcmp(url, BAD_CAST "-") == 0) - url = BAD_CAST "./-"; - + /* Don't read from stdin. */ + if (xmlStrcmp(url, BAD_CAST "-") == 0) + url = BAD_CAST "./-"; + /* * Check the URL and remove any fragment identifier */ @@ -1922,7 +1922,7 @@ xinclude_multibyte_fallback: cur = xmlStringCurrentChar(NULL, &content[i], &l); if (!IS_CHAR(cur)) { - /* Handle split multibyte char at buffer boundary */ + /* Handle split multibyte char at buffer boundary */ if (((len - i) < 4) && (!xinclude_multibyte_fallback_used)) { xinclude_multibyte_fallback_used = 1; xmlBufShrink(buf->buffer, i); @@ -1931,7 +1931,7 @@ xinclude_multibyte_fallback: xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, XML_XINCLUDE_INVALID_CHAR, "%s contains invalid char\n", URL); - xmlFreeParserCtxt(pctxt); + xmlFreeParserCtxt(pctxt); xmlFreeParserInputBuffer(buf); xmlFree(URL); return(-1); @@ -1972,7 +1972,7 @@ static int xmlXIncludeLoadFallback(xmlXIncludeCtxtPtr ctxt, xmlNodePtr fallback, int nr) { xmlXIncludeCtxtPtr newctxt; int ret = 0; - int oldNbErrors = ctxt->nbErrors; + int oldNbErrors = ctxt->nbErrors; if ((fallback == NULL) || (fallback->type == XML_NAMESPACE_DECL) || (ctxt == NULL)) @@ -1989,7 +1989,7 @@ xmlXIncludeLoadFallback(xmlXIncludeCtxtPtr ctxt, xmlNodePtr fallback, int nr) { newctxt->base = xmlStrdup(ctxt->base); /* Inherit the base from the existing context */ xmlXIncludeSetFlags(newctxt, ctxt->parseFlags); ret = xmlXIncludeDoProcess(newctxt, ctxt->doc, fallback->children); - if (ctxt->nbErrors > oldNbErrors) + if (ctxt->nbErrors > oldNbErrors) ret = -1; else if (ret > 0) ret = 0; /* xmlXIncludeDoProcess can return +ve number */ @@ -2143,7 +2143,7 @@ xmlXIncludeLoadNode(xmlXIncludeCtxtPtr ctxt, int nr) { xmlNodePtr children; /* - * Time to try a fallback if available + * Time to try a fallback if available */ #ifdef DEBUG_XINCLUDE xmlGenericError(xmlGenericErrorContext, "error looking for fallback\n"); @@ -2188,7 +2188,7 @@ xmlXIncludeLoadNode(xmlXIncludeCtxtPtr ctxt, int nr) { * @ctxt: an XInclude context * @nr: the node number * - * Implement the infoset replacement for the given node + * Implement the infoset replacement for the given node * * Returns 0 if substitution succeeded, -1 if some processing failed */ |