Hello community,

here is the log from the commit of package gwenhywfar for openSUSE:Factory 
checked in at 2013-11-01 17:41:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gwenhywfar (Old)
 and      /work/SRC/openSUSE:Factory/.gwenhywfar.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gwenhywfar"

Changes:
--------
--- /work/SRC/openSUSE:Factory/gwenhywfar/gwenhywfar.changes    2013-09-02 
16:49:26.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.gwenhywfar.new/gwenhywfar.changes       
2013-11-01 17:41:35.000000000 +0100
@@ -1,0 +2,9 @@
+Wed Oct 23 14:42:06 UTC 2013 - [email protected]
+
+- Update to version 4.8.0beta:
+  + new functions to work with dates (module GWEN_DATE,
+    e.g.  GWEN_Date_GetLastHalfYearStart())
+  + fix some errors in the layout of the  FOX 1.6 GUI module.
+  + some improvements in typemaker2. 
+
+-------------------------------------------------------------------

Old:
----
  gwenhywfar-4.7.0beta.tar.gz

New:
----
  gwenhywfar-4.8.0beta.tar.gz

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

Other differences:
------------------
++++++ gwenhywfar.spec ++++++
--- /var/tmp/diff_new_pack.LXT4h3/_old  2013-11-01 17:41:36.000000000 +0100
+++ /var/tmp/diff_new_pack.LXT4h3/_new  2013-11-01 17:41:36.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           gwenhywfar
-Version:        4.7.0beta
+Version:        4.8.0beta
 Release:        0
 Summary:        Multiplatform Helper Library for Other Libraries
 License:        GPL-2.0+ and LGPL-2.1+

++++++ gwenhywfar-4.7.0beta.tar.gz -> gwenhywfar-4.8.0beta.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-4.7.0beta/ChangeLog 
new/gwenhywfar-4.8.0beta/ChangeLog
--- old/gwenhywfar-4.7.0beta/ChangeLog  2013-08-21 18:14:08.000000000 +0200
+++ new/gwenhywfar-4.8.0beta/ChangeLog  2013-10-22 20:24:13.000000000 +0200
@@ -1,4 +1,53 @@
 ------------------------------------------------------------------
+2013-10-22 20:24:06 +0200 Martin Preuss
+Prepared release 4.8.0beta.
+
+------------------------------------------------------------------
+2013-10-22 20:20:59 +0200 Martin Preuss
+Fixed typos.
+
+------------------------------------------------------------------
+2013-10-04 21:12:34 +0000 martin
+Filled gwen_bindata.tm2 with life.
+git-svn-id: https://devel.aqbanking.de/svn/gwenhywfar/trunk@2251 
70169cfe-8b10-0410-8925-dcb4b91034d8
+
+------------------------------------------------------------------
+2013-09-29 16:57:41 +0000 martin
+Added function GWEN_StringList2_GetStringAt().
+git-svn-id: https://devel.aqbanking.de/svn/gwenhywfar/trunk@2250 
70169cfe-8b10-0410-8925-dcb4b91034d8
+
+------------------------------------------------------------------
+2013-09-21 23:46:07 +0000 martin
+Added some convenience functions to GWEN_DATE module.
+git-svn-id: https://devel.aqbanking.de/svn/gwenhywfar/trunk@2249 
70169cfe-8b10-0410-8925-dcb4b91034d8
+
+------------------------------------------------------------------
+2013-09-21 15:56:29 +0000 martin
+Fixed typemaker2 bindings for GWEN_STRINGLIST2.
+git-svn-id: https://devel.aqbanking.de/svn/gwenhywfar/trunk@2248 
70169cfe-8b10-0410-8925-dcb4b91034d8
+
+------------------------------------------------------------------
+2013-09-21 15:41:17 +0000 martin
+Make GWEN_StringList2 available to typemaker2.
+git-svn-id: https://devel.aqbanking.de/svn/gwenhywfar/trunk@2247 
70169cfe-8b10-0410-8925-dcb4b91034d8
+
+------------------------------------------------------------------
+2013-08-23 11:29:03 +0000 martin
+Incremented version.
+git-svn-id: https://devel.aqbanking.de/svn/gwenhywfar/trunk@2246 
70169cfe-8b10-0410-8925-dcb4b91034d8
+
+------------------------------------------------------------------
+2013-08-23 11:27:45 +0000 martin
+FOX16-GUI: Fixed some layout issues.
+FOX-Dialogs should now resize themselves to reasonable sizes, unless the
+dimensions are read from a configuration.
+
+FOX16_HtmlLabel now determines its size only once per text, if no special
+flags are given. This makes the behaviour more predictable.
+
+git-svn-id: https://devel.aqbanking.de/svn/gwenhywfar/trunk@2245 
70169cfe-8b10-0410-8925-dcb4b91034d8
+
+------------------------------------------------------------------
 2013-08-21 15:44:54 +0000 martin
 Prepared release 3.7.0beta.
 git-svn-id: https://devel.aqbanking.de/svn/gwenhywfar/trunk@2244 
70169cfe-8b10-0410-8925-dcb4b91034d8
@@ -573,65 +622,3 @@
 2012-11-27 18:33:21 +0000 martin
 Added an example for virtual functions.
 git-svn-id: https://devel.aqbanking.de/svn/gwenhywfar/trunk@2154 
