Hello community, here is the log from the commit of package xmlstarlet for openSUSE:Factory checked in at Mon Mar 14 16:50:36 CET 2011.
-------- --- xmlstarlet/xmlstarlet.changes 2011-02-17 10:07:35.000000000 +0100 +++ /mounts/work_src_done/STABLE/xmlstarlet/xmlstarlet.changes 2011-03-14 01:55:24.000000000 +0100 @@ -1,0 +2,10 @@ +Mon Mar 14 00:53:27 UTC 2011 - [email protected] + +- update to 1.0.6: + * the c14n command now outputs linefeeds only in Windows as well + * the --help text for ed now correctly describes the behavior of -P, -S, + --pf, and --ps + * some subcommands' --help options were outputting the printf format string + literally + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- xmlstarlet-1.0.5.tar.bz2 New: ---- xmlstarlet-1.0.6.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xmlstarlet.spec ++++++ --- /var/tmp/diff_new_pack.hsjvYX/_old 2011-03-14 16:50:17.000000000 +0100 +++ /var/tmp/diff_new_pack.hsjvYX/_new 2011-03-14 16:50:17.000000000 +0100 @@ -24,7 +24,7 @@ BuildRequires: sgml-skel BuildRequires: autoconf automake gcc glibc-devel libtool pkgconfig Summary: Command Line Tool to Process XML Documents -Version: 1.0.5 +Version: 1.0.6 Release: 1 License: MIT License (or similar) Group: Productivity/Publishing/XML ++++++ xmlstarlet-1.0.5.tar.bz2 -> xmlstarlet-1.0.6.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/Makefile.am new/xmlstarlet-1.0.6/Makefile.am --- old/xmlstarlet-1.0.5/Makefile.am 2011-02-11 22:21:22.000000000 +0100 +++ new/xmlstarlet-1.0.6/Makefile.am 2011-03-08 01:48:17.000000000 +0100 @@ -1,25 +1,27 @@ -EXTRA_DIST = README TODO Copyright COPYING -WIN32_DIST = $(EXTRA_DIST) AUTHORS ChangeLog INSTALL NEWS xml.exe doc +EXTRA_DIST = Copyright doc examples solaris tests +WIN32_DIST = README TODO Copyright COPYING AUTHORS ChangeLog INSTALL NEWS xml.exe doc ACLOCAL_AMFLAGS = -I m4 if GCC AM_CFLAGS = -Wall -pedantic endif -dist-hook: xmlstarlet.spec +GIT_DESCRIBE = git describe --tags --dirty + +dist-hook: @ if [ -d .git ] ; then \ - if [ $(VERSION) != `git describe --tags --dirty` ] ; then \ - echo 'ERROR: version mismatch, rerun autoreconf -f' ; exit 1 ; fi ; \ - $(SED) 's/\[m4_esyscmd_s(\[git describe --tags --dirty\])\]/[$(VERSION)]/' \ + if [ $(VERSION) != `$(GIT_DESCRIBE)` ] ; then \ + echo 'ERROR: version mismatch, rerun autoconf -f' ; exit 1 ; fi ; \ + $(SED) 's/\[m4_esyscmd_s(\[$(GIT_DESCRIBE)\])\]/[$(VERSION)]/' \ $(srcdir)/configure.ac > $(distdir)/configure.ac ; fi - -cp xmlstarlet.spec $(distdir) - (cd $(srcdir) ; $(AMTAR) -cf - --exclude CVS doc examples solaris tests) | (cd $(distdir); $(AMTAR) xf -) cleantar: @(rm -f xmlstarlet*.tar.gz) -rpm: cleantar - @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz) +rpm: cleantar distdir xmlstarlet.spec + cp xmlstarlet.spec $(distdir) + $(AMTAR) -czf $(distdir).tar.gz $(distdir) + rpmbuild -ta $(distdir).tar.gz $(distdir)-win32.zip: xml.exe mkdir -p /tmp/$(distdir) @@ -34,7 +36,7 @@ version.h: VERSION @if [ -d .git ] ; then \ - VERSION=`git describe --tags --dirty`; \ + VERSION=`$(GIT_DESCRIBE)`; \ else VERSION=$(VERSION) ; fi; \ NEW_VERSION="#define VERSION \"$$VERSION\""; \ OLD_VERSION=`cat version.h 2>/dev/null` ; \ @@ -46,6 +48,10 @@ clean-local: -rm version.h +# need to build version.h even if dependency files haven't been +# generated +src/xml.o : version.h + .PHONY: cleantar rpm dist-win32 VERSION # testing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/Makefile.in new/xmlstarlet-1.0.6/Makefile.in --- old/xmlstarlet-1.0.5/Makefile.in 2011-02-11 22:42:26.000000000 +0100 +++ new/xmlstarlet-1.0.6/Makefile.in 2011-03-11 04:14:46.000000000 +0100 @@ -61,13 +61,12 @@ PROGRAMS = $(bin_PROGRAMS) am__dirstamp = $(am__leading_dot)dirstamp am_xml_OBJECTS = src/binsert.$(OBJEXT) src/stack.$(OBJEXT) \ - src/strdup.$(OBJEXT) src/trans.$(OBJEXT) src/xml.$(OBJEXT) \ - src/xml_C14N.$(OBJEXT) src/xml_depyx.$(OBJEXT) \ - src/xml_edit.$(OBJEXT) src/xml_elem.$(OBJEXT) \ - src/xml_escape.$(OBJEXT) src/xml_format.$(OBJEXT) \ - src/xml_ls.$(OBJEXT) src/xml_pyx.$(OBJEXT) \ - src/xml_select.$(OBJEXT) src/xml_trans.$(OBJEXT) \ - src/xml_validate.$(OBJEXT) + src/trans.$(OBJEXT) src/xml.$(OBJEXT) src/xml_C14N.$(OBJEXT) \ + src/xml_depyx.$(OBJEXT) src/xml_edit.$(OBJEXT) \ + src/xml_elem.$(OBJEXT) src/xml_escape.$(OBJEXT) \ + src/xml_format.$(OBJEXT) src/xml_ls.$(OBJEXT) \ + src/xml_pyx.$(OBJEXT) src/xml_select.$(OBJEXT) \ + src/xml_trans.$(OBJEXT) src/xml_validate.$(OBJEXT) xml_OBJECTS = $(am_xml_OBJECTS) xml_LDADD = $(LDADD) xml_DEPENDENCIES = @@ -246,11 +245,14 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = README TODO Copyright COPYING doc/xmlstarlet.txt -WIN32_DIST = $(EXTRA_DIST) AUTHORS ChangeLog INSTALL NEWS xml.exe doc +EXTRA_DIST = Copyright doc examples solaris tests doc/xmlstarlet.txt +WIN32_DIST = README TODO Copyright COPYING AUTHORS ChangeLog INSTALL NEWS xml.exe doc ACLOCAL_AMFLAGS = -I m4 @GCC_TRUE@AM_CFLAGS = -Wall -pedantic -TESTS_ENVIRONMENT = srcdir=$(srcdir) $(srcdir)/tests/runTest.sh +GIT_DESCRIBE = git describe --tags --dirty +TESTS_ENVIRONMENT = abs_builddir=$(abs_builddir) EXEEXT=$(EXEEXT) SED=$(SED) \ + $(srcdir)/tests/runTest.sh + TESTS = examples/bigxml-dtd\ examples/bigxml-embed-ref\ examples/bigxml-embed\ @@ -258,8 +260,10 @@ examples/bigxml-well-formed\ examples/bigxml-xsd\ examples/c14n-default-attr\ +examples/c14n-newlines\ examples/c14n1\ examples/c14n2\ +examples/command-help\ examples/count1\ examples/countnode1\ examples/delete1\ @@ -312,11 +316,10 @@ examples/ed-namespace xml_SOURCES = src/binsert.c src/binsert.h src/escape.h src/stack.c \ - src/stack.h src/strdup.c src/strdup.h src/trans.c src/trans.h \ - src/xml.c src/xml_C14N.c src/xml_depyx.c src/xml_edit.c \ - src/xml_elem.c src/xml_escape.c src/xml_format.c src/xml_ls.c \ - src/xml_pyx.c src/xml_select.c src/xmlstar.h src/xml_trans.c \ - src/xml_validate.c version.h + src/stack.h src/trans.c src/trans.h src/xml.c src/xml_C14N.c \ + src/xml_depyx.c src/xml_edit.c src/xml_elem.c src/xml_escape.c \ + src/xml_format.c src/xml_ls.c src/xml_pyx.c src/xml_select.c \ + src/xmlstar.h src/xml_trans.c src/xml_validate.c version.h # doc man_MANS = doc/xmlstarlet.1 @@ -444,8 +447,6 @@ src/binsert.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/stack.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/strdup.$(OBJEXT): src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) src/trans.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/xml.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/xml_C14N.$(OBJEXT): src/$(am__dirstamp) \ @@ -478,7 +479,6 @@ -rm -f *.$(OBJEXT) -rm -f src/binsert.$(OBJEXT) -rm -f src/stack.$(OBJEXT) - -rm -f src/strdup.$(OBJEXT) -rm -f src/trans.$(OBJEXT) -rm -f src/xml.$(OBJEXT) -rm -f src/xml_C14N.$(OBJEXT) @@ -498,7 +498,6 @@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/binsert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/stack.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/strdup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/trans.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xml.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xml_C14N.Po@am__quote@ @@ -1006,20 +1005,20 @@ uninstall-man1 -dist-hook: xmlstarlet.spec +dist-hook: @ if [ -d .git ] ; then \ - if [ $(VERSION) != `git describe --tags --dirty` ] ; then \ - echo 'ERROR: version mismatch, rerun autoreconf -f' ; exit 1 ; fi ; \ - $(SED) 's/\[m4_esyscmd_s(\[git describe --tags --dirty\])\]/[$(VERSION)]/' \ + if [ $(VERSION) != `$(GIT_DESCRIBE)` ] ; then \ + echo 'ERROR: version mismatch, rerun autoconf -f' ; exit 1 ; fi ; \ + $(SED) 's/\[m4_esyscmd_s(\[$(GIT_DESCRIBE)\])\]/[$(VERSION)]/' \ $(srcdir)/configure.ac > $(distdir)/configure.ac ; fi - -cp xmlstarlet.spec $(distdir) - (cd $(srcdir) ; $(AMTAR) -cf - --exclude CVS doc examples solaris tests) | (cd $(distdir); $(AMTAR) xf -) cleantar: @(rm -f xmlstarlet*.tar.gz) -rpm: cleantar - @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz) +rpm: cleantar distdir xmlstarlet.spec + cp xmlstarlet.spec $(distdir) + $(AMTAR) -czf $(distdir).tar.gz $(distdir) + rpmbuild -ta $(distdir).tar.gz $(distdir)-win32.zip: xml.exe mkdir -p /tmp/$(distdir) @@ -1034,7 +1033,7 @@ version.h: VERSION @if [ -d .git ] ; then \ - VERSION=`git describe --tags --dirty`; \ + VERSION=`$(GIT_DESCRIBE)`; \ else VERSION=$(VERSION) ; fi; \ NEW_VERSION="#define VERSION \"$$VERSION\""; \ OLD_VERSION=`cat version.h 2>/dev/null` ; \ @@ -1046,6 +1045,10 @@ clean-local: -rm version.h +# need to build version.h even if dependency files haven't been +# generated +src/xml.o : version.h + .PHONY: cleantar rpm dist-win32 VERSION # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/NEWS new/xmlstarlet-1.0.6/NEWS --- old/xmlstarlet-1.0.5/NEWS 2011-02-11 22:29:49.000000000 +0100 +++ new/xmlstarlet-1.0.6/NEWS 2011-03-13 20:12:44.000000000 +0100 @@ -1,3 +1,23 @@ +1.0.6: Mar 13 2011: + + - Bug fixes: + - c14n: set stdout to binary mode on Windows to avoid carriage + returns (Bug 840665) + - fix broken --help options + - put actual behaviour of -P, -S options in --help output (see + Bug/Feature Request 2858514) + - remove unneeded escape of quote in ./configure --help + - don't distribute xmlstarlet.spec: it's generated by ./configure + - add src/xml.o depends on version.h to Makefile.am so compile + will succeed without dependency info (eg after make distclean) + - add test for subcommands' --help option + - Portability fixes: + - yes isn't portable, use an awk program instead + - neither read -r nor xargs -0 are portable, escape the command + lines to xargs instead + - don't use nonportable echo -n option + + 1.0.5: Feb 11 2011: - Bug fixes: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/config.h.in new/xmlstarlet-1.0.6/config.h.in --- old/xmlstarlet-1.0.5/config.h.in 2011-02-11 22:42:25.000000000 +0100 +++ new/xmlstarlet-1.0.6/config.h.in 2011-03-11 04:14:58.000000000 +0100 @@ -1,27 +1,8 @@ /* config.h.in. Generated from configure.ac by autoheader. */ -/* Define to 1 if you have the `asctime' function. */ -#undef HAVE_ASCTIME - -/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't. - */ -#undef HAVE_DECL_STRDUP - -/* Define to 1 if you have the `ftime' function. */ -#undef HAVE_FTIME - -/* Define to 1 if you have the `gettimeofday' function. */ -#undef HAVE_GETTIMEOFDAY - -/* Define to 1 if you have the `gmtime' function. */ -#undef HAVE_GMTIME - /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the `localtime' function. */ -#undef HAVE_LOCALTIME - /* Define to 1 if you have the `lstat' function. */ #undef HAVE_LSTAT @@ -32,13 +13,13 @@ /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H -/* Define to 1 if you have the `mktime' function. */ -#undef HAVE_MKTIME - /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC +/* Define to 1 if you have the `setmode' function. */ +#undef HAVE_SETMODE + /* Define to 1 if you have the `stat' function. */ #undef HAVE_STAT @@ -48,9 +29,6 @@ /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H -/* Define to 1 if you have the `strdup' function. */ -#undef HAVE_STRDUP - /* Define to 1 if you have the <strings.h> header file. */ #undef HAVE_STRINGS_H @@ -63,9 +41,6 @@ /* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H -/* Define to 1 if you have the `time' function. */ -#undef HAVE_TIME - /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/configure new/xmlstarlet-1.0.6/configure --- old/xmlstarlet-1.0.5/configure 2011-02-11 22:42:23.000000000 +0100 +++ new/xmlstarlet-1.0.6/configure 2011-03-13 20:23:14.000000000 +0100 @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.ac 1.0.5. +# From configure.ac 1.0.6. # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for XMLStarlet 1.0.5. +# Generated by GNU Autoconf 2.67 for XMLStarlet 1.0.6. # # Report bugs to <http://sourceforge.net/projects/xmlstar/support>. # @@ -613,8 +613,8 @@ # Identity of this package. PACKAGE_NAME='XMLStarlet' PACKAGE_TARNAME='xmlstarlet' -PACKAGE_VERSION='1.0.5' -PACKAGE_STRING='XMLStarlet 1.0.5' +PACKAGE_VERSION='1.0.6' +PACKAGE_STRING='XMLStarlet 1.0.6' PACKAGE_BUGREPORT='http://sourceforge.net/projects/xmlstar/support' PACKAGE_URL='http://xmlstar.sourceforge.net/' @@ -1332,7 +1332,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures XMLStarlet 1.0.5 to adapt to many kinds of systems. +\`configure' configures XMLStarlet 1.0.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1402,7 +1402,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of XMLStarlet 1.0.5:";; + short | recursive ) echo "Configuration of XMLStarlet 1.0.6:";; esac cat <<\_ACEOF @@ -1428,7 +1428,7 @@ Specify location of libxml headers --with-libxml-libs-prefix=PFX Specify location of libxml libs - --with-libxml-src=DIR For libxml that\'s not installed yet (sets all three + --with-libxml-src=DIR For libxml that's not installed yet (sets all three above) --with-libxslt-prefix=PFX Specify location of libxslt @@ -1436,8 +1436,8 @@ Specify location of libxslt headers --with-libxslt-libs-prefix=PFX Specify location of libxslt libs - --with-libxslt-src=DIR For libxslt that\'s not installed yet (sets all - three above) + --with-libxslt-src=DIR For libxslt that's not installed yet (sets all three + above) --with-libiconv-prefix=PFX Specify location of libiconv --with-libiconv-include-prefix=PFX @@ -1522,7 +1522,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -XMLStarlet configure 1.0.5 +XMLStarlet configure 1.0.6 generated by GNU Autoconf 2.67 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1875,52 +1875,6 @@ } # ac_fn_c_try_link -# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -# --------------------------------------------- -# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_decl - # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly @@ -1987,11 +1941,57 @@ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func + +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_decl cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by XMLStarlet $as_me 1.0.5, which was +It was created by XMLStarlet $as_me 1.0.6, which was generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -2271,16 +2271,9 @@ >$cache_file fi -as_fn_append ac_func_list " gettimeofday" -as_fn_append ac_func_list " mktime" -as_fn_append ac_func_list " localtime" -as_fn_append ac_func_list " asctime" -as_fn_append ac_func_list " time" -as_fn_append ac_func_list " gmtime" -as_fn_append ac_func_list " ftime" -as_fn_append ac_func_list " strdup" as_fn_append ac_func_list " lstat" as_fn_append ac_func_list " stat" +as_fn_append ac_func_list " setmode" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -2818,7 +2811,7 @@ # Define the identity of the package. PACKAGE='xmlstarlet' - VERSION='1.0.5' + VERSION='1.0.6' # Some tools Automake needs. @@ -5322,9 +5315,8 @@ if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing libiconv_open" >&5 +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing libiconv_open" >&5 $as_echo_n "checking for library containing libiconv_open... " >&6; } if test "${ac_cv_search_libiconv_open+set}" = set; then : $as_echo_n "(cached) " >&6 @@ -5380,6 +5372,8 @@ fi +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if test "${ac_cv_search_clock_gettime+set}" = set; then : @@ -5720,18 +5714,6 @@ fi -ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default" -if test "x$ac_cv_have_decl_strdup" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRDUP $ac_have_decl -_ACEOF - - @@ -5753,17 +5735,14 @@ +ac_fn_c_check_decl "$LINENO" "O_BINARY" "ac_cv_have_decl_O_BINARY" " +#include <io.h> +#include <fcntl.h> +" +if test "x$ac_cv_have_decl_O_BINARY" = x""yes; then : - - - - - - - - - +fi @@ -5786,6 +5765,8 @@ + + $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h @@ -6324,7 +6305,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by XMLStarlet $as_me 1.0.5, which was +This file was extended by XMLStarlet $as_me 1.0.6, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6391,7 +6372,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -XMLStarlet config.status 1.0.5 +XMLStarlet config.status 1.0.6 configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/configure.ac new/xmlstarlet-1.0.6/configure.ac --- old/xmlstarlet-1.0.5/configure.ac 2011-02-11 22:42:41.000000000 +0100 +++ new/xmlstarlet-1.0.6/configure.ac 2011-03-13 20:23:31.000000000 +0100 @@ -1,5 +1,5 @@ AC_PREREQ([2.62]) -AC_INIT([XMLStarlet], [1.0.5], +AC_INIT([XMLStarlet], [1.0.6], [http://sourceforge.net/projects/xmlstar/support], [], [http://xmlstar.sourceforge.net/]) @@ -96,8 +96,8 @@ AS_IF([test "x$STATIC_LIBS" != xno], [AC_SEARCH_LIBS([dlopen], [dl], [], [], "$USER_LIBS") AC_SEARCH_LIBS([sqrt], [m], [], [], "$USER_LIBS") - AC_SEARCH_LIBS([iconv_open], [iconv], [], [], "$USER_LIBS") - AC_SEARCH_LIBS([libiconv_open], [iconv], [], [], "$USER_LIBS") + AC_SEARCH_LIBS([iconv_open], [iconv], [], + [AC_SEARCH_LIBS([libiconv_open], [iconv], [], [], "$USER_LIBS")], "$USER_LIBS") AC_SEARCH_LIBS([clock_gettime], [rt], [], [], "$USER_LIBS") AC_SEARCH_LIBS([deflate], [z], [], [], "$USER_LIBS") AC_SEARCH_LIBS([gcry_cipher_encrypt], [gcrypt], [], [], "$USER_LIBS") @@ -107,8 +107,13 @@ AC_SEARCH_LIBS([setsockopt], [socket net network], [], [], "$USER_LIBS") AC_SEARCH_LIBS([connect], [inet], [], [], "$USER_LIBS")]) -AC_CHECK_DECLS_ONCE([strdup]) -AC_CHECK_FUNCS_ONCE([gettimeofday mktime localtime asctime time gmtime ftime strdup lstat stat]) +AC_CHECK_FUNCS_ONCE([lstat stat]) + +AC_CHECK_DECL([O_BINARY], [], [], [[ +#include <io.h> +#include <fcntl.h> +]]) +AC_CHECK_FUNCS_ONCE([setmode]) AC_SUBST([AM_CPPFLAGS], ["$LIBXSLT_CPPFLAGS $LIBXML_CPPFLAGS"]) AC_SUBST([AM_LDFLAGS], ["$LIBXSLT_LDFLAGS $LIBXML_LDFLAGS"]) @@ -117,6 +122,8 @@ AC_SUBST([LIBXML_REQUIRED_VERSION]) AC_SUBST([LIBXSLT_REQUIRED_VERSION]) +AC_SUBST([SED]) + AM_SUBST_NOTMAKE(PACKAGE_NAME) AM_SUBST_NOTMAKE(PACKAGE_TARNAME) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/examples/.memdump new/xmlstarlet-1.0.6/examples/.memdump --- old/xmlstarlet-1.0.5/examples/.memdump 2011-02-11 22:31:58.000000000 +0100 +++ new/xmlstarlet-1.0.6/examples/.memdump 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ - 04:31:58 PM - - MEMORY ALLOCATED : 0, MAX was 24568 -BLOCK NUMBER SIZE TYPE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/examples/bigxml new/xmlstarlet-1.0.6/examples/bigxml --- old/xmlstarlet-1.0.5/examples/bigxml 2010-11-27 21:26:28.000000000 +0100 +++ new/xmlstarlet-1.0.6/examples/bigxml 2011-03-06 20:52:01.000000000 +0100 @@ -8,10 +8,10 @@ BAD="$1" DOCTYPE="$2" - echo -n '<?xml version="1.0"?>' - [ -n "$DOCTYPE" ] && echo -n "$DOCTYPE" + echo '<?xml version="1.0"?>' + [ -n "$DOCTYPE" ] && echo "$DOCTYPE" echo '<root>' - yes '<a />' | head -69999 - echo -n "$BAD" + awk 'BEGIN{for(i=0; i < 69999; i++) print "<a/>"}' < /dev/null + echo "$BAD" echo '</root>' } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/examples/bigxml-dtd new/xmlstarlet-1.0.6/examples/bigxml-dtd --- old/xmlstarlet-1.0.5/examples/bigxml-dtd 2010-11-27 21:26:28.000000000 +0100 +++ new/xmlstarlet-1.0.6/examples/bigxml-dtd 2011-03-06 20:52:01.000000000 +0100 @@ -1,4 +1,4 @@ . ./bigxml xmldoc '<a>foo</a>' \ | ./xmlstarlet val --dtd dtd/bigxml.dtd --err - 2>&1 >/dev/null \ - | sed -n "$SEDLINUM_PROG" + | ${SED:-sed} -n "$SEDLINUM_PROG" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/examples/bigxml-embed new/xmlstarlet-1.0.6/examples/bigxml-embed --- old/xmlstarlet-1.0.5/examples/bigxml-embed 2010-11-27 21:26:28.000000000 +0100 +++ new/xmlstarlet-1.0.6/examples/bigxml-embed 2011-03-06 20:52:01.000000000 +0100 @@ -2,4 +2,4 @@ xmldoc '<a> foo </a>' \ '<!DOCTYPE root [<!ELEMENT root (a*)> <!ELEMENT a EMPTY>]>' \ | ./xmlstarlet val --embed --err - \ - 2>&1 >/dev/null | sed -n "$SEDLINUM_PROG" + 2>&1 >/dev/null | ${SED:-sed} -n "$SEDLINUM_PROG" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/examples/bigxml-embed-ref new/xmlstarlet-1.0.6/examples/bigxml-embed-ref --- old/xmlstarlet-1.0.5/examples/bigxml-embed-ref 2010-11-27 21:26:28.000000000 +0100 +++ new/xmlstarlet-1.0.6/examples/bigxml-embed-ref 2011-03-06 20:52:01.000000000 +0100 @@ -1,4 +1,4 @@ . ./bigxml xmldoc '<a>foo</a>' '<!DOCTYPE root SYSTEM "dtd/bigxml.dtd">' \ | ./xmlstarlet val --embed --err - 2>&1 >/dev/null \ - | sed -n "$SEDLINUM_PROG" + | ${SED:-sed} -n "$SEDLINUM_PROG" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/examples/bigxml-relaxng new/xmlstarlet-1.0.6/examples/bigxml-relaxng --- old/xmlstarlet-1.0.5/examples/bigxml-relaxng 2010-11-27 21:26:28.000000000 +0100 +++ new/xmlstarlet-1.0.6/examples/bigxml-relaxng 2011-03-06 20:52:01.000000000 +0100 @@ -1,3 +1,3 @@ . ./bigxml xmldoc '<a> foo </a>' | ./xmlstarlet val --relaxng relaxng/bigxml.rng --err - \ - 2>&1 >/dev/null | sed -n "$SEDLINUM_PROG" + 2>&1 >/dev/null | ${SED:-sed} -n "$SEDLINUM_PROG" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/examples/bigxml-well-formed new/xmlstarlet-1.0.6/examples/bigxml-well-formed --- old/xmlstarlet-1.0.5/examples/bigxml-well-formed 2010-11-27 21:26:28.000000000 +0100 +++ new/xmlstarlet-1.0.6/examples/bigxml-well-formed 2011-03-06 20:52:01.000000000 +0100 @@ -1,3 +1,3 @@ . ./bigxml xmldoc '<b></c>' | ./xmlstarlet val --well-formed --err - \ - 2>&1 >/dev/null | sed -n "$SEDLINUM_PROG" + 2>&1 >/dev/null | ${SED:-sed} -n "$SEDLINUM_PROG" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/examples/bigxml-xsd new/xmlstarlet-1.0.6/examples/bigxml-xsd --- old/xmlstarlet-1.0.5/examples/bigxml-xsd 2010-11-27 21:26:28.000000000 +0100 +++ new/xmlstarlet-1.0.6/examples/bigxml-xsd 2011-03-06 20:52:01.000000000 +0100 @@ -1,3 +1,3 @@ . ./bigxml xmldoc '<b/>' | ./xmlstarlet val --xsd xsd/bigxml.xsd --err - \ - 2>&1 >/dev/null | sed -n "$SEDLINUM_PROG" + 2>&1 >/dev/null | ${SED:-sed} -n "$SEDLINUM_PROG" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/examples/c14n-newlines new/xmlstarlet-1.0.6/examples/c14n-newlines --- old/xmlstarlet-1.0.5/examples/c14n-newlines 1970-01-01 01:00:00.000000000 +0100 +++ new/xmlstarlet-1.0.6/examples/c14n-newlines 2011-03-06 20:52:01.000000000 +0100 @@ -0,0 +1 @@ +./xmlstarlet c14n xml/c14n.xml | tr '\r' R | grep R diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/examples/command-help new/xmlstarlet-1.0.6/examples/command-help --- old/xmlstarlet-1.0.5/examples/command-help 1970-01-01 01:00:00.000000000 +0100 +++ new/xmlstarlet-1.0.6/examples/command-help 2011-03-09 04:43:09.000000000 +0100 @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ -n "$EXEEXT" ] && [ "$OSTYPE" = MSYS ] ; then + EXEEXT=.exe +fi + +for command in ed sel tr val fo el c14n ls esc unesc pyx p2x ; do + ./xmlstarlet $command --help | ${SED:-sed} -n \ + "s@^\\(Usage: \\).*xml$EXEEXT\\( $command\\).*@\\1xml\\2@p" +done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/examples/results/command-help.out new/xmlstarlet-1.0.6/examples/results/command-help.out --- old/xmlstarlet-1.0.5/examples/results/command-help.out 1970-01-01 01:00:00.000000000 +0100 +++ new/xmlstarlet-1.0.6/examples/results/command-help.out 2011-03-06 20:52:01.000000000 +0100 @@ -0,0 +1,12 @@ +Usage: xml ed +Usage: xml sel +Usage: xml tr +Usage: xml val +Usage: xml fo +Usage: xml el +Usage: xml c14n +Usage: xml ls +Usage: xml esc +Usage: xml unesc +Usage: xml pyx +Usage: xml p2x diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/examples/sel-literal new/xmlstarlet-1.0.6/examples/sel-literal --- old/xmlstarlet-1.0.5/examples/sel-literal 2011-01-22 14:35:09.000000000 +0100 +++ new/xmlstarlet-1.0.6/examples/sel-literal 2011-03-06 20:52:01.000000000 +0100 @@ -1,5 +1,4 @@ #!/bin/sh -while read -r LITERAL ; do - ./xmlstarlet sel --text -t -m /doc -o "$LITERAL" --nl xml/foo.xml -done < results/sel-literal.out +${SED:-sed} "s/[\\'\"]/\\\&/g" < results/sel-literal.out | xargs -I LIT \ + ./xmlstarlet sel --text -t -m /doc -o LIT --nl xml/foo.xml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/examples/sel-xpath-c new/xmlstarlet-1.0.6/examples/sel-xpath-c --- old/xmlstarlet-1.0.5/examples/sel-xpath-c 2011-01-22 14:36:03.000000000 +0100 +++ new/xmlstarlet-1.0.6/examples/sel-xpath-c 2011-03-06 20:52:01.000000000 +0100 @@ -1,5 +1,4 @@ #!/bin/sh -while read -r XPATH ; do - ./xmlstarlet sel --text -t -m /doc -c "$XPATH" --nl xml/foo.xml -done < sel-xpath.input +${SED:-sed} "s/[\\'\"]/\\\&/g" < sel-xpath.input | xargs -I XPATH \ + ./xmlstarlet sel --text -t -m /doc -c XPATH --nl xml/foo.xml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/examples/sel-xpath-i new/xmlstarlet-1.0.6/examples/sel-xpath-i --- old/xmlstarlet-1.0.5/examples/sel-xpath-i 2011-01-22 14:39:59.000000000 +0100 +++ new/xmlstarlet-1.0.6/examples/sel-xpath-i 2011-03-06 20:52:01.000000000 +0100 @@ -1,5 +1,4 @@ #!/bin/sh -while read -r XPATH ; do - ./xmlstarlet sel --text -t -i "$XPATH" -v "$XPATH" --nl xml/foo.xml -done < sel-xpath.input +${SED:-sed} "s/[\\'\"]/\\\&/g" < sel-xpath.input | xargs -I XPATH \ + ./xmlstarlet sel --text -t -i XPATH -v XPATH --nl xml/foo.xml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/examples/sel-xpath-m new/xmlstarlet-1.0.6/examples/sel-xpath-m --- old/xmlstarlet-1.0.5/examples/sel-xpath-m 2011-01-22 14:38:33.000000000 +0100 +++ new/xmlstarlet-1.0.6/examples/sel-xpath-m 2011-03-06 20:52:01.000000000 +0100 @@ -1,5 +1,4 @@ #!/bin/sh -while read -r XPATH ; do - ./xmlstarlet sel --text -t -m "/*[boolean($XPATH)]" -v "$XPATH" --nl xml/foo.xml -done < sel-xpath.input +${SED:-sed} "s/[\\'\"]/\\\&/g" < sel-xpath.input | xargs -I XPATH \ + ./xmlstarlet sel --text -t -m '/*[boolean(XPATH)]' -v XPATH --nl xml/foo.xml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/examples/sel-xpath-v new/xmlstarlet-1.0.6/examples/sel-xpath-v --- old/xmlstarlet-1.0.5/examples/sel-xpath-v 2011-01-22 14:36:42.000000000 +0100 +++ new/xmlstarlet-1.0.6/examples/sel-xpath-v 2011-03-06 20:52:01.000000000 +0100 @@ -1,5 +1,4 @@ #!/bin/sh -while read -r XPATH ; do - ./xmlstarlet sel --text -t -m /doc -v "$XPATH" --nl xml/foo.xml -done < sel-xpath.input +${SED:-sed} "s/[\\'\"]/\\\&/g" < sel-xpath.input | xargs -I XPATH \ + ./xmlstarlet sel --text -t -m /doc -v XPATH --nl xml/foo.xml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/examples/tests.mk new/xmlstarlet-1.0.6/examples/tests.mk --- old/xmlstarlet-1.0.5/examples/tests.mk 2011-02-11 05:11:39.000000000 +0100 +++ new/xmlstarlet-1.0.6/examples/tests.mk 2011-03-08 02:16:43.000000000 +0100 @@ -1,4 +1,5 @@ -TESTS_ENVIRONMENT = srcdir=$(srcdir) $(srcdir)/tests/runTest.sh +TESTS_ENVIRONMENT = abs_builddir=$(abs_builddir) EXEEXT=$(EXEEXT) SED=$(SED) \ + $(srcdir)/tests/runTest.sh TESTS = examples/bigxml-dtd\ examples/bigxml-embed-ref\ @@ -7,8 +8,10 @@ examples/bigxml-well-formed\ examples/bigxml-xsd\ examples/c14n-default-attr\ +examples/c14n-newlines\ examples/c14n1\ examples/c14n2\ +examples/command-help\ examples/count1\ examples/countnode1\ examples/delete1\ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/examples/xmlstarlet new/xmlstarlet-1.0.6/examples/xmlstarlet --- old/xmlstarlet-1.0.5/examples/xmlstarlet 2011-02-11 22:21:22.000000000 +0100 +++ new/xmlstarlet-1.0.6/examples/xmlstarlet 2011-03-08 02:16:28.000000000 +0100 @@ -1,6 +1,6 @@ #!/bin/sh exepath=`dirname $0` -xml="${srcdir-$exepath/..}"/xml +xml="${abs_builddir-$exepath/..}"/xml if [ x"$OSTYPE" = xmsys ] ; then # MSYS does unix -> windows path conversion, eg: /x -> C:\Mingw\msys\1.0\x diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/m4/xstar-check-libs.m4 new/xmlstarlet-1.0.6/m4/xstar-check-libs.m4 --- old/xmlstarlet-1.0.5/m4/xstar-check-libs.m4 2010-11-27 21:26:28.000000000 +0100 +++ new/xmlstarlet-1.0.6/m4/xstar-check-libs.m4 2011-03-11 03:51:03.000000000 +0100 @@ -20,7 +20,7 @@ m4_if($2, [with-src], [AC_ARG_WITH(libxxx-src, AS_HELP_STRING([--with-libxxx-src=[DIR]], - For libxxx that\'s not installed yet (sets all three above)), + For libxxx that's not installed yet (sets all three above)), [LIBXXX()_SRCDIR="$withval" LIBXXX()_LIBDIR="$LIBXXX()_SRCDIR/.libs"])]) m4_popdef([libxxx], [LIBXXX])]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/solaris/package/sol8-sparc/pkginfo new/xmlstarlet-1.0.6/solaris/package/sol8-sparc/pkginfo --- old/xmlstarlet-1.0.5/solaris/package/sol8-sparc/pkginfo 2011-02-11 22:42:40.000000000 +0100 +++ new/xmlstarlet-1.0.6/solaris/package/sol8-sparc/pkginfo 2011-03-13 20:23:30.000000000 +0100 @@ -3,7 +3,7 @@ PKG=SFxmlstar NAME="xmlstarlet Command Line XML Toolkit" ARCH=sparc -VERSION=1.0.5 +VERSION=1.0.6 MAXINST=1 CATEGORY=application DESC="XmlStarlet Command Line XML Toolkit" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/solaris/package/sol9-sparc/pkginfo new/xmlstarlet-1.0.6/solaris/package/sol9-sparc/pkginfo --- old/xmlstarlet-1.0.5/solaris/package/sol9-sparc/pkginfo 2011-02-11 22:42:41.000000000 +0100 +++ new/xmlstarlet-1.0.6/solaris/package/sol9-sparc/pkginfo 2011-03-13 20:23:30.000000000 +0100 @@ -3,7 +3,7 @@ PKG=SFxmlstar NAME="xmlstarlet Command Line XML Toolkit" ARCH=sparc -VERSION=1.0.5 +VERSION=1.0.6 MAXINST=1 CATEGORY=application DESC="XmlStarlet Command Line XML Toolkit" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/src/binsert.c new/xmlstarlet-1.0.6/src/binsert.c --- old/xmlstarlet-1.0.5/src/binsert.c 2010-11-11 00:42:26.000000000 +0100 +++ new/xmlstarlet-1.0.6/src/binsert.c 2011-03-06 20:52:01.000000000 +0100 @@ -69,7 +69,7 @@ middle = (top + bottom) / 2; middle_item = array->data[middle]; - compare_result = strcmp(item, middle_item); + compare_result = xmlStrcmp(item, middle_item); if(compare_result > 0) bottom = middle + 1; else if(compare_result < 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/src/binsert.h new/xmlstarlet-1.0.6/src/binsert.h --- old/xmlstarlet-1.0.5/src/binsert.h 2010-11-11 00:42:26.000000000 +0100 +++ new/xmlstarlet-1.0.6/src/binsert.h 2011-03-06 20:52:01.000000000 +0100 @@ -3,9 +3,11 @@ #ifndef __BINSERT_H #define __BINSERT_H +#include <libxml/xmlstring.h> + typedef struct _SortedArrayObj SortedArrayObj; typedef SortedArrayObj* SortedArray; -typedef char* ArrayItem; +typedef xmlChar* ArrayItem; SortedArray array_create(); void array_free(SortedArray array); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/src/sources.mk new/xmlstarlet-1.0.6/src/sources.mk --- old/xmlstarlet-1.0.5/src/sources.mk 2011-02-11 17:41:32.000000000 +0100 +++ new/xmlstarlet-1.0.6/src/sources.mk 2011-03-06 20:52:01.000000000 +0100 @@ -4,8 +4,6 @@ src/escape.h\ src/stack.c\ src/stack.h\ -src/strdup.c\ -src/strdup.h\ src/trans.c\ src/trans.h\ src/xml.c\ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/src/strdup.c new/xmlstarlet-1.0.6/src/strdup.c --- old/xmlstarlet-1.0.5/src/strdup.c 2011-02-11 05:11:39.000000000 +0100 +++ new/xmlstarlet-1.0.6/src/strdup.c 1970-01-01 01:00:00.000000000 +0100 @@ -1,62 +0,0 @@ -/* $Id: strdup.c,v 1.3 2004/09/14 00:28:57 mgrouch Exp $ */ - -/* - -XMLStarlet: Command Line Toolkit to query/edit/check/transform XML documents - -Copyright (c) 2002 Mikhail Grushinskiy. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ - -#include <config.h> - -#ifndef HAVE_STRDUP - -#include <stdlib.h> -#include <string.h> -#include "strdup.h" - - -/* - * ISO compliant strdup implementation - */ - -char * -strdup(const char *cur) -{ - size_t len; - char *ret; - - if (cur == NULL) - return (NULL); - - len = strlen(cur) + 1; - ret = malloc(len); - if (ret == NULL) - return (NULL); - - memcpy(ret, cur, len); - return (ret); -} -#else -void dummy() {} -#endif - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/src/strdup.h new/xmlstarlet-1.0.6/src/strdup.h --- old/xmlstarlet-1.0.5/src/strdup.h 2010-11-11 00:42:26.000000000 +0100 +++ new/xmlstarlet-1.0.6/src/strdup.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -#ifndef __STRDUP_H -#define __STRDUP_H 1 - -char * strdup(const char *cur); - -#endif /* __STRDUP_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/src/xml_C14N.c new/xmlstarlet-1.0.6/src/xml_C14N.c --- old/xmlstarlet-1.0.5/src/xml_C14N.c 2011-02-11 05:11:39.000000000 +0100 +++ new/xmlstarlet-1.0.6/src/xml_C14N.c 2011-03-06 20:52:01.000000000 +0100 @@ -16,13 +16,17 @@ #include <stdio.h> #include <string.h> -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif +#if !HAVE_SETMODE +# define setmode(fd, mode) +#else +# include <io.h> +# include <fcntl.h> +#endif + #include <libxml/xmlmemory.h> #include <libxml/parser.h> #include <libxml/xpath.h> @@ -85,7 +89,6 @@ const char* xpath_filename, xmlChar **inclusive_namespaces) { xmlDocPtr doc; xmlXPathObjectPtr xpath = NULL; - xmlChar *result = NULL; int ret; xmlExternalEntityLoader defaultEntityLoader = NULL; @@ -132,21 +135,15 @@ /* * Canonical form - */ - /* fprintf(stderr,"File \"%s\" loaded: start canonization\n", xml_filename); */ - ret = xmlC14NDocDumpMemory(doc, - (xpath) ? xpath->nodesetval : NULL, - exclusive, inclusive_namespaces, - with_comments, &result); - if(ret >= 0) { - if(result != NULL) { - write(1, result, ret); - fflush(NULL); - xmlFree(result); - } - } else { - fprintf(stderr,"Error: failed to canonicalize XML file \"%s\" (ret=%d)\n", xml_filename, ret); - if(result != NULL) xmlFree(result); + */ + setmode(1, O_BINARY); /* avoid line ending conversion */ + ret = xmlC14NDocSave(doc, + (xpath) ? xpath->nodesetval : NULL, + exclusive, inclusive_namespaces, + with_comments, "-", 0); + if(ret < 0) { + fprintf(stderr,"Error: failed to canonicalize XML file \"%s\" (ret=%d)\n", + xml_filename, ret); xmlFreeDoc(doc); return(EXIT_FAILURE); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/src/xml_edit.c new/xmlstarlet-1.0.6/src/xml_edit.c --- old/xmlstarlet-1.0.5/src/xml_edit.c 2011-02-11 05:11:39.000000000 +0100 +++ new/xmlstarlet-1.0.6/src/xml_edit.c 2011-03-11 04:29:00.000000000 +0100 @@ -119,8 +119,8 @@ static const char edit_usage_str_2[] = "<global-options> are:\n" -" -P (or --pf) - preserve original formatting\n" -" -S (or --ps) - preserve non-significant spaces\n" +" -P, or -S - preserve whitespace nodes.\n" +" (or --pf, --ps) Note that space between attributes is not preserved\n" " -O (or --omit-decl) - omit XML declaration (<?xml ...?>)\n" " -L (or --inplace) - edit file inplace\n" " -N <name>=<value> - predefine namespaces (name without \'xmlns:\')\n" @@ -923,8 +923,6 @@ static edOptions g_ops; if (argc < 3) edUsage(argv[0], EXIT_BAD_ARGS); - if (!strcmp(argv[2], "--help") || !strcmp(argv[2], "-h")) - edUsage(argv[0], EXIT_BAD_ARGS); edInitOptions(&g_ops); start = edParseOptions(&g_ops, argc, argv); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/src/xml_elem.c new/xmlstarlet-1.0.6/src/xml_elem.c --- old/xmlstarlet-1.0.5/src/xml_elem.c 2011-02-11 05:11:39.000000000 +0100 +++ new/xmlstarlet-1.0.6/src/xml_elem.c 2011-03-06 20:52:01.000000000 +0100 @@ -29,6 +29,7 @@ #include <config.h> #include <libxml/parser.h> +#include <libxml/xmlstring.h> #include <stdlib.h> #include <string.h> @@ -36,17 +37,8 @@ #include "binsert.h" #include "escape.h" -#ifndef HAVE_STRDUP -#include "strdup.h" -#endif - - /* TODO: - 1. Option for equivalent of - xml el <xml-file> | sort | uniq - Maintain sorted array and do binary insertion - 2. Option to display this only for nodes matching an XPATH expression @@ -54,8 +46,6 @@ so it will be able to deal with subtrees as well - 3. Use stdin if input file is missing - */ typedef struct _elOptions { @@ -84,7 +74,7 @@ #define LINE_BUF_SZ 4*1024 -static char curXPath[LINE_BUF_SZ]; /* TODO: do not hardcode size */ +static xmlChar *curXPath = NULL; static int depth = 0; /** @@ -105,10 +95,8 @@ */ void elStartElement(void *user_data, const xmlChar *name, const xmlChar **attrs) { - char *tmpXPath = NULL; - - if (*curXPath != (char)0) strcat(curXPath, "/"); - strncat(curXPath, (char*) name, LINE_BUF_SZ - 1); + if (depth > 0) curXPath = xmlStrcat(curXPath, BAD_CAST "/"); + curXPath = xmlStrcat(curXPath, name); depth++; if (elOps.show_attr) @@ -156,7 +144,7 @@ if ((elOps.check_depth == 0) || (elOps.check_depth != 0 && depth <= elOps.check_depth)) { int idx; - tmpXPath = strdup(curXPath); + xmlChar *tmpXPath = xmlStrdup(curXPath); idx = array_binary_insert(sorted, tmpXPath); if (idx < 0) @@ -175,7 +163,7 @@ */ void elEndElement(void *user_data, const xmlChar *name) { - *(curXPath + strlen(curXPath) - strlen((char*) name) - 1) = '\0'; + *(curXPath + xmlStrlen(curXPath) - xmlStrlen(name) - 1) = '\0'; depth--; } @@ -223,8 +211,7 @@ if (argc <= 1) elUsage(argc, argv, EXIT_BAD_ARGS); elInitOptions(&elOps); - - /* TODO: more options to be added */ + if (argc == 2) errorno = parse_xml_file("-"); else @@ -278,7 +265,7 @@ for (i=0; i < array_len(sorted); i++) { - char* item = array_item(sorted, i); + xmlChar* item = array_item(sorted, i); printf("%s\n", item); free(item); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/src/xml_escape.c new/xmlstarlet-1.0.6/src/xml_escape.c --- old/xmlstarlet-1.0.5/src/xml_escape.c 2011-02-11 05:11:39.000000000 +0100 +++ new/xmlstarlet-1.0.6/src/xml_escape.c 2011-03-06 20:52:01.000000000 +0100 @@ -37,10 +37,6 @@ #include <libxml/xmlIO.h> #include <libxml/parserInternals.h> -#ifndef HAVE_STRDUP -#include "strdup.h" -#endif - #include "xmlstar.h" #include "escape.h" @@ -68,7 +64,7 @@ { extern const char more_info[]; FILE *o = (status == EXIT_SUCCESS)? stdout : stderr; - fprintf(o, escape_usage_str, argv[0], escape?"Escape":"Unescape", escape?"esc":"unesc"); + fprintf(o, escape_usage_str, escape?"Escape":"Unescape", argv[0], escape?"esc":"unesc"); fprintf(o, "%s", more_info); exit(status); } @@ -210,7 +206,7 @@ char *p = str, *p2 = NULL; char *ret = NULL; - ret = strdup(str); + ret = (char*) xmlCharStrdup(str); p2 = ret; while(*p) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/src/xml_format.c new/xmlstarlet-1.0.6/src/xml_format.c --- old/xmlstarlet-1.0.5/src/xml_format.c 2011-02-11 05:11:39.000000000 +0100 +++ new/xmlstarlet-1.0.6/src/xml_format.c 2011-03-06 20:52:01.000000000 +0100 @@ -45,10 +45,6 @@ #include "xmlstar.h" -#ifndef HAVE_STRDUP -#include "strdup.h" -#endif - /* * TODO: 1. Attribute formatting options (as every attribute on a new line) * 2. exit values on errors @@ -95,6 +91,7 @@ " -h or --help - print help\n\n"; const char *encoding = NULL; +static char *spaces = NULL; /** * Print small help for command line options @@ -104,7 +101,7 @@ { extern const char more_info[]; FILE *o = (status == EXIT_SUCCESS)? stdout : stderr; - fprintf(o, "%s", format_usage_str_1); + fprintf(o, format_usage_str_1, argv[0]); fprintf(o, "%s", format_usage_str_2); fprintf(o, "%s", more_info); exit(status); @@ -161,16 +158,14 @@ xmlIndentTreeOutput = 1; if (ops->indent_tab) { - xmlTreeIndentString = strdup("\t"); + xmlTreeIndentString = "\t"; } else if (ops->indent_spaces > 0) { - int i; - char *p; - p = malloc(ops->indent_spaces + 1); - xmlTreeIndentString = p; - for (i=0; i<ops->indent_spaces; i++) p[i] = ' '; - p[ops->indent_spaces] = 0; + spaces = malloc(ops->indent_spaces + 1); + xmlTreeIndentString = spaces; + memset(spaces, ' ', ops->indent_spaces); + spaces[ops->indent_spaces] = '\0'; } } else @@ -260,7 +255,7 @@ #endif else if (!strcmp(argv[i], "--help") || !strcmp(argv[i], "-h")) { - foUsage(argc, argv, EXIT_BAD_ARGS); + foUsage(argc, argv, EXIT_SUCCESS); } else if (!strcmp(argv[i], "-")) { @@ -387,9 +382,8 @@ void foCleanup() { - if (xmlTreeIndentString) free((char *)xmlTreeIndentString); - xmlTreeIndentString = NULL; - + free(spaces); + spaces = NULL; xmlCleanupParser(); #if 0 xmlMemoryDump(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/src/xml_ls.c new/xmlstarlet-1.0.6/src/xml_ls.c --- old/xmlstarlet-1.0.5/src/xml_ls.c 2011-02-11 22:21:22.000000000 +0100 +++ new/xmlstarlet-1.0.6/src/xml_ls.c 2011-03-06 20:52:01.000000000 +0100 @@ -62,7 +62,7 @@ static const char ls_usage_str[] = "XMLStarlet Toolkit: List directory as XML\n" -"Usage: %s ls\n" +"Usage: %s ls [ --help ]\n" "Lists current directory in XML format.\n" "Time is shown per ISO 8601 spec.\n" "\n"; @@ -202,8 +202,13 @@ int lsMain(int argc, char** argv) { - int res = -1; - if (argc != 2) lsUsage(argc, argv, EXIT_BAD_ARGS); + int res = -1, i; + for (i = 2; i < argc; i++) { + if (strcmp(argv[i], "--help") == 0) + lsUsage(argc, argv, EXIT_SUCCESS); + else + lsUsage(argc, argv, EXIT_BAD_ARGS); + } printf("<dir>\n"); res = xml_print_dir("."); printf("</dir>\n"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/src/xmlstar.h new/xmlstarlet-1.0.6/src/xmlstar.h --- old/xmlstarlet-1.0.5/src/xmlstar.h 2011-02-11 22:21:22.000000000 +0100 +++ new/xmlstarlet-1.0.6/src/xmlstar.h 2011-03-06 20:52:01.000000000 +0100 @@ -4,10 +4,6 @@ #include <config.h> #include <stdlib.h> -#if !HAVE_DECL_STRDUP -# include "strdup.h" -#endif - typedef enum { /* EXIT_SUCCESS = 0, EXIT_FAILURE = 1, */ EXIT_BAD_ARGS = EXIT_FAILURE+1, EXIT_BAD_FILE } exit_status; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/version.h new/xmlstarlet-1.0.6/version.h --- old/xmlstarlet-1.0.5/version.h 2011-02-11 22:42:13.000000000 +0100 +++ new/xmlstarlet-1.0.6/version.h 2011-03-13 20:23:30.000000000 +0100 @@ -1 +1 @@ -#define VERSION "1.0.5" +#define VERSION "1.0.6" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xmlstarlet-1.0.5/xmlstarlet.spec new/xmlstarlet-1.0.6/xmlstarlet.spec --- old/xmlstarlet-1.0.5/xmlstarlet.spec 2011-02-11 22:42:41.000000000 +0100 +++ new/xmlstarlet-1.0.6/xmlstarlet.spec 1970-01-01 01:00:00.000000000 +0100 @@ -1,49 +0,0 @@ -Name: xmlstarlet -Summary: Command Line XML Toolkit -Version: 1.0.5 -Release: 1 -License: MIT -Group: Text Tools -Source0: http://xmlstar.sourceforge.net/downloads/xmlstarlet-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildRequires: libxml2-devel >= 2.6.23 -BuildRequires: libxslt-devel >= 1.1.9 -URL: http://xmlstar.sourceforge.net/ -Prefix: %{_prefix} -Docdir: %{_docdir} - -%description -XMLStarlet is a set of command line utilities which can be used -to transform, query, validate, and edit XML documents and files -using simple set of shell commands in similar way it is done for -plain text files using UNIX grep, sed, awk, diff, patch, join, etc -commands. - -%prep -%setup -q - -%build -%configure -make - -%install -rm -fr %{buildroot} - -%makeinstall - -%clean -rm -fr %{buildroot} - -%post - -%postun - -%files -%defattr(-, root, root) - -%doc AUTHORS ChangeLog NEWS README Copyright TODO doc/xmlstarlet.txt doc/xmlstarlet.pdf -%doc %{_mandir}/man1/xmlstarlet.1* - -%{prefix}/bin/xml -%changelog - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
