Hello community,
here is the log from the commit of package libHX for openSUSE:Factory checked in at 2014-02-25 07:33:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libHX (Old)
and /work/SRC/openSUSE:Factory/.libHX.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libHX"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libHX/libHX.changes 2014-02-18 14:44:55.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libHX.new/libHX.changes 2014-02-25 07:33:18.000000000 +0100
@@ -1,0 +2,6 @@
+Fri Feb 21 19:13:11 UTC 2014 - jengelh@inai.de
+
+- Update to new upstream release 3.19
+* string: add the HXQUOTE_SQLSQUOTE quoting variant
+
+-------------------------------------------------------------------
Old:
----
libHX-3.18.tar.xz
libHX-3.18.tar.xz.asc
New:
----
libHX-3.19.tar.xz
libHX-3.19.tar.xz.asc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libHX.spec ++++++
--- /var/tmp/diff_new_pack.3exXEH/_old 2014-02-25 07:33:19.000000000 +0100
+++ /var/tmp/diff_new_pack.3exXEH/_new 2014-02-25 07:33:19.000000000 +0100
@@ -21,7 +21,7 @@
Summary: Useful collection of routines for C and C++ programming
License: LGPL-2.1 or LGPL-3.0
Group: Development/Libraries/C and C++
-Version: 3.18
+Version: 3.19
Release: 0
Url: http://libhx.sf.net/
@@ -43,18 +43,6 @@
linked lists, string formatting and autoresizing, option and config
file parsing, type checking casts and more.
-libHX aids in quickly writing up C and C++ data processing programs,
-by consolidating tasks that often happen to be open-coded, such as
-(simple) config file reading, option parsing, directory traversal,
-and others, into a library. The focus is on reducing the amount of
-time (and secondarily, the amount of code) a developer has to spend
-for otherwise implementing such.
-
-
-Authors:
---------
- Jan Engelhardt
-
%package -n %lname
Summary: Useful collection of routines for C and C++ programming
Group: System/Libraries
@@ -72,11 +60,6 @@
time (and secondarily, the amount of code) a developer has to spend
for otherwise implementing such.
-
-Authors:
---------
- Jan Engelhardt
-
%package devel
Summary: Useful collection of routines for C and C++ programming
Group: Development/Libraries/C and C++
@@ -88,18 +71,6 @@
linked lists, string formatting and autoresizing, option and config
file parsing, type checking casts and more.
-libHX aids in quickly writing up C and C++ data processing programs,
-by consolidating tasks that often happen to be open-coded, such as
-(simple) config file reading, option parsing, directory traversal,
-and others, into a library. The focus is on reducing the amount of
-time (and secondarily, the amount of code) a developer has to spend
-for otherwise implementing such.
-
-
-Authors:
---------
- Jan Engelhardt
-
%prep
%{?gpg_verify: %gpg_verify %{S:2}}
%if 0%{?__xz:1}
@@ -110,23 +81,19 @@
%endif
%build
-%define _configure ../configure
-mkdir obj;
-pushd obj/
%configure --includedir="%_includedir/pkg/%name" --docdir="%_docdir/%name"
make %{?_smp_mflags}
-popd
%install
b="%buildroot";
-make -C obj DESTDIR="$b" install
+make DESTDIR="$b" install
mkdir -p "$b/%_docdir/%name"
install -pm0644 doc/* "$b/%_docdir/%name"
rm -f "$b/%_docdir/%name"/Makefile*
find "$b/%_libdir" -type f -name "*.la" -delete;
%check
-make -C obj check %{?_smp_mflags}
+make check %{?_smp_mflags}
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
++++++ libHX-3.18.tar.xz -> libHX-3.19.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/Makefile.in new/libHX-3.19/Makefile.in
--- old/libHX-3.18/Makefile.in 2014-01-03 10:23:31.000000000 +0100
+++ new/libHX-3.19/Makefile.in 2014-02-21 19:39:43.000000000 +0100
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
@@ -408,8 +408,8 @@
$(am__aclocal_m4_deps):
config.h: stamp-h1
- @if test ! -f $@; then rm -f stamp-h1; else :; fi
- @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+ @test -f $@ || rm -f stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
@@ -640,10 +640,16 @@
$(am__post_remove_distdir)
dist-tarZ: distdir
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir)
@@ -685,9 +691,10 @@
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ && ../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/aclocal.m4 new/libHX-3.19/aclocal.m4
--- old/libHX-3.18/aclocal.m4 2014-01-03 10:23:20.000000000 +0100
+++ new/libHX-3.19/aclocal.m4 2014-02-21 19:39:42.000000000 +0100
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.13.4 -*- Autoconf -*-
+# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
@@ -32,10 +32,10 @@
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.13'
+[am__api_version='1.14'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.13.4], [],
+m4_if([$1], [1.14.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -51,7 +51,7 @@
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.13.4])dnl
+[AM_AUTOMAKE_VERSION([1.14.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
@@ -76,7 +76,8 @@
: ${AR=ar}
AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
- [am_cv_ar_interface=ar
+ [AC_LANG_PUSH([C])
+ am_cv_ar_interface=ar
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
[am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
AC_TRY_EVAL([am_ar_try])
@@ -93,7 +94,7 @@
fi
rm -f conftest.lib libconftest.a
])
- ])
+ AC_LANG_POP([C])])
case $am_cv_ar_interface in
ar)
@@ -477,6 +478,12 @@
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
@@ -585,6 +592,49 @@
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: http://austingroupbugs.net/view.php?id=542
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: http://www.gnu.org/software/coreutils/.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi
+
AM_SILENT_RULES([yes])
])
@@ -594,7 +644,6 @@
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
-
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
@@ -706,38 +755,6 @@
rm -f confinc confmf
])
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_CC_C_O
-# --------------
-# Like AC_PROG_CC_C_O, but changed for automake.
-AC_DEFUN([AM_PROG_CC_C_O],
-[AC_REQUIRE([AC_PROG_CC_C_O])dnl
-AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([compile])dnl
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-dnl Make sure AC_PROG_CC is never called again, or it will override our
-dnl setting of CC.
-m4_define([AC_PROG_CC],
- [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
-])
-
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
@@ -808,6 +825,53 @@
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+ [whether $CC understands -c and -o together],
+ [am_cv_prog_cc_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/assorted/Makefile.in new/libHX-3.19/assorted/Makefile.in
--- old/libHX-3.18/assorted/Makefile.in 2014-01-03 10:23:31.000000000 +0100
+++ new/libHX-3.19/assorted/Makefile.in 2014-02-21 19:39:43.000000000 +0100
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/build-aux/config.guess new/libHX-3.19/build-aux/config.guess
--- old/libHX-3.18/build-aux/config.guess 2014-01-03 10:23:30.000000000 +0100
+++ new/libHX-3.19/build-aux/config.guess 2014-02-21 19:39:43.000000000 +0100
@@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2013 Free Software Foundation, Inc.
-timestamp='2013-06-10'
+timestamp='2013-11-29'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -1270,16 +1270,26 @@
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- case $UNAME_PROCESSOR in
- i386) UNAME_PROCESSOR=x86_64 ;;
- powerpc) UNAME_PROCESSOR=powerpc64 ;;
- esac
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/build-aux/config.sub new/libHX-3.19/build-aux/config.sub
--- old/libHX-3.18/build-aux/config.sub 2014-01-03 10:23:30.000000000 +0100
+++ new/libHX-3.19/build-aux/config.sub 2014-02-21 19:39:43.000000000 +0100
@@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2013 Free Software Foundation, Inc.
-timestamp='2013-04-24'
+timestamp='2013-10-01'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -257,7 +257,7 @@
| avr | avr32 \
| be32 | be64 \
| bfin \
- | c4x | clipper \
+ | c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \
@@ -265,6 +265,7 @@
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
+ | k1om \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
@@ -324,7 +325,7 @@
c6x)
basic_machine=tic6x-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -372,7 +373,7 @@
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
- | clipper-* | craynv-* | cydra-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
@@ -381,6 +382,7 @@
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | k1om-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
@@ -794,7 +796,7 @@
os=-mingw64
;;
mingw32)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
@@ -830,7 +832,7 @@
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-msys
;;
mvs)
@@ -1546,6 +1548,9 @@
c4x-* | tic4x-*)
os=-coff
;;
+ c8051-*)
+ os=-elf
+ ;;
hexagon-*)
os=-elf
;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/build-aux/missing new/libHX-3.19/build-aux/missing
--- old/libHX-3.18/build-aux/missing 2014-01-03 10:23:30.000000000 +0100
+++ new/libHX-3.19/build-aux/missing 2014-02-21 19:39:43.000000000 +0100
@@ -1,7 +1,7 @@
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2012-06-26.16; # UTC
+scriptversion=2013-10-28.13; # UTC
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard , 1996.
@@ -160,7 +160,7 @@
;;
autom4te*)
echo "You might have modified some maintainer files that require"
- echo "the 'automa4te' program to be rebuilt."
+ echo "the 'autom4te' program to be rebuilt."
program_details 'autom4te'
;;
bison*|yacc*)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/build-aux/test-driver new/libHX-3.19/build-aux/test-driver
--- old/libHX-3.18/build-aux/test-driver 2014-01-03 10:23:32.000000000 +0100
+++ new/libHX-3.19/build-aux/test-driver 2014-02-21 19:39:43.000000000 +0100
@@ -1,7 +1,7 @@
#! /bin/sh
# test-driver - basic testsuite driver script.
-scriptversion=2012-06-27.10; # UTC
+scriptversion=2013-07-13.22; # UTC
# Copyright (C) 2011-2013 Free Software Foundation, Inc.
#
@@ -44,13 +44,12 @@
Usage:
test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
[--expect-failure={yes|no}] [--color-tests={yes|no}]
- [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT
+ [--enable-hard-errors={yes|no}] [--]
+ TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
END
}
-# TODO: better error handling in option parsing (in particular, ensure
-# TODO: $log_file, $trs_file and $test_name are defined).
test_name= # Used for reporting.
log_file= # Where to save the output of the test script.
trs_file= # Where to save the metadata of the test run.
@@ -69,10 +68,23 @@
--enable-hard-errors) enable_hard_errors=$2; shift;;
--) shift; break;;
-*) usage_error "invalid option: '$1'";;
+ *) break;;
esac
shift
done
+missing_opts=
+test x"$test_name" = x && missing_opts="$missing_opts --test-name"
+test x"$log_file" = x && missing_opts="$missing_opts --log-file"
+test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
+if test x"$missing_opts" != x; then
+ usage_error "the following mandatory options are missing:$missing_opts"
+fi
+
+if test $# -eq 0; then
+ usage_error "missing argument"
+fi
+
if test $color_tests = yes; then
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
red='[0;31m' # Red.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/config.h.in new/libHX-3.19/config.h.in
--- old/libHX-3.18/config.h.in 2014-01-03 10:23:27.000000000 +0100
+++ new/libHX-3.19/config.h.in 2014-02-21 19:39:43.000000000 +0100
@@ -91,9 +91,6 @@
*/
#undef LT_OBJDIR
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-#undef NO_MINUS_C_MINUS_O
-
/* Name of package */
#undef PACKAGE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/configure new/libHX-3.19/configure
--- old/libHX-3.18/configure 2014-01-03 10:23:24.000000000 +0100
+++ new/libHX-3.19/configure 2014-02-21 19:39:42.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libHX 3.18.
+# Generated by GNU Autoconf 2.69 for libHX 3.19.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@
# Identity of this package.
PACKAGE_NAME='libHX'
PACKAGE_TARNAME='libhx'
-PACKAGE_VERSION='3.18'
-PACKAGE_STRING='libHX 3.18'
+PACKAGE_VERSION='3.19'
+PACKAGE_STRING='libHX 3.19'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1337,7 +1337,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 libHX 3.18 to adapt to many kinds of systems.
+\`configure' configures libHX 3.19 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1407,7 +1407,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libHX 3.18:";;
+ short | recursive ) echo "Configuration of libHX 3.19:";;
esac
cat <<\_ACEOF
@@ -1517,7 +1517,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libHX configure 3.18
+libHX configure 3.19
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2243,7 +2243,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libHX $as_me 3.18, which was
+It was created by libHX $as_me 3.19, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2716,7 +2716,7 @@
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-am__api_version='1.13'
+am__api_version='1.14'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
$as_echo_n "checking whether build environment is sane... " >&6; }
@@ -3109,7 +3109,7 @@
# Define the identity of the package.
PACKAGE='libhx'
- VERSION='3.18'
+ VERSION='3.19'
cat >>confdefs.h <<_ACEOF
@@ -3244,6 +3244,49 @@
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: http://austingroupbugs.net/view.php?id=542
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: http://www.gnu.org/software/coreutils/.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+ fi
+fi
+
# Check whether --enable-silent-rules was given.
if test "${enable_silent_rules+set}" = set; then :
enableval=$enable_silent_rules;
@@ -4072,6 +4115,65 @@
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
@@ -4264,131 +4366,6 @@
fi
-if test "x$CC" != xcc; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
-$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
-$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
-fi
-set dummy $CC; ac_cc=`$as_echo "$2" |
- sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-# Make sure it works both with $CC and with simple cc.
-# We do the test twice because some compilers refuse to overwrite an
-# existing .o file with -o, though they will create one.
-ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-rm -f conftest2.*
-if { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } &&
- test -f conftest2.$ac_objext && { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; };
-then
- eval ac_cv_prog_cc_${ac_cc}_c_o=yes
- if test "x$CC" != xcc; then
- # Test first that cc exists at all.
- if { ac_try='cc -c conftest.$ac_ext >&5'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
- rm -f conftest2.*
- if { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } &&
- test -f conftest2.$ac_objext && { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; };
- then
- # cc works too.
- :
- else
- # cc exists but doesn't like -o.
- eval ac_cv_prog_cc_${ac_cc}_c_o=no
- fi
- fi
- fi
-else
- eval ac_cv_prog_cc_${ac_cc}_c_o=no
-fi
-rm -f core conftest*
-
-fi
-if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
-
-fi
-
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
@@ -4922,7 +4899,13 @@
if ${am_cv_ar_interface+:} false; then :
$as_echo_n "(cached) " >&6
else
- am_cv_ar_interface=ar
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ am_cv_ar_interface=ar
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int some_variable = 0;
@@ -4953,6 +4936,11 @@
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
@@ -17106,7 +17094,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libHX $as_me 3.18, which was
+This file was extended by libHX $as_me 3.19, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -17172,7 +17160,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libHX config.status 3.18
+libHX config.status 3.19
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/configure.ac new/libHX-3.19/configure.ac
--- old/libHX-3.18/configure.ac 2014-01-03 10:22:47.000000000 +0100
+++ new/libHX-3.19/configure.ac 2014-02-21 19:39:10.000000000 +0100
@@ -1,4 +1,4 @@
-AC_INIT([libHX], [3.18])
+AC_INIT([libHX], [3.19])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/doc/Makefile.in new/libHX-3.19/doc/Makefile.in
--- old/libHX-3.18/doc/Makefile.in 2014-01-03 10:23:31.000000000 +0100
+++ new/libHX-3.19/doc/Makefile.in 2014-02-21 19:39:43.000000000 +0100
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/doc/api.txt new/libHX-3.19/doc/api.txt
--- old/libHX-3.18/doc/api.txt 2014-01-03 10:22:47.000000000 +0100
+++ new/libHX-3.19/doc/api.txt 2014-02-21 19:39:10.000000000 +0100
@@ -15,6 +15,8 @@
RMV MinVer FirstA Name
----------------------------------------------------------------------
+3.19 3.19 3.19 HXQUOTE_SQLSQUOTE
+3.18 3.18 3.18 HX_stpltrim
3.17 3.17 3.17 HX_LONGLONG_FMT
3.17 3.17 3.17 HX_SIZET_FMT
3.16 3.16 3.16 container_of
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/doc/changelog.txt new/libHX-3.19/doc/changelog.txt
--- old/libHX-3.18/doc/changelog.txt 2014-01-03 10:22:47.000000000 +0100
+++ new/libHX-3.19/doc/changelog.txt 2014-02-21 19:39:10.000000000 +0100
@@ -4,6 +4,14 @@
====
+v3.19 (2014-02-21)
+==================
+Enhancements:
+- string: add the HXQUOTE_SQLSQUOTE quoting variant
+Internal changes:
+- format: rework function calling code to support extending with functions
+
+
v3.18 (2014-03-01)
==================
Enhancements:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/doc/libHX_Documentation.lyx new/libHX-3.19/doc/libHX_Documentation.lyx
--- old/libHX-3.18/doc/libHX_Documentation.lyx 2014-01-03 10:22:47.000000000 +0100
+++ new/libHX-3.19/doc/libHX_Documentation.lyx 2014-02-21 19:39:10.000000000 +0100
@@ -74,7 +74,7 @@
\begin_body
\begin_layout Title
-libHX 3.18
+libHX 3.19
\begin_inset Newline newline
\end_inset
@@ -11950,6 +11950,29 @@
Escape the string so that it becomes a valid part for an URI.
\end_layout
+\begin_layout Description
+
+\family typewriter
+HXQUOTE_SQLSQUOTE
+\family default
+
+\begin_inset Index idx
+status open
+
+\begin_layout Plain Layout
+
+\family typewriter
+HXQUOTE_SQLSQUOTE
+\end_layout
+
+\end_inset
+
+ Escape all single quotes in the string by double single-quotes, as required
+ for using it in a single-quoted SQL string.
+ No surrounding quotes will be generated to facilitate concatenating of
+ HX_strquote results.
+\end_layout
+
\begin_layout Standard
Specifying an unrecognized type will result in
\family typewriter
Files old/libHX-3.18/doc/libHX_Documentation.pdf and new/libHX-3.19/doc/libHX_Documentation.pdf differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/include/Makefile.in new/libHX-3.19/include/Makefile.in
--- old/libHX-3.18/include/Makefile.in 2014-01-03 10:23:31.000000000 +0100
+++ new/libHX-3.19/include/Makefile.in 2014-02-21 19:39:43.000000000 +0100
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/include/libHX/string.h new/libHX-3.19/include/libHX/string.h
--- old/libHX-3.18/include/libHX/string.h 2014-01-03 10:22:47.000000000 +0100
+++ new/libHX-3.19/include/libHX/string.h 2014-02-21 19:39:10.000000000 +0100
@@ -26,6 +26,7 @@
HXQUOTE_LDAPRDN,
HXQUOTE_BASE64,
HXQUOTE_URIENC,
+ HXQUOTE_SQLSQUOTE,
_HXQUOTE_MAX,
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/src/Makefile.in new/libHX-3.19/src/Makefile.in
--- old/libHX-3.18/src/Makefile.in 2014-01-03 10:23:32.000000000 +0100
+++ new/libHX-3.19/src/Makefile.in 2014-02-21 19:39:43.000000000 +0100
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/src/format.c new/libHX-3.19/src/format.c
--- old/libHX-3.18/src/format.c 2014-01-03 10:22:47.000000000 +0100
+++ new/libHX-3.19/src/format.c 2014-02-21 19:39:10.000000000 +0100
@@ -23,20 +23,39 @@
#define S_OPEN "("
#define S_CLOSE ")"
+/**
+ * %HXFMT_ARGSEP_NONE: function takes only a single argument
+ * %HXFMT_ARGSEP_SPACE: split arguments at whitespace
+ * e.g. %(exec /bin/ls foo)
+ * %HXFMT_ARGSEP_COMMA: split arguments at comma
+ * e.g. %(if %(this),%(then),%(else))
+ */
+enum {
+ HXFMT_ARGSEP_NONE = 0,
+ HXFMT_ARGSEP_SPACE = 1 << 0,
+ HXFMT_ARGSEP_COMMA = 1 << 1,
+};
+
struct fmt_entry {
const void *ptr;
unsigned int type;
};
-static __inline__ struct HXformat_map *fmt_export(const struct HXmap *t)
-{
- return const_cast1(void *, static_cast(const void *, t));
-}
+struct func_entry {
+ hxmc_t *(*proc)(int, const hxmc_t *const *, const struct HXformat_map *);
+ char delim[4];
+};
-static __inline__ struct HXmap *fmt_import(const struct HXformat_map *t)
-{
- return const_cast1(void *, static_cast(const void *, t));
-}
+struct HXformat2_fd {
+ const char *name;
+ hxmc_t *(*proc)(int, const hxmc_t *const *, const struct HXformat_map *);
+ unsigned int flags;
+};
+
+struct HXformat_map {
+ struct HXmap *vars;
+ struct HXmap *funcs;
+};
static void fmt_entry_free(void *e)
{
@@ -51,26 +70,39 @@
.d_free = fmt_entry_free,
};
-EXPORT_SYMBOL struct HXformat_map *HXformat_init(void)
+static void *func_entry_clone(const void *data, size_t size)
{
- struct HXmap *table;
+ const struct HXformat2_fd *in = data;
+ struct func_entry *out;
+ unsigned int i = 0;
- table = HXmap_init5(HXMAPT_DEFAULT, HXMAP_SCKEY, &fmt_entry_ops,
- 0, sizeof(struct fmt_entry));
- if (table == NULL)
+ out = malloc(sizeof(*out));
+ if (out == NULL)
return NULL;
- return fmt_export(table);
+ out->proc = in->proc;
+ memset(out->delim, '\0', sizeof(out->delim));
+ out->delim[i++] = C_CLOSE;
+ if (in->flags & HXFMT_ARGSEP_COMMA)
+ out->delim[i++] = ',';
+ if (in->flags & HXFMT_ARGSEP_SPACE)
+ out->delim[i++] = ' ';
+ return out;
}
-EXPORT_SYMBOL void HXformat_free(struct HXformat_map *ftable)
+static const struct HXmap_ops func_entry_ops = {
+ .d_clone = func_entry_clone,
+};
+
+EXPORT_SYMBOL void HXformat_free(struct HXformat_map *blk)
{
- HXmap_free(fmt_import(ftable));
+ HXmap_free(blk->vars);
+ HXmap_free(blk->funcs);
+ free(blk);
}
-EXPORT_SYMBOL int HXformat_add(struct HXformat_map *ftable, const char *key,
+EXPORT_SYMBOL int HXformat_add(struct HXformat_map *blk, const char *key,
const void *ptr, unsigned int ptr_type)
{
- struct HXmap *table = fmt_import(ftable);
struct fmt_entry *entry;
int ret;
@@ -92,7 +124,7 @@
entry->ptr = ptr;
}
- ret = HXmap_add(table, key, entry);
+ ret = HXmap_add(blk->vars, key, entry);
if (ret <= 0) {
free(entry);
return ret;
@@ -106,27 +138,12 @@
char *ret = strchr(s, c);
if (ret != NULL)
return ret;
- return const_cast1(char *, &s[strlen(s)]);
+ return const_cast1(char *, s) + strlen(s);
}
/*
- * HXformat2
- *
- * Compared to the first-generation, this variant provides make(1)-style
- * function calls.
- */
-
-struct HXformat2_fd {
- const char *name;
- hxmc_t *(*proc)(int, const char *const *);
- const char *delim;
- bool (*check)(const struct HXmap *);
-};
-
-/*
* Used as an unique object for "expanded to nothing", to distinguish it from
- * %NULL indicating some error. This is cheaper than allocating an empty hxmc
- * everytime.
+ * %NULL indicating some error.
*/
static char HXformat2_nexp;
@@ -139,7 +156,8 @@
/*
* Echo input back, with markers. This is strictly for testing only.
*/
-static hxmc_t *HXformat2_echo(int argc, const hxmc_t *const *argv)
+static hxmc_t *HXformat2_echo(int argc, const hxmc_t *const *argv,
+ const struct HXformat_map *blk)
{
hxmc_t *ret = HXmc_meminit(NULL, 0);
int i;
@@ -154,7 +172,8 @@
return ret;
}
-static hxmc_t *HXformat2_env(int argc, const hxmc_t *const *argv)
+static hxmc_t *HXformat2_env(int argc, const hxmc_t *const *argv,
+ const struct HXformat_map *blk)
{
const char *s;
@@ -164,7 +183,8 @@
return (s == NULL) ? &HXformat2_nexp : HXmc_strinit(s);
}
-static hxmc_t *HXformat2_if(int argc, const hxmc_t *const *argv)
+static hxmc_t *HXformat2_if(int argc, const hxmc_t *const *argv,
+ const struct HXformat_map *blk)
{
if (argc < 2) {
HXformat2_insuf(__func__, argc);
@@ -179,7 +199,8 @@
HXmc_strinit(argv[2]) : &HXformat2_nexp;
}
-static hxmc_t *HXformat2_lower(int argc, const hxmc_t *const *argv)
+static hxmc_t *HXformat2_lower(int argc, const hxmc_t *const *argv,
+ const struct HXformat_map *blk)
{
hxmc_t *ret;
@@ -190,12 +211,8 @@
return ret;
}
-static bool HXformat2_execchk(const struct HXmap *table)
-{
- return HXmap_find(table, "/libhx/exec") != NULL;
-}
-
-static hxmc_t *HXformat2_exec1(const hxmc_t *const *argv)
+static hxmc_t *HXformat2_exec1(const hxmc_t *const *argv,
+ const struct HXformat_map *blk)
{
struct HXproc proc = {
.p_flags = HXPROC_NULL_STDIN | HXPROC_STDOUT | HXPROC_VERBOSE,
@@ -203,6 +220,9 @@
hxmc_t *slurp, *complete = NULL;
ssize_t ret;
+ if (HXmap_find(blk->vars, "/libhx/exec") == NULL)
+ return &HXformat2_nexp;
+
slurp = HXmc_meminit(NULL, BUFSIZ);
if (slurp == NULL)
return NULL;
@@ -226,23 +246,26 @@
return &HXformat2_nexp;
}
-static hxmc_t *HXformat2_exec(int argc, const hxmc_t *const *argv)
+static hxmc_t *HXformat2_exec(int argc, const hxmc_t *const *argv,
+ const struct HXformat_map *blk)
{
if (argc == 0)
return &HXformat2_nexp;
- return HXformat2_exec1(argv);
+ return HXformat2_exec1(argv, blk);
}
-static hxmc_t *HXformat2_shell(int argc, const hxmc_t *const *argv)
+static hxmc_t *HXformat2_shell(int argc, const hxmc_t *const *argv,
+ const struct HXformat_map *blk)
{
const char *cmd[] = {"/bin/sh", "-c", NULL, NULL};
if (argc == 0)
return &HXformat2_nexp;
cmd[2] = argv[0];
- return HXformat2_exec1(cmd);
+ return HXformat2_exec1(cmd, blk);
}
-static hxmc_t *HXformat2_snl(int argc, const hxmc_t *const *argv)
+static hxmc_t *HXformat2_snl(int argc, const hxmc_t *const *argv,
+ const struct HXformat_map *blk)
{
hxmc_t *s;
char *p;
@@ -258,7 +281,8 @@
return s;
}
-static hxmc_t *HXformat2_substr(int argc, const hxmc_t *const *argv)
+static hxmc_t *HXformat2_substr(int argc, const hxmc_t *const *argv,
+ const struct HXformat_map *blk)
{
ssize_t offset, length, z;
hxmc_t *ret;
@@ -313,7 +337,8 @@
return ret;
}
-static hxmc_t *HXformat2_upper(int argc, const hxmc_t *const *argv)
+static hxmc_t *HXformat2_upper(int argc, const hxmc_t *const *argv,
+ const struct HXformat_map *blk)
{
hxmc_t *ret;
@@ -325,25 +350,17 @@
}
static const struct HXformat2_fd HXformat2_fmap[] = {
- /* Need to be alphabetically sorted */
- {"echo", HXformat2_echo, S_CLOSE " ,"},
- {"env", HXformat2_env, S_CLOSE " ,"},
- {"exec", HXformat2_exec, S_CLOSE " ", HXformat2_execchk},
- {"if", HXformat2_if, S_CLOSE ","}, /* no sp: ok */
- {"lower", HXformat2_lower, S_CLOSE},
- {"shell", HXformat2_shell, S_CLOSE, HXformat2_execchk},
- {"snl", HXformat2_snl, S_CLOSE},
- {"substr", HXformat2_substr, S_CLOSE ","},
- {"upper", HXformat2_upper, S_CLOSE},
+ {"echo", HXformat2_echo, HXFMT_ARGSEP_COMMA | HXFMT_ARGSEP_SPACE},
+ {"env", HXformat2_env, HXFMT_ARGSEP_COMMA | HXFMT_ARGSEP_SPACE},
+ {"exec", HXformat2_exec, HXFMT_ARGSEP_SPACE},
+ {"if", HXformat2_if, HXFMT_ARGSEP_COMMA},
+ {"lower", HXformat2_lower, HXFMT_ARGSEP_NONE},
+ {"shell", HXformat2_shell, HXFMT_ARGSEP_NONE},
+ {"snl", HXformat2_snl, HXFMT_ARGSEP_NONE},
+ {"substr", HXformat2_substr, HXFMT_ARGSEP_COMMA},
+ {"upper", HXformat2_upper, HXFMT_ARGSEP_NONE},
};
-static int HXformat2_fmap_compare(const void *pa, const void *pb)
-{
- const char *a_name = pa;
- const struct HXformat2_fd *b = pb;
- return strcmp(a_name, b->name);
-}
-
/**
* HXformat2_xcall - expand function call (gather args)
* @name: name of function
@@ -354,9 +371,9 @@
* function.
*/
static hxmc_t *HXformat2_xcall(const char *name, const char **pptr,
- const struct HXmap *table)
+ const struct HXformat_map *blk)
{
- const struct HXformat2_fd *entry;
+ const struct func_entry *entry;
hxmc_t *ret, *ret2, **argv;
struct HXdeque *dq;
const char *s, *delim;
@@ -366,8 +383,7 @@
if (dq == NULL)
return NULL;
- entry = bsearch(name, HXformat2_fmap, ARRAY_SIZE(HXformat2_fmap),
- sizeof(*HXformat2_fmap), HXformat2_fmap_compare);
+ entry = HXmap_get(blk->funcs, name);
delim = (entry != NULL) ? entry->delim : S_CLOSE;
if (**pptr == C_CLOSE)
++*pptr;
@@ -380,7 +396,7 @@
goto out_h_errno;
if (strstr(ret, "%" S_OPEN) != NULL) {
ret2 = NULL;
- err = HXformat_aprintf(fmt_export(table), &ret2, ret);
+ err = HXformat_aprintf(blk, &ret2, ret);
if (err < 0 || ret2 == NULL)
goto out_h_neg;
HXmc_free(ret);
@@ -402,10 +418,11 @@
goto out_h_errno;
ret = &HXformat2_nexp;
- /* Unknown functions are silently expanded to nothing, like make. */
- if (entry != NULL && (entry->check == NULL || entry->check(table)))
+ /* Unknown functions are silently expanded to nothing, like in make. */
+ if (entry != NULL)
ret = entry->proc(dq->items,
- const_cast2(const hxmc_t *const *, argv));
+ const_cast2(const hxmc_t *const *, argv),
+ blk);
/*
* Pointers in argv are shared with those in dq.
* Free only the outer shell of one.
@@ -502,7 +519,8 @@
*
* @*pptr has to point to the first character after the "%(" opener.
*/
-static hxmc_t *HXformat2_xany(const char **pptr, const struct HXmap *table)
+static hxmc_t *
+HXformat2_xany(const char **pptr, const struct HXformat_map *blk)
{
const char *s = *pptr;
hxmc_t *name, *ret;
@@ -539,13 +557,13 @@
int eret;
*pptr = ++s;
- eret = HXformat_aprintf(fmt_export(table), &new_name, name);
+ eret = HXformat_aprintf(blk, &new_name, name);
if (eret <= 0) {
ret = NULL;
} else if (*new_name == '\0') {
ret = &HXformat2_nexp;
} else {
- entry = HXmap_get(table, new_name);
+ entry = HXmap_get(blk->vars, new_name);
ret = (entry == NULL) ? &HXformat2_nexp :
HXformat2_xvar(entry);
}
@@ -559,17 +577,53 @@
* Note that %() is not expanded in function names. This
* follows make(1) behavior.
*/
- ret = HXformat2_xcall(name, pptr, table);
+ ret = HXformat2_xcall(name, pptr, blk);
}
HXmc_free(name);
return ret;
}
-EXPORT_SYMBOL int HXformat_aprintf(const struct HXformat_map *ftable,
+EXPORT_SYMBOL struct HXformat_map *HXformat_init(void)
+{
+ struct HXformat_map *blk;
+ unsigned int i;
+ int saved_errno, ret;
+
+ blk = calloc(1, sizeof(*blk));
+ if (blk == NULL)
+ return NULL;
+
+ blk->vars = HXmap_init5(HXMAPT_DEFAULT, HXMAP_SCKEY, &fmt_entry_ops,
+ 0, sizeof(struct fmt_entry));
+ if (blk->vars == NULL)
+ goto out;
+ blk->funcs = HXmap_init5(HXMAPT_DEFAULT, HXMAP_SCKEY, &func_entry_ops,
+ 0, sizeof(struct func_entry));
+ if (blk->funcs == NULL)
+ goto out;
+ for (i = 0; i < ARRAY_SIZE(HXformat2_fmap); ++i) {
+ ret = HXmap_add(blk->funcs, HXformat2_fmap[i].name,
+ &HXformat2_fmap[i]);
+ if (ret < 0)
+ goto out;
+ }
+ return blk;
+
+ out:
+ saved_errno = errno;
+ if (blk->vars != NULL)
+ HXmap_free(blk->vars);
+ if (blk->funcs != NULL)
+ HXmap_free(blk->funcs);
+ free(blk);
+ errno = saved_errno;
+ return NULL;
+}
+
+EXPORT_SYMBOL int HXformat_aprintf(const struct HXformat_map *blk,
hxmc_t **resultp, const char *fmt)
{
- const struct HXmap *table = fmt_import(ftable);
hxmc_t *ex, *ts, *out;
const char *current;
int ret = 0;
@@ -593,7 +647,7 @@
}
current += 2; /* skip % and opening parenthesis */
- ex = HXformat2_xany(¤t, table);
+ ex = HXformat2_xany(¤t, blk);
if (ex == NULL)
goto out;
if (ex != &HXformat2_nexp) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/src/mc.c new/libHX-3.19/src/mc.c
--- old/libHX-3.18/src/mc.c 2014-01-03 10:22:47.000000000 +0100
+++ new/libHX-3.19/src/mc.c 2014-02-21 19:39:10.000000000 +0100
@@ -148,7 +148,7 @@
if (ptr == NULL)
return *vp = ctx->data;
- memcpy(&ctx->data[ctx->length], ptr, len);
+ memcpy(ctx->data + ctx->length, ptr, len);
ctx->length = nl;
ctx->data[nl] = '\0';
return *vp = ctx->data;
@@ -196,8 +196,8 @@
if (ptr == NULL)
return *vp = ctx->data;
- memmove(&ctx->data[pos + len], &ctx->data[pos], ctx->length - pos);
- memcpy(&ctx->data[pos], ptr, len);
+ memmove(ctx->data + pos + len, ctx->data + pos, ctx->length - pos);
+ memcpy(ctx->data + pos, ptr, len);
ctx->length += len;
ctx->data[ctx->length] = '\0';
return *vp = ctx->data;
@@ -211,7 +211,7 @@
if (pos + len > ctx->length)
len = ctx->length - pos;
- memmove(&ctx->data[pos], &ctx->data[pos + len],
+ memmove(ctx->data + pos, ctx->data + pos + len,
ctx->length - pos - len);
ctx->length -= len;
ctx->data[ctx->length] = '\0';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/src/opt.c new/libHX-3.19/src/opt.c
--- old/libHX-3.18/src/opt.c 2014-01-03 10:22:47.000000000 +0100
+++ new/libHX-3.19/src/opt.c 2014-02-21 19:39:10.000000000 +0100
@@ -941,7 +941,9 @@
return NULL;
if ((fp = fopen(file, "r")) == NULL) {
- free(map);
+ int saved_errno = errno;
+ HXmap_free(map);
+ errno = saved_errno;
return NULL;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/src/string.c new/libHX-3.19/src/string.c
--- old/libHX-3.18/src/string.c 2014-01-03 10:22:47.000000000 +0100
+++ new/libHX-3.19/src/string.c 2014-02-21 19:39:10.000000000 +0100
@@ -496,6 +496,7 @@
[HXQUOTE_LDAPFLT] = {HXQUOTE_REJECT, "\n*()\\"},
[HXQUOTE_LDAPRDN] = {HXQUOTE_REJECT, "\n \"#+,;<=>\\"},
[HXQUOTE_URIENC] = {HXQUOTE_ACCEPT, "-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~"},
+ [HXQUOTE_SQLSQUOTE] = {HXQUOTE_REJECT, "'"},
};
/**
@@ -565,6 +566,30 @@
return ret;
}
+static char *
+HX_quote_sqlbackslash(char *dest, const char *src, const char *trm)
+{
+ char *ret = dest;
+ size_t len;
+
+ while (*src != '\0') {
+ len = strcspn(src, trm);
+ if (len > 0) {
+ memcpy(dest, src, len);
+ dest += len;
+ src += len;
+ if (*src == '\0')
+ break;
+ }
+ *dest++ = *trm;
+ *dest++ = *trm;
+ ++src;
+ }
+
+ *dest = '\0';
+ return ret;
+}
+
/**
* Encode @src into BASE-64 according to RFC 4648 and write result to @dest,
* which must be of appropriate size, plus one for a trailing NUL.
@@ -716,6 +741,7 @@
switch (type) {
case HXQUOTE_SQUOTE:
case HXQUOTE_DQUOTE:
+ case HXQUOTE_SQLSQUOTE:
return HX_qsize_bsr(s, HX_quote_rules[type].chars, 1);
case HXQUOTE_HTML:
return HX_qsize_html(s);
@@ -784,6 +810,8 @@
return HX_quote_base64(*free_me, src);
case HXQUOTE_URIENC:
return HX_quote_urlenc(*free_me, src);
+ case HXQUOTE_SQLSQUOTE:
+ return HX_quote_sqlbackslash(*free_me, src, rule->chars);
}
return NULL;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.18/src/tc-strquote.c new/libHX-3.19/src/tc-strquote.c
--- old/libHX-3.18/src/tc-strquote.c 2014-01-03 10:22:47.000000000 +0100
+++ new/libHX-3.19/src/tc-strquote.c 2014-02-21 19:39:10.000000000 +0100
@@ -14,6 +14,7 @@
static const char input1[] = "\"Good\" ol' \\'escaped\\' strings";
static const char output1a[] = "\"Good\" ol\\' \\\\\\'escaped\\\\\\' strings";
static const char output1b[] = "\\\"Good\\\" ol' \\\\'escaped\\\\' strings";
+static const char output1c[] = "\"Good\" ol'' \\''escaped\\'' strings";
static const char input2[] = "Foo & \"bar\"</p>";
static const char output2[] =
"<p style="height: 1;">Foo & "bar"</p>";
@@ -55,6 +56,7 @@
return EXIT_FAILURE;
tst(input1, HXQUOTE_SQUOTE, output1a);
tst(input1, HXQUOTE_DQUOTE, output1b);
+ tst(input1, HXQUOTE_SQLSQUOTE, output1c);
tst(input2, HXQUOTE_HTML, output2);
tst(input3, HXQUOTE_LDAPFLT, output3a);
tst(input3, HXQUOTE_LDAPRDN, output3b);
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org