70169cfe-8b10-0410-8925-dcb4b91034d8
-
-------------------------------------------------------------------
-2012-10-30 10:02:53 +0000 christian
-Fix mismatch of "static" attribute at declaration and definition of function.
-However, both "static" and also the GWENHYWFAR_CB macro is not yet
-used consistently in all places and might need further fixing
-to get rid of all "incompatible pointer type" compiler warnings.
-
-git-svn-id: https://devel.aqbanking.de/svn/gwenhywfar/trunk@2153 
70169cfe-8b10-0410-8925-dcb4b91034d8
-
-------------------------------------------------------------------
-2012-05-24 20:56:52 +0000 martin
-Typemaker2: Added handling for code documentation.
-Not finished, yet. But the code should now read the api doc from a typemaker2
-XML file. The next step will be to include the API documentation in the
-destination header files.
-
-git-svn-id: https://devel.aqbanking.de/svn/gwenhywfar/trunk@2152 
70169cfe-8b10-0410-8925-dcb4b91034d8
-
-------------------------------------------------------------------
-2012-05-23 21:00:34 +0000 martin
-Adapted console GUI implementation to allow for changing the total amount of a 
progress bar.
-The HTTP network code call GWEN_Gui_ProgressSetTotal() as soon as it knows
-how much data is to be transfered. This should also be reflected in the
-console GUI implementation. Now it is.
-
-git-svn-id: https://devel.aqbanking.de/svn/gwenhywfar/trunk@2151 
70169cfe-8b10-0410-8925-dcb4b91034d8
-
-------------------------------------------------------------------
-2012-05-21 20:04:49 +0000 martin
-Incremented BUILD version.
-git-svn-id: https://devel.aqbanking.de/svn/gwenhywfar/trunk@2150 
70169cfe-8b10-0410-8925-dcb4b91034d8
-
-------------------------------------------------------------------
-2012-05-21 20:04:46 +0000 martin
-Improved debug messages.
-git-svn-id: https://devel.aqbanking.de/svn/gwenhywfar/trunk@2149 
70169cfe-8b10-0410-8925-dcb4b91034d8
-
-------------------------------------------------------------------
-2012-05-20 21:12:55 +0000 martin
-Incremented BUILD version.
-git-svn-id: https://devel.aqbanking.de/svn/gwenhywfar/trunk@2148 
70169cfe-8b10-0410-8925-dcb4b91034d8
-
-------------------------------------------------------------------
-2012-05-20 21:12:50 +0000 martin
-HTML: Added handling of H4 titles.
-git-svn-id: https://devel.aqbanking.de/svn/gwenhywfar/trunk@2147 
70169cfe-8b10-0410-8925-dcb4b91034d8
-
-------------------------------------------------------------------
-2012-05-10 21:32:57 +0000 mlenk
-Fix another build failure with GCC 4.7
-... similar to commit r2133.
-
-
-git-svn-id: https://devel.aqbanking.de/svn/gwenhywfar/trunk@2146 
70169cfe-8b10-0410-8925-dcb4b91034d8
-
-------------------------------------------------------------------
-2012-05-08 22:54:40 +0000 martin
-Fixed a typo.
-Getting the public key of a certificate works now.
-
-git-svn-id: https://devel.aqbanking.de/svn/gwenhywfar/trunk@2145 
70169cfe-8b10-0410-8925-dcb4b91034d8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-4.7.0beta/configure 
new/gwenhywfar-4.8.0beta/configure
--- old/gwenhywfar-4.7.0beta/configure  2013-08-21 17:43:29.000000000 +0200
+++ new/gwenhywfar-4.8.0beta/configure  2013-10-22 20:22:05.000000000 +0200
@@ -2763,7 +2763,7 @@
 # versions
 #
 GWENHYWFAR_VERSION_MAJOR=4
-GWENHYWFAR_VERSION_MINOR=7
+GWENHYWFAR_VERSION_MINOR=8
 GWENHYWFAR_VERSION_PATCHLEVEL=0
 GWENHYWFAR_VERSION_BUILD=0
 GWENHYWFAR_VERSION_TAG="beta"
@@ -2774,8 +2774,8 @@
 #
 # SO version for Gwenhywfar
 #
-GWENHYWFAR_SO_CURRENT="67"
-GWENHYWFAR_SO_AGE="7"
+GWENHYWFAR_SO_CURRENT="68"
+GWENHYWFAR_SO_AGE="8"
 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-4.7.0beta/configure.ac 
new/gwenhywfar-4.8.0beta/configure.ac
--- old/gwenhywfar-4.7.0beta/configure.ac       2013-08-21 17:43:15.000000000 
+0200
+++ new/gwenhywfar-4.8.0beta/configure.ac       2013-10-22 20:21:51.000000000 
+0200
@@ -28,7 +28,7 @@
 # versions
 #
 GWENHYWFAR_VERSION_MAJOR=4
-GWENHYWFAR_VERSION_MINOR=7
+GWENHYWFAR_VERSION_MINOR=8
 GWENHYWFAR_VERSION_PATCHLEVEL=0
 GWENHYWFAR_VERSION_BUILD=0
 dnl "stable", "rcX", "betaX", "cvs"
@@ -40,8 +40,8 @@
 #
 # SO version for Gwenhywfar
 #
-GWENHYWFAR_SO_CURRENT="67"
-GWENHYWFAR_SO_AGE="7"
+GWENHYWFAR_SO_CURRENT="68"
+GWENHYWFAR_SO_AGE="8"
 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-4.7.0beta/gui/fox16/fox16_gui_dialog.cpp 
new/gwenhywfar-4.8.0beta/gui/fox16/fox16_gui_dialog.cpp
--- old/gwenhywfar-4.7.0beta/gui/fox16/fox16_gui_dialog.cpp     2013-08-05 
22:53:58.000000000 +0200
+++ new/gwenhywfar-4.8.0beta/gui/fox16/fox16_gui_dialog.cpp     2013-08-23 
13:25:09.000000000 +0200
@@ -58,6 +58,7 @@
 ,_widgetCount(0)
 ,_mainWidget(NULL)
 ,m_iconSource(NULL)
+,m_sizeChanged(FALSE)
 {
 }
 
@@ -70,6 +71,7 @@
 ,_widgetCount(0)
 ,_mainWidget(NULL)
 ,m_iconSource(NULL)
+,m_sizeChanged(FALSE)
 {
 }
 
@@ -500,10 +502,12 @@
     case GWEN_DialogProperty_Width:
       f->recalc();
       f->resize(value, f->getHeight());
+      m_sizeChanged=TRUE;
       return 0;
     case GWEN_DialogProperty_Height:
       f->recalc();
       f->resize(f->getWidth(), value);
+      m_sizeChanged=TRUE;
       return 0;
     case GWEN_DialogProperty_Enabled:
       if (value==0)
@@ -1914,12 +1918,16 @@
   /* create X11 server side resources */
   xw->create();
 
+  m_sizeChanged=FALSE;
   rv=GWEN_Dialog_EmitSignalToAll(_dialog, GWEN_DialogEvent_TypeInit, "");
   if (rv<0) {
     DBG_INFO(0, "Error initializing dialog: %d", rv);
     return false;
   }
-
+  if (!m_sizeChanged) {
+    DBG_ERROR(0, "Resizing dialog myself");
+    xw->resize(xw->getDefaultWidth(), xw->getDefaultHeight());
+  }
   xw->layout();
 
   return true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gwenhywfar-4.7.0beta/gui/fox16/fox16_gui_dialog_l.hpp 
new/gwenhywfar-4.8.0beta/gui/fox16/fox16_gui_dialog_l.hpp
--- old/gwenhywfar-4.7.0beta/gui/fox16/fox16_gui_dialog_l.hpp   2012-12-30 
19:58:03.000000000 +0100
+++ new/gwenhywfar-4.8.0beta/gui/fox16/fox16_gui_dialog_l.hpp   2013-08-23 
12:55:06.000000000 +0200
@@ -97,6 +97,7 @@
   FXIconSource *m_iconSource;
   std::list<FXIcon*> m_iconList;
   std::list<RadioButtonGroup*> m_radioGroups;
