Lines Matching refs:input
422 (ctxt->input == NULL)) in xmlNextChar()
426 if ((*ctxt->input->cur == 0) && in xmlNextChar()
427 (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0) && in xmlNextChar()
446 if (*(ctxt->input->cur) == '\n') { in xmlNextChar()
447 ctxt->input->line++; ctxt->input->col = 1; in xmlNextChar()
449 ctxt->input->col++; in xmlNextChar()
462 cur = ctxt->input->cur; in xmlNextChar()
469 xmlParserInputGrow(ctxt->input, INPUT_CHUNK); in xmlNextChar()
470 cur = ctxt->input->cur; in xmlNextChar()
478 xmlParserInputGrow(ctxt->input, INPUT_CHUNK); in xmlNextChar()
479 cur = ctxt->input->cur; in xmlNextChar()
485 xmlParserInputGrow(ctxt->input, INPUT_CHUNK); in xmlNextChar()
486 cur = ctxt->input->cur; in xmlNextChar()
492 ctxt->input->cur += 4; in xmlNextChar()
499 ctxt->input->cur += 3; in xmlNextChar()
513 ctxt->input->cur += 2; in xmlNextChar()
516 ctxt->input->cur++; in xmlNextChar()
519 if (*ctxt->input->cur == 0) in xmlNextChar()
520 xmlParserInputGrow(ctxt->input, INPUT_CHUNK); in xmlNextChar()
529 if (*(ctxt->input->cur) == '\n') { in xmlNextChar()
530 ctxt->input->line++; ctxt->input->col = 1; in xmlNextChar()
532 ctxt->input->col++; in xmlNextChar()
533 ctxt->input->cur++; in xmlNextChar()
535 if (*ctxt->input->cur == 0) in xmlNextChar()
536 xmlParserInputGrow(ctxt->input, INPUT_CHUNK); in xmlNextChar()
538 if ((*ctxt->input->cur == '%') && (!ctxt->html)) in xmlNextChar()
540 if ((*ctxt->input->cur == 0) && in xmlNextChar()
541 (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) in xmlNextChar()
552 if ((ctxt == NULL) || (ctxt->input == NULL) || in xmlNextChar()
553 (ctxt->input->end - ctxt->input->cur < 4)) { in xmlNextChar()
561 ctxt->input->cur[0], ctxt->input->cur[1], in xmlNextChar()
562 ctxt->input->cur[2], ctxt->input->cur[3]); in xmlNextChar()
568 ctxt->input->cur++; in xmlNextChar()
592 if ((ctxt == NULL) || (len == NULL) || (ctxt->input == NULL)) return(0); in xmlCurrentChar()
596 if ((*ctxt->input->cur >= 0x20) && (*ctxt->input->cur <= 0x7F)) { in xmlCurrentChar()
598 return((int) *ctxt->input->cur); in xmlCurrentChar()
612 const unsigned char *cur = ctxt->input->cur; in xmlCurrentChar()
621 xmlParserInputGrow(ctxt->input, INPUT_CHUNK); in xmlCurrentChar()
622 cur = ctxt->input->cur; in xmlCurrentChar()
628 xmlParserInputGrow(ctxt->input, INPUT_CHUNK); in xmlCurrentChar()
629 cur = ctxt->input->cur; in xmlCurrentChar()
635 xmlParserInputGrow(ctxt->input, INPUT_CHUNK); in xmlCurrentChar()
636 cur = ctxt->input->cur; in xmlCurrentChar()
674 if (*ctxt->input->cur == 0) in xmlCurrentChar()
675 xmlParserInputGrow(ctxt->input, INPUT_CHUNK); in xmlCurrentChar()
676 if ((*ctxt->input->cur == 0) && in xmlCurrentChar()
677 (ctxt->input->end > ctxt->input->cur)) { in xmlCurrentChar()
681 if (*ctxt->input->cur == 0xD) { in xmlCurrentChar()
682 if (ctxt->input->cur[1] == 0xA) { in xmlCurrentChar()
684 ctxt->input->cur++; in xmlCurrentChar()
688 return((int) *ctxt->input->cur); in xmlCurrentChar()
697 if (*ctxt->input->cur == 0xD) { in xmlCurrentChar()
698 if (ctxt->input->cur[1] == 0xA) { in xmlCurrentChar()
700 ctxt->input->cur++; in xmlCurrentChar()
704 return((int) *ctxt->input->cur); in xmlCurrentChar()
711 if (ctxt->input->end - ctxt->input->cur < 4) { in xmlCurrentChar()
727 ctxt->input->cur[0], ctxt->input->cur[1], in xmlCurrentChar()
728 ctxt->input->cur[2], ctxt->input->cur[3]); in xmlCurrentChar()
735 return((int) *ctxt->input->cur); in xmlCurrentChar()
824 if ((ctxt == NULL) || (ctxt->input == NULL) || in xmlStringCurrentChar()
825 (ctxt->input->end - ctxt->input->cur < 4)) { in xmlStringCurrentChar()
840 ctxt->input->cur[0], ctxt->input->cur[1], in xmlStringCurrentChar()
841 ctxt->input->cur[2], ctxt->input->cur[3]); in xmlStringCurrentChar()
923 xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
961 if ((ctxt->input != NULL) && in xmlSwitchEncoding()
962 (ctxt->input->cur[0] == 0xEF) && in xmlSwitchEncoding()
963 (ctxt->input->cur[1] == 0xBB) && in xmlSwitchEncoding()
964 (ctxt->input->cur[2] == 0xBF)) { in xmlSwitchEncoding()
965 ctxt->input->cur += 3; in xmlSwitchEncoding()
978 if ((ctxt->input != NULL) && (ctxt->input->cur != NULL) && in xmlSwitchEncoding()
979 (ctxt->input->cur[0] == 0xEF) && in xmlSwitchEncoding()
980 (ctxt->input->cur[1] == 0xBB) && in xmlSwitchEncoding()
981 (ctxt->input->cur[2] == 0xBF)) { in xmlSwitchEncoding()
982 ctxt->input->cur += 3; in xmlSwitchEncoding()
1073 (ctxt->input != NULL) && in xmlSwitchEncoding()
1074 (ctxt->input->encoding != NULL)) { in xmlSwitchEncoding()
1075 ctxt->encoding = xmlStrdup(ctxt->input->encoding); in xmlSwitchEncoding()
1125 xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input, in xmlSwitchInputEncodingInt() argument
1132 if (input == NULL) in xmlSwitchInputEncodingInt()
1134 if (input->buf != NULL) { in xmlSwitchInputEncodingInt()
1135 if (input->buf->encoder != NULL) { in xmlSwitchInputEncodingInt()
1140 if (input->buf->encoder == handler) in xmlSwitchInputEncodingInt()
1158 xmlCharEncCloseFunc(input->buf->encoder); in xmlSwitchInputEncodingInt()
1159 input->buf->encoder = handler; in xmlSwitchInputEncodingInt()
1162 input->buf->encoder = handler; in xmlSwitchInputEncodingInt()
1167 if (xmlBufIsEmpty(input->buf->buffer) == 0) { in xmlSwitchInputEncodingInt()
1178 (input->cur[0] == 0xFF) && (input->cur[1] == 0xFE)) { in xmlSwitchInputEncodingInt()
1179 input->cur += 2; in xmlSwitchInputEncodingInt()
1183 (input->cur[0] == 0xFE) && (input->cur[1] == 0xFF)) { in xmlSwitchInputEncodingInt()
1184 input->cur += 2; in xmlSwitchInputEncodingInt()
1193 (input->cur[0] == 0xEF) && in xmlSwitchInputEncodingInt()
1194 (input->cur[1] == 0xBB) && (input->cur[2] == 0xBF)) { in xmlSwitchInputEncodingInt()
1195 input->cur += 3; in xmlSwitchInputEncodingInt()
1202 processed = input->cur - input->base; in xmlSwitchInputEncodingInt()
1203 xmlBufShrink(input->buf->buffer, processed); in xmlSwitchInputEncodingInt()
1204 input->buf->raw = input->buf->buffer; in xmlSwitchInputEncodingInt()
1205 input->buf->buffer = xmlBufCreate(); in xmlSwitchInputEncodingInt()
1206 input->buf->rawconsumed = processed; in xmlSwitchInputEncodingInt()
1207 use = xmlBufUse(input->buf->raw); in xmlSwitchInputEncodingInt()
1213 nbchars = xmlCharEncInput(input->buf, 1); in xmlSwitchInputEncodingInt()
1221 nbchars = xmlCharEncFirstLineInput(input->buf, len); in xmlSwitchInputEncodingInt()
1229 input->buf->rawconsumed += use - xmlBufUse(input->buf->raw); in xmlSwitchInputEncodingInt()
1230 xmlBufResetInput(input->buf->buffer, input); in xmlSwitchInputEncodingInt()
1233 } else if (input->length == 0) { in xmlSwitchInputEncodingInt()
1256 xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input, in xmlSwitchInputEncoding() argument
1258 return(xmlSwitchInputEncodingInt(ctxt, input, handler, -1)); in xmlSwitchInputEncoding()
1280 if (ctxt->input != NULL) { in xmlSwitchToEncodingInt()
1281 ret = xmlSwitchInputEncodingInt(ctxt, ctxt->input, handler, len); in xmlSwitchToEncodingInt()
1325 xmlFreeInputStream(xmlParserInputPtr input) { in xmlFreeInputStream() argument
1326 if (input == NULL) return; in xmlFreeInputStream()
1328 if (input->filename != NULL) xmlFree((char *) input->filename); in xmlFreeInputStream()
1329 if (input->directory != NULL) xmlFree((char *) input->directory); in xmlFreeInputStream()
1330 if (input->encoding != NULL) xmlFree((char *) input->encoding); in xmlFreeInputStream()
1331 if (input->version != NULL) xmlFree((char *) input->version); in xmlFreeInputStream()
1332 if ((input->free != NULL) && (input->base != NULL)) in xmlFreeInputStream()
1333 input->free((xmlChar *) input->base); in xmlFreeInputStream()
1334 if (input->buf != NULL) in xmlFreeInputStream()
1335 xmlFreeParserInputBuffer(input->buf); in xmlFreeInputStream()
1336 xmlFree(input); in xmlFreeInputStream()
1349 xmlParserInputPtr input; in xmlNewInputStream() local
1351 input = (xmlParserInputPtr) xmlMalloc(sizeof(xmlParserInput)); in xmlNewInputStream()
1352 if (input == NULL) { in xmlNewInputStream()
1356 memset(input, 0, sizeof(xmlParserInput)); in xmlNewInputStream()
1357 input->line = 1; in xmlNewInputStream()
1358 input->col = 1; in xmlNewInputStream()
1359 input->standalone = -1; in xmlNewInputStream()
1367 input->id = ctxt->input_id++; in xmlNewInputStream()
1369 return(input); in xmlNewInputStream()
1384 xmlNewIOInputStream(xmlParserCtxtPtr ctxt, xmlParserInputBufferPtr input, in xmlNewIOInputStream() argument
1388 if (input == NULL) return(NULL); in xmlNewIOInputStream()
1396 inputStream->buf = input; in xmlNewIOInputStream()
1417 xmlParserInputPtr input; in xmlNewEntityInputStream() local
1455 input = xmlNewInputStream(ctxt); in xmlNewEntityInputStream()
1456 if (input == NULL) { in xmlNewEntityInputStream()
1460 input->filename = (char *) xmlStrdup((xmlChar *) entity->URI); in xmlNewEntityInputStream()
1461 input->base = entity->content; in xmlNewEntityInputStream()
1464 input->cur = entity->content; in xmlNewEntityInputStream()
1465 input->length = entity->length; in xmlNewEntityInputStream()
1466 input->end = &entity->content[input->length]; in xmlNewEntityInputStream()
1467 return(input); in xmlNewEntityInputStream()
1480 xmlParserInputPtr input; in xmlNewStringInputStream() local
1490 input = xmlNewInputStream(ctxt); in xmlNewStringInputStream()
1491 if (input == NULL) { in xmlNewStringInputStream()
1495 input->base = buffer; in xmlNewStringInputStream()
1496 input->cur = buffer; in xmlNewStringInputStream()
1497 input->length = xmlStrlen(buffer); in xmlNewStringInputStream()
1498 input->end = &buffer[input->length]; in xmlNewStringInputStream()
1499 return(input); in xmlNewStringInputStream()
1577 xmlParserInputPtr input; in xmlInitParserCtxt() local
1615 ctxt->input = NULL; in xmlInitParserCtxt()
1618 while ((input = inputPop(ctxt)) != NULL) { /* Non consuming */ in xmlInitParserCtxt()
1619 xmlFreeInputStream(input); in xmlInitParserCtxt()
1622 ctxt->input = NULL; in xmlInitParserCtxt()
1647 ctxt->input = NULL; in xmlInitParserCtxt()
1665 ctxt->input = NULL; in xmlInitParserCtxt()
1686 ctxt->input = NULL; in xmlInitParserCtxt()
1763 xmlParserInputPtr input; in xmlFreeParserCtxt() local
1767 while ((input = inputPop(ctxt)) != NULL) { /* Non consuming */ in xmlFreeParserCtxt()
1768 xmlFreeInputStream(input); in xmlFreeParserCtxt()