Home | History | Annotate | Download | only in libxml2

Lines Matching refs:buffer

248     if (in->base != xmlBufContent(in->buf->buffer)) {
256 if (in->cur > in->base + xmlBufUse(in->buf->buffer)) {
260 xmlGenericError(xmlGenericErrorContext,"buffer %x : content %x, cur %d, use %d\n",
261 (int) in, (int) xmlBufContent(in->buf->buffer), in->cur - in->base,
262 xmlBufUse(in->buf->buffer));
290 * preserve pointers to the input buffer, and keep already read data
308 if (in->buf->buffer == NULL) return(-1);
313 if (xmlBufUse(in->buf->buffer) > (unsigned int) indx + INPUT_CHUNK) {
331 content = xmlBufContent(in->buf->buffer);
334 * the buffer has been reallocated
340 in->end = xmlBufEnd(in->buf->buffer);
367 if (in->buf->buffer == NULL) return;
371 used = in->cur - xmlBufContent(in->buf->buffer);
377 ret = xmlBufShrink(in->buf->buffer, used - LINE_LEN);
382 in->end = xmlBufEnd(in->buf->buffer);
387 if (xmlBufUse(in->buf->buffer) > INPUT_CHUNK) {
391 content = xmlBufContent(in->buf->buffer);
394 * the buffer has been reallocated
400 in->end = xmlBufEnd(in->buf->buffer);
558 char buffer[150];
560 snprintf(buffer, 149, "Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",
565 BAD_CAST buffer, NULL);
578 * bytes in the input buffer. Implement the end of line normalization:
707 * An encoding problem may arise from a truncated input buffer
724 char buffer[150];
726 snprintf(&buffer[0], 149, "Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",
731 BAD_CAST buffer, NULL);
745 * bytes in the input buffer.
820 * An encoding problem may arise from a truncated input buffer
837 char buffer[150];
839 snprintf(buffer, 149, "Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",
844 BAD_CAST buffer, NULL);
1158 if (xmlBufIsEmpty(input->buf->buffer) == 0) {
1190 * Shrink the current input buffer.
1191 * Move it as the raw buffer and create a new input buffer
1194 xmlBufShrink(input->buf->buffer, processed);
1195 input->buf->raw = input->buf->buffer;
1196 input->buf->buffer = xmlBufCreate();
1202 * convert as much as possible of the buffer
1210 * into the parser reading buffer.
1221 xmlBufResetInput(input->buf->buffer, input);
1227 * size to be able to convert the buffer.
1388 xmlBufResetInput(inputStream->buf->buffer, inputStream);
1462 * @buffer: an memory buffer
1464 * Create a new input stream based on a memory buffer.
1468 xmlNewStringInputStream(xmlParserCtxtPtr ctxt, const xmlChar *buffer) {
1471 if (buffer == NULL) {
1478 "new fixed input: %.30s\n", buffer);
1484 input->base = buffer;
1485 input->cur = buffer;
1486 input->length = xmlStrlen(buffer);
1487 input->end = &buffer[input->length];
1542 xmlBufResetInput(inputStream->buf->buffer, inputStream);
1883 && ctx->node_seq.buffer[pos].node == node)
1884 return &ctx->node_seq.buffer[pos];
1903 seq->buffer = NULL;
1918 if (seq->buffer != NULL)
1919 xmlFree(seq->buffer);
1950 if (node == seq->buffer[middle - 1].node)
1952 else if (node < seq->buffer[middle - 1].node)
1959 if (middle == 0 || seq->buffer[middle - 1].node < node)
1986 (ctxt->node_seq.buffer != NULL) &&
1987 (ctxt->node_seq.buffer[pos].node == info->node)) {
1988 ctxt->node_seq.buffer[pos] = *info;
1991 /* Otherwise, we need to add new node to buffer */
1999 byte_size = (sizeof(*ctxt->node_seq.buffer) *
2002 if (ctxt->node_seq.buffer == NULL)
2006 (xmlParserNodeInfo *) xmlRealloc(ctxt->node_seq.buffer,
2010 xmlErrMemory(ctxt, "failed to allocate buffer\n");
2013 ctxt->node_seq.buffer = tmp_buffer;
2022 ctxt->node_seq.buffer[i] = ctxt->node_seq.buffer[i - 1];
2026 ctxt->node_seq.buffer[pos] = *info;