+  bool m_sizeChanged;
 
   FOX16_GuiDialog();
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-4.7.0beta/gui/fox16/fox16_htmllabel.cpp 
new/gwenhywfar-4.8.0beta/gui/fox16/fox16_htmllabel.cpp
--- old/gwenhywfar-4.7.0beta/gui/fox16/fox16_htmllabel.cpp      2010-08-28 
13:44:13.000000000 +0200
+++ new/gwenhywfar-4.8.0beta/gui/fox16/fox16_htmllabel.cpp      2013-08-23 
13:24:07.000000000 +0200
@@ -46,7 +46,7 @@
 :FXFrame(p, opts, x, y, w, h, pl, pr, pt, pb)
 ,m_htmlCtx(NULL)
 ,m_minWidth(0)
-,m_maxDefaultWidth(MAX_DEFAULT_WIDTH)
+,m_maxDefaultWidth(-1)
 ,m_haveDefaultDims(false)
 ,m_mediaPaths(NULL)
 ,m_icon(NULL)
@@ -111,18 +111,14 @@
 void FOX16_HtmlLabel::calcDefaultDims() {
 #if 0
   int w;
-  int wNeeded;
 
-  m_htmlCtx->layout(-1, -1);
-  wNeeded=m_htmlCtx->getWidth();
-  w=wNeeded;
-  if (w>m_maxDefaultWidth)
-    w=m_maxDefaultWidth;
-  if (w<width)
+  if (options & FLAGS_NO_WORDWRAP)
+    w=-1;
+  else if (options & FLAGS_USE_FULL_WIDTH)
     w=width;
-  if (w<wNeeded) {
-    m_htmlCtx->layout(w-border*2, -1);
-  }
+  else
+    w=m_maxDefaultWidth;
+  m_htmlCtx->layout(w-border*2, -1);
   m_defaultWidth=m_htmlCtx->getWidth();
   m_defaultHeight=m_htmlCtx->getHeight();
   m_haveDefaultDims=true;
@@ -133,12 +129,41 @@
     w=-1;
   else if (options & FLAGS_USE_FULL_WIDTH)
     w=width;
-  else
+  else if (m_maxDefaultWidth!=-1)
     w=m_maxDefaultWidth;
+  else {
+    int wTmp=1024;
+    int mask=1024;
+    int i;
+
+    for (i=0; i<10; i++) {
+      double ar, nw, nh;
+
+      m_htmlCtx->layout(wTmp-border*2, -1);
+      nw=(double) (m_htmlCtx->getWidth());
+      nh=(double)(m_htmlCtx->getHeight());
+      ar=nw/nh;
+
+      if (ar>=3.5 && ar<4.0)
+       break;
+
+      if (ar>4.0)
+       /* w/h too high, so we need to reduce the width */
+       wTmp&=~mask;
+
+      mask>>=1;
+      wTmp|=mask;
+    }
+    w=wTmp;
+  }
+
+  /* TODO: handle icon size correctly */
+
   m_htmlCtx->layout(w-border*2, -1);
   m_defaultWidth=m_htmlCtx->getWidth();
   m_defaultHeight=m_htmlCtx->getHeight();
   m_haveDefaultDims=true;
+  //DBG_ERROR(0, "Labelsize: %d / %d", m_defaultWidth, m_defaultHeight);
 #endif
 }
 
@@ -155,6 +180,9 @@
   w=m_defaultWidth;
   if (m_icon)
     w+=m_icon->getWidth()+ICON_SPACE;
+
+  //DBG_ERROR(0, "GetDefaultWidth[%s]: Width= %d", m_text.text(), w);
+
   return w;
 }
 
@@ -176,6 +204,8 @@
       h=ih;
   }
 
+  //DBG_ERROR(0, "GetDefaultHeight[%s]: Height= %d", m_text.text(), h);
+
   return h;
 }
 
@@ -189,6 +219,7 @@
   dc.fillRectangle(border, border, width-(border*2), height-(border*2));
 
   if (m_htmlCtx) {
+    //DBG_ERROR(0, "Paint: Labelsize= %d / %d", m_htmlCtx->getWidth(), 
m_htmlCtx->getHeight());
     if (m_icon) {
       int th;
       int ih;
@@ -236,8 +267,13 @@
   m_haveDefaultDims=false;
   if (options & FLAGS_NO_WORDWRAP)
     w=-1;
-  else
+  else if (options & FLAGS_USE_FULL_WIDTH) {
     w=width;
+    if (m_icon)
+      w-=(m_icon->getWidth()+ICON_SPACE);
+  }
+  else
+    w=m_maxDefaultWidth;
 
   if (m_htmlCtx==NULL)
     updateHtml();
@@ -247,7 +283,14 @@
 #else
   int w;
 
-  m_haveDefaultDims=false;
+  //DBG_ERROR(0, "Layout[%s]: Width=%d, height=%d", m_text.text(), width, 
height);
+
+  if (m_htmlCtx==NULL)
+    updateHtml();
+
+  if (!m_haveDefaultDims)
+    calcDefaultDims();
+
   if (options & FLAGS_NO_WORDWRAP)
     w=-1;
   else if (options & FLAGS_USE_FULL_WIDTH) {
@@ -256,13 +299,12 @@
       w-=(m_icon->getWidth()+ICON_SPACE);
   }
   else
-    w=m_maxDefaultWidth;
+    w=m_defaultWidth;
 
-  if (m_htmlCtx==NULL)
-    updateHtml();
   m_htmlCtx->layout(w-border*2, height-border*2);
   update();
   flags&=~FLAG_DIRTY;
+
 #endif
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-4.7.0beta/gui/fox16/libtest.cpp 
new/gwenhywfar-4.8.0beta/gui/fox16/libtest.cpp
--- old/gwenhywfar-4.7.0beta/gui/fox16/libtest.cpp      2012-12-30 
23:04:16.000000000 +0100
+++ new/gwenhywfar-4.8.0beta/gui/fox16/libtest.cpp      2013-08-23 
13:11:53.000000000 +0200
@@ -523,6 +523,63 @@
 
 
 
