1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

Closing reported bugs: 617 1591 1592, adding an HTML parser, Daniel

This commit is contained in:
Daniel Veillard
1999-07-05 16:50:46 +00:00
parent 97fea18b71
commit be70ff7162
20 changed files with 6453 additions and 40 deletions

View File

@ -628,8 +628,8 @@ xmlStrndup(const CHAR *cur, int len) {
CHAR *ret = malloc((len + 1) * sizeof(CHAR));
if (ret == NULL) {
fprintf(stderr, "malloc of %d byte failed\n",
(len + 1) * sizeof(CHAR));
fprintf(stderr, "malloc of %ld byte failed\n",
(len + 1) * (long)sizeof(CHAR));
return(NULL);
}
memcpy(ret, cur, len * sizeof(CHAR));
@ -669,8 +669,8 @@ xmlCharStrndup(const char *cur, int len) {
CHAR *ret = malloc((len + 1) * sizeof(CHAR));
if (ret == NULL) {
fprintf(stderr, "malloc of %d byte failed\n",
(len + 1) * sizeof(CHAR));
fprintf(stderr, "malloc of %ld byte failed\n",
(len + 1) * (long)sizeof(CHAR));
return(NULL);
}
for (i = 0;i < len;i++)
@ -807,8 +807,8 @@ xmlStrncat(CHAR *cur, const CHAR *add, int len) {
size = xmlStrlen(cur);
ret = realloc(cur, (size + len + 1) * sizeof(CHAR));
if (ret == NULL) {
fprintf(stderr, "xmlStrncat: realloc of %d byte failed\n",
(size + len + 1) * sizeof(CHAR));
fprintf(stderr, "xmlStrncat: realloc of %ld byte failed\n",
(size + len + 1) * (long)sizeof(CHAR));
return(cur);
}
memcpy(&ret[size], add, len * sizeof(CHAR));
@ -3548,16 +3548,16 @@ xmlParseStartTag(xmlParserCtxtPtr ctxt) {
maxatts = 10;
atts = (const CHAR **) malloc(maxatts * sizeof(CHAR *));
if (atts == NULL) {
fprintf(stderr, "malloc of %d byte failed\n",
maxatts * sizeof(CHAR *));
fprintf(stderr, "malloc of %ld byte failed\n",
maxatts * (long)sizeof(CHAR *));
return(NULL);
}
} else if (nbatts + 2 < maxatts) {
maxatts *= 2;
atts = (const CHAR **) realloc(atts, maxatts * sizeof(CHAR *));
if (atts == NULL) {
fprintf(stderr, "realloc of %d byte failed\n",
maxatts * sizeof(CHAR *));
fprintf(stderr, "realloc of %ld byte failed\n",
maxatts * (long)sizeof(CHAR *));
return(NULL);
}
}
@ -4359,7 +4359,7 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) {
}
/**
* xmlCreateFileParserCtxt :
* xmlCreateDocParserCtxt :
* @cur: a pointer to an array of CHAR
*
* Create a parser context for an XML in-memory document.