- configure.in libxslt/Makefile.am: fixed bug #54953
authorDaniel Veillard <veillard@src.gnome.org>
Tue, 22 May 2001 14:59:48 +0000 (14:59 +0000)
committerDaniel Veillard <veillard@src.gnome.org>
Tue, 22 May 2001 14:59:48 +0000 (14:59 +0000)
- libxslt/attributes.c: cleanup pointed by Joe Orton
- libxslt/xsltproc.c: added --catalogs to load catalogs from
  $SGML_CATALOG_FILES
- libxslt/functions.c: cleanup unreached code
- configure.in config.h.in libxslt/xsltproc.c: guarded the
  include with preprocessor definitions
Daniel

ChangeLog
Makefile.am
config.h.in
configure.in
libxslt/Makefile.am
libxslt/attributes.c
libxslt/functions.c
libxslt/xsltproc.c

index 76807adea9a6ecb64cb68d99fada9c8eab5c2c65..71a267d54a6f7d0e00c785f4a8e3ba3b67e86328 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Tue May 22 15:09:02 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+       * configure.in libxslt/Makefile.am: fixed bug #54953
+       * libxslt/attributes.c: cleanup pointed by Joe Orton
+       * libxslt/xsltproc.c: added --catalogs to load catalogs from
+         $SGML_CATALOG_FILES
+       * libxslt/functions.c: cleanup unreached code
+       * configure.in config.h.in libxslt/xsltproc.c: guarded the
+         include with preprocessor definitions
+
 Sun May 20 20:55:00 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
 
        * tests/documents/Makefile.am tests/general/Makefile.am
index af9dfa0c7136a8bc5c0ca79d9b5f70733937f7bb..c2430634277b2b208fe08fdeb42dae054b60efce 100644 (file)
@@ -26,9 +26,11 @@ xsltConf.sh: xsltConf.sh.in Makefile
               < $(srcdir)/xsltConf.sh.in > xsltConf.tmp \
        && mv xsltConf.tmp xsltConf.sh
 
+check-local: tests
+
 dummy:
 
-test tests: dummy
+tests: dummy
        @(cd tests ; make test)
 
 cleantar:
index 62fec7a912c4d37bc292343e3cc8eab46be42285..ac7b2ebd5df969f65f2b3ca8057028fa697f619f 100644 (file)
 
 /* Define if you have the <nan.h> header file.  */
 #undef HAVE_NAN_H
+
+/* Define if you have the <stdlib.h> header file.  */
+#undef HAVE_STDLIB_H
+
+/* Define if you have the <string.h> header file.  */
+#undef HAVE_STRING_H
+
+/* Define if you have the <sys/time.h> header file.  */
+#undef HAVE_SYS_TIME_H
+
+/* Define if you have the <sys/types.h> header file.  */
+#undef HAVE_SYS_TYPES_H
+
+/* Define if you have the <unistd.h> header file.  */
+#undef HAVE_UNISTD_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Version number of package */
+#undef VERSION
+
index 012bf19857970b2222af7b04afc33e7d30d2e7c5..7235993e0f0da588256b4f88f7465821c7857e6b 100644 (file)
@@ -19,7 +19,7 @@ AC_SUBST(LIBXSLT_VERSION_NUMBER)
 VERSION=${LIBXSLT_VERSION}
 
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
+AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
 AM_MAINTAINER_MODE
 
 dnl
@@ -36,6 +36,7 @@ dnl
 dnl Math detection
 dnl
 
+AC_CHECK_HEADERS(sys/types.h sys/time.h stdlib.h unistd.h string.h)
 AC_CHECK_HEADERS(ieeefp.h nan.h math.h fp_class.h float.h ansidecl.h)
 AC_CHECK_FUNC(isnan, , AC_CHECK_LIB(m, isnan,
   [M_LIBS="-lm"; AC_DEFINE(HAVE_ISNAN)]))
@@ -60,7 +61,7 @@ AC_CHECK_PROG(PERL, perl, perl, false)
 AM_CONDITIONAL(WITH_PERL, test "$PERL" != "false")
 
 dnl
-dnl Debug for DV
+dnl Debug for DV (-Wunreachable-code)
 dnl
 if test "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XSLT" ; then
     if test "${with_mem_debug}" = "" ; then
index fade0d3999f2a5cc88f40c6986d86dff03300064..db1168e184670f1f052d44e16a86788f20c44b6c 100644 (file)
@@ -43,6 +43,7 @@ libxslt_la_SOURCES =                  \
        transform.c
 
 libxslt_la_LIBADD = $(EXTRA_LIBS)
