diff -Nru xalan-1.10/c/configure xalan-1.10/c/configure --- xalan-1.10/c/configure 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/configure 2005-01-07 16:37:28.000000000 +0000 @@ -914,7 +914,7 @@ else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi - cd "$ac_popdir" + cd $ac_popdir done fi @@ -1261,8 +1261,6 @@ - ac_config_headers="$ac_config_headers src/xalanc/Include/xalan-config.h" - ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -1832,7 +1830,8 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -1890,7 +1889,8 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2006,7 +2006,8 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2060,7 +2061,8 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2105,7 +2107,8 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2149,7 +2152,8 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2333,7 +2337,8 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2391,7 +2396,8 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2462,7 +2468,8 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2506,7 +2513,8 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2722,7 +2730,8 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2807,7 +2816,6 @@ case "${host}" in *-*-solaris*) platform=SOLARIS ;; *-*-linux*) platform=LINUX ;; - *-*-k*bsd*) platform=LINUX ;; *-*-freebsd*) platform=FREEBSD ;; *-*-netbsd*) platform=NETBSD ;; *-*-irix*) platform=IRIX ;; @@ -2868,7 +2876,8 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3183,7 +3192,8 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3384,7 +3394,8 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3598,7 +3609,38 @@ }' fi -DEFS=-DHAVE_CONFIG_H +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then we branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +cat >confdef2opt.sed <<\_ACEOF +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +t quote +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +t quote +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed + ac_libobjs= ac_ltlibobjs= @@ -3932,15 +3974,10 @@ --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE Configuration files: $config_files -Configuration headers: -$config_headers - Report bugs to ." _ACEOF @@ -4057,7 +4094,6 @@ "src/xalanc/Utils/XalanMsgLib/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/xalanc/Utils/XalanMsgLib/Makefile" ;; "samples/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;; "Tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tests/Makefile" ;; - "src/xalanc/Include/xalan-config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/xalanc/Include/xalan-config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; @@ -4070,7 +4106,6 @@ # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree @@ -4350,6 +4385,11 @@ *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ @@ -4388,12 +4428,6 @@ fi;; esac done` || { (exit 1); exit 1; } - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub @@ -4423,229 +4457,6 @@ done _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_HEADER section. -# - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' -ac_dC=' ' -ac_dD=',;t' -# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='$,\1#\2define\3' -ac_uC=' ' -ac_uD=',;t' - -for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - # Do quote $f, to prevent DOS paths from being IFS'd. - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in - -_ACEOF - -# Transform confdefs.h into two sed scripts, `conftest.defines' and -# `conftest.undefs', that substitutes the proper values into -# config.h.in to produce config.h. The first handles `#define' -# templates, and the second `#undef' templates. -# And first: Protect against being on the right side of a sed subst in -# config.status. Protect against being in an unquoted here document -# in config.status. -rm -f conftest.defines conftest.undefs -# Using a here document instead of a string reduces the quoting nightmare. -# Putting comments in sed scripts is not portable. -# -# `end' is used to avoid that the second main sed command (meant for -# 0-ary CPP macros) applies to n-ary macro definitions. -# See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\_ACEOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -_ACEOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC-DEFINE to be honored. -uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -rm -f confdef2sed.sed - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -_ACEOF - -# Break up conftest.defines because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -echo ' :' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.defines >/dev/null -do - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines -echo ' fi # grep' >>$CONFIG_STATUS -echo >>$CONFIG_STATUS - -# Break up conftest.undefs because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.undefs >/dev/null -do - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail - rm -f conftest.undefs - mv conftest.tail conftest.undefs -done -rm -f conftest.undefs - -cat >>$CONFIG_STATUS <<\_ACEOF - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - echo "/* Generated by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in - if test x"$ac_file" != x-; then - if diff $ac_file $tmp/config.h >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} - else - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - rm -f $ac_file - mv $tmp/config.h $ac_file - fi - else - cat $tmp/config.h - rm -f $tmp/config.h - fi -done -_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF diff -Nru xalan-1.10/c/configure.in xalan-1.10/c/configure.in --- xalan-1.10/c/configure.in 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/configure.in 2005-08-16 01:06:47.000000000 +0000 @@ -1,6 +1,5 @@ dnl Process this file with autoconf to produce a configure script AC_INIT(src/xalanc/PlatformSupport/PlatformSupportDefinitions.hpp) -AC_CONFIG_HEADER(src/xalanc/Include/xalan-config.h) dnl Checks for programs AC_PROG_CC @@ -45,7 +44,6 @@ case "${host}" in *-*-solaris*) platform=SOLARIS ;; *-*-linux*) platform=LINUX ;; - *-*-k*bsd*) platform=LINUX ;; *-*-freebsd*) platform=FREEBSD ;; *-*-netbsd*) platform=NETBSD ;; *-*-irix*) platform=IRIX ;; diff -Nru xalan-1.10/c/Makefile.in xalan-1.10/c/Makefile.in --- xalan-1.10/c/Makefile.in 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/Makefile.in 2004-04-06 15:08:44.000000000 +0000 @@ -31,9 +31,6 @@ Samples: $(MAKE) -C samples $@ -ApacheModuleXSLT: - $(MAKE) -C samples $@ - tests: $(MAKE) -C Tests $@ diff -Nru xalan-1.10/c/Makefile.incl.in xalan-1.10/c/Makefile.incl.in --- xalan-1.10/c/Makefile.incl.in 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/Makefile.incl.in 2005-10-04 21:25:21.000000000 +0000 @@ -127,7 +127,7 @@ LIB = $(CYG_PREFIX)$(PROJECT_NAME)$(LIB_MAJOR_VER)$(SHLIBSUFFIX) - PLATFORM_COMPILE_OPTIONS = -Wall -D${PLATFORM} -D_REENTRANT @DEFS@ + PLATFORM_COMPILE_OPTIONS = -Wall -D${PLATFORM} -D_REENTRANT CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS) CC4 = $(CC1) @@ -159,7 +159,7 @@ ifeq (${CXX}, xlC_r) - PLATFORM_COMPILE_OPTIONS = -qpic -D_AIX -D_THREAD_SAFE @DEFS@ + PLATFORM_COMPILE_OPTIONS = -qpic -D_AIX -D_THREAD_SAFE ALLLIBS = ${LIBS} -L/usr/lib CC2 = $(CXX) $(PLATFORM_COMPILE_OPTIONS) @@ -215,7 +215,7 @@ endif - PLATFORM_COMPILE_OPTIONS += ${PIC_OPTION} -D${PLATFORM} -D_REENTRANT @DEFS@ + PLATFORM_COMPILE_OPTIONS += ${PIC_OPTION} -D${PLATFORM} -D_REENTRANT # We need the ICU library if we are using the ICUBridge ifdef XALAN_USE_ICU @@ -244,7 +244,7 @@ SHLIBSUFFIX=.so PIC_OPTION = -fPIC - PLATFORM_COMPILE_OPTIONS = -D${PLATFORM} ${PIC_OPTION} ${WCSTOMBS} @DEFS@ + PLATFORM_COMPILE_OPTIONS = -D${PLATFORM} ${PIC_OPTION} ${WCSTOMBS} # We need the ICU library if we are using the ICUBridge ifdef XALAN_USE_ICU @@ -272,7 +272,7 @@ SHLIBSUFFIX=.so PIC_OPTION = -fPIC - PLATFORM_COMPILE_OPTIONS = -D${PLATFORM} ${PIC_OPTION} ${WCSTOMBS} @DEFS@ + PLATFORM_COMPILE_OPTIONS = -D${PLATFORM} ${PIC_OPTION} ${WCSTOMBS} # We need the ICU library if we are using the ICUBridge ifdef XALAN_USE_ICU @@ -296,7 +296,7 @@ ifeq ($(PLATFORM), HPUX) SUPPORTED = TRUE - PLATFORM_COMPILE_OPTIONS = +Z -D${PLATFORM} -D_THREAD_SAFE @DEFS@ + PLATFORM_COMPILE_OPTIONS = +Z -D${PLATFORM} -D_THREAD_SAFE # +p option removed, +W849 option added # to avoid error created by instantiated template symbol length limitation. # Also disable warning 930 about placement delete not implemented. @@ -323,7 +323,7 @@ ifeq (${CXX}, g++) - PLATFORM_COMPILE_OPTIONS = -Wall -fPIC -D${PLATFORM} -D_REENTRANT @DEFS@ + PLATFORM_COMPILE_OPTIONS = -Wall -fPIC -D${PLATFORM} -D_REENTRANT ifdef XALAN_USE_ICU LD_RPATH_PRE= -Wl,-rpath, @@ -371,7 +371,7 @@ ifeq (${CXX}, g++) - PLATFORM_COMPILE_OPTIONS = -Wall -fPIC -D${PLATFORM} -D_REENTRANT @DEFS@ + PLATFORM_COMPILE_OPTIONS = -Wall -fPIC -D${PLATFORM} -D_REENTRANT ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib -lc EXTRA_LINK_OPTIONS=-lc @@ -431,7 +431,7 @@ ifeq ($(PLATFORM), OS390) SUPPORTED = TRUE - PLATFORM_COMPILE_OPTIONS =-Wc,dll,"langlvl(extended),float(ieee)" -D${PLATFORM} -D_XOPEN_SOURCE_EXTENDED -DXALAN_XSLT_BUILD_DLL -DXALAN_PLATFORMSUPPORT_BUILD_DLL -DXALAN_DOM_BUILD_DLL -DXALAN_XALANEXTEXTENSIONS_BUILD_DLL -DXALAN_XALANSOURCETREE_BUILD_DLL -DXALAN_TRANSFORMER_BUILD_DLL -DXALAN_XERCESPARSERLIAISON_BUILD_DLL -DXALAN_XMLSUPPORT_BUILD_DLL -DXALAN_XPATH_BUILD_DLL -DXALAN_XPATHCAPI_BUILD_DLL -DXALAN_ALLINONE_BUILD_DLL -DXALAN_EXSLT_BUILD_DLL -DXALAN_ICUBRIDGE_BUILD_DLL -DXALAN_DOMSUPPORT_BUILD_DLL @DEFS@ + PLATFORM_COMPILE_OPTIONS =-Wc,dll,"langlvl(extended),float(ieee)" -D${PLATFORM} -D_XOPEN_SOURCE_EXTENDED -DXALAN_XSLT_BUILD_DLL -DXALAN_PLATFORMSUPPORT_BUILD_DLL -DXALAN_DOM_BUILD_DLL -DXALAN_XALANEXTEXTENSIONS_BUILD_DLL -DXALAN_XALANSOURCETREE_BUILD_DLL -DXALAN_TRANSFORMER_BUILD_DLL -DXALAN_XERCESPARSERLIAISON_BUILD_DLL -DXALAN_XMLSUPPORT_BUILD_DLL -DXALAN_XPATH_BUILD_DLL -DXALAN_XPATHCAPI_BUILD_DLL -DXALAN_ALLINONE_BUILD_DLL -DXALAN_EXSLT_BUILD_DLL -DXALAN_ICUBRIDGE_BUILD_DLL -DXALAN_DOMSUPPORT_BUILD_DLL ALLLIBS = ifeq (${OS390_XPLINK},1) SHLIBSUFFIX=.xplink.dll @@ -507,7 +507,7 @@ ifeq ($(PLATFORM), TRU64) SUPPORTED = TRUE - PLATFORM_COMPILE_OPTIONS = -D${PLATFORM} -ptr ${XSL_OBJ_DIR}/.cxx_repository -ieee -pthread -std strict_ansi_errors @DEFS@ + PLATFORM_COMPILE_OPTIONS = -D${PLATFORM} -ptr ${XSL_OBJ_DIR}/.cxx_repository -ieee -pthread -std strict_ansi_errors ALLLIBS = ${LIBS} -L/usr/lib -lm SHLIBSUFFIX = .so CC1 = $(CXX) ${CXXFLAGS} $(PLATFORM_COMPILE_OPTIONS) -nocxxstd @@ -522,7 +522,7 @@ ifeq ($(PLATFORM), MACOSX) SUPPORTED = TRUE - PLATFORM_COMPILE_OPTIONS = -Wall -fno-elide-constructors -D${PLATFORM} -D_REENTRANT -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS @DEFS@ + PLATFORM_COMPILE_OPTIONS = -Wall -fno-elide-constructors -D${PLATFORM} -D_REENTRANT -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib SHLIBSUFFIX=.dylib CC1 = ${CXX} $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS) @@ -543,7 +543,7 @@ ifeq ($(PLATFORM), OS400) SUPPORTED = TRUE - PLATFORM_COMPILE_OPTIONS = -v -D_MULTI_THREADED -D${PLATFORM} -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS @DEFS@ + PLATFORM_COMPILE_OPTIONS = -v -D_MULTI_THREADED -D${PLATFORM} -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS PLATFORM_C_COMPILE_OPTIONS = -v -D_MULTI_THREADED -D${PLATFORM} -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS ALLLIBS = MAKE_SHARED = ld -v ${LDFLAGS} diff -Nru xalan-1.10/c/samples/configure xalan-1.10/c/samples/configure --- xalan-1.10/c/samples/configure 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/samples/configure 2003-11-06 01:28:34.000000000 +0000 @@ -1171,7 +1171,6 @@ case "${host}" in *-*-solaris*) platform=SOLARIS ;; *-*-linux*) platform=LINUX ;; - *-*-k*bsd*) platform=LINUX ;; *-*-freebsd*) platform=FREEBSD ;; *-*-netbsd*) platform=NETBSD ;; *-*-irix*) platform=IRIX ;; diff -Nru xalan-1.10/c/samples/configure.in xalan-1.10/c/samples/configure.in --- xalan-1.10/c/samples/configure.in 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/samples/configure.in 2003-11-06 01:28:34.000000000 +0000 @@ -46,7 +46,6 @@ case "${host}" in *-*-solaris*) platform=SOLARIS ;; *-*-linux*) platform=LINUX ;; - *-*-k*bsd*) platform=LINUX ;; *-*-freebsd*) platform=FREEBSD ;; *-*-netbsd*) platform=NETBSD ;; *-*-irix*) platform=IRIX ;; diff -Nru xalan-1.10/c/samples/Makefile.in xalan-1.10/c/samples/Makefile.in --- xalan-1.10/c/samples/Makefile.in 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/samples/Makefile.in 2005-10-13 17:02:54.000000000 +0000 @@ -85,14 +85,17 @@ ApacheModuleXSLT: prepare $(XSL_LIB_DIR)/mod_xslt$(SHLIBSUFFIX) -$(XSL_LIB_DIR)/mod_xslt$(SHLIBSUFFIX) : $(SAMPLES_DIR)/ApacheModuleXSLT/mod_xslt.c - apxs -c $(XSL_INCL) -o $@ $(XSL_BUILD_OPTIONS) -L$(XSL_LIB_DIR) $(XALAN_LIB) $(SAMPLES_DIR)/ApacheModuleXSLT/mod_xslt.c +$(XSL_LIB_DIR)/mod_xslt$(SHLIBSUFFIX) : $(XSL_OBJ_DIR)/mod_xslt.o + $(MAKE_SHARED) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ + $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) +$(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/ApacheModuleXSLT/%.c + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) -I/usr/include/apache/ $(EXTRA_COMPILE_OPTIONS) -o $@ $< CompileStylesheet: prepare $(XSL_BIN_DIR)/CompileStylesheet $(XSL_BIN_DIR)/CompileStylesheet: $(XSL_OBJ_DIR)/CompileStylesheet.o $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ - $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/CompileStylesheet/%.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -100,7 +103,7 @@ $(XSL_BIN_DIR)/DocumentBuilder: $(XSL_OBJ_DIR)/DocumentBuilder.o $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ - $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/DocumentBuilder/%.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -108,7 +111,7 @@ $(XSL_BIN_DIR)/ExternalFunction: $(XSL_OBJ_DIR)/ExternalFunction.o $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ - $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/ExternalFunction/%.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -116,7 +119,7 @@ $(XSL_BIN_DIR)/ParsedSourceWrappers: $(XSL_OBJ_DIR)/ParsedSourceWrappers.o $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ - $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/ParsedSourceWrappers/%.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -124,7 +127,7 @@ $(XSL_BIN_DIR)/SerializeNodeSet: $(XSL_OBJ_DIR)/SerializeNodeSet.o $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ - $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/SerializeNodeSet/%.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -132,7 +135,7 @@ $(XSL_BIN_DIR)/SimpleTransform: $(XSL_OBJ_DIR)/SimpleTransform.o $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ - $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/SimpleTransform/%.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -140,7 +143,7 @@ $(XSL_BIN_DIR)/SimpleXPathAPI: $(XSL_OBJ_DIR)/SimpleXPathAPI.o $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ - $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/SimpleXPathAPI/%.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -148,7 +151,7 @@ $(XSL_BIN_DIR)/SimpleXPathCAPI: $(XSL_OBJ_DIR)/SimpleXPathCAPI.o $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ - $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/SimpleXPathCAPI/%.c $(CC4) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -156,7 +159,7 @@ $(XSL_BIN_DIR)/StreamTransform: $(XSL_OBJ_DIR)/StreamTransform.o $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ - $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/StreamTransform/%.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -164,7 +167,7 @@ $(XSL_BIN_DIR)/TraceListen: $(XSL_OBJ_DIR)/TraceListen.o $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ - $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/TraceListen/%.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -172,7 +175,7 @@ $(XSL_BIN_DIR)/TransformToXercesDOM: $(XSL_OBJ_DIR)/TransformToXercesDOM.o $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ - $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/TransformToXercesDOM/%.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -180,7 +183,7 @@ $(XSL_BIN_DIR)/UseStylesheetParam: $(XSL_OBJ_DIR)/UseStylesheetParam.o $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ - $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/UseStylesheetParam/%.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -188,7 +191,7 @@ $(XSL_BIN_DIR)/XalanTransform: $(XSL_OBJ_DIR)/XalanTransform.o $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ - $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/XalanTransform/%.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -196,7 +199,7 @@ $(XSL_BIN_DIR)/XalanTransformerCallback: $(XSL_OBJ_DIR)/XalanTransformerCallback.o $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ - $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/XalanTransformerCallback/%.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -204,7 +207,7 @@ $(XSL_BIN_DIR)/ThreadSafe: $(XSL_OBJ_DIR)/ThreadSafe.o $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ - $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/ThreadSafe/%.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< diff -Nru xalan-1.10/c/src/xalanc/Include/CygwinDefinitions.hpp xalan-1.10/c/src/xalanc/Include/CygwinDefinitions.hpp --- xalan-1.10/c/src/xalanc/Include/CygwinDefinitions.hpp 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/src/xalanc/Include/CygwinDefinitions.hpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -/* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#if !defined(GCCDEFINITIONS_HEADER_GUARD_1357924680) -#define GCCDEFINITIONS_HEADER_GUARD_1357924680 - - - -// --------------------------------------------------------------------------- -// A define in the build for each project is also used to control whether -// the export keyword is from the project's viewpoint or the client's. -// These defines provide the platform specific keywords that they need -// to do this. -// --------------------------------------------------------------------------- -#define XALAN_PLATFORM_EXPORT -#define XALAN_PLATFORM_IMPORT -#define XALAN_PLATFORM_EXPORT_FUNCTION(T) T XALAN_PLATFORM_EXPORT -#define XALAN_PLATFORM_IMPORT_FUNCTION(T) T XALAN_PLATFORM_IMPORT - - - - - -#if __GNUC__ < 3 -#define XALAN_CLASSIC_IOSTREAMS -#define XALAN_NO_MEMBER_TEMPLATES -#define XALAN_NO_STD_ALLOCATORS -#define XALAN_NO_USING_DECLARATION -#endif - -// As of 3.1, std::numeric_limits is broken, so -// we don't use it. -#define XALAN_NO_STD_NUMERIC_LIMITS -#define XALAN_SGI_BASED_STL -#define XALAN_XALANDOMCHAR_USHORT_MISMATCH -#define XALAN_POSIX2_AVAILABLE -#define XALAN_INLINE_INITIALIZATION -#define XALAN_HAS_CPP_NAMESPACE - -#define XALAN_UNALIGNED - -#define XALAN_NO_FIRST_NULL_PARAM_FOR_MBSTOWS -#define XALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS - -#undef WIN32 - -#endif // GCCDEFINITIONS_HEADER_GUARD_1357924680 diff -Nru xalan-1.10/c/src/xalanc/Include/GCCDefinitions.hpp xalan-1.10/c/src/xalanc/Include/GCCDefinitions.hpp --- xalan-1.10/c/src/xalanc/Include/GCCDefinitions.hpp 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/src/xalanc/Include/GCCDefinitions.hpp 2005-10-17 18:23:49.000000000 +0000 @@ -16,7 +16,7 @@ #if !defined(GCCDEFINITIONS_HEADER_GUARD_1357924680) #define GCCDEFINITIONS_HEADER_GUARD_1357924680 -#include + // --------------------------------------------------------------------------- // A define in the build for each project is also used to control whether diff -Nru xalan-1.10/c/src/xalanc/Include/XalanArrayKeyMap.hpp xalan-1.10/c/src/xalanc/Include/XalanArrayKeyMap.hpp --- xalan-1.10/c/src/xalanc/Include/XalanArrayKeyMap.hpp 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/src/xalanc/Include/XalanArrayKeyMap.hpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,336 +0,0 @@ -/* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#if !defined(XALAN_ARRAYKEYMAP_HEADER_GUARD) -#define XALAN_ARRAYKEYMAP_HEADER_GUARD - - - -#include -#include -#include - - - -XALAN_CPP_NAMESPACE_BEGIN - - - -template -class XalanArrayKeyMap -{ -public: - -#if defined(XALAN_NO_STD_NAMESPACE) - typedef vector VectorType; - typedef map MapType; - typedef deque VectorHolderType; -#else - typedef std::vector VectorType; - typedef std::map MapType; - typedef std::deque VectorHolderType; -#endif - - typedef typename MapType::key_type key_type; - typedef typename MapType::value_type value_type; - typedef ValueType referent_type; - typedef CompareType key_compare; -#if !defined(XALAN_NO_STD_ALLOCATORS) - typedef typename MapType::allocator_type allocator_type; -#endif - typedef typename MapType::size_type size_type; - typedef typename MapType::difference_type difference_type; - typedef typename MapType::reference reference; - typedef typename MapType::const_reference const_reference; - typedef typename MapType::iterator iterator; - typedef typename MapType::const_iterator const_iterator; - typedef typename MapType::reverse_iterator reverse_iterator; - typedef typename MapType::const_reverse_iterator const_reverse_iterator; - -#if defined(XALAN_NO_STD_NAMESPACE) - typedef pair insert_pair_type; - typedef pair range_pair_type; - typedef pair const_range_pair_type; -#else - typedef std::pair insert_pair_type; - typedef std::pair range_pair_type; - typedef std::pair const_range_pair_type; -#endif - - explicit - XalanArrayKeyMap() : - m_map(), - m_keyData() - { - } - - XalanArrayKeyMap(const XalanArrayKeyMap& theOther) - { - *this = theOther; - } - - ~XalanArrayKeyMap() - { - } - - XalanArrayKeyMap& - operator=(const XalanArrayKeyMap& theRHS) - { - if (&theRHS != this) - { - XalanArrayKeyMap theTemp; - - const const_iterator theEnd = - theRHS.end(); - - const_iterator i = theRHS.begin(); - - while(i != theEnd) - { - theTemp.insert(*i); - - ++i; - } - - swap(theTemp); - } - - return *this; - } - - bool - operator==(const XalanArrayKeyMap& theRHS) const - { - return m_map == theRHS.m_map; - } - - size_type - size() const - { - return m_map.size(); - } - - size_type - max_size() const - { - return m_map.max_size(); - } - - bool - empty() const - { - return m_map.empty(); - } - - iterator - begin() - { - return m_map.begin(); - } - - const_iterator - begin() const - { - return m_map.begin(); - } - - iterator - end() - { - return m_map.end(); - } - - const_iterator - end() const - { - return m_map.end(); - } - - reverse_iterator - rbegin() - { - return m_map.rbegin(); - } - - const_reverse_iterator - rbegin() const - { - return m_map.rbegin(); - } - - reverse_iterator - rend() - { - return m_map.rend(); - } - - const_reverse_iterator - rend() const - { - return m_map.rend(); - } - - insert_pair_type - insert(const value_type& thePair) - { - m_keyData.push_back(VectorHolderType::value_type(thePair.first, thePair.first + (length(thePair.first) + 1))); - - return m_map.insert(value_type(&*m_keyData.back().begin(), thePair.second)); - } - - referent_type& - operator[](const key_type& theKey) - { - const iterator i = find(theKey); - - if (i == end()) - { - return (*(insert(value_type(theKey, referent_type()))).first).second; - } - else - { - return (*i).second; - } - } - - iterator - find(const key_type& theKey) - { - return m_map.find(theKey); - } - - const_iterator - find(const key_type& theKey) const - { - return m_map.find(theKey); - } - - iterator - lower_bound(const key_type& theKey) - { - return m_map.lower_bound(theKey); - } - - const_iterator - lower_bound(const key_type& theKey) const - { - return m_map.lower_bound(theKey); - } - - iterator - upper_bound(const key_type& theKey) - { - return m_map.upper_bound(theKey); - } - - const_iterator - upper_bound(const key_type& theKey) const - { - return m_map.upper_bound(theKey); - } - - range_pair_type - equal_range(const key_type& theKey) - { - return m_map.equal_range(theKey); - } - - const_range_pair_type - equal_range(const key_type& theKey) const - { - return m_map.equal_range(theKey); - } - -#if defined(XALAN_STLPORT_STL) && !defined(__STL_MEMBER_TEMPLATES) - void - erase(iterator theIterator) - { - // $$$ ToDo: Does not empty vector in the - // deque!!! - m_map.erase(theIterator); - } - - void - erase( - iterator theFirst, - iterator theLast) - { - // $$$ ToDo: Does not empty vector in the - // deque!!! - m_map.erase(theFirst, theLast); - } -#else - iterator - erase(iterator theIterator) - { - // $$$ ToDo: Does not empty vector in the - // deque!!! - return m_map.erase(theIterator); - } - - iterator - erase( - iterator theFirst, - iterator theLast) - { - // $$$ ToDo: Does not empty vector in the - // deque!!! - return m_map.erase(theFirst, theLast); - } -#endif - - size_type - erase(const key_type& theKey) - { - // $$$ ToDo: Does not empty vector in the - // deque!!! - return m_map.erase(theKey); - } - - void - swap(XalanArrayKeyMap& theOther) - { - m_map.swap(theOther.m_map); - - m_keyData.swap(theOther.m_keyData); - } - -private: - - size_type - length(const key_type& theKey) - { - key_type theCurrent = theKey; - - while(*theCurrent != 0) - { - ++theCurrent; - } - - return theCurrent - theKey; - } - - MapType m_map; - - VectorHolderType m_keyData; -}; - - - -XALAN_CPP_NAMESPACE_END - - - -#endif diff -Nru xalan-1.10/c/src/xalanc/Include/xalan-config.h.in xalan-1.10/c/src/xalanc/Include/xalan-config.h.in --- xalan-1.10/c/src/xalanc/Include/xalan-config.h.in 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/src/xalanc/Include/xalan-config.h.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -/* Include/xalan-config.h.in. Generated automatically from configure.in by autoheader. */ - -/* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ -#undef WORDS_BIGENDIAN diff -Nru xalan-1.10/c/src/xalanc/Makefile.in xalan-1.10/c/src/xalanc/Makefile.in --- xalan-1.10/c/src/xalanc/Makefile.in 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/src/xalanc/Makefile.in 2005-08-18 14:01:15.000000000 +0000 @@ -172,7 +172,7 @@ "//'$(LOADSAMP)(${BATCH_XALAN_UTIL_NAME})'": ${XSL_OBJ_DIR}/XalanExe.o ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} \ - ${EXTRA_LINK_OPTIONS} $^ $(XALAN_LIB) $(ALLLIBS) -o $@ + ${EXTRA_LINK_OPTIONS} $(XALAN_LIB) $(ALLLIBS) $^ -o $@ ${XSL_OBJ_DIR}/XalanExe.o: $(XALANEXE_DIR)/XalanExe.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -180,7 +180,7 @@ "//'$(LOADSAMP)(${BATCH_TEST_UTIL_NAME})'": ${XSL_OBJ_DIR}/process.o ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} \ - ${EXTRA_LINK_OPTIONS} $^ $(XALAN_LIB) $(ALLLIBS) -o $@ + ${EXTRA_LINK_OPTIONS} $(XALAN_LIB) $(ALLLIBS) $^ -o $@ ${XSL_OBJ_DIR}/process.o: $(TESTXSLT_DIR)/process.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -190,7 +190,7 @@ $(XSL_BIN_DIR)/Xalan: ${XSL_OBJ_DIR}/XalanExe.o ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} \ - ${EXTRA_LINK_OPTIONS} $^ $(XALAN_LIB) $(ALLLIBS) -o $@ $(OTHER_LINK_PARAMETERS) + ${EXTRA_LINK_OPTIONS} $(XALAN_LIB) $(ALLLIBS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ${XSL_OBJ_DIR}/XalanExe.o: $(XALANEXE_DIR)/XalanExe.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< endif @@ -199,7 +199,7 @@ $(XSL_BIN_DIR)/testXSLT: ${XSL_OBJ_DIR}/process.o ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} \ - ${EXTRA_LINK_OPTIONS} $^ $(XALAN_LIB) $(ALLLIBS) -o $@ $(OTHER_LINK_PARAMETERS) + ${EXTRA_LINK_OPTIONS} $(XALAN_LIB) $(ALLLIBS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ${XSL_OBJ_DIR}/process.o: $(TESTXSLT_DIR)/process.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -207,7 +207,7 @@ $(XSL_BIN_DIR)/testXPath: ${XSL_OBJ_DIR}/TestXPath.o ${XSL_OBJ_DIR}/NodeNameTreeWalker.o ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} \ - ${EXTRA_LINK_OPTIONS} $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + ${EXTRA_LINK_OPTIONS} $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ${XSL_OBJ_DIR}/%.o:$(TESTXPATH_DIR)/%.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -230,7 +230,7 @@ $(MAKE) -C Utils $@ $(XSL_LIB_DIR)/$(LIB): $(ALL_OBJECTS) - $(MAKE_SHARED) $(PLATFORM_LIBRARIES) $(EXTRA_LINK_OPTIONS) $(LINK_SONAME) $^ $(ALLLIBS) -o $@ $(OTHER_LINK_LIB_PARAMERES) + $(MAKE_SHARED) $(PLATFORM_LIBRARIES) $(EXTRA_LINK_OPTIONS) $(LINK_SONAME) $(ALLLIBS) $^ -o $@ $(OTHER_LINK_LIB_PARAMERES) ifeq ($(PLATFORM), OS390) mv *.x ${XSL_LIB_DIR} else diff -Nru xalan-1.10/c/src/xalanc/PlatformSupport/DirectoryEnumerator.hpp xalan-1.10/c/src/xalanc/PlatformSupport/DirectoryEnumerator.hpp --- xalan-1.10/c/src/xalanc/PlatformSupport/DirectoryEnumerator.hpp 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/src/xalanc/PlatformSupport/DirectoryEnumerator.hpp 2005-05-05 00:32:04.000000000 +0000 @@ -36,7 +36,7 @@ #include #include -#include + #include "xercesc/framework/MemoryManager.hpp" diff -Nru xalan-1.10/c/src/xalanc/Utils/MsgCreator/Makefile.in xalan-1.10/c/src/xalanc/Utils/MsgCreator/Makefile.in --- xalan-1.10/c/src/xalanc/Utils/MsgCreator/Makefile.in 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/src/xalanc/Utils/MsgCreator/Makefile.in 2004-04-06 15:08:45.000000000 +0000 @@ -29,7 +29,7 @@ $(XSL_BIN_DIR)/MsgCreator : $(MSG_CREATOR_OBJECTS) ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \ - ${EXTRA_LINK_OPTIONS} $^ $(XERCES_LIB) -o $@ $(LOC_OTHER_LINK_PARAMETERS) + ${EXTRA_LINK_OPTIONS} $(XERCES_LIB) $^ -o $@ $(LOC_OTHER_LINK_PARAMETERS) $(XSL_OBJ_DIR)/%.o : $(MSG_CREATOR_SRC)/%.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< diff -Nru xalan-1.10/c/src/xalanc/XalanDOM/XalanDOMString.cpp xalan-1.10/c/src/xalanc/XalanDOM/XalanDOMString.cpp --- xalan-1.10/c/src/xalanc/XalanDOM/XalanDOMString.cpp 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/src/xalanc/XalanDOM/XalanDOMString.cpp 2005-08-08 15:25:52.000000000 +0000 @@ -19,7 +19,7 @@ #include -#include + #include diff -Nru xalan-1.10/c/src/xalanc/XalanExe/XalanExe.cpp xalan-1.10/c/src/xalanc/XalanExe/XalanExe.cpp --- xalan-1.10/c/src/xalanc/XalanExe/XalanExe.cpp 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/src/xalanc/XalanExe/XalanExe.cpp 2005-04-29 21:39:46.000000000 +0000 @@ -19,7 +19,6 @@ #include -#include #if defined(XALAN_CLASSIC_IOSTREAMS) #include #else diff -Nru xalan-1.10/c/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp xalan-1.10/c/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp --- xalan-1.10/c/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp 2005-06-14 19:49:49.000000000 +0000 @@ -1460,7 +1460,7 @@ static const XalanEXSLTFunctionAcos s_acosFunction; static const XalanEXSLTFunctionAsin s_asinFunction; static const XalanEXSLTFunctionAtan s_atanFunction; -static const XalanEXSLTFunctionAtan2 s_atan2Function; +static const XalanEXSLTFunctionAtan s_atan2Function; static const XalanEXSLTFunctionConstant s_constantFunction; static const XalanEXSLTFunctionCos s_cosFunction; static const XalanEXSLTFunctionExp s_expFunction; diff -Nru xalan-1.10/c/src/xalanc/XMLSupport/FormatterToHTML.cpp xalan-1.10/c/src/xalanc/XMLSupport/FormatterToHTML.cpp --- xalan-1.10/c/src/xalanc/XMLSupport/FormatterToHTML.cpp 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/src/xalanc/XMLSupport/FormatterToHTML.cpp 2005-06-30 21:52:35.000000000 +0000 @@ -26,7 +26,7 @@ #include -#include + #include diff -Nru xalan-1.10/c/src/xalanc/XSLT/ElemNumber.cpp xalan-1.10/c/src/xalanc/XSLT/ElemNumber.cpp --- xalan-1.10/c/src/xalanc/XSLT/ElemNumber.cpp 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/src/xalanc/XSLT/ElemNumber.cpp 2005-07-26 20:09:17.000000000 +0000 @@ -15,7 +15,7 @@ */ #include "ElemNumber.hpp" -#include + #include diff -Nru xalan-1.10/c/src/xalanc/XSLT/TraceListenerDefault.cpp xalan-1.10/c/src/xalanc/XSLT/TraceListenerDefault.cpp --- xalan-1.10/c/src/xalanc/XSLT/TraceListenerDefault.cpp 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/src/xalanc/XSLT/TraceListenerDefault.cpp 2005-04-29 21:39:44.000000000 +0000 @@ -155,7 +155,7 @@ if (isEmpty(theNamespace) == false) { m_printWriter.print(theNamespace); - m_printWriter.write(XalanUnicode::charColon); + m_printWriter.print(XalanUnicode::charColon); } m_printWriter.print(theName.getLocalPart()); diff -Nru xalan-1.10/c/src/xalanc/XSLT/XalanTemplate.cpp xalan-1.10/c/src/xalanc/XSLT/XalanTemplate.cpp --- xalan-1.10/c/src/xalanc/XSLT/XalanTemplate.cpp 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/src/xalanc/XSLT/XalanTemplate.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,798 +0,0 @@ -/* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -// Base include file. Must be first. -#include - - - -#if !defined(XALAN_NEEDS_EXPLICIT_TEMPLATE_INSTANTIATION) - - // No-op function to allow file to compile and link. - static void foo(){} - -#else - -#include - -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include - -#include -#include - - - -#include - - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - - -#include - - - -#include -#include -#include -#include -#include -#include -#include -#include - - - -#include -#include -#include -#include -#include - - - -#include -#include -#include -#include - - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - - -#include -#include -#include - - - -#if defined(XALAN_USE_ICU) -#include -#endif - - - -static void -foo(XPathExecutionContext& theExecutionContext) -{ - XALAN_USING_STD(for_each) - XALAN_USING_STD(replace) - - { - vector theDOMStringVector; - vector theCharVector; - vector theWCharVector; - vector theUnsignedCharVector; - AttributeListImpl::AttributeVectorType theAttributeVectorEntryVector; - AttributesImpl::AttributesVectorType theAttributesVectorEntryVector; - allocator theAllocator; - XPathExpression::TokenQueueType theTokenQueueType; - set > theXalanNodeSet; - XPathExecutionContext::XObjectArgVectorType theVector; - Stylesheet::PatternTableVectorType thePatternTableVector; - map > theIntMap; - vector theNamespacesMapTypeIteratorVector; - VariablesStack::ParamsVectorType theParamsVector; - set > theInstanceSetType; - XalanTransformer::CompiledStylesheetPtrVectorType theCompiledStylesheetVector; - XalanTransformer::ParsedSourcePtrVectorType theParsedSourceVector; - XalanTransformer::ParamPairVectorType theParamsPairVector; - XalanTransformer::TraceListenerVectorType theTraceListenerVector; - XalanDOMStringHashTable::BucketCountsType theBucketCountsVector; - vector > theStringPairVector; - } - - { - XObjectFactoryDefault::XObjectCollectionType theVector; - XObjectFactoryDefault theFactory; - - for_each(theVector.begin(), - theVector.end(), - XObjectFactoryDefault::DeleteXObjectFunctor(theFactory, true)); - } - - { - XPathFactoryDefault::CollectionType theVector; - XPathFactoryDefault theXPath; - - for_each(theVector.begin(), - theVector.end(), - XPathFactoryDefault::DeleteXPathFunctor(theXPath, true)); - } - - { - XalanDOMStringCache::StringListType theVector; - - for_each(theVector.begin(), - theVector.end(), - DeleteFunctor()); - } - - { - AttributeListImpl::AttributeVectorType theVector; - - for_each(theVector.begin(), - theVector.end(), - DeleteFunctor()); - } - - { - AttributesImpl::AttributesVectorType theVector; - - for_each(theVector.begin(), - theVector.end(), - DeleteFunctor()); - } - - { - typedef XPathEnvSupportDefault::NamespaceFunctionTableDeleteFunctor NamespaceFunctionTableDeleteFunctor; - - typedef NamespaceFunctionTableDeleteFunctor::FunctionTableInnerType FunctionTableType; - typedef NamespaceFunctionTableDeleteFunctor::NamespaceFunctionTablesInnerType NamespaceFunctionTablesType; - - NamespaceFunctionTablesType theTable; - - const NamespaceFunctionTablesType::value_type theValue; - - for_each(theTable.begin(), - theTable.end(), - NamespaceFunctionTableDeleteFunctor()); - } - - { - XercesDocumentBridge::NodeVectorType theVector; - - for_each(theVector.begin(), - theVector.end(), - DeleteFunctor()); - } - - { - XercesNamedNodeListCache::NodeListCacheType theCache; - - for_each(theCache.begin(), - theCache.end(), - MapValueDeleteFunctor()); - } - - { - Stylesheet::AttributeSetVectorType theVector; - - for_each( - theVector.begin(), - theVector.end(), - DeleteFunctor()); - } - - { - StylesheetExecutionContextDefault::KeyTablesTableType theTable; - - for_each(theTable.begin(), - theTable.end(), - MapValueDeleteFunctor()); - } - - { - Stylesheet::ExtensionNamespacesMapType theMap; - - for_each(theMap.begin(), - theMap.end(), - makeMapValueDeleteFunctor(theMap)); - } - - { - Stylesheet::StylesheetVectorType theVector; - - for_each(theVector.begin(), - theVector.end(), - DeleteFunctor()); - } - - { - Stylesheet::ElemDecimalFormatVectorType theVector; - - for_each(theVector.begin(), - theVector.end(), - DeleteFunctor()); - } - - { - Stylesheet::ElemVariableVectorType theVector; - - for_each(theVector.begin(), - theVector.end(), - DeleteFunctor()); - } - - { - Stylesheet::ElemVariableVectorType theVector; - - for_each(theVector.begin(), - theVector.end(), - DeleteFunctor()); - } - - { - const Stylesheet::PatternTableVectorType theList; - - for_each( - theList.begin(), - theList.end(), - DeleteFunctor()); - } - - { - StylesheetHandler::ElemTemplateStackType theVector; - - for_each(theVector.begin(), - theVector.end(), - DeleteFunctor()); - } - - { - const VariablesStack::ParamsVectorType theVector; - VariablesStack theVariablesStack; - - for_each(theVector.begin(), - theVector.end(), - VariablesStack::PushParamFunctor(theVariablesStack)); - } - - { - ElemForEach::SortElemsVectorType theVector; - - for_each(theVector.begin(), - theVector.end(), - DeleteFunctor()); - } - - { - StylesheetConstructionContextDefault::StylesheetVectorType theVector; - - StylesheetRoot* theStylesheetRoot; - - find( - theVector.begin(), - theVector.end(), - theStylesheetRoot); - - for_each( - theVector.begin(), - theVector.end(), - DeleteFunctor()); - } - - { - XALAN_USING_STD(sort) - - StylesheetRoot::XalanQNameVectorType theVector; - - sort( - theVector.begin(), - theVector.end(), - pointer_less()); - } - - { - StylesheetExecutionContextDefault::FormatterListenerVectorType theVector; - - for_each( - theVector.begin(), - theVector.end(), - DeleteFunctor()); - } - - { - StylesheetExecutionContextDefault::PrintWriterVectorType theVector; - - for_each( - theVector.begin(), - theVector.end(), - DeleteFunctor()); - } - - { - StylesheetExecutionContextDefault::OutputStreamVectorType theVector; - - for_each( - theVector.begin(), - theVector.end(), - DeleteFunctor()); - } - - { - typedef StylesheetExecutionContextDefault::XPathCacheMapType XPathCacheMapType; - typedef StylesheetExecutionContextDefault::XPathCacheReturnFunctor XPathCacheReturnFunctor; - - XPathCacheMapType theMap; - - XSLTEngineImpl* const xsltProcessor = 0; - - for_each(theMap.begin(), - theMap.end(), - XPathCacheReturnFunctor(*xsltProcessor)); - } - - - { - XSLTEngineImpl::TraceListenerVectorType theVector; - - const GenerateEvent* theEvent; - - for_each( - theVector.begin(), - theVector.end(), - TraceListener::TraceListenerGenerateFunctor(*theEvent)); - } - - { - XSLTEngineImpl::TraceListenerVectorType theVector; - - const SelectionEvent* theEvent; - - for_each( - theVector.begin(), - theVector.end(), - TraceListener::TraceListenerSelectFunctor(*theEvent)); - } - - { - XSLTEngineImpl::TraceListenerVectorType theVector; - - const TracerEvent* theEvent; - - for_each( - theVector.begin(), - theVector.end(), - TraceListener::TraceListenerTraceFunctor(*theEvent)); - } - - { - XalanSourceTreeParserLiaison::DocumentMapType theMap; - - for_each(theMap.begin(), - theMap.end(), - makeMapValueDeleteFunctor(theMap)); - } - - { - XSLTEngineImpl::TraceListenerVectorType theVector; - - remove( - theVector.begin(), - theVector.end(), - XSLTEngineImpl::TraceListenerVectorType::value_type(0)); - } - - { - XSLTEngineImpl::XalanDOMStringPointerVectorType theVector; - - XalanDOMString nodeName; - - find_if( - theVector.begin(), - theVector.end(), - XSLTEngineImpl::FindStringPointerFunctor(nodeName)); - } - - - { - XalanDOMString theString; - - replace( - theString.begin(), - theString.end(), - XalanDOMChar(XalanUnicode::charReverseSolidus), - XalanDOMChar(XalanUnicode::charSolidus)); - } - - { - NodeRefList::NodeListVectorType theVector; - - remove( - theVector.begin(), - theVector.end(), - NodeRefList::NodeListVectorType::value_type(0)); - } - - { - XALAN_USING_STD(back_inserter) - XALAN_USING_STD(copy) - - typedef MutableNodeRefList::addNodeInDocOrderFunctor addNodeInDocOrderFunctor; - - { - NodeRefList::NodeListVectorType theVector; - - copy( - theVector.rbegin(), - theVector.rend(), - back_inserter(theVector)); - } - - { - MutableNodeRefList theList; - - MutableNodeRefList::addNodeInDocOrderFunctor theFunctor(theList, theExecutionContext); - - const NodeRefList::NodeListVectorType theConstVector; - - for_each( - theConstVector.begin(), - theConstVector.end(), - theFunctor); - - for_each( - theConstVector.rbegin(), - theConstVector.rend(), - theFunctor); - } - } - - { - NodeSorter::NodeVectorType theVector; - NodeSorter::NodeSortKeyCompare* theComparer; - - stable_sort( - theVector.begin(), - theVector.end(), - *theComparer); - } - - { - XalanTransformer::CompiledStylesheetPtrVectorType theVector; - - for_each(theVector.begin(), - theVector.end(), - DeleteFunctor()); - } - - { - XalanTransformer::ParsedSourcePtrVectorType theVector; - - for_each(theVector.begin(), - theVector.end(), - DeleteFunctor()); - } - -#if defined(XALAN_USE_ICU) - { - ICUBridgeCollationCompareFunctorImpl::CollatorCacheListType theCache; - - for_each( - theCache.begin(), - theCache.end(), - ICUBridgeCollationCompareFunctorImpl::CollationCacheStruct::CollatorDeleteFunctor()); - - find_if( - theCache.begin(), - theCache.end(), - ICUBridgeCollationCompareFunctorImpl::CollationCacheStruct::CollatorFindFunctor(0)); - } -#endif - -#if __SGI_STL_PORT >= 452 - - { - VariablesStack::RecursionGuardStackType theStack; - - const ElemVariable* const var = 0; - - find( - theStack.begin(), - theStack.end(), - var); - } - - { - XalanTransformer::CompiledStylesheetPtrVectorType theVector; - - const XalanCompiledStylesheet* theStylesheet = 0; - - find( - theVector.begin(), - theVector.end(), - theStylesheet); - } - - { - XalanTransformer::ParsedSourcePtrVectorType theVector; - - const XalanParsedSource* theParsedSource = 0; - - find( - theVector.begin(), - theVector.end(), - theParsedSource); - } - - { - const XMLCh* const name = 0; - - AttributeListImpl::AttributeVectorType theVector; - - find_if( - theVector.begin(), - theVector.end(), - AttributeListImpl::NameCompareFunctor(name)); - } - - { - const XMLCh* const name = 0; - - const AttributeListImpl::AttributeVectorType theVector; - - find_if( - theVector.begin(), - theVector.end(), - AttributeListImpl::NameCompareFunctor(name)); - } - - { - const XMLCh* const uri = 0; - const XMLCh* const localName = 0; - - const AttributesImpl::AttributesVectorType theVector; - - find_if( - theVector.begin(), - theVector.end(), - AttributesImpl::URIAndLocalNameCompareFunctor(uri, localName)); - } - - { - const XMLCh* const uri = 0; - const XMLCh* const localName = 0; - - const AttributesImpl::AttributesVectorType theVector; - - find_if( - theVector.begin(), - theVector.end(), - AttributesImpl::URIAndLocalNameCompareFunctor(uri, localName)); - } - - { - const XMLCh* const name = 0; - - AttributesImpl::AttributesVectorType theVector; - - find_if( - theVector.begin(), - theVector.end(), - AttributesImpl::NameCompareFunctor(name)); - } - - { - const XMLCh* const name = 0; - - const AttributesImpl::AttributesVectorType theVector; - - find_if( - theVector.begin(), - theVector.end(), - AttributesImpl::NameCompareFunctor(name)); - } - - { - const XalanDOMChar* theString = 0; - - const XalanDOMStringHashTable::BucketType theBucket; - - find_if( - theBucket.begin(), - theBucket.end(), - XalanDOMStringHashTable::equalsXalanDOMString(theString, 0)); - } - - { - const XalanNode* theXalanNode = 0; - - const XercesToXalanNodeMap::XercesNodeMapType theMap; - - find_if( - theMap.begin(), - theMap.end(), - XercesToXalanNodeMap::NameMapEqualsFunctor(theXalanNode)); - } - - { - const XalanNode* theXalanNode = 0; - - NodeRefList::NodeListVectorType theVector; - - find( - theVector.begin(), - theVector.end(), - theXalanNode); - } - - { - const XalanNode* theXalanNode = 0; - - const NodeRefList::NodeListVectorType theVector; - - find( - theVector.begin(), - theVector.end(), - theXalanNode); - } - - { - const Stylesheet::MatchPattern2* thePattern = 0; - - Stylesheet::PatternTableVectorType theVector; - - find( - theVector.begin(), - theVector.end(), - thePattern); - } - - { - XalanNode* theXalanNode = 0; - - XercesDocumentBridge::NodeVectorType theVector; - - find( - theVector.begin(), - theVector.end(), - theXalanNode); - } - - { - XalanDOMString* theString = 0; - - XalanDOMStringCache::StringListType theList; - - find( - theList.begin(), - theList.end(), - theString); - } - - { - const XalanQName* theQName; - - const StylesheetRoot::XalanQNameVectorType theVector; - - find_if( - theVector.begin(), - theVector.end(), - pointer_equals_predicate(theQName)); - } - - { - const StylesheetHandler::BoolStackType theStack; - - find( - theStack.rbegin(), - theStack.rend(), - true); - } - - { - const ElemTemplateElement* theElement = 0; - - const StylesheetExecutionContextDefault::ElementRecursionStackType theStack; - - find( - theStack.begin(), - theStack.end(), - theElement); - } - - { - XObjectFactoryDefault::XObjectCollectionType theCollection; - XObject* theXObject; - - find( - theCollection.begin(), - theCollection.end(), - theXObject); - } - - { - XPath::TargetDataVectorType theVector; - } -#endif -} - - - -#include -#include - - -void -foo2() -{ - __node_alloc<0,0> alloc1; - __node_alloc<1,0> alloc2; -} - - - -#endif diff -Nru xalan-1.10/c/Tests/Harness/FileUtility.cpp xalan-1.10/c/Tests/Harness/FileUtility.cpp --- xalan-1.10/c/Tests/Harness/FileUtility.cpp 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/Tests/Harness/FileUtility.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,1930 +0,0 @@ -/* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "FileUtility.hpp" - - - -#include -#include -#include -#include -#include -#include - -#if defined(WIN32) -#include -#define PATH_MAX _MAX_PATH -#define chdir _chdir -#define getcwd _getcwd -#define mkdir _mkdir -#else -#if !defined(PATH_MAX) -#define PATH_MAX 2000 -#endif -#define DIR_MODE_BITS 509 -#include -#include -extern "C" int mkdir(const char*, mode_t mode); -#endif - - -#if defined(XALAN_CLASSIC_IOSTREAMS) -#include -#include -#else -#include -#include -#endif - -#if !defined(NDEBUG) && defined(_MSC_VER) -#include -#endif - - - -#include - - - -#include -#include -#include -#include - - - -#include -#include - - - -#include -#include -#include - - - -#include - - - -#include -#include - - - -#include "XMLFileReporter.hpp" - - - -XALAN_CPP_NAMESPACE_BEGIN - - - - -const char* const xalanNodeTypes[] = -{ - "UNKNOWN_NODE", - "ELEMENT_NODE", - "ATTRIBUTE_NODE", - "TEXT_NODE", - "CDATA_SECTION_NODE", - "ENTITY_REFERENCE_NODE", - "ENTITY_NODE", - "PROCESSING_INSTRUCTION_NODE", - "COMMENT_NODE", - "DOCUMENT_NODE", - "DOCUMENT_TYPE_NODE", - "DOCUMENT_FRAGMENT_NODE", - "NOTATION_NODE" -}; - - - -XALAN_USING_STD(cerr) -XALAN_USING_STD(cout) -XALAN_USING_STD(endl) - - -const XalanDOMString FileUtility::s_emptyString; - - - -FileUtility::reportStruct::reportStruct() : - theDrive(), - testOrFile(), - xmlFileURL(), - xslFileURL(), - xmlFormat(), - msg(0), - currentNode(), - actual(), - expected(), - pass(0), - fail(0), - nogold(0) -{ -} - - - -void -FileUtility::reportStruct::reset() -{ - clear(testOrFile); - msg = ""; - clear(currentNode); - clear(actual); - clear(expected); -} - - - -FileUtility::cmdParams::cmdParams() : - help(), - base(), - output(), - gold(), - sub(), - source(0), - skip(false), - iters(0) -{ -} - - - -const char* -FileUtility::cmdParams::getHelpMessage() -{ - help << '\0'; - - const char* const data = help.str(); - -#if defined(HPUX) - help.rdbuf() -> freeze(false); -#else - help.freeze(false); -#endif - - return data; -} - - - -FileUtility::FileUtility() : - data(), - args() -{ - cout << endl - << "Using Xalan version " - << XALAN_FULLVERSIONDOT - << endl - << "Using Xerces version " - << XERCES_FULLVERSIONDOT - << endl - << endl; -} - - - -#if !defined(WIN32) -XalanDOMString -FileUtility::getDrive() -{ - return XalanDOMString(); -} -#else -XalanDOMString -FileUtility::getDrive() -{ - const char temp[] = - { - char(_getdrive() + 'A' - 1), - ':', - '\0' - }; - - return XalanDOMString(temp, sizeof(temp) - 1); -} -#endif - - -bool -FileUtility::getParams( - int argc, - char* argv[], - const char* outDir, - bool fsetGold) -{ - bool fSuccess = true; // Used to continue argument loop - bool fsetOut = true; // Set default output directory, set to false if data is provided - - args.skip = true; // Default values for performance testing parameters. - args.iters = 3; - - // Insure that required "-base" argument is there. - // - if (argc == 1 || argv[1][0] == '-') - { - cout << args.getHelpMessage(); - return false; - } - else - { - if (checkDir(XalanDOMString(argv[1]))) - { - assign(args.base, XalanDOMString(argv[1])); - } - else - { - cout << endl << "Given base directory \"" << argv[1] << "\" does not exist" << endl; - cout << args.getHelpMessage(); - return false; - } - } - - // Get the rest of the arguments. - // - for (int i = 2; i < argc && fSuccess == true; ++i) - { - if(!stricmp("-out", argv[i])) - { - ++i; - if(i < argc && argv[i][0] != '-') - { - assign(args.output, XalanDOMString(argv[i])); - append(args.output, s_pathSep); - checkAndCreateDir(args.output); - fsetOut = false; - } - else - { - cout << args.getHelpMessage(); - fSuccess = false; - } - } - else if(!stricmp("-gold", argv[i])) - { - ++i; - if(i < argc && argv[i][0] != '-') - { - assign(args.gold, XalanDOMString(argv[i])); - - if ( !checkDir(args.gold) ) - { - cout << "Given Gold dir - " << c_str(TranscodeToLocalCodePage(args.gold)) << " - does not exist" << endl; - fSuccess = false; - } - - append(args.gold, s_pathSep); - fsetGold = false; - } - else - { - cout << args.getHelpMessage(); - fSuccess = false; - } - } - else if(!stricmp("-source", argv[i])) - { - ++i; - if(i < argc && argv[i][0] != '-') - { - if (stricmp(argv[i],"XPL") == 0) - { - args.source = 1; - outDir = "DOM-XALAN"; - } - else if (stricmp(argv[i], "DOM") == 0) - { - args.source = 2; - outDir = "DOM-XERCES"; - } - else - { - cout << args.getHelpMessage(); - fSuccess = false; - } - } - else - { - cout << args.getHelpMessage(); - fSuccess = false; - } - } - else if(!stricmp("-sub", argv[i])) - { - ++i; - if(i < argc && argv[i][0] != '-') - { - assign(args.sub, XalanDOMString(argv[i])); - } - else - { - cout << args.getHelpMessage(); - fSuccess = false; - } - } - else if(!stricmp("-i", argv[i])) - { - args.skip = false; - } - else if(!stricmp("-iter", argv[i])) - { - ++i; - - // Make sure number is there and is greater then zero - if(i < argc && atol(argv[i]) > 0) - { - args.iters = atol(argv[i]); - } - else - { - cout << args.getHelpMessage(); - fSuccess = false; - } - } - else - { - cout << args.getHelpMessage(); - fSuccess = false; - } - - } // End of for-loop - - // Do we need to set the default output directory?? - // - if (fsetOut) - { - unsigned int ii = lastIndexOf(args.base,charAt(s_pathSep,0)); - - if (ii < length(args.base)) - { - args.output.assign(args.base, 0, ii + 1); - } - - append(args.output,XalanDOMString(outDir)); - checkAndCreateDir(args.output); - append(args.output,s_pathSep); - - } - // Do we need to set the default gold directory?? - // - if (fsetGold) - { - args.gold = args.base; - append(args.gold,XalanDOMString("-gold")); - if ( !checkDir(args.gold) ) - { - cout << "Assumed Gold dir - " << c_str(TranscodeToLocalCodePage(args.gold)) << " - does not exist" << endl; - fSuccess = false; - } - append(args.gold,s_pathSep); - } - - // Add the path seperator to the end of the base directory - // here after we've finished using it for all directory creation. - // - append(args.base,s_pathSep); - - return fSuccess; -} - - - -// This routine retrieves test file names from specified directories. -// Inputs: baseDir: typically "conf" or "perf" -// relDir: sub-directory to search. -// -// Notes: It builds the searchSpecification by concatenating all the -// necessary components. -// -FileUtility::FileNameVectorType -FileUtility::getTestFileNames( - const XalanDOMString& baseDir, - const XalanDOMString& relDir, - bool useDirPrefix) -{ - const XalanDOMString searchSuffix(XALAN_STATIC_UCODE_STRING("*.xsl")); - XalanDOMString searchSpecification; - - // Allow directory search w/o mandating files start with directory name. Required for files - // garnered from XSLTMARK performance directory exm. - if (useDirPrefix) - { - assign(searchSpecification, baseDir + relDir + s_pathSep + relDir + searchSuffix); - } - else - { - assign(searchSpecification, baseDir + relDir + s_pathSep + searchSuffix); - } - - - DirectoryEnumeratorFunctor theEnumerator; - FileNameVectorType theFiles; - theEnumerator(searchSpecification, theFiles); - - return theFiles; -} - -/* This routine retrieves all sub-directories from the specified directories. -// Inputs: rootDirectory: typically "conf" or "perf" -// -// Notes: The searchSpecification in this case is just "*". -// */ -FileUtility::FileNameVectorType -FileUtility::getDirectoryNames(const XalanDOMString& rootDirectory) -{ - const XalanDOMString dirSpec(XALAN_STATIC_UCODE_STRING("*")); - - DirectoryEnumeratorFunctor theEnumerator; - FileNameVectorType theFiles; - theEnumerator(XalanDOMString(rootDirectory), XalanDOMString(dirSpec), theFiles); - - return theFiles; -} - - -bool FileUtility::checkDir(const XalanDOMString& directory ) -{ - char buffer[PATH_MAX]; - - getcwd(buffer, PATH_MAX); - - bool fResult = false; - - if ( !chdir(c_str(TranscodeToLocalCodePage(directory))) ) - { - fResult = true; - } - - chdir(buffer); - - return fResult; -} - - -void FileUtility::checkAndCreateDir(const XalanDOMString& directory) -{ - char buffer[PATH_MAX]; - - getcwd(buffer, PATH_MAX); - - if ( (chdir(c_str(TranscodeToLocalCodePage(directory)))) ) - { - //cout << "Couldn't change to " << directory << ", will create it." << endl; -#if defined(WIN32) - if ( !mkdir(c_str(TranscodeToLocalCodePage(directory)))) -#else - if ( !mkdir(c_str(TranscodeToLocalCodePage(directory)), DIR_MODE_BITS)) -#endif - { - cout << directory << " created." << endl; - } - else - { - cout << directory << " NOT created." << endl; - } - } - - chdir(buffer); -} - -/* This routine generates file names based on the provide suffix -// Inputs: theXMLFileName: typically "conf" or "perf" -// suffix: typically "xsl" or "out". -// -// Notes: -*/ - -XalanDOMString -FileUtility::generateFileName( - const XalanDOMString& theXMLFileName, - const char* suffix, - bool* status) -{ - XalanDOMString targetFile; - int thePeriodIndex = -1; - const int theLength = length(theXMLFileName); - - for (int i = theLength - 1; i > 0; i--) - { - if (charAt(theXMLFileName, i) == XalanUnicode::charFullStop) - { - thePeriodIndex = i; // charFullStop is the dot (x2E) - break; - } - } - - if (thePeriodIndex != -1) - { - targetFile.assign(theXMLFileName, 0, thePeriodIndex + 1); - - targetFile += XalanDOMString(suffix); - } - - // Check the .xml file exists. - if (!strcmp(suffix,"xml")) - { - FILE* fileHandle = fopen(c_str(TranscodeToLocalCodePage(targetFile)), "r"); - if (fileHandle == 0) - { - cout << "TEST ERROR: File Missing: " << targetFile << endl; - - if (status != 0) - { - *status = false; - } - } - else - { - fclose(fileHandle); - } - } - - return targetFile; -} - - -/* This routine generates a Unique Runid. -// Inputs: None -// -// Notes: The format is mmddhhmm. For example -// 03151046 is "Mar 15 10:46" -*/ - -XalanDOMString -FileUtility::generateUniqRunid() -{ -#if defined(XALAN_STRICT_ANSI_HEADERS) - using std::tm; - using std::time; - using std::localtime; - using std::strftime; -#endif - - struct tm *newtime; - time_t long_time; - char tmpbuf[10]; - - time( &long_time ); /* Get time as long integer. */ - newtime = localtime( &long_time ); /* Convert to local time. */ - - strftime( tmpbuf, 10,"%m%d%H%M",newtime ); - - return XalanDOMString(tmpbuf); -} - - -// This routine gets Xerces Version number. It's used to put the Xerces Version -// into the output xml results file as an attribute of 'PerfData' element. -// Inputs: None -// - -XalanDOMString -FileUtility::getXercesVersion() -{ - - return XalanDOMString(gXercesFullVersionStr); -} - -/* This routine creates a FormatterToXML FormatterListener. This is used to format -// the output DOM so a comparision can be done with the expected GOLD file. -// Inputs: None -// -*/ - - -FormatterListener* -FileUtility::getXMLFormatter( - PrintWriter& resultWriter, - int indentAmount, - const XalanDOMString& mimeEncoding, - const StylesheetRoot* stylesheet) -{ - XalanDOMString version; - bool outputIndent= 0; - XalanDOMString mediatype; - XalanDOMString doctypeSystem; - XalanDOMString doctypePublic; - XalanDOMString standalone; - - if (stylesheet != 0) - { - version = stylesheet->getOutputVersion(); - - mediatype = stylesheet->getOutputMediaType(); - doctypeSystem = stylesheet->getOutputDoctypeSystem(); - doctypePublic = stylesheet->getOutputDoctypePublic(); - standalone = stylesheet->getOutputStandalone(); - outputIndent = stylesheet->getOutputIndent(); - } - - return new FormatterToXML( - resultWriter, - version, - outputIndent, - indentAmount, - mimeEncoding, - mediatype, - doctypeSystem, - doctypePublic, - true, // xmlDecl - standalone); -} - - -/* This routine is used to compares the results of a transform and report the results. -// When a failure is detected the 'data' structure used to report detailed info about -// a failure is filled in. -// Inputs: -// goldFile - Name of gold file -// outputFile - Name of result file. -// logfile - Name of log file reporter. -// -// Returns: -// Void -*/ -void -FileUtility::checkResults( - const XalanDOMString& outputFile, - const XalanDOMString& goldFile, - XMLFileReporter& logfile) -{ - int ambgFlag = data.nogold; // get the current number of tests w/o gold files. - - // Compare the results, report success if compareSerializedResults returns true. - if(compareSerializedResults(outputFile, goldFile)) - { - cout << "Passed: " << data.testOrFile << endl; - logfile.logCheckPass(data.testOrFile); - data.pass += 1; - } - else - { - typedef XMLFileReporter::Hashtable Hashtable; - - // if the compairson fails gather up the failure data and determine if it failed - // due to bad output or missing Gold file. Lastly, log the failure. - Hashtable attrs; - Hashtable actexp; - - reportError(); - - attrs.insert(Hashtable::value_type(XalanDOMString("reason"), XalanDOMString(data.msg))); - attrs.insert(Hashtable::value_type(XalanDOMString("atNode"), data.currentNode)); - actexp.insert(Hashtable::value_type(XalanDOMString("exp"), data.expected)); - actexp.insert(Hashtable::value_type(XalanDOMString("act"), data.actual)); - - actexp.insert(Hashtable::value_type(XalanDOMString("xsl"), data.xslFileURL)); - actexp.insert(Hashtable::value_type(XalanDOMString("xml"), data.xmlFileURL)); - actexp.insert(Hashtable::value_type(XalanDOMString("result"), outputFile)); - actexp.insert(Hashtable::value_type(XalanDOMString("gold"), goldFile)); - - if (ambgFlag < data.nogold) - { - logfile.logCheckAmbiguous(data.testOrFile); - } - else - { - logfile.logCheckFail(data.testOrFile, attrs, actexp); - } - } - -} - -void -FileUtility::checkAPIResults( - const XalanDOMString& actual, - const XalanDOMString& expected, - const char* msg, - XMLFileReporter& logfile, - const XalanDOMString& outputFile, - const XalanDOMString& goldFile, - bool containsOnly) -{ - if(actual == expected || - (containsOnly == true && indexOf(actual, expected) != XalanDOMString::npos)) - { - data.pass += 1; - cout << "Passed: " << data.testOrFile << endl; - logfile.logCheckPass(data.testOrFile); - } - else - { data.actual = actual; - data.expected = expected; - data.currentNode = "API Test"; - data.msg = msg; - data.fail += 1; - - reportError(); - - typedef XMLFileReporter::Hashtable Hashtable; - - Hashtable actexp; - - actexp.insert(Hashtable::value_type(XalanDOMString("exp"), expected)); - actexp.insert(Hashtable::value_type(XalanDOMString("act"), actual)); - actexp.insert(Hashtable::value_type(XalanDOMString("xsl"), data.xslFileURL)); - actexp.insert(Hashtable::value_type(XalanDOMString("xml"), data.xmlFileURL)); - actexp.insert(Hashtable::value_type(XalanDOMString("result"), outputFile)); - actexp.insert(Hashtable::value_type(XalanDOMString("gold"), goldFile)); - - // Todo: Need to determine if I should check for missing gold in these cases. - logfile.logCheckFail(data.testOrFile, actexp); - } -} - - - -/* This routine compares the results of a transform with the gold file. -// It in turn call the domCompare routine to do the actual comparision. -// Inputs: -// gold - Dom tree for the expected results -// doc - Dom tree created during transformation -// filename - Current filename -// -// Returns: -// Void -// -*/ -void -FileUtility::checkDOMResults( - const XalanDOMString& theOutputFile, - const XalanCompiledStylesheet* compiledSS, - const XalanSourceTreeDocument* dom, - const XSLTInputSource& goldInputSource, - XMLFileReporter& logfile) -{ - const int ambgFlag = data.nogold; - - const XalanDOMString mimeEncoding(""); - - XalanFileOutputStream myOutput(theOutputFile); - XalanOutputStreamPrintWriter myResultWriter(myOutput); - - FormatterListener* const theFormatter = - getXMLFormatter( - myResultWriter, - 0, - mimeEncoding, - compiledSS->getStylesheetRoot()); - - FormatterTreeWalker theTreeWalker(*theFormatter); - - theTreeWalker.traverse(dom); - - delete theFormatter; - - XalanSourceTreeDOMSupport domSupport; - XalanSourceTreeParserLiaison parserLiaison(domSupport); - - domSupport.setParserLiaison(&parserLiaison); - - const XalanDocument* const goldDom = - parserLiaison.parseXMLStream(goldInputSource); - - if(domCompare(*goldDom, *dom)) - { - cout << "Passed: " << data.testOrFile << endl; - logfile.logCheckPass(data.testOrFile); - data.pass += 1; - } - else - { - typedef XMLFileReporter::Hashtable Hashtable; - - // if the compairson fails gather up the failure data and determine if it failed - // due to bad output or missing Gold file. Lastly, log the failure. - Hashtable attrs; - Hashtable actexp; - - reportError(); - - attrs.insert(Hashtable::value_type(XalanDOMString("reason"), XalanDOMString(data.msg))); - attrs.insert(Hashtable::value_type(XalanDOMString("atNode"), data.currentNode)); - actexp.insert(Hashtable::value_type(XalanDOMString("exp"), data.expected)); - actexp.insert(Hashtable::value_type(XalanDOMString("act"), data.actual)); - - if (ambgFlag < data.nogold) - { - logfile.logCheckAmbiguous(data.testOrFile); - } - else - { - logfile.logCheckFail(data.testOrFile, attrs, actexp); - } - } -} - -/* This routine takes the result file and gold file and parses them. -// If either of the files fails to parse and a SAXException is throw, -// then the files are compared using a char by char file compare, -// otherwise the domCompare routine is used. -// Inputs: -// outputFile: Name of result file -// goldFile: Name of gold file -// -// Returns: -// True or False -// -*/ -bool -FileUtility::compareSerializedResults( - const XalanDOMString& outputFile, - const XalanDOMString& goldFile) -{ - - const XSLTInputSource resultInputSource(outputFile); - const XSLTInputSource goldInputSource(goldFile); - - XalanSourceTreeDOMSupport domSupport; - XalanSourceTreeParserLiaison parserLiaison(domSupport); - - domSupport.setParserLiaison(&parserLiaison); - - try - { - const XalanDocument* const transformDom = - parserLiaison.parseXMLStream(resultInputSource); - assert(transformDom != 0); - - const XalanDocument* const goldDom = - parserLiaison.parseXMLStream(goldInputSource); - assert(goldDom != 0); - - return domCompare(*goldDom, *transformDom); - } - // This exception is being reported prior to this Catch, however, however, I clarify that it's a SAX exception. - // It's a good indication that the Gold file is not a valid XML. When this happens the transform result needs - // to be compared with the Gold, with a character by character basis, not via the DOM compair. - catch (const XERCES_CPP_NAMESPACE_QUALIFIER SAXException&) - { - cout << "SAXException: Using fileCompare to check output.\n"; - - return fileCompare(c_str(TranscodeToLocalCodePage(goldFile)), c_str(TranscodeToLocalCodePage(outputFile))); - } - -} - - - -static void -replaceNonAsciiCharacters( - char* theBuffer, - char theReplacementChar) -{ - while(*theBuffer) - { - if (unsigned(*theBuffer) > 127) - { - *theBuffer = theReplacementChar; - } - - ++theBuffer; - } -} - - - -/* This routine is used to compare the results against the gold when one or both of -// fails to parse without throwing a SAXException. When a failure is detected the 'data' -// structure used to report detailed info about a failure is filled in. -// Inputs: -// outputFile: Name of result file -// goldFile: Name of gold file -// -// Returns: -// True or False -// -*/ -bool -FileUtility::fileCompare( - const char* goldFile, - const char* outputFile) -{ - const unsigned long maxBuffer = 132; - - char rline[maxBuffer] = {'0'}; // declare buffers to hold single line from file - char gline[maxBuffer] = {'0'}; - char temp[10]; // buffer to hold line number - char lineNum = 1; - - // Set fail data incase there are i/o problems with the files to compare. - data.expected = XalanDOMString(" "); - data.actual = XalanDOMString(" "); - data.currentNode = XalanDOMString("Line: 0"); - - // Attempt to open the files. - FILE* const result = fopen(outputFile, "r"); - FILE* const gold = fopen(goldFile, "r"); - - // If the result file fails to open report this as a failure. - if (!result) - { - data.msg = "No Result (Transform failed)"; - data.fail += 1; - return false; - } - - // If the gold file fails to open report this as ambiguous. - if (!gold) - { - data.msg = "No Gold file"; - data.nogold += 1; - return false; - } - - // Start file comparison, line by line.. - while(!feof(result) && !feof(gold)) - { - fgets(gline, sizeof(gline), gold ); - fgets(rline, sizeof(rline), result ); - sprintf(temp,"%d",lineNum); - - if (ferror(gold) || ferror(result)) - { - data.msg = "Read Error - Gold/Result file"; - data.currentNode = XalanDOMString("Line: ") + XalanDOMString(temp); - return false; - } - - // Compare the lines character by charcter .... - unsigned int i = 0; - while(i < strlen(gline)) - { - if (gline[i] == rline[i]) - { - i++; - } - else - { // If there is a mismatch collect up the fail data and return false. To ensure that - // the results can be seen in the browser enclose the actual/expected in CDATA Sections. - - // Replace any non-ASCII characters. Otherwise, we would have to encode them - // in UTF-8, which is a huge pain. - replaceNonAsciiCharacters(gline, '?'); - replaceNonAsciiCharacters(rline, '?'); - - data.msg = "Text based comparison failure"; - data.expected = XalanDOMString(""); - data.actual = XalanDOMString(""); - data.currentNode = XalanDOMString("Line: ") + XalanDOMString(temp); - data.fail += 1; - return false; - } - } - - lineNum += 1; - } - - return true; -} - - - -/* This routine performs a DOM Comparision. -// Inputs: -// gold - Dom tree for the expected results -// doc - Dom tree created during transformation -// filename - Current filename -// -// Returns: -// True or False -// -*/ -bool -FileUtility::domCompare( - const XalanNode& gold, - const XalanNode& doc) -{ - const XalanNode::NodeType docNodeType = doc.getNodeType(); - const XalanNode::NodeType goldNodeType = gold.getNodeType(); - - const XalanDOMString& docNodeName = doc.getNodeName(); - - if (goldNodeType != docNodeType) - { - collectData("NodeType mismatch.", - docNodeName, - XalanDOMString(xalanNodeTypes[docNodeType]), - XalanDOMString(xalanNodeTypes[goldNodeType])); - - return false; - } - - switch (goldNodeType) - { - case XalanNode::ELEMENT_NODE: // ATTRIBUTE_NODEs are processed with diffElement(). - { - if (diffElement(gold, doc) == false) - { - return false; - } - } - break; - - case XalanNode::CDATA_SECTION_NODE: - case XalanNode::TEXT_NODE: - { - const XalanDOMString& docNodeValue = doc.getNodeValue(); - const XalanDOMString& goldNodeValue = gold.getNodeValue(); - - //debugNodeData(docNodeName, docNodeValue); - - if(goldNodeValue != docNodeValue) - { - collectData("Text node mismatch. ", - docNodeName, - goldNodeValue, - docNodeValue); - return false; - } - } - break; - - case XalanNode::PROCESSING_INSTRUCTION_NODE: - { - const XalanDOMString& goldNodeName = gold.getNodeName(); - - if (goldNodeName != docNodeName) - { - collectData("processing-instruction target mismatch. ", - docNodeName, - goldNodeName, - docNodeName); - - return false; - } - else - { - const XalanDOMString& docNodeValue = doc.getNodeValue(); - const XalanDOMString& goldNodeValue = gold.getNodeValue(); - - if (goldNodeValue != docNodeValue) - { - collectData("processing-instruction data mismatch. ", - docNodeName, - goldNodeValue, - docNodeValue); - - return false; - } - } - } - break; - - case XalanNode::COMMENT_NODE: - { - const XalanDOMString& docNodeValue = doc.getNodeValue(); - const XalanDOMString& goldNodeValue = gold.getNodeValue(); - - if (goldNodeValue != docNodeValue) - { - collectData("comment data mismatch. ", - docNodeName, - goldNodeValue, - docNodeValue); - - return false; - } - } - break; - - case XalanNode::DOCUMENT_NODE: - { - //debugNodeData(docNodeName); - - const XalanNode *goldNextNode; - const XalanNode *domNextNode; - - goldNextNode = gold.getFirstChild(); - domNextNode = doc.getFirstChild(); - - if (0 != goldNextNode) - { - if(domCompare(*goldNextNode,*domNextNode) == false) - { - return false; - } - } - } - break; - - case XalanNode::ENTITY_REFERENCE_NODE: - case XalanNode::ENTITY_NODE: - case XalanNode::DOCUMENT_TYPE_NODE: - case XalanNode::DOCUMENT_FRAGMENT_NODE: - case XalanNode::NOTATION_NODE: - default: - cerr << "Unexpected node type: " << goldNodeType << endl; - - return false; - } - - // Need to process siblings. Children are processed in diffElement, since - // only they can have children in the XPath data model. - const XalanNode* const goldNextNode = gold.getNextSibling(); - const XalanNode* const domNextNode = doc.getNextSibling(); - - if (0 != goldNextNode) - { - if (0 != domNextNode) - { - if (domCompare(*goldNextNode, *domNextNode) == false) - { - return false; - } - } - else - { - collectData("Missing sibling node. ", - docNodeName, - goldNextNode->getNodeName(), - goldNextNode->getNodeName()); - - return false; - } - } - else if (0 != domNextNode) - { - collectData("Extra sibling node. ", - docNodeName, - domNextNode->getNodeName(), - domNextNode->getNodeName()); - - return false; - } - - return true; -} - - - -bool -FileUtility::domCompare( - const XalanDocument& gold, - const XalanDocument& doc) -{ - const XalanNode* theGoldPos = &gold; - const XalanNode* theDocPos = &doc; - - bool fEqual = true; - - do - { - fEqual = diffNode(theGoldPos, theDocPos); - - if (fEqual == true) - { - assert(theGoldPos != 0 && theDocPos != 0); - - const XalanNode* nextGoldNode = theGoldPos->getFirstChild(); - const XalanNode* nextDocNode = theDocPos->getFirstChild(); - - bool fBreak = false; - - while( - nextGoldNode == 0 && - nextDocNode == 0 && - fBreak == false) - { - // Move to the next sibling of each node, - // since we would get here only if both have - // no children. - nextGoldNode = theGoldPos->getNextSibling(); - nextDocNode = theDocPos->getNextSibling(); - - // If there is no next sibling, move up to the - // parent. If one, but not both, has a sibling, - // we'll end up back at the top of the do/while - // loop and the difference will be reported. - if(0 == nextGoldNode && 0 == nextDocNode) - { - theGoldPos = theGoldPos->getParentNode(); - theDocPos = theDocPos->getParentNode(); - - // If the parent is null, then we've reached - // the end of the document. Note that if we - // got here, then there must also be a parent - // node in the document we're verifying, so we - // could simply assert that theDocPos is either - // null if theGoldPos is null, or it is not-null - // if theGoldPos is not-null. - if(0 == theGoldPos) - { - nextGoldNode = theGoldPos; - - fBreak = true; - } - - if(0 == theDocPos) - { - nextDocNode = theDocPos; - - fBreak = true; - } - } - } - - theGoldPos = nextGoldNode; - theDocPos = nextDocNode; - } - } while((theGoldPos != 0 || theDocPos != 0) && fEqual == true); - - - return fEqual; -} - - - -bool -FileUtility::diffNode( - const XalanNode& gold, - const XalanNode& doc) -{ - const XalanNode::NodeType docNodeType = doc.getNodeType(); - const XalanNode::NodeType goldNodeType = gold.getNodeType(); - - const XalanDOMString& docNodeName = doc.getNodeName(); - - if (goldNodeType != docNodeType) - { - collectData("NodeType mismatch.", - docNodeName, - XalanDOMString(xalanNodeTypes[docNodeType]), - XalanDOMString(xalanNodeTypes[goldNodeType])); - - return false; - } - - switch (goldNodeType) - { - case XalanNode::ELEMENT_NODE: // ATTRIBUTE_NODEs are processed with diffElement(). - return diffElement2(gold, doc); - break; - - case XalanNode::CDATA_SECTION_NODE: - case XalanNode::TEXT_NODE: - { - const XalanDOMString& docNodeValue = doc.getNodeValue(); - const XalanDOMString& goldNodeValue = gold.getNodeValue(); - - //debugNodeData(docNodeName, docNodeValue); - - if(goldNodeValue != docNodeValue) - { - collectData("Text node mismatch. ", - docNodeName, - goldNodeValue, - docNodeValue); - return false; - } - } - break; - - case XalanNode::PROCESSING_INSTRUCTION_NODE: - { - const XalanDOMString& goldNodeName = gold.getNodeName(); - - if (goldNodeName != docNodeName) - { - collectData("processing-instruction target mismatch. ", - docNodeName, - goldNodeName, - docNodeName); - - return false; - } - else - { - const XalanDOMString& docNodeValue = doc.getNodeValue(); - const XalanDOMString& goldNodeValue = gold.getNodeValue(); - - if (goldNodeValue != docNodeValue) - { - collectData("processing-instruction data mismatch. ", - docNodeName, - goldNodeValue, - docNodeValue); - - return false; - } - } - } - break; - - case XalanNode::COMMENT_NODE: - { - const XalanDOMString& docNodeValue = doc.getNodeValue(); - const XalanDOMString& goldNodeValue = gold.getNodeValue(); - - if (goldNodeValue != docNodeValue) - { - collectData("comment data mismatch. ", - docNodeName, - goldNodeValue, - docNodeValue); - - return false; - } - } - break; - - case XalanNode::DOCUMENT_NODE: - break; - - case XalanNode::ENTITY_REFERENCE_NODE: - case XalanNode::ENTITY_NODE: - case XalanNode::DOCUMENT_TYPE_NODE: - case XalanNode::DOCUMENT_FRAGMENT_NODE: - case XalanNode::NOTATION_NODE: - default: - cerr << "Unexpected node type: " << goldNodeType << endl; - - return false; - } - - return true; -} - - - -bool -FileUtility::diffNode( - const XalanNode* gold, - const XalanNode* doc) -{ - if (gold != 0 && doc != 0) - { - return diffNode(*gold, *doc); - } - else if (gold != 0) - { - const XalanNode* const parent = - gold->getParentNode(); - - collectData( - "Missing sibling node. ", - parent == 0 ? s_emptyString : parent->getNodeName(), - s_emptyString, - gold->getNodeName()); - - return false; - } - else - { - assert(doc != 0 && gold == 0); - - const XalanNode* const parent = - doc->getParentNode(); - - collectData( - "Extra sibling node. ", - parent == 0 ? s_emptyString : parent->getNodeName(), - doc->getNodeName(), - s_emptyString); - - return false; - } -} - - - -/* This routine compares two element nodes. -// Inputs: -// gold - Dom tree for the expected results -// doc - Dom tree created during transformation -// filename - Current filenam -// -// Returns: -// True or False -// -*/ - -bool -FileUtility::diffElement( - const XalanNode& gold, - const XalanNode& doc) -{ - assert(gold.getNodeType() == XalanNode::ELEMENT_NODE); - assert(gold.getNodeType() == XalanNode::ELEMENT_NODE); - - const XalanDOMString& docNodeName = doc.getNodeName(); - const XalanDOMString& goldNodeName = gold.getNodeName(); - - const XalanDOMString& docNsUri = doc.getNamespaceURI(); - const XalanDOMString& goldNsUri = gold.getNamespaceURI(); - - //debugNodeData(docNodeName); - - // This essentially checks 2 things, that the prefix and localname are the - // same. So specific checks of these items are not necessary. - if (goldNodeName != docNodeName) - { - collectData("Element mismatch. ", - docNodeName, - goldNodeName, - docNodeName); - return false; - } - - if ( goldNsUri != docNsUri) - { - collectData("Element NamespaceURI mismatch. ", - docNodeName, - goldNsUri, - docNsUri); - return false; - } - - // Get Attributes for each Element Node. - const XalanNamedNodeMap* const goldAttrs = gold.getAttributes(); - const XalanNamedNodeMap* const docAttrs = doc.getAttributes(); - - // Get number of Attributes - const unsigned int numGoldAttr = goldAttrs->getLength(); - const unsigned int numDomAttr = docAttrs ->getLength(); - - /* - // This needs to be uncommented if 'compare.exe' is to work. - // If this is the 'root' element strip off the xmlns:xml namespace attribute, - // that is lurking around on the gold file, but not the dom. This is necessary - // only for the 'compare' test, that uses a pure DOM, that has not been serialized. - //if (goldNodeName == XalanDOMString("root")) - { - numGoldAttr -= 1; - XalanNode *gXMLAttr = goldAttrs->item(1); - } - */ - // Check that each Element has same number of Attributes. If they don't report error - if ( numGoldAttr == numDomAttr ) - { - // Compare Attributes one at a time. - //for (int i=1; i < numGoldAttr; i++) // To be used with 'compare' - for (unsigned int i = 0; i < numGoldAttr; ++i) - { - // Attribute order is irrelvant, so comparision is base on Attribute name. - const XalanNode* const gAttr = goldAttrs->item(i); - const XalanDOMString& goldAttrName = gAttr->getNodeName(); - - const XalanNode* const dAttr = docAttrs->getNamedItem(goldAttrName); - - if (dAttr != 0) - { - if( ! (diffAttr(gAttr, dAttr)) ) - return false; - } - else - { - collectData("Element missing named Attribute. ", - docNodeName, - goldAttrName, - XalanDOMString("NOTHING")); - - return false; - } - } - } - else - { - char buf1[2], buf2[2]; - sprintf(buf1, "%u", numGoldAttr); - sprintf(buf2, "%u", numDomAttr); - collectData("Wrong number of attributes. ", - docNodeName, - XalanDOMString(buf1), - XalanDOMString(buf2)); - return false; - } - - const XalanNode* goldNextNode = gold.getFirstChild(); - const XalanNode* domNextNode = doc.getFirstChild(); - - if (0 != goldNextNode) - { - if (0 != domNextNode) - { - if ( ! domCompare(*goldNextNode, *domNextNode) ) - return false; - } - else - { - collectData("Element missing ChildNode. ", - docNodeName, - XalanDOMString(goldNextNode->getNodeName()), - XalanDOMString("NOTHING")); - return false; - } - } - else if (domNextNode != 0) - { - // The result doc has additional Children. If the additional node is a text node - // then gather up the text and print it out. - if ( domNextNode->getNodeType() == XalanNode::TEXT_NODE) - { - collectData("Result has additional Child node: ", - docNodeName, - XalanDOMString("NOTHING"), - XalanDOMString(domNextNode->getNodeName()) + XalanDOMString(" \"") + - XalanDOMString(domNextNode->getNodeValue()) + XalanDOMString("\"")); - } - // Additional node is NOT text, so just print it's Name. - else - { - collectData("Result has additional Child node: ", - docNodeName, - XalanDOMString("NOTHING"), - XalanDOMString(domNextNode->getNodeName())); - - } - return false; - - } - - return true; -} - - -bool -FileUtility::diffElement2( - const XalanNode& gold, - const XalanNode& doc) -{ - assert(gold.getNodeType() == XalanNode::ELEMENT_NODE); - assert(gold.getNodeType() == XalanNode::ELEMENT_NODE); - - const XalanDOMString& docNodeName = doc.getNodeName(); - const XalanDOMString& goldNodeName = gold.getNodeName(); - - const XalanDOMString& docNsUri = doc.getNamespaceURI(); - const XalanDOMString& goldNsUri = gold.getNamespaceURI(); - - //debugNodeData(docNodeName); - - // This essentially checks 2 things, that the prefix and localname are the - // same. So specific checks of these items are not necessary. - if (goldNodeName != docNodeName) - { - collectData("Element mismatch. ", - docNodeName, - goldNodeName, - docNodeName); - return false; - } - - if ( goldNsUri != docNsUri) - { - collectData("Element NamespaceURI mismatch. ", - docNodeName, - goldNsUri, - docNsUri); - return false; - } - - // Get Attributes for each Element Node. - const XalanNamedNodeMap* const goldAttrs = gold.getAttributes(); - assert(goldAttrs != 0); - - const XalanNamedNodeMap* const docAttrs = doc.getAttributes(); - assert(docAttrs != 0); - - // Get number of Attributes - const unsigned int numGoldAttr = goldAttrs->getLength(); - const unsigned int numDomAttr = docAttrs ->getLength(); - - // Check that each Element has same number of Attributes. If they don't report error - if ( numGoldAttr == numDomAttr ) - { - // Compare Attributes one at a time. - //for (int i=1; i < numGoldAttr; i++) // To be used with 'compare' - for (unsigned int i = 0; i < numGoldAttr; ++i) - { - // Attribute order is irrelvant, so comparision is base on Attribute name. - const XalanNode* const gAttr = goldAttrs->item(i); - const XalanDOMString& goldAttrName = gAttr->getNodeName(); - - const XalanNode* const dAttr = docAttrs->getNamedItem(goldAttrName); - - if (dAttr != 0) - { - if( ! (diffAttr(gAttr, dAttr)) ) - return false; - } - else - { - collectData("Element missing named Attribute. ", - docNodeName, - goldAttrName, - XalanDOMString("NOTHING")); - - return false; - } - } - } - else - { - char buf1[2], buf2[2]; - sprintf(buf1, "%u", numGoldAttr); - sprintf(buf2, "%u", numDomAttr); - collectData("Wrong number of attributes. ", - docNodeName, - XalanDOMString(buf1), - XalanDOMString(buf2)); - return false; - } - - return true; -} - - -/* This routine compares two attribute nodes. -// Inputs: -// gAttr - attribute from Gold dom tree -// dAttr - attribute from Dom tree created during transformation -// fileName - Current filenam -// -// Returns: -// True or False -// -*/ - -bool FileUtility::diffAttr(const XalanNode* gAttr, const XalanNode* dAttr) -{ - - const XalanDOMString& docAttrName = dAttr->getNodeName(); - - //debugAttributeData(goldAttrName); - - const XalanDOMString& goldAttrValue = gAttr->getNodeValue(); - const XalanDOMString& docAttrValue = dAttr->getNodeValue(); - - if (goldAttrValue != docAttrValue) - { - collectData( - "Attribute Value mismatch. ", - docAttrName, - goldAttrValue, - docAttrValue); - - return false; - } - - const XalanDOMString& goldAttrNsUri = gAttr->getNamespaceURI(); - const XalanDOMString& docAttrNsUri = dAttr->getNamespaceURI(); - - if (goldAttrNsUri != docAttrNsUri) - { - collectData( - "Attribute NamespaceURI mismatch. ", - docAttrName, - goldAttrNsUri, - docAttrNsUri); - - return false; - } - - return true; -} - -/* This routine reports DOM comparison errors. -// Inputs: -// file - Name of current file -// node - Current node that fails -// msg - Failure message -// -*/ -void -FileUtility::reportError() -{ - - cout << endl - << "* Failed " - << data.testOrFile - << " Error: " - << data.msg - << endl - << " " - << "Processing Node: " - << data.currentNode - << endl - << " Expected: " - << data.expected - << endl - << " Actual: " - << data.actual - << endl - << endl; -} - - -#if !defined(NDEBUG) -void -FileUtility::debugNodeData(const XalanDOMString& value) const -{ - cout << "Node is: " << c_str(TranscodeToLocalCodePage(value)) << endl; -} - - - -void -FileUtility::debugNodeData( - const XalanDOMString& node, - const XalanDOMString& value) const -{ - cout << "Node is: " << c_str(TranscodeToLocalCodePage(node)) << " " - << "Value is: \"" << c_str(TranscodeToLocalCodePage(value)) << "\"\n"; -} - - - -void -FileUtility::debugAttributeData(const XalanDOMString& value) const -{ - cout << "Attribute is: " << c_str(TranscodeToLocalCodePage(value)) << endl; -} - -#endif - - - -/* This routine collects up data pertinent to a dom comparison failure. -// Inputs: -// errmsg: Reason for the failure. -// currentnode: Node in the dom tree where the mismatch occured -// expdata: Expected data based on the Gold file. -// actdata: Actual data returned in the result file. -// Returns: Void -*/ -void -FileUtility::collectData( - const char* errmsg, - const XalanDOMString& currentnode, - const XalanDOMString& expdata, - const XalanDOMString& actdata) -{ - data.msg = errmsg; - data.currentNode = currentnode; - data.expected = expdata; - data.actual = actdata; - data.fail += 1; -} - - -/* Routine prints the result to the console, as well as adds summary info into the logfile. -// Inputs: -// logfile: Current log file -// runid: Unique runid -// Returns: Void -*/ -void -FileUtility::reportPassFail( - XMLFileReporter& logfile, - const XalanDOMString& runid) -{ - typedef XMLFileReporter::Hashtable Hashtable; - - Hashtable runResults; - - char temp[5]; - - // Create entrys that contain runid, xerces version, and numbers for Pass, Fail and No Gold. - - runResults.insert(Hashtable::value_type(XalanDOMString("UniqRunid"), runid)); - runResults.insert(Hashtable::value_type(XalanDOMString("Xerces-Version "), getXercesVersion())); - runResults.insert(Hashtable::value_type(XalanDOMString("BaseDrive "), XalanDOMString(getDrive()))); - runResults.insert(Hashtable::value_type(XalanDOMString("TestBase "), XalanDOMString(args.base))); - runResults.insert(Hashtable::value_type(XalanDOMString("xmlFormat "), data.xmlFormat)); - sprintf(temp, "%ld", args.iters); - runResults.insert(Hashtable::value_type(XalanDOMString("Iters "), XalanDOMString(temp))); - - sprintf(temp, "%d", data.pass); - runResults.insert(Hashtable::value_type(XalanDOMString("Passed"), XalanDOMString(temp))); - - sprintf(temp, "%d", data.fail); - runResults.insert(Hashtable::value_type(XalanDOMString("Failed"), XalanDOMString(temp))); - - sprintf(temp, "%d", data.nogold); - runResults.insert(Hashtable::value_type(XalanDOMString("No_Gold_Files"), XalanDOMString(temp))); - - logfile.logElementWAttrs(10, "RunResults", runResults, "xxx"); - - cout << "\nPassed " << data.pass; - cout << "\nFailed " << data.fail; - cout << "\nMissing Gold " << data.nogold << endl; - -} - -/* Routine runs a stylesheet on the log file and displays the results in HTML. -// Inputs: -// xalan: An instance of the transformer -// resultsFile: logfile -// Returns: Void -*/ -void -FileUtility::analyzeResults(XalanTransformer& xalan, const XalanDOMString& resultsFile) -{ - XalanDOMString paramValue; - bool fileStatus; - - // Pass the results .xml file as a parameter to the stylesheet. It must be wrapped in single - // quotes so that it is not considered an expression. - // - assign(paramValue, XalanDOMString("'")); - append(paramValue, resultsFile); - append(paramValue, XalanDOMString("'")); - - // Set the parameter - // - xalan.setStylesheetParam(XalanDOMString("testfile"), paramValue); - - // Generate the input and output file names. - // - const XalanDOMString theHTMLFile = generateFileName(resultsFile,"html", &fileStatus); - const XalanDOMString theStylesheet = args.base + XalanDOMString("cconf.xsl"); - const XalanDOMString theXMLSource = args.base + XalanDOMString("cconf.xml"); - - // Check that we can find the stylesheet to analyze the results. - // - FILE* fileHandle = fopen(c_str(TranscodeToLocalCodePage(theStylesheet)), "r"); - if (fileHandle == 0) - { - cout << "ANALYSIS ERROR: File Missing: " << c_str(TranscodeToLocalCodePage(theStylesheet)) << endl; - return; - } - else - { - fclose(fileHandle); - } - - // Create the InputSources and ResultTarget. - const XSLTInputSource xslInputSource(theStylesheet); - const XSLTInputSource xmlInputSource(theXMLSource); - const XSLTResultTarget resultFile(theHTMLFile); - - // Do the transform, display the output HTML, or report any failure. - const int result = xalan.transform(xmlInputSource, xslInputSource, resultFile); - - if (result == 0) - { - system(c_str(TranscodeToLocalCodePage(theHTMLFile))); - } - else - { - cout << "Analysis failed due to following error: " - << xalan.getLastError() - << endl; - } -} - - - -static XalanDOMString s_staticXmlSuffix; -static XalanDOMString s_staticPathSep; - - - -const XalanDOMString& FileUtility::s_xmlSuffix = s_staticXmlSuffix; -const XalanDOMString& FileUtility::s_pathSep = s_staticPathSep; - - - -void -FileUtility::initialize() -{ - s_staticXmlSuffix = XALAN_STATIC_UCODE_STRING(".xml"); - -#if defined(WIN32) - s_staticPathSep = XALAN_STATIC_UCODE_STRING("\\"); -#else - s_staticPathSep = XALAN_STATIC_UCODE_STRING("/"); -#endif -} - - - -void -FileUtility::terminate() -{ - releaseMemory(s_staticXmlSuffix); - releaseMemory(s_staticPathSep); -} - - - -XALAN_CPP_NAMESPACE_END diff -Nru xalan-1.10/c/Tests/Harness/FileUtility.hpp xalan-1.10/c/Tests/Harness/FileUtility.hpp --- xalan-1.10/c/Tests/Harness/FileUtility.hpp 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/Tests/Harness/FileUtility.hpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,432 +0,0 @@ -/* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#if !defined(FILEUTILITY_HEADER_GUARD_1357924680) -#define FILEUTILITY_HEADER_GUARD_1357924680 - -#include - - - -#include - - -#if defined(XALAN_CLASSIC_IOSTREAMS) -#include -#else -#include -#endif - - - -#include - - - -XALAN_CPP_NAMESPACE_BEGIN - - - -class FormatterListener; -class PrintWriter; -class StylesheetRoot; -class XalanCompiledStylesheet; -class XalanDocument; -class XalanNode; -class XalanSourceTreeDocument; -class XalanTransformer; -class XMLFileReporter; -class XSLTInputSource; - - - -// This class is exported from the Harness.dll -class HARNESS_API FileUtility -{ -public: - -// A vector to hold directory names and file names. -#if defined(XALAN_NO_STD_NAMESPACE) - typedef vector FileNameVectorType; -#else - typedef std::vector FileNameVectorType; -#endif - - /** - * Initialize static data. - * Should be called only once per process before creating any - * instances of FileUtility. - */ - static void - initialize(); - - /** - * Clean-up static data. - * Should be called only once per process after deleting all - * instances of FileUtility. - */ - static void - terminate(); - - struct HARNESS_API reportStruct - { - XalanDOMString theDrive; - XalanDOMString testOrFile; - XalanDOMString xmlFileURL; - XalanDOMString xslFileURL; - XalanDOMString xmlFormat; - const char* msg; - XalanDOMString currentNode; - XalanDOMString actual; - XalanDOMString expected; - int pass; - int fail; - int nogold; - - reportStruct(); - - void - reset(); - - } data; - - struct HARNESS_API cmdParams - { - private: - -#if defined(XALAN_NO_STD_NAMESPACE) - typedef ostrstream StreamType; -#else - typedef std::ostrstream StreamType; -#endif - - StreamType help; - - public: - - XalanDOMString base; - XalanDOMString output; - XalanDOMString gold; - XalanDOMString sub; - int source; - bool skip; - long iters; - - - cmdParams(); - - ~cmdParams() - { - } - - const char* - getHelpMessage(); - - StreamType& - getHelpStream() - { - return help; - } - - } args; - - /** Simple constructor, does not perform initialization. */ - FileUtility(); - - /** - * Utility method used to get test files from a specific directory. - * @returns a vector containing test files. - */ - - XalanDOMString - getDrive(); - - bool - getParams( - int argc, - char* argv[], - const char* outDir, - bool fsetGold = true); - - - FileNameVectorType - getTestFileNames( - const XalanDOMString& baseDir, - const XalanDOMString& relDir, - bool useDirPrefix); - - /** - * Utility method used to get subdirectories from a specific directory. - * @returns a vector containing directory files. - */ - FileNameVectorType - getDirectoryNames(const XalanDOMString& rootDirectory); - - /** - * Utility method used to create default directories when neccessary - */ - void - checkAndCreateDir(const XalanDOMString& directory); - - /** - * Utility method determines if directory exists. - */ - bool - checkDir(const XalanDOMString& directory); - - /** - * Utility method used to get XSL file based on XML file. - * @returns a XalanDOMString. - */ - XalanDOMString - getXSLFileName(const XalanDOMString& theXMLFileName); - - /** - * Utility method used to get OUT file based on XML file. - * @returns a XalanDOMString. - */ - XalanDOMString - generateFileName( - const XalanDOMString& theXMLFileName, - const char* suffix, - bool* status = 0); - - /** - * Utility method used to generate UniqRunid. - * @returns a XalanDOMString. - */ - XalanDOMString - generateUniqRunid(); - - /** - * Utility methods used to get Xerces Version number. - * @returns a XalanDOMString. - */ - XalanDOMString - getXercesVersion(); - - - void - checkResults( - const XalanDOMString& outputFile, - const XalanDOMString& goldFile, - XMLFileReporter& logfile); - - void - checkAPIResults( - const XalanDOMString& actual, - const XalanDOMString& expected, - const char* msg, - XMLFileReporter& logfile, - const XalanDOMString& outputFile, - const XalanDOMString& goldFile, - bool containsOnly = false); - - void - checkAPIResults( - const char* actual, - const char* expected, - const char* msg, - XMLFileReporter& logfile, - const XalanDOMString& outputFile, - const XalanDOMString& goldFile, - bool containsOnly = false) - { - checkAPIResults( - XalanDOMString(actual), - XalanDOMString(expected), - msg, - logfile, - outputFile, - goldFile, - containsOnly); - } - - /** - * Utility method used to compare the results. It inturn - * call domCompare. - * @returns Void. - */ - void - checkDOMResults( - const XalanDOMString& theOutputFile, - const XalanCompiledStylesheet* compiledSS, - const XalanSourceTreeDocument* dom, - const XSLTInputSource& goldInputSource, - XMLFileReporter& logfile); - - bool - compareSerializedResults( - const XalanDOMString& transformResult, - const XalanDOMString& goldInputSource); - /** - * Utility method used to create a FormatterToXML FormatterListener. - * This is required to DOM comparisions. - * @returns a pointer to a FormatterListener. - */ - FormatterListener* - getXMLFormatter( - PrintWriter& resultWriter, - int indentAmount, - const XalanDOMString& mimeEncoding, - const StylesheetRoot* stylesheet); - - - bool - fileCompare( - const char* goldFile, - const char* outputFile); - - /** - * Utility methods used to perform a DOM Compare - * @returns boolean - */ - bool - domCompare(const XalanNode& gold, const XalanNode& doc); - - /** - * Utility methods used to perform a DOM Compare - * @returns boolean - */ - bool - domCompare( - const XalanDocument& gold, - const XalanDocument& doc); - - /** - * Utility methods used to diff two Element nodes. - * @returns boolean. - */ - bool - diffElement(const XalanNode& gold, const XalanNode& doc); - - /** - * Utility methods used to diff two nodes. - * @returns true if the nodes are equal, and false if not. - */ - bool - diffNode( - const XalanNode& gold, - const XalanNode& doc); - - /** - * Utility methods used to diff two nodes. - * @returns true if the nodes are equal, and false if not. - */ - bool - diffNode( - const XalanNode* gold, - const XalanNode* doc); - - /** - * Utility methods used to diff two Element nodes. - * @returns boolean. - */ - bool - diffElement2( - const XalanNode& gold, - const XalanNode& doc); - - /** - * Utility methods used to diff two attribute nodes. - * @returns boolean. - */ - bool - diffAttr(const XalanNode* gAttr, const XalanNode* dAttr); - - /** - * Utility methods used to report Pass/Fail numbers. - * @returns void. - */ - void - reportPassFail(XMLFileReporter& logfile); - - void - reportPassFail(XMLFileReporter& logfile, const XalanDOMString& runid); - - void - analyzeResults(XalanTransformer& xalan, const XalanDOMString& resultsFile); - - static const XalanDOMString& s_xmlSuffix; - - static const XalanDOMString& s_pathSep; - -private: - - static const XalanDOMString s_emptyString; - - XalanDOMString - getProgramName(const char* fullName); - - /** - * Utility methods used to collect information about compare failures. - * @returns void. - */ - void - collectData( - const char* errmsg, - const XalanDOMString& currentnode, - const XalanDOMString& actdata, - const XalanDOMString& expdata); - - /** - * Utility methods used to report DOM compare errors. - * @returns void. - */ - void - reportError(); - -#if defined(NDEBUG) - void - debugNodeData(const XalanDOMString& /* value */) const - { - } - - void - debugNodeData( - const XalanDOMString& /* node */, - const XalanDOMString& /* value */) const - { - } - - void - debugAttributeData(const XalanDOMString& /* value */) const - { - } - -#else - - void - debugNodeData(const XalanDOMString& value) const; - - void - debugNodeData( - const XalanDOMString& node, - const XalanDOMString& value) const; - - void - debugAttributeData(const XalanDOMString& value) const; - -#endif - -}; // end of class FileUtility - - - -XALAN_CPP_NAMESPACE_END - - - -#endif diff -Nru xalan-1.10/c/Tests/Harness/HarnessDefinitions.hpp xalan-1.10/c/Tests/Harness/HarnessDefinitions.hpp --- xalan-1.10/c/Tests/Harness/HarnessDefinitions.hpp 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/Tests/Harness/HarnessDefinitions.hpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -/* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#if !defined(HARNESSDEFINITIONS_HEADER_GUARD_1357924680) -#define HARNESSDEFINITIONS_HEADER_GUARD_1357924680 - -#include - -#if defined(HARNESS_EXPORTS) -# define HARNESS_API XALAN_PLATFORM_EXPORT -# define HARNESS_API_FUNCTION(T) XALAN_PLATFORM_EXPORT_FUNCTION(T) -#else -# define HARNESS_API XALAN_PLATFORM_IMPORT -# define HARNESS_API_FUNCTION(T) XALAN_PLATFORM_IMPORT_FUNCTION(T) -#endif - - -#endif // HARNESSDEFINITIONS_HEADER_GUARD_1357924680 diff -Nru xalan-1.10/c/Tests/Harness/Harness.dsp xalan-1.10/c/Tests/Harness/Harness.dsp --- xalan-1.10/c/Tests/Harness/Harness.dsp 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/Tests/Harness/Harness.dsp 1970-01-01 00:00:00.000000000 +0000 @@ -1,258 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Harness" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=Harness - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "Harness.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "Harness.mak" CFG="Harness - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Harness - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "Harness - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "Harness - Win32 Release with symbols" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "Harness - Win64 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "Harness - Win64 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Harness - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\Build\Win32\VC6\Release" -# PROP Intermediate_Dir "..\..\Build\Win32\VC6\Release\Harness" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MD /W4 /GR /GX /O2 /Ob2 /I "..\..\..\..\xml-xerces\c\src" /I "..\..\src\\" /I ".." /I "$(XERCESCROOT)\src" /I "$(XERCESCROOT)\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 xerces-c_2.lib /nologo /dll /pdb:none /machine:I386 /out:"..\..\Build\Win32\VC6\Release/Harness_1_8.dll" /implib:"..\..\Build\Win32\VC6\Release/Harness_1.lib" /libpath:"..\..\..\..\xml-xerces\c\Build\Win32\VC6\Release" /libpath:"$(XERCESCROOT)\Build\Win32\VC6\Release" /libpath:"$(XERCESCROOT)\lib" - -!ELSEIF "$(CFG)" == "Harness - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\Build\Win32\VC6\Debug" -# PROP Intermediate_Dir "..\..\Build\Win32\VC6\Debug\Harness" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /Yu"stdafx.h" /FD /GZ /c -# ADD CPP /nologo /MDd /W4 /Gm /GR /GX /Zi /Od /Gf /Gy /I "..\..\..\..\xml-xerces\c\src" /I "..\..\src\\" /I ".." /I "$(XERCESCROOT)\src" /I "$(XERCESCROOT)\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /Yc /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 xerces-c_2D.lib /nologo /dll /debug /machine:I386 /out:"..\..\Build\Win32\VC6\Debug/Harness_1_8D.dll" /implib:"..\..\Build\Win32\VC6\Debug/Harness_1D.lib" /pdbtype:sept /libpath:"..\..\..\..\xml-xerces\c\Build\Win32\VC6\Debug" /libpath:"$(XERCESCROOT)\Build\Win32\VC6\Debug" /libpath:"$(XERCESCROOT)\lib" -# SUBTRACT LINK32 /pdb:none - -!ELSEIF "$(CFG)" == "Harness - Win32 Release with symbols" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Harness___Win32_Release_with_symbols" -# PROP BASE Intermediate_Dir "Harness___Win32_Release_with_symbols" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\Build\Win32\VC6\Release.symbols" -# PROP Intermediate_Dir "..\..\Build\Win32\VC6\Release.symbols\Harness" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W4 /GR /GX /O2 /Ob2 /I "..\..\..\..\xml-xerces\c\src" /I "..\..\src\\" /I "..\harness\\" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /FD /c -# ADD CPP /nologo /MD /W4 /GR /GX /Zi /O2 /Ob2 /I "..\..\..\..\xml-xerces\c\src" /I "..\..\src\\" /I ".." /I "$(XERCESCROOT)\src" /I "$(XERCESCROOT)\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 ..\..\..\..\xml-xerces\c\Build\Win32\VC6\Release\xerces-c_1.lib ..\..\Build\Win32\VC6\Release\PlatformSupport.lib ..\..\Build\Win32\VC6\Release\XalanDOM.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /machine:I386 -# SUBTRACT BASE LINK32 /debug -# ADD LINK32 xerces-c_2.lib /nologo /dll /debug /machine:I386 /out:"..\..\Build\Win32\VC6\Release.symbols/Harness_1_8S.dll" /implib:"..\..\Build\Win32\VC6\Release.symbols/Harness_1S.lib" /libpath:"..\..\..\..\xml-xerces\c\Build\Win32\VC6\Release" /libpath:"$(XERCESCROOT)\Build\Win32\VC6\Release" /libpath:"$(XERCESCROOT)\lib" -# SUBTRACT LINK32 /pdb:none - -!ELSEIF "$(CFG)" == "Harness - Win64 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\Build\Win64\VC6\Release" -# PROP Intermediate_Dir "..\..\Build\Win64\VC6\Release\Harness" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MD /W4 /GR /GX /O2 /Ob2 /I "..\..\..\..\xml-xerces\c\src" /I "..\..\src\\" /I ".." /I "$(XERCESCROOT)\src" /I "$(XERCESCROOT)\include" /D "WIN64" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 xerces-c_2.lib /nologo /dll /pdb:none /machine:IX86 /out:"..\..\Build\Win64\VC6\Release/Harness_1_8.dll" /implib:"..\..\Build\Win64\VC6\Release/Harness_1.lib" /libpath:"..\..\..\..\xml-xerces\c\Build\Win64\VC6\Release" /libpath:"$(XERCESCROOT)\Build\Win64\VC6\Release" /libpath:"$(XERCESCROOT)\lib" /machine:IA64 - -!ELSEIF "$(CFG)" == "Harness - Win64 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\Build\Win64\VC6\Debug" -# PROP Intermediate_Dir "..\..\Build\Win64\VC6\Debug\Harness" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /Yu"stdafx.h" /FD /GZ /c -# ADD CPP /nologo /MDd /W4 /Gm /GR /GX /Zi /Od /Gf /Gy /I "..\..\..\..\xml-xerces\c\src" /I "..\..\src\\" /I ".." /I "$(XERCESCROOT)\src" /I "$(XERCESCROOT)\include" /D "WIN64" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /Yc /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 xerces-c_2D.lib /nologo /dll /debug /machine:IX86 /out:"..\..\Build\Win64\VC6\Debug/Harness_1_8D.dll" /implib:"..\..\Build\Win64\VC6\Debug/Harness_1D.lib" /pdbtype:sept /libpath:"..\..\..\..\xml-xerces\c\Build\Win64\VC6\Debug" /libpath:"$(XERCESCROOT)\Build\Win64\VC6\Debug" /libpath:"$(XERCESCROOT)\lib" /machine:IA64 -# SUBTRACT LINK32 /pdb:none - -!ENDIF - -# Begin Target - -# Name "Harness - Win32 Release" -# Name "Harness - Win32 Debug" -# Name "Harness - Win32 Release with symbols" -# Name "Harness - Win64 Release" -# Name "Harness - Win64 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\FileUtility.cpp - -!IF "$(CFG)" == "Harness - Win32 Release" - -!ELSEIF "$(CFG)" == "Harness - Win32 Debug" - -# ADD CPP /YX - -!ELSEIF "$(CFG)" == "Harness - Win32 Release with symbols" - -!ELSEIF "$(CFG)" == "Harness - Win64 Release" - -!ELSEIF "$(CFG)" == "Harness - Win64 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\HarnessInit.cpp -# End Source File -# Begin Source File - -SOURCE=.\XMLFileReporter.cpp - -!IF "$(CFG)" == "Harness - Win32 Release" - -!ELSEIF "$(CFG)" == "Harness - Win32 Debug" - -# ADD CPP /YX - -!ELSEIF "$(CFG)" == "Harness - Win32 Release with symbols" - -!ELSEIF "$(CFG)" == "Harness - Win64 Release" - -!ELSEIF "$(CFG)" == "Harness - Win64 Debug" - -!ENDIF - -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\FileUtility.hpp -# End Source File -# Begin Source File - -SOURCE=.\HarnessDefinitions.hpp -# End Source File -# Begin Source File - -SOURCE=.\HarnessInit.hpp -# End Source File -# Begin Source File - -SOURCE=.\XMLFileReporter.hpp -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# Begin Source File - -SOURCE=.\Harness.rc -# End Source File -# Begin Source File - -SOURCE=.\resource.h -# End Source File -# End Group -# End Target -# End Project diff -Nru xalan-1.10/c/Tests/Harness/HarnessInit.cpp xalan-1.10/c/Tests/Harness/HarnessInit.cpp --- xalan-1.10/c/Tests/Harness/HarnessInit.cpp 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/Tests/Harness/HarnessInit.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -/* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "HarnessInit.hpp" - - - -#include - - - -#include "FileUtility.hpp" - - - -XALAN_CPP_NAMESPACE_BEGIN - - - -static const XalanDOMInit* s_xalanDOMInit = 0; - - - -HarnessInit::HarnessInit() -{ - assert(s_xalanDOMInit == 0); - - s_xalanDOMInit = new XalanDOMInit; - - FileUtility::initialize(); -} - - - -HarnessInit::~HarnessInit() -{ - FileUtility::terminate(); - - delete s_xalanDOMInit; - - s_xalanDOMInit = 0; -} - - - -XALAN_CPP_NAMESPACE_END diff -Nru xalan-1.10/c/Tests/Harness/HarnessInit.hpp xalan-1.10/c/Tests/Harness/HarnessInit.hpp --- xalan-1.10/c/Tests/Harness/HarnessInit.hpp 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/Tests/Harness/HarnessInit.hpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -/* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#if !defined(HARNESSINIT_HEADER_GUARD_1357924690) -#define HARNESSINIT_HEADER_GUARD_1357924690 - -#include - - - -XALAN_CPP_NAMESPACE_BEGIN - - - -// This class is exported from the Harness.dll -class HARNESS_API HarnessInit -{ -public: - - /** Simple constructor, performs initialization. */ - HarnessInit(); - - ~HarnessInit(); -}; - - - -XALAN_CPP_NAMESPACE_END - - - -#endif diff -Nru xalan-1.10/c/Tests/Harness/Harness.rc xalan-1.10/c/Tests/Harness/Harness.rc --- xalan-1.10/c/Tests/Harness/Harness.rc 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/Tests/Harness/Harness.rc 1970-01-01 00:00:00.000000000 +0000 @@ -1,111 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,8,0,0 - PRODUCTVERSION 1,8,0,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "Dynamic linked library for Xalan-C++\0" - VALUE "CompanyName", "Apache Software Foundation\0" - VALUE "FileDescription", "Dynamic Link Library for Xalan-C++ Version 1.8.0\0" - VALUE "FileVersion", "1, 8, 0, 0\0" - VALUE "InternalName", "Harness_1_8_0.dll\0" - VALUE "LegalCopyright", "Copyright © Apache Software Foundation 1999-2004. Subject to licensing terms\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "Harness_1_8_0.dll\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "Xalan-C++ Version 1.7.0\0" - VALUE "ProductVersion", "1, 8, 0, 0\0" - VALUE "SpecialBuild", "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // !_MAC - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff -Nru xalan-1.10/c/Tests/Harness/Harness.vcproj xalan-1.10/c/Tests/Harness/Harness.vcproj --- xalan-1.10/c/Tests/Harness/Harness.vcproj 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/Tests/Harness/Harness.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,249 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru xalan-1.10/c/Tests/Harness/resource.h xalan-1.10/c/Tests/Harness/resource.h --- xalan-1.10/c/Tests/Harness/resource.h 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/Tests/Harness/resource.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by Harness.rc -// -#define DummyString 1 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 101 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1000 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff -Nru xalan-1.10/c/Tests/Harness/XMLFileReporter.cpp xalan-1.10/c/Tests/Harness/XMLFileReporter.cpp --- xalan-1.10/c/Tests/Harness/XMLFileReporter.cpp 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/Tests/Harness/XMLFileReporter.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,751 +0,0 @@ -/* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "XMLFileReporter.hpp" - - - -#include -#include - - - -#include -#include - - - -XALAN_CPP_NAMESPACE_BEGIN - - - -XMLFileReporter::XMLFileReporter(const XalanDOMString& fileName) : - OPT_FILENAME(), - ELEM_RESULTSFILE(), - ELEM_TESTFILE(), - ELEM_FILERESULT(), - ELEM_TESTCASE(), - ELEM_CASERESULT(), - ELEM_CHECKRESULT(), - ELEM_STATISTIC(), - ELEM_LONGVAL(), - ELEM_DOUBLEVAL(), - ELEM_MESSAGE(), - ELEM_ARBITRARY(), - ELEM_HASHTABLE(), - ELEM_HASHITEM(), - ATTR_LEVEL(), - ATTR_DESC(), - ATTR_TIME(), - ATTR_RESULT(), - ATTR_KEY(), - ATTR_FILENAME(), - LESS_THAN(), - GREATER_THAN(), - EQUALS_QUOTE(), - SPACE(), - QUOTE(), - QUOTE_SPACE(), - QUOTE_GREATER_THAN(), - QUOTE_SOLIDUS_GREATER_THAN(), - PASS(), - AMBG(), - ERRR(), - FAIL(), - LESS_THAN_SOLIDUS(), - XML_HEADER(), - REASON_EQUALS_QUOTE(), - TESTCASEINIT_HDR(), - TESTCASECLOSE_HDR(), - MESSAGE_HDR(), - STATISTIC_HDR(), - ARBITRARY_HDR(), - HASHTABLE_HDR(), - HASHITEM_HDR(), - CHECKPASS_HDR(), - CHECKAMBG_HDR(), - CHECKERRR_HDR(), - CHECKFAIL_HDR(), - CHECKFAIL_FTR(), - m_anyOutput(false), - m_fileName(fileName), - m_fileHandle(0), - m_ready(false), - m_error(false), - m_flushOnCaseClose(true) -{ - if (m_fileName.empty() == false) - { - m_ready = initialize(); - } -} - -bool -XMLFileReporter::initialize() -{ - if (m_fileName.empty() == true) - { - // We don't have a valid file, so bail - m_error = true; - m_ready = false; - fprintf(stderr, "XMLFileReporter.initialize() ERROR: No file name specified"); - } - else - { - // Transcode down the file name... - const CharVectorType theTranscodedFileName(m_fileName.transcode()); - const char* const theTranscodedFileNamePointer = &theTranscodedFileName.front(); - - // Create a file and ensure it has a place to live - m_fileHandle = fopen(theTranscodedFileNamePointer, "w"); - if (m_fileHandle == 0) - { - // Couldn't create or find the directory for the file to live in, so bail - m_error = true; - m_ready = false; - fprintf(stderr, "XMLFileReporter.initialize() ERROR: unble to open file, %s", theTranscodedFileNamePointer); - return(false); - } - else - { - m_ready = true; - - initStrings(); - - startResultsFile(); - - // fprintf(stderr, "DEBUG:XMLFileReporter.initialize() complete with " + fileName); - } - } - - return m_ready; -} - - - -bool -XMLFileReporter::getFlushOnCaseClose() -{ - return(m_flushOnCaseClose); -} - - - -const XalanDOMString& -XMLFileReporter::getFileName() const -{ - return(m_fileName); -} - - - -void -XMLFileReporter::setFileName(const XalanDOMString& fileName) -{ - m_fileName = fileName; -} - - - -bool -XMLFileReporter::checkError() -{ - // Ensure our underlying reporter, if one, is still OK - if (m_fileHandle == 0) - { - m_error = true; - } - return(m_error); -} - - - -bool -XMLFileReporter::isReady() -{ - // Ensure our underlying reporter, if one, is still OK - if (m_fileHandle == 0) - { - // NEEDSWORK: should we set m_ready = false in this case? - // errors in the PrintStream are not necessarily fatal - m_error = true; - m_ready = false; - } - return(m_ready); -} - - - -void -XMLFileReporter::flush() -{ - if (isReady()) - { - fflush(m_fileHandle); - } -} - - - -void -XMLFileReporter::close() -{ - fflush(m_fileHandle); - if (isReady()) - { - if (m_fileHandle != 0) - { - closeResultsFile(); - fclose(m_fileHandle); - } - } - m_ready = false; -} - - - -void -XMLFileReporter::logTestFileInit(const XalanDOMString& msg) -{ - if (isReady()) - { - printToFile(LESS_THAN + ELEM_TESTFILE - + SPACE + ATTR_DESC + EQUALS_QUOTE + escapestring(msg) + QUOTE_SPACE + ATTR_TIME + EQUALS_QUOTE + getDateTimeString() + QUOTE_GREATER_THAN); - } -} - - - -void -XMLFileReporter::logTestFileClose(const XalanDOMString& /* msg */, const XalanDOMString& /* result */) -{ - if (isReady()) - { -// printToFile(LESS_THAN + ELEM_FILERESULT -// + SPACE + ATTR_DESC + EQUALS_QUOTE + escapestring(msg) + QUOTE_SPACE + ATTR_RESULT + EQUALS_QUOTE + result + QUOTE_SPACE + ATTR_TIME + EQUALS_QUOTE + getDateTimeString() + QUOTE_SOLIDUS_GREATER_THAN); - printToFile(LESS_THAN_SOLIDUS + ELEM_TESTFILE + GREATER_THAN); - } - flush(); -} - - - -void -XMLFileReporter::logTestCaseInit(const XalanDOMString& msg) -{ - if (isReady()) - { - printToFile(TESTCASEINIT_HDR + escapestring(msg) + QUOTE_GREATER_THAN); - } -} - - - -void -XMLFileReporter::logTestCaseClose(const XalanDOMString& /* msg */, const XalanDOMString& /* result */) -{ - if (isReady()) - { - //printToFile(TESTCASECLOSE_HDR + escapestring(msg) + QUOTE_SPACE + ATTR_RESULT + EQUALS_QUOTE + result + QUOTE_SOLIDUS_GREATER_THAN); - printToFile(LESS_THAN_SOLIDUS + ELEM_TESTCASE + GREATER_THAN); - } - if (getFlushOnCaseClose()) - { - flush(); - } -} - - - -void -XMLFileReporter::logMessage(int level, const XalanDOMString& msg) -{ - char tmp[20]; - sprintf(tmp, "%d", level); - - if (isReady()) - { - printToFile(MESSAGE_HDR + tmp + QUOTE_GREATER_THAN); - printToFile(escapestring(msg)); - printToFile(LESS_THAN_SOLIDUS + ELEM_MESSAGE + GREATER_THAN); - } -} - -void XMLFileReporter::addMetricToAttrs(char* desc, double theMetric, Hashtable& attrs) -{ - XalanDOMString temp; - - DoubleToDOMString(theMetric, temp); - attrs.insert(Hashtable::value_type(XalanDOMString(desc), temp)); - - return; -} - -void -XMLFileReporter::logElementWAttrs(int /* level */, const XalanDOMString& element, Hashtable attrs, const XalanDOMString& msg) -{ - if (isReady() && !element.empty()&& !attrs.empty()) - { -// char tmp[20]; -// sprintf(tmp, "%d", level); -// -// Took out this level attribute cuz we don't use it. -// printToFile(LESS_THAN + element + SPACE + ATTR_LEVEL + EQUALS_QUOTE -// + tmp + QUOTE); - printToFile(LESS_THAN + element + SPACE); - - Hashtable::iterator theEnd = attrs.end(); - - for(Hashtable::iterator i = attrs.begin(); i != theEnd; ++i) - { - - printToFile((*i).first + EQUALS_QUOTE - + (*i).second + QUOTE); - } - - printToFile(GREATER_THAN); - if (msg.empty() != 0) - printToFile(escapestring(msg)); - printToFile(LESS_THAN_SOLIDUS + element + GREATER_THAN); - } -} - -void -XMLFileReporter::logElement(const XalanDOMString& element, const XalanDOMString& msg) -{ - if (isReady() && !element.empty() && !msg.empty()) - { - printToFile(LESS_THAN + element + GREATER_THAN + escapestring(msg) + LESS_THAN_SOLIDUS + element + GREATER_THAN); - } -} - -void -XMLFileReporter::logStatistic (int level, long lVal, double dVal, const XalanDOMString& msg) -{ - if (isReady()) - { - char tmp[40]; - - sprintf(tmp, "%d", level); - printToFile(STATISTIC_HDR + tmp + QUOTE_SPACE + ATTR_DESC + EQUALS_QUOTE + escapestring(msg) + QUOTE_GREATER_THAN); - - sprintf(tmp, "%ld", lVal); - printToFile(LESS_THAN + ELEM_LONGVAL + GREATER_THAN + tmp + LESS_THAN_SOLIDUS + ELEM_LONGVAL + GREATER_THAN); - - sprintf(tmp, "%f", dVal); - printToFile(LESS_THAN + ELEM_DOUBLEVAL + GREATER_THAN + tmp + LESS_THAN_SOLIDUS + ELEM_DOUBLEVAL + GREATER_THAN); - - printToFile(LESS_THAN_SOLIDUS + ELEM_STATISTIC + GREATER_THAN); - - } -} - - - -void -XMLFileReporter::logArbitraryMessage (int level, const XalanDOMString& msg) -{ - char tmp[20]; - sprintf(tmp, "%d", level); - - if (isReady()) - { - printToFile(ARBITRARY_HDR + tmp + QUOTE_GREATER_THAN); - printToFile(escapestring(msg)); - printToFile(LESS_THAN_SOLIDUS + ELEM_ARBITRARY + GREATER_THAN); - } -} - -/* -void logHashtable (int level, Hashtable hash, XalanDOMString msg) -{ - if (isReady()) - { - printToFile(HASHTABLE_HDR + level + QUOTE_SPACE + ATTR_DESC + EQUALS_QUOTE + msg + QUOTE_GREATER_THAN); - if (hash == null) - { - printToFile(LESS_THAN + ELEM_HASHITEM + SPACE + ATTR_KEY + "=\"null\">"); - printToFile(LESS_THAN_SOLIDUS + ELEM_HASHITEM + GREATER_THAN); - } - try - { - for (Enumeration enum = hash.keys(); enum.hasMoreElements();) - { - Object key = enum.nextElement(); - // Ensure we'll have clean output by pre-fetching value before outputting anything - XalanDOMString value = hash.get(key).tostring(); - printToFile(HASHITEM_HDR + key.tostring() + QUOTE_GREATER_THAN); - printToFile(value); - printToFile(LESS_THAN_SOLIDUS + ELEM_HASHITEM + GREATER_THAN); - } - } - catch (Exception e) - { - // No-op: should ensure we have clean output - } - printToFile(LESS_THAN_SOLIDUS + ELEM_HASHTABLE + GREATER_THAN); - } -} -*/ - - - -void -XMLFileReporter::logCheckPass(const XalanDOMString& comment) -{ - if (isReady()) - { - printToFile(CHECKPASS_HDR + escapestring(comment) + QUOTE_SOLIDUS_GREATER_THAN); - } -} - - -void -XMLFileReporter::logCheckFail(const XalanDOMString& comment) -{ - if (isReady()) - { - printToFile(CHECKFAIL_HDR + escapestring(comment) + QUOTE_SOLIDUS_GREATER_THAN); - - } -} - - -void -XMLFileReporter::logCheckFail(const XalanDOMString& test, Hashtable actexp) -{ - if (isReady()) - { - printToFile(CHECKFAIL_HDR + escapestring(test) + QUOTE); - - printToFile(GREATER_THAN); - - Hashtable::iterator aeEnd = actexp.end(); - for(Hashtable::iterator ii = actexp.begin(); ii != aeEnd; ++ii) - { - logElement((*ii).first, (*ii).second); - } - - printToFile(CHECKFAIL_FTR); - } -} - -void -XMLFileReporter::logCheckFail(const XalanDOMString& test, Hashtable attrs, Hashtable actexp) -{ - if (isReady()) - { - printToFile(CHECKFAIL_HDR + escapestring(test) + QUOTE); - - Hashtable::iterator fdEnd = attrs.end(); - for(Hashtable::iterator i = attrs.begin(); i != fdEnd; ++i) - { - printToFile((*i).first + EQUALS_QUOTE - + (*i).second + QUOTE); - } - - printToFile(GREATER_THAN); - - Hashtable::iterator aeEnd = actexp.end(); - for(Hashtable::iterator ii = actexp.begin(); ii != aeEnd; ++ii) - { - logElement((*ii).first, (*ii).second); - } - - printToFile(CHECKFAIL_FTR); - } -} - -void -XMLFileReporter::logCheckAmbiguous(const XalanDOMString& comment) -{ - if (isReady()) - { - printToFile(CHECKAMBG_HDR + escapestring(comment) + QUOTE_SOLIDUS_GREATER_THAN); - } -} - - -void -XMLFileReporter::logErrorResult(const XalanDOMString& test, const XalanDOMString& reason) -{ - if (isReady()) - { - printToFile(CHECKFAIL_HDR + escapestring(test) + QUOTE_SPACE + XalanDOMString(REASON_EQUALS_QUOTE) + escapestring(reason) + QUOTE_SOLIDUS_GREATER_THAN); - - } -} - - -void -XMLFileReporter::logCheckErr(const XalanDOMString& comment) -{ - if (isReady()) - { - printToFile(CHECKERRR_HDR + escapestring(comment) + QUOTE_SOLIDUS_GREATER_THAN); - } -} - - - -static const XalanDOMChar theAmpersandString[] = -{ - XalanUnicode::charAmpersand, - XalanUnicode::charLetter_a, - XalanUnicode::charLetter_m, - XalanUnicode::charLetter_p, - XalanUnicode::charSemicolon, - 0 -}; - - - -static const XalanDOMChar theApostropheString[] = -{ - XalanUnicode::charAmpersand, - XalanUnicode::charLetter_a, - XalanUnicode::charLetter_p, - XalanUnicode::charLetter_o, - XalanUnicode::charLetter_s, - XalanUnicode::charSemicolon, - 0 -}; - - - -static const XalanDOMChar theLessThanString[] = -{ - XalanUnicode::charAmpersand, - XalanUnicode::charLetter_l, - XalanUnicode::charLetter_t, - XalanUnicode::charSemicolon, - 0 -}; - - - -static const XalanDOMChar theGreaterThanString[] = -{ - XalanUnicode::charAmpersand, - XalanUnicode::charLetter_g, - XalanUnicode::charLetter_t, - XalanUnicode::charSemicolon, - 0 -}; - - - -static const XalanDOMChar theQuoteString[] = -{ - XalanUnicode::charAmpersand, - XalanUnicode::charLetter_q, - XalanUnicode::charLetter_u, - XalanUnicode::charLetter_o, - XalanUnicode::charLetter_t, - XalanUnicode::charSemicolon, - 0 -}; - - - -XalanDOMString -XMLFileReporter::escapestring(const XalanDOMString& s) -{ - XalanDOMString sb; - - const XalanDOMString::size_type length = s.length(); - - sb.reserve(length); - - for (XalanDOMString::size_type i = 0; i < length; i++) - { - const XalanDOMChar ch = charAt(s, i); - - if (XalanUnicode::charLessThanSign == ch) - { - append(sb, theLessThanString); - } - else if (XalanUnicode::charGreaterThanSign == ch) - { - append(sb, theGreaterThanString); - } - else if (XalanUnicode::charAmpersand == ch) - { - append(sb, theAmpersandString); - } - else if (XalanUnicode::charQuoteMark == ch) - { - append(sb, theQuoteString); - } - else if (XalanUnicode::charApostrophe == ch) - { - append(sb, theApostropheString); - } - else - { - append(sb, ch); - } - } - - return sb; -} - - - -bool -XMLFileReporter::startResultsFile() -{ - if (isReady()) - { - // Write out XML header and root test result element - printToFile(XML_HEADER); - - // Note: this tag is closed in our .close() method, which the caller had better call! - printToFile(LESS_THAN + ELEM_RESULTSFILE + SPACE + ATTR_FILENAME + EQUALS_QUOTE + m_fileName + QUOTE_GREATER_THAN); - - return true; - } - else - { - return false; - } -} - - - -bool -XMLFileReporter::closeResultsFile() -{ - if (isReady() == false) - { - return false; - } - else - { - printToFile(LESS_THAN_SOLIDUS + ELEM_RESULTSFILE + GREATER_THAN); - return true; - } -} - - -bool -XMLFileReporter::printToFile(const XalanDOMString& output) -{ - if (isReady() == false) - { - return false; - } - else - { - const CharVectorType theResult(TranscodeToLocalCodePage(output)); - - if(!theResult.size()) - { - fputs("Error transcoding text to local codepage", m_fileHandle); - } - else - { - fputs(c_str(theResult), m_fileHandle); - } - - fputs("\n", m_fileHandle); - - return true; - } -} - - - -XalanDOMString -XMLFileReporter::getDateTimeString() -{ -#if defined(XALAN_STRICT_ANSI_HEADERS) - using std::tm; - using std::time; - using std::localtime; - using std::asctime; - using std::strlen; -#endif - - struct tm *tmNow; - time_t time_tNow; - - time(&time_tNow); - tmNow = localtime(&time_tNow); - - const char* const theTime = asctime(tmNow); - - return XalanDOMString(theTime, strlen(theTime) - 1); -} - - - -void -XMLFileReporter::initStrings() -{ - OPT_FILENAME = XALAN_STATIC_UCODE_STRING("filename"); - ELEM_RESULTSFILE = XALAN_STATIC_UCODE_STRING("resultsfile"); - ELEM_TESTFILE = XALAN_STATIC_UCODE_STRING("testfile"); - ELEM_FILERESULT = XALAN_STATIC_UCODE_STRING("fileresult"); - ELEM_TESTCASE = XALAN_STATIC_UCODE_STRING("Test_Dir"); - ELEM_CASERESULT = XALAN_STATIC_UCODE_STRING("Dir-result"); - ELEM_CHECKRESULT = XALAN_STATIC_UCODE_STRING("Testcase"); - ELEM_STATISTIC = XALAN_STATIC_UCODE_STRING("statistic"); - ELEM_LONGVAL = XALAN_STATIC_UCODE_STRING("longval"); - ELEM_DOUBLEVAL = XALAN_STATIC_UCODE_STRING("doubleval"); - ELEM_MESSAGE = XALAN_STATIC_UCODE_STRING("message"); - ELEM_ARBITRARY = XALAN_STATIC_UCODE_STRING("arbitrary"); - ELEM_HASHTABLE = XALAN_STATIC_UCODE_STRING("hashtable"); - ELEM_HASHITEM = XALAN_STATIC_UCODE_STRING("hashitem"); - ATTR_LEVEL = XALAN_STATIC_UCODE_STRING("level"); - ATTR_DESC = XALAN_STATIC_UCODE_STRING("desc"); - ATTR_TIME = XALAN_STATIC_UCODE_STRING("time"); - ATTR_RESULT = XALAN_STATIC_UCODE_STRING("result"); - ATTR_KEY = XALAN_STATIC_UCODE_STRING("key"); - ATTR_FILENAME = OPT_FILENAME; - LESS_THAN = XALAN_STATIC_UCODE_STRING("<"); - GREATER_THAN = XALAN_STATIC_UCODE_STRING(">"); - EQUALS_QUOTE = XALAN_STATIC_UCODE_STRING("=\""); - SPACE = XALAN_STATIC_UCODE_STRING(" "); - QUOTE = XALAN_STATIC_UCODE_STRING("\""); - QUOTE_SPACE = XALAN_STATIC_UCODE_STRING("\" "); - QUOTE_GREATER_THAN = XALAN_STATIC_UCODE_STRING("\">"); - QUOTE_SOLIDUS_GREATER_THAN = XALAN_STATIC_UCODE_STRING("\"/>"); - PASS = XALAN_STATIC_UCODE_STRING("PASS"); - AMBG = XALAN_STATIC_UCODE_STRING("AMBG"); - ERRR = XALAN_STATIC_UCODE_STRING("ERRR"); - FAIL = XALAN_STATIC_UCODE_STRING("FAIL"); - LESS_THAN_SOLIDUS = XALAN_STATIC_UCODE_STRING(""); - REASON_EQUALS_QUOTE = XALAN_STATIC_UCODE_STRING("reason=\""); - - TESTCASEINIT_HDR = LESS_THAN + ELEM_TESTCASE + SPACE + ATTR_DESC + EQUALS_QUOTE; - TESTCASECLOSE_HDR = LESS_THAN + ELEM_CASERESULT + SPACE + ATTR_DESC + EQUALS_QUOTE; - MESSAGE_HDR = LESS_THAN + ELEM_MESSAGE + SPACE + ATTR_LEVEL + EQUALS_QUOTE; - STATISTIC_HDR = LESS_THAN + ELEM_STATISTIC + SPACE + ATTR_LEVEL + EQUALS_QUOTE; - ARBITRARY_HDR = LESS_THAN + ELEM_ARBITRARY + SPACE + ATTR_LEVEL + EQUALS_QUOTE; - HASHTABLE_HDR = LESS_THAN + ELEM_HASHTABLE + SPACE + ATTR_LEVEL + EQUALS_QUOTE; - HASHITEM_HDR = LESS_THAN + ELEM_HASHITEM + SPACE + ATTR_KEY + EQUALS_QUOTE; - CHECKPASS_HDR = LESS_THAN + ELEM_CHECKRESULT + SPACE + ATTR_RESULT + EQUALS_QUOTE + PASS + QUOTE_SPACE + ATTR_DESC + EQUALS_QUOTE; - CHECKAMBG_HDR = LESS_THAN + ELEM_CHECKRESULT + SPACE + ATTR_RESULT + EQUALS_QUOTE + AMBG + QUOTE_SPACE + ATTR_DESC + EQUALS_QUOTE; - CHECKERRR_HDR = LESS_THAN + ELEM_CHECKRESULT + SPACE + ATTR_RESULT + EQUALS_QUOTE + ERRR + QUOTE_SPACE + ATTR_DESC + EQUALS_QUOTE; - CHECKFAIL_HDR = LESS_THAN + ELEM_CHECKRESULT + SPACE + ATTR_RESULT + EQUALS_QUOTE + FAIL + QUOTE_SPACE + ATTR_DESC + EQUALS_QUOTE; - CHECKFAIL_FTR = LESS_THAN_SOLIDUS + ELEM_CHECKRESULT + GREATER_THAN; -} - - - -XALAN_CPP_NAMESPACE_END diff -Nru xalan-1.10/c/Tests/Harness/XMLFileReporter.hpp xalan-1.10/c/Tests/Harness/XMLFileReporter.hpp --- xalan-1.10/c/Tests/Harness/XMLFileReporter.hpp 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/Tests/Harness/XMLFileReporter.hpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,377 +0,0 @@ -/* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#if !defined(HARNESS_HEADER_GUARD_1357924680) -#define HARNESS_HEADER_GUARD_1357924680 - - - -#include - - - -#include -#include - - - -#include - - - -XALAN_CPP_NAMESPACE_BEGIN - - - -// This class is exported from the Harness.dll -class HARNESS_API XMLFileReporter -{ -public: - -#if defined(XALAN_NO_STD_NAMESPACE) - typedef map > Hashtable; -#else - typedef std::map Hashtable; -#endif - -#if defined(XALAN_STRICT_ANSI_HEADERS) - typedef std::FILE FileHandleType; -#else - typedef FILE FileHandleType; -#endif - -public: - - - // Construct and initialize this reporter with specified filename, if - // the filename is not empty. - XMLFileReporter(const XalanDOMString& fileName = XalanDOMString()); - - // Initialize this XMLFileReporter. Must be called before attempting to log anything. - bool initialize(); - - // Accessor for flushing; is set from properties. - bool getFlushOnCaseClose(); - - // Accessor methods for our properties block. - const XalanDOMString& getFileName() const; - - // Accessor methods for our properties block. - void setFileName(const XalanDOMString& fileName); - - // Accessor methods for our properties block. - void setFileName(const char* fileName) - { - setFileName(XalanDOMString(fileName)); - } - - // - // Is this Reporter still running OK? - // @returns status - true if an error has occoured, false if it's still working fine - //

