| 792 | } |
| 793 | |
| 794 | static void |
| 795 | xmlVFormatLegacyError(void *ctx, const char *level, |
| 796 | const char *fmt, va_list ap) { |
| 797 | xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; |
| 798 | xmlParserInputPtr input = NULL; |
| 799 | xmlParserInputPtr cur = NULL; |
| 800 | xmlChar *str = NULL; |
| 801 | |
| 802 | if (ctxt != NULL) { |
| 803 | input = ctxt->input; |
| 804 | if ((input != NULL) && (input->filename == NULL) && |
| 805 | (ctxt->inputNr > 1)) { |
| 806 | cur = input; |
| 807 | input = ctxt->inputTab[ctxt->inputNr - 2]; |
| 808 | } |
| 809 | xmlParserPrintFileInfo(input); |
| 810 | } |
| 811 | |
| 812 | xmlGenericError(xmlGenericErrorContext, "%s: ", level); |
| 813 | |
| 814 | xmlStrVASPrintf(&str, MAX_ERR_MSG_SIZE, fmt, ap); |
| 815 | if (str != NULL) { |
| 816 | xmlGenericError(xmlGenericErrorContext, "%s", (char *) str); |
| 817 | xmlFree(str); |
| 818 | } |
| 819 | |
| 820 | if (ctxt != NULL) { |
| 821 | xmlParserPrintFileContext(input); |
| 822 | if (cur != NULL) { |
| 823 | xmlParserPrintFileInfo(cur); |
| 824 | xmlGenericError(xmlGenericErrorContext, "\n"); |
| 825 | xmlParserPrintFileContext(cur); |
| 826 | } |
| 827 | } |
| 828 | } |
| 829 | |
| 830 | /** |
| 831 | * xmlParserError: |
no test coverage detected