Commit dd6b3676 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

Fixed CHAR, errno, alpha RPM compile, updated doc, Daniel

parent e624482d
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 <Daniel.Veillard@w3.org>
* parser.h: modified the parser context struct to regain 1.4.0
......
......@@ -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 '<!DOCTYPE' has been detected.
......@@ -1835,7 +1835,7 @@ htmlParseDocTypeDecl(htmlParserCtxtPtr ctxt) {
/**
* htmlParseAttribute:
* @ctxt: an HTML parser context
* @value: a CHAR ** used to store the value of the attribute
* @value: a xmlChar ** used to store the value of the attribute
*
* parse an attribute
*
......@@ -1853,9 +1853,9 @@ htmlParseDocTypeDecl(htmlParserCtxtPtr ctxt) {
* Returns the attribute name, and the value in *value.
*/
CHAR *
htmlParseAttribute(htmlParserCtxtPtr ctxt, CHAR **value) {
CHAR *name, *val;
xmlChar *
htmlParseAttribute(htmlParserCtxtPtr ctxt, xmlChar **value) {
xmlChar *name, *val;
*value = NULL;
name = htmlParseName(ctxt);
......@@ -1906,12 +1906,12 @@ htmlParseAttribute(htmlParserCtxtPtr ctxt, CHAR **value) {
* Returns the element name parsed
*/
CHAR *
xmlChar *
htmlParseStartTag(htmlParserCtxtPtr ctxt) {
CHAR *name;
CHAR *attname;
CHAR *attvalue;
const CHAR **atts = NULL;
xmlChar *name;
xmlChar *attname;
xmlChar *attvalue;
const xmlChar **atts = NULL;
int nbatts = 0;
int maxatts = 0;
int i;
......@@ -1942,7 +1942,7 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
while ((IS_CHAR(CUR)) &&
(CUR != '>') &&
((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));
}
......
......@@ -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);
......
......@@ -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));
}
......@@ -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 *