diff --git a/ChangeLog b/ChangeLog index cb19b698..6c91ade0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Fri Sep 24 00:15:58 CEST 1999 + + * libxml.spec.in: fixed the alpha compile problem + * parser.[ch]: changed errno to errNo in the parser context :-( + * *.[ch]: changed CHAR to xmlChar to avoid problem on WIN32 + * doc/xml.html: changed CHAR to xmlChar + * doc/html/*: recompiled the documentation + * configure.in: 1.7.1 + Wed Sep 22 11:40:31 CEST 1999 Daniel Veillard * parser.h: modified the parser context struct to regain 1.4.0 diff --git a/HTMLparser.c b/HTMLparser.c index a63bf98e..74f350f1 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -94,17 +94,17 @@ PUSH_AND_POP(xmlNodePtr, node) * * Dirty macros, i.e. one need to make assumption on the context to use them * - * CUR_PTR return the current pointer to the CHAR to be parsed. - * CUR returns the current CHAR value, i.e. a 8 bit value if compiled + * CUR_PTR return the current pointer to the xmlChar to be parsed. + * CUR returns the current xmlChar value, i.e. a 8 bit value if compiled * in ISO-Latin or UTF-8, and the current 16 bit value if compiled * in UNICODE mode. This should be used internally by the parser * only to compare to ASCII values otherwise it would break when * running with UTF-8 encoding. - * NXT(n) returns the n'th next CHAR. Same as CUR is should be used only + * NXT(n) returns the n'th next xmlChar. Same as CUR is should be used only * to compare on ASCII based substring. - * UPP(n) returns the n'th next CHAR converted to uppercase. Same as CUR + * UPP(n) returns the n'th next xmlChar converted to uppercase. Same as CUR * it should be used only to compare on ASCII based substring. - * SKIP(n) Skip n CHAR, and must also be used only to skip ASCII defined + * SKIP(n) Skip n xmlChar, and must also be used only to skip ASCII defined * strings within the parser. * * Clean macros, not dependent of an ASCII context, expect UTF-8 encoding @@ -385,7 +385,7 @@ htmlInitAutoClose(void) { * Returns the related htmlElemDescPtr or NULL if not found. */ htmlElemDescPtr -htmlTagLookup(const CHAR *tag) { +htmlTagLookup(const xmlChar *tag) { int i = 0; for (i = 0; i < (sizeof(html40ElementTable) / @@ -407,7 +407,7 @@ htmlTagLookup(const CHAR *tag) { * Returns 0 if no, 1 if yes. */ int -htmlCheckAutoClose(const CHAR *new, const CHAR *old) { +htmlCheckAutoClose(const xmlChar *new, const xmlChar *old) { int i, index; char **close; @@ -442,7 +442,7 @@ htmlCheckAutoClose(const CHAR *new, const CHAR *old) { * appropriates closes if possible/needed. */ void -htmlAutoClose(htmlParserCtxtPtr ctxt, const CHAR *new) { +htmlAutoClose(htmlParserCtxtPtr ctxt, const xmlChar *new) { while ((ctxt->node != NULL) && (htmlCheckAutoClose(new, ctxt->node->name))) { @@ -462,7 +462,7 @@ htmlAutoClose(htmlParserCtxtPtr ctxt, const CHAR *new) { * The HTmL DtD allows an ending tag to implicitely close other tags. */ void -htmlAutoCloseOnClose(htmlParserCtxtPtr ctxt, const CHAR *new) { +htmlAutoCloseOnClose(htmlParserCtxtPtr ctxt, const xmlChar *new) { htmlElemDescPtr info; while ((ctxt->node != NULL) && @@ -774,7 +774,7 @@ htmlEntityDesc html40EntitiesTable[] = { */ #define growBuffer(buffer) { \ buffer##_size *= 2; \ - buffer = (CHAR *) xmlRealloc(buffer, buffer##_size * sizeof(CHAR)); \ + buffer = (xmlChar *) xmlRealloc(buffer, buffer##_size * sizeof(xmlChar)); \ if (buffer == NULL) { \ perror("realloc failed"); \ exit(1); \ @@ -792,7 +792,7 @@ htmlEntityDesc html40EntitiesTable[] = { * Returns the associated htmlEntityDescPtr if found, NULL otherwise. */ htmlEntityDescPtr -htmlEntityLookup(const CHAR *name) { +htmlEntityLookup(const xmlChar *name) { int i; for (i = 0;i < (sizeof(html40EntitiesTable)/ @@ -812,9 +812,9 @@ htmlEntityLookup(const CHAR *name) { * htmlDecodeEntities: * @ctxt: the parser context * @len: the len to decode (in bytes !), -1 for no size limit - * @end: an end marker CHAR, 0 if none - * @end2: an end marker CHAR, 0 if none - * @end3: an end marker CHAR, 0 if none + * @end: an end marker xmlChar, 0 if none + * @end2: an end marker xmlChar, 0 if none + * @end3: an end marker xmlChar, 0 if none * * Subtitute the HTML entities by their value * @@ -825,15 +825,15 @@ htmlEntityLookup(const CHAR *name) { * Returns A newly allocated string with the substitution done. The caller * must deallocate it ! */ -CHAR * +xmlChar * htmlDecodeEntities(htmlParserCtxtPtr ctxt, int len, - CHAR end, CHAR end2, CHAR end3) { - CHAR *buffer = NULL; + xmlChar end, xmlChar end2, xmlChar end3) { + xmlChar *buffer = NULL; int buffer_size = 0; - CHAR *out = NULL; - CHAR *name = NULL; + xmlChar *out = NULL; + xmlChar *name = NULL; - CHAR *cur = NULL; + xmlChar *cur = NULL; htmlEntityDescPtr ent; int nbchars = 0; unsigned int max = (unsigned int) len; @@ -842,7 +842,7 @@ htmlDecodeEntities(htmlParserCtxtPtr ctxt, int len, * allocate a translation buffer. */ buffer_size = 1000; - buffer = (CHAR *) xmlMalloc(buffer_size * sizeof(CHAR)); + buffer = (xmlChar *) xmlMalloc(buffer_size * sizeof(xmlChar)); if (buffer == NULL) { perror("htmlDecodeEntities: malloc failed"); return(NULL); @@ -880,7 +880,7 @@ htmlDecodeEntities(htmlParserCtxtPtr ctxt, int len, *out++ = ';'; } else { /* invalid for UTF-8 variable encoding !!!!! */ - *out++ = (CHAR)ent->value; + *out++ = (xmlChar)ent->value; if (out - buffer > buffer_size - 100) { int index = out - buffer; @@ -1053,7 +1053,7 @@ htmlSwitchEncoding(htmlParserCtxtPtr ctxt, xmlCharEncoding enc) /** * areBlanks: * @ctxt: an HTML parser context - * @str: a CHAR * + * @str: a xmlChar * * @len: the size of @str * * Is this a sequence of blank chars that one can ignore ? @@ -1061,7 +1061,7 @@ htmlSwitchEncoding(htmlParserCtxtPtr ctxt, xmlCharEncoding enc) * Returns 1 if ignorable 0 otherwise. */ -static int areBlanks(htmlParserCtxtPtr ctxt, const CHAR *str, int len) { +static int areBlanks(htmlParserCtxtPtr ctxt, const xmlChar *str, int len) { int i; xmlNodePtr lastChild; @@ -1116,7 +1116,7 @@ htmlHandleEntity(htmlParserCtxtPtr ctxt, xmlEntityPtr entity) { * Returns a new document */ htmlDocPtr -htmlNewDoc(const CHAR *URI, const CHAR *ExternalID) { +htmlNewDoc(const xmlChar *URI, const xmlChar *ExternalID) { xmlDocPtr cur; /* @@ -1173,11 +1173,11 @@ htmlNewDoc(const CHAR *URI, const CHAR *ExternalID) { * Returns the Tag Name parsed or NULL */ -CHAR * +xmlChar * htmlParseHTMLName(htmlParserCtxtPtr ctxt) { - CHAR *ret = NULL; + xmlChar *ret = NULL; int i = 0; - CHAR loc[100]; + xmlChar loc[100]; if (!IS_LETTER(CUR) && (CUR != '_') && (CUR != ':')) return(NULL); @@ -1204,9 +1204,9 @@ htmlParseHTMLName(htmlParserCtxtPtr ctxt) { * Returns the Name parsed or NULL */ -CHAR * +xmlChar * htmlParseName(htmlParserCtxtPtr ctxt) { - CHAR buf[HTML_MAX_NAMELEN]; + xmlChar buf[HTML_MAX_NAMELEN]; int len = 0; GROW; @@ -1245,9 +1245,9 @@ htmlParseName(htmlParserCtxtPtr ctxt) { * Returns the Nmtoken parsed or NULL */ -CHAR * +xmlChar * htmlParseHTMLAttribute(htmlParserCtxtPtr ctxt) { - CHAR buf[HTML_MAX_NAMELEN]; + xmlChar buf[HTML_MAX_NAMELEN]; int len = 0; GROW; @@ -1278,9 +1278,9 @@ htmlParseHTMLAttribute(htmlParserCtxtPtr ctxt) { * Returns the Nmtoken parsed or NULL */ -CHAR * +xmlChar * htmlParseNmtoken(htmlParserCtxtPtr ctxt) { - CHAR buf[HTML_MAX_NAMELEN]; + xmlChar buf[HTML_MAX_NAMELEN]; int len = 0; GROW; @@ -1319,8 +1319,8 @@ htmlParseNmtoken(htmlParserCtxtPtr ctxt) { * if non-NULL *str will have to be freed by the caller. */ htmlEntityDescPtr -htmlParseEntityRef(htmlParserCtxtPtr ctxt, CHAR **str) { - CHAR *name; +htmlParseEntityRef(htmlParserCtxtPtr ctxt, xmlChar **str) { + xmlChar *name; htmlEntityDescPtr ent = NULL; *str = NULL; @@ -1369,9 +1369,9 @@ htmlParseEntityRef(htmlParserCtxtPtr ctxt, CHAR **str) { * Returns the AttValue parsed or NULL. */ -CHAR * +xmlChar * htmlParseAttValue(htmlParserCtxtPtr ctxt) { - CHAR *ret = NULL; + xmlChar *ret = NULL; if (CUR == '"') { NEXT; @@ -1429,10 +1429,10 @@ htmlParseAttValue(htmlParserCtxtPtr ctxt) { * Returns the SystemLiteral parsed or NULL */ -CHAR * +xmlChar * htmlParseSystemLiteral(htmlParserCtxtPtr ctxt) { - const CHAR *q; - CHAR *ret = NULL; + const xmlChar *q; + xmlChar *ret = NULL; if (CUR == '"') { NEXT; @@ -1480,10 +1480,10 @@ htmlParseSystemLiteral(htmlParserCtxtPtr ctxt) { * Returns the PubidLiteral parsed or NULL. */ -CHAR * +xmlChar * htmlParsePubidLiteral(htmlParserCtxtPtr ctxt) { - const CHAR *q; - CHAR *ret = NULL; + const xmlChar *q; + xmlChar *ret = NULL; /* * Name ::= (Letter | '_') (NameChar)* */ @@ -1534,7 +1534,7 @@ htmlParsePubidLiteral(htmlParserCtxtPtr ctxt) { void htmlParseCharData(htmlParserCtxtPtr ctxt, int cdata) { - const CHAR *q; + const xmlChar *q; q = CUR_PTR; while ((IS_CHAR(CUR)) && (CUR != '<') && @@ -1570,7 +1570,7 @@ htmlParseCharData(htmlParserCtxtPtr ctxt, int cdata) { /** * htmlParseExternalID: * @ctxt: an HTML parser context - * @publicID: a CHAR** receiving PubidLiteral + * @publicID: a xmlChar** receiving PubidLiteral * @strict: indicate whether we should restrict parsing to only * production [75], see NOTE below * @@ -1589,9 +1589,9 @@ htmlParseCharData(htmlParserCtxtPtr ctxt, int cdata) { * it is possible to return NULL and have publicID set. */ -CHAR * -htmlParseExternalID(htmlParserCtxtPtr ctxt, CHAR **publicID, int strict) { - CHAR *URI = NULL; +xmlChar * +htmlParseExternalID(htmlParserCtxtPtr ctxt, xmlChar **publicID, int strict) { + xmlChar *URI = NULL; if ((UPPER == 'S') && (UPP(1) == 'Y') && (UPP(2) == 'S') && (UPP(3) == 'T') && @@ -1648,9 +1648,9 @@ htmlParseExternalID(htmlParserCtxtPtr ctxt, CHAR **publicID, int strict) { */ void htmlParseComment(htmlParserCtxtPtr ctxt, int create) { - const CHAR *q, *start; - const CHAR *r; - CHAR *val; + const xmlChar *q, *start; + const xmlChar *r; + xmlChar *val; /* * Check that there is a comment right here. @@ -1755,7 +1755,7 @@ htmlParseCharRef(htmlParserCtxtPtr ctxt) { return(val); } else { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) - ctxt->sax->error(ctxt->userData, "htmlParseCharRef: invalid CHAR value %d\n", + ctxt->sax->error(ctxt->userData, "htmlParseCharRef: invalid xmlChar value %d\n", val); ctxt->wellFormed = 0; } @@ -1775,9 +1775,9 @@ htmlParseCharRef(htmlParserCtxtPtr ctxt) { void htmlParseDocTypeDecl(htmlParserCtxtPtr ctxt) { - CHAR *name; - CHAR *ExternalID = NULL; - CHAR *URI = NULL; + xmlChar *name; + xmlChar *ExternalID = NULL; + xmlChar *URI = NULL; /* * We know that '') && ((CUR != '/') || (NXT(1) != '>'))) { - const CHAR *q = CUR_PTR; + const xmlChar *q = CUR_PTR; attname = htmlParseAttribute(ctxt, &attvalue); if ((attname != NULL) && (attvalue != NULL)) { @@ -1966,18 +1966,18 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) { */ if (atts == NULL) { maxatts = 10; - atts = (const CHAR **) xmlMalloc(maxatts * sizeof(CHAR *)); + atts = (const xmlChar **) xmlMalloc(maxatts * sizeof(xmlChar *)); if (atts == NULL) { fprintf(stderr, "malloc of %ld byte failed\n", - maxatts * (long)sizeof(CHAR *)); + maxatts * (long)sizeof(xmlChar *)); return(NULL); } } else if (nbatts + 2 < maxatts) { maxatts *= 2; - atts = (const CHAR **) xmlRealloc(atts, maxatts * sizeof(CHAR *)); + atts = (const xmlChar **) xmlRealloc(atts, maxatts * sizeof(xmlChar *)); if (atts == NULL) { fprintf(stderr, "realloc of %ld byte failed\n", - maxatts * (long)sizeof(CHAR *)); + maxatts * (long)sizeof(xmlChar *)); return(NULL); } } @@ -2004,7 +2004,7 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) { ctxt->sax->startElement(ctxt->userData, name, atts); if (atts != NULL) { - for (i = 0;i < nbatts;i++) xmlFree((CHAR *) atts[i]); + for (i = 0;i < nbatts;i++) xmlFree((xmlChar *) atts[i]); xmlFree(atts); } return(name); @@ -2025,8 +2025,8 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) { */ void -htmlParseEndTag(htmlParserCtxtPtr ctxt, const CHAR *tagname) { - CHAR *name; +htmlParseEndTag(htmlParserCtxtPtr ctxt, const xmlChar *tagname) { + xmlChar *name; int i; if ((CUR != '<') || (NXT(1) != '/')) { @@ -2114,8 +2114,8 @@ htmlParseEndTag(htmlParserCtxtPtr ctxt, const CHAR *tagname) { void htmlParseReference(htmlParserCtxtPtr ctxt) { htmlEntityDescPtr ent; - CHAR out[2]; - CHAR *name; + xmlChar out[2]; + xmlChar *name; int val; if (CUR != '&') return; @@ -2156,12 +2156,12 @@ htmlParseReference(htmlParserCtxtPtr ctxt) { */ void -htmlParseContent(htmlParserCtxtPtr ctxt, const CHAR *name) { +htmlParseContent(htmlParserCtxtPtr ctxt, const xmlChar *name) { htmlNodePtr currentNode; currentNode = ctxt->node; while ((CUR != '<') || (NXT(1) != '/')) { - const CHAR *test = CUR_PTR; + const xmlChar *test = CUR_PTR; /* * Has this node been popped out during parsing of @@ -2228,8 +2228,8 @@ htmlParseContent(htmlParserCtxtPtr ctxt, const CHAR *name) { void htmlParseElement(htmlParserCtxtPtr ctxt) { - const CHAR *openTag = CUR_PTR; - CHAR *name; + const xmlChar *openTag = CUR_PTR; + xmlChar *name; htmlNodePtr currentNode; htmlElemDescPtr info; htmlParserNodeInfo node_info; @@ -2512,7 +2512,7 @@ htmlFreeParserCtxt(htmlParserCtxtPtr ctxt) /** * htmlCreateDocParserCtxt : - * @cur: a pointer to an array of CHAR + * @cur: a pointer to an array of xmlChar * @encoding: a free form C string describing the HTML document encoding, or NULL * * Create a parser context for an HTML document. @@ -2520,7 +2520,7 @@ htmlFreeParserCtxt(htmlParserCtxtPtr ctxt) * Returns the new parser context or NULL */ htmlParserCtxtPtr -htmlCreateDocParserCtxt(CHAR *cur, const char *encoding) { +htmlCreateDocParserCtxt(xmlChar *cur, const char *encoding) { htmlParserCtxtPtr ctxt; htmlParserInputPtr input; /* htmlCharEncoding enc; */ @@ -2566,7 +2566,7 @@ htmlCreateDocParserCtxt(CHAR *cur, const char *encoding) { /** * htmlSAXParseDoc : - * @cur: a pointer to an array of CHAR + * @cur: a pointer to an array of xmlChar * @encoding: a free form C string describing the HTML document encoding, or NULL * @sax: the SAX handler block * @userData: if using SAX, this pointer will be provided on callbacks. @@ -2579,7 +2579,7 @@ htmlCreateDocParserCtxt(CHAR *cur, const char *encoding) { */ htmlDocPtr -htmlSAXParseDoc(CHAR *cur, const char *encoding, htmlSAXHandlerPtr sax, void *userData) { +htmlSAXParseDoc(xmlChar *cur, const char *encoding, htmlSAXHandlerPtr sax, void *userData) { htmlDocPtr ret; htmlParserCtxtPtr ctxt; @@ -2606,7 +2606,7 @@ htmlSAXParseDoc(CHAR *cur, const char *encoding, htmlSAXHandlerPtr sax, void *us /** * htmlParseDoc : - * @cur: a pointer to an array of CHAR + * @cur: a pointer to an array of xmlChar * @encoding: a free form C string describing the HTML document encoding, or NULL * * parse an HTML in-memory document and build a tree. @@ -2615,7 +2615,7 @@ htmlSAXParseDoc(CHAR *cur, const char *encoding, htmlSAXHandlerPtr sax, void *us */ htmlDocPtr -htmlParseDoc(CHAR *cur, const char *encoding) { +htmlParseDoc(xmlChar *cur, const char *encoding) { return(htmlSAXParseDoc(cur, encoding, NULL, NULL)); } diff --git a/HTMLparser.h b/HTMLparser.h index ebcd9968..ca9ee146 100644 --- a/HTMLparser.h +++ b/HTMLparser.h @@ -48,16 +48,16 @@ typedef struct htmlEntityDesc { /* * There is only few public functions. */ -htmlElemDescPtr htmlTagLookup(const CHAR *tag); -htmlEntityDescPtr htmlEntityLookup(const CHAR *name); +htmlElemDescPtr htmlTagLookup(const xmlChar *tag); +htmlEntityDescPtr htmlEntityLookup(const xmlChar *name); -htmlEntityDescPtr htmlParseEntityRef(htmlParserCtxtPtr ctxt, CHAR **str); +htmlEntityDescPtr htmlParseEntityRef(htmlParserCtxtPtr ctxt, xmlChar **str); int htmlParseCharRef(htmlParserCtxtPtr ctxt); void htmlParseElement(htmlParserCtxtPtr ctxt); -htmlDocPtr htmlSAXParseDoc(CHAR *cur, const char *encoding, +htmlDocPtr htmlSAXParseDoc(xmlChar *cur, const char *encoding, htmlSAXHandlerPtr sax, void *userData); -htmlDocPtr htmlParseDoc(CHAR *cur, const char *encoding); +htmlDocPtr htmlParseDoc(xmlChar *cur, const char *encoding); htmlDocPtr htmlSAXParseFile(const char *filename, const char *encoding, htmlSAXHandlerPtr sax, void *userData); htmlDocPtr htmlParseFile(const char *filename, const char *encoding); diff --git a/HTMLtree.c b/HTMLtree.c index b00c300f..4e21c0fc 100644 --- a/HTMLtree.c +++ b/HTMLtree.c @@ -67,7 +67,7 @@ htmlDtdDump(xmlBufferPtr buf, xmlDocPtr doc) { */ static void htmlAttrDump(xmlBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur) { - CHAR *value; + xmlChar *value; if (cur == NULL) { fprintf(stderr, "htmlAttrDump : property == NULL\n"); @@ -149,7 +149,7 @@ htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) { */ if (cur->type == HTML_TEXT_NODE) { if (cur->content != NULL) { - CHAR *buffer; + xmlChar *buffer; /* uses the HTML encoding routine !!!!!!!!!! */ buffer = xmlEncodeEntitiesReentrant(doc, cur->content); @@ -211,7 +211,7 @@ htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) { } xmlBufferWriteChar(buf, ">"); if (cur->content != NULL) { - CHAR *buffer; + xmlChar *buffer; buffer = xmlEncodeEntitiesReentrant(doc, cur->content); if (buffer != NULL) { @@ -261,11 +261,11 @@ htmlDocContentDump(xmlBufferPtr buf, xmlDocPtr cur) { * @mem: OUT: the memory pointer * @size: OUT: the memory lenght * - * Dump an HTML document in memory and return the CHAR * and it's size. + * Dump an HTML document in memory and return the xmlChar * and it's size. * It's up to the caller to free the memory. */ void -htmlDocDumpMemory(xmlDocPtr cur, CHAR**mem, int *size) { +htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) { xmlBufferPtr buf; if (cur == NULL) { @@ -342,6 +342,6 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) { fclose(output); xmlBufferFree(buf); - return(ret * sizeof(CHAR)); + return(ret * sizeof(xmlChar)); } diff --git a/SAX.c b/SAX.c index 7d1da40d..e0c50660 100644 --- a/SAX.c +++ b/SAX.c @@ -27,9 +27,9 @@ * * Return the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN" * - * Returns a CHAR * + * Returns a xmlChar * */ -const CHAR * +const xmlChar * getPublicId(void *ctx) { /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */ @@ -43,9 +43,9 @@ getPublicId(void *ctx) * Return the system ID, basically URL or filename e.g. * http://www.sgmlsource.com/dtds/memo.dtd * - * Returns a CHAR * + * Returns a xmlChar * */ -const CHAR * +const xmlChar * getSystemId(void *ctx) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; @@ -142,8 +142,8 @@ hasExternalSubset(void *ctx) * Does this document has an internal subset */ void -internalSubset(void *ctx, const CHAR *name, - const CHAR *ExternalID, const CHAR *SystemID) +internalSubset(void *ctx, const xmlChar *name, + const xmlChar *ExternalID, const xmlChar *SystemID) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; #ifdef DEBUG_SAX @@ -229,7 +229,7 @@ internalSubset(void *ctx, const CHAR *name, * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. */ xmlParserInputPtr -resolveEntity(void *ctx, const CHAR *publicId, const CHAR *systemId) +resolveEntity(void *ctx, const xmlChar *publicId, const xmlChar *systemId) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; @@ -253,7 +253,7 @@ resolveEntity(void *ctx, const CHAR *publicId, const CHAR *systemId) * Returns the xmlEntityPtr if found. */ xmlEntityPtr -getEntity(void *ctx, const CHAR *name) +getEntity(void *ctx, const xmlChar *name) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlEntityPtr ret; @@ -276,7 +276,7 @@ getEntity(void *ctx, const CHAR *name) * Returns the xmlEntityPtr if found. */ xmlEntityPtr -getParameterEntity(void *ctx, const CHAR *name) +getParameterEntity(void *ctx, const xmlChar *name) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlEntityPtr ret; @@ -302,8 +302,8 @@ getParameterEntity(void *ctx, const CHAR *name) * An entity definition has been parsed */ void -entityDecl(void *ctx, const CHAR *name, int type, - const CHAR *publicId, const CHAR *systemId, CHAR *content) +entityDecl(void *ctx, const xmlChar *name, int type, + const xmlChar *publicId, const xmlChar *systemId, xmlChar *content) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; @@ -326,8 +326,8 @@ entityDecl(void *ctx, const CHAR *name, int type, * An attribute definition has been parsed */ void -attributeDecl(void *ctx, const CHAR *elem, const CHAR *name, - int type, int def, const CHAR *defaultValue, +attributeDecl(void *ctx, const xmlChar *elem, const xmlChar *name, + int type, int def, const xmlChar *defaultValue, xmlEnumerationPtr tree) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; @@ -358,7 +358,7 @@ attributeDecl(void *ctx, const CHAR *elem, const CHAR *name, * An element definition has been parsed */ void -elementDecl(void *ctx, const CHAR *name, int type, +elementDecl(void *ctx, const xmlChar *name, int type, xmlElementContentPtr content) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; @@ -387,8 +387,8 @@ elementDecl(void *ctx, const CHAR *name, int type, * What to do when a notation declaration has been parsed. */ void -notationDecl(void *ctx, const CHAR *name, - const CHAR *publicId, const CHAR *systemId) +notationDecl(void *ctx, const xmlChar *name, + const xmlChar *publicId, const xmlChar *systemId) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlNotationPtr nota; @@ -417,9 +417,9 @@ notationDecl(void *ctx, const CHAR *name, * What to do when an unparsed entity declaration is parsed */ void -unparsedEntityDecl(void *ctx, const CHAR *name, - const CHAR *publicId, const CHAR *systemId, - const CHAR *notationName) +unparsedEntityDecl(void *ctx, const xmlChar *name, + const xmlChar *publicId, const xmlChar *systemId, + const xmlChar *notationName) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; #ifdef DEBUG_SAX @@ -507,12 +507,12 @@ endDocument(void *ctx) * the element. */ void -attribute(void *ctx, const CHAR *fullname, const CHAR *value) +attribute(void *ctx, const xmlChar *fullname, const xmlChar *value) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlAttrPtr ret; - CHAR *name; - CHAR *ns; + xmlChar *name; + xmlChar *ns; xmlNsPtr namespace; /**************** @@ -588,16 +588,16 @@ attribute(void *ctx, const CHAR *fullname, const CHAR *value) * called when an opening tag has been processed. */ void -startElement(void *ctx, const CHAR *fullname, const CHAR **atts) +startElement(void *ctx, const xmlChar *fullname, const xmlChar **atts) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlNodePtr ret; xmlNodePtr parent = ctxt->node; xmlNsPtr ns; - CHAR *name; - CHAR *prefix; - const CHAR *att; - const CHAR *value; + xmlChar *name; + xmlChar *prefix; + const xmlChar *att; + const xmlChar *value; int i; #ifdef DEBUG_SAX @@ -728,7 +728,7 @@ startElement(void *ctx, const CHAR *fullname, const CHAR **atts) * called when the end of an element has been detected. */ void -endElement(void *ctx, const CHAR *name) +endElement(void *ctx, const xmlChar *name) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserNodeInfo node_info; @@ -772,7 +772,7 @@ endElement(void *ctx, const CHAR *name) * called when an entity reference is detected. */ void -reference(void *ctx, const CHAR *name) +reference(void *ctx, const xmlChar *name) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlNodePtr ret; @@ -790,14 +790,14 @@ reference(void *ctx, const CHAR *name) /** * characters: * @ctx: the user data (XML parser context) - * @ch: a CHAR string - * @len: the number of CHAR + * @ch: a xmlChar string + * @len: the number of xmlChar * * receiving some chars from the parser. * Question: how much at a time ??? */ void -characters(void *ctx, const CHAR *ch, int len) +characters(void *ctx, const xmlChar *ch, int len) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlNodePtr lastChild; @@ -830,14 +830,14 @@ characters(void *ctx, const CHAR *ch, int len) /** * ignorableWhitespace: * @ctx: the user data (XML parser context) - * @ch: a CHAR string - * @len: the number of CHAR + * @ch: a xmlChar string + * @len: the number of xmlChar * * receiving some ignorable whitespaces from the parser. * Question: how much at a time ??? */ void -ignorableWhitespace(void *ctx, const CHAR *ch, int len) +ignorableWhitespace(void *ctx, const xmlChar *ch, int len) { /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */ #ifdef DEBUG_SAX @@ -850,13 +850,13 @@ ignorableWhitespace(void *ctx, const CHAR *ch, int len) * @ctx: the user data (XML parser context) * @target: the target name * @data: the PI data's - * @len: the number of CHAR + * @len: the number of xmlChar * * A processing instruction has been parsed. */ void -processingInstruction(void *ctx, const CHAR *target, - const CHAR *data) +processingInstruction(void *ctx, const xmlChar *target, + const xmlChar *data) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlNodePtr ret; @@ -903,7 +903,7 @@ processingInstruction(void *ctx, const CHAR *target, * An old global namespace has been parsed. */ void -globalNamespace(void *ctx, const CHAR *href, const CHAR *prefix) +globalNamespace(void *ctx, const xmlChar *href, const xmlChar *prefix) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; #ifdef DEBUG_SAX @@ -920,7 +920,7 @@ globalNamespace(void *ctx, const CHAR *href, const CHAR *prefix) * Set the current element namespace. */ void -setNamespace(void *ctx, const CHAR *name) +setNamespace(void *ctx, const xmlChar *name) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlNsPtr ns; @@ -968,7 +968,7 @@ getNamespace(void *ctx) * one read upon parsing. */ int -checkNamespace(void *ctx, CHAR *namespace) +checkNamespace(void *ctx, xmlChar *namespace) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlNodePtr cur = ctxt->node; @@ -1016,7 +1016,7 @@ checkNamespace(void *ctx, CHAR *namespace) * A namespace has been parsed. */ void -namespaceDecl(void *ctx, const CHAR *href, const CHAR *prefix) +namespaceDecl(void *ctx, const xmlChar *href, const xmlChar *prefix) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; #ifdef DEBUG_SAX @@ -1036,7 +1036,7 @@ namespaceDecl(void *ctx, const CHAR *href, const CHAR *prefix) * A comment has been parsed. */ void -comment(void *ctx, const CHAR *value) +comment(void *ctx, const xmlChar *value) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlNodePtr ret; @@ -1081,7 +1081,7 @@ comment(void *ctx, const CHAR *value) * called when a pcdata block has been parsed */ void -cdataBlock(void *ctx, const CHAR *value, int len) +cdataBlock(void *ctx, const xmlChar *value, int len) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlNodePtr ret; diff --git a/configure.in b/configure.in index 4c7a3f5e..91f1886f 100644 --- a/configure.in +++ b/configure.in @@ -5,7 +5,7 @@ AM_CONFIG_HEADER(config.h) LIBXML_MAJOR_VERSION=1 LIBXML_MINOR_VERSION=7 -LIBXML_MICRO_VERSION=0 +LIBXML_MICRO_VERSION=1 LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION diff --git a/debugXML.c b/debugXML.c index 69901b7c..24618e95 100644 --- a/debugXML.c +++ b/debugXML.c @@ -15,7 +15,7 @@ #define IS_BLANK(c) \ (((c) == '\n') || ((c) == '\r') || ((c) == '\t') || ((c) == ' ')) -void xmlDebugDumpString(FILE *output, const CHAR *str) { +void xmlDebugDumpString(FILE *output, const xmlChar *str) { int i; for (i = 0;i < 40;i++) if (str[i] == 0) return; diff --git a/debugXML.h b/debugXML.h index 556d1fe1..f73527ca 100644 --- a/debugXML.h +++ b/debugXML.h @@ -9,7 +9,7 @@ #define __DEBUG_XML__ #include "tree.h" -extern void xmlDebugDumpString(FILE *output, const CHAR *str); +extern void xmlDebugDumpString(FILE *output, const xmlChar *str); extern void xmlDebugDumpAttr(FILE *output, xmlAttrPtr attr, int depth); extern void xmlDebugDumpAttrList(FILE *output, xmlAttrPtr attr, int depth); extern void xmlDebugDumpOneNode(FILE *output, xmlNodePtr node, int depth); diff --git a/doc/html/gnome-xml-entities.html b/doc/html/gnome-xml-entities.html index b473a3c7..5db02940 100644 --- a/doc/html/gnome-xml-entities.html +++ b/doc/html/gnome-xml-entities.html @@ -115,7 +115,7 @@ SIZE="3" >

Name

Synopsis

xmlDocPtr doc, const CHARxmlChar *name, int type, const CHARxmlChar *ExternalID, const CHARxmlChar *SystemID, const CHARxmlChar *content); void xmlDocPtr doc, const CHARxmlChar *name, int type, const CHARxmlChar *ExternalID, const CHARxmlChar *SystemID, const CHARxmlChar *content); xmlGetPredefinedEntity (const CHARxmlChar *name); xmlDocPtr doc, const CHARxmlChar *name); xmlDocPtr doc, const CHARxmlChar *name); xmlDocPtr doc, const CHARxmlChar *name); const CHARxmlChar* xmlEncodeEntities ( (xmlDocPtr doc, const CHARxmlChar *input); CHAR* xmlChar* xmlEncodeEntitiesReentrant (xmlDocPtr doc, const CHARxmlChar *input);

Description

Details










xmlDocPtr doc, const CHARxmlChar *name, int type, const CHARxmlChar *ExternalID, const CHARxmlChar *SystemID, const CHARxmlChar *content);

xmlDocPtr doc, const CHARxmlChar *name, int type, const CHARxmlChar *ExternalID, const CHARxmlChar *SystemID, const CHARxmlChar *content);

xmlEntityPtr xmlGetPredefinedEntity (const CHARxmlChar *name);

xmlDocPtr doc, const CHARxmlChar *name);

xmlDocPtr doc, const CHARxmlChar *name);

xmlDocPtr doc, const CHARxmlChar *name);

const CHAR* xmlEncodeEntities               (xmlChar* xmlEncodeEntities            (xmlDocPtr doc,
                                              const CHARxmlChar *input);

CHAR*       xmlEncodeEntitiesReentrant      (xmlChar*    xmlEncodeEntitiesReentrant      (xmlDocPtr doc,
                                              const CHARxmlChar *input);




Name

Synopsis

htmlTagLookup (const CHARxmlChar *tag); htmlEntityLookup (const CHARxmlChar *name); htmlParserCtxtPtr ctxt, CHARxmlChar **str); int htmlSAXParseDoc (CHARxmlChar *cur, const char *encoding, htmlParseDoc (CHARxmlChar *cur, const char *encoding);

Description

Details










htmlElemDescPtr htmlTagLookup (const CHARxmlChar *tag);

htmlEntityDescPtr htmlEntityLookup (const CHARxmlChar *name);

htmlParserCtxtPtr ctxt, CHARxmlChar **str);



htmlDocPtr htmlSAXParseDoc (CHARxmlChar *cur, const char *encoding,

htmlDocPtr htmlParseDoc (CHARxmlChar *cur, const char *encoding);


Name

Synopsis

xmlDocPtr cur, CHARxmlChar **mem, int *size); void

Description

Details




xmlDocPtr cur, CHARxmlChar **mem, int *size);

Dump an HTML document in memory and return the CHAR * and it's size. +>Dump an HTML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory.



*xmlParserInputDeallocate) (CHARxmlChar*); typedef *resolveEntitySAXFunc) (void *ctx, const CHARxmlChar *publicId, const CHARxmlChar *systemId); void (*internalSubsetSAXFunc) (void *ctx, const CHARxmlChar *name, const CHARxmlChar *ExternalID, const CHARxmlChar *SystemID); *getEntitySAXFunc) (void *ctx, const CHARxmlChar *name); *getParameterEntitySAXFunc) (void *ctx, const CHARxmlChar *name); void (*entityDeclSAXFunc) (void *ctx, const CHARxmlChar *name, int type, const CHARxmlChar *publicId, const CHARxmlChar *systemId, CHARxmlChar *content); void (*notationDeclSAXFunc) (void *ctx, const CHARxmlChar *name, const CHARxmlChar *publicId, const CHARxmlChar *systemId); void (*attributeDeclSAXFunc) (void *ctx, const CHARxmlChar *elem, const CHARxmlChar *name, int type, int def, const CHARxmlChar *defaultValue, *elementDeclSAXFunc) (void *ctx, const CHARxmlChar *name, int type, *unparsedEntityDeclSAXFunc) (void *ctx, const CHARxmlChar *name, const CHARxmlChar *publicId, const CHARxmlChar *systemId, const CHARxmlChar *notationName); void (*startElementSAXFunc) (void *ctx, const CHARxmlChar *name, const CHARxmlChar **atts); void (*endElementSAXFunc) (void *ctx, const CHARxmlChar *name); void (*attributeSAXFunc) (void *ctx, const CHARxmlChar *name, const CHARxmlChar *value); void (*referenceSAXFunc) (void *ctx, const CHARxmlChar *name); void (*charactersSAXFunc) (void *ctx, const CHARxmlChar *ch, int len); void (*ignorableWhitespaceSAXFunc) (void *ctx, const CHARxmlChar *ch, int len); void (*processingInstructionSAXFunc) (void *ctx, const CHARxmlChar *target, const CHARxmlChar *data); void (*commentSAXFunc) (void *ctx, const CHARxmlChar *value); void (*cdataBlockSAXFunc) (void *ctx, const CHARxmlChar *value, int len); void ( in, int len); CHAR* xmlChar* xmlStrdup (const CHARxmlChar *cur); CHAR* xmlChar* xmlStrndup (const CHARxmlChar *cur, int len); CHAR* xmlChar* xmlStrsub (const CHARxmlChar *str, int start, int len); const CHARxmlChar* xmlStrchr (const CHAR (const xmlChar *str, CHARxmlChar val); const CHARxmlChar* xmlStrstr (const CHAR (const xmlChar *str, CHARxmlChar *val); int xmlStrcmp (const CHARxmlChar *str1, const CHARxmlChar *str2); int xmlStrncmp (const CHARxmlChar *str1, const CHARxmlChar *str2, int len); int xmlStrlen (const CHARxmlChar *str); CHAR* xmlChar* xmlStrcat (CHARxmlChar *cur, const CHARxmlChar *add); CHAR* xmlChar* xmlStrncat (CHARxmlChar *cur, const CHARxmlChar *add, int len); xmlParseDoc (CHARxmlChar *cur); xmlRecoverDoc (CHARxmlChar *cur); xmlSAXHandlerPtr sax, CHARxmlChar *cur, int recovery); xmlParseDTD (const CHARxmlChar *ExternalID, const CHARxmlChar *SystemID); xmlSAXHandlerPtr sax, const CHARxmlChar *ExternalID, const CHARxmlChar *SystemID); void xmlParserCtxtPtr ctxt, const CHARxmlChar *buffer, const char *filename); void
void        (*xmlParserInputDeallocate)     (CHARxmlChar*);
xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx, const CHARxmlChar *publicId, const CHARxmlChar *systemId);void (*internalSubsetSAXFunc) (void *ctx, const CHARxmlChar *name, const CHARxmlChar *ExternalID, const CHARxmlChar *SystemID);xmlEntityPtr (*getEntitySAXFunc) (void *ctx, const CHARxmlChar *name);xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx, const CHARxmlChar *name);void (*entityDeclSAXFunc) (void *ctx, const CHARxmlChar *name, int type, const CHARxmlChar *publicId, const CHARxmlChar *systemId, CHARxmlChar *content);void (*notationDeclSAXFunc) (void *ctx, const CHARxmlChar *name, const CHARxmlChar *publicId, const CHARxmlChar *systemId);void (*attributeDeclSAXFunc) (void *ctx, const CHARxmlChar *elem, const CHARxmlChar *name, int type, int def, const CHARxmlChar *defaultValue, void (*elementDeclSAXFunc) (void *ctx, const CHARxmlChar *name, int type, void (*unparsedEntityDeclSAXFunc) (void *ctx, const CHARxmlChar *name, const CHARxmlChar *publicId, const CHARxmlChar *systemId, const CHARxmlChar *notationName);void (*startElementSAXFunc) (void *ctx, const CHARxmlChar *name, const CHARxmlChar **atts);void (*endElementSAXFunc) (void *ctx, const CHARxmlChar *name);void (*attributeSAXFunc) (void *ctx, const CHARxmlChar *name, const CHARxmlChar *value);void (*referenceSAXFunc) (void *ctx, const CHARxmlChar *name);void (*charactersSAXFunc) (void *ctx, const CHARxmlChar *ch, int len);void (*ignorableWhitespaceSAXFunc) (void *ctx, const CHARxmlChar *ch, int len);void (*processingInstructionSAXFunc) (void *ctx, const CHARxmlChar *target, const CHARxmlChar *data);void (*commentSAXFunc) (void *ctx, const CHARxmlChar *value);void (*cdataBlockSAXFunc) (void *ctx, const CHARxmlChar *value, int len);
CHAR*       xmlStrdup                       (const CHARxmlChar*    xmlStrdup                       (const xmlChar *cur);

a strdup for array of CHAR's

a strdup for array of xmlChar's

CHAR*       xmlStrndup                      (const CHARxmlChar*    xmlStrndup                      (const xmlChar *cur,
                                              int len);

a strndup for array of CHAR's

a strndup for array of xmlChar's

CHAR*       xmlStrsub                       (const CHARxmlChar*    xmlStrsub                       (const xmlChar *str,
                                              int start,
                                              int len);
const CHAR* xmlStrchr                       (const CHARxmlChar* xmlStrchr                    (const xmlChar *str,
                                              CHARxmlChar val);

a strchr for CHAR's

a strchr for xmlChar's

const CHAR* xmlStrstr                       (const CHARxmlChar* xmlStrstr                    (const xmlChar *str,
                                              CHARxmlChar *val);

a strstr for CHAR's

a strstr for xmlChar's

int         xmlStrcmp                       (const CHARxmlChar *str1,
                                              const CHARxmlChar *str2);

a strcmp for CHAR's

a strcmp for xmlChar's

int         xmlStrncmp                      (const CHARxmlChar *str1,
                                              const CHARxmlChar *str2,
                                              int len);

a strncmp for CHAR's

a strncmp for xmlChar's

int         xmlStrlen                       (const CHARxmlChar *str);

lenght of a CHAR's string

lenght of a xmlChar's string

CHAR*       xmlStrcat                       (CHARxmlChar*    xmlStrcat                       (xmlChar *cur,
                                              const CHARxmlChar *add);

a strcat for array of CHAR's

a strcat for array of xmlChar's

CHAR*       xmlStrncat                      (CHARxmlChar*    xmlStrncat                      (xmlChar *cur,
                                              const CHARxmlChar *add,
                                              int len);

a strncat for array of CHAR's

a strncat for array of xmlChar's

xmlDocPtr xmlParseDoc (CHARxmlChar *cur);xmlDocPtr xmlRecoverDoc (CHARxmlChar *cur);xmlSAXHandlerPtr sax, CHARxmlChar *cur, int recovery);xmlDtdPtr xmlParseDTD (const CHARxmlChar *ExternalID, const CHARxmlChar *SystemID);xmlSAXHandlerPtr sax, const CHARxmlChar *ExternalID, const CHARxmlChar *SystemID);xmlParserCtxtPtr ctxt, const CHARxmlChar *buffer, const char *filename);

Name

Synopsis

xmlCreateDocParserCtxt (CHARxmlChar *cur); xmlParserInputPtr input); CHAR xmlChar xmlPopInput ( ctxt, const char *filename); CHAR* xmlChar* xmlSplitQName (const CHARxmlChar *name, CHARxmlChar **prefix); CHAR* xmlChar* xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt); CHAR* xmlChar* xmlNamespaceParseQName (xmlParserCtxtPtr ctxt, CHARxmlChar **prefix); CHAR* xmlChar* xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt); CHAR* xmlChar* xmlParseQuotedString (xmlParserCtxtPtr ctxt); CHAR* xmlChar* xmlScanName (xmlParserCtxtPtr ctxt); CHAR* xmlChar* xmlParseName (xmlParserCtxtPtr ctxt); CHAR* xmlChar* xmlParseNmtoken (xmlParserCtxtPtr ctxt); CHAR* xmlChar* xmlParseEntityValue (xmlParserCtxtPtr ctxt, CHARxmlChar **orig); CHAR* xmlChar* xmlParseAttValue (xmlParserCtxtPtr ctxt); CHAR* xmlChar* xmlParseSystemLiteral (xmlParserCtxtPtr ctxt); CHAR* xmlChar* xmlParsePubidLiteral ( ctxt, int cdata); CHAR* xmlChar* xmlParseExternalID (xmlParserCtxtPtr ctxt, CHARxmlChar **publicID, int strict); void xmlParserCtxtPtr ctxt); CHAR* xmlChar* xmlParsePITarget (xmlParserCtxtPtr ctxt, CHARxmlChar **value); xmlParserCtxtPtr ctxt, CHARxmlChar *name, xmlParserCtxtPtr ctxt); CHAR* xmlChar* xmlParseAttribute (xmlParserCtxtPtr ctxt, CHARxmlChar **value); CHAR* xmlChar* xmlParseStartTag (xmlParserCtxtPtr ctxt, CHARxmlChar *tagname); void xmlParserCtxtPtr ctxt); CHAR* xmlChar* xmlParseVersionNum (xmlParserCtxtPtr ctxt); CHAR* xmlChar* xmlParseVersionInfo (xmlParserCtxtPtr ctxt); CHAR* xmlChar* xmlParseEncName (xmlParserCtxtPtr ctxt); CHAR* xmlChar* xmlParseEncodingDecl (xmlParserCtxtPtr ctxt, const CHARxmlChar *ExternalID, const CHARxmlChar *SystemID); #define XML_SUBSTITUTE_BOTH CHAR* xmlChar* xmlDecodeEntities (CHARxmlChar end, CHARxmlChar end2, CHARxmlChar end3); int

Description

Details

















xmlParserCtxtPtr xmlCreateDocParserCtxt (CHARxmlChar *cur);









CHAR        xmlPopInput                     (xmlChar     xmlPopInput                     (xmlParserCtxtPtr ctxt);



CHAR*       xmlSplitQName                   (const CHARxmlChar*    xmlSplitQName                   (const xmlChar *name,
                                              CHARxmlChar **prefix);

CHAR*       xmlNamespaceParseNCName         (xmlChar*    xmlNamespaceParseNCName         (xmlParserCtxtPtr ctxt);

CHAR*       xmlNamespaceParseQName          (xmlChar*    xmlNamespaceParseQName          (xmlParserCtxtPtr ctxt,
                                              CHARxmlChar **prefix);

CHAR*       xmlNamespaceParseNSDef          (xmlChar*    xmlNamespaceParseNSDef          (xmlParserCtxtPtr ctxt);

CHAR*       xmlParseQuotedString            (xmlChar*    xmlParseQuotedString            (xmlParserCtxtPtr ctxt);


CHAR*       xmlScanName                     (xmlChar*    xmlScanName                     (xmlParserCtxtPtr ctxt);

CHAR*       xmlParseName                    (xmlChar*    xmlParseName                    (xmlParserCtxtPtr ctxt);

CHAR*       xmlParseNmtoken                 (xmlChar*    xmlParseNmtoken                 (xmlParserCtxtPtr ctxt);

CHAR*       xmlParseEntityValue             (xmlChar*    xmlParseEntityValue             (xmlParserCtxtPtr ctxt,
                                              CHARxmlChar **orig);

CHAR*       xmlParseAttValue                (xmlChar*    xmlParseAttValue                (xmlParserCtxtPtr ctxt);

CHAR*       xmlParseSystemLiteral           (xmlChar*    xmlParseSystemLiteral           (xmlParserCtxtPtr ctxt);

CHAR*       xmlParsePubidLiteral            (xmlChar*    xmlParsePubidLiteral            (xmlParserCtxtPtr ctxt);


CHAR*       xmlParseExternalID              (xmlChar*    xmlParseExternalID              (xmlParserCtxtPtr ctxt,
                                              CHARxmlChar **publicID,
                                              int strict);


CHAR*       xmlParsePITarget                (xmlChar*    xmlParsePITarget                (xmlParserCtxtPtr ctxt);




xmlParserCtxtPtr ctxt, CHARxmlChar **value);








xmlParserCtxtPtr ctxt, CHARxmlChar *name,








CHAR*       xmlParseAttribute               (xmlChar*    xmlParseAttribute               (xmlParserCtxtPtr ctxt,
                                              CHARxmlChar **value);

CHAR*       xmlParseStartTag                (xmlChar*    xmlParseStartTag                (xmlParserCtxtPtr ctxt);

xmlParserCtxtPtr ctxt, CHARxmlChar *tagname);




CHAR*       xmlParseVersionNum              (xmlChar*    xmlParseVersionNum              (xmlParserCtxtPtr ctxt);

CHAR*       xmlParseVersionInfo             (xmlChar*    xmlParseVersionInfo             (xmlParserCtxtPtr ctxt);

CHAR*       xmlParseEncName                 (xmlChar*    xmlParseEncName                 (xmlParserCtxtPtr ctxt);

CHAR*       xmlParseEncodingDecl            (xmlChar*    xmlParseEncodingDecl            (xmlParserCtxtPtr ctxt);




xmlParserCtxtPtr ctxt, const CHARxmlChar *ExternalID, const CHARxmlChar *SystemID);





CHAR*       xmlDecodeEntities               (xmlChar*    xmlDecodeEntities               (xmlParserCtxtPtr ctxt,
                                              int len,
                                              int what,
                                              CHARxmlChar end,
                                              CHARxmlChar end2,
                                              CHARxmlChar end3);




xmlElementType; typedef xmlChar; +#define CHAR; +> #define BAD_CASTxmlBufferPtr buf, const CHARxmlChar *str, int len); void xmlBufferPtr buf, const CHARxmlChar *str); void xmlDocPtr doc, const CHARxmlChar *name, const CHARxmlChar *ExternalID, const CHARxmlChar *SystemID); xmlDocPtr doc, const CHARxmlChar *name, const CHARxmlChar *ExternalID, const CHARxmlChar *SystemID); void xmlDocPtr doc, const CHARxmlChar *href, const CHARxmlChar *prefix); xmlNodePtr node, const CHARxmlChar *href, const CHARxmlChar *prefix); void xmlNewDoc (const CHARxmlChar *version); void xmlDocPtr doc, const CHARxmlChar *name, const CHARxmlChar *value); xmlNodePtr node, const CHARxmlChar *name, const CHARxmlChar *value); xmlNsPtr ns, const CHARxmlChar *name, const CHARxmlChar *value); void xmlNsPtr ns, const CHARxmlChar *name, const CHARxmlChar *content); xmlNsPtr ns, const CHARxmlChar *name); xmlNsPtr ns, const CHARxmlChar *name, const CHARxmlChar *content); xmlDocPtr doc, const CHARxmlChar *content); xmlNewText (const CHARxmlChar *content); xmlNewPI (const CHARxmlChar *name, const CHARxmlChar *content); xmlDocPtr doc, const CHARxmlChar *content, int len); xmlNewTextLen (const CHARxmlChar *content, int len); xmlDocPtr doc, const CHARxmlChar *content); xmlNewComment (const CHARxmlChar *content); xmlDocPtr doc, const CHARxmlChar *content, int len); xmlDocPtr doc, const CHARxmlChar *name); xmlNodePtr node, const CHARxmlChar *content, int len); void xmlNodePtr node, const CHARxmlChar *nameSpace); xmlNodePtr node, const CHARxmlChar *href); xmlNodePtr node, const CHARxmlChar *name, const CHARxmlChar *value); CHAR* xmlChar* xmlGetProp (xmlNodePtr node, const CHARxmlChar *name); xmlDocPtr doc, const CHARxmlChar *value); xmlDocPtr doc, const CHARxmlChar *value, int len); CHAR* xmlChar* xmlNodeListGetString (xmlNodePtr cur, const CHARxmlChar *content); void xmlNodePtr cur, const CHARxmlChar *content, int len); void xmlNodePtr cur, const CHARxmlChar *content); void xmlNodePtr cur, const CHARxmlChar *content, int len); CHAR* xmlChar* xmlNodeGetContent (xmlNodePtr cur); const CHARxmlChar* xmlNodeGetLang ( (xmlNodePtr cur); @@ -1072,8 +1076,8 @@ HREF="gnome-xml-tree.html#XMLNODEPTR" >xmlNodePtr cur, const CHARxmlChar *lang); int xmlBufferPtr buf, const CHARxmlChar *string); void xmlBufferPtr buf, const CHARxmlChar *string); void xmlDocPtr cur, CHARxmlChar **mem, int *size); void

Description

Details


CHAR

xmlChar


CHAR

#define     CHAR































xmlBufferPtr buf, const CHARxmlChar *str, int len);

xmlBufferPtr buf, const CHARxmlChar *str);




xmlDocPtr doc, const CHARxmlChar *name, const CHARxmlChar *ExternalID, const CHARxmlChar *SystemID);

xmlDocPtr doc, const CHARxmlChar *name, const CHARxmlChar *ExternalID, const CHARxmlChar *SystemID);


xmlDocPtr doc, const CHARxmlChar *href, const CHARxmlChar *prefix);

xmlNodePtr node, const CHARxmlChar *href, const CHARxmlChar *prefix);


xmlDocPtr xmlNewDoc (const CHARxmlChar *version);


xmlDocPtr doc, const CHARxmlChar *name, const CHARxmlChar *value);

xmlNodePtr node, const CHARxmlChar *name, const CHARxmlChar *value);

xmlNsPtr ns, const CHARxmlChar *name, const CHARxmlChar *value);







xmlNsPtr ns, const CHARxmlChar *name, const CHARxmlChar *content);

xmlNsPtr ns, const CHARxmlChar *name);

xmlNsPtr ns, const CHARxmlChar *name, const CHARxmlChar *content);

xmlDocPtr doc, const CHARxmlChar *content);

xmlNodePtr xmlNewText (const CHARxmlChar *content);

xmlNodePtr xmlNewPI (const CHARxmlChar *name, const CHARxmlChar *content);

xmlDocPtr doc, const CHARxmlChar *content, int len);

xmlNodePtr xmlNewTextLen (const CHARxmlChar *content, int len);

xmlDocPtr doc, const CHARxmlChar *content);

xmlNodePtr xmlNewComment (const CHARxmlChar *content);

xmlDocPtr doc, const CHARxmlChar *content, int len);

xmlDocPtr doc, const CHARxmlChar *name);









xmlNodePtr node, const CHARxmlChar *content, int len);



xmlNodePtr node, const CHARxmlChar *nameSpace);

xmlNodePtr node, const CHARxmlChar *href);





