Fixed CHAR, errno, alpha RPM compile, updated doc, Daniel
diff --git a/entities.c b/entities.c
index fe706ea..78f7ec2 100644
--- a/entities.c
+++ b/entities.c
@@ -59,8 +59,8 @@
* 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 @@
*/
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 @@
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 @@
* Returns NULL if not, othervise the entity
*/
xmlEntityPtr
-xmlGetPredefinedEntity(const CHAR *name) {
+xmlGetPredefinedEntity(const xmlChar *name) {
int i;
xmlEntityPtr cur;
@@ -182,8 +182,8 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
*
* 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 @@
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 @@
*/
*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 @@
*/
#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 @@
*
* 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 @@
* 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 @@
*/
*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);