version 1.2, 1999/07/27 13:16:06
|
version 1.3, 1999/07/27 18:44:59
|
Line 47 xmlAllocParserInputBuffer(xmlCharEncodin
|
Line 47 xmlAllocParserInputBuffer(xmlCharEncodin
|
fprintf(stderr, "xmlAllocParserInputBuffer : out of memory!\n"); |
fprintf(stderr, "xmlAllocParserInputBuffer : out of memory!\n"); |
return(NULL); |
return(NULL); |
} |
} |
memset(ret, 0, sizeof(xmlParserInputBuffer)); |
memset(ret, 0, (size_t) sizeof(xmlParserInputBuffer)); |
ret->buffer = xmlBufferCreate(); |
ret->buffer = xmlBufferCreate(); |
ret->encoder = xmlGetCharEncodingHandler(enc); |
ret->encoder = xmlGetCharEncodingHandler(enc); |
ret->fd = -1; |
ret->fd = -1; |
Line 73 xmlFreeParserInputBuffer(xmlParserInputB
|
Line 73 xmlFreeParserInputBuffer(xmlParserInputB
|
#endif |
#endif |
if (in->fd >= 0) |
if (in->fd >= 0) |
close(in->fd); |
close(in->fd); |
memset(in, 0xbe, sizeof(xmlParserInputBuffer)); |
memset(in, 0xbe, (size_t) sizeof(xmlParserInputBuffer)); |
free(in); |
free(in); |
} |
} |
|
|
Line 285 xmlParserInputBufferGrow(xmlParserInputB
|
Line 285 xmlParserInputBufferGrow(xmlParserInputB
|
} |
} |
nbchars = in->encoder->input(buf, (res + 1) * 2 * sizeof(CHAR), |
nbchars = in->encoder->input(buf, (res + 1) * 2 * sizeof(CHAR), |
buffer, res); |
buffer, res); |
|
buf[nbchars] = 0; |
xmlBufferAdd(in->buffer, (CHAR *) buf, nbchars); |
xmlBufferAdd(in->buffer, (CHAR *) buf, nbchars); |
free(buf); |
free(buf); |
} else { |
} else { |
nbchars = res; |
nbchars = res; |
|
buffer[nbchars] = 0; |
xmlBufferAdd(in->buffer, (CHAR *) buffer, nbchars); |
xmlBufferAdd(in->buffer, (CHAR *) buffer, nbchars); |
} |
} |
#ifdef DEBUG_INPUT |
#ifdef DEBUG_INPUT |