xmlNodePtr node, const CHARxmlChar *name, const CHARxmlChar *value);

CHAR*       xmlGetProp                      (xmlChar*    xmlGetProp                      (xmlNodePtr node,
                                              const CHARxmlChar *name);

xmlDocPtr doc, const CHARxmlChar *value);

xmlDocPtr doc, const CHARxmlChar *value, int len);

CHAR*       xmlNodeListGetString            (xmlChar*    xmlNodeListGetString            (xmlDocPtr doc,
@@ -7566,7 +7596,7 @@ VALIGN="TOP"
 >

xmlNodePtr cur, const CHARxmlChar *content);


xmlNodePtr cur, const CHARxmlChar *content, int len);

xmlNodePtr cur, const CHARxmlChar *content);

xmlNodePtr cur, const CHARxmlChar *content, int len);

CHAR*       xmlNodeGetContent               (xmlChar*    xmlNodeGetContent               (xmlNodePtr cur);

const CHAR* xmlNodeGetLang                  (xmlChar* xmlNodeGetLang               (xmlNodePtr cur);

xmlNodePtr cur, const CHARxmlChar *lang);



xmlBufferPtr buf, const CHARxmlChar *string);

routine which manage and grows an output buffer. This one add -CHARs at the end of the buffer.



xmlBufferPtr buf, const CHARxmlChar *string);

