Lines Matching refs:input
58 #define CUR(ctxt) ctxt->input->cur
59 #define END(ctxt) ctxt->input->end
426 (ctxt->input == NULL)) in xmlNextChar()
436 if ((*ctxt->input->cur == 0) && in xmlNextChar()
437 (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) { in xmlNextChar()
451 if (*(ctxt->input->cur) == '\n') { in xmlNextChar()
452 ctxt->input->line++; ctxt->input->col = 1; in xmlNextChar()
454 ctxt->input->col++; in xmlNextChar()
467 cur = ctxt->input->cur; in xmlNextChar()
474 xmlParserInputGrow(ctxt->input, INPUT_CHUNK); in xmlNextChar()
475 cur = ctxt->input->cur; in xmlNextChar()
483 xmlParserInputGrow(ctxt->input, INPUT_CHUNK); in xmlNextChar()
484 cur = ctxt->input->cur; in xmlNextChar()
490 xmlParserInputGrow(ctxt->input, INPUT_CHUNK); in xmlNextChar()
491 cur = ctxt->input->cur; in xmlNextChar()
497 ctxt->input->cur += 4; in xmlNextChar()
504 ctxt->input->cur += 3; in xmlNextChar()
518 ctxt->input->cur += 2; in xmlNextChar()
521 ctxt->input->cur++; in xmlNextChar()
531 if (*(ctxt->input->cur) == '\n') { in xmlNextChar()
532 ctxt->input->line++; ctxt->input->col = 1; in xmlNextChar()
534 ctxt->input->col++; in xmlNextChar()
535 ctxt->input->cur++; in xmlNextChar()
538 if (*ctxt->input->cur == 0) in xmlNextChar()
539 xmlParserInputGrow(ctxt->input, INPUT_CHUNK); in xmlNextChar()
549 if ((ctxt == NULL) || (ctxt->input == NULL) || in xmlNextChar()
550 (ctxt->input->end - ctxt->input->cur < 4)) { in xmlNextChar()
558 ctxt->input->cur[0], ctxt->input->cur[1], in xmlNextChar()
559 ctxt->input->cur[2], ctxt->input->cur[3]); in xmlNextChar()
565 ctxt->input->cur++; in xmlNextChar()
589 if ((ctxt == NULL) || (len == NULL) || (ctxt->input == NULL)) return(0); in xmlCurrentChar()
593 if ((*ctxt->input->cur >= 0x20) && (*ctxt->input->cur <= 0x7F)) { in xmlCurrentChar()
595 return((int) *ctxt->input->cur); in xmlCurrentChar()
609 const unsigned char *cur = ctxt->input->cur; in xmlCurrentChar()
618 xmlParserInputGrow(ctxt->input, INPUT_CHUNK); in xmlCurrentChar()
619 cur = ctxt->input->cur; in xmlCurrentChar()
625 xmlParserInputGrow(ctxt->input, INPUT_CHUNK); in xmlCurrentChar()
626 cur = ctxt->input->cur; in xmlCurrentChar()
632 xmlParserInputGrow(ctxt->input, INPUT_CHUNK); in xmlCurrentChar()
633 cur = ctxt->input->cur; in xmlCurrentChar()
671 if (*ctxt->input->cur == 0) in xmlCurrentChar()
672 xmlParserInputGrow(ctxt->input, INPUT_CHUNK); in xmlCurrentChar()
673 if ((*ctxt->input->cur == 0) && in xmlCurrentChar()
674 (ctxt->input->end > ctxt->input->cur)) { in xmlCurrentChar()
678 if (*ctxt->input->cur == 0xD) { in xmlCurrentChar()
679 if (ctxt->input->cur[1] == 0xA) { in xmlCurrentChar()
681 ctxt->input->cur++; in xmlCurrentChar()
685 return((int) *ctxt->input->cur); in xmlCurrentChar()
694 if (*ctxt->input->cur == 0xD) { in xmlCurrentChar()
695 if (ctxt->input->cur[1] == 0xA) { in xmlCurrentChar()
697 ctxt->input->cur++; in xmlCurrentChar()
701 return((int) *ctxt->input->cur); in xmlCurrentChar()
708 if (ctxt->input->end - ctxt->input->cur < 4) { in xmlCurrentChar()
724 ctxt->input->cur[0], ctxt->input->cur[1], in xmlCurrentChar()
725 ctxt->input->cur[2], ctxt->input->cur[3]); in xmlCurrentChar()
732 return((int) *ctxt->input->cur); in xmlCurrentChar()
821 if ((ctxt == NULL) || (ctxt->input == NULL) || in xmlStringCurrentChar()
822 (ctxt->input->end - ctxt->input->cur < 4)) { in xmlStringCurrentChar()
837 ctxt->input->cur[0], ctxt->input->cur[1], in xmlStringCurrentChar()
838 ctxt->input->cur[2], ctxt->input->cur[3]); in xmlStringCurrentChar()
920 xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
958 if ((ctxt->input != NULL) && in xmlSwitchEncoding()
959 (ctxt->input->cur[0] == 0xEF) && in xmlSwitchEncoding()
960 (ctxt->input->cur[1] == 0xBB) && in xmlSwitchEncoding()
961 (ctxt->input->cur[2] == 0xBF)) { in xmlSwitchEncoding()
962 ctxt->input->cur += 3; in xmlSwitchEncoding()
975 if ((ctxt->input != NULL) && (ctxt->input->cur != NULL) && in xmlSwitchEncoding()
976 (ctxt->input->cur[0] == 0xEF) && in xmlSwitchEncoding()
977 (ctxt->input->cur[1] == 0xBB) && in xmlSwitchEncoding()
978 (ctxt->input->cur[2] == 0xBF)) { in xmlSwitchEncoding()
979 ctxt->input->cur += 3; in xmlSwitchEncoding()
1070 (ctxt->input != NULL) && in xmlSwitchEncoding()
1071 (ctxt->input->encoding != NULL)) { in xmlSwitchEncoding()
1072 ctxt->encoding = xmlStrdup(ctxt->input->encoding); in xmlSwitchEncoding()
1129 xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input, in xmlSwitchInputEncodingInt() argument
1136 if (input == NULL) in xmlSwitchInputEncodingInt()
1138 if (input->buf != NULL) { in xmlSwitchInputEncodingInt()
1139 if (input->buf->encoder != NULL) { in xmlSwitchInputEncodingInt()
1144 if (input->buf->encoder == handler) in xmlSwitchInputEncodingInt()
1162 xmlCharEncCloseFunc(input->buf->encoder); in xmlSwitchInputEncodingInt()
1163 input->buf->encoder = handler; in xmlSwitchInputEncodingInt()
1166 input->buf->encoder = handler; in xmlSwitchInputEncodingInt()
1171 if (xmlBufIsEmpty(input->buf->buffer) == 0) { in xmlSwitchInputEncodingInt()
1182 (input->cur[0] == 0xFF) && (input->cur[1] == 0xFE)) { in xmlSwitchInputEncodingInt()
1183 input->cur += 2; in xmlSwitchInputEncodingInt()
1187 (input->cur[0] == 0xFE) && (input->cur[1] == 0xFF)) { in xmlSwitchInputEncodingInt()
1188 input->cur += 2; in xmlSwitchInputEncodingInt()
1197 (input->cur[0] == 0xEF) && in xmlSwitchInputEncodingInt()
1198 (input->cur[1] == 0xBB) && (input->cur[2] == 0xBF)) { in xmlSwitchInputEncodingInt()
1199 input->cur += 3; in xmlSwitchInputEncodingInt()
1206 processed = input->cur - input->base; in xmlSwitchInputEncodingInt()
1207 xmlBufShrink(input->buf->buffer, processed); in xmlSwitchInputEncodingInt()
1208 input->buf->raw = input->buf->buffer; in xmlSwitchInputEncodingInt()
1209 input->buf->buffer = xmlBufCreate(); in xmlSwitchInputEncodingInt()
1210 input->buf->rawconsumed = processed; in xmlSwitchInputEncodingInt()
1211 use = xmlBufUse(input->buf->raw); in xmlSwitchInputEncodingInt()
1217 nbchars = xmlCharEncInput(input->buf, 1); in xmlSwitchInputEncodingInt()
1225 nbchars = xmlCharEncFirstLineInput(input->buf, len); in xmlSwitchInputEncodingInt()
1227 xmlBufResetInput(input->buf->buffer, input); in xmlSwitchInputEncodingInt()
1234 input->buf->rawconsumed += use - xmlBufUse(input->buf->raw); in xmlSwitchInputEncodingInt()
1237 } else if (input->length == 0) { in xmlSwitchInputEncodingInt()
1270 xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input, in xmlSwitchInputEncoding() argument
1272 return(xmlSwitchInputEncodingInt(ctxt, input, handler, -1)); in xmlSwitchInputEncoding()
1294 if (ctxt->input != NULL) { in xmlSwitchToEncodingInt()
1295 ret = xmlSwitchInputEncodingInt(ctxt, ctxt->input, handler, len); in xmlSwitchToEncodingInt()
1339 xmlFreeInputStream(xmlParserInputPtr input) { in xmlFreeInputStream() argument
1340 if (input == NULL) return; in xmlFreeInputStream()
1342 if (input->filename != NULL) xmlFree((char *) input->filename); in xmlFreeInputStream()
1343 if (input->directory != NULL) xmlFree((char *) input->directory); in xmlFreeInputStream()
1344 if (input->encoding != NULL) xmlFree((char *) input->encoding); in xmlFreeInputStream()
1345 if (input->version != NULL) xmlFree((char *) input->version); in xmlFreeInputStream()
1346 if ((input->free != NULL) && (input->base != NULL)) in xmlFreeInputStream()
1347 input->free((xmlChar *) input->base); in xmlFreeInputStream()
1348 if (input->buf != NULL) in xmlFreeInputStream()
1349 xmlFreeParserInputBuffer(input->buf); in xmlFreeInputStream()
1350 xmlFree(input); in xmlFreeInputStream()
1363 xmlParserInputPtr input; in xmlNewInputStream() local
1365 input = (xmlParserInputPtr) xmlMalloc(sizeof(xmlParserInput)); in xmlNewInputStream()
1366 if (input == NULL) { in xmlNewInputStream()
1370 memset(input, 0, sizeof(xmlParserInput)); in xmlNewInputStream()
1371 input->line = 1; in xmlNewInputStream()
1372 input->col = 1; in xmlNewInputStream()
1373 input->standalone = -1; in xmlNewInputStream()
1381 input->id = ctxt->input_id++; in xmlNewInputStream()
1383 return(input); in xmlNewInputStream()
1398 xmlNewIOInputStream(xmlParserCtxtPtr ctxt, xmlParserInputBufferPtr input, in xmlNewIOInputStream() argument
1402 if (input == NULL) return(NULL); in xmlNewIOInputStream()
1410 inputStream->buf = input; in xmlNewIOInputStream()
1431 xmlParserInputPtr input; in xmlNewEntityInputStream() local
1469 input = xmlNewInputStream(ctxt); in xmlNewEntityInputStream()
1470 if (input == NULL) { in xmlNewEntityInputStream()
1474 input->filename = (char *) xmlStrdup((xmlChar *) entity->URI); in xmlNewEntityInputStream()
1475 input->base = entity->content; in xmlNewEntityInputStream()
1478 input->cur = entity->content; in xmlNewEntityInputStream()
1479 input->length = entity->length; in xmlNewEntityInputStream()
1480 input->end = &entity->content[input->length]; in xmlNewEntityInputStream()
1481 return(input); in xmlNewEntityInputStream()
1494 xmlParserInputPtr input; in xmlNewStringInputStream() local
1504 input = xmlNewInputStream(ctxt); in xmlNewStringInputStream()
1505 if (input == NULL) { in xmlNewStringInputStream()
1509 input->base = buffer; in xmlNewStringInputStream()
1510 input->cur = buffer; in xmlNewStringInputStream()
1511 input->length = xmlStrlen(buffer); in xmlNewStringInputStream()
1512 input->end = &buffer[input->length]; in xmlNewStringInputStream()
1513 return(input); in xmlNewStringInputStream()
1591 xmlParserInputPtr input; in xmlInitParserCtxt() local
1629 ctxt->input = NULL; in xmlInitParserCtxt()
1632 while ((input = inputPop(ctxt)) != NULL) { /* Non consuming */ in xmlInitParserCtxt()
1633 xmlFreeInputStream(input); in xmlInitParserCtxt()
1636 ctxt->input = NULL; in xmlInitParserCtxt()
1661 ctxt->input = NULL; in xmlInitParserCtxt()
1679 ctxt->input = NULL; in xmlInitParserCtxt()
1700 ctxt->input = NULL; in xmlInitParserCtxt()
1777 xmlParserInputPtr input; in xmlFreeParserCtxt() local
1781 while ((input = inputPop(ctxt)) != NULL) { /* Non consuming */ in xmlFreeParserCtxt()
1782 xmlFreeInputStream(input); in xmlFreeParserCtxt()