XMLFileReporter should just about never have errors.

- bool checkError(); - - - // - // Is this Reporter ready to log results? - // @returns status - true if it's ready to report, false otherwise - bool isReady(); - - // Flush this reporter - ensure our File is flushed. - void flush(); - - - // Close this reporter - ensure our File, etc. are closed. - void close(); - - //----------------------------------------------------- - //-------- Testfile / Testcase start and stop routines -------- - //----------------------------------------------------- - - /** - * Report that a testfile has started. - * @param msg message to log out - */ - void logTestFileInit(const XalanDOMString& msg); - - void logTestFileInit(const char* msg) - { - logTestFileInit(XalanDOMString(msg)); - } - - /** - * Report that a testfile has finished, and report it's result. - * @param msg message to log out - * @param result result of testfile - */ - void logTestFileClose(const XalanDOMString& msg, const XalanDOMString& result); - - void logTestFileClose(const char* msg, const char* result) - { - logTestFileClose(XalanDOMString(msg), XalanDOMString(result)); - } - - void logTestCaseInit(const XalanDOMString& msg); - - void logTestCaseInit(const char* msg) - { - logTestCaseInit(XalanDOMString(msg)); - } - - /** - * Report that a testcase has finished, and report it's result. - * @param msg message to log out - * @param result result of testfile - */ - void logTestCaseClose(const XalanDOMString& msg, const XalanDOMString& result); - - void logTestCaseClose(const char* msg, const char* result) - { - logTestCaseClose(XalanDOMString(msg), XalanDOMString(result)); - } - //----------------------------------------------------- - //-------- Test results reporting and logging routines -------- - //----------------------------------------------------- - - - /** - * Report a comment to result file with specified severity. - *