routine which manage and grows an output buffer. This one writes -a quoted or double quoted CHAR string, checking first if it holds +a quoted or double quoted xmlChar string, checking first if it holds quote or double-quotes internally


xmlDocPtr cur, CHARxmlChar **mem, int *size);

Dump an XML document in memory and return the CHAR * and it's size. +>Dump an XML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory.







Name

Synopsis

xmlDtdPtr dtd, const CHARxmlChar *name, const CHARxmlChar *PublicID, const CHARxmlChar *SystemID); xmlNewElementContent (CHARxmlChar *name, xmlDtdPtr dtd, const CHARxmlChar *name, xmlCreateEnumeration (CHARxmlChar *name); void xmlDtdPtr dtd, const CHARxmlChar *elem, const CHARxmlChar *name, xmlAttributeDefault def, const CHARxmlChar *defaultValue, xmlDocPtr doc, const CHARxmlChar *value, xmlDocPtr doc, const CHARxmlChar *ID); int xmlDocPtr doc, const CHARxmlChar *value, xmlAttributeType type, const CHARxmlChar *value); int xmlAttrPtr attr, const CHARxmlChar *value); int xmlDocPtr doc, const CHARxmlChar *notationName); int xmlDocPtr doc, const CHARxmlChar *name); xmlDtdPtr dtd, const CHARxmlChar *elem, const CHARxmlChar *name); xmlDtdPtr dtd, const CHARxmlChar *name); xmlDtdPtr dtd, const CHARxmlChar *name);

Description

Details















xmlDtdPtr dtd, const CHARxmlChar *name, const CHARxmlChar *PublicID, const CHARxmlChar *SystemID);




xmlElementContentPtr xmlNewElementContent (CHARxmlChar *name,



xmlDtdPtr dtd, const CHARxmlChar *name,




xmlEnumerationPtr xmlCreateEnumeration (CHARxmlChar *name);



xmlDtdPtr dtd, const CHARxmlChar *elem, const CHARxmlChar *name, xmlAttributeDefault def, const CHARxmlChar *defaultValue,




xmlDocPtr doc, const CHARxmlChar *value,



xmlDocPtr doc, const CHARxmlChar *ID);


xmlDocPtr doc, const CHARxmlChar *value,







xmlAttributeType type, const CHARxmlChar *value);






xmlAttrPtr attr, const CHARxmlChar *value);


xmlDocPtr doc, const CHARxmlChar *notationName);

xmlDocPtr doc, const CHARxmlChar *name);

xmlDtdPtr dtd, const CHARxmlChar *elem, const CHARxmlChar *name);

xmlDtdPtr dtd, const CHARxmlChar *name);

xmlDtdPtr dtd, const CHARxmlChar *name);

Name

Synopsis

Description

Details







Name

Synopsis

