• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/timemachine/gettext-0.17/gnulib-local/lib/libxml/

Lines Matching defs:input

237 /* we need to keep enough input to show errors in context */
269 * @in: an XML parser input
272 * This function refresh the input for the parser. It doesn't try to
273 * preserve pointers to the input buffer, and discard already read data
320 * @in: an XML parser input
323 * This function increase the input for the parser. It tries to
324 * preserve pointers to the input buffer, and keep already read data
380 * @in: an XML parser input
382 * This function removes used input for the parser.
436 * UTF8 character input and related functions *
444 * Skip to the next char input char.
451 (ctxt->input == NULL))
455 if ((*ctxt->input->cur == 0) &&
456 (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0) &&
475 if (*(ctxt->input->cur) == '\n') {
476 ctxt->input->line++; ctxt->input->col = 1;
478 ctxt->input->col++;
491 cur = ctxt->input->cur;
498 xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
505 xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
510 xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
515 ctxt->input->cur += 4;
522 ctxt->input->cur += 3;
536 ctxt->input->cur += 2;
539 ctxt->input->cur++;
542 if (*ctxt->input->cur == 0)
543 xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
552 if (*(ctxt->input->cur) == '\n') {
553 ctxt->input->line++; ctxt->input->col = 1;
555 ctxt->input->col++;
556 ctxt->input->cur++;
558 if (*ctxt->input->cur == 0)
559 xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
561 if ((*ctxt->input->cur == '%') && (!ctxt->html))
563 if ((*ctxt->input->cur == 0) &&
564 (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0))
570 * input encoding didn't get properly advertised in the
575 if ((ctxt == NULL) || (ctxt->input == NULL) ||
576 (ctxt->input->end - ctxt->input->cur < 4)) {
584 ctxt->input->cur[0], ctxt->input->cur[1],
585 ctxt->input->cur[2], ctxt->input->cur[3]);
591 ctxt->input->cur++;
601 * bytes in the input buffer. Implement the end of line normalization:
608 * line breaks to #xA on input, before parsing.)
615 if ((ctxt == NULL) || (len == NULL) || (ctxt->input == NULL)) return(0);
619 if ((*ctxt->input->cur >= 0x20) && (*ctxt->input->cur <= 0x7F)) {
621 return((int) *ctxt->input->cur);
635 const unsigned char *cur = ctxt->input->cur;
644 xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
650 xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
655 xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
686 if (*ctxt->input->cur == 0xD) {
687 if (ctxt->input->cur[1] == 0xA) {
689 ctxt->input->cur++;
693 return((int) *ctxt->input->cur);
702 if (*ctxt->input->cur == 0xD) {
703 if (ctxt->input->cur[1] == 0xA) {
705 ctxt->input->cur++;
709 return((int) *ctxt->input->cur);
712 * An encoding problem may arise from a truncated input buffer
716 if (ctxt->input->end - ctxt->input->cur < 4) {
723 * input encoding didn't get properly advertised in the
732 ctxt->input->cur[0], ctxt->input->cur[1],
733 ctxt->input->cur[2], ctxt->input->cur[3]);
740 return((int) *ctxt->input->cur);
750 * bytes in the input buffer.
825 * An encoding problem may arise from a truncated input buffer
829 if ((ctxt == NULL) || (ctxt->input == NULL) ||
830 (ctxt->input->end - ctxt->input->cur < 4)) {
836 * input encoding didn't get properly advertised in the
845 ctxt->input->cur[0], ctxt->input->cur[1],
846 ctxt->input->cur[2], ctxt->input->cur[3]);
929 * change the input functions when discovering the character encoding
958 if ((ctxt->input != NULL) &&
959 (ctxt->input->cur[0] == 0xEF) &&
960 (ctxt->input->cur[1] == 0xBB) &&
961 (ctxt->input->cur[2] == 0xBF)) {
962 ctxt->input->cur += 3;
967 /*The raw input characters are encoded
970 *ctxt->input->cur to contain UTF-8 encoded characters.
975 if ((ctxt->input != NULL) && (ctxt->input->cur != NULL) &&
976 (ctxt->input->cur[0] == 0xEF) &&
977 (ctxt->input->cur[1] == 0xBB) &&
978 (ctxt->input->cur[2] == 0xBF)) {
979 ctxt->input->cur += 3;
1046 (ctxt->input != NULL) &&
1047 (ctxt->input->encoding != NULL)) {
1048 ctxt->encoding = xmlStrdup(ctxt->input->encoding);
1080 * @input: the input stream
1083 * change the input functions when discovering the character encoding
1089 xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
1096 if (input == NULL)
1098 if (input->buf != NULL) {
1099 if (input->buf->encoder != NULL) {
1104 if (input->buf->encoder == handler)
1109 if ((!xmlStrncmp(BAD_CAST input->buf->encoder->name,
1122 xmlCharEncCloseFunc(input->buf->encoder);
1123 input->buf->encoder = handler;
1126 input->buf->encoder = handler;
1131 if ((input->buf->buffer != NULL) && (input->buf->buffer->use > 0)) {
1142 (input->cur[0] == 0xFF) && (input->cur[1] == 0xFE)) {
1143 input->cur += 2;
1147 (input->cur[0] == 0xFE) && (input->cur[1] == 0xFF)) {
1148 input->cur += 2;
1157 (input->cur[0] == 0xEF) &&
1158 (input->cur[1] == 0xBB) && (input->cur[2] == 0xBF)) {
1159 input->cur += 3;
1163 * Shrink the current input buffer.
1164 * Move it as the raw buffer and create a new input buffer
1166 processed = input->cur - input->base;
1167 xmlBufferShrink(input->buf->buffer, processed);
1168 input->buf->raw = input->buf->buffer;
1169 input->buf->buffer = xmlBufferCreate();
1170 input->buf->rawconsumed = processed;
1171 use = input->buf->raw->use;
1177 nbchars = xmlCharEncInFunc(input->buf->encoder,
1178 input->buf->buffer,
1179 input->buf->raw);
1187 nbchars = xmlCharEncFirstLine(input->buf->encoder,
1188 input->buf->buffer,
1189 input->buf->raw);
1197 input->buf->rawconsumed += use - input->buf->raw->use;
1198 input->base = input->cur = input->buf->buffer->content;
1199 input->end = &input->base[input->buf->buffer->use];
1203 } else if (input->length == 0) {
1208 xmlErrInternal(ctxt, "switching encoding : no input\n", NULL);
1219 * change the input functions when discovering the character encoding
1230 if (ctxt->input != NULL) {
1231 ret = xmlSwitchInputEncoding(ctxt, ctxt->input, handler);
1233 xmlErrInternal(ctxt, "xmlSwitchToEncoding : no input\n",
1254 * @input: an xmlParserInputPtr
1256 * Free up an input stream.
1259 xmlFreeInputStream(xmlParserInputPtr input) {
1260 if (input == NULL) return;
1262 if (input->filename != NULL) xmlFree((char *) input->filename);
1263 if (input->directory != NULL) xmlFree((char *) input->directory);
1264 if (input->encoding != NULL) xmlFree((char *) input->encoding);
1265 if (input->version != NULL) xmlFree((char *) input->version);
1266 if ((input->free != NULL) && (input->base != NULL))
1267 input->free((xmlChar *) input->base);
1268 if (input->buf != NULL)
1269 xmlFreeParserInputBuffer(input->buf);
1270 xmlFree(input);
1277 * Create a new input stream structure
1278 * Returns the new input stream or NULL
1282 xmlParserInputPtr input;
1285 input = (xmlParserInputPtr) xmlMalloc(sizeof(xmlParserInput));
1286 if (input == NULL) {
1287 xmlErrMemory(ctxt, "couldn't allocate a new input stream\n");
1290 memset(input, 0, sizeof(xmlParserInput));
1291 input->line = 1;
1292 input->col = 1;
1293 input->standalone = -1;
1298 input->id = id++;
1299 return(input);
1305 * @input: an I/O Input
1308 * Create a new input stream structure encapsulating the @input into
1311 * Returns the new input stream or NULL
1314 xmlNewIOInputStream(xmlParserCtxtPtr ctxt, xmlParserInputBufferPtr input,
1318 if (input == NULL) return(NULL);
1320 xmlGenericError(xmlGenericErrorContext, "new input from I/O\n");
1326 inputStream->buf = input;
1342 * Create a new input stream based on an xmlEntityPtr
1344 * Returns the new input stream or NULL
1348 xmlParserInputPtr input;
1357 "new input from entity: %s\n", entity->name);
1386 input = xmlNewInputStream(ctxt);
1387 if (input == NULL) {
1390 input->filename = (char *) entity->URI;
1391 input->base = entity->content;
1392 input->cur = entity->content;
1393 input->length = entity->length;
1394 input->end = &entity->content[input->length];
1395 return(input);
1403 * Create a new input stream based on a memory buffer.
1404 * Returns the new input stream
1408 xmlParserInputPtr input;
1417 "new fixed input: %.30s\n", buffer);
1418 input = xmlNewInputStream(ctxt);
1419 if (input == NULL) {
1420 xmlErrMemory(ctxt, "couldn't allocate a new input stream\n");
1423 input->base = buffer;
1424 input->cur = buffer;
1425 input->length = xmlStrlen(buffer);
1426 input->end = &buffer[input->length];
1427 return(input);
1435 * Create a new input stream based on a file or an URL.
1437 * Returns the new input stream or NULL in case of error
1448 "new input from file: %s\n", filename);
1507 xmlParserInputPtr input;
1543 ctxt->input = NULL;
1546 while ((input = inputPop(ctxt)) != NULL) { /* Non consuming */
1547 xmlFreeInputStream(input);
1550 ctxt->input = NULL;
1575 ctxt->input = NULL;
1593 ctxt->input = NULL;
1614 ctxt->input = NULL;
1675 xmlParserInputPtr input;
1679 while ((input = inputPop(ctxt)) != NULL) { /* Non consuming */
1680 xmlFreeInputStream(input);