+int test11(int argc, char **argv) {
+  FXApp application("libtest","Martin Preuss");
+  FOX16_Gui *gui;
+  char buffer[65];
+
+  application.init(argc,argv);
+
+  application.create();
+
+  gui=new FOX16_Gui(&application);
+  GWEN_Gui_SetGui(gui->getCInterface());
+
+  GWEN_Gui_InputBox(GWEN_GUI_INPUT_FLAGS_SHOW,
+                    "This is the Title",
+                    "<html>This is quite a long HTML text. This is the second 
sentence, which is a bit longer "
+                    "than the first one.<br>In any case this sentence should 
begin on its own line</html>"
+
+                    "This is quite a long HTML text. This is the second 
sentence, which is a bit longer "
+                    "than the first one.\nIn any case this sentence should 
begin on its own line.",
+                    buffer,
+                   1,
+                   sizeof(buffer)-1,
+                   0);
+
+
+  return 0;
+}
+
+
+
+int test12(int argc, char **argv) {
+  FXApp application("libtest","Martin Preuss");
+  FOX16_Gui *gui;
+  char buffer[65];
+
+  application.init(argc,argv);
+
+  application.create();
+
+  gui=new FOX16_Gui(&application);
+  GWEN_Gui_SetGui(gui->getCInterface());
+
+  GWEN_Gui_InputBox(GWEN_GUI_INPUT_FLAGS_SHOW,
+                    "This is the Title",
+                    "<html><b>This</b> is quite a long HTML text. This is the 
second sentence, which is a bit longer "
+                    "than the first one.<br>In any case this sentence should 
begin on its own line.</html>",
+                    buffer,
+                   1,
+                   sizeof(buffer)-1,
+                   0);
+
+
+  return 0;
+}
+
+
+
 
 int main(int argc, char **argv) {
   GWEN_Init();
@@ -550,6 +607,10 @@
       return test9(argc, argv);
     else if (strcasecmp(argv[1], "10")==0)
       return test10(argc, argv);
+    else if (strcasecmp(argv[1], "11")==0)
+      return test11(argc, argv);
+    else if (strcasecmp(argv[1], "12")==0)
+      return test12(argc, argv);
   }
   else
     return test7(argc, argv);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-4.7.0beta/gwenhywfar.spec 
new/gwenhywfar-4.8.0beta/gwenhywfar.spec
--- old/gwenhywfar-4.7.0beta/gwenhywfar.spec    2013-08-21 17:43:34.000000000 
+0200
+++ new/gwenhywfar-4.8.0beta/gwenhywfar.spec    2013-10-22 20:22:11.000000000 
+0200
@@ -3,7 +3,7 @@
 
 
 %define name gwenhywfar
-%define version 4.7.0beta
+%define version 4.8.0beta
 %define rpm_cxxflags \"-O2 -march=i486 -mcpu=i586\"
 %define rpm_cflags \"-O2 -march=i486 -mcpu=i586\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-4.7.0beta/src/base/stringlist2.c 
new/gwenhywfar-4.8.0beta/src/base/stringlist2.c
--- old/gwenhywfar-4.7.0beta/src/base/stringlist2.c     2011-06-13 
17:28:49.000000000 +0200
+++ new/gwenhywfar-4.8.0beta/src/base/stringlist2.c     2013-09-29 
18:53:54.000000000 +0200
@@ -80,6 +80,104 @@
 
 
 
+int GWEN_StringList2_toDb(GWEN_STRINGLIST2 *sl2, GWEN_DB_NODE *db, const char 
*name) {
+  GWEN_DB_DeleteVar(db, name);
+
+  if (sl2) {
+    GWEN_STRINGLIST2_ITERATOR *it;
+
+    it=GWEN_StringList2_First(sl2);
+    if (it) {
+      const char *s;
+
+      s=GWEN_StringList2Iterator_Data(it);
+      while(s) {
+       int rv;
+
+       rv=GWEN_DB_SetCharValue(db, 0, name, s);
+       if (rv<0) {
+         DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv);
+         return rv;
+       }
+
+       s=GWEN_StringList2Iterator_Next(it);
+      }
+      GWEN_StringList2Iterator_free(it);
+    }
+  }
+
+  return 0;
+}
+
+
+
+GWEN_STRINGLIST2 *GWEN_StringList2_fromDb(GWEN_DB_NODE *db, const char *name, 
GWEN_STRINGLIST2_INSERTMODE m) {
+  GWEN_STRINGLIST2 *sl2;
+  int i;
+
+  sl2=GWEN_StringList2_new();
+  for (i=0; ; i++) {
+    const char *s;
+
+    s=GWEN_DB_GetCharValue(db, name, i, NULL);
+    if (!s)
+      break;
+    GWEN_StringList2_AppendString(sl2, s, 0, m);
+  }
+
+  return sl2;
+}
+
+
+
+int GWEN_StringList2_toXml(GWEN_STRINGLIST2 *sl2, GWEN_XMLNODE *node) {
+  GWEN_STRINGLIST2_ITERATOR *it;
+  
+  it=GWEN_StringList2_First(sl2);
+  if (it) {
+    const char *s;
+    
+    s=GWEN_StringList2Iterator_Data(it);
+    while(s) {
+      GWEN_XMLNode_SetCharValue(node, "elem", s);
+      s=GWEN_StringList2Iterator_Next(it);
+    }
+    GWEN_StringList2Iterator_free(it);
+  }
+
+  return 0;
+}
+
+
+
+GWEN_STRINGLIST2 *GWEN_StringList2_fromXml(GWEN_XMLNODE *node, 
GWEN_STRINGLIST2_INSERTMODE m) {
+  GWEN_STRINGLIST2 *sl2;
+  GWEN_XMLNODE *n;
+
+  sl2=GWEN_StringList2_new();
+
+
+  n=GWEN_XMLNode_GetFirstTag(node);
+  while(n) {
+    GWEN_XMLNODE *dn;
+
+    dn=GWEN_XMLNode_GetFirstData(n);
+    if (dn) {
+      const char *s;
+
+      s=GWEN_XMLNode_GetData(dn);
+      if (s) {
+       GWEN_StringList2_AppendString(sl2, s, 0, m);
+      }
+    }
+    n=GWEN_XMLNode_GetNextTag(n);
+  }
+
+  return sl2;
+}
+
+
+
 void GWEN_StringList2_SetSenseCase(GWEN_STRINGLIST2 *sl2, int i){
   assert(sl2);
   sl2->senseCase=i;
@@ -268,6 +366,31 @@
 
 
 
+const char *GWEN_StringList2_GetStringAt(const GWEN_STRINGLIST2 *sl2, int idx) 
{
+  GWEN_STRINGLIST2_ITERATOR *it;
+  GWEN_REFPTR *rp;
+
+  it=GWEN_StringList2_First(sl2);
+  if (it) {
+    rp=GWEN_ListIterator_DataRefPtr((GWEN_LIST_ITERATOR*)it);
+
+    while(rp) {
+      const char *t;
+
+      t=(const char*)GWEN_RefPtr_GetData(rp);
+      assert(t);
+      if (idx--==0) {
+       GWEN_StringList2Iterator_free(it);
+       return t;
+      }
+      rp=GWEN_ListIterator_NextRefPtr((GWEN_LIST_ITERATOR*)it);
+    }
+    GWEN_StringList2Iterator_free(it);
+  }
+
+  return NULL;
+}
+
 
 
 
@@ -334,6 +457,13 @@
 }
 
 
