diff --git a/debugXML.c b/debugXML.c index 75d0bf26..ed56b0f8 100644 --- a/debugXML.c +++ b/debugXML.c @@ -2792,7 +2792,7 @@ xmlShellPwd(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED, char *buffer, * using a environment similar to a UNIX commandline. */ void -xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input, +xmlShell(xmlDocPtr doc, const char *filename, xmlShellReadlineFunc input, FILE * output) { char prompt[500] = "/ > "; diff --git a/include/libxml/debugXML.h b/include/libxml/debugXML.h index 82746873..1332dd73 100644 --- a/include/libxml/debugXML.h +++ b/include/libxml/debugXML.h @@ -203,7 +203,7 @@ XMLPUBFUN int */ XMLPUBFUN void xmlShell (xmlDocPtr doc, - char *filename, + const char *filename, xmlShellReadlineFunc input, FILE *output); diff --git a/xmllint.c b/xmllint.c index 1bc119e0..31fe90a5 100644 --- a/xmllint.c +++ b/xmllint.c @@ -127,17 +127,17 @@ static int oldout = 0; #ifdef LIBXML_VALID_ENABLED static int valid = 0; static int postvalid = 0; -static char * dtdvalid = NULL; -static char * dtdvalidfpi = NULL; +static const char *dtdvalid = NULL; +static const char *dtdvalidfpi = NULL; #endif #ifdef LIBXML_SCHEMAS_ENABLED -static char * relaxng = NULL; +static const char *relaxng = NULL; static xmlRelaxNGPtr relaxngschemas = NULL; -static char * schema = NULL; +static const char *schema = NULL; static xmlSchemaPtr wxschemas = NULL; #endif #ifdef LIBXML_SCHEMATRON_ENABLED -static char * schematron = NULL; +static const char *schematron = NULL; static xmlSchematronPtr wxschematron = NULL; #endif static int repeat = 0; @@ -158,7 +158,7 @@ static int pushsize = 4096; static int memory = 0; #endif static int testIO = 0; -static char *encoding = NULL; +static const char *encoding = NULL; #ifdef LIBXML_XINCLUDE_ENABLED static int xinclude = 0; #endif @@ -1768,7 +1768,7 @@ static void processNode(xmlTextReaderPtr reader) { #endif } -static void streamFile(char *filename) { +static void streamFile(const char *filename) { xmlTextReaderPtr reader; int ret; #ifdef HAVE_MMAP @@ -2116,7 +2116,7 @@ static void doXPathQuery(xmlDocPtr doc, const char *query) { * Tree Test processing * * * ************************************************************************/ -static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { +static void parseAndPrintFile(const char *filename, xmlParserCtxtPtr rectxt) { xmlDocPtr doc = NULL; #ifdef LIBXML_TREE_ENABLED xmlDocPtr tmp;