From 1f23440f7922bcb217ecc00d121e046032854985 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Thu, 18 Sep 2003 09:31:46 +0000 Subject: [PATCH] small fixes w.r.t. IS_XSLT_REAL_NODE change some makefile "distclean" * libxslt/functions.c libxslt/numbers.c: small fixes w.r.t. IS_XSLT_REAL_NODE change * python/Makefile.am Makefile.am: some makefile "distclean" target improvement from Graham Wilson * xsltproc/xsltproc.c: small fix from Alexey Efimov for options display. Daniel --- ChangeLog | 9 +++++++++ Makefile.am | 2 ++ libxslt/functions.c | 3 ++- libxslt/numbers.c | 2 +- python/Makefile.am | 7 +++---- xsltproc/xsltproc.c | 2 ++ 6 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef65a226..46505568 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Thu Sep 18 11:28:43 CEST 2003 Daniel Veillard + + * libxslt/functions.c libxslt/numbers.c: small fixes w.r.t. + IS_XSLT_REAL_NODE change + * python/Makefile.am Makefile.am: some makefile "distclean" + target improvement from Graham Wilson + * xsltproc/xsltproc.c: small fix from Alexey Efimov for options + display. + Mon Sep 15 07:41:14 PDT 2003 William Brack * libxslt/xsltutils.h: Added XML_PI_NODE to the macro diff --git a/Makefile.am b/Makefile.am index e9daaa07..9ac06c2d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -47,6 +47,8 @@ xsltConf.sh: xsltConf.sh.in Makefile < $(srcdir)/xsltConf.sh.in > xsltConf.tmp \ && mv xsltConf.tmp xsltConf.sh +CLEANFILES = xsltConf.sh + check-local: tests dummy: diff --git a/libxslt/functions.c b/libxslt/functions.c index e66622c7..b068a1d0 100644 --- a/libxslt/functions.c +++ b/libxslt/functions.c @@ -301,7 +301,8 @@ xsltDocumentFunction(xmlXPathParserContextPtr ctxt, int nargs) xmlNodePtr target; target = obj2->nodesetval->nodeTab[0]; - if (target->type == XML_ATTRIBUTE_NODE) { + if ((target->type == XML_ATTRIBUTE_NODE) || + (target->type == XML_PI_NODE)) { target = ((xmlAttrPtr) target)->parent; } base = xmlNodeGetBase(target->doc, target); diff --git a/libxslt/numbers.c b/libxslt/numbers.c index 3fe569d9..94a69daa 100644 --- a/libxslt/numbers.c +++ b/libxslt/numbers.c @@ -215,7 +215,7 @@ xsltNumberFormatDecimal(xmlBufferPtr buffer, break; } pointer -= len; - strncpy((char *)pointer, temp_char, len); + strncpy((char *)pointer, (const char *)temp_char, len); } number /= 10.0; ++i; diff --git a/python/Makefile.am b/python/Makefile.am index 597984d1..b6ac5779 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -53,7 +53,8 @@ API_DESC = $(top_srcdir)/doc/libxslt-api.xml $(srcdir)/libxslt-python-api.xml GENERATED= $(srcdir)/libxsltclass.py \ $(srcdir)/libxslt-export.c \ $(srcdir)/libxslt-py.c \ - $(srcdir)/libxslt-py.h + $(srcdir)/libxslt-py.h \ + $(srcdir)/libxsltclass.txt $(GENERATED): gen_prog @@ -69,6 +70,4 @@ endif tests test: all cd tests && $(MAKE) tests -clean: - rm -f $(GENERATED) *.o libxslt.so *.pyc libxslt.py gen_prog - +CLEANFILES= $(GENERATED) *.o libxslt.so *.pyc libxslt.py gen_prog diff --git a/xsltproc/xsltproc.c b/xsltproc/xsltproc.c index 8bd9992d..0785171e 100644 --- a/xsltproc/xsltproc.c +++ b/xsltproc/xsltproc.c @@ -470,7 +470,9 @@ static void usage(const char *name) { printf("\t--output file or -o file: save to a given file\n"); printf("\t--timing: display the time used\n"); printf("\t--repeat: run the transformation 20 times\n"); +#ifdef LIBXML_DEBUG_ENABLED printf("\t--debug: dump the tree of the result instead\n"); +#endif printf("\t--dumpextensions: dump the registered extension elements and functions to stdout\n"); printf("\t--novalid skip the Dtd loading phase\n"); printf("\t--noout: do not dump the result\n");