+libxslt_la_LDFLAGS = -version-info @LIBXSLT_VERSION_INFO@
 
 # what is this include dir ?
 # libxsltincdir = $(includedir)/libxslt
index 06478b70e4a8eb552272f79e09620b4a01dc4dd1..b38517eb29f241b0ededaef186a6928578407145 100644 (file)
@@ -246,7 +246,7 @@ xsltParseStylesheetAttributeSet(xsltStylesheetPtr style, xmlNodePtr cur) {
     xmlChar *prefix = NULL;
     xmlChar *attributes;
     xmlChar *attribute, *end;
-    xmlNodePtr list, delete;
+    xmlNodePtr list;
     xsltAttrElemPtr values;
 
     if ((cur == NULL) || (style == NULL))
@@ -282,14 +282,12 @@ xsltParseStylesheetAttributeSet(xsltStylesheetPtr style, xmlNodePtr cur) {
      * check the children list
      */
     list = cur->children;
-    delete = NULL;
     while (list != NULL) {
        if (IS_XSLT_ELEM(list)) {
            if (!IS_XSLT_NAME(list, "attribute")) {
                xsltGenericError(xsltGenericErrorContext,
                    "xslt:attribute-set : unexpected child xsl:%s\n",
                                 list->name);
-               delete = list;
            } else {
 #ifdef WITH_XSLT_DEBUG_ATTRIBUTES
                xsltGenericDebug(xsltGenericDebugContext,
@@ -300,7 +298,6 @@ xsltParseStylesheetAttributeSet(xsltStylesheetPtr style, xmlNodePtr cur) {
        } else {
            xsltGenericError(xsltGenericErrorContext,
                "xslt:attribute-set : unexpected child %s\n", list->name);
-           delete = list;
        }
        list = list->next;
     }
index 6848749cd61a7b078b340bfaf009f7f18764bb35..18b1c863567a4f9f6295f3683a5126bc96f5ed2d 100644 (file)
@@ -373,7 +373,6 @@ xsltFormatNumberFunction(xmlXPathParserContextPtr ctxt, int nargs)
        break;
     default:
        XP_ERROR(XPATH_INVALID_ARITY);
-       return;
     }
 
     if (xsltFormatNumberConversion(formatValues,
index 554327e9a0b078677b0108cd465336b342e92d95..4386fa840ac03841b65d39d1ae0c42769954f846 100644 (file)
@@ -6,10 +6,20 @@
  * Daniel.Veillard@imag.fr
  */
 
+#include <libxml/xmlversion.h>
+#include <libxslt/xsltconfig.h>
+#ifdef HAVE_STRING_H
 #include <string.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
+#endif
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#include <libxml/xmlversion.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
 #include <libxml/xmlmemory.h>
 #include <libxml/debugXML.h>
 #include <libxml/HTMLtree.h>
@@ -20,6 +30,9 @@
 #ifdef LIBXML_XINCLUDE_ENABLED
 #include <libxml/xinclude.h>
 #endif
+#ifdef LIBXML_CATALOG_ENABLED
+#include <libxml/catalog.h>
+#endif
 #include <libxslt/xslt.h>
 #include <libxslt/xsltInternals.h>
 #include <libxslt/transform.h>
@@ -83,6 +96,9 @@ static void usage(const char *name) {
     printf("      --param name value : pass a (parameter,value) pair\n");
     printf("      --nonet refuse to fetch DTDs or entities over network\n");
     printf("      --warnnet warn against fetching over the network\n");
+#ifdef LIBXML_CATALOG_ENABLED
+    printf("      --catalogs : use the catalogs from $SGML_CATALOG_FILES\n");
+#endif
 }
 
 int
@@ -153,6 +169,18 @@ main(int argc, char **argv) {
                   (!strcmp(argv[i], "--nonet"))) {
            xmlSetExternalEntityLoader(xsltNoNetExternalEntityLoader);
            nonet = 1;
+#ifdef LIBXML_CATALOG_ENABLED
+       } else if ((!strcmp(argv[i], "-catalogs")) ||
+                (!strcmp(argv[i], "--catalogs"))) {
+           const char *catalogs;
+
+           catalogs = getenv("SGML_CATALOG_FILES");
+           if (catalogs == NULL) {
+               fprintf(stderr, "Variable $SGML_CATALOG_FILES not set\n");
+           } else {
+               xmlLoadCatalogs(catalogs);
+           }
+#endif
 #ifdef LIBXML_XINCLUDE_ENABLED
        } else if ((!strcmp(argv[i], "-xinclude")) ||
                   (!strcmp(argv[i], "--xinclude"))) {