+
+unsigned int GWEN_StringList2_GetCount(const GWEN_STRINGLIST2 *l) {
+  assert(l);
+  return GWEN_List_GetSize(l->listPtr);
+}
+
+
 
 void GWEN_StringList2_Dump(const GWEN_STRINGLIST2 *sl2){
   GWEN_STRINGLIST2_ITERATOR *it;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-4.7.0beta/src/base/stringlist2.h 
new/gwenhywfar-4.8.0beta/src/base/stringlist2.h
--- old/gwenhywfar-4.7.0beta/src/base/stringlist2.h     2011-06-13 
17:28:54.000000000 +0200
+++ new/gwenhywfar-4.8.0beta/src/base/stringlist2.h     2013-09-29 
18:48:51.000000000 +0200
@@ -33,6 +33,8 @@
 #include <gwenhywfar/types.h>
 #include <gwenhywfar/refptr.h>
 #include <gwenhywfar/list.h>
+#include <gwenhywfar/db.h>
+#include <gwenhywfar/xml.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -57,6 +59,20 @@
 GWEN_STRINGLIST2 *GWEN_StringList2_dup(GWEN_STRINGLIST2 *sl2);
 
 
+GWENHYWFAR_API
+int GWEN_StringList2_toDb(GWEN_STRINGLIST2 *sl2, GWEN_DB_NODE *db, const char 
*varName);
+
+GWENHYWFAR_API
+GWEN_STRINGLIST2 *GWEN_StringList2_fromDb(GWEN_DB_NODE *db, const char *name, 
GWEN_STRINGLIST2_INSERTMODE m);
+
+
+GWENHYWFAR_API
+int GWEN_StringList2_toXml(GWEN_STRINGLIST2 *sl2, GWEN_XMLNODE *node);
+
+GWENHYWFAR_API
+GWEN_STRINGLIST2 *GWEN_StringList2_fromXml(GWEN_XMLNODE *node, 
GWEN_STRINGLIST2_INSERTMODE m);
+
+
 /**
  * Normally this group of functions ignores cases when comparing two strings.
  * You can change this behaviour here.
@@ -115,9 +131,11 @@
  * @return !=0 if found, 0 otherwise
  */
 GWENHYWFAR_API int GWEN_StringList2_HasString(const GWEN_STRINGLIST2 *sl2,
-                                             const char *s);
+                                              const char *s);
 
 
+GWENHYWFAR_API const char *GWEN_StringList2_GetStringAt(const GWEN_STRINGLIST2 
*sl2, int idx);
+
 
 
 GWENHYWFAR_API
@@ -156,6 +174,12 @@
 GWENHYWFAR_API void GWEN_StringList2_Dump(const GWEN_STRINGLIST2 *sl2);
 
 
+GWENHYWFAR_API int GWEN_StringList2_toXml(GWEN_STRINGLIST2 *sl2, GWEN_XMLNODE 
*node);
+
+
+GWENHYWFAR_API unsigned int GWEN_StringList2_GetCount(const GWEN_STRINGLIST2 
*l);
+
+
 
 #ifdef __cplusplus
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-4.7.0beta/src/os/gwendate.c 
new/gwenhywfar-4.8.0beta/src/os/gwendate.c
--- old/gwenhywfar-4.7.0beta/src/os/gwendate.c  2013-08-21 17:13:45.000000000 
+0200
+++ new/gwenhywfar-4.8.0beta/src/os/gwendate.c  2013-10-05 21:38:22.000000000 
+0200
@@ -610,6 +610,215 @@
 
 
 