Record format: <message level="##">msg</message>

- * @param level severity or class of message. - * @param msg comment to log out. - */ - void logMessage(int level, const XalanDOMString& msg); - - /** - * Logs out statistics to result file with specified severity. - *

Record format: <statistic level="##" desc="msg"><longval>1234</longval><doubleval>1.234</doubleval></statistic>

- * @param level severity of message. - * @param lVal statistic in long format. - * @param dVal statistic in double format. - * @param msg comment to log out. - */ - void logStatistic (int level, long lVal, double dVal, const XalanDOMString& msg); - - void logStatistic (int level, long lVal, double dVal, const char* msg) - { - logStatistic(level, lVal, dVal, XalanDOMString(msg)); - } - - // This routine will add an attribute to the attribute list. - void addMetricToAttrs(char* desc, double theMetric, Hashtable& attrs); - - /** - * Logs out a element to results with specified severity. - * Uses user-supplied element name and attribute list. Currently - * attribute values and msg are forced .toString(). Also, - * 'level' is forced to be the first attribute of the element. - * @param level severity of message. - * @param element name of enclosing element - * @param attrs hash of name=value attributes; note that the - * caller must ensure they're legal XML - * @param msg comment to log out. - */ - void logElementWAttrs(int level, const XalanDOMString& element, Hashtable attrs, const XalanDOMString& msg); - - void logElementWAttrs(int level, const char* element, Hashtable attrs, const char* msg) - { - logElementWAttrs(level, XalanDOMString(element), attrs, XalanDOMString(msg)); - } - - void logElement(int level, const XalanDOMString& element, const XalanDOMString& msg); - - void logElement(const XalanDOMString& element, const XalanDOMString& msg); - /** - * Report an arbitrary XalanDOMString to result file with specified severity. - *

