Hello community,

here is the log from the commit of package gwenhywfar for openSUSE:Leap:15.2 
checked in at 2020-03-16 12:21:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/gwenhywfar (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.gwenhywfar.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gwenhywfar"

Mon Mar 16 12:21:14 2020 rev:26 rq:785524 version:5.2.0

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/gwenhywfar/gwenhywfar.changes  2020-01-30 
06:08:37.370471850 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.gwenhywfar.new.3160/gwenhywfar.changes        
2020-03-16 12:21:15.339710451 +0100
@@ -1,0 +2,5 @@
+Sat Mar 14 12:38:03 UTC 2020 - Christophe Giboudeaux <[email protected]>
+
+- Update to 5.2.0. No changelog.
+
+-------------------------------------------------------------------

Old:
----
  gwenhywfar-5.1.2.tar.gz

New:
----
  gwenhywfar-5.2.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gwenhywfar.spec ++++++
--- /var/tmp/diff_new_pack.oRrUVi/_old  2020-03-16 12:21:16.347710616 +0100
+++ /var/tmp/diff_new_pack.oRrUVi/_new  2020-03-16 12:21:16.351710616 +0100
@@ -18,13 +18,13 @@
 
 %define libversion 79
 %define devversion 5
-%define devrelease 5.1
+%define devrelease 5.2
 # Beta does not mean "before release" but a release that is considered as beta:
 %define _version %{version}
 %define _name gwenhywfar
 %bcond_with configure
 Name:           gwenhywfar
-Version:        5.1.2
+Version:        5.2.0
 Release:        0
 Summary:        Multiplatform helper library for other libraries
 License:        GPL-2.0-or-later AND LGPL-2.1-or-later
@@ -47,6 +47,7 @@
 BuildRequires:  cmake(Qt5Network)
 BuildRequires:  cmake(Qt5OpenGL)
 BuildRequires:  cmake(Qt5PrintSupport)
+BuildRequires:  cmake(Qt5LinguistTools)
 BuildRequires:  cmake(Qt5Sql)
 BuildRequires:  cmake(Qt5Test)
 BuildRequires:  cmake(Qt5Widgets)
@@ -113,20 +114,20 @@
 configuration files, reading and writing of XML files, and interprocess
 communication).
 
-%package -n libgwengui-cpp0
+%package -n libgwengui-cpp%{libversion}
 Summary:        C++ interface for Gwenhywfar
 License:        GPL-2.0-or-later AND LGPL-2.1-or-later
 Group:          System/Libraries
 
-%description -n libgwengui-cpp0
+%description -n libgwengui-cpp%{libversion}
 This package contains the C++ GUI interface for Gwenhywfar.
 
-%package -n libgwengui-gtk2-0
+%package -n libgwengui-gtk2-%{libversion}
 Summary:        GTK+ 2 UI backend for Gwenhywfar
 License:        LGPL-2.1-or-later
 Group:          System/Libraries
 