+GWEN_DATE *GWEN_Date_GetThisMonthStart(const GWEN_DATE *dt) {
+  return GWEN_Date_fromGregorian(GWEN_Date_GetYear(dt), 
GWEN_Date_GetMonth(dt), 1);
+}
+
+
+
+GWEN_DATE *GWEN_Date_GetThisMonthEnd(const GWEN_DATE *dt) {
+  int day;
+
+  switch(GWEN_Date_GetMonth(dt)) {
+  case 1:
+  case 3:
+  case 5:
+  case 7:
+  case 8:
+  case 10:
+  case 12:
+    day=31;
+    break;
+  case 2:
+    if (GWEN_Date_IsLeapYear(GWEN_Date_GetYear(dt)))
+      day=29;
+    else
+      day=28;
+    break;
+
+  case 4:
+  case 6:
+  case 9:
+  case 11:
+    day=30;
+    break;
+  }
+  return GWEN_Date_fromGregorian(GWEN_Date_GetYear(dt), 
GWEN_Date_GetMonth(dt), day);
+}
+
+
+
+GWEN_DATE *GWEN_Date_GetThisQuarterYearStart(const GWEN_DATE *dt) {
+  int m;
+  
+  m=(GWEN_Date_GetMonth(dt)-1)>>2;
+  switch(m) {
+  case 0:
+    return GWEN_Date_fromGregorian(GWEN_Date_GetYear(dt), 1, 1);
+  case 1:
+    return GWEN_Date_fromGregorian(GWEN_Date_GetYear(dt), 4, 1);
+  case 2:
+    return GWEN_Date_fromGregorian(GWEN_Date_GetYear(dt), 7, 1);
+  case 3:
+    return GWEN_Date_fromGregorian(GWEN_Date_GetYear(dt), 10, 1);
+  }
+
+  return NULL;
+}
+
+
+
+GWEN_DATE *GWEN_Date_GetThisQuarterYearEnd(const GWEN_DATE *dt) {
+  int m;
+  
+  m=(GWEN_Date_GetMonth(dt)-1)>>2;
+  switch(m) {
+  case 0:
+    return GWEN_Date_fromGregorian(GWEN_Date_GetYear(dt), 3, 31);
+  case 1:
+    return GWEN_Date_fromGregorian(GWEN_Date_GetYear(dt), 6, 30);
+  case 2:
+    return GWEN_Date_fromGregorian(GWEN_Date_GetYear(dt), 9, 30);
+  case 3:
+    return GWEN_Date_fromGregorian(GWEN_Date_GetYear(dt), 12, 31);
+  }
+
+  return NULL;
+}
+
+
+
+GWEN_DATE *GWEN_Date_GetThisHalfYearStart(const GWEN_DATE *dt) {
+  if (GWEN_Date_GetMonth(dt)<7)
+    return GWEN_Date_fromGregorian(GWEN_Date_GetYear(dt), 1, 1);
+  else
+    return GWEN_Date_fromGregorian(GWEN_Date_GetYear(dt), 7, 1);
+}
+
+
+
+GWEN_DATE *GWEN_Date_GetThisHalfYearEnd(const GWEN_DATE *dt) {
+  if (GWEN_Date_GetMonth(dt)<7)
+    return GWEN_Date_fromGregorian(GWEN_Date_GetYear(dt), 6, 30);
+  else
+    return GWEN_Date_fromGregorian(GWEN_Date_GetYear(dt), 12, 31);
+}
+
+
+
+GWEN_DATE *GWEN_Date_GetThisYearStart(const GWEN_DATE *dt) {
+  return GWEN_Date_fromGregorian(GWEN_Date_GetYear(dt), 1, 1);
+}
+
+
+
+GWEN_DATE *GWEN_Date_GetThisYearEnd(const GWEN_DATE *dt) {
+  return GWEN_Date_fromGregorian(GWEN_Date_GetYear(dt), 12, 31);
+}
+
+
+
+GWEN_DATE *GWEN_Date_GetLastMonthStart(const GWEN_DATE *dt) {
+  GWEN_DATE *tmpDate;
+  GWEN_DATE *result;
+  int j;
+
+  tmpDate=GWEN_Date_fromGregorian(GWEN_Date_GetYear(dt), 
GWEN_Date_GetMonth(dt), 1);
+  j=GWEN_Date_GetJulian(tmpDate)-1;
+  GWEN_Date_free(tmpDate);
+  tmpDate=GWEN_Date_fromJulian(j);
+  result=GWEN_Date_fromGregorian(GWEN_Date_GetYear(tmpDate), 
GWEN_Date_GetMonth(tmpDate), 1);
+  GWEN_Date_free(tmpDate);
+  return result;
+}
+
+
+
+GWEN_DATE *GWEN_Date_GetLastMonthEnd(const GWEN_DATE *dt) {
+  GWEN_DATE *tmpDate;
+  int j;
+
+  tmpDate=GWEN_Date_fromGregorian(GWEN_Date_GetYear(dt), 
GWEN_Date_GetMonth(dt), 1);
+  j=GWEN_Date_GetJulian(tmpDate)-1;
+  GWEN_Date_free(tmpDate);
+  return GWEN_Date_fromJulian(j);
+}
+
+
+
+GWEN_DATE *GWEN_Date_GetLastQuarterYearStart(const GWEN_DATE *dt) {
+  GWEN_DATE *tmpDate;
+  GWEN_DATE *result;
+
+  tmpDate=GWEN_Date_GetLastQuarterYearEnd(dt);
+  result=GWEN_Date_GetThisQuarterYearStart(tmpDate);
+  GWEN_Date_free(tmpDate);
+  return result;
+}
+
+
+
+GWEN_DATE *GWEN_Date_GetLastQuarterYearEnd(const GWEN_DATE *dt) {
+  GWEN_DATE *tmpDate;
+  int j;
+
+  tmpDate=GWEN_Date_GetThisQuarterYearStart(dt);
+  j=GWEN_Date_GetJulian(tmpDate)-1;
+  GWEN_Date_free(tmpDate);
+  return GWEN_Date_fromJulian(j);
+}
+
+
+
+GWEN_DATE *GWEN_Date_GetLastHalfYearStart(const GWEN_DATE *dt) {
+  GWEN_DATE *tmpDate;
+  GWEN_DATE *result;
+
+  tmpDate=GWEN_Date_GetLastHalfYearEnd(dt);
+  result=GWEN_Date_GetThisHalfYearStart(tmpDate);
+  GWEN_Date_free(tmpDate);
+  return result;
+}
+
+
+
+GWEN_DATE *GWEN_Date_GetLastHalfYearEnd(const GWEN_DATE *dt) {
+  GWEN_DATE *tmpDate;
+  int j;
+
+  tmpDate=GWEN_Date_GetThisHalfYearStart(dt);
+  j=GWEN_Date_GetJulian(tmpDate)-1;
+  GWEN_Date_free(tmpDate);
+  return GWEN_Date_fromJulian(j);
+}
+
+
+
+GWEN_DATE *GWEN_Date_GetLastYearStart(const GWEN_DATE *dt) {
+  GWEN_DATE *tmpDate;
+  GWEN_DATE *result;
+
+  tmpDate=GWEN_Date_GetLastYearEnd(dt);
+  result=GWEN_Date_GetThisYearStart(tmpDate);
+  GWEN_Date_free(tmpDate);
+  return result;
+}
+
+
+
+GWEN_DATE *GWEN_Date_GetLastYearEnd(const GWEN_DATE *dt) {
+  GWEN_DATE *tmpDate;
+  int j;
+
+  tmpDate=GWEN_Date_GetThisYearStart(dt);
+  j=GWEN_Date_GetJulian(tmpDate)-1;
+  GWEN_Date_free(tmpDate);
+  return GWEN_Date_fromJulian(j);
+}
+
+
+
+
 
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-4.7.0beta/src/os/gwendate.h 
new/gwenhywfar-4.8.0beta/src/os/gwendate.h
--- old/gwenhywfar-4.7.0beta/src/os/gwendate.h  2013-08-21 17:11:32.000000000 
+0200
+++ new/gwenhywfar-4.8.0beta/src/os/gwendate.h  2013-09-22 01:07:49.000000000 
+0200
@@ -115,6 +115,32 @@
 GWENHYWFAR_API GWEN_DATE *GWEN_Date_fromDb(GWEN_DB_NODE *db);
 
 
+GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetThisMonthStart(const GWEN_DATE *dt);
+GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetThisMonthEnd(const GWEN_DATE *dt);
+
+GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetThisQuarterYearStart(const GWEN_DATE 
*dt);
+GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetThisQuarterYearEnd(const GWEN_DATE *dt);
+
+GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetThisHalfYearStart(const GWEN_DATE *dt);
+GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetThisHalfYearEnd(const GWEN_DATE *dt);
+
+GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetThisYearStart(const GWEN_DATE *dt);
+GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetThisYearEnd(const GWEN_DATE *dt);
+
+GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetLastMonthStart(const GWEN_DATE *dt);
+GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetLastMonthEnd(const GWEN_DATE *dt);
+
+GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetLastQuarterYearStart(const GWEN_DATE 
*dt);
+GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetLastQuarterYearEnd(const GWEN_DATE *dt);
+
+GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetLastHalfYearStart(const GWEN_DATE *dt);
+GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetLastHalfYearEnd(const GWEN_DATE *dt);
+
+GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetLastYearStart(const GWEN_DATE *dt);
+GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetLastYearEnd(const GWEN_DATE *dt);
+
+
+
 #ifdef __cplusplus
 }
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-4.7.0beta/src/ressource.rc 
new/gwenhywfar-4.8.0beta/src/ressource.rc
--- old/gwenhywfar-4.7.0beta/src/ressource.rc   2013-08-21 17:43:34.000000000 
+0200
+++ new/gwenhywfar-4.8.0beta/src/ressource.rc   2013-10-22 20:22:11.000000000 
+0200
@@ -43,8 +43,8 @@
 // Version
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 4, 7, 0, 0
- PRODUCTVERSION 4, 7, 0, 0
+ FILEVERSION 4, 8, 0, 0
+ PRODUCTVERSION 4, 8, 0, 0
  FILEFLAGSMASK 0x3fL
  FILEFLAGS 0x0L
  FILEOS 0x40004L      // Windows NT