xmlXPathEval (const CHARxmlChar *str, xmlXPathEvalExpression (const CHARxmlChar *str,

Description

Details













xmlXPathObjectPtr xmlXPathEval (const CHARxmlChar *str,


xmlXPathObjectPtr xmlXPathEvalExpression (const CHARxmlChar *str, + diff --git a/doc/xml.html b/doc/xml.html index a5afae11..ed0a9ade 100644 --- a/doc/xml.html +++ b/doc/xml.html @@ -279,14 +279,14 @@ beginning of the second attribute of the root element "EXAMPLE".

functions are provided to read and write the document content:

-
xmlAttrPtr xmlSetProp(xmlNodePtr node, const CHAR *name, const - CHAR *value);
+
xmlAttrPtr xmlSetProp(xmlNodePtr node, const xmlChar *name, const + xmlChar *value);

This set (or change) an attribute carried by an ELEMENT node the value can be NULL

-
const CHAR *xmlGetProp(xmlNodePtr node, const CHAR +
const xmlChar *xmlGetProp(xmlNodePtr node, const xmlChar *name);

This function returns a pointer to the property content, note that no extra copy is made

@@ -296,7 +296,7 @@ beginning of the second attribute of the root element "EXAMPLE".

Two functions must be used to read an write the text associated to elements:

-
xmlNodePtr xmlStringGetNodeList(xmlDocPtr doc, const CHAR +
xmlNodePtr xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value);

This function takes an "external" string and convert it to one text node or possibly to a list of entity and text nodes. All non-predefined @@ -306,7 +306,7 @@ elements:

-
CHAR *xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int +
xmlChar *xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int inLine);

this is the dual function, which generate a new string containing the content of the text and entity nodes. Note the extra argument @@ -321,7 +321,7 @@ elements:

Basically 3 options are possible:

-
void xmlDocDumpMemory(xmlDocPtr cur, CHAR**mem, int +
void xmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size);

returns a buffer where the document has been saved

@@ -747,6 +747,6 @@ base under gnome-xml/example

Daniel Veillard

-

$Id: xml.html,v 1.7 1999/09/04 18:27:23 veillard Exp $

+

$Id: xml.html,v 1.8 1999/09/08 21:35:25 veillard Exp $

diff --git a/entities.c b/entities.c index fe706ea7..78f7ec2c 100644 --- a/entities.c +++ b/entities.c @@ -59,8 +59,8 @@ void xmlFreeEntity(xmlEntityPtr entity) { * xmlAddEntity : register a new entity for an entities table. */ static void -xmlAddEntity(xmlEntitiesTablePtr table, const CHAR *name, int type, - const CHAR *ExternalID, const CHAR *SystemID, const CHAR *content) { +xmlAddEntity(xmlEntitiesTablePtr table, const xmlChar *name, int type, + const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content) { int i; xmlEntityPtr cur; int len; @@ -126,10 +126,10 @@ xmlAddEntity(xmlEntitiesTablePtr table, const CHAR *name, int type, */ void xmlInitializePredefinedEntities(void) { int i; - CHAR name[50]; - CHAR value[50]; + xmlChar name[50]; + xmlChar value[50]; const char *in; - CHAR *out; + xmlChar *out; if (xmlPredefinedEntities != NULL) return; @@ -138,11 +138,11 @@ void xmlInitializePredefinedEntities(void) { sizeof(xmlPredefinedEntityValues[0]);i++) { in = xmlPredefinedEntityValues[i].name; out = &name[0]; - for (;(*out++ = (CHAR) *in);)in++; + for (;(*out++ = (xmlChar) *in);)in++; in = xmlPredefinedEntityValues[i].value; out = &value[0]; - for (;(*out++ = (CHAR) *in);)in++; - xmlAddEntity(xmlPredefinedEntities, (const CHAR *) &name[0], + for (;(*out++ = (xmlChar) *in);)in++; + xmlAddEntity(xmlPredefinedEntities, (const xmlChar *) &name[0], XML_INTERNAL_PREDEFINED_ENTITY, NULL, NULL, &value[0]); } @@ -157,7 +157,7 @@ void xmlInitializePredefinedEntities(void) { * Returns NULL if not, othervise the entity */ xmlEntityPtr -xmlGetPredefinedEntity(const CHAR *name) { +xmlGetPredefinedEntity(const xmlChar *name) { int i; xmlEntityPtr cur; @@ -182,8 +182,8 @@ xmlGetPredefinedEntity(const CHAR *name) { * Register a new entity for this document DTD. */ void -xmlAddDtdEntity(xmlDocPtr doc, const CHAR *name, int type, - const CHAR *ExternalID, const CHAR *SystemID, const CHAR *content) { +xmlAddDtdEntity(xmlDocPtr doc, const xmlChar *name, int type, + const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content) { xmlEntitiesTablePtr table; if (doc->extSubset == NULL) { @@ -211,8 +211,8 @@ xmlAddDtdEntity(xmlDocPtr doc, const CHAR *name, int type, * Register a new entity for this document. */ void -xmlAddDocEntity(xmlDocPtr doc, const CHAR *name, int type, - const CHAR *ExternalID, const CHAR *SystemID, const CHAR *content) { +xmlAddDocEntity(xmlDocPtr doc, const xmlChar *name, int type, + const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content) { xmlEntitiesTablePtr table; if (doc == NULL) { @@ -244,7 +244,7 @@ xmlAddDocEntity(xmlDocPtr doc, const CHAR *name, int type, * Returns A pointer to the entity structure or NULL if not found. */ xmlEntityPtr -xmlGetParameterEntity(xmlDocPtr doc, const CHAR *name) { +xmlGetParameterEntity(xmlDocPtr doc, const xmlChar *name) { int i; xmlEntityPtr cur; xmlEntitiesTablePtr table; @@ -290,7 +290,7 @@ xmlGetParameterEntity(xmlDocPtr doc, const CHAR *name) { * Returns A pointer to the entity structure or NULL if not found. */ xmlEntityPtr -xmlGetDtdEntity(xmlDocPtr doc, const CHAR *name) { +xmlGetDtdEntity(xmlDocPtr doc, const xmlChar *name) { int i; xmlEntityPtr cur; xmlEntitiesTablePtr table; @@ -319,7 +319,7 @@ xmlGetDtdEntity(xmlDocPtr doc, const CHAR *name) { * Returns A pointer to the entity structure or NULL if not found. */ xmlEntityPtr -xmlGetDocEntity(xmlDocPtr doc, const CHAR *name) { +xmlGetDocEntity(xmlDocPtr doc, const xmlChar *name) { int i; xmlEntityPtr cur; xmlEntitiesTablePtr table; @@ -368,11 +368,11 @@ xmlGetDocEntity(xmlDocPtr doc, const CHAR *name) { * A buffer used for converting entities to their equivalent and back. */ static int buffer_size = 0; -static CHAR *buffer = NULL; +static xmlChar *buffer = NULL; void growBuffer(void) { buffer_size *= 2; - buffer = (CHAR *) xmlRealloc(buffer, buffer_size * sizeof(CHAR)); + buffer = (xmlChar *) xmlRealloc(buffer, buffer_size * sizeof(xmlChar)); if (buffer == NULL) { perror("realloc failed"); exit(1); @@ -396,10 +396,10 @@ void growBuffer(void) { * * Returns A newly allocated string with the substitution done. */ -const CHAR * -xmlEncodeEntities(xmlDocPtr doc, const CHAR *input) { - const CHAR *cur = input; - CHAR *out = buffer; +const xmlChar * +xmlEncodeEntities(xmlDocPtr doc, const xmlChar *input) { + const xmlChar *cur = input; + xmlChar *out = buffer; static int warning = 1; if (warning) { @@ -411,7 +411,7 @@ xmlEncodeEntities(xmlDocPtr doc, const CHAR *input) { if (input == NULL) return(NULL); if (buffer == NULL) { buffer_size = 1000; - buffer = (CHAR *) xmlMalloc(buffer_size * sizeof(CHAR)); + buffer = (xmlChar *) xmlMalloc(buffer_size * sizeof(xmlChar)); if (buffer == NULL) { perror("malloc failed"); exit(1); @@ -466,7 +466,7 @@ xmlEncodeEntities(xmlDocPtr doc, const CHAR *input) { */ *out++ = *cur; #ifndef USE_UTF_8 - } else if ((sizeof(CHAR) == 1) && (*cur >= 0x80)) { + } else if ((sizeof(xmlChar) == 1) && (*cur >= 0x80)) { char buf[10], *ptr; #ifdef HAVE_SNPRINTF snprintf(buf, 9, "&#%d;", *cur); @@ -507,7 +507,7 @@ xmlEncodeEntities(xmlDocPtr doc, const CHAR *input) { */ #define growBufferReentrant() { \ buffer_size *= 2; \ - buffer = (CHAR *) xmlRealloc(buffer, buffer_size * sizeof(CHAR)); \ + buffer = (xmlChar *) xmlRealloc(buffer, buffer_size * sizeof(xmlChar)); \ if (buffer == NULL) { \ perror("realloc failed"); \ exit(1); \ @@ -530,11 +530,11 @@ xmlEncodeEntities(xmlDocPtr doc, const CHAR *input) { * * Returns A newly allocated string with the substitution done. */ -CHAR * -xmlEncodeEntitiesReentrant(xmlDocPtr doc, const CHAR *input) { - const CHAR *cur = input; - CHAR *buffer = NULL; - CHAR *out = NULL; +xmlChar * +xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) { + const xmlChar *cur = input; + xmlChar *buffer = NULL; + xmlChar *out = NULL; int buffer_size = 0; if (input == NULL) return(NULL); @@ -543,7 +543,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const CHAR *input) { * allocate an translation buffer. */ buffer_size = 1000; - buffer = (CHAR *) xmlMalloc(buffer_size * sizeof(CHAR)); + buffer = (xmlChar *) xmlMalloc(buffer_size * sizeof(xmlChar)); if (buffer == NULL) { perror("malloc failed"); exit(1); @@ -598,7 +598,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const CHAR *input) { */ *out++ = *cur; #ifndef USE_UTF_8 - } else if ((sizeof(CHAR) == 1) && (*cur >= 0x80)) { + } else if ((sizeof(xmlChar) == 1) && (*cur >= 0x80)) { char buf[10], *ptr; #ifdef HAVE_SNPRINTF snprintf(buf, 9, "&#%d;", *cur); diff --git a/entities.h b/entities.h index 5e35703a..1f6c64a4 100644 --- a/entities.h +++ b/entities.h @@ -30,11 +30,11 @@ extern "C" { typedef struct xmlEntity { int type; /* The entity type */ int len; /* The lenght of the name */ - const CHAR *name; /* Name of the entity */ - const CHAR *ExternalID; /* External identifier for PUBLIC Entity */ - const CHAR *SystemID; /* URI for a SYSTEM or PUBLIC Entity */ - CHAR *content; /* The entity content or ndata if unparsed */ - CHAR *orig; /* The entity cont without ref substitution */ + const xmlChar *name; /* Name of the entity */ + const xmlChar *ExternalID; /* External identifier for PUBLIC Entity */ + const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */ + xmlChar *content; /* The entity content or ndata if unparsed */ + xmlChar *orig; /* The entity cont without ref substitution */ } xmlEntity; typedef xmlEntity *xmlEntityPtr; @@ -60,28 +60,28 @@ typedef xmlEntitiesTable *xmlEntitiesTablePtr; #include "parser.h" void xmlAddDocEntity (xmlDocPtr doc, - const CHAR *name, + const xmlChar *name, int type, - const CHAR *ExternalID, - const CHAR *SystemID, - const CHAR *content); + const xmlChar *ExternalID, + const xmlChar *SystemID, + const xmlChar *content); void xmlAddDtdEntity (xmlDocPtr doc, - const CHAR *name, + const xmlChar *name, int type, - const CHAR *ExternalID, - const CHAR *SystemID, - const CHAR *content); -xmlEntityPtr xmlGetPredefinedEntity (const CHAR *name); + const xmlChar *ExternalID, + const xmlChar *SystemID, + const xmlChar *content); +xmlEntityPtr xmlGetPredefinedEntity (const xmlChar *name); xmlEntityPtr xmlGetDocEntity (xmlDocPtr doc, - const CHAR *name); + const xmlChar *name); xmlEntityPtr xmlGetDtdEntity (xmlDocPtr doc, - const CHAR *name); + const xmlChar *name); xmlEntityPtr xmlGetParameterEntity (xmlDocPtr doc, - const CHAR *name); -const CHAR * xmlEncodeEntities (xmlDocPtr doc, - const CHAR *input); -CHAR * xmlEncodeEntitiesReentrant(xmlDocPtr doc, - const CHAR *input); + const xmlChar *name); +const xmlChar * xmlEncodeEntities (xmlDocPtr doc, + const xmlChar *input); +xmlChar * xmlEncodeEntitiesReentrant(xmlDocPtr doc, + const xmlChar *input); xmlEntitiesTablePtr xmlCreateEntitiesTable (void); xmlEntitiesTablePtr xmlCopyEntitiesTable (xmlEntitiesTablePtr table); void xmlFreeEntitiesTable (xmlEntitiesTablePtr table); diff --git a/error.c b/error.c index 42e327e1..b77839e8 100644 --- a/error.c +++ b/error.c @@ -37,7 +37,7 @@ xmlParserPrintFileInfo(xmlParserInputPtr input) { void xmlParserPrintFileContext(xmlParserInputPtr input) { - const CHAR *cur, *base; + const xmlChar *cur, *base; int n; cur = input->cur; diff --git a/include/libxml/HTMLparser.h b/include/libxml/HTMLparser.h index ebcd9968..ca9ee146 100644 --- a/include/libxml/HTMLparser.h +++ b/include/libxml/HTMLparser.h @@ -48,16 +48,16 @@ typedef struct htmlEntityDesc { /* * There is only few public functions. */ -htmlElemDescPtr htmlTagLookup(const CHAR *tag); -htmlEntityDescPtr htmlEntityLookup(const CHAR *name); +htmlElemDescPtr htmlTagLookup(const xmlChar *tag); +htmlEntityDescPtr htmlEntityLookup(const xmlChar *name); -htmlEntityDescPtr htmlParseEntityRef(htmlParserCtxtPtr ctxt, CHAR **str); +htmlEntityDescPtr htmlParseEntityRef(htmlParserCtxtPtr ctxt, xmlChar **str); int htmlParseCharRef(htmlParserCtxtPtr ctxt); void htmlParseElement(htmlParserCtxtPtr ctxt); -htmlDocPtr htmlSAXParseDoc(CHAR *cur, const char *encoding, +htmlDocPtr htmlSAXParseDoc(xmlChar *cur, const char *encoding, htmlSAXHandlerPtr sax, void *userData); -htmlDocPtr htmlParseDoc(CHAR *cur, const char *encoding); +htmlDocPtr htmlParseDoc(xmlChar *cur, const char *encoding); htmlDocPtr htmlSAXParseFile(const char *filename, const char *encoding, htmlSAXHandlerPtr sax, void *userData); htmlDocPtr htmlParseFile(const char *filename, const char *encoding); diff --git a/include/libxml/debugXML.h b/include/libxml/debugXML.h index 556d1fe1..f73527ca 100644 --- a/include/libxml/debugXML.h +++ b/include/libxml/debugXML.h @@ -9,7 +9,7 @@ #define __DEBUG_XML__ #include "tree.h" -extern void xmlDebugDumpString(FILE *output, const CHAR *str); +extern void xmlDebugDumpString(FILE *output, const xmlChar *str); extern void xmlDebugDumpAttr(FILE *output, xmlAttrPtr attr, int depth); extern void xmlDebugDumpAttrList(FILE *output, xmlAttrPtr attr, int depth); extern void xmlDebugDumpOneNode(FILE *output, xmlNodePtr node, int depth); diff --git a/include/libxml/entities.h b/include/libxml/entities.h index 5e35703a..1f6c64a4 100644 --- a/include/libxml/entities.h +++ b/include/libxml/entities.h @@ -30,11 +30,11 @@ extern "C" { typedef struct xmlEntity { int type; /* The entity type */ int len; /* The lenght of the name */ - const CHAR *name; /* Name of the entity */ - const CHAR *ExternalID; /* External identifier for PUBLIC Entity */ - const CHAR *SystemID; /* URI for a SYSTEM or PUBLIC Entity */ - CHAR *content; /* The entity content or ndata if unparsed */ - CHAR *orig; /* The entity cont without ref substitution */ + const xmlChar *name; /* Name of the entity */ + const xmlChar *ExternalID; /* External identifier for PUBLIC Entity */ + const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */ + xmlChar *content; /* The entity content or ndata if unparsed */ + xmlChar *orig; /* The entity cont without ref substitution */ } xmlEntity; typedef xmlEntity *xmlEntityPtr; @@ -60,28 +60,28 @@ typedef xmlEntitiesTable *xmlEntitiesTablePtr; #include "parser.h" void xmlAddDocEntity (xmlDocPtr doc, - const CHAR *name, + const xmlChar *name, int type, - const CHAR *ExternalID, - const CHAR *SystemID, - const CHAR *content); + const xmlChar *ExternalID, + const xmlChar *SystemID, + const xmlChar *content); void xmlAddDtdEntity (xmlDocPtr doc, - const CHAR *name, + const xmlChar *name, int type, - const CHAR *ExternalID, - const CHAR *SystemID, - const CHAR *content); -xmlEntityPtr xmlGetPredefinedEntity (const CHAR *name); + const xmlChar *ExternalID, + const xmlChar *SystemID, + const xmlChar *content); +xmlEntityPtr xmlGetPredefinedEntity (const xmlChar *name); xmlEntityPtr xmlGetDocEntity (xmlDocPtr doc, - const CHAR *name); + const xmlChar *name); xmlEntityPtr xmlGetDtdEntity (xmlDocPtr doc, - const CHAR *name); + const xmlChar *name); xmlEntityPtr xmlGetParameterEntity (xmlDocPtr doc, - const CHAR *name); -const CHAR * xmlEncodeEntities (xmlDocPtr doc, - const CHAR *input); -CHAR * xmlEncodeEntitiesReentrant(xmlDocPtr doc, - const CHAR *input); + const xmlChar *name); +const xmlChar * xmlEncodeEntities (xmlDocPtr doc, + const xmlChar *input); +xmlChar * xmlEncodeEntitiesReentrant(xmlDocPtr doc, + const xmlChar *input); xmlEntitiesTablePtr xmlCreateEntitiesTable (void); xmlEntitiesTablePtr xmlCopyEntitiesTable (xmlEntitiesTablePtr table); void xmlFreeEntitiesTable (xmlEntitiesTablePtr table); diff --git a/include/libxml/parser.h b/include/libxml/parser.h index 06db1413..f5f96e92 100644 --- a/include/libxml/parser.h +++ b/include/libxml/parser.h @@ -31,18 +31,18 @@ extern "C" { * progressive reading and I18N conversions to the internal UTF-8 format. */ -typedef void (* xmlParserInputDeallocate)(CHAR *); +typedef void (* xmlParserInputDeallocate)(xmlChar *); typedef struct xmlParserInput { /* Input buffer */ xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */ const char *filename; /* The file analyzed, if any */ const char *directory; /* the directory/base of teh file */ - const CHAR *base; /* Base of the array to parse */ - const CHAR *cur; /* Current char being parsed */ + const xmlChar *base; /* Base of the array to parse */ + const xmlChar *cur; /* Current char being parsed */ int line; /* Current line */ int col; /* Current column */ - int consumed; /* How many CHARs were already consumed */ + int consumed; /* How many xmlChars were already consumed */ xmlParserInputDeallocate free; /* function to deallocate the base */ } xmlParserInput; typedef xmlParserInput *xmlParserInputPtr; @@ -107,8 +107,8 @@ typedef struct _xmlParserCtxt { xmlDocPtr myDoc; /* the document being built */ int wellFormed; /* is the document well formed */ int replaceEntities; /* shall we replace entities ? */ - const CHAR *version; /* the XML version string */ - const CHAR *encoding; /* encoding, if any */ + const xmlChar *version; /* the XML version string */ + const xmlChar *encoding; /* encoding, if any */ int standalone; /* standalone document */ int html; /* are we parsing an HTML document */ @@ -127,7 +127,7 @@ typedef struct _xmlParserCtxt { int record_info; /* Whether node info should be kept */ xmlParserNodeInfoSeq node_seq; /* info about each node parsed */ - int errno; /* error code */ + int errNo; /* error code */ int hasExternalSubset; /* reference and external subset */ int hasPErefs; /* the internal subset has PE refs */ @@ -149,8 +149,8 @@ typedef xmlParserCtxt *xmlParserCtxtPtr; * a SAX Locator. */ typedef struct xmlSAXLocator { - const CHAR *(*getPublicId)(void *ctx); - const CHAR *(*getSystemId)(void *ctx); + const xmlChar *(*getPublicId)(void *ctx); + const xmlChar *(*getSystemId)(void *ctx); int (*getLineNumber)(void *ctx); int (*getColumnNumber)(void *ctx); } _xmlSAXLocator; @@ -165,44 +165,44 @@ typedef xmlSAXLocator *xmlSAXLocatorPtr; #include "entities.h" typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx, - const CHAR *publicId, const CHAR *systemId); -typedef void (*internalSubsetSAXFunc) (void *ctx, const CHAR *name, - const CHAR *ExternalID, const CHAR *SystemID); + const xmlChar *publicId, const xmlChar *systemId); +typedef void (*internalSubsetSAXFunc) (void *ctx, const xmlChar *name, + const xmlChar *ExternalID, const xmlChar *SystemID); typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx, - const CHAR *name); + const xmlChar *name); typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx, - const CHAR *name); + const xmlChar *name); typedef void (*entityDeclSAXFunc) (void *ctx, - const CHAR *name, int type, const CHAR *publicId, - const CHAR *systemId, CHAR *content); -typedef void (*notationDeclSAXFunc)(void *ctx, const CHAR *name, - const CHAR *publicId, const CHAR *systemId); -typedef void (*attributeDeclSAXFunc)(void *ctx, const CHAR *elem, - const CHAR *name, int type, int def, - const CHAR *defaultValue, xmlEnumerationPtr tree); -typedef void (*elementDeclSAXFunc)(void *ctx, const CHAR *name, + const xmlChar *name, int type, const xmlChar *publicId, + const xmlChar *systemId, xmlChar *content); +typedef void (*notationDeclSAXFunc)(void *ctx, const xmlChar *name, + const xmlChar *publicId, const xmlChar *systemId); +typedef void (*attributeDeclSAXFunc)(void *ctx, const xmlChar *elem, + const xmlChar *name, int type, int def, + const xmlChar *defaultValue, xmlEnumerationPtr tree); +typedef void (*elementDeclSAXFunc)(void *ctx, const xmlChar *name, int type, xmlElementContentPtr content); typedef void (*unparsedEntityDeclSAXFunc)(void *ctx, - const CHAR *name, const CHAR *publicId, - const CHAR *systemId, const CHAR *notationName); + const xmlChar *name, const xmlChar *publicId, + const xmlChar *systemId, const xmlChar *notationName); typedef void (*setDocumentLocatorSAXFunc) (void *ctx, xmlSAXLocatorPtr loc); typedef void (*startDocumentSAXFunc) (void *ctx); typedef void (*endDocumentSAXFunc) (void *ctx); -typedef void (*startElementSAXFunc) (void *ctx, const CHAR *name, - const CHAR **atts); -typedef void (*endElementSAXFunc) (void *ctx, const CHAR *name); -typedef void (*attributeSAXFunc) (void *ctx, const CHAR *name, - const CHAR *value); -typedef void (*referenceSAXFunc) (void *ctx, const CHAR *name); -typedef void (*charactersSAXFunc) (void *ctx, const CHAR *ch, +typedef void (*startElementSAXFunc) (void *ctx, const xmlChar *name, + const xmlChar **atts); +typedef void (*endElementSAXFunc) (void *ctx, const xmlChar *name); +typedef void (*attributeSAXFunc) (void *ctx, const xmlChar *name, + const xmlChar *value); +typedef void (*referenceSAXFunc) (void *ctx, const xmlChar *name); +typedef void (*charactersSAXFunc) (void *ctx, const xmlChar *ch, int len); typedef void (*ignorableWhitespaceSAXFunc) (void *ctx, - const CHAR *ch, int len); + const xmlChar *ch, int len); typedef void (*processingInstructionSAXFunc) (void *ctx, - const CHAR *target, const CHAR *data); -typedef void (*commentSAXFunc) (void *ctx, const CHAR *value); -typedef void (*cdataBlockSAXFunc) (void *ctx, const CHAR *value, int len); + const xmlChar *target, const xmlChar *data); +typedef void (*commentSAXFunc) (void *ctx, const xmlChar *value); +typedef void (*cdataBlockSAXFunc) (void *ctx, const xmlChar *value, int len); typedef void (*warningSAXFunc) (void *ctx, const char *msg, ...); typedef void (*errorSAXFunc) (void *ctx, const char *msg, ...); typedef void (*fatalErrorSAXFunc) (void *ctx, const char *msg, ...); @@ -270,34 +270,34 @@ int xmlParserInputGrow (xmlParserInputPtr in, int len); /** - * CHAR handling + * xmlChar handling */ -CHAR * xmlStrdup (const CHAR *cur); -CHAR * xmlStrndup (const CHAR *cur, +xmlChar * xmlStrdup (const xmlChar *cur); +xmlChar * xmlStrndup (const xmlChar *cur, int len); -CHAR * xmlStrsub (const CHAR *str, +xmlChar * xmlStrsub (const xmlChar *str, int start, int len); -const CHAR * xmlStrchr (const CHAR *str, - CHAR val); -const CHAR * xmlStrstr (const CHAR *str, - CHAR *val); -int xmlStrcmp (const CHAR *str1, - const CHAR *str2); -int xmlStrncmp (const CHAR *str1, - const CHAR *str2, +const xmlChar * xmlStrchr (const xmlChar *str, + xmlChar val); +const xmlChar * xmlStrstr (const xmlChar *str, + xmlChar *val); +int xmlStrcmp (const xmlChar *str1, + const xmlChar *str2); +int xmlStrncmp (const xmlChar *str1, + const xmlChar *str2, int len); -int xmlStrlen (const CHAR *str); -CHAR * xmlStrcat (CHAR *cur, - const CHAR *add); -CHAR * xmlStrncat (CHAR *cur, - const CHAR *add, +int xmlStrlen (const xmlChar *str); +xmlChar * xmlStrcat (xmlChar *cur, + const xmlChar *add); +xmlChar * xmlStrncat (xmlChar *cur, + const xmlChar *add, int len); /** * Basic parsing Interfaces */ -xmlDocPtr xmlParseDoc (CHAR *cur); +xmlDocPtr xmlParseDoc (xmlChar *cur); xmlDocPtr xmlParseMemory (char *buffer, int size); xmlDocPtr xmlParseFile (const char *filename); @@ -306,7 +306,7 @@ int xmlSubstituteEntitiesDefault(int val); /** * Recovery mode */ -xmlDocPtr xmlRecoverDoc (CHAR *cur); +xmlDocPtr xmlRecoverDoc (xmlChar *cur); xmlDocPtr xmlRecoverMemory (char *buffer, int size); xmlDocPtr xmlRecoverFile (const char *filename); @@ -316,7 +316,7 @@ xmlDocPtr xmlRecoverFile (const char *filename); */ int xmlParseDocument (xmlParserCtxtPtr ctxt); xmlDocPtr xmlSAXParseDoc (xmlSAXHandlerPtr sax, - CHAR *cur, + xmlChar *cur, int recovery); xmlDocPtr xmlSAXParseMemory (xmlSAXHandlerPtr sax, char *buffer, @@ -325,15 +325,15 @@ xmlDocPtr xmlSAXParseMemory (xmlSAXHandlerPtr sax, xmlDocPtr xmlSAXParseFile (xmlSAXHandlerPtr sax, const char *filename, int recovery); -xmlDtdPtr xmlParseDTD (const CHAR *ExternalID, - const CHAR *SystemID); +xmlDtdPtr xmlParseDTD (const xmlChar *ExternalID, + const xmlChar *SystemID); xmlDtdPtr xmlSAXParseDTD (xmlSAXHandlerPtr sax, - const CHAR *ExternalID, - const CHAR *SystemID); + const xmlChar *ExternalID, + const xmlChar *SystemID); void xmlInitParserCtxt (xmlParserCtxtPtr ctxt); void xmlClearParserCtxt (xmlParserCtxtPtr ctxt); void xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt, - const CHAR* buffer, + const xmlChar* buffer, const char* filename); void xmlDefaultSAXHandlerInit(void); void htmlDefaultSAXHandlerInit(void); diff --git a/include/libxml/parserInternals.h b/include/libxml/parserInternals.h index cb289435..1ce25b07 100644 --- a/include/libxml/parserInternals.h +++ b/include/libxml/parserInternals.h @@ -511,7 +511,7 @@ typedef unsigned char CHARVAL; /** * Parser context */ -xmlParserCtxtPtr xmlCreateDocParserCtxt (CHAR *cur); +xmlParserCtxtPtr xmlCreateDocParserCtxt (xmlChar *cur); xmlParserCtxtPtr xmlCreateFileParserCtxt (const char *filename); xmlParserCtxtPtr xmlCreateMemoryParserCtxt(char *buffer, int size); @@ -533,7 +533,7 @@ xmlParserInputPtr xmlNewEntityInputStream (xmlParserCtxtPtr ctxt, xmlEntityPtr entity); void xmlPushInput (xmlParserCtxtPtr ctxt, xmlParserInputPtr input); -CHAR xmlPopInput (xmlParserCtxtPtr ctxt); +xmlChar xmlPopInput (xmlParserCtxtPtr ctxt); void xmlFreeInputStream (xmlParserInputPtr input); xmlParserInputPtr xmlNewInputFromFile (xmlParserCtxtPtr ctxt, const char *filename); @@ -541,38 +541,38 @@ xmlParserInputPtr xmlNewInputFromFile (xmlParserCtxtPtr ctxt, /** * Namespaces. */ -CHAR * xmlSplitQName (const CHAR *name, - CHAR **prefix); -CHAR * xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt); -CHAR * xmlNamespaceParseQName (xmlParserCtxtPtr ctxt, - CHAR **prefix); -CHAR * xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt); -CHAR * xmlParseQuotedString (xmlParserCtxtPtr ctxt); +xmlChar * xmlSplitQName (const xmlChar *name, + xmlChar **prefix); +xmlChar * xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt); +xmlChar * xmlNamespaceParseQName (xmlParserCtxtPtr ctxt, + xmlChar **prefix); +xmlChar * xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseQuotedString (xmlParserCtxtPtr ctxt); void xmlParseNamespace (xmlParserCtxtPtr ctxt); /** * Generic production rules */ -CHAR * xmlScanName (xmlParserCtxtPtr ctxt); -CHAR * xmlParseName (xmlParserCtxtPtr ctxt); -CHAR * xmlParseNmtoken (xmlParserCtxtPtr ctxt); -CHAR * xmlParseEntityValue (xmlParserCtxtPtr ctxt, - CHAR **orig); -CHAR * xmlParseAttValue (xmlParserCtxtPtr ctxt); -CHAR * xmlParseSystemLiteral (xmlParserCtxtPtr ctxt); -CHAR * xmlParsePubidLiteral (xmlParserCtxtPtr ctxt); +xmlChar * xmlScanName (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseName (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseNmtoken (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseEntityValue (xmlParserCtxtPtr ctxt, + xmlChar **orig); +xmlChar * xmlParseAttValue (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseSystemLiteral (xmlParserCtxtPtr ctxt); +xmlChar * xmlParsePubidLiteral (xmlParserCtxtPtr ctxt); void xmlParseCharData (xmlParserCtxtPtr ctxt, int cdata); -CHAR * xmlParseExternalID (xmlParserCtxtPtr ctxt, - CHAR **publicID, +xmlChar * xmlParseExternalID (xmlParserCtxtPtr ctxt, + xmlChar **publicID, int strict); void xmlParseComment (xmlParserCtxtPtr ctxt); -CHAR * xmlParsePITarget (xmlParserCtxtPtr ctxt); +xmlChar * xmlParsePITarget (xmlParserCtxtPtr ctxt); void xmlParsePI (xmlParserCtxtPtr ctxt); void xmlParseNotationDecl (xmlParserCtxtPtr ctxt); void xmlParseEntityDecl (xmlParserCtxtPtr ctxt); int xmlParseDefaultDecl (xmlParserCtxtPtr ctxt, - CHAR **value); + xmlChar **value); xmlEnumerationPtr xmlParseNotationType (xmlParserCtxtPtr ctxt); xmlEnumerationPtr xmlParseEnumerationType (xmlParserCtxtPtr ctxt); int xmlParseEnumeratedType (xmlParserCtxtPtr ctxt, @@ -585,7 +585,7 @@ xmlElementContentPtr xmlParseElementMixedContentDecl xmlElementContentPtr xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt); int xmlParseElementContentDecl(xmlParserCtxtPtr ctxt, - CHAR *name, + xmlChar *name, xmlElementContentPtr *result); int xmlParseElementDecl (xmlParserCtxtPtr ctxt); void xmlParseMarkupDecl (xmlParserCtxtPtr ctxt); @@ -594,24 +594,24 @@ xmlEntityPtr xmlParseEntityRef (xmlParserCtxtPtr ctxt); void xmlParseReference (xmlParserCtxtPtr ctxt); void xmlParsePEReference (xmlParserCtxtPtr ctxt); void xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt); -CHAR * xmlParseAttribute (xmlParserCtxtPtr ctxt, - CHAR **value); -CHAR * xmlParseStartTag (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseAttribute (xmlParserCtxtPtr ctxt, + xmlChar **value); +xmlChar * xmlParseStartTag (xmlParserCtxtPtr ctxt); void xmlParseEndTag (xmlParserCtxtPtr ctxt, - CHAR *tagname); + xmlChar *tagname); void xmlParseCDSect (xmlParserCtxtPtr ctxt); void xmlParseContent (xmlParserCtxtPtr ctxt); void xmlParseElement (xmlParserCtxtPtr ctxt); -CHAR * xmlParseVersionNum (xmlParserCtxtPtr ctxt); -CHAR * xmlParseVersionInfo (xmlParserCtxtPtr ctxt); -CHAR * xmlParseEncName (xmlParserCtxtPtr ctxt); -CHAR * xmlParseEncodingDecl (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseVersionNum (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseVersionInfo (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseEncName (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseEncodingDecl (xmlParserCtxtPtr ctxt); int xmlParseSDDecl (xmlParserCtxtPtr ctxt); void xmlParseXMLDecl (xmlParserCtxtPtr ctxt); void xmlParseMisc (xmlParserCtxtPtr ctxt); void xmlParseExternalSubset (xmlParserCtxtPtr ctxt, - const CHAR *ExternalID, - const CHAR *SystemID); + const xmlChar *ExternalID, + const xmlChar *SystemID); /* * Entities substitution */ @@ -620,12 +620,12 @@ void xmlParseExternalSubset (xmlParserCtxtPtr ctxt, #define XML_SUBSTITUTE_PEREF 2 #define XML_SUBSTITUTE_BOTH 3 -CHAR * xmlDecodeEntities (xmlParserCtxtPtr ctxt, +xmlChar * xmlDecodeEntities (xmlParserCtxtPtr ctxt, int len, int what, - CHAR end, - CHAR end2, - CHAR end3); + xmlChar end, + xmlChar end2, + xmlChar end3); /* * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP diff --git a/include/libxml/tree.h b/include/libxml/tree.h index bf8a77ed..bd29083e 100644 --- a/include/libxml/tree.h +++ b/include/libxml/tree.h @@ -44,25 +44,32 @@ typedef enum { * Currently we use 8bit chars internal representation for memory efficiency, * but the parser is not tied to that, just define UNICODE to switch to * a 16 bits internal representation. Note that with 8 bits wide - * CHARs one can still use UTF-8 to handle correctly non ISO-Latin + * xmlChars one can still use UTF-8 to handle correctly non ISO-Latin * input. */ + #ifdef UNICODE -typedef unsigned short CHAR; +typedef unsigned short xmlChar; #else -typedef unsigned char CHAR; +typedef unsigned char xmlChar; #endif -#define BAD_CAST (CHAR *) +#ifndef WIN32 +#ifndef CHAR +#define CHAR xmlChar +#endif +#endif + +#define BAD_CAST (xmlChar *) /* * a DTD Notation definition */ typedef struct xmlNotation { - const CHAR *name; /* Notation name */ - const CHAR *PublicID; /* Public identifier, if any */ - const CHAR *SystemID; /* System identifier, if any */ + const xmlChar *name; /* Notation name */ + const xmlChar *PublicID; /* Public identifier, if any */ + const xmlChar *SystemID; /* System identifier, if any */ } xmlNotation; typedef xmlNotation *xmlNotationPtr; @@ -92,17 +99,17 @@ typedef enum { typedef struct xmlEnumeration { struct xmlEnumeration *next; /* next one */ - const CHAR *name; /* Enumeration name */ + const xmlChar *name; /* Enumeration name */ } xmlEnumeration; typedef xmlEnumeration *xmlEnumerationPtr; typedef struct xmlAttribute { - const CHAR *elem; /* Element holding the attribute */ - const CHAR *name; /* Attribute name */ + const xmlChar *elem; /* Element holding the attribute */ + const xmlChar *name; /* Attribute name */ struct xmlAttribute *next; /* list of attributes of an element */ xmlAttributeType type; /* The type */ xmlAttributeDefault def; /* the default */ - const CHAR *defaultValue;/* or the default value */ + const xmlChar *defaultValue;/* or the default value */ xmlEnumerationPtr tree; /* or the enumeration tree if any */ } xmlAttribute; typedef xmlAttribute *xmlAttributePtr; @@ -127,7 +134,7 @@ typedef enum { typedef struct xmlElementContent { xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */ xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */ - const CHAR *name; /* Element name */ + const xmlChar *name; /* Element name */ struct xmlElementContent *c1; /* first child */ struct xmlElementContent *c2; /* second child */ } xmlElementContent; @@ -141,7 +148,7 @@ typedef enum { } xmlElementTypeVal; typedef struct xmlElement { - const CHAR *name; /* Element name */ + const xmlChar *name; /* Element name */ xmlElementTypeVal type; /* The type */ xmlElementContentPtr content; /* the allowed element content */ xmlAttributePtr attributes; /* List of the declared attributes */ @@ -162,8 +169,8 @@ typedef enum { typedef struct xmlNs { struct xmlNs *next; /* next Ns link for this node */ xmlNsType type; /* global or local */ - const CHAR *href; /* URL for the namespace */ - const CHAR *prefix; /* prefix for the namespace */ + const xmlChar *href; /* URL for the namespace */ + const xmlChar *prefix; /* prefix for the namespace */ } xmlNs; typedef xmlNs *xmlNsPtr; @@ -171,9 +178,9 @@ typedef xmlNs *xmlNsPtr; * An XML DtD, as defined by node link */ struct xmlAttr *next; /* attribute list link */ - const CHAR *name; /* the name of the property */ + const xmlChar *name; /* the name of the property */ struct xmlNode *val; /* the value of the property */ xmlNs *ns; /* pointer to the associated namespace */ } xmlAttr; @@ -205,7 +212,7 @@ typedef xmlAttr *xmlAttrPtr; typedef struct xmlID { struct xmlID *next; /* next ID */ - const CHAR *value; /* The ID name */ + const xmlChar *value; /* The ID name */ xmlAttrPtr attr; /* The attribut holding it */ } xmlID; typedef xmlID *xmlIDPtr; @@ -216,7 +223,7 @@ typedef xmlID *xmlIDPtr; typedef struct xmlRef { struct xmlRef *next; /* next Ref */ - const CHAR *value; /* The Ref name */ + const xmlChar *value; /* The Ref name */ xmlAttrPtr attr; /* The attribut holding it */ } xmlRef; typedef xmlRef *xmlRefPtr; @@ -237,10 +244,10 @@ typedef struct xmlNode { struct xmlNode *childs; /* parent->childs link */ struct xmlNode *last; /* last child link */ struct xmlAttr *properties; /* properties list */ - const CHAR *name; /* the name of the node, or the entity */ + const xmlChar *name; /* the name of the node, or the entity */ xmlNs *ns; /* pointer to the associated namespace */ xmlNs *nsDef; /* namespace definitions on this node */ - CHAR *content; /* the content */ + xmlChar *content; /* the content */ } _xmlNode; typedef _xmlNode xmlNode; typedef _xmlNode *xmlNodePtr; @@ -255,8 +262,8 @@ typedef struct xmlDoc { #endif xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */ char *name; /* name/filename/URI of the document */ - const CHAR *version; /* the XML version string */ - const CHAR *encoding; /* encoding, if any */ + const xmlChar *version; /* the XML version string */ + const xmlChar *encoding; /* encoding, if any */ int compression;/* level of zlib compression */ int standalone; /* standalone document (no external refs) */ struct xmlDtd *intSubset; /* the document internal subset */ @@ -274,7 +281,7 @@ typedef xmlDoc *xmlDocPtr; */ typedef struct xmlBuffer { - CHAR *content; /* The buffer content UTF8 */ + xmlChar *content; /* The buffer content UTF8 */ unsigned int use; /* The buffer size used */ unsigned int size; /* The buffer size */ } _xmlBuffer; @@ -297,10 +304,10 @@ void xmlBufferFree (xmlBufferPtr buf); int xmlBufferDump (FILE *file, xmlBufferPtr buf); void xmlBufferAdd (xmlBufferPtr buf, - const CHAR *str, + const xmlChar *str, int len); void xmlBufferCat (xmlBufferPtr buf, - const CHAR *str); + const xmlChar *str); void xmlBufferCCat (xmlBufferPtr buf, const char *str); int xmlBufferShrink (xmlBufferPtr buf, @@ -311,33 +318,33 @@ void xmlBufferEmpty (xmlBufferPtr buf); * Creating/freeing new structures */ xmlDtdPtr xmlCreateIntSubset (xmlDocPtr doc, - const CHAR *name, - const CHAR *ExternalID, - const CHAR *SystemID); + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); xmlDtdPtr xmlNewDtd (xmlDocPtr doc, - const CHAR *name, - const CHAR *ExternalID, - const CHAR *SystemID); + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); void xmlFreeDtd (xmlDtdPtr cur); xmlNsPtr xmlNewGlobalNs (xmlDocPtr doc, - const CHAR *href, - const CHAR *prefix); + const xmlChar *href, + const xmlChar *prefix); xmlNsPtr xmlNewNs (xmlNodePtr node, - const CHAR *href, - const CHAR *prefix); + const xmlChar *href, + const xmlChar *prefix); void xmlFreeNs (xmlNsPtr cur); -xmlDocPtr xmlNewDoc (const CHAR *version); +xmlDocPtr xmlNewDoc (const xmlChar *version); void xmlFreeDoc (xmlDocPtr cur); xmlAttrPtr xmlNewDocProp (xmlDocPtr doc, - const CHAR *name, - const CHAR *value); + const xmlChar *name, + const xmlChar *value); xmlAttrPtr xmlNewProp (xmlNodePtr node, - const CHAR *name, - const CHAR *value); + const xmlChar *name, + const xmlChar *value); xmlAttrPtr xmlNewNsProp (xmlNodePtr node, xmlNsPtr ns, - const CHAR *name, - const CHAR *value); + const xmlChar *name, + const xmlChar *value); void xmlFreePropList (xmlAttrPtr cur); void xmlFreeProp (xmlAttrPtr cur); xmlAttrPtr xmlCopyProp (xmlNodePtr target, @@ -353,32 +360,32 @@ xmlDocPtr xmlCopyDoc (xmlDocPtr doc, */ xmlNodePtr xmlNewDocNode (xmlDocPtr doc, xmlNsPtr ns, - const CHAR *name, - const CHAR *content); + const xmlChar *name, + const xmlChar *content); xmlNodePtr xmlNewNode (xmlNsPtr ns, - const CHAR *name); + const xmlChar *name); xmlNodePtr xmlNewChild (xmlNodePtr parent, xmlNsPtr ns, - const CHAR *name, - const CHAR *content); + const xmlChar *name, + const xmlChar *content); xmlNodePtr xmlNewDocText (xmlDocPtr doc, - const CHAR *content); -xmlNodePtr xmlNewText (const CHAR *content); -xmlNodePtr xmlNewPI (const CHAR *name, - const CHAR *content); + const xmlChar *content); +xmlNodePtr xmlNewText (const xmlChar *content); +xmlNodePtr xmlNewPI (const xmlChar *name, + const xmlChar *content); xmlNodePtr xmlNewDocTextLen (xmlDocPtr doc, - const CHAR *content, + const xmlChar *content, int len); -xmlNodePtr xmlNewTextLen (const CHAR *content, +xmlNodePtr xmlNewTextLen (const xmlChar *content, int len); xmlNodePtr xmlNewDocComment (xmlDocPtr doc, - const CHAR *content); -xmlNodePtr xmlNewComment (const CHAR *content); + const xmlChar *content); +xmlNodePtr xmlNewComment (const xmlChar *content); xmlNodePtr xmlNewCDataBlock (xmlDocPtr doc, - const CHAR *content, + const xmlChar *content, int len); xmlNodePtr xmlNewReference (xmlDocPtr doc, - const CHAR *name); + const xmlChar *name); xmlNodePtr xmlCopyNode (xmlNodePtr node, int recursive); xmlNodePtr xmlCopyNodeList (xmlNodePtr node); @@ -400,7 +407,7 @@ void xmlUnlinkNode (xmlNodePtr cur); xmlNodePtr xmlTextMerge (xmlNodePtr first, xmlNodePtr second); void xmlTextConcat (xmlNodePtr node, - const CHAR *content, + const xmlChar *content, int len); void xmlFreeNodeList (xmlNodePtr cur); void xmlFreeNode (xmlNodePtr cur); @@ -410,10 +417,10 @@ void xmlFreeNode (xmlNodePtr cur); */ xmlNsPtr xmlSearchNs (xmlDocPtr doc, xmlNodePtr node, - const CHAR *nameSpace); + const xmlChar *nameSpace); xmlNsPtr xmlSearchNsByHref (xmlDocPtr doc, xmlNodePtr node, - const CHAR *href); + const xmlChar *href); xmlNsPtr * xmlGetNsList (xmlDocPtr doc, xmlNodePtr node); void xmlSetNs (xmlNodePtr node, @@ -425,32 +432,32 @@ xmlNsPtr xmlCopyNamespaceList (xmlNsPtr cur); * Changing the content. */ xmlAttrPtr xmlSetProp (xmlNodePtr node, - const CHAR *name, - const CHAR *value); -CHAR * xmlGetProp (xmlNodePtr node, - const CHAR *name); + const xmlChar *name, + const xmlChar *value); +xmlChar * xmlGetProp (xmlNodePtr node, + const xmlChar *name); xmlNodePtr xmlStringGetNodeList (xmlDocPtr doc, - const CHAR *value); + const xmlChar *value); xmlNodePtr xmlStringLenGetNodeList (xmlDocPtr doc, - const CHAR *value, + const xmlChar *value, int len); -CHAR * xmlNodeListGetString (xmlDocPtr doc, +xmlChar * xmlNodeListGetString (xmlDocPtr doc, xmlNodePtr list, int inLine); void xmlNodeSetContent (xmlNodePtr cur, - const CHAR *content); + const xmlChar *content); void xmlNodeSetContentLen (xmlNodePtr cur, - const CHAR *content, + const xmlChar *content, int len); void xmlNodeAddContent (xmlNodePtr cur, - const CHAR *content); + const xmlChar *content); void xmlNodeAddContentLen (xmlNodePtr cur, - const CHAR *content, + const xmlChar *content, int len); -CHAR * xmlNodeGetContent (xmlNodePtr cur); -const CHAR * xmlNodeGetLang (xmlNodePtr cur); +xmlChar * xmlNodeGetContent (xmlNodePtr cur); +const xmlChar * xmlNodeGetLang (xmlNodePtr cur); void xmlNodeSetLang (xmlNodePtr cur, - const CHAR *lang); + const xmlChar *lang); /* * Removing content. @@ -462,17 +469,17 @@ int xmlRemoveNode (xmlNodePtr node); /* TODO */ * Internal, don't use */ void xmlBufferWriteCHAR (xmlBufferPtr buf, - const CHAR *string); + const xmlChar *string); void xmlBufferWriteChar (xmlBufferPtr buf, const char *string); void xmlBufferWriteQuotedString(xmlBufferPtr buf, - const CHAR *string); + const xmlChar *string); /* * Saving */ void xmlDocDumpMemory (xmlDocPtr cur, - CHAR**mem, + xmlChar**mem, int *size); void xmlDocDump (FILE *f, xmlDocPtr cur); diff --git a/include/libxml/valid.h b/include/libxml/valid.h index 22a2c27c..30a2a32f 100644 --- a/include/libxml/valid.h +++ b/include/libxml/valid.h @@ -105,16 +105,16 @@ typedef xmlRefTable *xmlRefTablePtr; /* Notation */ xmlNotationPtr xmlAddNotationDecl (xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, - const CHAR *name, - const CHAR *PublicID, - const CHAR *SystemID); + const xmlChar *name, + const xmlChar *PublicID, + const xmlChar *SystemID); xmlNotationTablePtr xmlCopyNotationTable(xmlNotationTablePtr table); void xmlFreeNotationTable(xmlNotationTablePtr table); void xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table); /* Element Content */ -xmlElementContentPtr xmlNewElementContent (CHAR *name, +xmlElementContentPtr xmlNewElementContent (xmlChar *name, xmlElementContentType type); xmlElementContentPtr xmlCopyElementContent(xmlElementContentPtr content); void xmlFreeElementContent(xmlElementContentPtr cur); @@ -122,7 +122,7 @@ void xmlFreeElementContent(xmlElementContentPtr cur); /* Element */ xmlElementPtr xmlAddElementDecl (xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, - const CHAR *name, + const xmlChar *name, xmlElementContentType type, xmlElementContentPtr content); xmlElementTablePtr xmlCopyElementTable (xmlElementTablePtr table); @@ -131,18 +131,18 @@ void xmlDumpElementTable (xmlBufferPtr buf, xmlElementTablePtr table); /* Enumeration */ -xmlEnumerationPtr xmlCreateEnumeration (CHAR *name); +xmlEnumerationPtr xmlCreateEnumeration (xmlChar *name); void xmlFreeEnumeration (xmlEnumerationPtr cur); xmlEnumerationPtr xmlCopyEnumeration (xmlEnumerationPtr cur); /* Attribute */ xmlAttributePtr xmlAddAttributeDecl (xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, - const CHAR *elem, - const CHAR *name, + const xmlChar *elem, + const xmlChar *name, xmlAttributeType type, xmlAttributeDefault def, - const CHAR *defaultValue, + const xmlChar *defaultValue, xmlEnumerationPtr tree); xmlAttributeTablePtr xmlCopyAttributeTable (xmlAttributeTablePtr table); void xmlFreeAttributeTable (xmlAttributeTablePtr table); @@ -152,12 +152,12 @@ void xmlDumpAttributeTable (xmlBufferPtr buf, /* IDs */ xmlIDPtr xmlAddID (xmlValidCtxtPtr ctxt, xmlDocPtr doc, - const CHAR *value, + const xmlChar *value, xmlAttrPtr attr); xmlIDTablePtr xmlCopyIDTable (xmlIDTablePtr table); void xmlFreeIDTable (xmlIDTablePtr table); xmlAttrPtr xmlGetID (xmlDocPtr doc, - const CHAR *ID); + const xmlChar *ID); int xmlIsID (xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr); @@ -165,7 +165,7 @@ int xmlIsID (xmlDocPtr doc, /* IDREFs */ xmlRefPtr xmlAddRef (xmlValidCtxtPtr ctxt, xmlDocPtr doc, - const CHAR *value, + const xmlChar *value, xmlAttrPtr attr); xmlRefTablePtr xmlCopyRefTable (xmlRefTablePtr table); void xmlFreeRefTable (xmlRefTablePtr table); @@ -186,7 +186,7 @@ int xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlAttributePtr attr); int xmlValidateAttributeValue(xmlAttributeType type, - const CHAR *value); + const xmlChar *value); int xmlValidateNotationDecl (xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNotationPtr nota); @@ -205,21 +205,21 @@ int xmlValidateOneAttribute (xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr, - const CHAR *value); + const xmlChar *value); int xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt, xmlDocPtr doc); int xmlValidateNotationUse (xmlValidCtxtPtr ctxt, xmlDocPtr doc, - const CHAR *notationName); + const xmlChar *notationName); int xmlIsMixedElement (xmlDocPtr doc, - const CHAR *name); + const xmlChar *name); xmlAttributePtr xmlGetDtdAttrDesc (xmlDtdPtr dtd, - const CHAR *elem, - const CHAR *name); + const xmlChar *elem, + const xmlChar *name); xmlNotationPtr xmlGetDtdNotationDesc (xmlDtdPtr dtd, - const CHAR *name); + const xmlChar *name); xmlElementPtr xmlGetDtdElementDesc (xmlDtdPtr dtd, - const CHAR *name); + const xmlChar *name); #ifdef __cplusplus } diff --git a/include/libxml/xpath.h b/include/libxml/xpath.h index d46c0633..9a082ced 100644 --- a/include/libxml/xpath.h +++ b/include/libxml/xpath.h @@ -46,7 +46,7 @@ typedef struct xmlXPathObject { xmlNodeSetPtr nodesetval; int boolval; double floatval; - CHAR *stringval; + xmlChar *stringval; void *user; } xmlXPathObject, *xmlXPathObjectPtr; @@ -61,7 +61,7 @@ typedef int (*xmlXPathConvertFunc) (xmlXPathObjectPtr obj, int type); */ typedef struct xmlXPathType { - const CHAR *name; /* the type name */ + const xmlChar *name; /* the type name */ xmlXPathConvertFunc func; /* the conversion function */ } xmlXPathType, *xmlXPathTypePtr; @@ -70,7 +70,7 @@ typedef struct xmlXPathType { */ typedef struct xmlXPathVariable { - const CHAR *name; /* the variable name */ + const xmlChar *name; /* the variable name */ xmlXPathObjectPtr value; /* the value */ } xmlXPathVariable, *xmlXPathVariablePtr; @@ -85,7 +85,7 @@ typedef void (*xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt, int nargs); */ typedef struct xmlXPathFunct { - const CHAR *name; /* the function name */ + const xmlChar *name; /* the function name */ xmlXPathEvalFunc func; /* the evaluation function */ } xmlXPathFunc, *xmlXPathFuncPtr; @@ -103,7 +103,7 @@ typedef xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr ctxt, */ typedef struct xmlXPathAxis { - const CHAR *name; /* the axis name */ + const xmlChar *name; /* the axis name */ xmlXPathAxisFunc func; /* the search function */ } xmlXPathAxis, *xmlXPathAxisPtr; @@ -149,8 +149,8 @@ typedef struct xmlXPathContext { * an xmlXPathContext, and the stack of objects. */ typedef struct xmlXPathParserContext { - const CHAR *cur; /* the current char being parsed */ - const CHAR *base; /* the full expression */ + const xmlChar *cur; /* the current char being parsed */ + const xmlChar *base; /* the full expression */ int error; /* error code */ @@ -179,16 +179,16 @@ typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs); * Registering extensions to the expression language */ /* TODO */ int xmlXPathRegisterType (xmlXPathContextPtr ctxt, - const CHAR *name, + const xmlChar *name, xmlXPathConvertFunc f); /* TODO */ int xmlXPathRegisterAxis (xmlXPathContextPtr ctxt, - const CHAR *name, + const xmlChar *name, xmlXPathAxisFunc f); /* TODO */ int xmlXPathRegisterFunc (xmlXPathContextPtr ctxt, - const CHAR *name, + const xmlChar *name, xmlXPathFunction f); /* TODO */ int xmlXPathRegisterVariable (xmlXPathContextPtr ctxt, - const CHAR *name, + const xmlChar *name, xmlXPathObject value); /** @@ -196,10 +196,10 @@ typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs); */ xmlXPathContextPtr xmlXPathNewContext (xmlDocPtr doc); void xmlXPathFreeContext (xmlXPathContextPtr ctxt); -xmlXPathObjectPtr xmlXPathEval (const CHAR *str, +xmlXPathObjectPtr xmlXPathEval (const xmlChar *str, xmlXPathContextPtr ctxt); void xmlXPathFreeObject (xmlXPathObjectPtr obj); -xmlXPathObjectPtr xmlXPathEvalExpression (const CHAR *str, +xmlXPathObjectPtr xmlXPathEvalExpression (const xmlChar *str, xmlXPathContextPtr ctxt); #endif /* ! __XML_XPATH_H__ */ diff --git a/libxml.spec.in b/libxml.spec.in index b2fac0e1..810362bb 100644 --- a/libxml.spec.in +++ b/libxml.spec.in @@ -32,6 +32,13 @@ Libraries, include files, etc you can use to develop libxml applications. %changelog +* Thu Sep 23 1999 Daniel Veillard + +- corrected the spec file alpha stuff +- switched to version 1.7.1 +- Added validation, XPath, nanohttp, removed memory leaks +- Renamed CHAR to xmlChar + * Wed Jun 2 1999 Daniel Veillard - Switched to version 1.1: SAX extensions, better entities support, lots of @@ -52,15 +59,13 @@ Libraries, include files, etc you can use to develop libxml applications. # Needed for snapshot releases. if [ ! -f configure ]; then %ifarch alpha - CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --host=alpha-redhat-linux --prefix=%prefi -x --sysconfdir="/etc" + CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --host=alpha-redhat-linux --prefix=%prefix --sysconfdir="/etc" %else CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%prefix --sysconfdir="/etc" %endif else %ifarch alpha - CFLAGS="$RPM_OPT_FLAGS" ./configure --host=alpha-redhat-linux --prefix=%prefix - --sysconfdir="/etc" + CFLAGS="$RPM_OPT_FLAGS" ./configure --host=alpha-redhat-linux --prefix=%prefix --sysconfdir="/etc" %else CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix --sysconfdir="/etc" %endif diff --git a/parser.c b/parser.c index e01f162d..659af3fc 100644 --- a/parser.c +++ b/parser.c @@ -90,7 +90,7 @@ void check_buffer(xmlParserInputPtr in) { * This function refresh the input for the parser. It doesn't try to * preserve pointers to the input buffer, and discard already read data * - * Returns the number of CHARs read, or -1 in case of error, 0 indicate the + * Returns the number of xmlChars read, or -1 in case of error, 0 indicate the * end of this entity */ int @@ -138,7 +138,7 @@ xmlParserInputRead(xmlParserInputPtr in, int len) { * This function increase the input for the parser. It tries to * preserve pointers to the input buffer, and keep already read data * - * Returns the number of CHARs read, or -1 in case of error, 0 indicate the + * Returns the number of xmlChars read, or -1 in case of error, 0 indicate the * end of this entity */ int @@ -277,15 +277,15 @@ PUSH_AND_POP(xmlNodePtr, node) * * Dirty macros, i.e. one need to make assumption on the context to use them * - * CUR_PTR return the current pointer to the CHAR to be parsed. - * CUR returns the current CHAR value, i.e. a 8 bit value if compiled + * CUR_PTR return the current pointer to the xmlChar to be parsed. + * CUR returns the current xmlChar value, i.e. a 8 bit value if compiled * in ISO-Latin or UTF-8, and the current 16 bit value if compiled * in UNICODE mode. This should be used internally by the parser * only to compare to ASCII values otherwise it would break when * running with UTF-8 encoding. - * NXT(n) returns the n'th next CHAR. Same as CUR is should be used only + * NXT(n) returns the n'th next xmlChar. Same as CUR is should be used only * to compare on ASCII based substring. - * SKIP(n) Skip n CHAR, and must also be used only to skip ASCII defined + * SKIP(n) Skip n xmlChar, and must also be used only to skip ASCII defined * strings within the parser. * * Clean macros, not dependent of an ASCII context, expect UTF-8 encoding @@ -351,9 +351,9 @@ PUSH_AND_POP(xmlNodePtr, node) * xmlPopInput: the current input pointed by ctxt->input came to an end * pop it and return the next char. * - * Returns the current CHAR in the parser context + * Returns the current xmlChar in the parser context */ -CHAR +xmlChar xmlPopInput(xmlParserCtxtPtr ctxt) { if (ctxt->inputNr == 1) return(0); /* End of main Input */ xmlFreeInputStream(inputPop(ctxt)); @@ -390,7 +390,7 @@ xmlFreeInputStream(xmlParserInputPtr input) { if (input->filename != NULL) xmlFree((char *) input->filename); if (input->directory != NULL) xmlFree((char *) input->directory); if ((input->free != NULL) && (input->base != NULL)) - input->free((CHAR *) input->base); + input->free((xmlChar *) input->base); if (input->buf != NULL) xmlFreeParserInputBuffer(input->buf); memset(input, -1, sizeof(xmlParserInput)); @@ -410,11 +410,11 @@ xmlNewInputStream(xmlParserCtxtPtr ctxt) { input = (xmlParserInputPtr) xmlMalloc(sizeof(xmlParserInput)); if (input == NULL) { - ctxt->errno = XML_ERR_NO_MEMORY; + ctxt->errNo = XML_ERR_NO_MEMORY; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "malloc: couldn't allocate a new input stream\n"); - ctxt->errno = XML_ERR_NO_MEMORY; + ctxt->errNo = XML_ERR_NO_MEMORY; return(NULL); } input->filename = NULL; @@ -444,17 +444,17 @@ xmlNewEntityInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) { xmlParserInputPtr input; if (entity == NULL) { - ctxt->errno = XML_ERR_INTERNAL_ERROR; + ctxt->errNo = XML_ERR_INTERNAL_ERROR; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "internal: xmlNewEntityInputStream entity = NULL\n"); - ctxt->errno = XML_ERR_INTERNAL_ERROR; + ctxt->errNo = XML_ERR_INTERNAL_ERROR; return(NULL); } if (entity->content == NULL) { switch (entity->type) { case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY: - ctxt->errno = XML_ERR_UNPARSED_ENTITY; + ctxt->errNo = XML_ERR_UNPARSED_ENTITY; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlNewEntityInputStream unparsed entity !\n"); @@ -469,13 +469,13 @@ xmlNewEntityInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) { "Internal entity %s without content !\n", entity->name); break; case XML_INTERNAL_PARAMETER_ENTITY: - ctxt->errno = XML_ERR_INTERNAL_ERROR; + ctxt->errNo = XML_ERR_INTERNAL_ERROR; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Internal parameter entity %s without content !\n", entity->name); break; case XML_INTERNAL_PREDEFINED_ENTITY: - ctxt->errno = XML_ERR_INTERNAL_ERROR; + ctxt->errNo = XML_ERR_INTERNAL_ERROR; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Predefined entity %s without content !\n", entity->name); @@ -487,7 +487,7 @@ xmlNewEntityInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) { if (input == NULL) { return(NULL); } - input->filename = (char *) entity->SystemID; /* TODO !!! char <- CHAR */ + input->filename = (char *) entity->SystemID; /* TODO !!! char <- xmlChar */ input->base = entity->content; input->cur = entity->content; return(input); @@ -502,11 +502,11 @@ xmlNewEntityInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) { * Returns the new input stream */ xmlParserInputPtr -xmlNewStringInputStream(xmlParserCtxtPtr ctxt, const CHAR *buffer) { +xmlNewStringInputStream(xmlParserCtxtPtr ctxt, const xmlChar *buffer) { xmlParserInputPtr input; if (buffer == NULL) { - ctxt->errno = XML_ERR_INTERNAL_ERROR; + ctxt->errNo = XML_ERR_INTERNAL_ERROR; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "internal: xmlNewStringInputStream string = NULL\n"); @@ -759,7 +759,7 @@ xmlParseCharRef(xmlParserCtxtPtr ctxt) { else if ((CUR >= 'A') && (CUR <= 'F')) val = val * 16 + (CUR - 'A') + 10; else { - ctxt->errno = XML_ERR_INVALID_HEX_CHARREF; + ctxt->errNo = XML_ERR_INVALID_HEX_CHARREF; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlParseCharRef: invalid hexadecimal value\n"); @@ -777,7 +777,7 @@ xmlParseCharRef(xmlParserCtxtPtr ctxt) { if ((CUR >= '0') && (CUR <= '9')) val = val * 10 + (CUR - '0'); else { - ctxt->errno = XML_ERR_INVALID_DEC_CHARREF; + ctxt->errNo = XML_ERR_INVALID_DEC_CHARREF; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlParseCharRef: invalid decimal value\n"); @@ -790,7 +790,7 @@ xmlParseCharRef(xmlParserCtxtPtr ctxt) { if (CUR == ';') NEXT; } else { - ctxt->errno = XML_ERR_INVALID_CHARREF; + ctxt->errNo = XML_ERR_INVALID_CHARREF; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlParseCharRef: invalid value\n"); @@ -805,9 +805,9 @@ xmlParseCharRef(xmlParserCtxtPtr ctxt) { if (IS_CHAR(val)) { return(val); } else { - ctxt->errno = XML_ERR_INVALID_CHAR; + ctxt->errNo = XML_ERR_INVALID_CHAR; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) - ctxt->sax->error(ctxt->userData, "CharRef: invalid CHAR value %d\n", + ctxt->sax->error(ctxt->userData, "CharRef: invalid xmlChar value %d\n", val); ctxt->wellFormed = 0; } @@ -840,7 +840,7 @@ xmlParseCharRef(xmlParserCtxtPtr ctxt) { void xmlParserHandleReference(xmlParserCtxtPtr ctxt) { xmlParserInputPtr input; - CHAR *name; + xmlChar *name; xmlEntityPtr ent = NULL; if (ctxt->token != 0) return; @@ -853,25 +853,25 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { case XML_PARSER_COMMENT: return; case XML_PARSER_EOF: - ctxt->errno = XML_ERR_CHARREF_AT_EOF; + ctxt->errNo = XML_ERR_CHARREF_AT_EOF; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "CharRef at EOF\n"); ctxt->wellFormed = 0; return; case XML_PARSER_PROLOG: - ctxt->errno = XML_ERR_CHARREF_IN_PROLOG; + ctxt->errNo = XML_ERR_CHARREF_IN_PROLOG; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "CharRef in prolog!\n"); ctxt->wellFormed = 0; return; case XML_PARSER_EPILOG: - ctxt->errno = XML_ERR_CHARREF_IN_EPILOG; + ctxt->errNo = XML_ERR_CHARREF_IN_EPILOG; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "CharRef in epilog!\n"); ctxt->wellFormed = 0; return; case XML_PARSER_DTD: - ctxt->errno = XML_ERR_CHARREF_IN_DTD; + ctxt->errNo = XML_ERR_CHARREF_IN_DTD; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "CharRef are forbiden in DTDs!\n"); @@ -904,19 +904,19 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { case XML_PARSER_COMMENT: return; case XML_PARSER_EOF: - ctxt->errno = XML_ERR_ENTITYREF_AT_EOF; + ctxt->errNo = XML_ERR_ENTITYREF_AT_EOF; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Reference at EOF\n"); ctxt->wellFormed = 0; return; case XML_PARSER_PROLOG: - ctxt->errno = XML_ERR_ENTITYREF_IN_PROLOG; + ctxt->errNo = XML_ERR_ENTITYREF_IN_PROLOG; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Reference in prolog!\n"); ctxt->wellFormed = 0; return; case XML_PARSER_EPILOG: - ctxt->errno = XML_ERR_ENTITYREF_IN_EPILOG; + ctxt->errNo = XML_ERR_ENTITYREF_IN_EPILOG; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Reference in epilog!\n"); ctxt->wellFormed = 0; @@ -947,7 +947,7 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { */ return; case XML_PARSER_DTD: - ctxt->errno = XML_ERR_ENTITYREF_IN_DTD; + ctxt->errNo = XML_ERR_ENTITYREF_IN_DTD; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Entity references are forbiden in DTDs!\n"); @@ -960,7 +960,7 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { NEXT; name = xmlScanName(ctxt); if (name == NULL) { - ctxt->errno = XML_ERR_ENTITYREF_NO_NAME; + ctxt->errNo = XML_ERR_ENTITYREF_NO_NAME; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Entity reference: no name\n"); ctxt->wellFormed = 0; @@ -968,7 +968,7 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { return; } if (NXT(xmlStrlen(name)) != ';') { - ctxt->errno = XML_ERR_ENTITYREF_SEMICOL_MISSING; + ctxt->errNo = XML_ERR_ENTITYREF_SEMICOL_MISSING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Entity reference: ';' expected\n"); @@ -992,7 +992,7 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { if (ent == NULL) ent = xmlGetPredefinedEntity(name); if (ent == NULL) { - ctxt->errno = XML_ERR_UNDECLARED_ENTITY; + ctxt->errNo = XML_ERR_UNDECLARED_ENTITY; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Entity reference: entity %s not declared\n", @@ -1007,7 +1007,7 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { * An entity reference must not contain the name of an unparsed entity */ if (ent->type == XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) { - ctxt->errno = XML_ERR_UNPARSED_ENTITY; + ctxt->errNo = XML_ERR_UNPARSED_ENTITY; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Entity reference to unparsed entity %s\n", name); @@ -1059,7 +1059,7 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { */ void xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { - CHAR *name; + xmlChar *name; xmlEntityPtr entity = NULL; xmlParserInputPtr input; @@ -1071,13 +1071,13 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { case XML_PARSER_COMMENT: return; case XML_PARSER_EOF: - ctxt->errno = XML_ERR_PEREF_AT_EOF; + ctxt->errNo = XML_ERR_PEREF_AT_EOF; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "PEReference at EOF\n"); ctxt->wellFormed = 0; return; case XML_PARSER_PROLOG: - ctxt->errno = XML_ERR_PEREF_IN_PROLOG; + ctxt->errNo = XML_ERR_PEREF_IN_PROLOG; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "PEReference in prolog!\n"); ctxt->wellFormed = 0; @@ -1088,7 +1088,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { /* we just ignore it there */ return; case XML_PARSER_EPILOG: - ctxt->errno = XML_ERR_PEREF_IN_EPILOG; + ctxt->errNo = XML_ERR_PEREF_IN_EPILOG; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "PEReference in epilog!\n"); ctxt->wellFormed = 0; @@ -1117,7 +1117,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { NEXT; name = xmlParseName(ctxt); if (name == NULL) { - ctxt->errno = XML_ERR_PEREF_NO_NAME; + ctxt->errNo = XML_ERR_PEREF_NO_NAME; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlHandlePEReference: no name\n"); ctxt->wellFormed = 0; @@ -1176,7 +1176,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { } } } else { - ctxt->errno = XML_ERR_PEREF_SEMICOL_MISSING; + ctxt->errNo = XML_ERR_PEREF_SEMICOL_MISSING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlHandlePEReference: expecting ';'\n"); @@ -1191,7 +1191,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { */ #define growBuffer(buffer) { \ buffer##_size *= 2; \ - buffer = (CHAR *) xmlRealloc(buffer, buffer##_size * sizeof(CHAR)); \ + buffer = (xmlChar *) xmlRealloc(buffer, buffer##_size * sizeof(xmlChar)); \ if (buffer == NULL) { \ perror("realloc failed"); \ exit(1); \ @@ -1203,9 +1203,9 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { * @ctxt: the parser context * @what: combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF * @len: the len to decode (in bytes !), -1 for no size limit - * @end: an end marker CHAR, 0 if none - * @end2: an end marker CHAR, 0 if none - * @end3: an end marker CHAR, 0 if none + * @end: an end marker xmlChar, 0 if none + * @end2: an end marker xmlChar, 0 if none + * @end3: an end marker xmlChar, 0 if none * * [67] Reference ::= EntityRef | CharRef * @@ -1214,24 +1214,24 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { * Returns A newly allocated string with the substitution done. The caller * must deallocate it ! */ -CHAR * +xmlChar * xmlDecodeEntities(xmlParserCtxtPtr ctxt, int len, int what, - CHAR end, CHAR end2, CHAR end3) { - CHAR *buffer = NULL; + xmlChar end, xmlChar end2, xmlChar end3) { + xmlChar *buffer = NULL; int buffer_size = 0; - CHAR *out = NULL; + xmlChar *out = NULL; - CHAR *current = NULL; + xmlChar *current = NULL; xmlEntityPtr ent; int nbchars = 0; unsigned int max = (unsigned int) len; - CHAR cur; + xmlChar cur; /* * allocate a translation buffer. */ buffer_size = 1000; - buffer = (CHAR *) xmlMalloc(buffer_size * sizeof(CHAR)); + buffer = (xmlChar *) xmlMalloc(buffer_size * sizeof(xmlChar)); if (buffer == NULL) { perror("xmlDecodeEntities: malloc failed"); return(NULL); @@ -1267,7 +1267,7 @@ xmlDecodeEntities(xmlParserCtxtPtr ctxt, int len, int what, nbchars += 3 + xmlStrlen(ent->name); } else if (ent != NULL) { int i = xmlStrlen(ent->name); - const CHAR *cur = ent->name; + const xmlChar *cur = ent->name; nbchars += i + 2; *out++ = '&'; @@ -1337,7 +1337,7 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc) { switch (enc) { case XML_CHAR_ENCODING_ERROR: - ctxt->errno = XML_ERR_UNKNOWN_ENCODING; + ctxt->errNo = XML_ERR_UNKNOWN_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "encoding unknown\n"); ctxt->wellFormed = 0; @@ -1349,121 +1349,121 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc) /* default encoding, no conversion should be needed */ return; case XML_CHAR_ENCODING_UTF16LE: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding UTF16 little endian not supported\n"); break; case XML_CHAR_ENCODING_UTF16BE: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding UTF16 big endian not supported\n"); break; case XML_CHAR_ENCODING_UCS4LE: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding USC4 little endian not supported\n"); break; case XML_CHAR_ENCODING_UCS4BE: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding USC4 big endian not supported\n"); break; case XML_CHAR_ENCODING_EBCDIC: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding EBCDIC not supported\n"); break; case XML_CHAR_ENCODING_UCS4_2143: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding UCS4 2143 not supported\n"); break; case XML_CHAR_ENCODING_UCS4_3412: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding UCS4 3412 not supported\n"); break; case XML_CHAR_ENCODING_UCS2: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding UCS2 not supported\n"); break; case XML_CHAR_ENCODING_8859_1: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding ISO_8859_1 ISO Latin 1 not supported\n"); break; case XML_CHAR_ENCODING_8859_2: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding ISO_8859_2 ISO Latin 2 not supported\n"); break; case XML_CHAR_ENCODING_8859_3: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding ISO_8859_3 not supported\n"); break; case XML_CHAR_ENCODING_8859_4: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding ISO_8859_4 not supported\n"); break; case XML_CHAR_ENCODING_8859_5: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding ISO_8859_5 not supported\n"); break; case XML_CHAR_ENCODING_8859_6: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding ISO_8859_6 not supported\n"); break; case XML_CHAR_ENCODING_8859_7: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding ISO_8859_7 not supported\n"); break; case XML_CHAR_ENCODING_8859_8: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding ISO_8859_8 not supported\n"); break; case XML_CHAR_ENCODING_8859_9: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding ISO_8859_9 not supported\n"); break; case XML_CHAR_ENCODING_2022_JP: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding ISO-2022-JPnot supported\n"); break; case XML_CHAR_ENCODING_SHIFT_JIS: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding Shift_JISnot supported\n"); break; case XML_CHAR_ENCODING_EUC_JP: - ctxt->errno = XML_ERR_UNSUPPORTED_ENCODING; + ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "char encoding EUC-JPnot supported\n"); @@ -1473,44 +1473,44 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc) /************************************************************************ * * - * Commodity functions to handle CHARs * + * Commodity functions to handle xmlChars * * * ************************************************************************/ /** * xmlStrndup: - * @cur: the input CHAR * + * @cur: the input xmlChar * * @len: the len of @cur * - * a strndup for array of CHAR's + * a strndup for array of xmlChar's * - * Returns a new CHAR * or NULL + * Returns a new xmlChar * or NULL */ -CHAR * -xmlStrndup(const CHAR *cur, int len) { - CHAR *ret = xmlMalloc((len + 1) * sizeof(CHAR)); +xmlChar * +xmlStrndup(const xmlChar *cur, int len) { + xmlChar *ret = xmlMalloc((len + 1) * sizeof(xmlChar)); if (ret == NULL) { fprintf(stderr, "malloc of %ld byte failed\n", - (len + 1) * (long)sizeof(CHAR)); + (len + 1) * (long)sizeof(xmlChar)); return(NULL); } - memcpy(ret, cur, len * sizeof(CHAR)); + memcpy(ret, cur, len * sizeof(xmlChar)); ret[len] = 0; return(ret); } /** * xmlStrdup: - * @cur: the input CHAR * + * @cur: the input xmlChar * * - * a strdup for array of CHAR's + * a strdup for array of xmlChar's * - * Returns a new CHAR * or NULL + * Returns a new xmlChar * or NULL */ -CHAR * -xmlStrdup(const CHAR *cur) { - const CHAR *p = cur; +xmlChar * +xmlStrdup(const xmlChar *cur) { + const xmlChar *p = cur; while (IS_CHAR(*p)) p++; return(xmlStrndup(cur, p - cur)); @@ -1521,23 +1521,23 @@ xmlStrdup(const CHAR *cur) { * @cur: the input char * * @len: the len of @cur * - * a strndup for char's to CHAR's + * a strndup for char's to xmlChar's * - * Returns a new CHAR * or NULL + * Returns a new xmlChar * or NULL */ -CHAR * +xmlChar * xmlCharStrndup(const char *cur, int len) { int i; - CHAR *ret = xmlMalloc((len + 1) * sizeof(CHAR)); + xmlChar *ret = xmlMalloc((len + 1) * sizeof(xmlChar)); if (ret == NULL) { fprintf(stderr, "malloc of %ld byte failed\n", - (len + 1) * (long)sizeof(CHAR)); + (len + 1) * (long)sizeof(xmlChar)); return(NULL); } for (i = 0;i < len;i++) - ret[i] = (CHAR) cur[i]; + ret[i] = (xmlChar) cur[i]; ret[len] = 0; return(ret); } @@ -1547,12 +1547,12 @@ xmlCharStrndup(const char *cur, int len) { * @cur: the input char * * @len: the len of @cur * - * a strdup for char's to CHAR's + * a strdup for char's to xmlChar's * - * Returns a new CHAR * or NULL + * Returns a new xmlChar * or NULL */ -CHAR * +xmlChar * xmlCharStrdup(const char *cur) { const char *p = cur; @@ -1562,16 +1562,16 @@ xmlCharStrdup(const char *cur) { /** * xmlStrcmp: - * @str1: the first CHAR * - * @str2: the second CHAR * + * @str1: the first xmlChar * + * @str2: the second xmlChar * * - * a strcmp for CHAR's + * a strcmp for xmlChar's * * Returns the integer result of the comparison */ int -xmlStrcmp(const CHAR *str1, const CHAR *str2) { +xmlStrcmp(const xmlChar *str1, const xmlChar *str2) { register int tmp; do { @@ -1583,17 +1583,17 @@ xmlStrcmp(const CHAR *str1, const CHAR *str2) { /** * xmlStrncmp: - * @str1: the first CHAR * - * @str2: the second CHAR * + * @str1: the first xmlChar * + * @str2: the second xmlChar * * @len: the max comparison length * - * a strncmp for CHAR's + * a strncmp for xmlChar's * * Returns the integer result of the comparison */ int -xmlStrncmp(const CHAR *str1, const CHAR *str2, int len) { +xmlStrncmp(const xmlChar *str1, const xmlChar *str2, int len) { register int tmp; if (len <= 0) return(0); @@ -1608,18 +1608,18 @@ xmlStrncmp(const CHAR *str1, const CHAR *str2, int len) { /** * xmlStrchr: - * @str: the CHAR * array - * @val: the CHAR to search + * @str: the xmlChar * array + * @val: the xmlChar to search * - * a strchr for CHAR's + * a strchr for xmlChar's * - * Returns the CHAR * for the first occurence or NULL. + * Returns the xmlChar * for the first occurence or NULL. */ -const CHAR * -xmlStrchr(const CHAR *str, CHAR val) { +const xmlChar * +xmlStrchr(const xmlChar *str, xmlChar val) { while (*str != 0) { - if (*str == val) return((CHAR *) str); + if (*str == val) return((xmlChar *) str); str++; } return(NULL); @@ -1627,16 +1627,16 @@ xmlStrchr(const CHAR *str, CHAR val) { /** * xmlStrstr: - * @str: the CHAR * array (haystack) - * @val: the CHAR to search (needle) + * @str: the xmlChar * array (haystack) + * @val: the xmlChar to search (needle) * - * a strstr for CHAR's + * a strstr for xmlChar's * - * Returns the CHAR * for the first occurence or NULL. + * Returns the xmlChar * for the first occurence or NULL. */ -const CHAR * -xmlStrstr(const CHAR *str, CHAR *val) { +const xmlChar * +xmlStrstr(const xmlChar *str, xmlChar *val) { int n; if (str == NULL) return(NULL); @@ -1646,7 +1646,7 @@ xmlStrstr(const CHAR *str, CHAR *val) { if (n == 0) return(str); while (*str != 0) { if (*str == *val) { - if (!xmlStrncmp(str, val, n)) return((const CHAR *) str); + if (!xmlStrncmp(str, val, n)) return((const xmlChar *) str); } str++; } @@ -1655,17 +1655,17 @@ xmlStrstr(const CHAR *str, CHAR *val) { /** * xmlStrsub: - * @str: the CHAR * array (haystack) + * @str: the xmlChar * array (haystack) * @start: the index of the first char (zero based) * @len: the length of the substring * * Extract a substring of a given string * - * Returns the CHAR * for the first occurence or NULL. + * Returns the xmlChar * for the first occurence or NULL. */ -CHAR * -xmlStrsub(const CHAR *str, int start, int len) { +xmlChar * +xmlStrsub(const xmlChar *str, int start, int len) { int i; if (str == NULL) return(NULL); @@ -1682,15 +1682,15 @@ xmlStrsub(const CHAR *str, int start, int len) { /** * xmlStrlen: - * @str: the CHAR * array + * @str: the xmlChar * array * - * lenght of a CHAR's string + * lenght of a xmlChar's string * - * Returns the number of CHAR contained in the ARRAY. + * Returns the number of xmlChar contained in the ARRAY. */ int -xmlStrlen(const CHAR *str) { +xmlStrlen(const xmlChar *str) { int len = 0; if (str == NULL) return(0); @@ -1703,19 +1703,19 @@ xmlStrlen(const CHAR *str) { /** * xmlStrncat: - * @cur: the original CHAR * array - * @add: the CHAR * array added + * @cur: the original xmlChar * array + * @add: the xmlChar * array added * @len: the length of @add * - * a strncat for array of CHAR's + * a strncat for array of xmlChar's * - * Returns a new CHAR * containing the concatenated string. + * Returns a new xmlChar * containing the concatenated string. */ -CHAR * -xmlStrncat(CHAR *cur, const CHAR *add, int len) { +xmlChar * +xmlStrncat(xmlChar *cur, const xmlChar *add, int len) { int size; - CHAR *ret; + xmlChar *ret; if ((add == NULL) || (len == 0)) return(cur); @@ -1723,29 +1723,29 @@ xmlStrncat(CHAR *cur, const CHAR *add, int len) { return(xmlStrndup(add, len)); size = xmlStrlen(cur); - ret = xmlRealloc(cur, (size + len + 1) * sizeof(CHAR)); + ret = xmlRealloc(cur, (size + len + 1) * sizeof(xmlChar)); if (ret == NULL) { fprintf(stderr, "xmlStrncat: realloc of %ld byte failed\n", - (size + len + 1) * (long)sizeof(CHAR)); + (size + len + 1) * (long)sizeof(xmlChar)); return(cur); } - memcpy(&ret[size], add, len * sizeof(CHAR)); + memcpy(&ret[size], add, len * sizeof(xmlChar)); ret[size + len] = 0; return(ret); } /** * xmlStrcat: - * @cur: the original CHAR * array - * @add: the CHAR * array added + * @cur: the original xmlChar * array + * @add: the xmlChar * array added * - * a strcat for array of CHAR's + * a strcat for array of xmlChar's * - * Returns a new CHAR * containing the concatenated string. + * Returns a new xmlChar * containing the concatenated string. */ -CHAR * -xmlStrcat(CHAR *cur, const CHAR *add) { - const CHAR *p = add; +xmlChar * +xmlStrcat(xmlChar *cur, const xmlChar *add) { + const xmlChar *p = add; if (add == NULL) return(cur); if (cur == NULL) @@ -1764,7 +1764,7 @@ xmlStrcat(CHAR *cur, const CHAR *add) { /** * areBlanks: * @ctxt: an XML parser context - * @str: a CHAR * + * @str: a xmlChar * * @len: the size of @str * * Is this a sequence of blank chars that one can ignore ? @@ -1775,7 +1775,7 @@ xmlStrcat(CHAR *cur, const CHAR *add) { * Returns 1 if ignorable 0 otherwise. */ -static int areBlanks(xmlParserCtxtPtr ctxt, const CHAR *str, int len) { +static int areBlanks(xmlParserCtxtPtr ctxt, const xmlChar *str, int len) { int i, ret; xmlNodePtr lastChild; @@ -1820,7 +1820,7 @@ xmlHandleEntity(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) { xmlParserInputPtr input; if (entity->content == NULL) { - ctxt->errno = XML_ERR_INTERNAL_ERROR; + ctxt->errNo = XML_ERR_INTERNAL_ERROR; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlHandleEntity %s: content == NULL\n", entity->name); @@ -1873,9 +1873,9 @@ void xmlParseReference(xmlParserCtxtPtr ctxt); * Returns the namespace name or NULL */ -CHAR * +xmlChar * xmlNamespaceParseNCName(xmlParserCtxtPtr ctxt) { - CHAR buf[XML_MAX_NAMELEN]; + xmlChar buf[XML_MAX_NAMELEN]; int len = 0; if (!IS_LETTER(CUR) && (CUR != '_')) return(NULL); @@ -1905,7 +1905,7 @@ xmlNamespaceParseNCName(xmlParserCtxtPtr ctxt) { /** * xmlNamespaceParseQName: * @ctxt: an XML parser context - * @prefix: a CHAR ** + * @prefix: a xmlChar ** * * parse an XML qualified name * @@ -1919,9 +1919,9 @@ xmlNamespaceParseNCName(xmlParserCtxtPtr ctxt) { * to get the Prefix if any. */ -CHAR * -xmlNamespaceParseQName(xmlParserCtxtPtr ctxt, CHAR **prefix) { - CHAR *ret = NULL; +xmlChar * +xmlNamespaceParseQName(xmlParserCtxtPtr ctxt, xmlChar **prefix) { + xmlChar *ret = NULL; *prefix = NULL; ret = xmlNamespaceParseNCName(ctxt); @@ -1937,7 +1937,7 @@ xmlNamespaceParseQName(xmlParserCtxtPtr ctxt, CHAR **prefix) { /** * xmlSplitQName: * @name: an XML parser context - * @prefix: a CHAR ** + * @prefix: a xmlChar ** * * parse an XML qualified name string * @@ -1951,11 +1951,11 @@ xmlNamespaceParseQName(xmlParserCtxtPtr ctxt, CHAR **prefix) { * to get the Prefix if any. */ -CHAR * -xmlSplitQName(const CHAR *name, CHAR **prefix) { - CHAR *ret = NULL; - const CHAR *q; - const CHAR *cur = name; +xmlChar * +xmlSplitQName(const xmlChar *name, xmlChar **prefix) { + xmlChar *ret = NULL; + const xmlChar *q; + const xmlChar *cur = name; *prefix = NULL; @@ -2008,9 +2008,9 @@ xmlSplitQName(const CHAR *name, CHAR **prefix) { * Returns the namespace name */ -CHAR * +xmlChar * xmlNamespaceParseNSDef(xmlParserCtxtPtr ctxt) { - CHAR *name = NULL; + xmlChar *name = NULL; if ((CUR == 'x') && (NXT(1) == 'm') && (NXT(2) == 'l') && (NXT(3) == 'n') && @@ -2033,17 +2033,17 @@ xmlNamespaceParseNSDef(xmlParserCtxtPtr ctxt) { * * Returns the string parser or NULL. */ -CHAR * +xmlChar * xmlParseQuotedString(xmlParserCtxtPtr ctxt) { - CHAR *ret = NULL; - const CHAR *q; + xmlChar *ret = NULL; + const xmlChar *q; if (CUR == '"') { NEXT; q = CUR_PTR; while (IS_CHAR(CUR) && (CUR != '"')) NEXT; if (CUR != '"') { - ctxt->errno = XML_ERR_STRING_NOT_CLOSED; + ctxt->errNo = XML_ERR_STRING_NOT_CLOSED; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "String not closed \"%.50s\"\n", q); ctxt->wellFormed = 0; @@ -2056,7 +2056,7 @@ xmlParseQuotedString(xmlParserCtxtPtr ctxt) { q = CUR_PTR; while (IS_CHAR(CUR) && (CUR != '\'')) NEXT; if (CUR != '\'') { - ctxt->errno = XML_ERR_STRING_NOT_CLOSED; + ctxt->errNo = XML_ERR_STRING_NOT_CLOSED; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "String not closed \"%.50s\"\n", q); ctxt->wellFormed = 0; @@ -2083,8 +2083,8 @@ xmlParseQuotedString(xmlParserCtxtPtr ctxt) { void xmlParseNamespace(xmlParserCtxtPtr ctxt) { - CHAR *href = NULL; - CHAR *prefix = NULL; + xmlChar *href = NULL; + xmlChar *prefix = NULL; int garbage = 0; /* @@ -2156,7 +2156,7 @@ xmlParseNamespace(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "xmlParseNamespace found garbage\n"); } - ctxt->errno = XML_ERR_NS_DECL_ERROR; + ctxt->errNo = XML_ERR_NS_DECL_ERROR; ctxt->wellFormed = 0; NEXT; } @@ -2200,9 +2200,9 @@ xmlParseNamespace(xmlParserCtxtPtr ctxt) { * Returns the Name parsed or NULL */ -CHAR * +xmlChar * xmlScanName(xmlParserCtxtPtr ctxt) { - CHAR buf[XML_MAX_NAMELEN]; + xmlChar buf[XML_MAX_NAMELEN]; int len = 0; GROW; @@ -2249,11 +2249,11 @@ xmlScanName(xmlParserCtxtPtr ctxt) { * Returns the Name parsed or NULL */ -CHAR * +xmlChar * xmlParseName(xmlParserCtxtPtr ctxt) { - CHAR buf[XML_MAX_NAMELEN]; + xmlChar buf[XML_MAX_NAMELEN]; int len = 0; - CHAR cur; + xmlChar cur; GROW; cur = CUR; @@ -2300,9 +2300,9 @@ xmlParseName(xmlParserCtxtPtr ctxt) { * Returns the Nmtoken parsed or NULL */ -CHAR * +xmlChar * xmlParseNmtoken(xmlParserCtxtPtr ctxt) { - CHAR buf[XML_MAX_NAMELEN]; + xmlChar buf[XML_MAX_NAMELEN]; int len = 0; GROW; @@ -2341,12 +2341,12 @@ xmlParseNmtoken(xmlParserCtxtPtr ctxt) { * Returns the EntityValue parsed with reference substitued or NULL */ -CHAR * -xmlParseEntityValue(xmlParserCtxtPtr ctxt, CHAR **orig) { - CHAR *ret = NULL; - const CHAR *org = NULL; - const CHAR *tst = NULL; - const CHAR *temp = NULL; +xmlChar * +xmlParseEntityValue(xmlParserCtxtPtr ctxt, xmlChar **orig) { + xmlChar *ret = NULL; + const xmlChar *org = NULL; + const xmlChar *tst = NULL; + const xmlChar *temp = NULL; xmlParserInputPtr input; SHRINK; @@ -2386,12 +2386,12 @@ xmlParseEntityValue(xmlParserCtxtPtr ctxt, CHAR **orig) { xmlPopInput(ctxt); if ((temp == NULL) && (tst == CUR_PTR)) { - ret = xmlStrndup((CHAR *) "", 0); + ret = xmlStrndup((xmlChar *) "", 0); break; } if ((temp[0] == 0) && (tst == CUR_PTR)) { xmlFree((char *)temp); - ret = xmlStrndup((CHAR *) "", 0); + ret = xmlStrndup((xmlChar *) "", 0); break; } ret = xmlStrcat(ret, temp); @@ -2399,7 +2399,7 @@ xmlParseEntityValue(xmlParserCtxtPtr ctxt, CHAR **orig) { GROW; } if (CUR != '"') { - ctxt->errno = XML_ERR_ENTITY_NOT_FINISHED; + ctxt->errNo = XML_ERR_ENTITY_NOT_FINISHED; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "EntityValue: \" expected\n"); ctxt->wellFormed = 0; @@ -2407,7 +2407,7 @@ xmlParseEntityValue(xmlParserCtxtPtr ctxt, CHAR **orig) { if (orig != NULL) /* !!!!!!!!! */ *orig = xmlStrndup(org, CUR_PTR - org); if (ret == NULL) - ret = xmlStrndup((CHAR *) "", 0); + ret = xmlStrndup((xmlChar *) "", 0); NEXT; } } else if (CUR == '\'') { @@ -2446,12 +2446,12 @@ xmlParseEntityValue(xmlParserCtxtPtr ctxt, CHAR **orig) { xmlPopInput(ctxt); if ((temp == NULL) && (tst == CUR_PTR)) { - ret = xmlStrndup((CHAR *) "", 0); + ret = xmlStrndup((xmlChar *) "", 0); break; } if ((temp[0] == 0) && (tst == CUR_PTR)) { xmlFree((char *)temp); - ret = xmlStrndup((CHAR *) "", 0); + ret = xmlStrndup((xmlChar *) "", 0); break; } ret = xmlStrcat(ret, temp); @@ -2459,7 +2459,7 @@ xmlParseEntityValue(xmlParserCtxtPtr ctxt, CHAR **orig) { GROW; } if (CUR != '\'') { - ctxt->errno = XML_ERR_ENTITY_NOT_FINISHED; + ctxt->errNo = XML_ERR_ENTITY_NOT_FINISHED; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "EntityValue: ' expected\n"); ctxt->wellFormed = 0; @@ -2467,11 +2467,11 @@ xmlParseEntityValue(xmlParserCtxtPtr ctxt, CHAR **orig) { if (orig != NULL) /* !!!!!!!!! */ *orig = xmlStrndup(org, CUR_PTR - org); if (ret == NULL) - ret = xmlStrndup((CHAR *) "", 0); + ret = xmlStrndup((xmlChar *) "", 0); NEXT; } } else { - ctxt->errno = XML_ERR_ENTITY_NOT_STARTED; + ctxt->errNo = XML_ERR_ENTITY_NOT_STARTED; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "EntityValue: \" or ' expected\n"); ctxt->wellFormed = 0; @@ -2494,9 +2494,9 @@ xmlParseEntityValue(xmlParserCtxtPtr ctxt, CHAR **orig) { * Returns the AttValue parsed or NULL. */ -CHAR * +xmlChar * xmlParseAttValue(xmlParserCtxtPtr ctxt) { - CHAR *ret = NULL; + xmlChar *ret = NULL; SHRINK; if (CUR == '"') { @@ -2507,13 +2507,13 @@ xmlParseAttValue(xmlParserCtxtPtr ctxt) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Unescaped '<' not allowed in attributes values\n"); - ctxt->errno = XML_ERR_LT_IN_ATTRIBUTE; + ctxt->errNo = XML_ERR_LT_IN_ATTRIBUTE; ctxt->wellFormed = 0; } if (CUR != '"') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "AttValue: ' expected\n"); - ctxt->errno = XML_ERR_ATTRIBUTE_NOT_FINISHED; + ctxt->errNo = XML_ERR_ATTRIBUTE_NOT_FINISHED; ctxt->wellFormed = 0; } else NEXT; @@ -2525,18 +2525,18 @@ xmlParseAttValue(xmlParserCtxtPtr ctxt) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Unescaped '<' not allowed in attributes values\n"); - ctxt->errno = XML_ERR_LT_IN_ATTRIBUTE; + ctxt->errNo = XML_ERR_LT_IN_ATTRIBUTE; ctxt->wellFormed = 0; } if (CUR != '\'') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "AttValue: ' expected\n"); - ctxt->errno = XML_ERR_ATTRIBUTE_NOT_FINISHED; + ctxt->errNo = XML_ERR_ATTRIBUTE_NOT_FINISHED; ctxt->wellFormed = 0; } else NEXT; } else { - ctxt->errno = XML_ERR_ATTRIBUTE_NOT_STARTED; + ctxt->errNo = XML_ERR_ATTRIBUTE_NOT_STARTED; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "AttValue: \" or ' expected\n"); ctxt->wellFormed = 0; @@ -2556,10 +2556,10 @@ xmlParseAttValue(xmlParserCtxtPtr ctxt) { * Returns the SystemLiteral parsed or NULL */ -CHAR * +xmlChar * xmlParseSystemLiteral(xmlParserCtxtPtr ctxt) { - const CHAR *q; - CHAR *ret = NULL; + const xmlChar *q; + xmlChar *ret = NULL; SHRINK; if (CUR == '"') { @@ -2570,7 +2570,7 @@ xmlParseSystemLiteral(xmlParserCtxtPtr ctxt) { if (!IS_CHAR(CUR)) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Unfinished SystemLiteral\n"); - ctxt->errno = XML_ERR_LITERAL_NOT_FINISHED; + ctxt->errNo = XML_ERR_LITERAL_NOT_FINISHED; ctxt->wellFormed = 0; } else { ret = xmlStrndup(q, CUR_PTR - q); @@ -2584,7 +2584,7 @@ xmlParseSystemLiteral(xmlParserCtxtPtr ctxt) { if (!IS_CHAR(CUR)) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Unfinished SystemLiteral\n"); - ctxt->errno = XML_ERR_LITERAL_NOT_FINISHED; + ctxt->errNo = XML_ERR_LITERAL_NOT_FINISHED; ctxt->wellFormed = 0; } else { ret = xmlStrndup(q, CUR_PTR - q); @@ -2594,7 +2594,7 @@ xmlParseSystemLiteral(xmlParserCtxtPtr ctxt) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "SystemLiteral \" or ' expected\n"); - ctxt->errno = XML_ERR_LITERAL_NOT_STARTED; + ctxt->errNo = XML_ERR_LITERAL_NOT_STARTED; ctxt->wellFormed = 0; } @@ -2612,10 +2612,10 @@ xmlParseSystemLiteral(xmlParserCtxtPtr ctxt) { * Returns the PubidLiteral parsed or NULL. */ -CHAR * +xmlChar * xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) { - const CHAR *q; - CHAR *ret = NULL; + const xmlChar *q; + xmlChar *ret = NULL; /* * Name ::= (Letter | '_') (NameChar)* */ @@ -2627,7 +2627,7 @@ xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) { if (CUR != '"') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Unfinished PubidLiteral\n"); - ctxt->errno = XML_ERR_LITERAL_NOT_FINISHED; + ctxt->errNo = XML_ERR_LITERAL_NOT_FINISHED; ctxt->wellFormed = 0; } else { ret = xmlStrndup(q, CUR_PTR - q); @@ -2641,7 +2641,7 @@ xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) { if (!IS_LETTER(CUR)) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Unfinished PubidLiteral\n"); - ctxt->errno = XML_ERR_LITERAL_NOT_FINISHED; + ctxt->errNo = XML_ERR_LITERAL_NOT_FINISHED; ctxt->wellFormed = 0; } else { ret = xmlStrndup(q, CUR_PTR - q); @@ -2651,7 +2651,7 @@ xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "SystemLiteral \" or ' expected\n"); - ctxt->errno = XML_ERR_LITERAL_NOT_STARTED; + ctxt->errNo = XML_ERR_LITERAL_NOT_STARTED; ctxt->wellFormed = 0; } @@ -2671,9 +2671,9 @@ xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) { void xmlParseCharData(xmlParserCtxtPtr ctxt, int cdata) { - CHAR buf[1000]; + xmlChar buf[1000]; int nbchar = 0; - CHAR cur; + xmlChar cur; SHRINK; /* @@ -2691,7 +2691,7 @@ xmlParseCharData(xmlParserCtxtPtr ctxt, int cdata) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Sequence ']]>' not allowed in content\n"); - ctxt->errno = XML_ERR_MISPLACED_CDATA_END; + ctxt->errNo = XML_ERR_MISPLACED_CDATA_END; ctxt->wellFormed = 0; } } @@ -2734,7 +2734,7 @@ xmlParseCharData(xmlParserCtxtPtr ctxt, int cdata) { /** * xmlParseExternalID: * @ctxt: an XML parser context - * @publicID: a CHAR** receiving PubidLiteral + * @publicID: a xmlChar** receiving PubidLiteral * @strict: indicate whether we should restrict parsing to only * production [75], see NOTE below * @@ -2753,9 +2753,9 @@ xmlParseCharData(xmlParserCtxtPtr ctxt, int cdata) { * it is possible to return NULL and have publicID set. */ -CHAR * -xmlParseExternalID(xmlParserCtxtPtr ctxt, CHAR **publicID, int strict) { - CHAR *URI = NULL; +xmlChar * +xmlParseExternalID(xmlParserCtxtPtr ctxt, xmlChar **publicID, int strict) { + xmlChar *URI = NULL; SHRINK; if ((CUR == 'S') && (NXT(1) == 'Y') && @@ -2766,7 +2766,7 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, CHAR **publicID, int strict) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Space required after 'SYSTEM'\n"); - ctxt->errno = XML_ERR_SPACE_REQUIRED; + ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; } SKIP_BLANKS; @@ -2775,7 +2775,7 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, CHAR **publicID, int strict) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlParseExternalID: SYSTEM, no URI\n"); - ctxt->errno = XML_ERR_URI_REQUIRED; + ctxt->errNo = XML_ERR_URI_REQUIRED; ctxt->wellFormed = 0; } } else if ((CUR == 'P') && (NXT(1) == 'U') && @@ -2786,7 +2786,7 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, CHAR **publicID, int strict) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Space required after 'PUBLIC'\n"); - ctxt->errno = XML_ERR_SPACE_REQUIRED; + ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; } SKIP_BLANKS; @@ -2795,7 +2795,7 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, CHAR **publicID, int strict) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlParseExternalID: PUBLIC, no Public Identifier\n"); - ctxt->errno = XML_ERR_PUBID_REQUIRED; + ctxt->errNo = XML_ERR_PUBID_REQUIRED; ctxt->wellFormed = 0; } if (strict) { @@ -2806,7 +2806,7 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, CHAR **publicID, int strict) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Space required after the Public Identifier\n"); - ctxt->errno = XML_ERR_SPACE_REQUIRED; + ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; } } else { @@ -2815,7 +2815,7 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, CHAR **publicID, int strict) { * "S SystemLiteral" is not detected. From a purely parsing * point of view that's a nice mess. */ - const CHAR *ptr = CUR_PTR; + const xmlChar *ptr = CUR_PTR; if (!IS_BLANK(*ptr)) return(NULL); while (IS_BLANK(*ptr)) ptr++; @@ -2827,7 +2827,7 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, CHAR **publicID, int strict) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlParseExternalID: PUBLIC, no URI\n"); - ctxt->errno = XML_ERR_URI_REQUIRED; + ctxt->errNo = XML_ERR_URI_REQUIRED; ctxt->wellFormed = 0; } } @@ -2846,9 +2846,9 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, CHAR **publicID, int strict) { */ void xmlParseComment(xmlParserCtxtPtr ctxt) { - const CHAR *q, *start; - const CHAR *r; - CHAR *val; + const xmlChar *q, *start; + const xmlChar *r; + xmlChar *val; /* * Check that there is a comment right here. @@ -2870,7 +2870,7 @@ xmlParseComment(xmlParserCtxtPtr ctxt) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Comment must not contain '--' (double-hyphen)`\n"); - ctxt->errno = XML_ERR_HYPHEN_IN_COMMENT; + ctxt->errNo = XML_ERR_HYPHEN_IN_COMMENT; ctxt->wellFormed = 0; } NEXT;r++;q++; @@ -2879,7 +2879,7 @@ xmlParseComment(xmlParserCtxtPtr ctxt) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Comment not terminated \n