summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2001-11-22 18:10:38 +0000
committerDaniel Veillard <veillard@src.gnome.org>2001-11-22 18:10:38 +0000
commit95f6e42ef766d5dd8e1e4038cffd870eebb36635 (patch)
tree07e3b0efc5daa5265e447703c10f5ab4c5c09110
parent2b0ed20689a2fbbf9e4caf228da980561f27471e (diff)
downloadlibxslt-95f6e42ef766d5dd8e1e4038cffd870eebb36635.tar.gz
libxslt-95f6e42ef766d5dd8e1e4038cffd870eebb36635.tar.bz2
libxslt-95f6e42ef766d5dd8e1e4038cffd870eebb36635.zip
fixed xsltDebug() to output with the normal error routines updated the
* libxslt/extra.c: fixed xsltDebug() to output with the normal error routines * tests/namespaces/*: updated the tests to separate stdout and stderr * libxslt/transform.c: increasing xsltMaxDepth to 5000 Daniel
-rw-r--r--ChangeLog8
-rw-r--r--libxslt/extra.c35
-rw-r--r--libxslt/transform.c10
-rw-r--r--tests/namespaces/Makefile.am5
-rw-r--r--tests/namespaces/extra.err0
-rw-r--r--tests/namespaces/extra2.err3
-rw-r--r--tests/namespaces/extra2.out3
-rw-r--r--tests/namespaces/tst.err0
-rw-r--r--tests/namespaces/tst2.err0
-rw-r--r--tests/namespaces/tst3.err0
-rw-r--r--tests/namespaces/tst4.err0
11 files changed, 36 insertions, 28 deletions
diff --git a/ChangeLog b/ChangeLog
index 9186ec2d..81392e66 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Thu Nov 22 19:08:23 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * libxslt/extra.c: fixed xsltDebug() to output with the normal
+ error routines
+ * tests/namespaces/*: updated the tests to separate stdout and
+ stderr
+ * libxslt/transform.c: increasing xsltMaxDepth to 5000
+
Thu Nov 22 12:09:56 CET 2001 Daniel Veillard <daniel@veillard.com>
* configure.in libexslt/Makefile.am: more Makefile fixups
diff --git a/libxslt/extra.c b/libxslt/extra.c
index f0620b3c..eae261d0 100644
--- a/libxslt/extra.c
+++ b/libxslt/extra.c
@@ -61,45 +61,50 @@ xsltDebug(xsltTransformContextPtr ctxt, xmlNodePtr node ATTRIBUTE_UNUSED,
{
int i, j;
- fprintf(stdout, "Templates:\n");
+ xsltGenericError(xsltGenericErrorContext, "Templates:\n");
for (i = 0, j = ctxt->templNr - 1; ((i < 15) && (j >= 0)); i++, j--) {
- fprintf(stdout, "#%d ", i);
+ xsltGenericError(xsltGenericErrorContext, "#%d ", i);
if (ctxt->templTab[j]->name != NULL)
- fprintf(stdout, "name %s ", ctxt->templTab[j]->name);
+ xsltGenericError(xsltGenericErrorContext, "name %s ",
+ ctxt->templTab[j]->name);
if (ctxt->templTab[j]->match != NULL)
- fprintf(stdout, "name %s ", ctxt->templTab[j]->match);
+ xsltGenericError(xsltGenericErrorContext, "name %s ",
+ ctxt->templTab[j]->match);
if (ctxt->templTab[j]->mode != NULL)
- fprintf(stdout, "name %s ", ctxt->templTab[j]->mode);
- fprintf(stdout, "\n");
+ xsltGenericError(xsltGenericErrorContext, "name %s ",
+ ctxt->templTab[j]->mode);
+ xsltGenericError(xsltGenericErrorContext, "\n");
}
- fprintf(stdout, "Variables:\n");
+ xsltGenericError(xsltGenericErrorContext, "Variables:\n");
for (i = 0, j = ctxt->varsNr - 1; ((i < 15) && (j >= 0)); i++, j--) {
xsltStackElemPtr cur;
if (ctxt->varsTab[j] == NULL)
continue;
- fprintf(stdout, "#%d\n", i);
+ xsltGenericError(xsltGenericErrorContext, "#%d\n", i);
cur = ctxt->varsTab[j];
while (cur != NULL) {
if (cur->comp == NULL) {
- fprintf(stdout, "corrupted !!!\n");
+ xsltGenericError(xsltGenericErrorContext,
+ "corrupted !!!\n");
} else if (cur->comp->type == XSLT_FUNC_PARAM) {
- fprintf(stdout, "param ");
+ xsltGenericError(xsltGenericErrorContext, "param ");
} else if (cur->comp->type == XSLT_FUNC_VARIABLE) {
- fprintf(stdout, "var ");
+ xsltGenericError(xsltGenericErrorContext, "var ");
}
if (cur->name != NULL)
- fprintf(stdout, "%s ", cur->name);
+ xsltGenericError(xsltGenericErrorContext, "%s ",
+ cur->name);
else
- fprintf(stdout, "noname !!!!");
+ xsltGenericError(xsltGenericErrorContext, "noname !!!!");
#ifdef LIBXML_DEBUG_ENABLED
if (cur->value != NULL) {
xmlXPathDebugDumpObject(stdout, cur->value, 1);
} else {
- fprintf(stdout, "NULL !!!!");
+ xsltGenericError(xsltGenericErrorContext, "NULL !!!!");
}
#endif
- fprintf(stdout, "\n");
+ xsltGenericError(xsltGenericErrorContext, "\n");
cur = cur->next;
}
diff --git a/libxslt/transform.c b/libxslt/transform.c
index a18cf33c..2fa4eee5 100644
--- a/libxslt/transform.c
+++ b/libxslt/transform.c
@@ -62,19 +62,11 @@ static int xsltGetHTMLIDs(const xmlChar *version, const xmlChar **publicID,
#endif
#ifdef WITH_DEBUGGER
-
-/* -- breakpoint code --- */
#include "../breakpoint/breakpoint.h"
-
int xslDebugStatus;
-
-/* -------- end ---------- */
#endif
-
-
-
-int xsltMaxDepth = 500;
+int xsltMaxDepth = 5000;
/*
* Useful macros
diff --git a/tests/namespaces/Makefile.am b/tests/namespaces/Makefile.am
index be74b489..1e31b319 100644
--- a/tests/namespaces/Makefile.am
+++ b/tests/namespaces/Makefile.am
@@ -21,10 +21,13 @@ test tests: $(top_builddir)/xsltproc/xsltproc
if [ -d $$j ] ; then continue ; fi ; \
name="`basename $$j .xsl`"; \
out=$(srcdir)/"$$name".out; \
+ err=$(srcdir)/"$$name".err; \
echo $$j ; \
- $(top_builddir)/xsltproc/xsltproc $$j $$i > result.$$name;\
+ $(top_builddir)/xsltproc/xsltproc $$j $$i > result.$$name 2>err.$$name;\
if [ ! -f $$out ] ; then cp result.$$name $$out ; \
else diff $$out result.$$name ; fi ; \
+ if [ ! -f $$err ] ; then cp err.$$name $$err ; \
+ else diff $$err err.$$name ; fi ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true;\
rm -f result.$$name ; \
done)
diff --git a/tests/namespaces/extra.err b/tests/namespaces/extra.err
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/namespaces/extra.err
diff --git a/tests/namespaces/extra2.err b/tests/namespaces/extra2.err
new file mode 100644
index 00000000..a1c21e56
--- /dev/null
+++ b/tests/namespaces/extra2.err
@@ -0,0 +1,3 @@
+Templates:
+#0 name /
+Variables:
diff --git a/tests/namespaces/extra2.out b/tests/namespaces/extra2.out
index a1c21e56..e69de29b 100644
--- a/tests/namespaces/extra2.out
+++ b/tests/namespaces/extra2.out
@@ -1,3 +0,0 @@
-Templates:
-#0 name /
-Variables:
diff --git a/tests/namespaces/tst.err b/tests/namespaces/tst.err
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/namespaces/tst.err
diff --git a/tests/namespaces/tst2.err b/tests/namespaces/tst2.err
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/namespaces/tst2.err
diff --git a/tests/namespaces/tst3.err b/tests/namespaces/tst3.err
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/namespaces/tst3.err
diff --git a/tests/namespaces/tst4.err b/tests/namespaces/tst4.err
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/namespaces/tst4.err