@@ -58,14 +58,14 @@
             //VALUE "Comments", "\0"
             VALUE "CompanyName", " Aquamaniac\0"
             VALUE "FileDescription", "Multi purpose library\0"
-            VALUE "FileVersion", "v4.7.0beta\0"
+            VALUE "FileVersion", "v4.8.0beta\0"
             VALUE "InternalName", "Gwenhywfar\0"
             VALUE "LegalCopyright", "Copyright � 2003 by Martin Preuss\0"
             VALUE "LegalTrademarks", "Aquamaniac\0"
             VALUE "OriginalFilename", "GWENHYWFAR32.DLL\0"
             //VALUE "PrivateBuild", "\0"
             VALUE "ProductName", "Gwenhywfar\0"
-            VALUE "ProductVersion", "v4.7.0beta-0\0"
+            VALUE "ProductVersion", "v4.8.0beta-0\0"
             VALUE "Author", "Martin Preuss\0"
             VALUE "Email", "[email protected]\0"
             VALUE "Homepage", "http://gwenhywfar.sf.net/\0";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwenhywfar-4.7.0beta/src/version.h 
new/gwenhywfar-4.8.0beta/src/version.h
--- old/gwenhywfar-4.7.0beta/src/version.h      2013-08-21 17:43:34.000000000 
+0200
+++ new/gwenhywfar-4.8.0beta/src/version.h      2013-10-22 20:22:11.000000000 
+0200
@@ -31,12 +31,12 @@
 
 #define GWEN_VERSION_MAJOR 4
 #define GWENHYWFAR_VERSION_MAJOR 4
-#define GWENHYWFAR_VERSION_MINOR 7
+#define GWENHYWFAR_VERSION_MINOR 8
 #define GWENHYWFAR_VERSION_PATCHLEVEL 0
 #define GWENHYWFAR_VERSION_BUILD 0
 #define GWENHYWFAR_VERSION_TAG "beta"
-#define GWENHYWFAR_VERSION_FULL_STRING "4.7.0beta-0"
-#define GWENHYWFAR_VERSION_STRING "4.7.0"
+#define GWENHYWFAR_VERSION_FULL_STRING "4.8.0beta-0"
+#define GWENHYWFAR_VERSION_STRING "4.8.0"
 
 #define GWENHYWFAR_SO_EFFECTIVE 60
 #define GWENHYWFAR_SO_EFFECTIVE_STR "60"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gwenhywfar-4.7.0beta/tools/typemaker2/types/c/Makefile.am 
new/gwenhywfar-4.8.0beta/tools/typemaker2/types/c/Makefile.am
--- old/gwenhywfar-4.7.0beta/tools/typemaker2/types/c/Makefile.am       
2013-08-16 14:38:14.000000000 +0200
+++ new/gwenhywfar-4.8.0beta/tools/typemaker2/types/c/Makefile.am       
2013-09-12 19:36:51.000000000 +0200
@@ -25,7 +25,8 @@
   uint8_t.tm2 \
   uint8_t_array.tm2 \
   gwen_bindata.tm2 \
-  double_array.tm2
+  double_array.tm2 \
+  gwen_stringlist2.tm2
 
 
 sources:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gwenhywfar-4.7.0beta/tools/typemaker2/types/c/Makefile.in 
new/gwenhywfar-4.8.0beta/tools/typemaker2/types/c/Makefile.in
--- old/gwenhywfar-4.7.0beta/tools/typemaker2/types/c/Makefile.in       
2013-08-21 17:43:29.000000000 +0200
+++ new/gwenhywfar-4.8.0beta/tools/typemaker2/types/c/Makefile.in       
2013-10-22 20:22:05.000000000 +0200
@@ -375,7 +375,8 @@
   uint8_t.tm2 \
   uint8_t_array.tm2 \
   gwen_bindata.tm2 \
-  double_array.tm2
+  double_array.tm2 \
+  gwen_stringlist2.tm2
 
 all: all-am
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gwenhywfar-4.7.0beta/tools/typemaker2/types/c/gwen_bindata.tm2 
new/gwenhywfar-4.8.0beta/tools/typemaker2/types/c/gwen_bindata.tm2
--- old/gwenhywfar-4.7.0beta/tools/typemaker2/types/c/gwen_bindata.tm2  
2013-08-16 14:44:28.000000000 +0200
+++ new/gwenhywfar-4.8.0beta/tools/typemaker2/types/c/gwen_bindata.tm2  
2013-10-04 23:09:03.000000000 +0200
@@ -4,6 +4,7 @@
 
   <typedef id="GWEN_BINDATA" type="opaque" lang="c" >
     <identifier>GWEN_BINDATA</identifier>
+    <aqdb_type>AQDB_DataType_Bin</aqdb_type>
 
     <codedefs>
 
@@ -63,16 +64,76 @@
 
       <codedef id="toXml">
         <code>
+          {
+            if ($(src).length &amp;&amp; $(src).pointer) {
+              GWEN_BUFFER *tbuf;
+              int rv;
+              
+              tbuf=GWEN_Buffer_new(0, 1024, 0, 1);
+              rv=GWEN_Base64_Encode((const unsigned char*) $(src).pointer, 
$(src).length, tbuf, 80);
+              if (rv  &lt; 0) {
+                DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv);
+              }
+              else {
+                GWEN_XMLNode_SetCharValue($(db), "$(name)", 
GWEN_Buffer_GetStart(tbuf));
+                GWEN_Buffer_free(tbuf);
+              }
+            }
+          }
         </code>
       </codedef>
 
       <codedef id="fromXml">
         <code>
+          {
+            const char *s;
+            
+            s=GWEN_XMLNode_GetCharValue($(db), "$(name)", $(default));
+            if (s) {
+              GWEN_BUFFER *tbuf;
+              int rv;
+              
+              tbuf=GWEN_Buffer_new(0, 1024, 0, 1);
+              rv=GWEN_Base64_Decode((const unsigned char*)s, strlen(s), tbuf);
+              if (rv &lt; 0) {
+                DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv);
+              }
+              else {
+                char *t;
+                uint32_t len;
+                
+                len=GWEN_Buffer_GetUsedBytes(tbuf);
+                t=GWEN_Buffer_GetStart(tbuf);
+                if (GWEN_Buffer_Relinquish(tbuf) &lt; 0) {
+                  uint8_t *dest;
+                  
+                  dest=(uint8_t*) malloc(len);
+                  memmove(dest, t, len);
+                  $(dst).pointer=dest;
+                  $(dst).length=len;
+                }
+                else {
+                  $(dst).pointer=(uint8_t*) t;
+                  $(dst).length=len;
+                }
+              }
+              GWEN_Buffer_free(tbuf);
+            }
+          }
         </code>
       </codedef>
 
       <codedef id="toDb">
         <code>
+          {
+            if ($(src).length &amp;&amp; $(src).pointer) {
+              GWEN_DB_SetBinValue($(db), GWEN_DB_FLAGS_OVERWRITE_VARS, 
"$(name)", $(src).pointer, $(src).length);
+            }
+            else {
+              GWEN_DB_DeleteVar($(db), "$(name)");
+              $(retval)=0;
+            }
+          }
         </code>
       </codedef>
 
@@ -80,6 +141,20 @@
 
       <codedef id="fromDb">
         <code>
+          {
+            const void *v;
+            unsigned int vlen;
+            
+            v=GWEN_DB_GetBinValue($(db), "$(name)", 0, NULL, 0, &amp;vlen);
+            if (v &amp;&amp; vlen) {
+              uint8_t *dest;
+              
+              dest=(uint8_t*) malloc(vlen);
+              memmove(dest, v, vlen);
+              $(dst).pointer=dest;
+              $(dst).length=vlen;
+            }
+          }
         </code>
       </codedef>
 
@@ -87,6 +162,12 @@
 
       <codedef id="toObject">
         <code>
+          {
+            if ($(src).length &amp;&amp; $(src).pointer)
+              $(retval)=AQDB_Object_SetField($(db), $(fieldId), 
$(src).pointer, $(src).length);
+            else 
+              $(retval)=AQDB_Object_SetField($(db), $(fieldId), NULL, 0);
+          }
         </code>
       </codedef>
 
@@ -94,6 +175,24 @@
 
       <codedef id="fromObject">
         <code>
+          {
+            uint8_t *data=NULL;
+            uint32_t len=0;
+            int rv;
+            
+            rv=AQDB_Object_GetField($(db), $(fieldId),  &amp;data, &amp;len);
+            if (rv &lt; 0) {
+              $(retval)=rv;
+            }
+            else {
+              uint8_t *dest;
+              
+              dest=(uint8_t*) malloc(len);
+              memmove(dest, data, len);
+              $(dst).pointer=dest;
+              $(dst).length=len;
+            }
+          }
         </code>
       </codedef>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gwenhywfar-4.7.0beta/tools/typemaker2/types/c/gwen_stringlist2.tm2 
new/gwenhywfar-4.8.0beta/tools/typemaker2/types/c/gwen_stringlist2.tm2
--- old/gwenhywfar-4.7.0beta/tools/typemaker2/types/c/gwen_stringlist2.tm2      
1970-01-01 01:00:00.000000000 +0100
+++ new/gwenhywfar-4.8.0beta/tools/typemaker2/types/c/gwen_stringlist2.tm2      
2013-09-21 17:54:12.000000000 +0200
@@ -0,0 +1,140 @@
+<?xml?>
+
+<tm2>
+
+  <typedef id="gwen_stringlist2" type="pointer" lang="c" >
+    <identifier>GWEN_STRINGLIST2</identifier>
+    <aqdb_type>AQDB_DataType_String</aqdb_type>
+
+
+    <codedefs>
+
+      <codedef id="construct">
+        <code>
+          $(dst)=$(preset);
+        </code>
+      </codedef>
+
+      <codedef id="destruct">
+        <code>
+          GWEN_StringList2_free($(src));
+        </code>
+      </codedef>
+
+      <codedef id="assign">
+        <code>
+          $(dst)=$(src);
+        </code>
+      </codedef>
+
+      <codedef id="dup">
+        <code>
+        $(dst)=GWEN_StringList2_dup($(src));
+        </code>
+      </codedef>
+
+      <codedef id="compare">
+        <code>
+          <!-- TODO -->
+          $(retval)=0;
+        </code>
+      </codedef>
+
+      <codedef id="toXml">
+        <!-- !attribute -->
+        <memberFlagsMask>  attribute</memberFlagsMask>
+        <memberFlagsValue>          </memberFlagsValue>
+        <code>
+          if ($(src)){
+            GWEN_XMLNODE *n;
+          
+            n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "$(name)");
+            GWEN_StringList2_toXml($(src), n);
+            GWEN_XMLNode_AddChild($(db), n);
+          }
+        </code>
+      </codedef>
+
+      <codedef id="fromXml">
+        <!-- !attribute -->
+        <memberFlagsMask>  attribute</memberFlagsMask>
+        <memberFlagsValue>          </memberFlagsValue>
+        <code>
+          {
+            GWEN_XMLNODE *n;
+          
+            n=GWEN_XMLNode_FindFirstTag($(db), "$(name)", 0, 0);
+            if(n) {
+              $(dst)=GWEN_StringList2_fromXml(n, 
GWEN_StringList2_IntertMode_AlwaysAdd);
+            }
+            else
+              $(dst)=NULL;
+          }
+        </code>
+      </codedef>
+
+
+
+      <codedef id="toDb">
+        <code>
+          if ($(src)){
+            $(retval)=GWEN_StringList2_toDb($(src), $(db), "$(name)");
+          }
+          else {
+            GWEN_DB_DeleteVar($(db), "$(name)");
+            $(retval)=0;
+          }
+        </code>
+      </codedef>
+
+
+
+      <codedef id="fromDb">
+        <code>
+          {
+            $(dst)=GWEN_StringList2_fromDb($(db), "$(name)", 
GWEN_StringList2_IntertMode_AlwaysAdd);
+          }
+        </code>
+      </codedef>
+
+
+
+      <codedef id="toObject">
+        <code>
+          #error "Not implemented"
+        </code>
+      </codedef>
+
+
+
+      <codedef id="fromObject">
+        <code>
+          #error "Not implemented"
+        </code>
+      </codedef>
+
+
+
+      <codedef id="toHashString">
+        <code>
+          #error "Not implemented"
+        </code>
+      </codedef>
+
+    </codedefs>
+
+
+
+    <defaults>
+      <!-- defaults flags etc for member declarations of this type -->
+      <default>NULL</default>
+      <preset>NULL</preset>
+      <flags>own</flags>
+      <setflags>assign</setflags>
+      <getflags>none</getflags>
+      <dupflags>const</dupflags>
+    </defaults>
+  
+  </typedef>
+
+</tm2>

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to