-%description -n libgwengui-gtk2-0
+%description -n libgwengui-gtk2-%{libversion}
 Gwenhywfar is a base library used to provide OS abstraction functions
 for Linux, FreeBSD, OpenBSD, NetBSD, and Windows. It also includes
 some often needed functions (for example, for handling and parsing of
@@ -135,12 +136,12 @@
 
 This package provides the GTK+ 2 implementation of the generic UI toolkit.
 
-%package -n libgwengui-gtk3-0
+%package -n libgwengui-gtk3-%{libversion}
 Summary:        GTK+ 3 UI backend for Gwenhywfar
 License:        LGPL-2.1-or-later
 Group:          System/Libraries
 
-%description -n libgwengui-gtk3-0
+%description -n libgwengui-gtk3-%{libversion}
 Gwenhywfar is a base library used to provide OS abstraction functions
 for Linux, FreeBSD, OpenBSD, NetBSD, and Windows. It also includes
 some often needed functions (for example, for handling and parsing of
@@ -149,14 +150,14 @@
 
 This package provides the GTK+ 3 implementation of the generic UI toolkit.
 
-%package -n libgwengui-qt5-0
+%package -n libgwengui-qt5-%{libversion}
 Summary:        Qt5 UI backend for the gwenhywfar multi-platform helper library
 License:        LGPL-2.1-or-later
 Group:          System/Libraries
 Provides:       libgwengui-qt4-0 = %{version}
 Obsoletes:      libgwengui-qt4-0 < %{version}
 
-%description -n libgwengui-qt5-0
+%description -n libgwengui-qt5-%{libversion}
 Gwenhywfar is a base library used to provide OS abstraction functions
 for Linux, FreeBSD, OpenBSD, NetBSD, and Windows. It also includes
 some often needed functions (for example, for handling and parsing of
@@ -165,12 +166,12 @@
 
 This package provides the Qt5 implementation of the generic UI toolkit.
 
-%package -n libgwengui-fox16-0
+%package -n libgwengui-fox16-%{libversion}
 Summary:        FOX interface for Gwenhywfar
 License:        GPL-2.0-or-later AND LGPL-2.1-or-later
 Group:          System/Libraries
 
-%description -n libgwengui-fox16-0
+%description -n libgwengui-fox16-%{libversion}
 This package contains the interface to the FOX toolkit
 for Gwenhywfar.
 
@@ -179,10 +180,10 @@
 License:        LGPL-2.1-or-later
 Group:          Development/Libraries/C and C++
 Requires:       glibc-devel
-Requires:       libgwengui-fox16-0 >= %{version}
-Requires:       libgwengui-gtk2-0 >= %{version}
-Requires:       libgwengui-gtk3-0 >= %{version}
-Requires:       libgwengui-qt5-0 >= %{version}
+Requires:       libgwengui-fox16-%{libversion} >= %{version}
+Requires:       libgwengui-gtk2-%{libversion} >= %{version}
+Requires:       libgwengui-gtk3-%{libversion} >= %{version}
+Requires:       libgwengui-qt5-%{libversion} >= %{version}
 Requires:       libgwenhywfar%{libversion} = %{version}
 
 %description devel
@@ -233,16 +234,16 @@
 
 %post   -n libgwenhywfar%{libversion} -p /sbin/ldconfig
 %postun -n libgwenhywfar%{libversion} -p /sbin/ldconfig
-%post   -n libgwengui-cpp0 -p /sbin/ldconfig
-%postun -n libgwengui-cpp0 -p /sbin/ldconfig
-%post   -n libgwengui-gtk2-0 -p /sbin/ldconfig
-%postun -n libgwengui-gtk2-0 -p /sbin/ldconfig
-%post   -n libgwengui-gtk3-0 -p /sbin/ldconfig
-%postun -n libgwengui-gtk3-0 -p /sbin/ldconfig
-%post -n libgwengui-qt5-0 -p /sbin/ldconfig
-%postun -n libgwengui-qt5-0 -p /sbin/ldconfig
-%post -n libgwengui-fox16-0 -p /sbin/ldconfig
-%postun -n libgwengui-fox16-0 -p /sbin/ldconfig
+%post   -n libgwengui-cpp%{libversion} -p /sbin/ldconfig
+%postun -n libgwengui-cpp%{libversion} -p /sbin/ldconfig
+%post   -n libgwengui-gtk2-%{libversion} -p /sbin/ldconfig
+%postun -n libgwengui-gtk2-%{libversion} -p /sbin/ldconfig
+%post   -n libgwengui-gtk3-%{libversion} -p /sbin/ldconfig
+%postun -n libgwengui-gtk3-%{libversion} -p /sbin/ldconfig
+%post -n libgwengui-qt5-%{libversion} -p /sbin/ldconfig
+%postun -n libgwengui-qt5-%{libversion} -p /sbin/ldconfig
+%post -n libgwengui-fox16-%{libversion} -p /sbin/ldconfig
+%postun -n libgwengui-fox16-%{libversion} -p /sbin/ldconfig
 
 %files
 %license COPYING
@@ -270,19 +271,19 @@
 %files -n libgwenhywfar%{libversion}
 %{_libdir}/lib%{_name}.so.*
 
-%files -n libgwengui-cpp0
+%files -n libgwengui-cpp%{libversion}
 %{_libdir}/libgwengui-cpp.so.*
 
-%files -n libgwengui-gtk2-0
+%files -n libgwengui-gtk2-%{libversion}
 %{_libdir}/libgwengui-gtk2.so.*
 
-%files -n libgwengui-gtk3-0
+%files -n libgwengui-gtk3-%{libversion}
 %{_libdir}/libgwengui-gtk3.so.*
 
-%files -n libgwengui-qt5-0
+%files -n libgwengui-qt5-%{libversion}
 %{_libdir}/libgwengui-qt5.so.*
 
-%files -n libgwengui-fox16-0
+%files -n libgwengui-fox16-%{libversion}
 %{_libdir}/libgwengui-fox16.so.*
 
 %files devel

++++++ gwenhywfar-5.1.2.tar.gz -> gwenhywfar-5.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/Doxyfile.in 
new/gwenhywfar-5.2.0/Doxyfile.in
--- old/gwenhywfar-5.1.2/Doxyfile.in    2020-01-17 20:23:41.000000000 +0100
+++ new/gwenhywfar-5.2.0/Doxyfile.in    2020-02-12 22:21:05.000000000 +0100
@@ -1488,7 +1488,7 @@
 # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
 # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
 
-DOT_GRAPH_MAX_NODES    = 50
+DOT_GRAPH_MAX_NODES    = 100
 
 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
 # graphs generated by dot. A depth value of 3 means that only nodes reachable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/TODO new/gwenhywfar-5.2.0/TODO
--- old/gwenhywfar-5.1.2/TODO   2020-01-17 20:23:41.000000000 +0100
+++ new/gwenhywfar-5.2.0/TODO   2020-02-12 22:21:05.000000000 +0100
@@ -66,3 +66,41 @@
 closedir(d);
 
 
+
+0  10
+1  19
+2  35
+3  67
+4  91
+5 115
+6 247
+
+insert 39
+total 7
+
+1. 0???: pos 0:10, smaller, set to 1, okay? no, keep at 0
+2. 00??: pos 0:10, smaller, set to 1, okay? yes, set to 1
+3. 010?: pos 4: 81, bigger, set to 0
+4. 0100: pos 4: 81, bigger, set to 0
+-> 4: insert before position 4
+
+
+# approach: determine the highest entry smaller than the new value
+1. 1???: pos 8: overflow, set to 0
+2. 01??: pos 4: 91, bigger, set to 0
+3. 001?: pos 2: 35, smaller, keep at 1
+4. 0011: pos 3: 67, bigger, set to 0
+-> 0010: 2 (+1 is the position)
+
+
+insert 75
+
+1. 1???: pos 8, overflow ->0
+2. 01??: pos 4: 91, bigger ->0
+3. 001?: pos 2: 35, smaller ->1
+4. 0011: pos 3: 67, smaller ->1
+-> 0011: 3 (+1 is the position)
+
+
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/configure.ac 
new/gwenhywfar-5.2.0/configure.ac
--- old/gwenhywfar-5.1.2/configure.ac   2020-01-17 20:23:41.000000000 +0100
+++ new/gwenhywfar-5.2.0/configure.ac   2020-02-12 22:21:05.000000000 +0100
@@ -28,8 +28,8 @@
 # versions
 #
 GWENHYWFAR_VERSION_MAJOR=5
-GWENHYWFAR_VERSION_MINOR=1
-GWENHYWFAR_VERSION_PATCHLEVEL=2
+GWENHYWFAR_VERSION_MINOR=2
+GWENHYWFAR_VERSION_PATCHLEVEL=0
 GWENHYWFAR_VERSION_BUILD=0
 dnl "stable", "rcX", "betaX", "cvs"
 GWENHYWFAR_VERSION_TAG="stable"
@@ -40,9 +40,9 @@
 #
 # SO version for Gwenhywfar
 #
-GWENHYWFAR_SO_CURRENT="80"
-GWENHYWFAR_SO_AGE="1"
-GWENHYWFAR_SO_REVISION="2"
+GWENHYWFAR_SO_CURRENT="81"
+GWENHYWFAR_SO_AGE="2"
+GWENHYWFAR_SO_REVISION="0"
 GWENHYWFAR_SO_EFFECTIVE="`echo 
\$(($GWENHYWFAR_SO_CURRENT-$GWENHYWFAR_SO_AGE))`"
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/gui/cpp/Makefile.am 
new/gwenhywfar-5.2.0/gui/cpp/Makefile.am
--- old/gwenhywfar-5.1.2/gui/cpp/Makefile.am    2020-01-17 20:23:41.000000000 
+0100
+++ new/gwenhywfar-5.2.0/gui/cpp/Makefile.am    2020-02-12 22:21:05.000000000 
+0100
@@ -13,7 +13,8 @@
   cppwidget_p.hpp
 
 libgwengui_cpp_la_LIBADD=$(top_builddir)/src/$(gwenhywfar_internal_libname)
-libgwengui_cpp_la_LDFLAGS=-no-undefined
+libgwengui_cpp_la_LDFLAGS=-no-undefined -version-info \
+   $(GWENHYWFAR_SO_CURRENT):$(GWENHYWFAR_SO_REVISION):$(GWENHYWFAR_SO_AGE)
 
 libgwengui_cpp_la_SOURCES=\
   cppdialog.cpp \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/gui/fox16/Makefile.am 
new/gwenhywfar-5.2.0/gui/fox16/Makefile.am
--- old/gwenhywfar-5.1.2/gui/fox16/Makefile.am  2020-01-17 20:23:41.000000000 
+0100
+++ new/gwenhywfar-5.2.0/gui/fox16/Makefile.am  2020-02-12 22:21:05.000000000 
+0100
@@ -16,7 +16,8 @@
   fox16_htmlctx.hpp
 
 libgwengui_fox16_la_LIBADD=$(fox_libs) 
$(top_builddir)/src/$(gwenhywfar_internal_libname) 
$(top_builddir)/gui/cpp/libgwengui-cpp.la
-libgwengui_fox16_la_LDFLAGS=-no-undefined
+libgwengui_fox16_la_LDFLAGS=-no-undefined -version-info \
+   $(GWENHYWFAR_SO_CURRENT):$(GWENHYWFAR_SO_REVISION):$(GWENHYWFAR_SO_AGE)
 
 libgwengui_fox16_la_SOURCES=\
   fox16_gui.cpp \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/gui/gtk2/Makefile.am 
new/gwenhywfar-5.2.0/gui/gtk2/Makefile.am
--- old/gwenhywfar-5.1.2/gui/gtk2/Makefile.am   2020-01-17 20:23:41.000000000 
+0100
+++ new/gwenhywfar-5.2.0/gui/gtk2/Makefile.am   2020-02-12 22:21:05.000000000 
+0100
@@ -9,7 +9,8 @@
 
 
 libgwengui_gtk2_la_LIBADD=$(GTK2_LIBS) 
$(top_builddir)/src/$(gwenhywfar_internal_libname)
-libgwengui_gtk2_la_LDFLAGS = -no-undefined
+libgwengui_gtk2_la_LDFLAGS = -no-undefined -version-info \
+   $(GWENHYWFAR_SO_CURRENT):$(GWENHYWFAR_SO_REVISION):$(GWENHYWFAR_SO_AGE)
 
 noinst_HEADERS=\
   gtk2_gui_p.h \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/gui/gtk3/Makefile.am 
new/gwenhywfar-5.2.0/gui/gtk3/Makefile.am
--- old/gwenhywfar-5.1.2/gui/gtk3/Makefile.am   2020-01-17 20:23:41.000000000 
+0100
+++ new/gwenhywfar-5.2.0/gui/gtk3/Makefile.am   2020-02-12 22:21:05.000000000 
+0100
@@ -9,7 +9,8 @@
 
 
 libgwengui_gtk3_la_LIBADD=$(GTK3_LIBS) 
$(top_builddir)/src/$(gwenhywfar_internal_libname)
-libgwengui_gtk3_la_LDFLAGS = -no-undefined
+libgwengui_gtk3_la_LDFLAGS = -no-undefined -version-info \
+   $(GWENHYWFAR_SO_CURRENT):$(GWENHYWFAR_SO_REVISION):$(GWENHYWFAR_SO_AGE)
 
 noinst_HEADERS=\
   gtk3_gui_p.h \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/gui/qt4/Makefile.am 
new/gwenhywfar-5.2.0/gui/qt4/Makefile.am
--- old/gwenhywfar-5.1.2/gui/qt4/Makefile.am    2020-01-17 20:23:41.000000000 
+0100
+++ new/gwenhywfar-5.2.0/gui/qt4/Makefile.am    2020-02-12 22:21:05.000000000 
+0100
@@ -17,6 +17,9 @@
   qt4_gui_dialog.hpp
 
 libgwengui_qt4_la_LIBADD=$(qt4_libs) 
$(top_builddir)/src/$(gwenhywfar_internal_libname) 
$(builddir)/../cpp/libgwengui-cpp.la
+libgwengui_qt4_la_LDFLAGS=-no-undefined -version-info \
+   $(GWENHYWFAR_SO_CURRENT):$(GWENHYWFAR_SO_REVISION):$(GWENHYWFAR_SO_AGE)
+
 libgwengui_qt4_la_SOURCES=\
   qt4dialogbox.cpp \
   qt4_gui.cpp \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/gui/qt5/Makefile.am 
new/gwenhywfar-5.2.0/gui/qt5/Makefile.am
--- old/gwenhywfar-5.1.2/gui/qt5/Makefile.am    2020-01-17 20:23:41.000000000 
+0100
+++ new/gwenhywfar-5.2.0/gui/qt5/Makefile.am    2020-02-12 22:21:05.000000000 
+0100
@@ -16,7 +16,9 @@
 noinst_HEADERS=
 
 libgwengui_qt5_la_LIBADD=$(QT_LIBS) 
$(top_builddir)/src/$(gwenhywfar_internal_libname) 
$(builddir)/../cpp/libgwengui-cpp.la
-libgwengui_qt5_la_LDFLAGS=-no-undefined
+libgwengui_qt5_la_LDFLAGS=-no-undefined -version-info \
+   $(GWENHYWFAR_SO_CURRENT):$(GWENHYWFAR_SO_REVISION):$(GWENHYWFAR_SO_AGE)
+
 libgwengui_qt5_la_SOURCES=\
   qt5dialogbox.cpp \
   qt5_gui.cpp \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/src/base/Makefile.am 
new/gwenhywfar-5.2.0/src/base/Makefile.am
--- old/gwenhywfar-5.1.2/src/base/Makefile.am   2020-01-17 20:23:41.000000000 
+0100
+++ new/gwenhywfar-5.2.0/src/base/Makefile.am   2020-02-12 22:21:05.000000000 
+0100
@@ -26,8 +26,9 @@
 
 EXTRA_DIST=$(typefiles) \
   param_fns.c \
-  simpleptrlist-t.c \
-  idlist64-t.c
+  simpleptrlist-t.c simpleptrlist-t.h \
+  idlist64-t.c idlist64-t.h \
+  buffer-t.c buffer-t.h
 
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/src/base/buffer-t.c 
new/gwenhywfar-5.2.0/src/base/buffer-t.c
--- old/gwenhywfar-5.1.2/src/base/buffer-t.c    1970-01-01 01:00:00.000000000 
+0100
+++ new/gwenhywfar-5.2.0/src/base/buffer-t.c    2020-02-12 22:21:05.000000000 
+0100
@@ -0,0 +1,148 @@
+/***************************************************************************
+    begin       : Mon Feb 10 2020
+    copyright   : (C) 2020 by Martin Preuss
+    email       : [email protected]
+
+ ***************************************************************************
+ *                                                                         *
+ *   This library is free software; you can redistribute it and/or         *
+ *   modify it under the terms of the GNU Lesser General Public            *
+ *   License as published by the Free Software Foundation; either          *
+ *   version 2.1 of the License, or (at your option) any later version.    *
+ *                                                                         *
+ *   This library is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
+ *   Lesser General Public License for more details.                       *
+ *                                                                         *
+ *   You should have received a copy of the GNU Lesser General Public      *
+ *   License along with this library; if not, write to the Free Software   *
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
+ *   MA  02111-1307  USA                                                   *
+ *                                                                         *
+ ***************************************************************************/
+
+
+/* This file is included by "buffer.c" */
+
+
+#include <gwenhywfar/testframework.h>
+#include "buffer-t.h"
+
+
+#ifdef GWENHYWFAR_ENABLE_TESTCODE
+
+
+
+/* 
------------------------------------------------------------------------------------------------
+ * forward declarations
+ * 
------------------------------------------------------------------------------------------------
+ */
+
+static int GWENHYWFAR_CB test1(GWEN_TEST_MODULE *mod);
+static int GWENHYWFAR_CB test2(GWEN_TEST_MODULE *mod);
+
+
+
+
+
+/* 
------------------------------------------------------------------------------------------------
+ * implementations
+ * 
------------------------------------------------------------------------------------------------
+ */
+
+
+int GWEN_Buffer_AddTests(GWEN_TEST_MODULE *mod)
+{
+  GWEN_TEST_MODULE *newMod;
+
+  newMod=GWEN_Test_Module_AddModule(mod, "GWEN_Buffer", NULL);
+
+  GWEN_Test_Module_AddTest(newMod, "append args (simple)", test1, NULL);
+  GWEN_Test_Module_AddTest(newMod, "append args (long string)", test2, NULL);
+
+  return 0;
+}
+
+
+
+int test1(GWEN_UNUSED GWEN_TEST_MODULE *mod)
+{
+  GWEN_BUFFER *buf;
+  int rv;
+
+  buf=GWEN_Buffer_new(0, 16, 0, 1);
+  rv=GWEN_Buffer_AppendArgs(buf, "%s-%d", "TESTSTRING", 1234);
+  if (rv<0) {
+    DBG_ERROR(GWEN_LOGDOMAIN, "Could not append args");
+    GWEN_Buffer_free(buf);
+    return GWEN_ERROR_GENERIC;
+  }
+
+  if (strcmp(GWEN_Buffer_GetStart(buf), "TESTSTRING-1234")!=0) {
+    DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected string in buffer (%s)", 
GWEN_Buffer_GetStart(buf));
+    GWEN_Buffer_free(buf);
+    return GWEN_ERROR_GENERIC;
+  }
+  GWEN_Buffer_free(buf);
+
+  return 0;
+}
+
+
+
+int test2(GWEN_UNUSED GWEN_TEST_MODULE *mod)
+{
+  GWEN_BUFFER *buf;
+  int rv;
+  static const char *testString=
+    "0123456789"
+    "0123456789"
+    "0123456789"
+    "0123456789"
+    "0123456789"
+    "0123456789"
+    "0123456789"
+    "0123456789"
+    "0123456789"
+    "0123456789"
+    "0123456789"
+    "0123456789"
+    "0123456789"
+    "0123456789";
+
+  buf=GWEN_Buffer_new(0, 16, 0, 1);
+  rv=GWEN_Buffer_AppendArgs(buf, "%s", testString);
+  if (rv<0) {
+    DBG_ERROR(GWEN_LOGDOMAIN, "Could not append args");
+    GWEN_Buffer_free(buf);
+    return GWEN_ERROR_GENERIC;
+  }
+
+  if (strcmp(GWEN_Buffer_GetStart(buf), testString)!=0) {
+    DBG_ERROR(GWEN_LOGDOMAIN, "Unexpected string in buffer (%s)", 
GWEN_Buffer_GetStart(buf));
+    GWEN_Buffer_free(buf);
+    return GWEN_ERROR_GENERIC;
+  }
+  GWEN_Buffer_free(buf);
+
+  return 0;
+}
+
+
+
+
+
+
+
+#else
+
+int GWEN_Buffer_AddTests(GWEN_TEST_MODULE *mod)
+{
+  DBG_ERROR(GWEN_LOGDOMAIN, "Gwenhywfar was compiled without test code 
enabled.");
+  return GWEN_ERROR_GENERIC;
+}
+
+
+#endif
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/src/base/buffer-t.h 
new/gwenhywfar-5.2.0/src/base/buffer-t.h
--- old/gwenhywfar-5.1.2/src/base/buffer-t.h    1970-01-01 01:00:00.000000000 
+0100
+++ new/gwenhywfar-5.2.0/src/base/buffer-t.h    2020-02-12 22:21:05.000000000 
+0100
@@ -0,0 +1,47 @@
+/***************************************************************************
+    begin       : Fri Sep 12 2003
+    copyright   : (C) 2020 by Martin Preuss
+    email       : [email protected]
+
+ ***************************************************************************
+ *                                                                         *
+ *   This library is free software; you can redistribute it and/or         *
+ *   modify it under the terms of the GNU Lesser General Public            *
+ *   License as published by the Free Software Foundation; either          *
+ *   version 2.1 of the License, or (at your option) any later version.    *
+ *                                                                         *
+ *   This library is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
+ *   Lesser General Public License for more details.                       *
+ *                                                                         *
+ *   You should have received a copy of the GNU Lesser General Public      *
+ *   License along with this library; if not, write to the Free Software   *
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
+ *   MA  02111-1307  USA                                                   *
+ *                                                                         *
+ ***************************************************************************/
+
+
+#ifndef GWENHYWFAR_BUFFER_T_H
+#define GWENHYWFAR_BUFFER_T_H
+
+
+#include <gwenhywfar/gwenhywfarapi.h>
+#include <gwenhywfar/testframework.h>
+
+/**
+ * Internal tests for GWEN_BUFFER.
+ */
+GWENHYWFAR_API int GWEN_Buffer_AddTests(GWEN_TEST_MODULE *mod);
+
+
+/*@}*/
+
+#endif
+
+
+
+
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/src/base/buffer.c 
new/gwenhywfar-5.2.0/src/base/buffer.c
--- old/gwenhywfar-5.1.2/src/base/buffer.c      2020-01-17 20:23:41.000000000 
+0100
+++ new/gwenhywfar-5.2.0/src/base/buffer.c      2020-02-12 22:21:05.000000000 
+0100
@@ -34,6 +34,10 @@
 #include <gwenhywfar/debug.h>
 #include <gwenhywfar/text.h>
 
+#include <stdarg.h>
+#include <stdio.h>
+
+
 
 GWEN_BUFFER *GWEN_Buffer_new(char *buffer,
                              uint32_t size,
@@ -1077,4 +1081,51 @@
 
 
 
+int GWEN_Buffer_AppendArgs(GWEN_BUFFER *bf, const char *fmt, ...)
+{
+
+  va_list list;
+  char *p;
+  int maxUnsegmentedWrite;
+  int rv;
+
+  GWEN_Buffer_AllocRoom(bf, 256);
+
+  maxUnsegmentedWrite=GWEN_Buffer_GetMaxUnsegmentedWrite(bf);
+  p=GWEN_Buffer_GetStart(bf)+GWEN_Buffer_GetPos(bf);
+
+  /* prepare list for va_arg */
+  va_start(list, fmt);
+  rv=vsnprintf(p, maxUnsegmentedWrite, fmt, list);
+  if (rv<0) {
+    DBG_ERROR(GWEN_LOGDOMAIN, "Error on vnsprintf (%d)", rv);
+    va_end(list);
+    return GWEN_ERROR_GENERIC;
+  }
+  else if (rv>=maxUnsegmentedWrite) {
+    GWEN_Buffer_AllocRoom(bf, rv+1);
+    maxUnsegmentedWrite=GWEN_Buffer_GetMaxUnsegmentedWrite(bf);
+    p=GWEN_Buffer_GetStart(bf)+GWEN_Buffer_GetPos(bf);
+    rv=vsnprintf(p, maxUnsegmentedWrite, fmt, list);
+    if (rv<0) {
+      DBG_ERROR(GWEN_LOGDOMAIN, "Error on vnsprintf (%d)", rv);
+      va_end(list);
+      return GWEN_ERROR_GENERIC;
+    }
+  }
+  if (rv>0) {
+    GWEN_Buffer_IncrementPos(bf, rv);
+    GWEN_Buffer_AdjustUsedBytes(bf);
+  }
+  va_end(list);
+
+  return 0;
+}
+
+
+
+#include "buffer-t.c"
+
+
+
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/src/base/buffer.h 
new/gwenhywfar-5.2.0/src/base/buffer.h
--- old/gwenhywfar-5.1.2/src/base/buffer.h      2020-01-17 20:23:41.000000000 
+0100
+++ new/gwenhywfar-5.2.0/src/base/buffer.h      2020-02-12 22:21:05.000000000 
+0100
@@ -272,6 +272,17 @@
                             const char *buffer,
                             uint32_t size);
 
+/**
+ * Append strings to buffer with a sprintf()-like argument list.
+ *
+ * @return 0 if okay, error code otherwise
+ * @param bf buffer to append data to
+ * @param fmt format string like that for sprintf().
+ */
+GWENHYWFAR_API
+int GWEN_Buffer_AppendArgs(GWEN_BUFFER *bf, const char *fmt, ...);
+
+
 GWENHYWFAR_API
 int GWEN_Buffer_FillWithBytes(GWEN_BUFFER *bf,
                               unsigned char c,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/src/base/idlist64-t.c 
new/gwenhywfar-5.2.0/src/base/idlist64-t.c
--- old/gwenhywfar-5.1.2/src/base/idlist64-t.c  2020-01-17 20:23:41.000000000 
+0100
+++ new/gwenhywfar-5.2.0/src/base/idlist64-t.c  2020-02-12 22:21:05.000000000 
+0100
@@ -25,8 +25,10 @@
 
 /* This file is included by "idlist64.c" */
 
+#include "idlist64-t.h"
 
-#if GWENHYWFAR_ENABLE_TESTCODE
+
+#ifdef GWENHYWFAR_ENABLE_TESTCODE
 
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/src/base/idlist64-t.h 
new/gwenhywfar-5.2.0/src/base/idlist64-t.h
--- old/gwenhywfar-5.1.2/src/base/idlist64-t.h  1970-01-01 01:00:00.000000000 
+0100
+++ new/gwenhywfar-5.2.0/src/base/idlist64-t.h  2020-02-12 22:21:05.000000000 
+0100
@@ -0,0 +1,47 @@
+/***************************************************************************
+    begin       : Mon Mar 01 2004
+    copyright   : (C) 2020 by Martin Preuss
+    email       : [email protected]
+
+ ***************************************************************************
+ *                                                                         *
+ *   This library is free software; you can redistribute it and/or         *
+ *   modify it under the terms of the GNU Lesser General Public            *
+ *   License as published by the Free Software Foundation; either          *
+ *   version 2.1 of the License, or (at your option) any later version.    *
+ *                                                                         *
+ *   This library is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
+ *   Lesser General Public License for more details.                       *
+ *                                                                         *
+ *   You should have received a copy of the GNU Lesser General Public      *
+ *   License along with this library; if not, write to the Free Software   *
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
+ *   MA  02111-1307  USA                                                   *
+ *                                                                         *
+ ***************************************************************************/
+
+
+#ifndef GWENHYWFAR_IDLIST64_T_H
+#define GWENHYWFAR_IDLIST64_T_H
+
+
+#include <gwenhywfar/gwenhywfarapi.h>
+#include <gwenhywfar/testframework.h>
+
+/**
+ * Internal tests for GWEN_IDLIST64.
+ */
+GWENHYWFAR_API int GWEN_IdList64_AddTests(GWEN_TEST_MODULE *mod);
+
+
+/*@}*/
+
+#endif
+
+
+
+
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/src/base/idlist64.h 
new/gwenhywfar-5.2.0/src/base/idlist64.h
--- old/gwenhywfar-5.1.2/src/base/idlist64.h    2020-01-17 20:23:41.000000000 
+0100
+++ new/gwenhywfar-5.2.0/src/base/idlist64.h    2020-02-12 22:21:05.000000000 
+0100
@@ -34,7 +34,6 @@
 #include <gwenhywfar/gwenhywfarapi.h>
 #include <gwenhywfar/types.h>
 #include <gwenhywfar/simpleptrlist.h>
-#include <gwenhywfar/testframework.h>
 
 
 #ifdef __cplusplus
@@ -107,9 +106,6 @@
 GWENHYWFAR_API int GWEN_IdList64_ReverseSort(GWEN_IDLIST64 *idl);
 
 
-GWENHYWFAR_API int GWEN_IdList64_AddTests(GWEN_TEST_MODULE *mod);
-
-
 /*@}*/
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/src/base/multicache.c 
new/gwenhywfar-5.2.0/src/base/multicache.c
--- old/gwenhywfar-5.1.2/src/base/multicache.c  2020-01-17 20:23:41.000000000 
+0100
+++ new/gwenhywfar-5.2.0/src/base/multicache.c  2020-02-12 22:21:05.000000000 
+0100
@@ -472,6 +472,37 @@
 
 
 
+GWEN_IDLIST64 *GWEN_MultiCache_Type_GetIdsInCache(const GWEN_MULTICACHE_TYPE 
*ct)
+{
+  GWEN_IDLIST64 *idList;
+  GWEN_MULTICACHE_ENTRY *ce;
+
+  assert(ct);
+  assert(ct->_refCount);
+
+  idList=GWEN_IdList64_new();
+
+  ce=GWEN_MultiCache_Entry_List_First(ct->multiCache->entryList);
+  while (ce) {
+    GWEN_MULTICACHE_ENTRY *ceNext;
+
+    ceNext=GWEN_MultiCache_Entry_List_Next(ce);
+    if (GWEN_MultiCache_Entry_GetCacheType(ce)==ct) {
+      GWEN_IdList64_AddId(idList, ce->id);
+    }
+    ce=ceNext;
+  }
+
+  if (GWEN_IdList64_GetEntryCount(idList)<1) {
+    GWEN_IdList64_free(idList);
+    return NULL;
+  }
+
+  return idList;
+}
+
+
+
 
 
 
@@ -532,6 +563,42 @@
 }
 
 
+
+int GWEN_MultiCache_GetUsageString(const GWEN_MULTICACHE *mc, char *ptrBuffer, 
int lenBuffer)
+{
+  size_t len;
+  uint64_t totalCacheOps;
+  int hitPercentage=0;
+
+  totalCacheOps=mc->cacheHits+mc->cacheMisses;
+  if (totalCacheOps)
+    hitPercentage=((mc->cacheHits)*100)/totalCacheOps;
+
+  len=snprintf(ptrBuffer, lenBuffer,
+               "MultiCache usage: "
+               "%" PRIu64 " hits (%d %%), "
+               "%" PRIu64 " misses, "
+               "%" PRIu64 " drops, "
+               "%" PRIu64 " mb max memory used from "
+               "%" PRIu64 " mb "
+               "(%d %%)",
+               (uint64_t) mc->cacheHits,
+               hitPercentage,
+               (uint64_t) mc->cacheMisses,
+               (uint64_t) mc->cacheDrops,
+               (uint64_t)((mc->maxSizeUsed)/(1024*1024)),
+               (uint64_t)((mc->maxSize)/(1024*1024)),
+               (int)((mc->maxSizeUsed)*100.0/mc->maxSize));
+  if (len>=(size_t)lenBuffer) {
+    DBG_ERROR(GWEN_LOGDOMAIN, "Buffer too small (%" PRIu64 " < %" PRIu64,
+              (uint64_t) lenBuffer, (uint64_t) len);
+    return GWEN_ERROR_BUFFER_OVERFLOW;
+  }
+  ptrBuffer[len]=0;
+  return 0;
+}
+
+
 
 uint64_t GWEN_MultiCache_GetMaxSizeUsed(const GWEN_MULTICACHE *mc)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/src/base/multicache.h 
new/gwenhywfar-5.2.0/src/base/multicache.h
--- old/gwenhywfar-5.1.2/src/base/multicache.h  2020-01-17 20:23:41.000000000 
+0100
+++ new/gwenhywfar-5.2.0/src/base/multicache.h  2020-02-12 22:21:05.000000000 
+0100
@@ -1,6 +1,6 @@
 /***************************************************************************
     begin       : Wed May 08 2013
-    copyright   : (C) 2013 by Martin Preuss
+    copyright   : (C) 2020 by Martin Preuss
     email       : [email protected]
 
  ***************************************************************************
@@ -29,6 +29,7 @@
 
 #include <gwenhywfar/list1.h>
 #include <gwenhywfar/misc.h>
+#include <gwenhywfar/idlist64.h>
 
 
 #ifdef __cplusplus
@@ -101,6 +102,9 @@
 GWENHYWFAR_API void GWEN_MultiCache_Type_PurgeAll(GWEN_MULTICACHE_TYPE *ct);
 
 
+GWENHYWFAR_API GWEN_IDLIST64 *GWEN_MultiCache_Type_GetIdsInCache(const 
GWEN_MULTICACHE_TYPE *ct);
+
+
 GWENHYWFAR_API void GWEN_MultiCache_Type_SetAttachFn(GWEN_MULTICACHE_TYPE *ct, 
GWEN_MULTICACHE_TYPE_ATTACH_FN fn);
 
 GWENHYWFAR_API void GWEN_MultiCache_Type_SetFreeFn(GWEN_MULTICACHE_TYPE *ct, 
GWEN_MULTICACHE_TYPE_FREE_FN fn);
@@ -128,6 +132,8 @@
 
 GWENHYWFAR_API uint64_t GWEN_MultiCache_GetMaxSizeUsed(const GWEN_MULTICACHE 
*mc);
 
+GWENHYWFAR_API int GWEN_MultiCache_GetUsageString(const GWEN_MULTICACHE *mc, 
char *ptrBuffer, int lenBuffer);
+
 /*@}*/
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/src/base/simpleptrlist-t.c 
new/gwenhywfar-5.2.0/src/base/simpleptrlist-t.c
--- old/gwenhywfar-5.1.2/src/base/simpleptrlist-t.c     2020-01-17 
20:23:41.000000000 +0100
+++ new/gwenhywfar-5.2.0/src/base/simpleptrlist-t.c     2020-02-12 
22:21:05.000000000 +0100
@@ -26,7 +26,11 @@
 /* This file is included by "simpleptrlist.c" */
 
 
-#if GWENHYWFAR_ENABLE_TESTCODE
+#include <gwenhywfar/testframework.h>
+#include "simpleptrlist-t.h"
+
+
+#ifdef GWENHYWFAR_ENABLE_TESTCODE
 
 
 #include <gwenhywfar/mdigest.h>
@@ -34,6 +38,7 @@
 
 
 
+
 /* 
------------------------------------------------------------------------------------------------
  * type definitions
  * 
------------------------------------------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/src/base/simpleptrlist-t.h 
new/gwenhywfar-5.2.0/src/base/simpleptrlist-t.h
--- old/gwenhywfar-5.1.2/src/base/simpleptrlist-t.h     1970-01-01 
01:00:00.000000000 +0100
+++ new/gwenhywfar-5.2.0/src/base/simpleptrlist-t.h     2020-02-12 
22:21:05.000000000 +0100
@@ -0,0 +1,47 @@
+/***************************************************************************
+    begin       : Fri Dec 06 2019
+    copyright   : (C) 2020 by Martin Preuss
+    email       : [email protected]
+
+ ***************************************************************************
+ *                                                                         *
+ *   This library is free software; you can redistribute it and/or         *
+ *   modify it under the terms of the GNU Lesser General Public            *
+ *   License as published by the Free Software Foundation; either          *
+ *   version 2.1 of the License, or (at your option) any later version.    *
+ *                                                                         *
+ *   This library is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
+ *   Lesser General Public License for more details.                       *
+ *                                                                         *
+ *   You should have received a copy of the GNU Lesser General Public      *
+ *   License along with this library; if not, write to the Free Software   *
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
+ *   MA  02111-1307  USA                                                   *
+ *                                                                         *
+ ***************************************************************************/
+
+
+#ifndef GWENHYWFAR_SIMPLEPTRLIST_T_H
+#define GWENHYWFAR_SIMPLEPTRLIST_T_H
+
+
+#include <gwenhywfar/gwenhywfarapi.h>
+#include <gwenhywfar/testframework.h>
+
+/**
+ * Internal tests for GWEN_SIMPLEPTRLIST.
+ */
+GWENHYWFAR_API int GWEN_SimplePtrList_AddTests(GWEN_TEST_MODULE *mod);
+
+
+/*@}*/
+
+#endif
+
+
+
+
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/src/base/simpleptrlist.h 
new/gwenhywfar-5.2.0/src/base/simpleptrlist.h
--- old/gwenhywfar-5.1.2/src/base/simpleptrlist.h       2020-01-17 
20:23:41.000000000 +0100
+++ new/gwenhywfar-5.2.0/src/base/simpleptrlist.h       2020-02-12 
22:21:05.000000000 +0100
@@ -27,7 +27,6 @@
 
 #include <gwenhywfar/types.h>
 #include <gwenhywfar/inherit.h>
-#include <gwenhywfar/testframework.h>
 
 
 
@@ -100,8 +99,5 @@
 GWENHYWFAR_API int GWEN_SimplePtrList_DecUserCounter(GWEN_SIMPLEPTRLIST *pl);
 
 
-GWENHYWFAR_API int GWEN_SimplePtrList_AddTests(GWEN_TEST_MODULE *mod);
-
-
 #endif /* GWENHYWFAR_SIMPLEPTRLIST_P_H */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/src/parser/db.c 
new/gwenhywfar-5.2.0/src/parser/db.c
--- old/gwenhywfar-5.1.2/src/parser/db.c        2020-01-17 20:23:41.000000000 
+0100
+++ new/gwenhywfar-5.2.0/src/parser/db.c        2020-02-12 22:21:05.000000000 
+0100
@@ -1988,7 +1988,7 @@
   assert(db);
 
   /*valType=GWEN_DB_GetVariableType(db, name);*/
-  DBG_ERROR(0, "Get value for %s[%i]", name, index);
+  DBG_DEBUG(GWEN_LOGDOMAIN, "Get value for %s[%i]", name, index);
   valType=GWEN_DB_GetValueTypeByPath(db, name, index);
   switch (valType) { /* GWEN_DB_GetVariableType */
   case GWEN_DB_NodeType_ValueInt:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/test/.gitignore 
new/gwenhywfar-5.2.0/test/.gitignore
--- old/gwenhywfar-5.1.2/test/.gitignore        2020-01-17 20:23:41.000000000 
+0100
+++ new/gwenhywfar-5.2.0/test/.gitignore        2020-02-12 22:21:05.000000000 
+0100
@@ -3,3 +3,4 @@
 testcert.pem
 testkey.pem
 xml.out
+test.log
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-5.1.2/test/gwentest.c 
new/gwenhywfar-5.2.0/test/gwentest.c
--- old/gwenhywfar-5.1.2/test/gwentest.c        2020-01-17 20:23:41.000000000 
+0100
+++ new/gwenhywfar-5.2.0/test/gwentest.c        2020-02-12 22:21:05.000000000 
+0100
@@ -91,6 +91,10 @@
 #include <gwenhywfar/parser_xml.h>
 #endif
 
+#include "buffer-t.h"
+#include "simpleptrlist-t.h"
+#include "idlist64-t.h"
+
 
 #include <sys/types.h>
 #ifdef HAVE_ARPA_INET_H
@@ -5821,6 +5825,12 @@
   if (rv<0) {
     fprintf(stderr, "Adding module failed.\n");
     return 2;
+  }
+
+  rv=GWEN_Buffer_AddTests(TestFramework_GetModulesRoot(tf));
+  if (rv<0) {
+    fprintf(stderr, "Adding module failed.\n");
+    return 2;
   }
 
   argc--;


Reply via email to