Appends and prepends \\n newline characters at the start and - * end of the message to separate it from the tags.

- *

Record format: <arbitrary level="##">
- * msg
- * </arbitrary> - *

- * @param level severity or class of message. - * @param msg arbitrary XalanDOMString to log out. - */ - void logArbitraryMessage (int level, const XalanDOMString& msg); - - /** - * Report a complete Hashtable to result file with specified severity. - *

Indents each hashitem within the table.

- *

Record format: <hashtable level="##" desc="msg"/>
- *   <hashitem key="key1">value1</hashitem>
- *   <hashitem key="key2">value2</hashitem>
- * </hashtable> - *

- * @param level severity or class of message. - * @param hash Hashtable to log the contents of. - * @param msg decription of the Hashtable. - */ - /* - void logHashtable (int level, Hashtable hash, const XalanDOMString& msg); - */ - - /** - * Writes out a Pass record with comment. - *

Record format: <checkresult result="PASS" desc="comment"/>

- * @param comment comment to log with the pass record. - */ - void logCheckPass(const XalanDOMString& comment); - - /** - * Writes out an ambiguous record with comment. - *

Record format: <checkresult result="AMBG" desc="comment"/>

- * @param comment comment to log with the ambg record. - */ - void logCheckAmbiguous(const XalanDOMString& comment); - - /** - * Writes out a Fail record with comment. - *

Record format: <checkresult result="FAIL" desc="comment"/>

- * @param comment comment to log with the fail record. - */ - void logCheckFail(const XalanDOMString& comment); - - void logCheckFail(const XalanDOMString& test, Hashtable faildata, Hashtable actexp); - - void logCheckFail(const XalanDOMString& test, Hashtable actexp); - - void logErrorResult(const XalanDOMString& test, const XalanDOMString& reason); - - /** - * Writes out a Error record with comment. - *

Record format: <checkresult result="ERRR" desc="comment"/>

- * @param comment comment to log with the error record. - */ - void logCheckErr(const XalanDOMString& comment); - - /** - * Escapes a XalanDOMString to remove <, >, ', &, and " so it's valid XML. - *

Stolen mostly from Xalan applet sample.

- * @param s XalanDOMString to escape. - * @return XalanDOMString that has been escaped. - */ - XalanDOMString escapestring(const XalanDOMString& s); - - -private: - - /** - * worker method to dump the xml header and open the resultsfile element. - */ - bool startResultsFile(); - - /** - * worker method to close the resultsfile element. - */ - bool closeResultsFile(); - - /** - * worker method to prints to the resultsfile. - */ - bool printToFile(const XalanDOMString& output); - - void - initStrings(); - - /** - * worker method to prints to the resultsfile. - */ - XalanDOMString getDateTimeString(); - - /** Key for Properties block that denotes our output filename. */ - XalanDOMString OPT_FILENAME; - - /** XML tagnames for results file structure. */ - XalanDOMString ELEM_RESULTSFILE; - XalanDOMString ELEM_TESTFILE; - XalanDOMString ELEM_FILERESULT; - XalanDOMString ELEM_TESTCASE; - XalanDOMString ELEM_CASERESULT; - XalanDOMString ELEM_CHECKRESULT; - XalanDOMString ELEM_STATISTIC; - XalanDOMString ELEM_LONGVAL; - XalanDOMString ELEM_DOUBLEVAL; - XalanDOMString ELEM_MESSAGE; - XalanDOMString ELEM_ARBITRARY; - XalanDOMString ELEM_HASHTABLE; - XalanDOMString ELEM_HASHITEM; - - /** XML attribute names for results file structure. */ - XalanDOMString ATTR_LEVEL; - XalanDOMString ATTR_DESC; - XalanDOMString ATTR_TIME; - XalanDOMString ATTR_RESULT; - XalanDOMString ATTR_KEY; - XalanDOMString ATTR_FILENAME; - XalanDOMString LESS_THAN; - XalanDOMString GREATER_THAN; - XalanDOMString EQUALS_QUOTE; - XalanDOMString SPACE; - XalanDOMString QUOTE; - XalanDOMString QUOTE_SPACE; - XalanDOMString QUOTE_GREATER_THAN; - XalanDOMString QUOTE_SOLIDUS_GREATER_THAN; - XalanDOMString PASS; - XalanDOMString AMBG; - XalanDOMString ERRR; - XalanDOMString FAIL; - XalanDOMString LESS_THAN_SOLIDUS; - XalanDOMString XML_HEADER; - XalanDOMString REASON_EQUALS_QUOTE; - - /** - * Optimization: for heavy use methods, form pre-defined constants to save on XalanDOMString concatenation. - *

Note the indent; must be updated if we ever switch to another indenting method.

- */ - XalanDOMString TESTCASEINIT_HDR; - XalanDOMString TESTCASECLOSE_HDR; - XalanDOMString MESSAGE_HDR; - XalanDOMString STATISTIC_HDR; - XalanDOMString ARBITRARY_HDR; - XalanDOMString HASHTABLE_HDR; - XalanDOMString HASHITEM_HDR; - XalanDOMString CHECKPASS_HDR; - XalanDOMString CHECKAMBG_HDR; - XalanDOMString CHECKERRR_HDR; - XalanDOMString CHECKFAIL_HDR; - XalanDOMString CHECKFAIL_FTR; - - /** If we have output anything yet. */ - bool m_anyOutput; - - /** Name of the file we're outputing to. */ - XalanDOMString m_fileName; - - /** File reference and other internal convenience variables. */ - FileHandleType* m_fileHandle; - - /** If we're ready to start outputting yet. */ - bool m_ready; - - /** If an error has occoured in this Reporter. */ - bool m_error; - - /** If we should flush after every logTestCaseClose. */ - bool m_flushOnCaseClose; - -}; // end of class XMLFileReporter - - - -XALAN_CPP_NAMESPACE_END - - - -#endif diff -Nru xalan-1.10/c/Tests/Makefile.in xalan-1.10/c/Tests/Makefile.in --- xalan-1.10/c/Tests/Makefile.in 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/Tests/Makefile.in 2005-07-15 13:09:29.000000000 +0000 @@ -62,7 +62,7 @@ $(XSL_BIN_DIR)/ThreadTest: ${XSL_OBJ_DIR}/ThreadTest.o ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} \ - ${EXTRA_LINK_OPTIONS} $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + ${EXTRA_LINK_OPTIONS} $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ${XSL_OBJ_DIR}/%.o:$(TESTS_DIR)/Threads/%.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -70,7 +70,7 @@ $(XSL_BIN_DIR)/Conf: ${XSL_OBJ_DIR}/conf.o ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} \ - ${EXTRA_LINK_OPTIONS} $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + ${EXTRA_LINK_OPTIONS} $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ${XSL_OBJ_DIR}/%.o:$(TESTS_DIR)/Conf/%.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< @@ -92,7 +92,7 @@ $(XSL_BIN_DIR)/Perf: $(PERF_OBJECTS) ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} \ - ${EXTRA_LINK_OPTIONS} $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + ${EXTRA_LINK_OPTIONS} $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ${XSL_OBJ_DIR}/%.o:$(TESTS_DIR)/Performance/%.cpp $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< diff -Nru xalan-1.10/c/xdocs/DoxyfileXalan xalan-1.10/c/xdocs/DoxyfileXalan --- xalan-1.10/c/xdocs/DoxyfileXalan 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/c/xdocs/DoxyfileXalan 2004-12-16 20:53:19.000000000 +0000 @@ -506,7 +506,7 @@ # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) -HAVE_DOT = NO +HAVE_DOT = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and diff -Nru xalan-1.10/debian/changelog xalan-1.10/debian/changelog --- xalan-1.10/debian/changelog 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/debian/changelog 2011-11-10 10:27:46.000000000 +0000 @@ -1,8 +1,58 @@ -xalan (1.10-4ubuntu1) oneiric; urgency=low +xalan (1.10-6) unstable; urgency=low - * Fix FTBFS with ld --as-needed. + * QA upload. + * Disable building in parallel; upstream makefile is not parallel-safe after + all. + + -- Jakub Wilk Thu, 10 Nov 2011 11:27:38 +0100 + +xalan (1.10-5) unstable; urgency=low + + * QA upload. + * Add ${misc:Depends}. + * Add build-arch and build-indep targets. + * Move doxygen to Build-Depends-Indep. Build documentation only if it's + installed. + * Remove duplicate Section field from debian/control. + * Bump standards version to 3.9.2 (no changes needed). + * Bump debhelper compatiblity level to 8. + + Update Build-Depends. + + Use dh_prep instead of dh_clean -k. + * Convert to source format 3.0 (quilt). + + Add debian/source/format. + + Split monolithic *.diff.gz into separate patches. + + Undo the following changes that are no longer needed: + - use of xalan-config.h; + - changes related to mod_xslt; + - files from 1.8 upstream tarball that are no longer present in 1.10 + upstream tarball. + * Update config.{guess,sub} unconditionally. Actually remove them in the + clean target. + * Bump shlibs to >= 1.10-3.3 (closes: #482174). Thanks to Tommi Vainikainen + and Michael Meskes for the bug report. + * Improve debian/rules: + + Remove commented-out commands. + + Use $(CURDIR) instead of $(shell pwd) in debian/rules. + + Pass CFLAGS, CXXFLAGS, CPPFLAGS and LDFLAGS (acquired from + dpkg-buildflags) to the configure script. + + Pass --build (and --host if cross-compiling) to the configure script. + + Pass -a to most dh_* commands is binary-arch. + + Add support for DEB_BUILD_OPTIONS=noopt. + + Add support for DEB_BUILD_OPTIONS=parallel=n. + + Remove unused variables. + * Remove obsolete Conflicts/Replaces. + * Multi-archify: + + Bump minimum required version of dpkg-dev to 1.16. + + Bump minimum required version of debhelper to 8.1.3. + + Make xalan ‘Multi-Arch: foreign’. + + Install shared libraries to /usr/lib/$(DEB_HOST_MULTIARCH) rather than + /usr/lib. + + Make libxalan110 and libxalan110-dev ‘Multi-Arch: same’. + + Add ‘Pre-Depends: ${misc:Pre-Depends}’ to libxalan110. + * Fix FTBFS with ld --as-needed (closes: #641289). Thanks to Matthias Klose + for the bug report and the patch. - -- Matthias Klose Mon, 12 Sep 2011 14:17:19 +0200 + -- Jakub Wilk Thu, 10 Nov 2011 00:58:47 +0100 xalan (1.10-4) unstable; urgency=low diff -Nru xalan-1.10/debian/clean xalan-1.10/debian/clean --- xalan-1.10/debian/clean 1970-01-01 00:00:00.000000000 +0000 +++ xalan-1.10/debian/clean 2011-11-09 22:32:00.000000000 +0000 @@ -0,0 +1,2 @@ +c/config.guess +c/config.sub diff -Nru xalan-1.10/debian/compat xalan-1.10/debian/compat --- xalan-1.10/debian/compat 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/debian/compat 2011-11-09 22:28:16.000000000 +0000 @@ -1 +1 @@ -5 +8 diff -Nru xalan-1.10/debian/control xalan-1.10/debian/control --- xalan-1.10/debian/control 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/debian/control 2011-11-09 23:04:36.000000000 +0000 @@ -2,13 +2,16 @@ Priority: extra Section: text Maintainer: Debian QA Group -Build-Depends: debhelper (>= 5.0.0), autotools-dev, doxygen, libxerces-c2-dev -Standards-Version: 3.8.0 +Build-Depends: debhelper (>= 8.1.3~), dpkg-dev (>= 1.16), autotools-dev, libxerces-c2-dev +Build-Depends-Indep: doxygen +Standards-Version: 3.9.2 Homepage: http://xml.apache.org/xalan-c/index.html Package: libxalan110 Architecture: any +Multi-Arch: same Section: libs +Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Description: Provides XSLT support for applications This is the Xalan XSLT processor from the Apache Software Foundation. @@ -17,10 +20,9 @@ Package: libxalan110-dev Architecture: any +Multi-Arch: same Section: libdevel -Depends: libxalan110 (= ${binary:Version}), libxerces-c2-dev, libc6-dev -Conflicts: libxalan18-dev, libxalan16-dev, libxalan14-dev, libxalan1.2-dev, libxalan1-dev -Replaces: libxalan18-dev, libxalan16-dev, libxalan14-dev, libxalan1.2-dev, libxalan1-dev +Depends: ${misc:Depends}, libxalan110 (= ${binary:Version}), libxerces-c2-dev, libc6-dev Description: Provides XSLT support for applications [development] This is the Xalan XSLT processor from the Apache Software Foundation. . @@ -30,9 +32,8 @@ Package: libxalan110-doc Architecture: all Section: doc +Depends: ${misc:Depends} Suggests: libxalan110-dev -Conflicts: libxalan18-doc, libxalan16-doc, libxalan14-doc -Replaces: libxalan18-doc, libxalan16-doc, libxalan14-doc Description: Provides XSLT support for applications [development docs] This is the Xalan XSLT processor from the Apache Software Foundation. . @@ -40,7 +41,7 @@ Package: xalan Architecture: any -Section: text +Multi-Arch: foreign Depends: ${shlibs:Depends}, ${misc:Depends} Description: XSLT processor This is the Xalan XSLT processor from the Apache Software Foundation. diff -Nru xalan-1.10/debian/patches/add-missing-includes.diff xalan-1.10/debian/patches/add-missing-includes.diff --- xalan-1.10/debian/patches/add-missing-includes.diff 1970-01-01 00:00:00.000000000 +0000 +++ xalan-1.10/debian/patches/add-missing-includes.diff 2011-11-09 17:00:39.000000000 +0000 @@ -0,0 +1,60 @@ +Description: Add missing includes to fix FTBFS with GCC 4.3. +Author: Brian M. Carlson +Bug-Debian: http://bugs.debian.org/454820 +Forwarded: no +Last-Update: 2011-11-09 + +--- a/c/src/xalanc/PlatformSupport/DirectoryEnumerator.hpp ++++ b/c/src/xalanc/PlatformSupport/DirectoryEnumerator.hpp +@@ -36,7 +36,7 @@ + + #include + #include +- ++#include + + #include "xercesc/framework/MemoryManager.hpp" + +--- a/c/src/xalanc/XSLT/ElemNumber.cpp ++++ b/c/src/xalanc/XSLT/ElemNumber.cpp +@@ -15,7 +15,7 @@ + */ + #include "ElemNumber.hpp" + +- ++#include + + #include + +--- a/c/src/xalanc/XalanDOM/XalanDOMString.cpp ++++ b/c/src/xalanc/XalanDOM/XalanDOMString.cpp +@@ -19,7 +19,7 @@ + + + #include +- ++#include + + + #include +--- a/c/src/xalanc/XMLSupport/FormatterToHTML.cpp ++++ b/c/src/xalanc/XMLSupport/FormatterToHTML.cpp +@@ -26,7 +26,7 @@ + + + #include +- ++#include + + + #include +--- a/c/src/xalanc/XalanExe/XalanExe.cpp ++++ b/c/src/xalanc/XalanExe/XalanExe.cpp +@@ -19,6 +19,7 @@ + + + #include ++#include + #if defined(XALAN_CLASSIC_IOSTREAMS) + #include + #else diff -Nru xalan-1.10/debian/patches/doxygen-disable-dot.diff xalan-1.10/debian/patches/doxygen-disable-dot.diff --- xalan-1.10/debian/patches/doxygen-disable-dot.diff 1970-01-01 00:00:00.000000000 +0000 +++ xalan-1.10/debian/patches/doxygen-disable-dot.diff 2011-11-09 21:16:14.000000000 +0000 @@ -0,0 +1,15 @@ +Description: Disable dot in Doxyfile. +Forwarded: not-needed +Last-Update: 2011-11-09 + +--- a/c/xdocs/DoxyfileXalan ++++ b/c/xdocs/DoxyfileXalan +@@ -506,7 +506,7 @@ + # toolkit from AT&T and Lucent Bell Labs. The other options in this section + # have no effect if this option is set to NO (the default) + +-HAVE_DOT = YES ++HAVE_DOT = NO + + # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen + # will generate a graph for each documented class showing the direct and diff -Nru xalan-1.10/debian/patches/fix-atan2-function.diff xalan-1.10/debian/patches/fix-atan2-function.diff --- xalan-1.10/debian/patches/fix-atan2-function.diff 1970-01-01 00:00:00.000000000 +0000 +++ xalan-1.10/debian/patches/fix-atan2-function.diff 2011-11-09 21:16:05.000000000 +0000 @@ -0,0 +1,17 @@ +Description: Fix the atan2() function. +Author: Eugeniy Meshcheryakov +Bug-Debian: http://bugs.debian.org/351603 +Forwarded: no +Last-Update: 2011-11-09 + +--- a/c/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp ++++ b/c/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp +@@ -1460,7 +1460,7 @@ + static const XalanEXSLTFunctionAcos s_acosFunction; + static const XalanEXSLTFunctionAsin s_asinFunction; + static const XalanEXSLTFunctionAtan s_atanFunction; +-static const XalanEXSLTFunctionAtan s_atan2Function; ++static const XalanEXSLTFunctionAtan2 s_atan2Function; + static const XalanEXSLTFunctionConstant s_constantFunction; + static const XalanEXSLTFunctionCos s_cosFunction; + static const XalanEXSLTFunctionExp s_expFunction; diff -Nru xalan-1.10/debian/patches/fix-ftbfs-ld-as-needed.diff xalan-1.10/debian/patches/fix-ftbfs-ld-as-needed.diff --- xalan-1.10/debian/patches/fix-ftbfs-ld-as-needed.diff 1970-01-01 00:00:00.000000000 +0000 +++ xalan-1.10/debian/patches/fix-ftbfs-ld-as-needed.diff 2011-11-09 21:16:07.000000000 +0000 @@ -0,0 +1,239 @@ +Description: Fix FTBFS with ld --as-needed. +Author: Matthias Klose +Bug-Debian: http://bugs.debian.org/641289 +Forwarded: no +Last-Update: 2011-11-09 + +--- a/c/samples/Makefile.in ++++ b/c/samples/Makefile.in +@@ -95,7 +95,7 @@ + + $(XSL_BIN_DIR)/CompileStylesheet: $(XSL_OBJ_DIR)/CompileStylesheet.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/CompileStylesheet/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -103,7 +103,7 @@ + + $(XSL_BIN_DIR)/DocumentBuilder: $(XSL_OBJ_DIR)/DocumentBuilder.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/DocumentBuilder/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -111,7 +111,7 @@ + + $(XSL_BIN_DIR)/ExternalFunction: $(XSL_OBJ_DIR)/ExternalFunction.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/ExternalFunction/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -119,7 +119,7 @@ + + $(XSL_BIN_DIR)/ParsedSourceWrappers: $(XSL_OBJ_DIR)/ParsedSourceWrappers.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/ParsedSourceWrappers/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -127,7 +127,7 @@ + + $(XSL_BIN_DIR)/SerializeNodeSet: $(XSL_OBJ_DIR)/SerializeNodeSet.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/SerializeNodeSet/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -135,7 +135,7 @@ + + $(XSL_BIN_DIR)/SimpleTransform: $(XSL_OBJ_DIR)/SimpleTransform.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/SimpleTransform/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -143,7 +143,7 @@ + + $(XSL_BIN_DIR)/SimpleXPathAPI: $(XSL_OBJ_DIR)/SimpleXPathAPI.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/SimpleXPathAPI/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -151,7 +151,7 @@ + + $(XSL_BIN_DIR)/SimpleXPathCAPI: $(XSL_OBJ_DIR)/SimpleXPathCAPI.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/SimpleXPathCAPI/%.c + $(CC4) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -159,7 +159,7 @@ + + $(XSL_BIN_DIR)/StreamTransform: $(XSL_OBJ_DIR)/StreamTransform.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/StreamTransform/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -167,7 +167,7 @@ + + $(XSL_BIN_DIR)/TraceListen: $(XSL_OBJ_DIR)/TraceListen.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/TraceListen/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -175,7 +175,7 @@ + + $(XSL_BIN_DIR)/TransformToXercesDOM: $(XSL_OBJ_DIR)/TransformToXercesDOM.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/TransformToXercesDOM/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -183,7 +183,7 @@ + + $(XSL_BIN_DIR)/UseStylesheetParam: $(XSL_OBJ_DIR)/UseStylesheetParam.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/UseStylesheetParam/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -191,7 +191,7 @@ + + $(XSL_BIN_DIR)/XalanTransform: $(XSL_OBJ_DIR)/XalanTransform.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/XalanTransform/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -199,7 +199,7 @@ + + $(XSL_BIN_DIR)/XalanTransformerCallback: $(XSL_OBJ_DIR)/XalanTransformerCallback.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/XalanTransformerCallback/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -207,7 +207,7 @@ + + $(XSL_BIN_DIR)/ThreadSafe: $(XSL_OBJ_DIR)/ThreadSafe.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/ThreadSafe/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +--- a/c/Tests/Makefile.in ++++ b/c/Tests/Makefile.in +@@ -62,7 +62,7 @@ + + $(XSL_BIN_DIR)/ThreadTest: ${XSL_OBJ_DIR}/ThreadTest.o + ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} \ +- ${EXTRA_LINK_OPTIONS} $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ ${EXTRA_LINK_OPTIONS} $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + ${XSL_OBJ_DIR}/%.o:$(TESTS_DIR)/Threads/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -70,7 +70,7 @@ + + $(XSL_BIN_DIR)/Conf: ${XSL_OBJ_DIR}/conf.o + ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} \ +- ${EXTRA_LINK_OPTIONS} $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ ${EXTRA_LINK_OPTIONS} $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + ${XSL_OBJ_DIR}/%.o:$(TESTS_DIR)/Conf/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -92,7 +92,7 @@ + + $(XSL_BIN_DIR)/Perf: $(PERF_OBJECTS) + ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} \ +- ${EXTRA_LINK_OPTIONS} $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ ${EXTRA_LINK_OPTIONS} $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + + ${XSL_OBJ_DIR}/%.o:$(TESTS_DIR)/Performance/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< +--- a/c/src/xalanc/Makefile.in ++++ b/c/src/xalanc/Makefile.in +@@ -172,7 +172,7 @@ + + "//'$(LOADSAMP)(${BATCH_XALAN_UTIL_NAME})'": ${XSL_OBJ_DIR}/XalanExe.o + ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} \ +- ${EXTRA_LINK_OPTIONS} $(XALAN_LIB) $(ALLLIBS) $^ -o $@ ++ ${EXTRA_LINK_OPTIONS} $^ $(XALAN_LIB) $(ALLLIBS) -o $@ + ${XSL_OBJ_DIR}/XalanExe.o: $(XALANEXE_DIR)/XalanExe.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -180,7 +180,7 @@ + + "//'$(LOADSAMP)(${BATCH_TEST_UTIL_NAME})'": ${XSL_OBJ_DIR}/process.o + ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} \ +- ${EXTRA_LINK_OPTIONS} $(XALAN_LIB) $(ALLLIBS) $^ -o $@ ++ ${EXTRA_LINK_OPTIONS} $^ $(XALAN_LIB) $(ALLLIBS) -o $@ + ${XSL_OBJ_DIR}/process.o: $(TESTXSLT_DIR)/process.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -190,7 +190,7 @@ + + $(XSL_BIN_DIR)/Xalan: ${XSL_OBJ_DIR}/XalanExe.o + ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} \ +- ${EXTRA_LINK_OPTIONS} $(XALAN_LIB) $(ALLLIBS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ ${EXTRA_LINK_OPTIONS} $^ $(XALAN_LIB) $(ALLLIBS) -o $@ $(OTHER_LINK_PARAMETERS) + ${XSL_OBJ_DIR}/XalanExe.o: $(XALANEXE_DIR)/XalanExe.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + endif +@@ -199,7 +199,7 @@ + + $(XSL_BIN_DIR)/testXSLT: ${XSL_OBJ_DIR}/process.o + ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} \ +- ${EXTRA_LINK_OPTIONS} $(XALAN_LIB) $(ALLLIBS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ ${EXTRA_LINK_OPTIONS} $^ $(XALAN_LIB) $(ALLLIBS) -o $@ $(OTHER_LINK_PARAMETERS) + ${XSL_OBJ_DIR}/process.o: $(TESTXSLT_DIR)/process.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -207,7 +207,7 @@ + + $(XSL_BIN_DIR)/testXPath: ${XSL_OBJ_DIR}/TestXPath.o ${XSL_OBJ_DIR}/NodeNameTreeWalker.o + ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} \ +- ${EXTRA_LINK_OPTIONS} $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ ${EXTRA_LINK_OPTIONS} $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + ${XSL_OBJ_DIR}/%.o:$(TESTXPATH_DIR)/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -230,7 +230,7 @@ + $(MAKE) -C Utils $@ + + $(XSL_LIB_DIR)/$(LIB): $(ALL_OBJECTS) +- $(MAKE_SHARED) $(PLATFORM_LIBRARIES) $(EXTRA_LINK_OPTIONS) $(LINK_SONAME) $(ALLLIBS) $^ -o $@ $(OTHER_LINK_LIB_PARAMERES) ++ $(MAKE_SHARED) $(PLATFORM_LIBRARIES) $(EXTRA_LINK_OPTIONS) $(LINK_SONAME) $^ $(ALLLIBS) -o $@ $(OTHER_LINK_LIB_PARAMERES) + ifeq ($(PLATFORM), OS390) + mv *.x ${XSL_LIB_DIR} + else +--- a/c/src/xalanc/Utils/MsgCreator/Makefile.in ++++ b/c/src/xalanc/Utils/MsgCreator/Makefile.in +@@ -29,7 +29,7 @@ + + $(XSL_BIN_DIR)/MsgCreator : $(MSG_CREATOR_OBJECTS) + ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \ +- ${EXTRA_LINK_OPTIONS} $(XERCES_LIB) $^ -o $@ $(LOC_OTHER_LINK_PARAMETERS) ++ ${EXTRA_LINK_OPTIONS} $^ $(XERCES_LIB) -o $@ $(LOC_OTHER_LINK_PARAMETERS) + + $(XSL_OBJ_DIR)/%.o : $(MSG_CREATOR_SRC)/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< diff -Nru xalan-1.10/debian/patches/kfreebsd-support.diff xalan-1.10/debian/patches/kfreebsd-support.diff --- xalan-1.10/debian/patches/kfreebsd-support.diff 1970-01-01 00:00:00.000000000 +0000 +++ xalan-1.10/debian/patches/kfreebsd-support.diff 2011-11-09 21:16:00.000000000 +0000 @@ -0,0 +1,46 @@ +Description: Add support for GNU/kFreeBSD. +Author: Petr Salinger +Bug-Debian: http://bugs.debian.org/347196 +Forwarded: no +Last-Update: 2011-11-09 + +--- a/c/configure.in ++++ b/c/configure.in +@@ -44,6 +44,7 @@ + case "${host}" in + *-*-solaris*) platform=SOLARIS ;; + *-*-linux*) platform=LINUX ;; ++ *-*-k*bsd*) platform=LINUX ;; + *-*-freebsd*) platform=FREEBSD ;; + *-*-netbsd*) platform=NETBSD ;; + *-*-irix*) platform=IRIX ;; +--- a/c/samples/configure.in ++++ b/c/samples/configure.in +@@ -46,6 +46,7 @@ + case "${host}" in + *-*-solaris*) platform=SOLARIS ;; + *-*-linux*) platform=LINUX ;; ++ *-*-k*bsd*) platform=LINUX ;; + *-*-freebsd*) platform=FREEBSD ;; + *-*-netbsd*) platform=NETBSD ;; + *-*-irix*) platform=IRIX ;; +--- a/c/samples/configure ++++ b/c/samples/configure +@@ -1171,6 +1171,7 @@ + case "${host}" in + *-*-solaris*) platform=SOLARIS ;; + *-*-linux*) platform=LINUX ;; ++ *-*-k*bsd*) platform=LINUX ;; + *-*-freebsd*) platform=FREEBSD ;; + *-*-netbsd*) platform=NETBSD ;; + *-*-irix*) platform=IRIX ;; +--- a/c/configure ++++ b/c/configure +@@ -3306,6 +3306,7 @@ + case "${host}" in + *-*-solaris*) platform=SOLARIS ;; + *-*-linux*) platform=LINUX ;; ++ *-*-k*bsd*) platform=LINUX ;; + *-*-freebsd*) platform=FREEBSD ;; + *-*-netbsd*) platform=NETBSD ;; + *-*-irix*) platform=IRIX ;; diff -Nru xalan-1.10/debian/patches/series xalan-1.10/debian/patches/series --- xalan-1.10/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ xalan-1.10/debian/patches/series 2011-11-10 10:26:25.000000000 +0000 @@ -0,0 +1,6 @@ +kfreebsd-support.diff +add-missing-includes.diff +fix-atan2-function.diff +fix-ftbfs-ld-as-needed.diff +use-printwriter-write-for-charcolon.diff +doxygen-disable-dot.diff diff -Nru xalan-1.10/debian/patches/use-printwriter-write-for-charcolon.diff xalan-1.10/debian/patches/use-printwriter-write-for-charcolon.diff --- xalan-1.10/debian/patches/use-printwriter-write-for-charcolon.diff 1970-01-01 00:00:00.000000000 +0000 +++ xalan-1.10/debian/patches/use-printwriter-write-for-charcolon.diff 2011-11-09 21:16:12.000000000 +0000 @@ -0,0 +1,17 @@ +Description: Use PrintWriter::write() method to output XalanUnicode::charColon. +Author: Nicolás Lichtmaier +Bug-Debian: http://bugs.debian.org/85690 +Forwarded: no +Last-Update: 2011-11-09 + +--- a/c/src/xalanc/XSLT/TraceListenerDefault.cpp ++++ b/c/src/xalanc/XSLT/TraceListenerDefault.cpp +@@ -155,7 +155,7 @@ + if (isEmpty(theNamespace) == false) + { + m_printWriter.print(theNamespace); +- m_printWriter.print(XalanUnicode::charColon); ++ m_printWriter.write(XalanUnicode::charColon); + } + + m_printWriter.print(theName.getLocalPart()); diff -Nru xalan-1.10/debian/rules xalan-1.10/debian/rules --- xalan-1.10/debian/rules 2011-11-30 14:12:49.000000000 +0000 +++ xalan-1.10/debian/rules 2011-11-10 10:28:20.000000000 +0000 @@ -1,72 +1,76 @@ #!/usr/bin/make -f -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +libpkgver = 110 +shlibminor = 110.0 +shlibmajor = 110 + +deb-shlibs-version = 1.10-3.3 + +pkglib = libxalan$(libpkgver) +pkglib-dev = libxalan$(libpkgver)-dev +pkglib-doc = libxalan$(libpkgver)-doc + +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -# This is the debhelper compatability version to use. -# export DH_COMPAT=4 - -# version=1.4 -# major=1.4.0 -libpkgver=110 -shlibminor=110.0 -shlibmajor=110 - -pkglib=libxalan$(libpkgver) -pkglib-dev=libxalan$(libpkgver)-dev -pkglib-doc=libxalan$(libpkgver)-doc - -CFLAGS := -O2 - -ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) - CFLAGS += -g +ifeq ($(filter noopt,$(DEB_BUILD_OPTIONS)),) + debugflags = -DNDEBUG +endif +ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) + confflags = --build $(DEB_HOST_GNU_TYPE) else - CFLAGS += -DNDEBUG + confflags = --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) endif - -CXXFLAGS:=$(CFLAGS) +confflags += CFLAGS="$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) $(debugflags)" +confflags += CXXFLAGS="$(shell dpkg-buildflags --get CXXFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) $(debugflags)" +confflags += LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS)" X=c -PRESERVE=$(X)/bin $(X)/lib +# build, build-arch, build-indep +# ============================== configure: configure-stamp configure-stamp: dh_testdir - - -test -r /usr/share/misc/config.sub && \ - cp -f /usr/share/misc/config.sub c/config.sub - -test -r /usr/share/misc/config.guess && \ - cp -f /usr/share/misc/config.guess c/config.guess - - cd $(X) && ./configure --prefix=/usr LIBS=" -lpthread" \ - BITSTOBUILD=32 XALAN_LOCALE_SYSTEM="inmem" XALAN_LOCALE="en_US" + cp -f /usr/share/misc/config.sub c/config.sub + cp -f /usr/share/misc/config.guess c/config.guess + cd $(X) && ./configure \ + $(confflags) \ + --prefix=/usr \ + LIBS=" -lpthread" \ + BITSTOBUILD=32 \ + XALAN_LOCALE_SYSTEM="inmem" \ + XALAN_LOCALE="en_US" touch configure-stamp -build: configure-stamp build-stamp -build-stamp: +build-stamp: configure-stamp dh_testdir + XALANCROOT=$(CURDIR)/$(X) $(MAKE) -C $(X) + rm -f $(X)/bin/xalan + mv $(X)/bin/testXSLT $(X)/bin/xalan + touch $(@) - # Commands to compile the package. - XALANCROOT=$(shell pwd)/$(X) $(MAKE) -C $(X) CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" - - # Now we build the Apache module - #XALANCROOT=$(shell pwd)/$(X) $(MAKE) -C $(X) ApacheModuleXSLT CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" - - # Now build the docs +docs-stamp: + dh_testdir +ifneq ($(wildcard /usr/bin/doxygen),) mkdir -p $(X)/build/docs/html/apiDocs ( cd $(X)/xdocs && doxygen DoxyfileXalan ) + touch $(@) +endif - # Rename testXSLT - rm -f $(X)/bin/xalan - mv $(X)/bin/testXSLT $(X)/bin/xalan +build-arch: build-stamp +build-indep: docs-stamp +build: build-arch build-indep - touch build-stamp +# clean +# ===== clean: dh_testdir dh_testroot - rm -f build-stamp configure-stamp $(X)/config.cache\ + rm -f $(X)/config.cache \ $(X)/config.log $(X)/config.status\ $(X)/src/xalanc/Include/xalan-config.h \ $(X)/src/xalanc/Makefile $(X)/Makefile \ @@ -82,32 +86,27 @@ rm -rf $(X)/bin rm -rf $(X)/build rm -rf $(X)/lib - - rm -f c\config.guess - rm -f c\config.sub - dh_clean -install: build +# binary, binary-arch, binary-indep +# ================================= + +install-arch: build-arch dh_testdir dh_testroot - dh_clean -k - dh_installdirs -p$(pkglib) -p$(pkglib-dev) usr/lib + dh_prep + dh_installdirs -p$(pkglib) -p$(pkglib-dev) usr/lib/$(DEB_HOST_MULTIARCH)/ dh_installdirs -p$(pkglib-dev) usr/include dh_installdirs -pxalan usr/bin - dh_install -p$(pkglib) $(X)/lib/libxalan-c.so.$(shlibmajor) $(X)/lib/libxalan-c.so.$(shlibminor) usr/lib - dh_install -p$(pkglib) $(X)/lib/libxalanMsg.so.$(shlibmajor) $(X)/lib/libxalanMsg.so.$(shlibminor) usr/lib - dh_install -p$(pkglib-dev) $(X)/lib/libxalan-c.so usr/lib - dh_install -p$(pkglib-dev) $(X)/lib/libxalanMsg.so usr/lib + dh_install -p$(pkglib) $(X)/lib/libxalan-c.so.$(shlibmajor) $(X)/lib/libxalan-c.so.$(shlibminor) usr/lib/$(DEB_HOST_MULTIARCH) + dh_install -p$(pkglib) $(X)/lib/libxalanMsg.so.$(shlibmajor) $(X)/lib/libxalanMsg.so.$(shlibminor) usr/lib/$(DEB_HOST_MULTIARCH) + dh_install -p$(pkglib-dev) $(X)/lib/libxalan-c.so usr/lib/$(DEB_HOST_MULTIARCH) + dh_install -p$(pkglib-dev) $(X)/lib/libxalanMsg.so usr/lib/$(DEB_HOST_MULTIARCH) (cd $(X)/src ; tar cf - $$(find . -regex '.*\.\(h\|hpp\)' ) ) | ( cd debian/$(pkglib-dev)/usr/include ; tar xf - ) cp $(X)/nls/include/LocalMsg*.hpp debian/$(pkglib-dev)/usr/include/xalanc/PlatformSupport dh_install -pxalan $(X)/bin/xalan usr/bin - #dh_installdirs -plibapache-mod-xslt usr/lib/apache/1.3 - #dh_install -plibapache-mod-xslt $(X)/lib/mod_xslt.so usr/lib/apache/1.3 - #dh_install -plibapache-mod-xslt debian/*mod_xslt.info usr/lib/apache/1.3 -# Build architecture-independent files here. -binary-indep: build install +binary-indep: build-indep dh_testdir dh_testroot dh_installdocs -p$(pkglib-doc) $(X)/build/docs/apiDocs @@ -123,36 +122,22 @@ dh_md5sums -p$(pkglib-doc) dh_builddeb -p$(pkglib-doc) -# Build architecture-dependent files here. -binary-arch: build install -# dh_testversion +binary-arch: build-arch install-arch dh_testdir dh_testroot - -# dh_installdebconf - dh_installdocs -# mkdir -p debian/libxalan$(major)-dev/usr/share/doc/libxalan$(major)-dev/examples -# ( cd $(X)/samples ; tar cf - --exclude CVS . ) | ( cd debian/libxalan$(major)-dev/usr/share/doc/libxalan$(major)-dev/examples ; tar xf - ) -# cp -a $(X)/docs debian/libxalan$(major)-dev/usr/share/doc/libxalan$(major)-dev/html - #cp debian/mod_xslt.README debian/libapache-mod-xslt/usr/share/doc/libapache-mod-xslt/README -# dh_installemacsen -# dh_installpam -# dh_installinit + dh_installdocs -a dh_installman -pxalan debian/xalan.1 -# (cd debian/xalan/usr/share/man/man1 && ln -s testXSLT.1 xalan.1) - dh_installinfo - dh_installchangelogs -# dh_link - dh_strip -p$(pkglib) -pxalan # -plibapache-mod-xslt - dh_compress - dh_fixperms - dh_makeshlibs - dh_installdeb -# dh_perl - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb + dh_installinfo -a + dh_installchangelogs -a + dh_strip -a + dh_compress -a + dh_fixperms -a + dh_makeshlibs -a -V '$(pkglib) (>= $(deb-shlibs-version))' + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure +.PHONY: build build-arch build-indep clean binary-indep binary-arch binary install configure diff -Nru xalan-1.10/debian/source/format xalan-1.10/debian/source/format --- xalan-1.10/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ xalan-1.10/debian/source/format 2011-11-30 14:12:50.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt)