libgda r3162 - in trunk: . doc/C/tmpl libgda po providers/bdb providers/mysql providers/postgres testing tools
- From: vivien svn gnome org
- To: svn-commits-list gnome org
- Subject: libgda r3162 - in trunk: . doc/C/tmpl libgda po providers/bdb providers/mysql providers/postgres testing tools
- Date: Mon, 9 Jun 2008 20:15:25 +0000 (UTC)
Author: vivien
Date: Mon Jun 9 20:15:24 2008
New Revision: 3162
URL: http://svn.gnome.org/viewvc/libgda?rev=3162&view=rev
Log:
2008-06-09 Vivien Malerba <malerba gnome-db org>
* po/LINGUAS:
* configure.in: applied (slightly modified) patch for bug #536971 (thanks to Yuriy Penkin)
* po/POTFILES.in:
* po/POTFILES.skip: updated lists of files
* tools/gda-list-server-op.c:
* doc/C/:
* testing/gda-provider-status.c:
* libgda/gda-server-operation.[ch]:
* libgda/gda-server-provider.c: s/GDA_SERVER_OPERATION_NB/GDA_SERVER_OPERATION_LAST/
* testing/html.c: better output
* libgda/gda-value.c:
* libgda/gda-config.c:
* providers/mysql/gda-mysql.h:
* tools/gda-list-config.c:
* libgda/gda-data-model-bdb.c:
* configure.in: better detection of providers' libraries (specifically when cross
compiling with Mingw)
* providers/mysql/libmysql.def: file containing exported symbols for Win32 cross compiling
with Mingw
* providers/bdb/patch_db.h: patch to apply to db.h when compiling with MinGW
* providers/postgres/gda-postgres-ddl.c: implemented missing parts
* libgda/gda-config.c:
* libgda/gda-connection.c:
* libgda/gda-data-model-bdb.c:
* libgda/gda-data-model.c: some fixes for bug #537117
Added:
trunk/po/LINGUAS
trunk/providers/bdb/patch_db.h
trunk/providers/mysql/libmysql.def
Modified:
trunk/ChangeLog
trunk/configure.in
trunk/doc/C/tmpl/gda-server-operation.sgml
trunk/libgda/gda-config.c
trunk/libgda/gda-connection.c
trunk/libgda/gda-data-model-bdb.c
trunk/libgda/gda-data-model-bdb.h
trunk/libgda/gda-data-model.c
trunk/libgda/gda-server-operation.c
trunk/libgda/gda-server-operation.h
trunk/libgda/gda-server-provider.c
trunk/libgda/gda-value.c
trunk/po/POTFILES.skip
trunk/providers/bdb/gda-bdb-provider.c
trunk/providers/bdb/gda-bdb-test.c
trunk/providers/mysql/gda-mysql.h
trunk/providers/postgres/gda-postgres-ddl.c
trunk/testing/gda-provider-status.c
trunk/testing/html.c
trunk/tools/gda-list-config.c
trunk/tools/gda-list-server-op.c
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Mon Jun 9 20:15:24 2008
@@ -40,7 +40,7 @@
AC_SUBST(GDA_REVISION)
AC_SUBST(GDA_AGE)
-AC_PROG_INTLTOOL([0.35.5])
+IT_PROG_INTLTOOL([0.35.5])
AC_SUBST(INTLTOOL_XML_RULE)
AC_DEFINE_UNQUOTED(BONOBO_EXPLICIT_TRANSLATION_DOMAIN, "libgda-$LIBGDA_ABI_VERSION")
@@ -109,7 +109,6 @@
GETTEXT_PACKAGE=libgda-$LIBGDA_ABI_VERSION
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
-ALL_LINGUAS="ar az ca cs da de dz el en_CA en_GB es eu fa fi fr ga gl hr hu it ja ko lt mk ml ms nb ne nl oc pa pl pt pt_BR ru rw sk sl sq sr sr Latn sv tr uk vi zh_CN zh_HK zh_TW"
AM_GLIB_GNU_GETTEXT
@@ -131,16 +130,16 @@
])
TST_CFLAGS="$LIBGDA_CFLAGS"
LIBGDA_CFLAGS="$LIBGDA_CFLAGS -DLIBGDA_ABI_NAME=$LIBGDA_ABI_NAME"
-AC_SUBST(LIBGDA_CFLAGS)
-AC_SUBST(LIBGDA_LIBS)
dnl ******************************
dnl Check for Win32
dnl ******************************
+dnl linklibext is the shared link library extension, which varies by platform
AC_MSG_CHECKING([for platform])
platform_win32=no
platform_carbon=no
+linklibext=".so"
case "$host" in
*-cygwin*)
AC_MSG_RESULT([Win32 - cygwin])
@@ -148,14 +147,17 @@
NO_UNDEFINED='-no-undefined'
SOPREFIX='cyg'
LIBTOOL_EXPORT_OPTIONS=
+ linklibext=".dll.a"
AC_MSG_RESULT([Win32])
;;
*-mingw*)
AC_MSG_RESULT([Win32 - MinGW])
platform_win32=yes
+ AC_DEFINE(USING_MINGW)
NO_UNDEFINED='-no-undefined'
SOPREFIX='lib'
LIBTOOL_EXPORT_OPTIONS=
+ linklibext=".dll.a"
;;
*-*-darwin*)
dnl Darwin based distributions (including Mac OS X)
@@ -279,12 +281,6 @@
*) lib="lib";;
esac
-dnl this is the shared link library extension, which varies by platform
-case $host_os in
- cygwin*) linklibext=".dll.a" ;;
- *) linklibext=".so" ;;
-esac
-
dnl Test for Berkeley DB
try_bdb=true
AC_ARG_WITH(bdb,
@@ -294,7 +290,7 @@
try_bdb=false
elif test $withval = yes
then
- dir="/usr"
+ dir="/usr /usr/local"
else
dir=$withval
fi
@@ -311,13 +307,25 @@
fi
else
AC_MSG_CHECKING(for Berkeley DB files)
- for d in $dir /usr /usr/local
+ for d in $dir
do
- if test -f $d/$lib/libdb$linklibext -a -f $d/include/db.h
+ if test $platform_win32 = yes -a -f $d/include/db.h -a -f $d/bin/libdb47.dll
then
AC_MSG_RESULT(found Berkeley DB in $d)
- bdblib="-ldb"
+ AC_DEFINE(HAVE_BDB, 1, [Have Berkeley DB])
bdbdir=$d
+ BDB_CFLAGS="-I${bdbdir}/include"
+ BDB_LIBS="-L${bdbdir}/bin -ldb47"
+ break
+ fi
+
+ if test $platform_win32 = no -a -f $d/include/db.h -a -f $d/$lib/libdb$linklibext
+ then
+ AC_MSG_RESULT(found Berkeley DB in $d)
+ AC_DEFINE(HAVE_BDB, 1, [Have Berkeley DB])
+ bdbdir=$d
+ BDB_CFLAGS="-I${bdbdir}/include"
+ BDB_LIBS="-L${bdbdir}/${lib} -ldb"
break
fi
dnl FIXME: check for db1 (non-sleepycat implementation)
@@ -325,16 +333,13 @@
if test x$bdbdir = x
then
AC_MSG_WARN(Berkeley DB backend not used)
- else
- AC_DEFINE(HAVE_BDB, 1, [Have Berkeley DB])
- BDB_CFLAGS="-I${bdbdir}/include"
- BDB_LIBS="-L${bdbdir}/lib ${bdblib}"
fi
fi
fi
AM_CONDITIONAL(BDB, test x$bdbdir != x)
if test x$bdbdir != x; then
+ LIBGDA_CFLAGS="$LIBGDA_CFLAGS $BDB_CFLAGS"
LIBGDA_BDB_INC="#include <libgda/gda-data-model-bdb.h>"
LIBGDA_BDB_TYPE="gda_data_model_bdb_get_type"
fi
@@ -396,67 +401,61 @@
AM_CONDITIONAL(ODBC, test x$odbcdir != x)
dnl Test for MySQL
-try_mysql=true
+mysql_req=none
AC_ARG_WITH(mysql,
[ --with-mysql=<directory> use mysql backend in <directory>],[
if test $withval = no
then
- try_mysql=false
+ mysql_req=none
elif test $withval = yes
then
- dir="/usr/local"
+ mysql_req=none
+ if test $cross_compiling = yes
+ then
+ AC_MSG_WARN(Can't auto determine Mysql installation in cross-compiling environment)
+ else
+ AC_MSG_CHECKING(for MySQL files)
+ AC_PATH_PROG(MYSQL_CONFIG, mysql_config)
+ fi
else
- dir=$withval
+ AC_MSG_CHECKING(for MySQL files in $withval)
+ if test $cross_compiling = yes
+ then
+ mysql_req=$withval
+ else
+ AC_PATH_PROG(MYSQL_CONFIG, mysql_config, [], $withval/bin)
+ fi
fi
])
mysqldir=""
-if test $try_mysql = true
-then
- AC_PATH_PROG(MYSQL_CONFIG, mysql_config)
- if test x$MYSQL_CONFIG = x; then
- AC_MSG_CHECKING(for MySQL files)
- for d in $dir /usr /usr/local /usr/local/mysql /opt/mysql /opt/packages/mysql
- do
- if test -f $d/include/mysql/mysql.h
- then
- mysqldir_suffix=/mysql
- else
- mysqldir_suffix=
- fi
- if test -f $d/$lib/mysql/libmysqlclient.a -o -f $d/$lib/mysql/libmysqlclient$linklibext
- then
- AC_MSG_RESULT(found mysql in $d)
- mysqldir=$d
- mysqllibdir_suffix=/mysql
- break
- fi
- if test -f $d/$lib/libmysqlclient.a -o -f $d/$lib/libmysqlclient$linklibext
- then
- AC_MSG_RESULT(found mysql in $d)
- mysqldir=$d
- mysqllibdir_suffix=
- break
- fi
- done
- if test x$mysqldir = x
+if test x$MYSQL_CONFIG != x
+then
+ mysqldir=yes
+ AC_MSG_RESULT(found mysql)
+ AC_DEFINE(HAVE_MYSQL, 1, [Have MySQL])
+ MYSQL_CFLAGS=`$MYSQL_CONFIG --cflags`
+ MYSQL_LIBS=`$MYSQL_CONFIG --libs`
+else
+ if test $cross_compiling = yes
+ then
+ if test $platform_win32 = yes -a -f $mysql_req/$lib/opt/libmysql.lib
then
- AC_MSG_WARN(MySQL backend not used)
- else
+ mysqldir=$mysql_req
+
+ mysqllibdir_suffix=/opt
+ AC_MSG_RESULT(found mysql)
AC_DEFINE(HAVE_MYSQL, 1, [Have MySQL])
MYSQL_CFLAGS="-I${mysqldir}/include${mysqldir_suffix}"
- MYSQL_LIBS="-L${mysqldir}/lib${mysqllibdir_suffix} -lmysqlclient"
+ MYSQL_LIBS="-L${mysqldir}/${lib}${mysqllibdir_suffix} -lmysql"
+ else
+ AC_MSG_WARN(MySQL backend not used)
fi
- else
- mysqldir=yes
- AC_DEFINE(HAVE_MYSQL, 1, [Have MySQL])
- MYSQL_CFLAGS=`$MYSQL_CONFIG --cflags`
- MYSQL_LIBS=`$MYSQL_CONFIG --libs`
fi
fi
-
AM_CONDITIONAL(MYSQL, test x$mysqldir != x)
+
dnl Test for mSQL
try_msql=true
AC_ARG_WITH(msql,
@@ -519,74 +518,58 @@
AM_CONDITIONAL(MSQL, test x$msqldir != x)
-
dnl Test for PostgreSQL
-try_postgres=true
+postgres_req=none
AC_ARG_WITH(postgres,
-[ --with-postgres=<directory> use postgres backend in <directory>],[
+[ --with-postgres=<directory> use PostgreSQL backend in <directory>],[
if test $withval = no
then
- try_postgres=false
+ postgres_req=none
elif test $withval = yes
then
- dir="/usr/local"
+ postgres_req=none
+ if test $cross_compiling = yes
+ then
+ AC_MSG_WARN(Can't auto determine PostgreSQL installation in cross-compiling environment)
+ else
+ AC_MSG_CHECKING(for Postgres files)
+ AC_PATH_PROG(POSTGRES_CONFIG, pg_config)
+ fi
else
- dir=$withval
+ AC_MSG_CHECKING(for PostgreSQL files in $withval)
+ if test $cross_compiling = yes
+ then
+ postgres_req=$withval
+ else
+ AC_PATH_PROG(POSTGRES_CONFIG, pg_config, [], $withval/bin)
+ fi
fi
])
postgresdir=""
-if test $try_postgres = true
+
+if test x$POSTGRES_CONFIG != x
then
- AC_MSG_CHECKING(for Postgres files)
- for d in $dir /usr /usr/local/postgres /opt/postgres /opt/packages/postgres /disk/postgres /usr/local/pgsql
- do
- if test -f $d/$lib/libpq.a -o -f $d/$lib/libpq$linklibext
- then
- AC_MSG_RESULT(found Postgres in $d)
- postgresdir=$d
- break
- fi
- done
- if test x$postgresdir = x
+ postgresdir=yes
+ AC_MSG_RESULT(found postgres)
+ AC_DEFINE(HAVE_POSTGRES, 1, [Have Postgres])
+ POSTGRES_CFLAGS=-I`$POSTGRES_CONFIG --includedir`
+ POSTGRES_LIBS="-L`$POSTGRES_CONFIG --libdir` -lpq"
+else
+ if test $cross_compiling = yes
then
- AC_MSG_WARN(Postgres backend not used)
- else
- if test -f ${postgresdir}/bin/pg_config
+ if test $platform_win32 = yes -a -f $postgres_req/$lib/libpq.lib
then
- PG_CONFIG=${postgresdir}/bin/pg_config
- POSTGRES_CFLAGS=-I`${PG_CONFIG} --includedir`
- POSTGRES_LIBS="-L`${PG_CONFIG} --libdir` -lpq"
- AC_DEFINE(HAVE_POSTGRES, 1, [Have PostgreSQL])
+ postgresdir=$postgres_req
+ postgreslibdir_suffix=
+ AC_MSG_RESULT(found postgres)
+ AC_DEFINE(HAVE_POSTGRES, 1, [Have Postgres])
+ POSTGRES_CFLAGS="-I${postgresdir}/include${postgresdir_suffix}"
+ POSTGRES_LIBS="-L${postgresdir}/${lib}${postgreslibdir_suffix} -lpq"
else
- if test -f ${postgresdir}/include/libpq-fe.h
- then
- POSTGRES_CFLAGS=-I${postgresdir}/include
- AC_DEFINE(HAVE_POSTGRES, 1, [Have PostgreSQL])
- elif test -f ${postgresdir}/include/pgsql/libpq-fe.h
- then
- POSTGRES_CFLAGS=-I${postgresdir}/include/pgsql
- AC_DEFINE(HAVE_POSTGRES, 1, [Have PostgreSQL])
- elif test -f ${postgresdir}/include/postgresql/libpq-fe.h
- then
- POSTGRES_CFLAGS=-I${postgresdir}/include/postgresql
- AC_DEFINE(HAVE_POSTGRES, 1, [Have PostgreSQL])
- elif test -f ${postgresdir}/include/postgresql/8.2/libpq-fe.h
- then
- POSTGRES_CFLAGS=-I${postgresdir}/include/8.2/postgresql
- AC_DEFINE(HAVE_POSTGRES, 1, [Have PostgreSQL])
- elif test -f ${postgresdir}/include/postgresql/8.3/libpq-fe.h
- then
- POSTGRES_CFLAGS=-I${postgresdir}/include/8.3/postgresql
- AC_DEFINE(HAVE_POSTGRES, 1, [Have PostgreSQL])
- else
- AC_MSG_WARN(Postgres include files not found, backend not used)
- postgresdir=""
- fi
- POSTGRES_LIBS="-L${postgresdir}/lib -lpq"
+ AC_MSG_WARN(Postgres backend not used)
fi
fi
fi
-
AM_CONDITIONAL(POSTGRES, test x$postgresdir != x)
dnl Test for freetds provider
@@ -1208,6 +1191,8 @@
fi
AC_SUBST(REBUILD)
+AC_SUBST(LIBGDA_CFLAGS)
+AC_SUBST(LIBGDA_LIBS)
AC_OUTPUT([
Makefile
Modified: trunk/doc/C/tmpl/gda-server-operation.sgml
==============================================================================
--- trunk/doc/C/tmpl/gda-server-operation.sgml (original)
+++ trunk/doc/C/tmpl/gda-server-operation.sgml Mon Jun 9 20:15:24 2008
@@ -85,7 +85,7 @@
@GDA_SERVER_OPERATION_DROP_INDEX:
@GDA_SERVER_OPERATION_CREATE_VIEW:
@GDA_SERVER_OPERATION_DROP_VIEW:
- GDA_SERVER_OPERATION_NB:
+ GDA_SERVER_OPERATION_LAST:
<!-- ##### ENUM GdaServerOperationNodeType ##### -->
<para>
Modified: trunk/libgda/gda-config.c
==============================================================================
--- trunk/libgda/gda-config.c (original)
+++ trunk/libgda/gda-config.c Mon Jun 9 20:15:24 2008
@@ -170,10 +170,12 @@
object_class->set_property = gda_config_set_property;
object_class->get_property = gda_config_get_property;
+ /* To translators: DSN stands for Data Source Name, it's a named connection string defined in ~/.libgda/config */
g_object_class_install_property (object_class, PROP_USER_FILE,
g_param_spec_string ("user_file", _("File to use for per-user DSN list"),
NULL, NULL,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
+ /* To translators: DSN stands for Data Source Name, it's a named connection string defined in $PREFIX/etc/libgda-4.0/config */
g_object_class_install_property (object_class, PROP_USER_FILE,
g_param_spec_string ("system_file", _("File to use for system-wide DSN list"),
NULL, NULL,
@@ -422,11 +424,7 @@
conffile = g_build_filename (g_get_home_dir (), ".libgda", "config", NULL);
if (!g_file_test (confdir, G_FILE_TEST_EXISTS)) {
-#ifdef LIBGDA_WIN32
- if (mkdir (confdir))
-#else
- if (mkdir (confdir, 0700))
-#endif
+ if (g_mkdir (confdir, 0700))
{
setup_ok = FALSE;
g_warning (_("Error creating user specific "
@@ -1093,14 +1091,14 @@
g_module_symbol (ip->handle, "plugin_create_provider", (gpointer) &plugin_create_provider);
if (!plugin_create_provider) {
g_set_error (error, GDA_CONFIG_ERROR, GDA_CONFIG_PROVIDER_CREATION_ERROR,
- _("Can't instanciate provider '%s'"), provider_name);
+ _("Can't instantiate provider '%s'"), provider_name);
GDA_CONFIG_UNLOCK ();
return NULL;
}
ip->instance = plugin_create_provider ();
if (!ip->instance) {
g_set_error (error, GDA_CONFIG_ERROR, GDA_CONFIG_PROVIDER_CREATION_ERROR,
- _("Can't instanciate provider '%s'"), provider_name);
+ _("Can't instantiate provider '%s'"), provider_name);
GDA_CONFIG_UNLOCK ();
return NULL;
}
Modified: trunk/libgda/gda-connection.c
==============================================================================
--- trunk/libgda/gda-connection.c (original)
+++ trunk/libgda/gda-connection.c Mon Jun 9 20:15:24 2008
@@ -185,6 +185,7 @@
g_param_spec_flags ("options", _("Options (connection sharing)"),
NULL, GDA_TYPE_CONNECTION_OPTIONS, GDA_CONNECTION_OPTIONS_NONE,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
+ /* To translators: Don't translate "GdaMetaStore", it's a class name */
g_object_class_install_property (object_class, PROP_META_STORE,
g_param_spec_object ("meta-store", _ ("GdaMetaStore used by the connection"),
NULL, GDA_TYPE_META_STORE,
@@ -3207,8 +3208,12 @@
g_print ("<< 'TRANSACTION_STATUS_CHANGED' from %s\n", __FUNCTION__);
#endif
}
- else
- g_warning (_("Connection transaction status tracking: no transaction exists for ROLLBACK"));
+ else {
+ gchar *str;
+ str = g_strdup_printf (_("Connection transaction status tracking: no transaction exists for %s"), "ROLLBACK");
+ g_warning (str);
+ g_free (str);
+ }
#ifdef GDA_DEBUG_NO
if (cnc->priv->trans_status)
gda_transaction_status_dump (cnc->priv->trans_status, 5);
@@ -3241,8 +3246,12 @@
g_print ("<< 'TRANSACTION_STATUS_CHANGED' from %s\n", __FUNCTION__);
#endif
}
- else
- g_warning (_("Connection transaction status tracking: no transaction exists for COMMIT"));
+ else {
+ gchar *str;
+ str = g_strdup_printf (_("Connection transaction status tracking: no transaction exists for %s"), "COMMIT");
+ g_warning (str);
+ g_free (str);
+ }
#ifdef GDA_DEBUG_NO
if (cnc->priv->trans_status)
gda_transaction_status_dump (cnc->priv->trans_status, 5);
@@ -3265,8 +3274,12 @@
g_print ("<< 'TRANSACTION_STATUS_CHANGED' from %s\n", __FUNCTION__);
#endif
}
- else
- g_warning (_("Connection transaction status tracking: no transaction exists for ADD SAVEPOINT"));
+ else {
+ gchar *str;
+ str = g_strdup_printf (_("Connection transaction status tracking: no transaction exists for %s"), "ADD SAVEPOINT");
+ g_warning (str);
+ g_free (str);
+ }
#ifdef GDA_DEBUG_NO
if (cnc->priv->trans_status)
gda_transaction_status_dump (cnc->priv->trans_status, 5);
@@ -3290,8 +3303,12 @@
g_print ("<< 'TRANSACTION_STATUS_CHANGED' from %s\n", __FUNCTION__);
#endif
}
- else
- g_warning (_("Connection transaction status tracking: no transaction exists for ROLLBACK SAVEPOINT"));
+ else {
+ gchar *str;
+ str = g_strdup_printf (_("Connection transaction status tracking: no transaction exists for %s"), "ROLLBACK SAVEPOINT");
+ g_warning (str);
+ g_free (str);
+ }
#ifdef GDA_DEBUG_NO
if (cnc->priv->trans_status)
gda_transaction_status_dump (cnc->priv->trans_status, 5);
@@ -3315,8 +3332,12 @@
g_print ("<< 'TRANSACTION_STATUS_CHANGED' from %s\n", __FUNCTION__);
#endif
}
- else
- g_warning (_("Connection transaction status tracking: no transaction exists for REMOVE SAVEPOINT"));
+ else {
+ gchar *str;
+ str = g_strdup_printf (_("Connection transaction status tracking: no transaction exists for %s"), "REMOVE SAVEPOINT");
+ g_warning (str);
+ g_free (str);
+ }
#ifdef GDA_DEBUG_NO
if (cnc->priv->trans_status)
gda_transaction_status_dump (cnc->priv->trans_status, 5);
Modified: trunk/libgda/gda-data-model-bdb.c
==============================================================================
--- trunk/libgda/gda-data-model-bdb.c (original)
+++ trunk/libgda/gda-data-model-bdb.c Mon Jun 9 20:15:24 2008
@@ -21,10 +21,14 @@
* Boston, MA 02111-1307, USA.
*/
+#ifdef USING_MINGW
+#define _NO_OLDNAMES
+#endif
#include <string.h>
#include <glib/gi18n-lib.h>
#include <libgda/gda-data-model.h>
#include <libgda/gda-data-model-bdb.h>
+#include <db.h>
#define BDB_VERSION (10000*DB_VERSION_MAJOR+100*DB_VERSION_MINOR+DB_VERSION_PATCH)
@@ -626,9 +630,13 @@
value);
}
else {
- if (c == 0)
- g_warning (_("Custom BDB model implementation is not complete: "
- "the 'get_key_part' method is missing"));
+ if (c == 0) {
+ gchar *str;
+ str = g_strdup_printf (_("Custom BDB model implementation is not complete: "
+ "the '%s' method is missing"), "get_key_part");
+ g_warning (str);
+ g_free (str);
+ }
value = gda_value_new_null ();
imodel->priv->cursor_values = g_slist_append (imodel->priv->cursor_values,
value);
@@ -655,9 +663,13 @@
value);
}
else {
- if (c == 0)
- g_warning (_("Custom BDB model implementation is not complete: "
- "the 'get_data_part' method is missing"));
+ if (c == 0) {
+ gchar *str;
+ str = g_strdup_printf (_("Custom BDB model implementation is not complete: "
+ "the '%s' method is missing"), "get_data_part");
+ g_warning (str);
+ g_free (str);
+ }
value = gda_value_new_null ();
imodel->priv->cursor_values = g_slist_append (imodel->priv->cursor_values,
value);
@@ -750,7 +762,7 @@
}
else {
g_set_error (error, 0, 0, _("Custom BDB model implementation is not complete: "
- "the 'update_key_part' method is missing"));
+ "the '%s' method is missing"), "update_key_part");
return FALSE;
}
}
@@ -836,7 +848,7 @@
}
else {
g_set_error (error, 0, 0, _("Custom BDB model implementation is not complete: "
- "the 'update_data_part' method is missing"));
+ "the '%s' method is missing"), "update_data_part");
return FALSE;
}
}
Modified: trunk/libgda/gda-data-model-bdb.h
==============================================================================
--- trunk/libgda/gda-data-model-bdb.h (original)
+++ trunk/libgda/gda-data-model-bdb.h Mon Jun 9 20:15:24 2008
@@ -23,7 +23,6 @@
#ifndef __GDA_DATA_MODEL_BDB_H__
#define __GDA_DATA_MODEL_BDB_H__
-#include <db.h>
#include <libgda/gda-data-model.h>
G_BEGIN_DECLS
Modified: trunk/libgda/gda-data-model.c
==============================================================================
--- trunk/libgda/gda-data-model.c (original)
+++ trunk/libgda/gda-data-model.c Mon Jun 9 20:15:24 2008
@@ -1121,7 +1121,7 @@
if (value && (G_VALUE_TYPE (value) == G_TYPE_STRING))
name = g_value_get_string ((GValue *) value);
else
- g_warning (_("The 'NAME' parameter must hold a string value, ignored."));
+ g_warning (_("The '%s' parameter must hold a string value, ignored."), "NAME");
}
}
@@ -1160,7 +1160,7 @@
sep = *str;
}
else
- g_warning (_("The 'SEPARATOR' parameter must hold a string value, ignored."));
+ g_warning (_("The '%s' parameter must hold a string value, ignored."), "SEPARATOR");
}
holder = gda_set_get_holder (options, "QUOTE");
if (holder) {
@@ -1174,7 +1174,7 @@
quote = *str;
}
else
- g_warning (_("The 'QUOTE' parameter must hold a string value, ignored."));
+ g_warning (_("The '%s' parameter must hold a string value, ignored."), "QUOTE");
}
holder = gda_set_get_holder (options, "FIELD_QUOTE");
if (holder) {
@@ -1183,7 +1183,7 @@
if (value && (G_VALUE_TYPE (value) == G_TYPE_BOOLEAN))
field_quote = g_value_get_boolean ((GValue *) value);
else
- g_warning (_("The 'FIELD_QUOTE' parameter must hold a boolean value, ignored."));
+ g_warning (_("The '%s' parameter must hold a boolean value, ignored."), "FIELD_QUOTE");
}
}
@@ -1266,7 +1266,7 @@
if (value && (G_VALUE_TYPE (value) == G_TYPE_BOOLEAN))
overwrite = g_value_get_boolean ((GValue *) value);
else
- g_warning (_("The 'OVERWRITE' parameter must hold a boolean value, ignored."));
+ g_warning (_("The '%s' parameter must hold a boolean value, ignored."), "OVERWRITE");
}
}
Modified: trunk/libgda/gda-server-operation.c
==============================================================================
--- trunk/libgda/gda-server-operation.c (original)
+++ trunk/libgda/gda-server-operation.c Mon Jun 9 20:15:24 2008
@@ -176,7 +176,7 @@
NULL, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (object_class, PROP_OP_TYPE,
g_param_spec_int ("op_type", NULL, NULL,
- 0, GDA_SERVER_OPERATION_NB - 1,
+ 0, GDA_SERVER_OPERATION_LAST - 1,
0, G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}
Modified: trunk/libgda/gda-server-operation.h
==============================================================================
--- trunk/libgda/gda-server-operation.h (original)
+++ trunk/libgda/gda-server-operation.h Mon Jun 9 20:15:24 2008
@@ -56,7 +56,7 @@
GDA_SERVER_OPERATION_CREATE_VIEW,
GDA_SERVER_OPERATION_DROP_VIEW,
- GDA_SERVER_OPERATION_NB
+ GDA_SERVER_OPERATION_LAST
} GdaServerOperationType;
typedef enum {
Modified: trunk/libgda/gda-server-provider.c
==============================================================================
--- trunk/libgda/gda-server-provider.c (original)
+++ trunk/libgda/gda-server-provider.c Mon Jun 9 20:15:24 2008
@@ -420,7 +420,7 @@
static OpReq **op_req_table = NULL;
if (! op_req_table) {
- op_req_table = g_new0 (OpReq *, GDA_SERVER_OPERATION_NB);
+ op_req_table = g_new0 (OpReq *, GDA_SERVER_OPERATION_LAST);
op_req_table [GDA_SERVER_OPERATION_CREATE_DB] = op_req_CREATE_DB;
op_req_table [GDA_SERVER_OPERATION_DROP_DB] = op_req_DROP_DB;
Modified: trunk/libgda/gda-value.c
==============================================================================
--- trunk/libgda/gda-value.c (original)
+++ trunk/libgda/gda-value.c Mon Jun 9 20:15:24 2008
@@ -40,6 +40,9 @@
#include <libxml/tree.h>
#define l_g_value_unset(val) G_STMT_START{ if (G_IS_VALUE (val)) g_value_unset (val); }G_STMT_END
+#ifdef G_OS_WIN32
+#define bcmp(s1, s2, n) memcmp ((s1), (s2), (n))
+#endif
static gboolean
set_from_string (GValue *value, const gchar *as_string)
Added: trunk/po/LINGUAS
==============================================================================
--- (empty file)
+++ trunk/po/LINGUAS Mon Jun 9 20:15:24 2008
@@ -0,0 +1,48 @@
+ar
+az
+ca
+cs
+da
+de
+dz
+el
+en_CA
+en_GB
+es
+eu
+fa
+fi
+fr
+ga
+gl
+hr
+hu
+it
+ja
+ko
+lt
+mk
+ml
+ms
+nb
+ne
+nl
+oc
+pa
+pl
+pt
+pt_BR
+ru
+rw
+sk
+sl
+sq
+sr
+sr Latn
+sv
+tr
+uk
+vi
+zh_CN
+zh_HK
+zh_TW
Modified: trunk/po/POTFILES.skip
==============================================================================
--- trunk/po/POTFILES.skip (original)
+++ trunk/po/POTFILES.skip Mon Jun 9 20:15:24 2008
@@ -34,7 +34,7 @@
providers/oracle/oracle_specs_drop_index.xml.in
providers/oracle/oracle_specs_drop_table.xml.in
providers/oracle/oracle_specs_dsn.xml.in
-providers/oracle/utils.c
+providers/oracle/utils.c
providers/skel-implementation/capi/capi_specs_create_table.xml.in
providers/skel-implementation/capi/capi_specs_dsn.xml.in
providers/skel-implementation/capi/gda-capi-blob-op.c
@@ -56,4 +56,5 @@
providers/sybase/utils.c
providers/xbase/gda-xbase-provider.c
providers/xbase/libmain.c
-providers/xbase/xbase_specs_dsn.xml.in
+providers/xbase/xbase_specs_dsn.xml.in
+testing/html.c
Modified: trunk/providers/bdb/gda-bdb-provider.c
==============================================================================
--- trunk/providers/bdb/gda-bdb-provider.c (original)
+++ trunk/providers/bdb/gda-bdb-provider.c Mon Jun 9 20:15:24 2008
@@ -20,6 +20,9 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#ifdef USING_MINGW
+#define _NO_OLDNAMES
+#endif
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
Modified: trunk/providers/bdb/gda-bdb-test.c
==============================================================================
--- trunk/providers/bdb/gda-bdb-test.c (original)
+++ trunk/providers/bdb/gda-bdb-test.c Mon Jun 9 20:15:24 2008
@@ -1,3 +1,6 @@
+#ifdef USING_MINGW
+#define _NO_OLDNAMES
+#endif
#include <libgda/libgda.h>
#include <sql-parser/gda-sql-parser.h>
#include <string.h>
Added: trunk/providers/bdb/patch_db.h
==============================================================================
--- (empty file)
+++ trunk/providers/bdb/patch_db.h Mon Jun 9 20:15:24 2008
@@ -0,0 +1,46 @@
+--- db.h.orig 2008-06-09 14:22:38.000000000 +0200
++++ db.h 2008-06-09 14:24:24.000000000 +0200
+@@ -75,17 +75,23 @@
+ * We also provide the standard u_int, u_long etc., if they're not provided
+ * by the system.
+ */
+-#ifndef __BIT_TYPES_DEFINED__
+-#define __BIT_TYPES_DEFINED__
++#ifndef __BIT_TYPES_DEFINED__
++#define __BIT_TYPES_DEFINED__
+ typedef unsigned char u_int8_t;
+-typedef short int16_t;
+ typedef unsigned short u_int16_t;
+-typedef int int32_t;
+ typedef unsigned int u_int32_t;
+-typedef __int64 int64_t;
+ typedef unsigned __int64 u_int64_t;
++
++#if defined __GNUC__
++#include <inttypes.h>
++#else
++typedef short int16_t;
++typedef int int32_t;
++typedef __int64 int64_t;
++#endif
+ #endif
+
++
+ #ifndef _WINSOCKAPI_
+ typedef unsigned char u_char;
+ typedef unsigned int u_int;
+@@ -111,12 +117,14 @@
+ * get upset about that. So far we haven't run on any machine where there's
+ * no unsigned type the same size as a pointer -- here's hoping.
+ */
++#if !defined __GNUC__
+ typedef u_int64_t uintmax_t;
+ #ifdef _WIN64
+ typedef u_int64_t uintptr_t;
+ #else
+ typedef u_int32_t uintptr_t;
+ #endif
++#endif
+
+ /*
+ * Windows defines off_t to long (i.e., 32 bits). We need to pass 64-bit
Modified: trunk/providers/mysql/gda-mysql.h
==============================================================================
--- trunk/providers/mysql/gda-mysql.h (original)
+++ trunk/providers/mysql/gda-mysql.h Mon Jun 9 20:15:24 2008
@@ -29,6 +29,9 @@
#define MYSQL_PROVIDER_NAME "MySQL"
#include <libgda/libgda.h>
+#ifdef G_OS_WIN32
+#include <winsock.h>
+#endif
#include <mysql.h>
/*
Added: trunk/providers/mysql/libmysql.def
==============================================================================
--- (empty file)
+++ trunk/providers/mysql/libmysql.def Mon Jun 9 20:15:24 2008
@@ -0,0 +1,245 @@
+LIBRARY LIBMYSQL
+VERSION 6.0
+EXPORTS
+ _dig_vec_lower
+ _dig_vec_upper
+ bmove_upp
+ delete_dynamic
+ free_defaults
+ getopt_compare_strings
+ getopt_ull_limit_value
+ handle_options
+ init_dynamic_array
+ insert_dynamic
+ int2str
+ is_prefix
+ list_add
+ list_delete
+ load_defaults
+ my_end
+ my_getopt_print_errors
+ my_init
+ my_malloc
+ my_memdup
+ my_no_flags_free
+ my_path
+ mysql_get_parameters
+ my_print_help
+ my_print_variables
+ my_realloc
+ my_strdup
+ mysql_thread_end
+ mysql_thread_init
+ myodbc_remove_escape
+ mysql_affected_rows
+ mysql_autocommit
+ mysql_stmt_bind_param
+ mysql_stmt_bind_result
+ mysql_change_user
+ mysql_character_set_name
+ mysql_close
+ mysql_commit
+ mysql_data_seek
+ mysql_debug
+ mysql_dump_debug_info
+ mysql_eof
+ mysql_errno
+ mysql_error
+ mysql_escape_string
+ mysql_hex_string
+ mysql_stmt_execute
+ mysql_stmt_fetch
+ mysql_stmt_fetch_column
+ mysql_fetch_field
+ mysql_fetch_field_direct
+ mysql_fetch_fields
+ mysql_fetch_lengths
+ mysql_fetch_row
+ mysql_field_count
+ mysql_field_seek
+ mysql_field_tell
+ mysql_free_result
+ mysql_get_client_info
+ mysql_get_host_info
+ mysql_get_proto_info
+ mysql_get_server_info
+ mysql_get_client_version
+ mysql_get_ssl_cipher
+ mysql_info 4
+ mysql_init
+ mysql_insert_id
+ mysql_kill
+ mysql_set_server_option
+ mysql_list_dbs
+ mysql_list_fields
+ mysql_list_processes
+ mysql_list_tables
+ mysql_more_results
+ mysql_next_result
+ mysql_num_fields
+ mysql_num_rows
+ mysql_odbc_escape_string
+ mysql_options
+ mysql_stmt_param_count
+ mysql_stmt_param_metadata
+ mysql_ping
+ mysql_stmt_result_metadata
+ mysql_query
+ mysql_read_query_result
+ mysql_real_connect
+ mysql_real_escape_string
+ mysql_real_query
+ mysql_refresh
+ mysql_rollback
+ mysql_row_seek
+ mysql_row_tell
+ mysql_select_db
+ mysql_stmt_send_long_data
+ mysql_send_query
+ mysql_shutdown
+ mysql_ssl_set
+ mysql_stat
+ mysql_stmt_affected_rows
+ mysql_stmt_close
+ mysql_stmt_reset
+ mysql_stmt_data_seek
+ mysql_stmt_errno
+ mysql_stmt_error
+ mysql_stmt_free_result
+ mysql_stmt_num_rows
+ mysql_stmt_row_seek
+ mysql_stmt_row_tell
+ mysql_stmt_store_result
+ mysql_store_result
+ mysql_thread_id
+ mysql_thread_safe
+ mysql_use_result
+ mysql_warning_count
+ mysql_stmt_sqlstate
+ mysql_sqlstate
+ mysql_get_server_version
+ set_dynamic
+ strcend
+ strcont
+ strdup_root
+ strfill
+ strinstr
+ strmake
+ strmov
+ strxmov
+ mysql_stmt_prepare
+ mysql_stmt_init
+ mysql_stmt_insert_id
+ mysql_stmt_attr_get
+ mysql_stmt_attr_set
+ mysql_stmt_field_count
+ client_errors
+ mysql_set_local_infile_default
+ mysql_set_local_infile_handler
+ mysql_disable_reads_from_master
+ mysql_disable_rpl_parse
+ mysql_enable_reads_from_master
+ mysql_enable_rpl_parse
+ mysql_master_query
+ mysql_rpl_parse_enabled
+ mysql_rpl_probe
+ mysql_rpl_query_type
+ mysql_slave_query
+ mysql_embedded
+ mysql_server_init 12
+ mysql_server_end 0
+ mysql_set_character_set
+ mysql_get_character_set_info
+ get_defaults_options
+ modify_defaults_file
+ mysql_affected_rows 4
+ mysql_close 4
+ mysql_error 4
+ mysql_escape_string 12
+ mysql_fetch_fields 4
+ mysql_fetch_lengths 4
+ mysql_fetch_row 4
+ mysql_free_result 4
+ mysql_init 4
+ mysql_num_fields 4
+ mysql_options 12
+ mysql_query 8
+ mysql_real_connect 32
+ mysql_real_escape_string 16
+ mysql_stmt_bind_param 8
+ mysql_stmt_bind_result 8
+ mysql_stmt_close 4
+ mysql_stmt_error 4
+ mysql_stmt_execute 4
+ mysql_stmt_fetch 4
+ mysql_stmt_free_result 4
+ mysql_stmt_init 4
+ mysql_stmt_param_count 4
+ mysql_stmt_prepare 12
+ mysql_stmt_result_metadata 4
+ mysql_stmt_store_result 4
+ mysql_store_result 4
+ mysql_use_result 4
+ myodbc_remove_escape 8
+ mysql_autocommit 8
+ mysql_change_user 16
+ mysql_character_set_name 4
+ mysql_commit 4
+ mysql_connect
+ mysql_create_db
+ mysql_debug 4
+ mysql_dump_debug_info 4
+ mysql_eof 4
+ mysql_fetch_field 4
+ mysql_fetch_field_direct 8
+ mysql_field_count 4
+ mysql_field_seek 8
+ mysql_field_tell 4
+ mysql_get_client_info 0
+ mysql_get_client_version 0
+ mysql_get_host_info 4
+ mysql_get_proto_info 4
+ mysql_get_server_info 4
+ mysql_get_server_version 4
+ mysql_hex_string 12
+ mysql_kill 8
+ mysql_list_dbs 8
+ mysql_list_fields 12
+ mysql_list_processes 4
+ mysql_list_tables 8
+ mysql_more_results 4
+ mysql_next_result 4
+ mysql_num_rows 4
+ mysql_ping 4
+ mysql_real_query 12
+ mysql_rollback 4
+ mysql_row_tell 4
+ mysql_select_db 8
+ mysql_set_server_option 8
+ mysql_shutdown 8
+ mysql_sqlstate 4
+ mysql_ssl_set 24
+ mysql_stat 4
+ mysql_stmt_affected_rows 4
+ mysql_stmt_attr_get 12
+ mysql_stmt_attr_set 12
+ mysql_stmt_data_seek 12
+ mysql_stmt_errno 4
+ mysql_stmt_fetch_column 16
+ mysql_stmt_field_count 4
+ mysql_stmt_insert_id 4
+ mysql_stmt_num_rows 4
+ mysql_stmt_param_metadata 4
+ mysql_stmt_reset 4
+ mysql_stmt_row_seek 8
+ mysql_stmt_row_tell 4
+ mysql_stmt_send_long_data 16
+ mysql_stmt_sqlstate 4
+ mysql_thread_end 0
+ mysql_thread_id 4
+ mysql_thread_init 0
+ mysql_thread_safe 0
+ mysql_warning_count 4
+ mysql_errno 4
+ mysql_insert_id 4
+ mysql_set_character_set 8
Modified: trunk/providers/postgres/gda-postgres-ddl.c
==============================================================================
--- trunk/providers/postgres/gda-postgres-ddl.c (original)
+++ trunk/providers/postgres/gda-postgres-ddl.c Mon Jun 9 20:15:24 2008
@@ -639,3 +639,106 @@
return sql;
}
+
+gchar *
+gda_postgres_render_CREATE_VIEW (GdaServerProvider *provider, GdaConnection *cnc,
+ GdaServerOperation *op, GError **error)
+{
+ GString *string;
+ const GValue *value;
+ gboolean allok = TRUE;
+ gchar *sql = NULL;
+
+ string = g_string_new ("CREATE ");
+
+ value = gda_server_operation_get_value_at (op, "/VIEW_DEF_P/VIEW_OR_REPLACE");
+ if (value && G_VALUE_HOLDS (value, G_TYPE_BOOLEAN) && g_value_get_boolean (value))
+ g_string_append (string, "OR REPLACE ");
+
+ value = gda_server_operation_get_value_at (op, "/VIEW_DEF_P/VIEW_TEMP");
+ if (value && G_VALUE_HOLDS (value, G_TYPE_BOOLEAN) && g_value_get_boolean (value))
+ g_string_append (string, "TEMP ");
+
+ g_string_append (string, "VIEW ");
+
+ value = gda_server_operation_get_value_at (op, "/VIEW_DEF_P/VIEW_NAME");
+ g_assert (value && G_VALUE_HOLDS (value, G_TYPE_STRING));
+ g_string_append (string, g_value_get_string (value));
+
+ if (allok) {
+ GdaServerOperationNode *node;
+
+ node = gda_server_operation_get_node_info (op, "/FIELDS_A");
+ if (node) {
+ gint i, nrows;
+ GString *cols = NULL;
+
+ nrows = gda_data_model_get_n_rows (node->model);
+ for (i = 0; i < nrows; i++) {
+ value = gda_server_operation_get_value_at (op, "/FIELDS_A/@COLUMN_NAME/%d", i);
+ if (!value || !G_VALUE_HOLDS (value, G_TYPE_STRING))
+ continue;
+ if (!cols)
+ cols = g_string_new ("(\"");
+ else
+ g_string_append (cols, ", \"");
+ g_string_append (cols, g_value_get_string (value));
+ g_string_append_c (cols, '\"');
+ g_string_append_c (cols, ' ');
+ }
+ if (cols) {
+ g_string_append_c (cols, ")");
+ g_string_append (string, cols->str);
+ g_string_free (cols, TRUE);
+ }
+ }
+ }
+
+ if (allok) {
+ value = gda_server_operation_get_value_at (op, "/VIEW_DEF_P/VIEW_DEF");
+ g_assert (value && G_VALUE_HOLDS (value, G_TYPE_STRING));
+ g_string_append (string, " AS ");
+ g_string_append (string, g_value_get_string (value));
+ }
+
+ if (allok) {
+ sql = string->str;
+ g_string_free (string, FALSE);
+ }
+ else {
+ sql = NULL;
+ g_string_free (string, TRUE);
+ }
+
+ return sql;
+}
+
+gchar *
+gda_postgres_render_DROP_VIEW (GdaServerProvider *provider, GdaConnection *cnc,
+ GdaServerOperation *op, GError **error)
+{
+ GString *string;
+ const GValue *value;
+ gchar *sql = NULL;
+
+ string = g_string_new ("DROP VIEW");
+
+ value = gda_server_operation_get_value_at (op, "/VIEW_DESC_P/VIEW_IFEXISTS");
+ if (value && G_VALUE_HOLDS (value, G_TYPE_BOOLEAN) && g_value_get_boolean (value))
+ g_string_append (string, " IF EXISTS");
+
+ value = gda_server_operation_get_value_at (op, "/VIEW_DESC_P/VIEW_NAME");
+ g_assert (value && G_VALUE_HOLDS (value, G_TYPE_STRING));
+ g_string_append_c (string, ' ');
+ g_string_append (string, g_value_get_string (value));
+
+ value = gda_server_operation_get_value_at (op, "/VIEW_DESC_P/REFERENCED_ACTION");
+ g_assert (value && G_VALUE_HOLDS (value, G_TYPE_STRING));
+ g_string_append_c (string, ' ');
+ g_string_append (string, g_value_get_string (value));
+
+ sql = string->str;
+ g_string_free (string, FALSE);
+
+ return sql;
+}
Modified: trunk/testing/gda-provider-status.c
==============================================================================
--- trunk/testing/gda-provider-status.c (original)
+++ trunk/testing/gda-provider-status.c Mon Jun 9 20:15:24 2008
@@ -24,15 +24,14 @@
#include <sql-parser/gda-sql-parser.h>
#include "html.h"
#include <libgda/gda-enum-types.h>
+#include <libgda/sqlite/virtual/gda-virtual-provider.h>
/* options */
gboolean ask_pass = FALSE;
gchar *outfile = NULL;
-gchar *raw_prov = NULL;
static GOptionEntry entries[] = {
{ "no-password-ask", 'p', 0, G_OPTION_ARG_NONE, &ask_pass, "Don't ast for a password when it is empty", NULL },
- { "prov", 'P', 0, G_OPTION_ARG_STRING, &raw_prov, "Provider to be used", NULL },
{ "output-file", 'o', 0, G_OPTION_ARG_STRING, &outfile, "Output file", "output file"},
{ NULL }
};
@@ -49,7 +48,6 @@
GError *error = NULL;
int exit_status = EXIT_SUCCESS;
GSList *list, *cnc_list = NULL;
- GdaServerProvider *prov = NULL;
context = g_option_context_new ("[DSN|connection string]...");
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
@@ -68,50 +66,61 @@
"index.html", "Providers status");
config->dir = g_strdup (".");
- if (raw_prov) {
- prov = gda_config_get_provider_object (raw_prov, &error);
- if (!prov) {
- g_print ("Can't load the '%s' provider: %s\n", raw_prov,
- error && error->message ? error->message : "No detail");
- return EXIT_FAILURE;
- }
- if (!report_provider_status (prov, NULL)) {
- exit_status = EXIT_FAILURE;
- goto cleanup;
-
+ /* parse command line arguments for connections */
+ if (argc > 1) {
+ gint i;
+ for (i = 1; i < argc; i++) {
+ /* open connection */
+ GdaConnection *cnc;
+ cnc = open_connection (argv[i], &error);
+ if (!cnc) {
+ g_print ("Can't open connection to '%s': %s\n", argv[i],
+ error && error->message ? error->message : "No detail");
+ exit_status = EXIT_FAILURE;
+ goto cleanup;
+ }
+ cnc_list = g_slist_append (cnc_list, cnc);
}
}
-
- /* use connections if specified */
- gint i;
- for (i = 1; i < argc; i++) {
- /* open connection */
- GdaConnection *cnc;
- cnc = open_connection (argv[i], &error);
- if (!cnc) {
- g_print ("Can't open connection to '%s': %s\n", argv[i],
- error && error->message ? error->message : "No detail");
- exit_status = EXIT_FAILURE;
- goto cleanup;
+ else {
+ if (getenv ("GDA_SQL_CNC")) {
+ GdaConnection *cnc;
+ cnc = open_connection (getenv ("GDA_SQL_CNC"), &error);
+ if (!cnc) {
+ g_print ("Can't open connection defined by GDA_SQL_CNC: %s\n",
+ error && error->message ? error->message : "No detail");
+ exit_status = EXIT_FAILURE;
+ goto cleanup;
+ }
+ cnc_list = g_slist_append (cnc_list, cnc);
}
- cnc_list = g_slist_append (cnc_list, cnc);
- }
- if (getenv ("GDA_SQL_CNC")) {
- GdaConnection *cnc;
- cnc = open_connection (getenv ("GDA_SQL_CNC"), &error);
- if (!cnc) {
- g_print ("Can't open connection defined by GDA_SQL_CNC: %s\n",
- error && error->message ? error->message : "No detail");
- exit_status = EXIT_FAILURE;
- goto cleanup;
+ else {
+ /* report status for all providers */
+ GdaDataModel *providers;
+ gint i, nb;
+
+ providers = gda_config_list_providers ();
+ nb = gda_data_model_get_n_rows (providers);
+ for (i = 0; i < nb; i++) {
+ GdaServerProvider *prov = NULL;
+ const gchar *pname;
+ pname = g_value_get_string (gda_data_model_get_value_at (providers, 0, i));
+ prov = gda_config_get_provider_object (pname, &error);
+ if (!prov)
+ g_error ("Can't load the '%s' provider: %s\n", pname,
+ error && error->message ? error->message : "No detail");
+ if (!report_provider_status (prov, NULL)) {
+ exit_status = EXIT_FAILURE;
+ goto cleanup;
+ }
+ }
+ g_object_unref (providers);
}
- cnc_list = g_slist_append (cnc_list, cnc);
}
-
/* report provider's status for all the connections */
for (list = cnc_list; list; list = list->next) {
- if (!report_provider_status (prov, GDA_CONNECTION (list->data))) {
+ if (!report_provider_status (NULL, GDA_CONNECTION (list->data))) {
exit_status = EXIT_FAILURE;
goto cleanup;
@@ -213,8 +222,17 @@
static gboolean
report_provider_status (GdaServerProvider *prov, GdaConnection *cnc)
{
- gchar *str;
+ gchar *header_str;
HtmlFile *file = config->index;
+ gboolean is_virt;
+
+ typedef void (*AFunc) (void);
+ typedef struct {
+ const gchar *name;
+ gboolean should_be;
+ void (*func) (void);
+ } ProvFunc;
+ GdaServerProviderClass *pclass;
if (prov && cnc && (prov != gda_connection_get_provider_obj (cnc)))
/* ignoring connection as it has a different provider */
@@ -223,90 +241,15 @@
/* section */
if (cnc)
- str = g_strdup_printf ("Report for connection '%s'", gda_connection_get_cnc_string (cnc));
+ header_str = g_strdup_printf ("Report for connection '%s'", gda_connection_get_cnc_string (cnc));
else
- str = g_strdup_printf ("Report for '%s' provider", gda_server_provider_get_name (prov));
- html_add_header (HTML_CONFIG (config), file, str);
- g_free (str);
+ header_str = g_strdup_printf ("Report for '%s' provider", gda_server_provider_get_name (prov));
/* provider info */
if (!prov)
prov = gda_connection_get_provider_obj (cnc);
- xmlNodePtr table, tr, td, hnode;
- GdaSqlParser *parser;
-
- hnode = xmlNewChild (file->body, NULL, "h3", "General information");
- table = xmlNewChild (file->body, NULL, "table", NULL);
- //xmlSetProp(table, "width", (xmlChar*)"100%");
- tr = xmlNewChild (table, NULL, "tr", NULL);
- xmlNewChild (tr, NULL, "th", "Property");
- xmlNewChild (tr, NULL, "th", "Value");
-
- tr = xmlNewChild (table, NULL, "tr", NULL);
- xmlNewChild (tr, NULL, "td", "Provider's name");
- xmlNewChild (tr, NULL, "td", gda_server_provider_get_name (prov));
-
- tr = xmlNewChild (table, NULL, "tr", NULL);
- xmlNewChild (tr, NULL, "td", "Provider's version");
- xmlNewChild (tr, NULL, "td", gda_server_provider_get_version (prov));
-
- tr = xmlNewChild (table, NULL, "tr", NULL);
- xmlNewChild (tr, NULL, "td", "Provider's server version");
- xmlNewChild (tr, NULL, "td", cnc ? gda_server_provider_get_server_version (prov, cnc) : "---");
-
- parser = gda_server_provider_create_parser (prov, cnc);
- tr = xmlNewChild (table, NULL, "tr", NULL);
- xmlNewChild (tr, NULL, "td", "Creates its own SQL parser");
- xmlNewChild (tr, NULL, "td", parser ? "Yes" : "No");
- if (parser)
- g_object_unref (parser);
-
- /* supported features */
- GdaConnectionFeature f;
- hnode = xmlNewChild (file->body, NULL, "h3", "Supported features");
- table = xmlNewChild (file->body, NULL, "table", NULL);
-
- tr = xmlNewChild (table, NULL, "tr", NULL);
- xmlNewChild (tr, NULL, "th", "Feature");
- xmlNewChild (tr, NULL, "th", "Supported ?");
- for (f = 0; f < GDA_CONNECTION_FEATURE_LAST; f++) {
- GEnumValue *ev;
-
- ev = g_enum_get_value ((GEnumClass *) g_type_class_ref (GDA_TYPE_CONNECTION_FEATURE), f);
-
- tr = xmlNewChild (table, NULL, "tr", NULL);
- xmlNewChild (tr, NULL, "td", ev->value_name);
- xmlNewChild (tr, NULL, "td", gda_server_provider_supports_feature (prov, cnc, f) ? "Yes" : "No");
- }
-
- /* supported operations */
- GdaServerOperationType op;
- hnode = xmlNewChild (file->body, NULL, "h3", "Supported server operations");
- table = xmlNewChild (file->body, NULL, "table", NULL);
-
- tr = xmlNewChild (table, NULL, "tr", NULL);
- xmlNewChild (tr, NULL, "th", "Server operation");
- xmlNewChild (tr, NULL, "th", "Supported ?");
- for (op = 0; op < GDA_SERVER_OPERATION_NB; op++) {
- GEnumValue *ev;
-
- ev = g_enum_get_value ((GEnumClass *) g_type_class_ref (GDA_TYPE_SERVER_OPERATION_TYPE), op);
-
- tr = xmlNewChild (table, NULL, "tr", NULL);
- xmlNewChild (tr, NULL, "td", ev->value_name);
- xmlNewChild (tr, NULL, "td", gda_server_provider_supports_operation (prov, cnc, op, NULL) ? "Yes" : "No");
- }
-
- /* virtual methods implementation */
- gint i;
- typedef void (*AFunc) (void);
- typedef struct {
- const gchar *name;
- gboolean should_be;
- void (*func) (void);
- } ProvFunc;
- GdaServerProviderClass *pclass = (GdaServerProviderClass*)
- G_OBJECT_GET_CLASS (prov);
+ is_virt = GDA_IS_VIRTUAL_PROVIDER (prov);
+ pclass = (GdaServerProviderClass*) G_OBJECT_GET_CLASS (prov);
ProvFunc fa[] = {
{"get_name", TRUE, (AFunc) pclass->get_name},
{"get_version", TRUE, (AFunc) pclass->get_version},
@@ -319,7 +262,7 @@
{"open_connection", TRUE, (AFunc) pclass->open_connection},
{"close_connection", TRUE, (AFunc) pclass->close_connection},
{"get_database", TRUE, (AFunc) pclass->get_database},
- {"supports_operation", TRUE, (AFunc) pclass->supports_operation},
+ {"supports_operation", is_virt ? FALSE : TRUE, (AFunc) pclass->supports_operation},
{"create_operation", FALSE, (AFunc) pclass->create_operation},
{"render_operation", FALSE, (AFunc) pclass->render_operation},
{"perform_operation", FALSE, (AFunc) pclass->perform_operation},
@@ -334,29 +277,10 @@
{"statement_prepare", TRUE, (AFunc) pclass->statement_prepare},
{"statement_execute", TRUE, (AFunc) pclass->statement_execute},
};
- hnode = xmlNewChild (file->body, NULL, "h3", "Main virtual methods implementation");
- table = xmlNewChild (file->body, NULL, "table", NULL);
- tr = xmlNewChild (table, NULL, "tr", NULL);
- xmlNewChild (tr, NULL, "th", "Server's virtual method");
- xmlNewChild (tr, NULL, "th", "Implemented ?");
-
- for (i = 0; i < sizeof (fa) / sizeof (ProvFunc); i++) {
- gchar *str;
- ProvFunc *pf = &(fa[i]);
- tr = xmlNewChild (table, NULL, "tr", NULL);
- str = g_strdup_printf ("%s ()", pf->name);
- xmlNewChild (tr, NULL, "td", str);
- g_free (str);
- td = xmlNewChild (tr, NULL, "td", pf->func ? "Yes" : "No");
- if (pf->should_be && !pf->func)
- xmlSetProp(td, "class", (xmlChar*)"error");
- }
-
- /* meta data implementation */
ProvFunc md[] = {
{"_info", TRUE, (AFunc) pclass->meta_funcs._info},
- {"_btypes", TRUE, (AFunc) pclass->meta_funcs._btypes},
+ {"_btypes", TRUE, (AFunc) pclass->meta_funcs._btypes},
{"_udt", TRUE, (AFunc) pclass->meta_funcs._udt},
{"udt", TRUE, (AFunc) pclass->meta_funcs.udt},
{"_udt_cols", TRUE, (AFunc) pclass->meta_funcs._udt_cols},
@@ -398,78 +322,248 @@
{"_routine_par", TRUE, (AFunc) pclass->meta_funcs._routine_par},
{"routine_par", TRUE, (AFunc) pclass->meta_funcs.routine_par},
};
- hnode = xmlNewChild (file->body, NULL, "h3", "Meta data methods implementation");
+ gboolean has_xa = gda_server_provider_supports_feature (prov, cnc,
+ GDA_CONNECTION_FEATURE_XA_TRANSACTIONS);
+
+
+ xmlNodePtr table, tr, td, span;
+ GdaSqlParser *parser;
+ GString *string;
+ gint i;
+ GdaProviderInfo *pinfo;
+
+ pinfo = gda_config_get_provider_info (gda_server_provider_get_name (prov));
+ g_assert (pinfo);
+
table = xmlNewChild (file->body, NULL, "table", NULL);
+ xmlSetProp (table, "width", (xmlChar*)"100%");
+ tr = xmlNewChild (table, NULL, "tr", NULL);
+ td = xmlNewChild (tr, NULL, "th", header_str);
+ xmlSetProp (td, "colspan", (xmlChar*)"4");
+ /* line 1 */
tr = xmlNewChild (table, NULL, "tr", NULL);
- xmlNewChild (tr, NULL, "th", "Meta data's method");
- xmlNewChild (tr, NULL, "th", "Implemented ?");
+ xmlNewChild (tr, NULL, "td", "Provider's name:");
+ td = xmlNewChild (tr, NULL, "td", gda_server_provider_get_name (prov));
+ xmlSetProp (td, "width", (xmlChar*)"35%");
+ xmlNewChild (tr, NULL, "td", "Provider is virtual:");
+ td = xmlNewChild (tr, NULL, "td", is_virt ? "Yes (uses the SQLite engine)" : "No");
+ xmlSetProp (td, "width", (xmlChar*)"35%");
+ /* line 2 */
+ tr = xmlNewChild (table, NULL, "tr", NULL);
+ xmlNewChild (tr, NULL, "td", "Provider's version:");
+ xmlNewChild (tr, NULL, "td", gda_server_provider_get_version (prov));
+ xmlNewChild (tr, NULL, "td", "Provider's server version:");
+ xmlNewChild (tr, NULL, "td", cnc ? gda_server_provider_get_server_version (prov, cnc) : "(non connected)");
+
+ /* line 3 */
+ tr = xmlNewChild (table, NULL, "tr", NULL);
+ xmlNewChild (tr, NULL, "td", "Provider's description:");
+ xmlNewChild (tr, NULL, "td", pinfo->description);
+ xmlNewChild (tr, NULL, "td", "Filename:");
+ xmlNewChild (tr, NULL, "td", pinfo->location);
+
+ /* line 4 */
+ parser = gda_server_provider_create_parser (prov, cnc);
+ tr = xmlNewChild (table, NULL, "tr", NULL);
+ xmlNewChild (tr, NULL, "td", "Creates its own SQL parser:");
+ xmlNewChild (tr, NULL, "td", parser ? "Yes" : "No");
+ if (parser)
+ g_object_unref (parser);
+ xmlNewChild (tr, NULL, "td", "Non implemented base methods:");
+ span = NULL;
+ td = xmlNewChild (tr, NULL, "td", NULL);
+ for (i = 0; i < sizeof (fa) / sizeof (ProvFunc); i++) {
+ gchar *str;
+ ProvFunc *pf = &(fa[i]);
+
+ if (pf->func)
+ continue;
+
+ if (span)
+ str = g_strdup_printf (", %s()", pf->name);
+ else
+ str = g_strdup_printf ("%s()", pf->name);
+ span = xmlNewChild (td, NULL, "span", str);
+ g_free (str);
+ if (pf->should_be)
+ xmlSetProp (span, "class", (xmlChar*)"error");
+ }
+ if (!span)
+ xmlNodeSetContent (td, (xmlChar*) "---");
+
+ /* line 5 */
+ tr = xmlNewChild (table, NULL, "tr", NULL);
+ xmlNewChild (tr, NULL, "td", "Non implemented meta data methods:");
+ span = NULL;
+ td = xmlNewChild (tr, NULL, "td", NULL);
for (i = 0; i < sizeof (md) / sizeof (ProvFunc); i++) {
gchar *str;
ProvFunc *pf = &(md[i]);
- tr = xmlNewChild (table, NULL, "tr", NULL);
- str = g_strdup_printf ("%s ()", pf->name);
- xmlNewChild (tr, NULL, "td", str);
+
+ if (pf->func)
+ continue;
+
+ if (span)
+ str = g_strdup_printf (", %s()", pf->name);
+ else
+ str = g_strdup_printf ("%s()", pf->name);
+ span = xmlNewChild (td, NULL, "span", str);
g_free (str);
- td = xmlNewChild (tr, NULL, "td", pf->func ? "Yes" : "No");
- if (pf->should_be && !pf->func)
- xmlSetProp(td, "class", (xmlChar*)"error");
+ if (pf->should_be)
+ xmlSetProp (span, "class", (xmlChar*)"error");
}
+ if (!span)
+ xmlNodeSetContent (td, (xmlChar*) "---");
- /* distributed transaction implementation */
- gboolean has_xa = gda_server_provider_supports_feature (prov, cnc,
- GDA_CONNECTION_FEATURE_XA_TRANSACTIONS);
- hnode = xmlNewChild (file->body, NULL, "h3", "Distributed transaction implementation");
+ xmlNewChild (tr, NULL, "td", "Non implemented XA transactions:");
if (pclass->xa_funcs) {
if (!has_xa) {
- xmlNodePtr para;
- para = xmlNewChild (file->body, NULL, "para",
- "The provider has the 'xa_funcs' part but "
- "reports that distributed transactions are "
- "not supported.");
- xmlSetProp(para, "class", (xmlChar*)"warning");
+ td = xmlNewChild (tr, NULL, "td",
+ "The provider has the 'xa_funcs' part but "
+ "reports that distributed transactions are "
+ "not supported.");
+ xmlSetProp (td, "class", (xmlChar*)"warning");
+ }
+ else {
+ ProvFunc dt[] = {
+ {"xa_start", TRUE, (AFunc) pclass->xa_funcs->xa_start},
+ {"xa_end", FALSE, (AFunc) pclass->xa_funcs->xa_end},
+ {"xa_prepare", TRUE, (AFunc) pclass->xa_funcs->xa_prepare},
+ {"xa_commit", TRUE, (AFunc) pclass->xa_funcs->xa_commit},
+ {"xa_rollback", TRUE, (AFunc) pclass->xa_funcs->xa_rollback},
+ {"xa_recover", TRUE, (AFunc) pclass->xa_funcs->xa_recover},
+ };
+ span = NULL;
+ td = xmlNewChild (tr, NULL, "td", NULL);
+ for (i = 0; i < sizeof (dt) / sizeof (ProvFunc); i++) {
+ gchar *str;
+ ProvFunc *pf = &(dt[i]);
+
+ if (pf->func)
+ continue;
+
+ if (span)
+ str = g_strdup_printf (", %s()", pf->name);
+ else
+ str = g_strdup_printf ("%s()", pf->name);
+ span = xmlNewChild (td, NULL, "span", str);
+ g_free (str);
+ if (pf->should_be)
+ xmlSetProp (span, "class", (xmlChar*)"error");
+ }
+ if (!span)
+ xmlNodeSetContent (td, (xmlChar*) "---");
}
-
- ProvFunc dt[] = {
- {"xa_start", TRUE, (AFunc) pclass->xa_funcs->xa_start},
- {"xa_end", FALSE, (AFunc) pclass->xa_funcs->xa_end},
- {"xa_prepare", TRUE, (AFunc) pclass->xa_funcs->xa_prepare},
- {"xa_commit", TRUE, (AFunc) pclass->xa_funcs->xa_commit},
- {"xa_rollback", TRUE, (AFunc) pclass->xa_funcs->xa_rollback},
- {"xa_recover", TRUE, (AFunc) pclass->xa_funcs->xa_recover},
- };
-
- table = xmlNewChild (file->body, NULL, "table", NULL);
-
- tr = xmlNewChild (table, NULL, "tr", NULL);
- xmlNewChild (tr, NULL, "th", "Meta data's method");
- xmlNewChild (tr, NULL, "th", "Implemented ?");
-
- for (i = 0; i < sizeof (dt) / sizeof (ProvFunc); i++) {
- gchar *str;
- ProvFunc *pf = &(dt[i]);
- tr = xmlNewChild (table, NULL, "tr", NULL);
- str = g_strdup_printf ("%s ()", pf->name);
- xmlNewChild (tr, NULL, "td", str);
+ }
+ else {
+ if (has_xa) {
+ td = xmlNewChild (tr, NULL, "td",
+ (xmlChar*) "The provider does not have the 'xa_funcs' part but "
+ "reports that distributed transactions are "
+ "supported.");
+ xmlSetProp (td, "class", (xmlChar*)"warning");
+ }
+ else
+ xmlNewChild (tr, NULL, "td", (xmlChar*) "---");
+ }
+
+ /* line 6 */
+ tr = xmlNewChild (table, NULL, "tr", NULL);
+ xmlNewChild (tr, NULL, "td", "Connection's parameters:");
+ if (pinfo->dsn_params && pinfo->dsn_params->holders) {
+ GSList *list;
+ td = xmlNewChild (tr, NULL, "td", NULL);
+ for (list = pinfo->dsn_params->holders; list; list = list->next) {
+ xmlNodePtr div;
+ gchar *str, *descr;
+ GdaHolder *holder = GDA_HOLDER (list->data);
+ g_object_get (G_OBJECT (holder), "description", &descr, NULL);
+ if (descr)
+ str = g_strdup_printf ("%s: %s", gda_holder_get_id (holder), descr);
+ else
+ str = g_strdup (gda_holder_get_id (holder));
+ g_free (descr);
+ div = xmlNewChild (td, NULL, "div", str);
g_free (str);
- td = xmlNewChild (tr, NULL, "td", pf->func ? "Yes" : "No");
- if (pf->should_be && !pf->func)
- xmlSetProp(td, "class", (xmlChar*)"error");
}
}
else {
- if (has_xa) {
- xmlNodePtr para;
- para = xmlNewChild (file->body, NULL, "para",
- "The provider does not have the 'xa_funcs' part but "
- "reports that distributed transactions are "
- "supported.");
- xmlSetProp(para, "class", (xmlChar*)"warning");
+ td = xmlNewChild (tr, NULL, "td", "None provided");
+ xmlSetProp (td, "class", (xmlChar*)"error");
+ }
+ xmlNewChild (tr, NULL, "td", "Authentication's parameters:");
+ if (pinfo->auth_params) {
+ GSList *list;
+ if (pinfo->auth_params->holders) {
+ td = xmlNewChild (tr, NULL, "td", NULL);
+ for (list = pinfo->auth_params->holders; list; list = list->next) {
+ xmlNodePtr div;
+ gchar *str, *descr;
+ GdaHolder *holder = GDA_HOLDER (list->data);
+ g_object_get (G_OBJECT (holder), "description", &descr, NULL);
+ if (descr)
+ str = g_strdup_printf ("%s: %s", gda_holder_get_id (holder), descr);
+ else
+ str = g_strdup (gda_holder_get_id (holder));
+ g_free (descr);
+ div = xmlNewChild (td, NULL, "div", str);
+ g_free (str);
+ }
}
- xmlNewChild (tr, NULL, "para", "Not implemented");
+ else
+ td = xmlNewChild (tr, NULL, "td", "None required");
}
-
+ else {
+ td = xmlNewChild (tr, NULL, "td", "None provided");
+ xmlSetProp (td, "class", (xmlChar*)"error");
+ }
+
+ /* line 7 */
+ GdaConnectionFeature f;
+ string = NULL;
+ tr = xmlNewChild (table, NULL, "tr", NULL);
+ xmlNewChild (tr, NULL, "td", "Supported features:");
+ for (f = 0; f < GDA_CONNECTION_FEATURE_LAST; f++) {
+ if (gda_server_provider_supports_feature (prov, cnc, f)) {
+ GEnumValue *ev;
+
+ ev = g_enum_get_value ((GEnumClass *) g_type_class_ref (GDA_TYPE_CONNECTION_FEATURE), f);
+ if (!string)
+ string = g_string_new (ev->value_name);
+ else
+ g_string_append_printf (string, ", %s", ev->value_name);
+ }
+ }
+ if (string) {
+ xmlNewChild (tr, NULL, "td", string->str);
+ g_string_free (string, TRUE);
+ }
+ else
+ xmlNewChild (tr, NULL, "td", "---");
+
+ string = NULL;
+ xmlNewChild (tr, NULL, "td", "Unsupported features:");
+ for (f = 0; f < GDA_CONNECTION_FEATURE_LAST; f++) {
+ if (!gda_server_provider_supports_feature (prov, cnc, f)) {
+ GEnumValue *ev;
+
+ ev = g_enum_get_value ((GEnumClass *) g_type_class_ref (GDA_TYPE_CONNECTION_FEATURE), f);
+ if (!string)
+ string = g_string_new (ev->value_name);
+ else
+ g_string_append_printf (string, ", %s", ev->value_name);
+ }
+ }
+ if (string) {
+ xmlNewChild (tr, NULL, "td", string->str);
+ g_string_free (string, TRUE);
+ }
+ else
+ xmlNewChild (tr, NULL, "td", "---");
+
+ g_free (header_str);
return TRUE;
}
Modified: trunk/testing/html.c
==============================================================================
--- trunk/testing/html.c (original)
+++ trunk/testing/html.c Mon Jun 9 20:15:24 2008
@@ -27,7 +27,7 @@
head = xmlNewChild (topnode, NULL, "head", NULL);
node = xmlNewChild (head, NULL, "meta", NULL);
- xmlSetProp(node, "content", (xmlChar*)"charset=ISO-8859-1");
+ xmlSetProp(node, "content", (xmlChar*)"charset=UTF-8");
xmlSetProp(node, "http-equiv", (xmlChar*)"content-type");
node = xmlNewChild (head, NULL, "title", title);
@@ -62,11 +62,15 @@
"table {"
" font-size: 8pt;"
" /*border: 1pt solid #A8E775;*/"
-" padding: 3px;"
+" padding: 10px;"
"}"
""
"tr {"
-" background: #EFEEEF;"
+" background: #EFEFEF;"
+"}"
+""
+"th {"
+" font-size: 12pt;"
"}"
""
".none {"
@@ -77,13 +81,13 @@
".error {"
" color: #FF0000;"
" font: bold;"
-" font-size: large;"
+" /*font-size: large;*/"
"}"
""
".warning {"
" color: #ff9900;"
" font: bold;"
-" font-size: medium;"
+" /*font-size: medium;*/"
"}"
""
".notice {"
@@ -109,9 +113,11 @@
node = xmlNewChild (file->body, NULL, "h1", title);
xmlSetProp(node, "class", (xmlChar*)"title");
+#ifdef NO
/* toc */
file->toc = xmlNewChild (file->body, NULL, "ul", _("Table of contents"));
xmlSetProp(file->toc, "class", (xmlChar*)"none");
+#endif
/* add to @config's list of files */
config->all_files = g_slist_append (config->all_files, file);
Modified: trunk/tools/gda-list-config.c
==============================================================================
--- trunk/tools/gda-list-config.c (original)
+++ trunk/tools/gda-list-config.c Mon Jun 9 20:15:24 2008
@@ -8,7 +8,7 @@
GdaDataModel *model;
gda_init ();
- setenv ("GDA_DATA_MODEL_DUMP_TITLE", "TRUE", TRUE);
+ g_setenv ("GDA_DATA_MODEL_DUMP_TITLE", "TRUE", TRUE);
model = gda_config_list_providers ();
gda_data_model_dump (model, stdout);
Modified: trunk/tools/gda-list-server-op.c
==============================================================================
--- trunk/tools/gda-list-server-op.c (original)
+++ trunk/tools/gda-list-server-op.c Mon Jun 9 20:15:24 2008
@@ -55,7 +55,7 @@
g_print (_("Existing operation types for provider '%s':\n"), prov);
else
g_print (_("Existing operation types:\n"));
- for (type = GDA_SERVER_OPERATION_CREATE_DB; type < GDA_SERVER_OPERATION_NB; type++) {
+ for (type = GDA_SERVER_OPERATION_CREATE_DB; type < GDA_SERVER_OPERATION_LAST; type++) {
if (! prov_obj ||
(prov_obj && gda_server_provider_supports_operation (prov_obj, NULL, type, NULL)))
g_print ("%s\n", gda_server_operation_op_type_to_string (type));
@@ -64,7 +64,7 @@
}
GdaServerOperationType type;
- for (type = GDA_SERVER_OPERATION_CREATE_DB; type != GDA_SERVER_OPERATION_NB; type++) {
+ for (type = GDA_SERVER_OPERATION_CREATE_DB; type != GDA_SERVER_OPERATION_LAST; type++) {
xmlDocPtr doc;
GError *error = NULL;
gboolean op_supported;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]