[GRASS-SVN] r45853 - in grass/trunk: include lib/db lib/db/dbmi_base lib/db/dbmi_client lib/python/ctypes

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Apr 5 16:05:12 EDT 2011


Author: martinl
Date: 2011-04-05 13:05:12 -0700 (Tue, 05 Apr 2011)
New Revision: 45853

Added:
   grass/trunk/include/dbmidefs.h
Removed:
   grass/trunk/include/proto_dbmi.h
Modified:
   grass/trunk/include/dbmi.h
   grass/trunk/lib/db/dbmi_base/alloc.c
   grass/trunk/lib/db/dbmi_base/case.c
   grass/trunk/lib/db/dbmi_base/column.c
   grass/trunk/lib/db/dbmi_base/columnfmt.c
   grass/trunk/lib/db/dbmi_base/connect.c
   grass/trunk/lib/db/dbmi_base/cursor.c
   grass/trunk/lib/db/dbmi_base/datetime.c
   grass/trunk/lib/db/dbmi_base/dbmscap.c
   grass/trunk/lib/db/dbmi_base/default_name.c
   grass/trunk/lib/db/dbmi_base/dirent.c
   grass/trunk/lib/db/dbmi_base/error.c
   grass/trunk/lib/db/dbmi_base/handle.c
   grass/trunk/lib/db/dbmi_base/index.c
   grass/trunk/lib/db/dbmi_base/interval.c
   grass/trunk/lib/db/dbmi_base/isdir.c
   grass/trunk/lib/db/dbmi_base/legal_dbname.c
   grass/trunk/lib/db/dbmi_base/login.c
   grass/trunk/lib/db/dbmi_base/ret_codes.c
   grass/trunk/lib/db/dbmi_base/sqlCtype.c
   grass/trunk/lib/db/dbmi_base/sqltype.c
   grass/trunk/lib/db/dbmi_base/string.c
   grass/trunk/lib/db/dbmi_base/strip.c
   grass/trunk/lib/db/dbmi_base/table.c
   grass/trunk/lib/db/dbmi_base/value.c
   grass/trunk/lib/db/dbmi_base/valuefmt.c
   grass/trunk/lib/db/dbmi_base/whoami.c
   grass/trunk/lib/db/dbmi_base/xdr.c
   grass/trunk/lib/db/dbmi_base/xdrchar.c
   grass/trunk/lib/db/dbmi_base/xdrcolumn.c
   grass/trunk/lib/db/dbmi_base/xdrdatetime.c
   grass/trunk/lib/db/dbmi_base/xdrdouble.c
   grass/trunk/lib/db/dbmi_base/xdrfloat.c
   grass/trunk/lib/db/dbmi_base/xdrhandle.c
   grass/trunk/lib/db/dbmi_base/xdrindex.c
   grass/trunk/lib/db/dbmi_base/xdrint.c
   grass/trunk/lib/db/dbmi_base/xdrprocedure.c
   grass/trunk/lib/db/dbmi_base/xdrshort.c
   grass/trunk/lib/db/dbmi_base/xdrstring.c
   grass/trunk/lib/db/dbmi_base/xdrtable.c
   grass/trunk/lib/db/dbmi_base/xdrtoken.c
   grass/trunk/lib/db/dbmi_base/xdrvalue.c
   grass/trunk/lib/db/dbmi_base/zero.c
   grass/trunk/lib/db/dbmi_client/c_bindupdate.c
   grass/trunk/lib/db/dbmilib.dox
   grass/trunk/lib/python/ctypes/Makefile
Log:
update doxygen documentation of DBMI library (BASE)


Modified: grass/trunk/include/dbmi.h
===================================================================
--- grass/trunk/include/dbmi.h	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/include/dbmi.h	2011-04-05 20:05:12 UTC (rev 45853)
@@ -116,13 +116,16 @@
 /* Privileges */
 #define DB_PRIV_SELECT       0x01
 
-#define DB_GROUP         0x01
-#define DB_PUBLIC        0x02
+#define DB_GROUP             0x01
+#define DB_PUBLIC            0x02
 
 /* default value modes */
 #define DB_DEFINED	1
 #define DB_UNDEFINED	2
 
+/* static buffer for SQL statements */
+#define DB_SQL_MAX      4096
+
 typedef void *dbAddress;
 typedef int dbToken;
 
@@ -297,6 +300,6 @@
     char **label;		/* array of new category labels */
 } dbRclsRule;
 
-#include <grass/proto_dbmi.h>
+#include <grass/dbmidefs.h>
 
 #endif

Copied: grass/trunk/include/dbmidefs.h (from rev 45847, grass/trunk/include/proto_dbmi.h)
===================================================================
--- grass/trunk/include/dbmidefs.h	                        (rev 0)
+++ grass/trunk/include/dbmidefs.h	2011-04-05 20:05:12 UTC (rev 45853)
@@ -0,0 +1,410 @@
+#ifndef _PROTO_DBMI_H_
+#define _PROTO_DBMI_H_
+
+void db_Cstring_to_lowercase(char *);
+void db_Cstring_to_uppercase(char *);
+int db_add_column(dbDriver *, dbString *, dbColumn *);
+void db__add_cursor_to_driver_state(dbCursor *);
+int db_alloc_cursor_column_flags(dbCursor *);
+int db_alloc_cursor_table(dbCursor *, int);
+int db_append_table_column(dbTable * , dbColumn *);
+dbDirent *db_alloc_dirent_array(int);
+dbHandle *db_alloc_handle_array(int);
+dbIndex *db_alloc_index_array(int);
+int db_alloc_index_columns(dbIndex *, int);
+dbString *db_alloc_string_array(int);
+dbTable *db_alloc_table(int);
+int db_append_string(dbString *, const char *);
+void db_auto_print_errors(int);
+void db_auto_print_protocol_errors(int);
+int db_bind_update(dbCursor *);
+void *db_calloc(int, int);
+int db_CatValArray_alloc(dbCatValArray *, int);
+int db_CatValArray_realloc(dbCatValArray *, int);
+void db_CatValArray_free(dbCatValArray *);
+void db_CatValArray_init(dbCatValArray *);
+void db_CatValArray_sort(dbCatValArray *);
+int db_CatValArray_sort_by_value(dbCatValArray *);
+int db_CatValArray_get_value(dbCatValArray *, int, dbCatVal **);
+int db_CatValArray_get_value_int(dbCatValArray *, int, int *);
+int db_CatValArray_get_value_double(dbCatValArray *, int,
+				    double *);
+void db_char_to_lowercase(char *);
+void db_char_to_uppercase(char *);
+void db_clear_error(void);
+dbTable *db_clone_table(dbTable *);
+void db__close_all_cursors(void);
+int db_close_cursor(dbCursor *);
+int db_close_database(dbDriver *);
+int db_close_database_shutdown_driver(dbDriver *);
+int db_column_sqltype(dbDriver *, const char *, const char *);
+int db_column_Ctype(dbDriver *, const char *, const char *);
+int db_convert_Cstring_to_column_default_value(const char *,
+					       dbColumn *);
+int db_convert_Cstring_to_column_value(const char *,
+				       dbColumn *);
+int db_convert_Cstring_to_value(const char *, int,
+				dbValue *);
+int db_convert_Cstring_to_value_datetime(const char *, int,
+					 dbValue *);
+int db_convert_column_default_value_to_string(dbColumn *,
+					      dbString *);
+int db_convert_column_value_to_string(dbColumn *, dbString *);
+int db_convert_value_datetime_into_string(dbValue *, int,
+					  dbString *);
+int db_convert_value_to_string(dbValue *, int,
+			       dbString *);
+dbColumn *db_copy_column(dbColumn *, dbColumn *);
+void db_copy_dbmscap_entry(dbDbmscap *, dbDbmscap *);
+int db_copy_string(dbString *, const dbString *);
+int db_table_to_sql(dbTable *, dbString *);
+int db_copy_table(const char *, const char *, const char *, const char *,
+		  const char *, const char *);
+int db_copy_table_where(const char *, const char *, const char *,
+			const char *, const char *, const char *,
+			const char *);
+int db_copy_table_select(const char *, const char *, const char *,
+			 const char *, const char *, const char *,
+			 const char *);
+int db_copy_table_by_ints(const char *, const char *, const char *,
+			  const char *, const char *, const char *,
+			  const char *, int *, int);
+void db_copy_value(dbValue *, dbValue *);
+int db_create_database(dbDriver *, dbHandle *);
+int db_create_index(dbDriver *, dbIndex *);
+int db_create_index2(dbDriver *, const char *,
+		     const char *);
+int db_create_table(dbDriver *, dbTable *);
+int db_d_add_column(void);
+int db_d_bind_update(void);
+const char *db_dbmscap_filename(void);
+int db_d_close_cursor(void);
+int db_d_close_database(void);
+int db_d_create_database(void);
+int db_d_create_index(void);
+int db_d_create_table(void);
+int db_d_delete(void);
+int db_d_delete_database(void);
+int db_d_describe_table(void);
+int db_d_drop_column(void);
+int db_d_drop_index(void);
+int db_d_drop_table(void);
+void db_debug(const char *);
+void db_debug_off(void);
+void db_debug_on(void);
+int db_delete(dbCursor *);
+int db_delete_database(dbDriver *, dbHandle *);
+int db_delete_table(const char *, const char *, const char *);
+int db_describe_table(dbDriver *, dbString *, dbTable **);
+int db_d_execute_immediate(void);
+int db_d_begin_transaction(void);
+int db_d_commit_transaction(void);
+int db_d_fetch(void);
+int db_d_find_database(void);
+int db_d_get_num_rows(void);
+int db_d_grant_on_table(void);
+int db_d_insert(void);
+dbDirent *db_dirent(const char *, int *);
+int db_d_list_databases(void);
+int db_d_list_indexes(void);
+int db_d_list_tables(void);
+int db_d_open_database(void);
+int db_d_open_insert_cursor(void);
+int db_d_open_select_cursor(void);
+int db_d_open_update_cursor(void);
+void db_double_quote_string(dbString *);
+int db_driver(int, char **);
+
+int db_driver_mkdir(const char *, int, int);
+int db_drop_column(dbDriver *, dbString *,
+		   dbString *);
+void db__drop_cursor_from_driver_state(dbCursor *);
+int db_drop_index(dbDriver *, dbString *);
+int db_drop_table(dbDriver *, dbString *);
+void db_drop_token(dbToken);
+int db_d_update(void);
+int db_d_version(void);
+int db_enlarge_string(dbString *, int);
+void db_error(const char *);
+int db_execute_immediate(dbDriver *, dbString *);
+int db_begin_transaction(dbDriver *);
+int db_commit_transaction(dbDriver *);
+int db_fetch(dbCursor *, int, int *);
+int db_find_database(dbDriver *, dbHandle *, int *);
+dbAddress db_find_token(dbToken);
+void *db_free(void *);
+void db_free_column(dbColumn *);
+void db_free_cursor(dbCursor *);
+void db_free_cursor_column_flags(dbCursor *);
+void db_free_dbmscap(dbDbmscap *);
+void db_free_dirent_array(dbDirent *, int);
+void db_free_handle(dbHandle *);
+void db_free_handle_array(dbHandle *, int);
+void db_free_index(dbIndex *);
+void db_free_index_array(dbIndex *, int);
+void db_free_string(dbString *);
+void db_free_string_array(dbString *, int);
+void db_free_table(dbTable *);
+int db_get_column(dbDriver *, const char *, const char *,
+		  dbColumn **);
+dbValue *db_get_column_default_value(dbColumn *);
+const char *db_get_column_description(dbColumn *);
+int db_get_column_host_type(dbColumn *);
+int db_get_column_length(dbColumn *);
+const char *db_get_column_name(dbColumn *);
+int db_get_column_precision(dbColumn *);
+int db_get_column_scale(dbColumn *);
+int db_get_column_select_priv(dbColumn *);
+int db_get_column_sqltype(dbColumn *);
+int db_get_column_update_priv(dbColumn *);
+dbValue *db_get_column_value(dbColumn *);
+int db_get_connection(dbConnection *);
+int db_get_cursor_number_of_columns(dbCursor *);
+dbTable *db_get_cursor_table(dbCursor *);
+dbToken db_get_cursor_token(dbCursor *);
+const char *db_get_default_driver_name(void);
+const char *db_get_default_database_name(void);
+const char *db_get_default_schema_name(void);
+const char *db_get_default_group_name(void);
+dbDriverState *db__get_driver_state(void);
+int db_get_error_code(void);
+const char *db_get_error_msg(void);
+const char *db_get_error_who(void);
+const char *db_get_handle_dbname(dbHandle *);
+const char *db_get_handle_dbschema(dbHandle *);
+const char *db_get_index_column_name(dbIndex *, int);
+const char *db_get_index_name(dbIndex *);
+int db_get_index_number_of_columns(dbIndex *);
+const char *db_get_index_table_name(dbIndex *);
+int db_get_num_rows(dbCursor *);
+char *db_get_string(const dbString *);
+dbColumn *db_get_table_column(dbTable *, int);
+dbColumn *db_get_table_column_by_name(dbTable *, const char*);
+int db_get_table_delete_priv(dbTable *);
+const char *db_get_table_description(dbTable *);
+int db_get_table_insert_priv(dbTable *);
+const char *db_get_table_name(dbTable *);
+int db_get_table_number_of_columns(dbTable *);
+int db_get_table_number_of_rows(dbDriver *, dbString *);
+int db_get_table_select_priv(dbTable *);
+int db_get_table_update_priv(dbTable *);
+double db_get_value_as_double(dbValue *, int);
+int db_get_value_day(dbValue *);
+double db_get_value_double(dbValue *);
+int db_get_value_hour(dbValue *);
+int db_get_value_int(dbValue *);
+int db_get_value_minute(dbValue *);
+int db_get_value_month(dbValue *);
+double db_get_value_seconds(dbValue *);
+const char *db_get_value_string(dbValue *);
+int db_get_value_year(dbValue *);
+int db_grant_on_table(dbDriver *, const char *, int,
+		      int);
+int db_has_dbms(void);
+void db_init_column(dbColumn *);
+void db_init_cursor(dbCursor *);
+void db__init_driver_state(void);
+void db_init_handle(dbHandle *);
+void db_init_index(dbIndex *);
+void db_init_string(dbString *);
+void db_init_table(dbTable *);
+int db_insert(dbCursor *);
+void db_interval_range(int, int *, int *);
+int db_isdir(const char *);
+int db_legal_tablename(const char *);
+int db_list_databases(dbDriver *, dbString *, int,
+		      dbHandle **, int *);
+const char *db_list_drivers(void);
+int db_list_indexes(dbDriver *, dbString *, dbIndex **,
+		    int *);
+int db_list_tables(dbDriver *, dbString **, int *,
+		   int);
+void *db_malloc(int);
+void db__mark_database_closed(void);
+void db__mark_database_open(const char *, const char *);
+void db_memory_error(void);
+dbToken db_new_token(dbAddress);
+int db_nocase_compare(const char *, const char *);
+void db_noproc_error(int);
+int db_open_database(dbDriver *, dbHandle *);
+int db_open_insert_cursor(dbDriver *, dbCursor *);
+int db_open_select_cursor(dbDriver *, dbString *,
+			  dbCursor *, int);
+int db_open_update_cursor(dbDriver *, dbString *_name,
+			  dbString *, dbCursor *, int);
+void db_print_column_definition(FILE *, dbColumn *);
+void db_print_error(void);
+void db_print_index(FILE *, dbIndex *);
+void db_print_table_definition(FILE *, dbTable *);
+void db_procedure_not_implemented(const char *);
+void db_protocol_error(void);
+dbDbmscap *db_read_dbmscap(void);
+void *db_realloc(void *, int);
+int db__recv_char(char *);
+int db__recv_column_default_value(dbColumn *);
+int db__recv_column_definition(dbColumn *);
+int db__recv_column_value(dbColumn *);
+int db__recv_datetime(dbDateTime *);
+int db__recv_double(double *);
+int db__recv_double_array(double **, int *);
+int db__recv_float(float *);
+int db__recv_float_array(float **, int *);
+int db__recv_handle(dbHandle *);
+int db__recv_index(dbIndex *);
+int db__recv_index_array(dbIndex **, int *);
+int db__recv_int(int *);
+int db__recv_int_array(int **, int *);
+int db__recv_procnum(int *);
+int db__recv_return_code(int *);
+int db__recv_short(short *);
+int db__recv_short_array(short **, int *);
+int db__recv_string(dbString *);
+int db__recv_string_array(dbString **, int *);
+int db__recv_table_data(dbTable *);
+int db__recv_table_definition(dbTable **);
+int db__recv_token(dbToken *);
+int db__recv_value(dbValue *, int);
+int db__send_Cstring(const char *);
+int db__send_char(int);
+int db__send_column_default_value(dbColumn *);
+int db__send_column_definition(dbColumn *);
+int db__send_column_value(dbColumn *);
+int db__send_datetime(dbDateTime *);
+int db__send_double(double);
+int db__send_double_array(const double *, int);
+int db__send_failure(void);
+int db__send_float(float);
+int db__send_float_array(const float *, int);
+int db__send_handle(dbHandle *);
+int db__send_index(dbIndex *);
+int db__send_index_array(dbIndex *, int);
+int db__send_int(int);
+int db__send_int_array(const int *, int);
+int db__send_procedure_not_implemented(int);
+int db__send_procedure_ok(int);
+int db__send_short(int);
+int db__send_short_array(const short *, int);
+int db__send_string(dbString *);
+int db__send_string_array(dbString *, int);
+int db__send_success(void);
+int db__send_table_data(dbTable *);
+int db__send_table_definition(dbTable *);
+int db__send_token(dbToken *);
+int db__send_value(dbValue *, int);
+int db_select_CatValArray(dbDriver *, const char *, const char *,
+			  const char *, const char *,
+			  dbCatValArray *);
+int db_select_int(dbDriver *, const char *, const char *,
+		  const char *, int **);
+int db_select_value(dbDriver *, const char *, const char *,
+		    int, const char *, dbValue *);
+int db_set_column_description(dbColumn *, const char *);
+void db_set_column_has_defined_default_value(dbColumn *);
+void db_set_column_has_undefined_default_value(dbColumn *);
+void db_set_column_host_type(dbColumn *, int);
+void db_set_column_length(dbColumn *, int);
+int db_set_column_name(dbColumn *, const char *);
+void db_set_column_null_allowed(dbColumn *);
+void db_set_column_precision(dbColumn *, int);
+void db_set_column_scale(dbColumn *, int);
+void db_set_column_select_priv_granted(dbColumn *);
+void db_set_column_select_priv_not_granted(dbColumn *);
+void db_set_column_sqltype(dbColumn *, int);
+void db_set_column_update_priv_granted(dbColumn *);
+void db_set_column_update_priv_not_granted(dbColumn *);
+void db_set_column_use_default_value(dbColumn *);
+int db_set_connection(dbConnection *);
+void db_set_cursor_column_flag(dbCursor *, int);
+void db_set_cursor_column_for_update(dbCursor *, int);
+void db_set_cursor_mode(dbCursor *, int);
+void db_set_cursor_mode_insensitive(dbCursor *);
+void db_set_cursor_mode_scroll(dbCursor *);
+void db_set_cursor_table(dbCursor *, dbTable *);
+void db_set_cursor_token(dbCursor *, dbToken);
+void db_set_cursor_type_insert(dbCursor *);
+void db_set_cursor_type_readonly(dbCursor *);
+void db_set_cursor_type_update(dbCursor *);
+int db_set_default_connection(void);
+void db_set_error_who(const char *);
+int db_set_handle(dbHandle *, const char *, const char *);
+int db_set_index_column_name(dbIndex *, int,
+			     const char *);
+int db_set_index_name(dbIndex *, const char *);
+int db_set_index_table_name(dbIndex *, const char *);
+int db_set_index_type_non_unique(dbIndex *);
+int db_set_index_type_unique(dbIndex *);
+void db__set_protocol_fds(FILE *, FILE *);
+int db_set_string(dbString *, const char *);
+int db_set_string_no_copy(dbString *, char *);
+int db_set_table_column(dbTable *, int, dbColumn *);
+void db_set_table_delete_priv_granted(dbTable *);
+void db_set_table_delete_priv_not_granted(dbTable *);
+int db_set_table_description(dbTable *, const char *);
+void db_set_table_insert_priv_granted(dbTable *);
+void db_set_table_insert_priv_not_granted(dbTable *);
+int db_set_table_name(dbTable *, const char *);
+void db_set_table_select_priv_granted(dbTable *);
+void db_set_table_select_priv_not_granted(dbTable *);
+void db_set_table_update_priv_granted(dbTable *);
+void db_set_table_update_priv_not_granted(dbTable *);
+void db_set_value_datetime_current(dbValue *);
+void db_set_value_datetime_not_current(dbValue *);
+void db_set_value_day(dbValue *, int);
+void db_set_value_double(dbValue *, double);
+void db_set_value_hour(dbValue *, int);
+void db_set_value_int(dbValue *, int);
+void db_set_value_minute(dbValue *, int);
+void db_set_value_month(dbValue *, int);
+void db_set_value_not_null(dbValue *);
+void db_set_value_null(dbValue *);
+void db_set_value_seconds(dbValue *, double);
+int db_set_value_string(dbValue *, const char *);
+void db_set_value_year(dbValue *, int);
+int db_shutdown_driver(dbDriver *);
+const char *db_sqltype_name(int);
+int db_sqltype_to_Ctype(int);
+dbDriver *db_start_driver(const char *);
+dbDriver *db_start_driver_open_database(const char *, const char *);
+int db__start_procedure_call(int);
+char *db_store(const char *);
+void db_strip(char *);
+void db_syserror(const char *);
+int db_table_exists(const char *, const char *,
+		    const char *);
+int db_test_column_has_default_value(dbColumn *);
+int db_test_column_has_defined_default_value(dbColumn *);
+int db_test_column_has_undefined_default_value(dbColumn *);
+int db_test_column_null_allowed(dbColumn *);
+int db_test_column_use_default_value(dbColumn *);
+int db_test_cursor_any_column_flag(dbCursor *);
+int db_test_cursor_any_column_for_update(dbCursor *);
+int db_test_cursor_column_flag(dbCursor *, int);
+int db_test_cursor_column_for_update(dbCursor *, int);
+int db_test_cursor_mode_insensitive(dbCursor *);
+int db_test_cursor_mode_scroll(dbCursor *);
+int db_test_cursor_type_fetch(dbCursor *);
+int db_test_cursor_type_insert(dbCursor *);
+int db_test_cursor_type_update(dbCursor *);
+int db__test_database_open(void);
+int db_test_index_type_unique(dbIndex *);
+int db_test_value_datetime_current(dbValue *);
+int db_test_value_isnull(dbValue *);
+void db_unset_column_has_default_value(dbColumn *);
+void db_unset_column_null_allowed(dbColumn *);
+void db_unset_column_use_default_value(dbColumn *);
+void db_unset_cursor_column_flag(dbCursor *, int);
+void db_unset_cursor_column_for_update(dbCursor *, int);
+void db_unset_cursor_mode(dbCursor *);
+void db_unset_cursor_mode_insensitive(dbCursor *);
+void db_unset_cursor_mode_scroll(dbCursor *);
+int db_update(dbCursor *);
+int db_gversion(dbDriver *, dbString *,
+		dbString *);
+const char *db_whoami(void);
+void db_zero(void *, int);
+void db_zero_string(dbString *);
+unsigned int db_sizeof_string(const dbString *);
+int db_set_login(const char *, const char *, const char *, const char *);
+int db_get_login(const char *, const char *, const char **, const char **);
+
+#endif

Deleted: grass/trunk/include/proto_dbmi.h
===================================================================
--- grass/trunk/include/proto_dbmi.h	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/include/proto_dbmi.h	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,411 +0,0 @@
-#ifndef _PROTO_DBMI_H_
-#define _PROTO_DBMI_H_
-
-void db_Cstring_to_lowercase(char *s);
-void db_Cstring_to_uppercase(char *s);
-int db_add_column(dbDriver * driver, dbString * tableName, dbColumn * column);
-void db__add_cursor_to_driver_state(dbCursor * cursor);
-int db_alloc_cursor_column_flags(dbCursor * cursor);
-int db_alloc_cursor_table(dbCursor * cursor, int ncols);
-int db_append_table_column(dbTable * , dbColumn *);
-dbDirent *db_alloc_dirent_array(int count);
-dbHandle *db_alloc_handle_array(int count);
-dbIndex *db_alloc_index_array(int count);
-int db_alloc_index_columns(dbIndex * index, int ncols);
-dbString *db_alloc_string_array(int count);
-dbTable *db_alloc_table(int ncols);
-int db_append_string(dbString * x, const char *s);
-void db_auto_print_errors(int flag);
-void db_auto_print_protocol_errors(int flag);
-int db_bind_update(dbCursor * cursor);
-void *db_calloc(int n, int m);
-int db_CatValArray_alloc(dbCatValArray * arr, int n);
-int db_CatValArray_realloc(dbCatValArray * arr, int n);
-void db_CatValArray_free(dbCatValArray * arr);
-void db_CatValArray_init(dbCatValArray * arr);
-void db_CatValArray_sort(dbCatValArray * arr);
-int db_CatValArray_sort_by_value(dbCatValArray * arr);
-int db_CatValArray_get_value(dbCatValArray * arr, int key, dbCatVal **);
-int db_CatValArray_get_value_int(dbCatValArray * arr, int key, int *val);
-int db_CatValArray_get_value_double(dbCatValArray * arr, int key,
-				    double *val);
-void db_char_to_lowercase(char *s);
-void db_char_to_uppercase(char *s);
-void db_clear_error(void);
-dbTable *db_clone_table(dbTable *);
-void db__close_all_cursors(void);
-int db_close_cursor(dbCursor * cursor);
-int db_close_database(dbDriver * driver);
-int db_close_database_shutdown_driver(dbDriver * driver);
-int db_column_sqltype(dbDriver * driver, const char *tab, const char *col);
-int db_column_Ctype(dbDriver * driver, const char *tab, const char *col);
-int db_convert_Cstring_to_column_default_value(const char *Cstring,
-					       dbColumn * column);
-int db_convert_Cstring_to_column_value(const char *Cstring,
-				       dbColumn * column);
-int db_convert_Cstring_to_value(const char *Cstring, int sqltype,
-				dbValue * value);
-int db_convert_Cstring_to_value_datetime(const char *buf, int sqltype,
-					 dbValue * value);
-int db_convert_column_default_value_to_string(dbColumn * column,
-					      dbString * string);
-int db_convert_column_value_to_string(dbColumn * column, dbString * string);
-int db_convert_value_datetime_into_string(dbValue * value, int sqltype,
-					  dbString * string);
-int db_convert_value_to_string(dbValue * value, int sqltype,
-			       dbString * string);
-dbColumn *db_copy_column(dbColumn *, dbColumn *);
-void db_copy_dbmscap_entry(dbDbmscap * dst, dbDbmscap * src);
-int db_copy_string(dbString * dst, const dbString * src);
-int db_table_to_sql(dbTable *, dbString *);
-int db_copy_table(const char *, const char *, const char *, const char *,
-		  const char *, const char *);
-int db_copy_table_where(const char *, const char *, const char *,
-			const char *, const char *, const char *,
-			const char *);
-int db_copy_table_select(const char *, const char *, const char *,
-			 const char *, const char *, const char *,
-			 const char *);
-int db_copy_table_by_ints(const char *, const char *, const char *,
-			  const char *, const char *, const char *,
-			  const char *, int *, int);
-void db_copy_value(dbValue * dst, dbValue * src);
-int db_create_database(dbDriver * driver, dbHandle * handle);
-int db_create_index(dbDriver * driver, dbIndex * index);
-int db_create_index2(dbDriver * driver, const char *table_name,
-		     const char *column_name);
-int db_create_table(dbDriver * driver, dbTable * table);
-int db_d_add_column(void);
-int db_d_bind_update(void);
-const char *db_dbmscap_filename(void);
-int db_d_close_cursor(void);
-int db_d_close_database(void);
-int db_d_create_database(void);
-int db_d_create_index(void);
-int db_d_create_table(void);
-int db_d_delete(void);
-int db_d_delete_database(void);
-int db_d_describe_table(void);
-int db_d_drop_column(void);
-int db_d_drop_index(void);
-int db_d_drop_table(void);
-void db_debug(const char *s);
-void db_debug_off(void);
-void db_debug_on(void);
-int db_delete(dbCursor * cursor);
-int db_delete_database(dbDriver * driver, dbHandle * handle);
-int db_delete_table(const char *, const char *, const char *);
-int db_describe_table(dbDriver * driver, dbString * name, dbTable ** table);
-int db_d_execute_immediate(void);
-int db_d_begin_transaction(void);
-int db_d_commit_transaction(void);
-int db_d_fetch(void);
-int db_d_find_database(void);
-int db_d_get_num_rows(void);
-int db_d_grant_on_table(void);
-int db_d_insert(void);
-dbDirent *db_dirent(const char *dirname, int *n);
-int db_d_list_databases(void);
-int db_d_list_indexes(void);
-int db_d_list_tables(void);
-int db_d_open_database(void);
-int db_d_open_insert_cursor(void);
-int db_d_open_select_cursor(void);
-int db_d_open_update_cursor(void);
-void db_double_quote_string(dbString * src);
-int db_driver(int argc, char *argv[]);
-
-int db_driver_mkdir(const char *path, int mode, int parentdirs);
-int db_drop_column(dbDriver * driver, dbString * tableName,
-		   dbString * columnName);
-void db__drop_cursor_from_driver_state(dbCursor * cursor);
-int db_drop_index(dbDriver * driver, dbString * name);
-int db_drop_table(dbDriver * driver, dbString * name);
-void db_drop_token(dbToken token);
-int db_d_update(void);
-int db_d_version(void);
-int db_enlarge_string(dbString * x, int len);
-void db_error(const char *s);
-int db_execute_immediate(dbDriver * driver, dbString * SQLstatement);
-int db_begin_transaction(dbDriver * driver);
-int db_commit_transaction(dbDriver * driver);
-int db_fetch(dbCursor * cursor, int position, int *more);
-int db_find_database(dbDriver * driver, dbHandle * handle, int *found);
-dbAddress db_find_token(dbToken token);
-void *db_free(void *s);
-void db_free_column(dbColumn * column);
-void db_free_cursor(dbCursor * cursor);
-void db_free_cursor_column_flags(dbCursor * cursor);
-void db_free_dbmscap(dbDbmscap * list);
-void db_free_dirent_array(dbDirent * dirent, int count);
-void db_free_handle(dbHandle * handle);
-void db_free_handle_array(dbHandle * handle, int count);
-void db_free_index(dbIndex * index);
-void db_free_index_array(dbIndex * list, int count);
-void db_free_string(dbString * x);
-void db_free_string_array(dbString * a, int n);
-void db_free_table(dbTable * table);
-int db_get_column(dbDriver * Driver, const char *tname, const char *cname,
-		  dbColumn ** Column);
-dbValue *db_get_column_default_value(dbColumn * column);
-const char *db_get_column_description(dbColumn * column);
-int db_get_column_host_type(dbColumn * column);
-int db_get_column_length(dbColumn * column);
-const char *db_get_column_name(dbColumn * column);
-int db_get_column_precision(dbColumn * column);
-int db_get_column_scale(dbColumn * column);
-int db_get_column_select_priv(dbColumn * column);
-int db_get_column_sqltype(dbColumn * column);
-int db_get_column_update_priv(dbColumn * column);
-dbValue *db_get_column_value(dbColumn * column);
-int db_get_connection(dbConnection * connection);
-int db_get_cursor_number_of_columns(dbCursor * cursor);
-dbTable *db_get_cursor_table(dbCursor * cursor);
-dbToken db_get_cursor_token(dbCursor * cursor);
-const char *db_get_default_driver_name(void);
-const char *db_get_default_database_name(void);
-const char *db_get_default_schema_name(void);
-const char *db_get_default_group_name(void);
-dbDriverState *db__get_driver_state(void);
-int db_get_error_code(void);
-const char *db_get_error_msg(void);
-const char *db_get_error_who(void);
-const char *db_get_handle_dbname(dbHandle * handle);
-const char *db_get_handle_dbschema(dbHandle * handle);
-const char *db_get_index_column_name(dbIndex * index, int column_num);
-const char *db_get_index_name(dbIndex * index);
-int db_get_index_number_of_columns(dbIndex * index);
-const char *db_get_index_table_name(dbIndex * index);
-int db_get_num_rows(dbCursor * cursor);
-char *db_get_string(const dbString * x);
-dbColumn *db_get_table_column(dbTable *, int);
-dbColumn *db_get_table_column_by_name(dbTable *, const char*);
-int db_get_table_delete_priv(dbTable * table);
-const char *db_get_table_description(dbTable * table);
-int db_get_table_insert_priv(dbTable * table);
-const char *db_get_table_name(dbTable * table);
-int db_get_table_number_of_columns(dbTable * table);
-int db_get_table_number_of_rows(dbDriver * driver, dbString * sql);
-int db_get_table_select_priv(dbTable * table);
-int db_get_table_update_priv(dbTable * table);
-double db_get_value_as_double(dbValue * value, int ctype);
-int db_get_value_day(dbValue * value);
-double db_get_value_double(dbValue * value);
-int db_get_value_hour(dbValue * value);
-int db_get_value_int(dbValue * value);
-int db_get_value_minute(dbValue * value);
-int db_get_value_month(dbValue * value);
-double db_get_value_seconds(dbValue * value);
-const char *db_get_value_string(dbValue * value);
-int db_get_value_year(dbValue * value);
-int db_grant_on_table(dbDriver * driver, const char *tableName, int priv,
-		      int to);
-int db_has_dbms(void);
-void db_init_column(dbColumn * column);
-void db_init_cursor(dbCursor * cursor);
-void db__init_driver_state(void);
-void db_init_handle(dbHandle * handle);
-void db_init_index(dbIndex * index);
-void db_init_string(dbString * x);
-void db_init_table(dbTable * table);
-int db_insert(dbCursor * cursor);
-void db_interval_range(int sqltype, int *from, int *to);
-int db_isdir(const char *path);
-int db_legal_tablename(const char *s);
-int db_list_databases(dbDriver * driver, dbString * path, int npaths,
-		      dbHandle ** handles, int *count);
-const char *db_list_drivers(void);
-int db_list_indexes(dbDriver * driver, dbString * table_name, dbIndex ** list,
-		    int *count);
-int db_list_tables(dbDriver * driver, dbString ** names, int *count,
-		   int system);
-void *db_malloc(int n);
-void db__mark_database_closed(void);
-void db__mark_database_open(const char *dbname, const char *dbpath);
-void db_memory_error(void);
-dbToken db_new_token(dbAddress address);
-int db_nocase_compare(const char *a, const char *b);
-void db_noproc_error(int procnum);
-int db_open_database(dbDriver * driver, dbHandle * handle);
-int db_open_insert_cursor(dbDriver * driver, dbCursor * cursor);
-int db_open_select_cursor(dbDriver * driver, dbString * select,
-			  dbCursor * cursor, int mode);
-int db_open_update_cursor(dbDriver * driver, dbString * table_name,
-			  dbString * select, dbCursor * cursor, int mode);
-void db_print_column_definition(FILE * fd, dbColumn * column);
-void db_print_error(void);
-void db_print_index(FILE * fd, dbIndex * index);
-void db_print_table_definition(FILE * fd, dbTable * table);
-void db_procedure_not_implemented(const char *name);
-void db_protocol_error(void);
-dbDbmscap *db_read_dbmscap(void);
-void *db_realloc(void *s, int n);
-int db__recv_char(char *d);
-int db__recv_column_default_value(dbColumn * column);
-int db__recv_column_definition(dbColumn * column);
-int db__recv_column_value(dbColumn * column);
-int db__recv_datetime(dbDateTime * t);
-int db__recv_double(double *d);
-int db__recv_double_array(double **x, int *n);
-int db__recv_float(float *d);
-int db__recv_float_array(float **x, int *n);
-int db__recv_handle(dbHandle * handle);
-int db__recv_index(dbIndex * index);
-int db__recv_index_array(dbIndex ** list, int *count);
-int db__recv_int(int *n);
-int db__recv_int_array(int **x, int *n);
-int db__recv_procnum(int *n);
-int db__recv_return_code(int *ret_code);
-int db__recv_short(short *n);
-int db__recv_short_array(short **x, int *n);
-int db__recv_string(dbString * x);
-int db__recv_string_array(dbString ** a, int *n);
-int db__recv_table_data(dbTable * table);
-int db__recv_table_definition(dbTable ** table);
-int db__recv_token(dbToken * token);
-int db__recv_value(dbValue * value, int Ctype);
-int db__send_Cstring(const char *s);
-int db__send_char(int d);
-int db__send_column_default_value(dbColumn * column);
-int db__send_column_definition(dbColumn * column);
-int db__send_column_value(dbColumn * column);
-int db__send_datetime(dbDateTime * t);
-int db__send_double(double d);
-int db__send_double_array(const double *x, int n);
-int db__send_failure(void);
-int db__send_float(float d);
-int db__send_float_array(const float *x, int n);
-int db__send_handle(dbHandle * handle);
-int db__send_index(dbIndex * index);
-int db__send_index_array(dbIndex * list, int count);
-int db__send_int(int n);
-int db__send_int_array(const int *x, int n);
-int db__send_procedure_not_implemented(int n);
-int db__send_procedure_ok(int n);
-int db__send_short(int n);
-int db__send_short_array(const short *x, int n);
-int db__send_string(dbString * x);
-int db__send_string_array(dbString * a, int count);
-int db__send_success(void);
-int db__send_table_data(dbTable * table);
-int db__send_table_definition(dbTable * table);
-int db__send_token(dbToken * token);
-int db__send_value(dbValue * value, int Ctype);
-int db_select_CatValArray(dbDriver * driver, const char *tab, const char *key,
-			  const char *col, const char *where,
-			  dbCatValArray * Cvarr);
-int db_select_int(dbDriver * driver, const char *table, const char *column,
-		  const char *where, int **pval);
-int db_select_value(dbDriver * driver, const char *table, const char *key,
-		    int id, const char *column, dbValue * value);
-int db_set_column_description(dbColumn * column, const char *description);
-void db_set_column_has_defined_default_value(dbColumn * column);
-void db_set_column_has_undefined_default_value(dbColumn * column);
-void db_set_column_host_type(dbColumn * column, int type);
-void db_set_column_length(dbColumn * column, int length);
-int db_set_column_name(dbColumn * column, const char *name);
-void db_set_column_null_allowed(dbColumn * column);
-void db_set_column_precision(dbColumn * column, int precision);
-void db_set_column_scale(dbColumn * column, int scale);
-void db_set_column_select_priv_granted(dbColumn * column);
-void db_set_column_select_priv_not_granted(dbColumn * column);
-void db_set_column_sqltype(dbColumn * column, int sqltype);
-void db_set_column_update_priv_granted(dbColumn * column);
-void db_set_column_update_priv_not_granted(dbColumn * column);
-void db_set_column_use_default_value(dbColumn * column);
-int db_set_connection(dbConnection * connection);
-void db_set_cursor_column_flag(dbCursor * cursor, int col);
-void db_set_cursor_column_for_update(dbCursor * cursor, int col);
-void db_set_cursor_mode(dbCursor * cursor, int mode);
-void db_set_cursor_mode_insensitive(dbCursor * cursor);
-void db_set_cursor_mode_scroll(dbCursor * cursor);
-void db_set_cursor_table(dbCursor * cursor, dbTable * table);
-void db_set_cursor_token(dbCursor * cursor, dbToken token);
-void db_set_cursor_type_insert(dbCursor * cursor);
-void db_set_cursor_type_readonly(dbCursor * cursor);
-void db_set_cursor_type_update(dbCursor * cursor);
-int db_set_default_connection(void);
-void db_set_error_who(const char *me);
-int db_set_handle(dbHandle * handle, const char *dbName, const char *dbPath);
-int db_set_index_column_name(dbIndex * index, int column_num,
-			     const char *name);
-int db_set_index_name(dbIndex * index, const char *name);
-int db_set_index_table_name(dbIndex * index, const char *name);
-int db_set_index_type_non_unique(dbIndex * index);
-int db_set_index_type_unique(dbIndex * index);
-void db__set_protocol_fds(FILE * send, FILE * recv);
-int db_set_string(dbString * x, const char *s);
-int db_set_string_no_copy(dbString * x, char *s);
-int db_set_table_column(dbTable *, int, dbColumn *);
-void db_set_table_delete_priv_granted(dbTable * table);
-void db_set_table_delete_priv_not_granted(dbTable * table);
-int db_set_table_description(dbTable * table, const char *description);
-void db_set_table_insert_priv_granted(dbTable * table);
-void db_set_table_insert_priv_not_granted(dbTable * table);
-int db_set_table_name(dbTable * table, const char *name);
-void db_set_table_select_priv_granted(dbTable * table);
-void db_set_table_select_priv_not_granted(dbTable * table);
-void db_set_table_update_priv_granted(dbTable * table);
-void db_set_table_update_priv_not_granted(dbTable * table);
-void db_set_value_datetime_current(dbValue * value);
-void db_set_value_datetime_not_current(dbValue * value);
-void db_set_value_day(dbValue * value, int day);
-void db_set_value_double(dbValue * value, double d);
-void db_set_value_hour(dbValue * value, int hour);
-void db_set_value_int(dbValue * value, int i);
-void db_set_value_minute(dbValue * value, int minute);
-void db_set_value_month(dbValue * value, int month);
-void db_set_value_not_null(dbValue * value);
-void db_set_value_null(dbValue * value);
-void db_set_value_seconds(dbValue * value, double seconds);
-int db_set_value_string(dbValue * value, const char *s);
-void db_set_value_year(dbValue * value, int year);
-int db_shutdown_driver(dbDriver * driver);
-const char *db_sqltype_name(int sqltype);
-int db_sqltype_to_Ctype(int sqltype);
-dbDriver *db_start_driver(const char *name);
-dbDriver *db_start_driver_open_database(const char *drvname,
-					const char *dbname);
-int db__start_procedure_call(int procnum);
-char *db_store(const char *s);
-void db_strip(char *buf);
-void db_syserror(const char *s);
-int db_table_exists(const char *drvname, const char *dbname,
-		    const char *tabname);
-int db_test_column_has_default_value(dbColumn * column);
-int db_test_column_has_defined_default_value(dbColumn * column);
-int db_test_column_has_undefined_default_value(dbColumn * column);
-int db_test_column_null_allowed(dbColumn * column);
-int db_test_column_use_default_value(dbColumn * column);
-int db_test_cursor_any_column_flag(dbCursor * cursor);
-int db_test_cursor_any_column_for_update(dbCursor * cursor);
-int db_test_cursor_column_flag(dbCursor * cursor, int col);
-int db_test_cursor_column_for_update(dbCursor * cursor, int col);
-int db_test_cursor_mode_insensitive(dbCursor * cursor);
-int db_test_cursor_mode_scroll(dbCursor * cursor);
-int db_test_cursor_type_fetch(dbCursor * cursor);
-int db_test_cursor_type_insert(dbCursor * cursor);
-int db_test_cursor_type_update(dbCursor * cursor);
-int db__test_database_open(void);
-int db_test_index_type_unique(dbIndex * index);
-int db_test_value_datetime_current(dbValue * value);
-int db_test_value_isnull(dbValue * value);
-void db_unset_column_has_default_value(dbColumn * column);
-void db_unset_column_null_allowed(dbColumn * column);
-void db_unset_column_use_default_value(dbColumn * column);
-void db_unset_cursor_column_flag(dbCursor * cursor, int col);
-void db_unset_cursor_column_for_update(dbCursor * cursor, int col);
-void db_unset_cursor_mode(dbCursor * cursor);
-void db_unset_cursor_mode_insensitive(dbCursor * cursor);
-void db_unset_cursor_mode_scroll(dbCursor * cursor);
-int db_update(dbCursor * cursor);
-int db_gversion(dbDriver * driver, dbString * client_version,
-		dbString * driver_version);
-const char *db_whoami(void);
-void db_zero(void *s, int n);
-void db_zero_string(dbString * x);
-unsigned int db_sizeof_string(const dbString * x);
-int db_set_login(const char *, const char *, const char *, const char *);
-int db_get_login(const char *, const char *, const char **, const char **);
-
-#endif

Modified: grass/trunk/lib/db/dbmi_base/alloc.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/alloc.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/alloc.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,3 +1,17 @@
+/*!
+  \file lib/db/dbmi_base/alloc.c
+  
+  \brief DBMI Library (base) - allocate memory
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <string.h>
 #include <stdlib.h>
 #include <grass/dbmi.h>
@@ -3,9 +17,12 @@
 
 /*!
-   \fn char *db_store (char *s)
-   \brief 
-   \return 
-   \param 
- */
+  \brief Make a copy of string buffer
+  
+  Allocated string buffer should be freed by db_free().
+
+  \param s source string buffer
+
+  \return allocated string buffer
+*/
 char *db_store(const char *s)
 {
@@ -19,10 +36,13 @@
 }
 
 /*!
-   \fn void *db_malloc (int n)
-   \brief 
-   \return 
-   \param 
+  \brief Allocate memory
+
+  On failure is called db_memory_error().
+  
+  \param n number of bytes to be allocated
+
+  \return pointer to allocated memory
  */
 void *db_malloc(int n)
 {
@@ -37,10 +57,14 @@
 }
 
 /*!
-   \fn void *db_calloc (int n, int m)
-   \brief 
-   \return 
-   \param 
+  \brief Allocate memory
+
+  On failure is called db_memory_error().
+  
+  \param n number of entities
+  \param m entity size
+
+  \return pointer to allocated memmory
  */
 void *db_calloc(int n, int m)
 {
@@ -57,10 +81,14 @@
 }
 
 /*!
-   \fn void *db_realloc (void *s, int n)
-   \brief 
-   \return 
-   \param 
+  \brief Reallocate memory
+
+  On failure is called db_memory_error().
+  
+  \param s pointer to memory
+  \param n number of newly allocated bytes
+
+  \return pointer to allocated memmory
  */
 void *db_realloc(void *s, int n)
 {
@@ -76,11 +104,10 @@
 }
 
 /*!
-   \fn void *db_free (void *s)
-   \brief 
-   \return 
-   \param 
- */
+  \brief Free allocated memory
+  
+  \param s pointer to memory to be freed
+*/
 void *db_free(void *s)
 {
     free(s);

Modified: grass/trunk/lib/db/dbmi_base/case.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/case.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/case.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,11 +1,24 @@
+/*!
+  \file lib/db/dbmi_base/case.c
+  
+  \brief DBMI Library (base) - case string conversion
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <grass/dbmi.h>
 
 /*!
-   \fn void db_char_to_lowercase (char *s)
-   \brief 
-   \return 
-   \param 
- */
+  \brief Convert character to lowercase
+
+  \param s character to be modified
+*/
 void db_char_to_lowercase(char *s)
 {
     if (*s >= 'A' && *s <= 'Z')
@@ -13,10 +26,9 @@
 }
 
 /*!
-   \fn void db_char_to_uppercase (char *s)
-   \brief 
-   \return 
-   \param 
+  \brief Convert character to uppercase
+
+  \param s character to be modified
  */
 void db_char_to_uppercase(char *s)
 {
@@ -25,11 +37,10 @@
 }
 
 /*!
-   \fn void db_Cstring_to_lowercase (char *s)
-   \brief 
-   \return 
-   \param 
- */
+  \brief Convert string to lowercase
+
+  \param s string buffer to be modified
+*/
 void db_Cstring_to_lowercase(char *s)
 {
     while (*s)
@@ -37,11 +48,10 @@
 }
 
 /*!
-   \fn void db_Cstring_to_uppercase (char *s)
-   \brief 
-   \return 
-   \param 
- */
+  \brief Convert string to lowercase
+
+  \param s string buffer to be modified
+*/
 void db_Cstring_to_uppercase(char *s)
 {
     while (*s)
@@ -49,10 +59,12 @@
 }
 
 /*!
-   \fn int db_nocase_compare (char *a, char *b)
-   \brief 
-   \return 
-   \param 
+  \brief Compare strings case-insensitive
+
+  \param a,b string buffers to be compared
+
+  \return 0 strings equal
+  \return 1 otherwise
  */
 int db_nocase_compare(const char *a, const char *b)
 {

Modified: grass/trunk/lib/db/dbmi_base/column.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/column.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/column.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,23 +1,22 @@
 /*!
-  \file db/dbmi_base/column.c
+  \file lib/db/dbmi_base/column.c
   
   \brief DBMI Library (base) - columns management
   
-  (C) 1999-2009 by the GRASS Development Team
+  (C) 1999-2009, 2011 by the GRASS Development Team
   
-  This program is free software under the GNU General Public
-  License (>=v2). Read the file COPYING that comes with GRASS
-  for details.
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
   
   \author Joel Jones (CERL/UIUC), Radim Blazek
- */
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
 
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>
 #include <grass/dbmi.h>
 
-
 /*!
   \brief Returns column value for given column structure
 
@@ -25,7 +24,7 @@
 
   \return pointer to dbValue
 */
-dbValue *db_get_column_value(dbColumn * column)
+dbValue *db_get_column_value(dbColumn *column)
 {
     return &column->value;
 }
@@ -43,10 +42,11 @@
 }
 
 /*!
-  \brief Define column sqltype for column (the function db_sqltype_name() 
-  returns sqltype description)
+  \brief Define column sqltype for column
 
-  \verbatim
+  The function db_sqltype_name() returns sqltype description.
+
+  \code
   #define DB_SQL_TYPE_UNKNOWN          0
   
   #define DB_SQL_TYPE_CHARACTER        1
@@ -63,12 +63,12 @@
   #define DB_SQL_TYPE_TEXT            13
   
   #define DB_SQL_TYPE_SERIAL          21
-  \endverbatim
+  \endcode
 
   \param column pointer to dbColumn
   \param sqltype SQL data type (see list)
 */
-void db_set_column_sqltype(dbColumn * column, int sqltype)
+void db_set_column_sqltype(dbColumn *column, int sqltype)
 {
     column->sqlDataType = sqltype;
 }
@@ -131,14 +131,15 @@
 }
 
 /*!
-  \brief Returns column sqltype for column (the function
-  db_sqltype_name() returns sqltype description) \return \param
+  \brief Returns column sqltype for column
+
+  The function db_sqltype_name() returns sqltype description.
   
   \param column pointer to dbColumn
   
   \return sql data type (see include/dbmi.h)
 */
-int db_get_column_sqltype(dbColumn * column)
+int db_get_column_sqltype(dbColumn *column)
 {
     return column->sqlDataType;
 }
@@ -168,6 +169,8 @@
 /*!
   \brief Unset default value identificator
 
+  \todo Replace by db_unset_column_has_default_value() ?
+
   \param column pointer to dbColumn
 */
 void db_set_column_has_undefined_default_value(dbColumn * column)
@@ -459,12 +462,14 @@
 
 
 /*!
- * \brief Copy a db column from source to destination
- *
- * \param src The column to copy from
- * \param dest An allocated column to copy to which will be initialized. In case dest is NULL a new column will be allocated and returned
- * \return The pointer of copied/allocated column
- */
+  \brief Copy a db column from source to destination
+  
+  \param src The column to copy from
+  \param dest An allocated column to copy to which will be
+  initialized. In case dest is NULL a new column will be allocated
+  and returned
+  \return The pointer of copied/allocated column
+*/
 dbColumn *db_copy_column(dbColumn *dest, dbColumn *src)
 {
     dbColumn *new = dest;

Modified: grass/trunk/lib/db/dbmi_base/columnfmt.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/columnfmt.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/columnfmt.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,12 +1,28 @@
+/*!
+  \file lib/db/dbmi_base/columnfmt.c
+  
+  \brief DBMI Library (base) - columns formating
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <grass/dbmi.h>
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
-int db_convert_Cstring_to_column_value(const char *Cstring, dbColumn * column)
+  \brief ?
+  
+  \param Cstring string buffer
+  \param column pointer to dbColumn
+  
+  \return ?
+*/
+int db_convert_Cstring_to_column_value(const char *Cstring, dbColumn *column)
 {
     dbValue *value;
     int sqltype;
@@ -17,14 +33,14 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
-int
-db_convert_Cstring_to_column_default_value(const char *Cstring,
-					   dbColumn * column)
+  \brief ?
+  
+  \param Cstring string buffer
+  \param column pointer to dbColumn
+
+  \return ?
+*/
+int db_convert_Cstring_to_column_default_value(const char *Cstring, dbColumn *column)
 {
     dbValue *value;
     int sqltype;
@@ -35,12 +51,14 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
-int db_convert_column_value_to_string(dbColumn * column, dbString * string)
+  \brief ?
+
+  \param column pointer to dbColumn
+  \param string pointer to dbString
+
+  \return ?
+*/
+int db_convert_column_value_to_string(dbColumn *column, dbString *string)
 {
     int sqltype;
     dbValue *value;
@@ -51,14 +69,14 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
-int
-db_convert_column_default_value_to_string(dbColumn * column,
-					  dbString * string)
+  \brief ?
+
+  \param column pointer to dbColumn
+  \param string pointer to dbString
+
+  \return ?
+*/
+int db_convert_column_default_value_to_string(dbColumn *column, dbString *string)
 {
     int sqltype;
     dbValue *value;

Modified: grass/trunk/lib/db/dbmi_base/connect.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/connect.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/connect.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,3 +1,17 @@
+/*!
+  \file lib/db/dbmi_base/connect.c
+  
+  \brief DBMI Library (base) - connect to DB
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <grass/gis.h>
 #include <grass/dbmi.h>
 
@@ -2,6 +16,10 @@
 /*!
-   \fn int db_set_connection (dbConnection *connection )
-   \brief set default db connection settings
-   \return DB_OK
-   \param dbConnection
+  \brief Set default DB connection settings
+
+  This function sets enviromental variables as DB_DRIVER, DB_DATABASE,
+  DB_SCHEMA, DB_GROUP.
+
+  \param connection pointer to dbConnection with default settings
+  
+  \return DB_OK
  */
@@ -41,14 +59,15 @@
 }
 
 /*!
-   \fn int db_get_connection (dbConnection *connection )
-   \brief get default db connection settings
-   \return DB_OK
-   \param dbConnection
+  \brief Get default DB connection settings
+  
+  \param[out] connection pointer to dbConnection to be modified
+
+  \return DB_OK
  */
 int db_get_connection(dbConnection * connection)
 {
-    /* TODO: add checks and return DB_* error code if needed */
+  /* TODO: add checks and return DB_* error code if needed */
 
     connection->driverName = G__getenv2("DB_DRIVER", G_VAR_MAPSET);
     connection->databaseName = G__getenv2("DB_DATABASE", G_VAR_MAPSET);
@@ -61,6 +80,6 @@
        connection->user = G__getenv("DB_USER");
        connection->password = G__getenv("DB_PASSWORD");
      */
-
+    
     return DB_OK;
 }

Modified: grass/trunk/lib/db/dbmi_base/cursor.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/cursor.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/cursor.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,5 +1,5 @@
 /*!
-  \file db/dbmi_base/cursor.c
+  \file lib/db/dbmi_base/cursor.c
   
   \brief DBMI Library (base) - cursors management
   
@@ -18,7 +18,7 @@
 /*!
   \brief Initialize cursor
   
-  \param cursor pointer to dbCursor
+  \param cursor pointer to dbCursor to be initialized
 */
 void db_init_cursor(dbCursor *cursor)
 {

Modified: grass/trunk/lib/db/dbmi_base/datetime.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/datetime.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/datetime.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,3 +1,17 @@
+/*!
+  \file lib/db/dbmi_base/datetime.c
+  
+  \brief DBMI Library (base) - datetime conversions
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <stdio.h>
 #include <string.h>
 #include <grass/dbmi.h>
@@ -6,13 +20,16 @@
 static char ts = ':';
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
+  \brief Convert datetime value into string
+
+  \param value pointer to dbValue
+  \param sqltype SQL data type
+  \param[out] string pointer to dbString
+
+  \return DB_OK on success
  */
-int db_convert_value_datetime_into_string(dbValue * value, int sqltype,
-					  dbString * string)
+int db_convert_value_datetime_into_string(dbValue *value, int sqltype,
+					  dbString *string)
 {
     int to, from;
     int year, month, day, hour, minute;
@@ -158,29 +175,27 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
-/* NAME: db_convert_Cstring_to_value_datetime
- * INPUT: buf, a C string formated as indicated by sqltype, value, a dbValue
- *  to put the converted value into
- * OUTPUT: the converted datetime value in value
- * PROCESSING: the format of buf must be as follows
- *  buf == "CURRENT" in a case-insignificant fashion
- *   value is marked as current
- *  sqltype == DB_SQL_TYPE_DATE
- *   "year*month*day"
- *  sqltype == DB_SQL_TYPE_TIME
- *   "hour*minute*second"
- *  sqltype == DB_SQL_TYPE_TIMESTAMP
- *   "year*month*day hour*minute*second"
- *  otherwise the to and from markings in sqltype are used.
- *  where "*" represents any non-whitespace character
- */
+  \brief Convert datetime string to value
+
+  The format of <em>buf</em> must be as follows
+   - buf == "CURRENT" in a case-insignificant fashion value is marked as current
+   - sqltype == DB_SQL_TYPE_DATE
+    "year*month*day"
+   - sqltype == DB_SQL_TYPE_TIME
+    "hour*minute*second"
+   - sqltype == DB_SQL_TYPE_TIMESTAMP
+    "year*month*day hour*minute*second"
+   - otherwise the to and from markings in sqltype are used, 
+     where "*" represents any non-whitespace character
+  
+  \param buf input string buffer
+  \param sqltype SQL data type
+  \param[out] value pointer to dbValue to be set
+
+  \return DB_OK
+*/
 int db_convert_Cstring_to_value_datetime(const char *buf, int sqltype,
-					 dbValue * value)
+					 dbValue *value)
 {
     int from, to;
     int year, month, day, hour, minute;

Modified: grass/trunk/lib/db/dbmi_base/dbmscap.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/dbmscap.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/dbmscap.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,5 +1,5 @@
 /*!
-  \file db/dbmi_base/dbmscap.c
+  \file lib/db/dbmi_base/dbmscap.c
   
   \brief DBMI Library (base) - DBmscap management
   
@@ -203,8 +203,7 @@
     return list;
 }
 
-static void
-add_entry(dbDbmscap ** list, char *name, char *startup, char *comment)
+static void add_entry(dbDbmscap ** list, char *name, char *startup, char *comment)
 {
     dbDbmscap *head, *cur, *tail;
 

Modified: grass/trunk/lib/db/dbmi_base/default_name.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/default_name.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/default_name.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,5 +1,5 @@
 /*!
-  \file db/dbmi_base/default_name.c
+  \file lib/db/dbmi_base/default_name.c
   
   \brief DBMI Library (base) - default settings
   

Modified: grass/trunk/lib/db/dbmi_base/dirent.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/dirent.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/dirent.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,3 +1,17 @@
+/*!
+  \file lib/db/dbmi_base/dirent.c
+  
+  \brief DBMI Library (base) - directory entities management
+  
+  (C) 1999-2010 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC)
+  \author Upgraded to GRASS 5.7 by Radim Blazek
+*/
+
 #include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -19,19 +33,21 @@
 extern DIR *opendir();
 extern dir_entry *readdir();
 
-static int cmp_dirent(const void *aa, const void *bb);
-static int get_perm(char *path);
-static void sort_dirent(dbDirent * a, int n);
+static int cmp_dirent(const void *, const void *);
+static int get_perm(char *);
+static void sort_dirent(dbDirent *, int);
 
+/*!
+  \brief Read directory and build an array of dbDirent's
+  
+  Append one entry with name = NULL to mark end of array
+  
+  \param dirname directory name
+  \param[out] number of entities
 
-/*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
-/* read directory and build an array of dbDirent's */
-/* append one entry with name = NULL to mark end of array */
+  \return pointer to dbDirent
+  \return NULL on error
+*/
 dbDirent *db_dirent(const char *dirname, int *n)
 {
     DIR *dp;
@@ -93,11 +109,11 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Free dbDirent
+
+  \param dirent pointer to dbDirent
+  \param count number of entities in the array
+*/
 void db_free_dirent_array(dbDirent * dirent, int count)
 {
     int i;
@@ -140,11 +156,13 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Allocate dirent array
+
+  \param count number of entities in the array
+
+  \return pointer to dbDirent array
+  \return NULL on failure
+*/
 dbDirent *db_alloc_dirent_array(int count)
 {
     int i;

Modified: grass/trunk/lib/db/dbmi_base/error.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/error.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/error.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,9 +1,24 @@
+/*!
+  \file lib/db/dbmi_base/error.c
+  
+  \brief DBMI Library (base) - error management
+  
+  (C) 1999-2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC)
+  \author Upgraded to GRASS 5.7 by Radim Blazek
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <string.h>
 #include <stdlib.h>
+#include <errno.h>
 #include <grass/dbmi.h>
+#include <grass/glocale.h>
 
-#include <errno.h>
-
 static int err_flag = 0;
 static int err_code = DB_OK;
 static char *err_msg = 0;
@@ -14,22 +29,20 @@
 static char *who = NULL;
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief User defined error procedure
+
+  \param f pointer to user-defined function
+*/
 void db_on_error(void (*f) (const char *))
 {
     user_print_function = f;
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Set 'who' for error messages
+
+  \param me my name
+*/
 void db_set_error_who(const char *me)
 {
     if (who)
@@ -38,26 +51,25 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  brief Get 'who' string
+
+  \return pointer to string buffer
+  \return empty buffer if 'who' is not defined
+*/
 const char *db_get_error_who(void)
 {
     return who ? who : "";
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Report error message
+  
+  \param s error message (can be NULL)
+*/
 void db_error(const char *s)
 {
     if (s == NULL)
-	s = "<NULL error message>";
+	s = _("<NULL error message>");
     if (err_msg)
 	db_free(err_msg);
     err_msg = db_store(s);
@@ -68,28 +80,24 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Report protocol error
+*/
 void db_protocol_error(void)
 {
     int flag;
 
     flag = auto_print_errors;
     auto_print_errors = auto_print_protocol_errors;
-    db_error("dbmi: Protocol error");
+    db_error(_("dbmi: Protocol error"));
     auto_print_errors = flag;
     err_code = DB_PROTOCOL_ERR;
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Report system error
+  
+  \param s error message
+*/
 void db_syserror(const char *s)
 {
     char lead[1024];
@@ -111,10 +119,9 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
+  \brief Get error code
+  
+  \return DB_OK if not defined
  */
 int db_get_error_code(void)
 {
@@ -122,53 +129,45 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief  Report memory error
+*/
 void db_memory_error(void)
 {
-    db_error("dbmi: Out of Memory");
+    db_error(_("dbmi: Out of Memory"));
     err_code = DB_MEMORY_ERR;
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Report 'not implemented' error
+
+  \param name name of functionality
+*/
 void db_procedure_not_implemented(const char *name)
 {
     char msg[128];
 
-    sprintf(msg, "dbmi: %s() not implemented", name);
+    sprintf(msg, _("dbmi: %s() not implemented"), name);
     db_error(msg);
     err_code = DB_NOPROC;
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Report no procedure error
+
+  \param procnum procedure number
+*/
 void db_noproc_error(procnum)
 {
     char msg[128];
 
-    sprintf(msg, "dbmi: Invalid procedure %d", procnum);
+    sprintf(msg, _("dbmi: Invalid procedure %d"), procnum);
     db_error(msg);
     err_code = DB_NOPROC;
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Clear error status
+*/
 void db_clear_error(void)
 {
     err_flag = 0;
@@ -177,11 +176,10 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Print error
+
+  If not defined, the error message is printed to stderr.
+*/
 void db_print_error(void)
 {
     char lead[1024];
@@ -207,33 +205,26 @@
 static int debug_on = 0;
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Turn on debuging
+*/
 void db_debug_on(void)
 {
     debug_on = 1;
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Turn off debuging
+*/
 void db_debug_off(void)
 {
     debug_on = 0;
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Print debug message
+
+  \param s debug message
+*/
 void db_debug(const char *s)
 {
     if (debug_on)
@@ -241,22 +232,20 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get error message
+
+  \return pointer to error message string
+*/
 const char *db_get_error_msg(void)
 {
     return err_flag ? err_msg : (const char *)NULL;
 }
 
 /*!
-   \fn void db_auto_print_errors (flag)
-   \brief toggles printing of DBMI error messages
-   \return void
-   \param flag
- */
+  \brief Toggles printing of DBMI error messages
+
+  \param flag ?
+*/
 void db_auto_print_errors(int flag)
 {
     auto_print_errors = flag;
@@ -264,10 +253,9 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
+  \brief Set auto print protocol error
+
+  \param flag ?
  */
 void db_auto_print_protocol_errors(int flag)
 {

Modified: grass/trunk/lib/db/dbmi_base/handle.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/handle.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/handle.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,5 +1,5 @@
 /*!
-  \file db/dbmi_base/handle.c
+  \file lib/db/dbmi_base/handle.c
   
   \brief DBMI Library (base) - handle management
   

Modified: grass/trunk/lib/db/dbmi_base/index.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/index.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/index.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,13 +1,27 @@
+/*!
+  \file lib/db/dbmi_base/index.c
+  
+  \brief DBMI Library (base) - index management
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <string.h>
 #include <stdlib.h>
 #include <grass/dbmi.h>
+#include <grass/glocale.h>
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Initialize dbIndex
+
+  \param index pointer to dbIndex to be initialized
+*/
 void db_init_index(dbIndex * index)
 {
     db_init_string(&index->indexName);
@@ -18,11 +32,10 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Free allocated dbIndex
+
+  \param index pointer to dbIndex to be freed
+*/
 void db_free_index(dbIndex * index)
 {
     db_free_string(&index->indexName);
@@ -33,11 +46,13 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Allocate index columns
+
+  \param index pointer to dbIndex
+  \param ncols number of columns to be allocated
+
+  \return DB_OK
+*/
 int db_alloc_index_columns(dbIndex * index, int ncols)
 {
     index->columnNames = db_alloc_string_array(ncols);
@@ -49,11 +64,12 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Allocate index array
+
+  \param count number of items
+
+  \return pointer to allocated dbIndex array
+*/
 dbIndex *db_alloc_index_array(int count)
 {
     dbIndex *list;
@@ -68,11 +84,11 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Free index array
+
+  \param list dbIndex array
+  \param count number of items in the array
+*/
 void db_free_index_array(dbIndex * list, int count)
 {
     int i;
@@ -85,32 +101,39 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Set index name
+
+  \param index pointer to dbIndex
+  \param name name to be set
+
+  \return DB_OK on success
+  \return DB_FAILED on error
+*/
 int db_set_index_name(dbIndex * index, const char *name)
 {
     return db_set_string(&index->indexName, name);
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get index name
+
+  \param index pointer to dbIndex
+  
+  \return string buffer with name
+*/
 const char *db_get_index_name(dbIndex * index)
 {
     return db_get_string(&index->indexName);
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
+  \brief Set table name
+
+  \param index pointer to dbIndex
+  \param name name to be set
+
+  \return DB_OK on success
+  \return DB_FAILED on error
  */
 int db_set_index_table_name(dbIndex * index, const char *name)
 {
@@ -118,64 +141,74 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get table name
+
+  \param index pointer to dbIndex
+  
+  \return string buffer with name
+*/
 const char *db_get_index_table_name(dbIndex * index)
 {
     return db_get_string(&index->tableName);
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get number of columns
+
+  \param index pointer to dbIndex
+
+  \return number of columns
+*/
 int db_get_index_number_of_columns(dbIndex * index)
 {
     return index->numColumns;
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
-int
-db_set_index_column_name(dbIndex * index, int column_num, const char *name)
+  \brief Set column name
+
+  \param index pointer to dbIndex
+  \param column_num column number
+  \param name name to be set
+
+  \return DB_OK on success
+  \return DB_FAILED on error
+*/
+int db_set_index_column_name(dbIndex * index, int column_num, const char *name)
 {
     if (column_num < 0 || column_num >= index->numColumns) {
-	db_error("db_set_index_column_name(): invalid column number");
+	db_error(_("db_set_index_column_name(): invalid column number"));
 	return db_get_error_code();
     }
     return db_set_string(&index->columnNames[column_num], name);
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
+  \brief Get column number
+
+  \param index pointer to dbIndex
+  \param column_num column number
+
+  \return string buffer with name
  */
 const char *db_get_index_column_name(dbIndex * index, int column_num)
 {
     if (column_num < 0 || column_num >= index->numColumns) {
-	db_error("db_get_index_column_name(): invalid column number");
+	db_error(_("db_get_index_column_name(): invalid column number"));
 	return ((const char *)NULL);
     }
     return db_get_string(&index->columnNames[column_num]);
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Set index type to unique
+
+  \todo return type void?
+
+  \param index pointer to dbIndex
+
+  \return 0
+*/
 int db_set_index_type_unique(dbIndex * index)
 {
     index->unique = 1;
@@ -184,11 +217,14 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Set index type to non-unique
+  
+  \void return type void?
+
+  \param index pointer to dbIndex
+
+  \return 0
+*/
 int db_set_index_type_non_unique(dbIndex * index)
 {
     index->unique = 0;
@@ -197,10 +233,12 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
+  \brief Test if type is unique
+
+  \param index pointer to dbIndex
+
+  \return non-zero if True
+  \return zero if False
  */
 int db_test_index_type_unique(dbIndex * index)
 {
@@ -208,11 +246,11 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Report index 
+
+  \param fd file where to print index info
+  \param index pointer to dbIndex
+*/
 void db_print_index(FILE * fd, dbIndex * index)
 {
     int i, nCols;

Modified: grass/trunk/lib/db/dbmi_base/interval.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/interval.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/interval.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,10 +1,25 @@
+/*!
+  \file lib/db/dbmi_base/interval.c
+  
+  \brief DBMI Library (base) - range, interval procedures
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <grass/dbmi.h>
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
+  \brief Define range based on SQL data type
+
+  \param sqltype SQL data type
+  \param[out] from 
+  \param[out] to
  */
 void db_interval_range(int sqltype, int *from, int *to)
 {

Modified: grass/trunk/lib/db/dbmi_base/isdir.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/isdir.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/isdir.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,3 +1,17 @@
+/*!
+  \file lib/db/dbmi_base/isdir.c
+  
+  \brief DBMI Library (base) - test for directories
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <grass/config.h>
 #include <grass/dbmi.h>
 #include <unistd.h>
@@ -5,11 +19,13 @@
 #include <sys/stat.h>
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Test if path is a directory
+
+  \param path pathname
+
+  \return DB_OK on success
+  \return DB_FAILED on failure
+*/
 int db_isdir(const char *path)
 {
     STRUCT_STAT x;

Modified: grass/trunk/lib/db/dbmi_base/legal_dbname.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/legal_dbname.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/legal_dbname.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,3 +1,19 @@
+/*!
+  \file lib/db/dbmi_base/legal_dbname.c
+  
+  \brief DBMI Library (base) - validate DB names
+
+  \todo Are we as restrictive here as for vector names?
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <grass/gis.h>
 #include <grass/dbmi.h>
 #include <grass/glocale.h>
@@ -2,14 +18,12 @@
 
-/* TODO: are we as restrictive here as for vector names? */
-
 /*!
-   \fn int db_legal_tablename (char *s)
-   \brief  Check if output is legal table name
-   \return 1 OK
-   \return -1 if name does not start with letter A..Za..z
-   or if name does not continue with A..Za..z0..9_@
-   Rule:  [A-Za-z][A-Za-z0-9_@]*
-   \param  name table name to be checked
- */
+  \brief Check if output is legal table name
+  
+  Rule:  [A-Za-z][A-Za-z0-9_@]*
+  \param s table name to be checked
 
+  \return 1 OK 
+  \return -1 if name does not start with letter A..Za..z or if name does
+  not continue with A..Za..z0..9_@
+*/
 int db_legal_tablename(const char *s)
@@ -21,17 +35,15 @@
     sprintf(buf, "%s", s);
 
     if (*s == '.' || *s == 0) {
-	fprintf(stderr,
-		_("Illegal table map name <%s>. May not contain '.' or 'NULL'.\n"),
-		buf);
+	G_warning(_("Illegal table map name <%s>. May not contain '.' or 'NULL'."),
+		  buf);
 	return DB_FAILED;
     }
 
     /* file name must start with letter */
     if (!((*s >= 'A' && *s <= 'Z') || (*s >= 'a' && *s <= 'z'))) {
-	fprintf(stderr,
-		_("Illegal table map name <%s>. Must start with a letter.\n"),
-		buf);
+	G_warning(_("Illegal table map name <%s>. Must start with a letter."),
+		  buf);
 	return DB_FAILED;
     }
 
@@ -39,9 +51,8 @@
 	if (!
 	    ((*s >= 'A' && *s <= 'Z') || (*s >= 'a' && *s <= 'z') ||
 	     (*s >= '0' && *s <= '9') || *s == '_' || *s == '@')) {
-	    fprintf(stderr,
-		    _("Illegal table map name <%s>. Character <%c> not allowed.\n"),
-		    buf, *s);
+	    G_warning(_("Illegal table map name <%s>. Character <%c> not allowed."),
+		      buf, *s);
 	    return DB_FAILED;
 	}
 

Modified: grass/trunk/lib/db/dbmi_base/login.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/login.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/login.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,5 +1,5 @@
 /*!
-  \file db/dbmi_base/login.c
+  \file lib/db/dbmi_base/login.c
   
   \brief DBMI Library (base) - login settings
   
@@ -160,15 +160,15 @@
 }
 
 /*!
-   \brief Set user/password for driver/database
-   
-   \param driver driver name
-   \param database database name
-   \param user user name
-   \param password password string
-   
-   \return DB_OK
-   \return DB_FAILED
+  \brief Set user/password for driver/database
+  
+  \param driver driver name
+  \param database database name
+  \param user user name
+  \param password password string
+  
+  \return DB_OK
+  \return DB_FAILED
  */
 int db_set_login(const char *driver, const char *database, const char *user,
 		 const char *password)
@@ -212,17 +212,18 @@
     return DB_OK;
 }
 
-/*!
-   \brief Get user/password for driver/database if driver/database is not found, user/password are set to NULL
-
-   \param driver driver name
-   \param database database name
-   \param[out] user name
-   \param[out] password string
-   
-   \return DB_OK
-   \return DB_FAILED
- */
+/*!  
+  \brief Get user/password for driver/database if driver/database
+  is not found, user/password are set to NULL
+  
+  \param driver driver name
+  \param database database name
+  \param[out] user name
+  \param[out] password string
+  
+  \return DB_OK
+  \return DB_FAILED
+*/
 int db_get_login(const char *driver, const char *database, const char **user,
 		 const char **password)
 {

Modified: grass/trunk/lib/db/dbmi_base/ret_codes.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/ret_codes.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/ret_codes.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,3 +1,19 @@
+/*!
+  \file lib/db/dbmi_base/ret_codes.c
+  
+  \brief DBMI Library (base) - return codes (internal use only)
+
+  \todo Are we as restrictive here as for vector names?
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <stdlib.h>
 #include <grass/dbmi.h>
 #include "macros.h"
@@ -2,2 +18,7 @@
 
+/*!
+  \brief Send success code
+
+  \return DB_OK
+*/
 int db__send_success()
@@ -8,6 +29,11 @@
     return DB_OK;
 }
 
+/*!
+  \brief Send failure code
+
+  \return DB_OK
+*/
 int db__send_failure()
 {
     DB_SEND_INT(DB_FAILED);
@@ -15,6 +41,13 @@
     return DB_OK;
 }
 
+/*!
+  \brief Receive return code
+  
+  \param[out] ret_code return code
+
+  \return DB_OK on success
+*/
 int db__recv_return_code(int *ret_code)
 {
     dbString err_msg;

Modified: grass/trunk/lib/db/dbmi_base/sqlCtype.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/sqlCtype.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/sqlCtype.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,11 +1,26 @@
+/*!
+  \file lib/db/dbmi_base/sqlCtype.c
+  
+  \brief DBMI Library (base) - SQL data type to C data type
+
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <grass/dbmi.h>
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get C data type based on given SQL data type
+
+  \param sqltype SQL data type
+
+  \return related C data type
+*/
 int db_sqltype_to_Ctype(int sqltype)
 {
     switch (sqltype) {

Modified: grass/trunk/lib/db/dbmi_base/sqltype.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/sqltype.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/sqltype.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,3 +1,17 @@
+/*!
+  \file lib/db/dbmi_base/sqltype.c
+  
+  \brief DBMI Library (base) - SQL data type
+
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <string.h>
 #include <grass/dbmi.h>
 
@@ -2,6 +16,8 @@
 /*!
-   \brief returns sqltype description
-   \return 
-   \param 
- */
+  \brief Get SQL data type description
+
+  \param sqltype SQL data type
+
+  \return string buffer with description
+*/
 const char *db_sqltype_name(int sqltype)

Modified: grass/trunk/lib/db/dbmi_base/string.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/string.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/string.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -18,9 +18,9 @@
 #include <grass/dbmi.h>
 
 /*!
-   \brief Initialize dbString 
-
-   \param[in,out] x pointer to dbString
+  \brief Initialize dbString 
+  
+  \param[out] x pointer to dbString
  */
 void db_init_string(dbString * x)
 {

Modified: grass/trunk/lib/db/dbmi_base/strip.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/strip.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/strip.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,17 +1,27 @@
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
-/*  db_strip(buf)
- *     char *buf         buffer to be worked on
- *
- *  'buf' is rewritten in place with leading and trailing white
- *  space removed.
- */
+  \file lib/db/dbmi_base/strip.c
+  
+  \brief DBMI Library (base) - strip strings
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
 
+#include <grass/dbmi.h>
 
+/*!
+  \brief Strip given string
+
+  'buf' is rewritten in place with leading and trailing white
+  space removed.
+
+  \param buf string buffer
+*/
 void db_strip(char *buf)
 {
     char *a, *b;

Modified: grass/trunk/lib/db/dbmi_base/table.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/table.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/table.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,3 +1,17 @@
+/*!
+  \file lib/db/dbmi_base/table.c
+  
+  \brief DBMI Library (base) - table management
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>
@@ -4,9 +18,12 @@
 #include <grass/dbmi.h>
 
 /*!
-   \brief Alloacte a table with a specific number of columns
-   \param The number of columns which should be allocated
-   \return The allocated table or NULL in case of an error
+  \brief Allocate a table with a specific number of columns
+  
+  \param ncols number of columns which should be allocated
+  
+  \return allocated dbTable
+  \return NULL in case of an error
  */
 dbTable *db_alloc_table(int ncols)
 {
@@ -33,8 +50,9 @@
 
 /*!
    \brief Initialize the table to zero
+   
    \param table pointer to dbTable
- */
+*/
 void db_init_table(dbTable * table)
 {
     db_zero((void *)table, sizeof(dbTable));
@@ -43,9 +61,10 @@
 }
 
 /*!
- * \brief Free the table
- * \param table pointer to dbTable
- */
+  \brief Free the table
+  
+  \param table pointer to dbTable
+*/
 void db_free_table(dbTable * table)
 {
     int i;
@@ -60,30 +79,36 @@
 
 /*!
    \brief Set the name of the table
- * \param table pointer to dbTable
- * \param name The name of the table
-   \return 
- */
+
+   \param table pointer to dbTable
+   \param name The name of the table
+
+   \return DB_OK on success
+*/
 int db_set_table_name(dbTable * table, const char *name)
 {
     return db_set_string(&table->tableName, name);
 }
 
 /*!
-   \brief Get the name of the table
-   \param table pointer to dbTable
-   \return name of the table
- */
+  \brief Get the name of the table
+
+  \param table pointer to dbTable
+
+  \return name of the table
+*/
 const char *db_get_table_name(dbTable * table)
 {
     return db_get_string(&table->tableName);
 }
 
 /*!
-   \brief Set the description of the table
- * \param table pointer to dbTable
- * \param name The description of the table
-   \return
+  \brief Set the description of the table
+  
+  \param table pointer to dbTable
+  \param name description of the table
+  
+  \return DB_OK
  */
 int db_set_table_description(dbTable * table, const char *description)
 {
@@ -91,31 +116,29 @@
 }
 
 /*!
-   \brief Get the description of the table
-   \param table pointer to dbTable
-   \return description of the table
- */
+  \brief Get the description of the table
+
+  \param table pointer to dbTable
+  
+  \return description of the table
+*/
 const char *db_get_table_description(dbTable * table)
 {
     return db_get_string(&table->description);
 }
 
 /*!
-   \brief Return the number of columns of the table
- * \param table pointer to dbTable
-   \return Number of columns
- */
+  \brief Return the number of columns of the table
+  
+  \param table pointer to dbTable
+  
+  \return number of columns
+*/
 int db_get_table_number_of_columns(dbTable * table)
 {
     return table->numColumns;
 }
 
-/*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
 static void set_all_column_privs(dbTable * table, void (*set_column_priv) ())
 {
     int col, ncols;
@@ -128,12 +151,6 @@
     }
 }
 
-/*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
 static int get_all_column_privs(dbTable * table, int (*get_column_priv) ())
 {
     int priv, col, ncols;
@@ -150,67 +167,74 @@
 }
 
 /*!
-   \brief Grant selection privileges for all columns
-   \param table pointer to dbTable
- */
+  \brief Grant selection privileges for all columns
+  
+  \param table pointer to dbTable
+*/
 void db_set_table_select_priv_granted(dbTable * table)
 {
     set_all_column_privs(table, db_set_column_select_priv_granted);
 }
 
 /*!
-   \brief Set selection privileges not granted for all columns
-   \param table pointer to dbTable
- */
+  \brief Set selection privileges not granted for all columns
+  
+  \param table pointer to dbTable
+*/
 void db_set_table_select_priv_not_granted(dbTable * table)
 {
     set_all_column_privs(table, db_set_column_select_priv_not_granted);
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get table select privileges
+
+  \param table pointer to dbTable
+ 
+  \return privilages
+*/
 int db_get_table_select_priv(dbTable * table)
 {
     return get_all_column_privs(table, db_get_column_select_priv);
 }
 
 /*!
-   \brief Grant update privileges for all columns
-   \param table pointer to dbTable
- */
+  \brief Grant update privileges for all columns
+
+  \param table pointer to dbTable
+*/
 void db_set_table_update_priv_granted(dbTable * table)
 {
     set_all_column_privs(table, db_set_column_update_priv_granted);
 }
 
 /*!
-   \brief Set update privileges not granted for all columns
-   \param table pointer to dbTable
- */
+  \brief Set update privileges not granted for all columns
+  
+  \param table pointer to dbTable
+*/
 void db_set_table_update_priv_not_granted(dbTable * table)
 {
     set_all_column_privs(table, db_set_column_update_priv_not_granted);
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get table update privileges
+
+  \param table pointer to dbTable
+
+  \return privilages
+*/
 int db_get_table_update_priv(dbTable * table)
 {
     return get_all_column_privs(table, db_get_column_update_priv);
 }
 
 /*!
-   \brief Grant insert privileges for table
-   \param table pointer to dbTable
- */
+  \brief Grant insert privileges for table
+  
+  \param table pointer to dbTable
+*/
 void db_set_table_insert_priv_granted(dbTable * table)
 {
     table->priv_insert = DB_GRANTED;
@@ -218,6 +242,7 @@
 
 /*!
    \brief Set insert privileges not granted for table
+   
    \param table pointer to dbTable
  */
 void db_set_table_insert_priv_not_granted(dbTable * table)
@@ -226,19 +251,21 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get table insert privileges
+
+  \param table pointer to dbTable
+
+  \return prilileges
+*/
 int db_get_table_insert_priv(dbTable * table)
 {
     return table->priv_insert;
 }
 
 /*!
-   \brief Grant delete privileges for table
-   \param table pointer to dbTable
+  \brief Grant delete privileges for table
+  
+  \param table pointer to dbTable
  */
 void db_set_table_delete_priv_granted(dbTable * table)
 {
@@ -246,26 +273,27 @@
 }
 
 /*!
-   \brief Set delete privileges not granted for table
-   \param table pointer to dbTable
- */
+  \brief Set delete privileges not granted for table
+  
+  \param table pointer to dbTable
+*/
 void db_set_table_delete_priv_not_granted(dbTable * table)
 {
     table->priv_delete = DB_NOT_GRANTED;
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get table delete privileges
+
+  \param table pointer to dbTable
+
+  \return privileges
+*/
 int db_get_table_delete_priv(dbTable * table)
 {
     return table->priv_delete;
 }
 
-
 /*!
   \brief Returns column structure for given table and column number
 
@@ -312,15 +340,16 @@
 }
 
 /*!
- * \brief Set a specific column for given table and column number
- *
- * \param table Pointer to dbTable
- * \param idx Column index (starting with '0').  The index must be in range.
- * \param column Pointer to a dbColumn to insert.
- * A copy of the column stored, so the original column can be deleted.
- * \return DB_OK on success
- * \return DB_FAILURE on error
- */
+  \brief Set a specific column for given table and column number
+  
+  \param table Pointer to dbTable
+  \param idx Column index (starting with '0').  The index must be in range.
+  \param column Pointer to a dbColumn to insert.
+  A copy of the column stored, so the original column can be deleted.
+  
+  \return DB_OK on success
+  \return DB_FAILURE on error
+*/
 int db_set_table_column(dbTable * table, int idx, dbColumn *column)
 {
     if (idx < 0 || idx >= table->numColumns)
@@ -330,14 +359,15 @@
 }
 
 /*!
- * \brief Append a specific column to given table
- *
- * \param table Pointer to dbTable
- * \param column Pointer to a dbColumn to append.
- * A copy of the column is stored, so the original column can be deleted.
- * \return DB_OK on success
- * \return DB_FAILURE on error
- */
+  \brief Append a specific column to given table
+  
+  \param table Pointer to dbTable
+  \param column Pointer to a dbColumn to append.
+  A copy of the column is stored, so the original column can be deleted.
+  
+  \return DB_OK on success
+  \return DB_FAILURE on error
+*/
 int db_append_table_column(dbTable * table, dbColumn *column)
 {
     table->columns = (dbColumn*)db_realloc((void*)table->columns, sizeof(dbColumn)*(table->numColumns + 1));
@@ -349,14 +379,15 @@
 }
 
 /*!
- * \brief Make a new exact copy of an existing table
- *
- * New memory is allocated for the clone, the columns-content will be copied too.
- *
- * \param src Pointer to dbTable
- * \return A new alloacted clone of the given table on success 
- * \return NULL on error
- */
+  \brief Make a new exact copy of an existing table
+  
+  New memory is allocated for the clone, the columns-content will be copied too.
+  
+  \param src Pointer to dbTable
+  
+  \return A new alloacted clone of the given table on success 
+  \return NULL on error
+*/
 dbTable *db_clone_table(dbTable *src)
 {
     int i, n = db_get_table_number_of_columns(src);
@@ -382,11 +413,13 @@
 
 /*!
    \brief Create SQL CREATE sring from table definition
-   \param table
- * \param sql The dbString to store the SQL CREATE string
- * \return DB_OK on success
- *  \return DB_FAILED on error
- */
+ 
+   \param table pointer to dbTable
+   \param sql dbString to store the SQL CREATE string
+
+   \return DB_OK on success
+   \return DB_FAILED on error
+*/
 int db_table_to_sql(dbTable * table, dbString * sql)
 {
     int col, ncols;

Modified: grass/trunk/lib/db/dbmi_base/value.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/value.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/value.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,3 +1,17 @@
+/*!
+  \file lib/db/dbmi_base/value.c
+  
+  \brief DBMI Library (base) - value management
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <stdlib.h>
 #include <grass/dbmi.h>
 
@@ -2,7 +16,9 @@
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Check of value is null
+
+  \param value pointer to dbValue
+
+  \return non-zero is null
+  \return zero is not null
+*/
 int db_test_value_isnull(dbValue * value)
@@ -13,34 +29,39 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get integer value
+
+  \param value pointer to dbValue
+
+  \return value
+*/
 int db_get_value_int(dbValue * value)
 {
     return (value->i);
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get double precision value
+
+  \param value pointer to dbValue
+
+  \return value
+*/
 double db_get_value_double(dbValue * value)
 {
     return (value->d);
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
-/* for given value and C type of value returns double representation */
+  \brief Get value as double
+  
+  For given value and C type of value returns double representation.
+
+  \param value pointer to dbValue
+  \param ctype C data type
+
+  \return value
+*/
 double db_get_value_as_double(dbValue * value, int ctype)
 {
     double val;
@@ -62,110 +83,115 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get string value
+
+  \param value pointer to dbValue
+
+  \return value
+*/
 const char *db_get_value_string(dbValue * value)
 {
     return (db_get_string(&value->s));
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get year value
+
+  \param value pointer to dbValue
+
+  \return value
+*/
 int db_get_value_year(dbValue * value)
 {
     return (value->t.year);
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get month value
+
+  \param value pointer to dbValue
+
+  \return value
+*/
 int db_get_value_month(dbValue * value)
 {
     return (value->t.month);
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get day value
+
+  \param value pointer to dbValue
+
+  \return value
+*/
 int db_get_value_day(dbValue * value)
 {
     return (value->t.day);
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get hour value
+
+  \param value pointer to dbValue
+
+  \return value
+*/
 int db_get_value_hour(dbValue * value)
 {
     return (value->t.hour);
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get minute value
+
+  \param value pointer to dbValue
+
+  \return value
+*/
 int db_get_value_minute(dbValue * value)
 {
     return (value->t.minute);
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get seconds value
+
+  \param value pointer to dbValue
+
+  \return value
+*/
 double db_get_value_seconds(dbValue * value)
 {
     return (value->t.seconds);
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Set value to null
+
+  \param value pointer to dbValue
+*/
 void db_set_value_null(dbValue * value)
 {
     value->isNull = 1;
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Set value to not null
+
+  \param value pointer to dbValue
+*/
 void db_set_value_not_null(dbValue * value)
 {
     value->isNull = 0;
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Set integer value
+
+  \param value pointer to dbValue
+  \param i integer value
+*/
 void db_set_value_int(dbValue * value, int i)
 {
     value->i = i;
@@ -173,11 +199,11 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Set double precision value
+
+  \param value pointer to dbValue
+  \param d double value
+*/
 void db_set_value_double(dbValue * value, double d)
 {
     value->d = d;
@@ -185,11 +211,11 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Set string value
+
+  \param value pointer to dbValue
+  \param s string value
+*/
 int db_set_value_string(dbValue * value, const char *s)
 {
     db_set_value_not_null(value);
@@ -197,11 +223,11 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Set year value
+
+  \param value pointer to dbValue
+  \param year year value
+*/
 void db_set_value_year(dbValue * value, int year)
 {
     value->t.year = year;
@@ -209,11 +235,11 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Set month value
+
+  \param value pointer to dbValue
+  \param month month value
+*/
 void db_set_value_month(dbValue * value, int month)
 {
     value->t.month = month;
@@ -221,11 +247,11 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Set day value
+
+  \param value pointer to dbValue
+  \param day day value
+*/
 void db_set_value_day(dbValue * value, int day)
 {
     value->t.day = day;
@@ -233,11 +259,11 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Set hour value
+
+  \param value pointer to dbValue
+  \param hour hour value
+*/
 void db_set_value_hour(dbValue * value, int hour)
 {
     value->t.hour = hour;
@@ -245,11 +271,11 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Set minute value
+
+  \param value pointer to dbValue
+  \param minute minute value
+*/
 void db_set_value_minute(dbValue * value, int minute)
 {
     value->t.minute = minute;
@@ -257,11 +283,11 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Set seconds value
+
+  \param value pointer to dbValue
+  \param seconds seconds value
+*/
 void db_set_value_seconds(dbValue * value, double seconds)
 {
     value->t.seconds = seconds;
@@ -269,22 +295,23 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Check if datatime is current
+
+  \param value pointer to dbValue
+
+  \return non-zero for true
+  \return zero for false
+*/
 int db_test_value_datetime_current(dbValue * value)
 {
     return (value->t.current != 0);
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Set datetime to current
+
+  \param value pointer to dbValue
+*/
 void db_set_value_datetime_current(dbValue * value)
 {
     value->t.current = 1;
@@ -292,11 +319,10 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Set value to non-current
+
+  \param value pointer to dbValue
+*/
 void db_set_value_datetime_not_current(dbValue * value)
 {
     value->t.current = 0;
@@ -304,12 +330,13 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
-/* copy value from src to destination */
+  \brief Copy value
+
+  Copy value from src to destination
+  
+  \param dst destination dbValue
+  \param src source dbValue
+*/
 void db_copy_value(dbValue * dst, dbValue * src)
 {
     dst->isNull = src->isNull;
@@ -327,11 +354,10 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Initialize dbCatValArray
+
+  \param arr pointer to dbCatValArray to be initialized
+*/
 void db_CatValArray_init(dbCatValArray * arr)
 {
     arr->n_values = 0;
@@ -340,11 +366,10 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Free allocated dbCatValArray
+
+  \param arr pointer to dbCatValArray
+*/
 void db_CatValArray_free(dbCatValArray * arr)
 {
     if (arr->ctype == DB_C_TYPE_STRING || arr->ctype == DB_C_TYPE_DATETIME) {
@@ -364,11 +389,15 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Allocate dbCatValArray
+
+  \todo return type void?
+
+  \param arr pointer to dbCatValArray
+  \param n number of items
+
+  \return DB_OK
+*/
 int db_CatValArray_alloc(dbCatValArray * arr, int n)
 {
     arr->value = (dbCatVal *) G_calloc(n, sizeof(dbCatVal));
@@ -379,11 +408,15 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Realloc dbCatValArray
+
+  \todo return code void?
+
+  \param arr pointer to dbCatValArray
+  \param n number of items
+
+  \return DB_OK
+*/
 int db_CatValArray_realloc(dbCatValArray * arr, int n)
 {
     arr->value = (dbCatVal *) G_realloc(arr->value, n * sizeof(dbCatVal));

Modified: grass/trunk/lib/db/dbmi_base/valuefmt.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/valuefmt.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/valuefmt.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,3 +1,17 @@
+/*!
+  \file lib/db/dbmi_base/valuefmt.c
+  
+  \brief DBMI Library (base) - value formating
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <stdio.h>
 #include <string.h>
 #include <grass/gis.h>
@@ -2,11 +16,15 @@
 #include <grass/dbmi.h>
+#include <grass/glocale.h>
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
+  \brief Convert string to value
+
+  \param Cstring string buffer
+  \param sqltype SQL data type
+  \param[out] value pointer to dbValue
+
+  \return DB_OK on success
+  \return DB_FAILED on error
  */
-int
-db_convert_Cstring_to_value(const char *Cstring, int sqltype, dbValue * value)
+int db_convert_Cstring_to_value(const char *Cstring, int sqltype, dbValue * value)
 {
@@ -31,20 +49,22 @@
     case DB_C_TYPE_DATETIME:
 	return db_convert_Cstring_to_value_datetime(Cstring, sqltype, value);
     default:
-	db_error("db_convert_Cstring_to_value(): unrecognized sqltype");
+	db_error(_("db_convert_Cstring_to_value(): unrecognized sqltype"));
 	return DB_FAILED;
     }
     return DB_OK;
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
-int
-db_convert_value_to_string(dbValue * value, int sqltype, dbString * string)
+  \brief Convert value to string
+  
+  \param value pointer to dbValue
+  \param sqltype SQL data type
+  \param[out] string pointer to dbString
+
+  \return DB_OK on success
+*/
+int db_convert_value_to_string(dbValue * value, int sqltype, dbString * string)
 {
     char buf[64];
     const char *bp = buf;
@@ -68,8 +88,7 @@
 	    return db_convert_value_datetime_into_string(value, sqltype,
 							 string);
 	default:
-	    db_error
-		("db_convert_value_into_string(): unrecongized sqltype-type");
+	    db_error(_("db_convert_value_into_string(): unrecongized sqltype-type"));
 	    return DB_FAILED;
 	}
     }

Modified: grass/trunk/lib/db/dbmi_base/whoami.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/whoami.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/whoami.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,3 +1,17 @@
+/*!
+  \file lib/db/dbmi_base/whoami.c
+  
+  \brief DBMI Library (base) - who am i
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <grass/gis.h>
@@ -3,13 +17,12 @@
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
-char *db_whoami()
+  \brief Who am i?
+
+  Check enviromental variable LOGNAME
+
+  \return string buffer with logname
+*/
+const char *db_whoami()
 {
-    char *userid = G_store(getenv("LOGNAME"));
-
-    return userid;
+    return G_store(getenv("LOGNAME"));
 }

Modified: grass/trunk/lib/db/dbmi_base/xdr.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/xdr.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/xdr.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,19 +1,17 @@
+/*!
+  \file lib/db/dbmi_base/xdr.c
+  
+  \brief DBMI Library (base) - external data representation
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek, Brad Douglas, Markus Neteler
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
 
-/****************************************************************************
- *
- * MODULE:       dbmi_base
- * AUTHOR(S):    CERL (Joel Jones + possible other original contributors)
- *               Radim Blazek <radim.blazek gmail.com>,
- *               Brad Douglas <rez touchofmadness.com>, 
- *               Markus Neteler <neteler itc.it>
- * PURPOSE:      database management functions for modules and drivers
- * COPYRIGHT:    (C) 2003-2006 by the GRASS Development Team
- *
- *               This program is free software under the GNU General Public
- *               License (>=v2). Read the file COPYING that comes with GRASS
- *               for details.
- *
- *****************************************************************************/
 #include "xdr.h"
 
 #ifdef __MINGW32__
@@ -68,12 +66,26 @@
 
 #endif
 
+/*!
+  \brief ?
+  
+  \param send
+  \param recv
+*/
 void db__set_protocol_fds(FILE * send, FILE * recv)
 {
     _send = send;
     _recv = recv;
 }
 
+/*!
+  \brief ?
+
+  \param buf
+  \param size
+
+  \return
+*/
 int db__send(const void *buf, size_t size)
 {
 #if USE_STDIO

Modified: grass/trunk/lib/db/dbmi_base/xdrchar.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/xdrchar.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/xdrchar.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,6 +1,26 @@
+/*!
+  \file lib/db/dbmi_base/xdrchar.c
+  
+  \brief DBMI Library (base) - external data representation (char)
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek, Brad Douglas, Markus Neteler
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include "xdr.h"
 
+/*!
+  \brief ?
+  
+  \param d
 
+  \return
+*/
 int db__send_char(int d)
 {
     int stat = DB_OK;
@@ -15,7 +35,13 @@
     return stat;
 }
 
+/*!
+  \brief ?
 
+  \param d
+
+  \return
+*/
 int db__recv_char(char *d)
 {
     int stat = DB_OK;

Modified: grass/trunk/lib/db/dbmi_base/xdrcolumn.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/xdrcolumn.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/xdrcolumn.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,7 +1,27 @@
+/*!
+  \file lib/db/dbmi_base/xdrcolumn.c
+  
+  \brief DBMI Library (base) - external data representation (column)
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek, Brad Douglas, Markus Neteler
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <grass/dbmi.h>
 #include "macros.h"
 
+/*!
+  \brief Send column definition
+  
+  \param column pointer to dbColumn
 
+  \return DB_OK
+*/
 int db__send_column_definition(dbColumn * column)
 {
     DB_SEND_STRING(&column->columnName);
@@ -23,6 +43,13 @@
     return DB_OK;
 }
 
+/*!
+  \brief Receive column definition
+
+  \param column pointer to dbColumn
+
+  \return DB_OK
+*/
 int db__recv_column_definition(dbColumn * column)
 {
     DB_RECV_STRING(&column->columnName);
@@ -44,26 +71,52 @@
     return DB_OK;
 }
 
+/*!
+  \brief Send column value
 
+  \param column pointer to dbColumn
+
+  \return
+*/
 int db__send_column_value(dbColumn * column)
 {
     return db__send_value(db_get_column_value(column),
 			  db_sqltype_to_Ctype(db_get_column_sqltype(column)));
 }
 
+/*!
+  \brief Receive column value
 
+  \param column pointer to dbColumn
+
+  \return
+*/
 int db__recv_column_value(dbColumn * column)
 {
     return db__recv_value(db_get_column_value(column),
 			  db_sqltype_to_Ctype(db_get_column_sqltype(column)));
 }
 
+/*!
+  \brief Send column default value
+
+  \param column pointer to dbColumn
+
+  \return
+*/
 int db__send_column_default_value(dbColumn * column)
 {
     return db__send_value(db_get_column_default_value(column),
 			  db_sqltype_to_Ctype(db_get_column_sqltype(column)));
 }
 
+/*!
+  \brief Receive column default value
+
+  \param column pointer to dbColumn
+
+  \return
+*/
 int db__recv_column_default_value(dbColumn * column)
 {
     return db__recv_value(db_get_column_default_value(column),

Modified: grass/trunk/lib/db/dbmi_base/xdrdatetime.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/xdrdatetime.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/xdrdatetime.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,7 +1,27 @@
+/*!
+  \file lib/db/dbmi_base/xdrdatetime.c
+  
+  \brief DBMI Library (base) - external data representation (datatime)
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek, Brad Douglas, Markus Neteler
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <grass/dbmi.h>
 #include "macros.h"
 
+/*!
+  \brief Send datetime
 
+  \param t pointer to dbDateTime
+
+  \return DB_OK
+*/
 int db__send_datetime(dbDateTime * t)
 {
     DB_SEND_CHAR(t->current);
@@ -17,6 +37,13 @@
     return DB_OK;
 }
 
+/*!
+  \brief Receive datetime
+
+  \param t pointer to dbDateTime
+
+  \return DB_OK
+*/
 int db__recv_datetime(dbDateTime * t)
 {
     DB_RECV_CHAR(&t->current);

Modified: grass/trunk/lib/db/dbmi_base/xdrdouble.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/xdrdouble.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/xdrdouble.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,6 +1,26 @@
+/*!
+  \file lib/db/dbmi_base/xdrdouble.c
+  
+  \brief DBMI Library (base) - external data representation (double)
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek, Brad Douglas, Markus Neteler
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include "xdr.h"
 
+/*!
+  \brief Send double
 
+  \param d
+
+  \return
+*/
 int db__send_double(double d)
 {
     int stat = DB_OK;
@@ -14,6 +34,11 @@
     return stat;
 }
 
+/*!
+  \brief Receive double
+
+  \param d
+*/
 int db__recv_double(double *d)
 {
     int stat = DB_OK;
@@ -27,7 +52,14 @@
     return stat;
 }
 
+/*!
+  \brief Send double array
 
+  \param x
+  \param n
+
+  \return
+*/							\
 int db__send_double_array(const double *x, int n)
 {
     int stat = DB_OK;
@@ -44,8 +76,17 @@
     return stat;
 }
 
-/* returns an allocated array of doubles */
-/* caller is responsible for free() */
+/*!
+  \brief Receive double array
+
+  Returns an allocated array of doubles
+  Caller is responsible for free()
+
+  \param x
+  \param n
+
+  \return
+*/
 int db__recv_double_array(double **x, int *n)
 {
     int stat = DB_OK;

Modified: grass/trunk/lib/db/dbmi_base/xdrfloat.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/xdrfloat.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/xdrfloat.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,6 +1,26 @@
+/*!
+  \file lib/db/dbmi_base/xdrfloat.c
+  
+  \brief DBMI Library (base) - external data representation (float)
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek, Brad Douglas, Markus Neteler
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include "xdr.h"
 
+/*!
+  \brief Send float
 
+  \param d
+
+  \return 
+*/
 int db__send_float(float d)
 {
     int stat = DB_OK;
@@ -14,6 +34,13 @@
     return stat;
 }
 
+/*!
+  \brief Receive float
+
+  \param d
+
+  \return
+*/
 int db__recv_float(float *d)
 {
     int stat = DB_OK;
@@ -27,7 +54,14 @@
     return stat;
 }
 
+/*!
+  \brief Send float array
 
+  \param x
+  \param n
+
+  \return
+*/
 int db__send_float_array(const float *x, int n)
 {
     int stat = DB_OK;
@@ -44,8 +78,17 @@
     return stat;
 }
 
-/* returns an allocated array of floats */
-/* caller is responsible for free() */
+/*!
+  \brief Receive float array
+  
+  Returns an allocated array of floats
+  Caller is responsible for free()
+
+  \param x
+  \param n
+
+  \return
+*/
 int db__recv_float_array(float **x, int *n)
 {
     int stat = DB_OK;

Modified: grass/trunk/lib/db/dbmi_base/xdrhandle.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/xdrhandle.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/xdrhandle.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,7 +1,27 @@
+/*!
+  \file lib/db/dbmi_base/xdrhandle.c
+  
+  \brief DBMI Library (base) - external data representation (handle)
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek, Brad Douglas, Markus Neteler
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <grass/dbmi.h>
 #include "macros.h"
 
+/*!
+  \brief Send handle
 
+  \param handle
+
+  \return
+*/
 int db__send_handle(dbHandle * handle)
 {
     DB_SEND_STRING(&handle->dbName);
@@ -10,6 +30,13 @@
     return DB_OK;
 }
 
+/*!
+  \brief Receive handle
+
+  \param handle
+
+  \return
+*/
 int db__recv_handle(dbHandle * handle)
 {
     DB_RECV_STRING(&handle->dbName);

Modified: grass/trunk/lib/db/dbmi_base/xdrindex.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/xdrindex.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/xdrindex.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,3 +1,17 @@
+/*!
+  \file lib/db/dbmi_base/xdrindex.c
+  
+  \brief DBMI Library (base) - external data representation (index)
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek, Brad Douglas, Markus Neteler
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <grass/dbmi.h>
 #include "macros.h"
 
@@ -2,2 +16,9 @@
 
+/*!
+  \brief Send index
+
+  \param index
+
+  \return
+*/
 int db__send_index(dbIndex * index)
@@ -19,6 +40,14 @@
     return DB_OK;
 }
 
+/*!
+  \brief Send index array
+
+  \param list
+  \param count
+
+  \return
+*/
 int db__send_index_array(dbIndex * list, int count)
 {
     int i;
@@ -30,6 +59,13 @@
     return DB_OK;
 }
 
+/*!
+  \brief Receive index
+
+  \param index
+
+  \return
+*/
 int db__recv_index(dbIndex * index)
 {
     int i, ncols;
@@ -51,6 +87,12 @@
     return DB_OK;
 }
 
+/*!
+  \brief Receive index array
+
+  \param list
+  \param count
+*/
 int db__recv_index_array(dbIndex ** list, int *count)
 {
     int i;

Modified: grass/trunk/lib/db/dbmi_base/xdrint.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/xdrint.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/xdrint.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,6 +1,26 @@
+/*!
+  \file lib/db/dbmi_base/xdrint.c
+  
+  \brief DBMI Library (base) - external data representation (integer)
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek, Brad Douglas, Markus Neteler
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include "xdr.h"
 
+/*!
+  \brief Send integer
 
+  \param n
+
+  \return
+*/
 int db__send_int(int n)
 {
     int stat = DB_OK;
@@ -14,6 +34,13 @@
     return stat;
 }
 
+/*!
+  \brief Receive integer
+
+  \param n
+
+  \return
+*/
 int db__recv_int(int *n)
 {
     int stat = DB_OK;
@@ -27,6 +54,14 @@
     return stat;
 }
 
+/*!
+  \brief Send integer array
+
+  \param x
+  \param n
+
+  \return
+*/
 int db__send_int_array(const int *x, int n)
 {
     int stat = DB_OK;
@@ -43,8 +78,17 @@
     return stat;
 }
 
-/* returns an allocated array of ints */
-/* caller is responsible for free() */
+/*!
+  \brief Receive integer array
+
+  Returns an allocated array of ints
+  Caller is responsible for free()
+
+  \param x
+  \param n
+
+  \return
+*/
 int db__recv_int_array(int **x, int *n)
 {
     int stat = DB_OK;

Modified: grass/trunk/lib/db/dbmi_base/xdrprocedure.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/xdrprocedure.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/xdrprocedure.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,8 +1,27 @@
+/*!
+  \file lib/db/dbmi_base/xdrprocedure.c
+  
+  \brief DBMI Library (base) - external data representation (procedure)
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek, Brad Douglas, Markus Neteler
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include "xdr.h"
 #include "macros.h"
 
+/*!
+  \brief ? (client only)
 
-/******** client only ***************/
+  \param procnum
+
+  \return
+*/
 int db__start_procedure_call(int procnum)
 {
     int reply;
@@ -22,12 +41,14 @@
     return DB_OK;
 }
 
-/***** driver only *******************/
+/*!
+  \brief ? (driver only)
 
-/* return codes:
- * DB_OK  ok
- * DB_EOF eof from client
- */
+  \param n
+
+  \return DB_OK  ok
+  \returnDB_EOF eof from client
+*/
 int db__recv_procnum(int *n)
 {
     int stat = DB_OK;
@@ -38,11 +59,25 @@
     return stat;
 }
 
+/*!
+  \brief ?
+
+  \param n
+
+  \return
+*/
 int db__send_procedure_ok(int n)
 {
     return db__send_int(n);
 }
 
+/*!
+  \brief ?
+
+  \param n
+
+  \return
+*/
 int db__send_procedure_not_implemented(int n)
 {
     return db__send_int(n ? 0 : -1);

Modified: grass/trunk/lib/db/dbmi_base/xdrshort.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/xdrshort.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/xdrshort.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,7 +1,27 @@
+/*!
+  \file lib/db/dbmi_base/xdrshort.c
+  
+  \brief DBMI Library (base) - external data representation (short)
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek, Brad Douglas, Markus Neteler
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <stdlib.h>
 #include "xdr.h"
 
+/*!
+  \brief Send short
 
+  \param n
+
+  \return
+*/
 int db__send_short(int n)
 {
     int stat = DB_OK;
@@ -16,6 +36,13 @@
     return stat;
 }
 
+/*!
+  \brief Receive short
+
+  \param n
+
+  \return
+*/
 int db__recv_short(short *n)
 {
     int stat = DB_OK;
@@ -29,6 +56,14 @@
     return stat;
 }
 
+/*!
+  \brief Send short array
+
+  \param x
+  \param n
+
+  \return
+*/
 int db__send_short_array(const short *x, int n)
 {
     int stat = DB_OK;
@@ -45,8 +80,17 @@
     return stat;
 }
 
-/* returns an allocated array of ints */
-/* caller is responsible for free() */
+/*!
+  \brief Receive short array
+
+  Returns an allocated array of ints
+  Caller is responsible for free()
+
+  \param x
+  \param n
+
+  \return
+*/
 int db__recv_short_array(short **x, int *n)
 {
     int stat = DB_OK;

Modified: grass/trunk/lib/db/dbmi_base/xdrstring.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/xdrstring.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/xdrstring.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,7 +1,28 @@
+/*!
+  \file lib/db/dbmi_base/xdrstring.c
+  
+  \brief DBMI Library (base) - external data representation (string)
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek, Brad Douglas, Markus Neteler
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <string.h>
 #include "xdr.h"
 
+/*!
+  \brief Send string array
 
+  \param a
+  \param count
+
+  \return
+*/
 int db__send_string_array(dbString * a, int count)
 {
     int i;
@@ -14,7 +35,14 @@
     return stat;
 }
 
-/* note: dbString *a; ...(...,&a...) */
+/*!
+  \brief Receive string array
+
+  \param a
+  \param n
+
+  \return
+*/
 int db__recv_string_array(dbString ** a, int *n)
 {
     int i, count;
@@ -48,6 +76,13 @@
     return DB_OK;
 }
 
+/*!
+  \brief Send string
+
+  \param x
+
+  \return
+*/
 int db__send_string(dbString * x)
 {
     int stat = DB_OK;
@@ -69,14 +104,15 @@
     return stat;
 }
 
-/*
- * db__recv_string (dbString *x)
- *  reads a string from transport
- *
- *  returns DB_OK, DB_MEMORY_ERR, or DB_PROTOCOL_ERR
- *    x.s will be NULL if error
- *
- * NOTE: caller MUST initialize x by calling db_init_string()
+/*!
+  \brief Reads a string from transport
+ 
+  Note: caller MUST initialize x by calling db_init_string()
+
+  \param x
+
+  \return DB_OK, DB_MEMORY_ERR, or DB_PROTOCOL_ERR
+  \return NULL if error
  */
 int db__recv_string(dbString * x)
 {
@@ -104,6 +140,13 @@
     return stat;
 }
 
+/*!
+  \brief Send C string
+
+  \param s
+
+  \return
+*/
 int db__send_Cstring(const char *s)
 {
     dbString x;

Modified: grass/trunk/lib/db/dbmi_base/xdrtable.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/xdrtable.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/xdrtable.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,7 +1,28 @@
+/*!
+  \file lib/db/dbmi_base/xdrtable.c
+  
+  \brief DBMI Library (base) - external data representation (table)
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek, Brad Douglas, Markus Neteler
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <grass/dbmi.h>
+#include <grass/glocale.h>
 #include "macros.h"
 
+/*!
+  \brief Send table definition
 
+  \param table pointer to dbTable
+
+  \return
+*/
 int db__send_table_definition(dbTable * table)
 {
     int i;
@@ -20,6 +41,13 @@
     return DB_OK;
 }
 
+/*!
+  \brief Receive table definition
+
+  \param[out] table
+
+  \return
+*/
 int db__recv_table_definition(dbTable ** table)
 {
     int i, ncols;
@@ -43,6 +71,13 @@
     return DB_OK;
 }
 
+/*!
+  \brief Send table data
+
+  \param table
+
+  \return
+*/
 int db__send_table_data(dbTable * table)
 {
     int i, ncols;
@@ -56,6 +91,13 @@
     return DB_OK;
 }
 
+/*!
+  \brief Receive table data
+
+  \param table
+
+  \return
+*/
 int db__recv_table_data(dbTable * table)
 {
     int i, ncols;
@@ -64,7 +106,7 @@
     DB_RECV_INT(&i);
 
     if (i != ncols) {
-	db_error("fetch: table has wrong number of columns");
+	db_error(_("fetch: table has wrong number of columns"));
 	return DB_FAILED;
     }
     for (i = 0; i < ncols; i++) {

Modified: grass/trunk/lib/db/dbmi_base/xdrtoken.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/xdrtoken.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/xdrtoken.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,11 +1,38 @@
+/*!
+  \file lib/db/dbmi_base/xdrtoken.c
+  
+  \brief DBMI Library (base) - external data representation (token)
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek, Brad Douglas, Markus Neteler
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <grass/dbmi.h>
 
+/*!
+  \brief Send token
 
+  \param token
+
+  \return
+*/
 int db__send_token(dbToken * token)
 {
     return db__send_int(*token);
 }
 
+/*!
+  \brief Receive token
+
+  \param token
+
+  \return
+*/
 int db__recv_token(dbToken * token)
 {
     return db__recv_int(token);

Modified: grass/trunk/lib/db/dbmi_base/xdrvalue.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/xdrvalue.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/xdrvalue.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,6 +1,30 @@
+/*!
+  \file lib/db/dbmi_base/xdrvalue.c
+  
+  \brief DBMI Library (base) - external data representation (value)
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek, Brad Douglas, Markus Neteler
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <grass/dbmi.h>
+#include <grass/glocale.h>
+
 #include "macros.h"
 
+/*!
+  \brief Send value
+
+  \param value
+  \param Ctype
+
+  \return
+*/
 int db__send_value(dbValue * value, int Ctype)
 {
     DB_SEND_CHAR(value->isNull);
@@ -27,6 +51,14 @@
     return DB_OK;
 }
 
+/*!
+  \brief Receive value
+
+  \param value
+  \param Ctype
+
+  \return
+*/
 int db__recv_value(dbValue * value, int Ctype)
 {
     DB_RECV_CHAR(&value->isNull);
@@ -47,7 +79,7 @@
 	DB_RECV_DATETIME(&value->t);
 	break;
     default:
-	db_error("send data: invalid C-type");
+	db_error(_("send data: invalid C-type"));
 	return DB_FAILED;
     }
     return DB_OK;

Modified: grass/trunk/lib/db/dbmi_base/zero.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/zero.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_base/zero.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,11 +1,25 @@
+/*!
+  \file lib/db/dbmi_base/zero.c
+  
+  \brief DBMI Library (base) - zero 
+  
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Joel Jones (CERL/UIUC), Radim Blazek, Brad Douglas, Markus Neteler
+  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
+*/
+
 #include <grass/dbmi.h>
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Zero allocated space
+
+  \param s pointer to memory
+  \param n number of bytes
+*/
 void db_zero(void *s, int n)
 {
     char *c = (char *)s;

Modified: grass/trunk/lib/db/dbmi_client/c_bindupdate.c
===================================================================
--- grass/trunk/lib/db/dbmi_client/c_bindupdate.c	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmi_client/c_bindupdate.c	2011-04-05 20:05:12 UTC (rev 45853)
@@ -1,5 +1,5 @@
 /*!
- * \file db/dbmi_client/c_bindupdate.c
+ * \file lib/db/dbmi_client/c_bindupdate.c
  * 
  * \brief DBMI Library (client) - bind update
  *
@@ -16,13 +16,13 @@
 #include "macros.h"
 
 /*!
-  \brief ADD
-
+  \brief ?
+  
   \param cursor db cursor
-
+  
   \return DB_OK on success
   \return DB_FAILED on failure
- */
+*/
 int db_bind_update(dbCursor * cursor)
 {
     int ret_code;

Modified: grass/trunk/lib/db/dbmilib.dox
===================================================================
--- grass/trunk/lib/db/dbmilib.dox	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/db/dbmilib.dox	2011-04-05 20:05:12 UTC (rev 45853)
@@ -4,28 +4,30 @@
 
 http://grass.osgeo.org
 
-\section intro Introduction
+\section dbmiIntro Introduction
 
 The attribute management was completely changed in GRASS 6 to achieve
-multi-attribute capabilities managed within external databases.  The former
-dig_cats/ files are not used any more and all vector attributes are stored
-in external database. Connection with database is done through <b>DBMI library</b>
-(DataBase Management Interface) with its integrated drivers. At time of this
-writing following DBMI drivers for attribute storage are available:
+multi-attribute capabilities managed within external databases. The
+former <tt>dig_cats/</tt> files (GRASS 5) are not used any more and
+all vector attributes are stored in external database. Connection with
+database is done through <b>DBMI library</b> (DataBase Management
+Interface) with its integrated drivers. At time of this writing
+following DBMI drivers for attribute storage are available:
 
-<ul>
-<li> DBF: xBase files (default)
-<li> ODBC: to interface from http://www.unixodbc.org
-<li> PostgreSQL driver (note that PostgreSQL can also be accessed through
-     ODBC): http://www.postgresql.org
-<li> mySQL: http://mysql.com/
-<li> SQLite: http://www.sqlite.org/
-</ul>
+ - DBF: xBase files (default)
+ - ODBC: to interface from http://www.unixodbc.org
+ - PostgreSQL driver (note that PostgreSQL can also be accessed through ODBC): http://www.postgresql.org
+ - mySQL: http://mysql.com/
+ - SQLite: http://www.sqlite.org
 
-These drivers are compiled depending on present DB related libraries and
-'configure' settings. Only the DBF driver is always compiled.
-The default DBMI driver is defined in include/dbmi.h (#define DB_DEFAULT_DRIVER "dbf").
+These drivers are compiled depending on present DB related libraries
+and 'configure' settings. Only the DBF driver is always compiled. The
+default DBMI driver is defined in include/dbmi.h
 
+\code
+#define DB_DEFAULT_DRIVER "sqlite"
+\endcode
+
 In general records in table are linked to vector entities by field number
 and category number.  The field number identifies a database table and the
 category number identifies the record record. I.e. for unique combination
@@ -46,760 +48,705 @@
 
 For DBMI architecture details please read Blazek et al. 2002 (see below).
 
-\section dbmifunc DBMI library functions
+\section dbmiFunc DBMI library functions
 
 The db_*() functions are the programmer's API for GRASS DBMI
 programming. There are three groups:
 
-<ul>
- <li> dbmi_base:   contains functions for modules, drivers (../../db/drivers/) </li>
- <li> dbmi_client: contains functions for modules </li>
- <li> dbmi_driver: contains functions for drivers (../../db/drivers/) </li>
-</ul>
+ - dbmi_base:   contains functions for modules, drivers (../../db/drivers/)
+ - dbmi_client: contains functions for modules
+ - dbmi_driver: contains functions for drivers (../../db/drivers/)
 
-See details here:<br>
+\section dbmiBase DBMI BASE functions
 
-\section dbmi_base DBMI BASE functions
+Allocation:
 
-[ to be moved here from below list ]
-
-\section dbmi_client DBMI CLIENT functions
-
- - db_add_column()
-
- - db_begin_transaction()
-
- - db_bind_update()
-
- - db_CatValArray_get_value()
-
- - db_CatValArray_get_value_double()
-
- - db_CatValArray_get_value_int()
-
- - db_CatValArray_sort()
-
- - db_CatValArray_sort_by_value()
-
- - db_close_cursor()
+ - db_store()
  
- - db_close_database()
+ - db_malloc()
 
- - db_close_database_shutdown_driver()
- 
- - db_column_Ctype()
+ - db_calloc()
 
- - db_column_sqltype()
+ - db_realloc()
 
- - db_commit_transaction()
+ - db_free()
 
- - db_copy_table()
+String manipulation:
 
- - db_copy_table_where()
- 
- - db_copy_table_select()
+ - db_char_to_lowercase()
 
- - db_copy_table_by_ints()
- 
- - db_create_database()
+ - db_char_to_uppercase()
 
- - db_create_index()
+ - db_Cstring_to_lowercase()
 
- - db_create_table()
+ - db_Cstring_to_uppercase()
 
- - db_delete()
+ - db_nocase_compare()
 
- - db_delete_database()
+Column properties:
 
- - db_delete_table()
- 
- - db_describe_table()
+ - db_get_column_value()
 
- - db_drop_column()
+ - db_get_column_default_value()
 
- - db_drop_index()
+ - db_set_column_sqltype()
 
- - db_drop_table()
+ - db_set_column_host_type()
 
- - db_execute_immediate()
+ - db_get_column_scale()
 
- - db_fetch()
+ - db_set_column_scale()
 
- - db_find_database()
+ - db_get_column_precision()
 
- - db_get_column()
- 
- - db_get_num_rows()
+ - db_set_column_precision()
 
- - db_get_table_number_of_rows()
- 
- - db_grant_on_table()
+ - db_get_column_sqltype()
 
- - db_gversion()
- 
- - db_insert()
+ - db_get_column_host_type()
 
- - db_list_databases()
+ - db_set_column_has_defined_default_value()
 
- - db_list_drivers()
+ - db_set_column_has_undefined_default_value()
 
- - db_list_indexes()
+ - db_unset_column_has_default_value()
 
- - db_list_tables()
+ - db_test_column_has_default_value()
 
- - db_open_database()
+ - db_test_column_has_defined_default_value()
 
- - db_open_insert_cursor()
+ - db_test_column_has_undefined_default_value()
 
- - db_open_select_cursor()
- 
- - db_open_update_cursor()
+ - db_set_column_use_default_value()
 
- - db_print_column_definition()
- 
- - db_print_table_definition()
+ - db_unset_column_use_default_value()
 
- - db_start_driver_open_database()
+ - db_test_column_use_default_value()
 
- - db_select_CatValArray()
+ - db_set_column_null_allowed()
 
- - db_select_int()
+ - db_unset_column_null_allowed()
 
- - db_select_value()
+ - db_test_column_null_allowed()
 
- - db_shutdown_driver()
+ - db_get_column_length()
 
- - db_start_driver()
- 
- - db_table_exists()
+ - db_set_column_length()
 
- - db_update()
+ - db_set_column_select_priv_granted()
 
- - db__copy_table()
+ - db_set_column_select_priv_not_granted()
 
-\section dbmi_driver DBMI DRIVER functions
+ - db_get_column_select_priv()
 
- - db_driver()
+ - db_set_column_update_priv_granted()
 
- - db_driver_mkdir()
+ - db_set_column_update_priv_not_granted()
 
- - db_d_add_column()
+ - db_get_column_update_priv()
 
- - db_d_begin_transaction()
+ - db_init_column()
 
- - db_d_bind_update()
+ - db_set_column_name()
 
- - db_d_close_cursor()
+ - db_get_column_name()
 
- - db_d_close_database()
+ - db_set_column_description()
 
- - db_d_commit_transaction()
+ - db_get_column_description()
 
- - db_d_create_database()
+ - db_free_column()
 
- - db_d_create_index()
+ - db_copy_column()
 
- - db_d_create_table()
+ - db_convert_Cstring_to_column_value()
+ 
+ - db_convert_Cstring_to_column_default_value()
 
- - db_d_delete()
+ - db_convert_column_value_to_string()
 
- - db_d_delete_database()
+ - db_convert_column_default_value_to_string()
 
- - db_d_describe_table()
+Connection settings:
 
- - db_d_drop_column()
+ - db_set_connection()
 
- - db_d_drop_index()
+ - db_get_connection()
 
- - db_d_drop_table()
+Cursor management:
 
- - db_d_execute_immediate()
+ - db_init_cursor()
 
- - db_d_fetch()
+ - db_alloc_cursor_table()
 
- - db_d_find_database()
+ - db_free_cursor()
 
- - db_d_get_num_rows()
+ - db_get_cursor_table()
 
- - db_driver_mkdir()
+ - db_set_cursor_table()
 
- - db_d_grant_on_table()
+ - db_get_cursor_token()
 
- - db_d_insert()
-
- - db_d_list_databases()
-
- - db_d_list_indexes()
-
- - db_d_list_tables()
-
- - db_d_open_database()
-
- - db_d_open_insert_cursor()
-
- - db_d_open_select_cursor()
-
- - db_d_open_update_cursor()
-
- - db_d_update()
-
- - db_d_update()
+ - db_set_cursor_token()
  
- - db__add_cursor_to_driver_state()
+ - db_set_cursor_type_readonly()
 
- - db__close_all_cursors()
+ - db_set_cursor_type_update()
 
- - db__drop_cursor_from_driver_state()
-  
- - db__init_driver_state()
+ - db_set_cursor_type_insert()
 
- - db__mark_database_closed()
+ - db_test_cursor_type_fetch()
 
- - db__mark_database_open()
+ - db_test_cursor_type_update()
 
- - db__test_database_open()
+ - db_test_cursor_type_insert()
 
-\section dbmi_functions DBMI functions list (incomplete)
+ - db_set_cursor_mode()
 
-\subsection DB_alloc_routines DB alloc routines
+ - db_set_cursor_mode_scroll()
 
-char *#db_store (char *s)
+ - db_unset_cursor_mode_scroll()
 
-void #db_calloc (int n, int m)
+ - db_unset_cursor_mode()
 
-void #db_malloc (int n)
+ - db_set_cursor_mode_insensitive()
 
-void #db_realloc (void *s, int n)
+ - db_unset_cursor_mode_insensitive()
 
-void #db_free (void *s, int n)
+ - db_test_cursor_mode_scroll()
 
+ - db_test_cursor_mode_insensitive()
 
-\subsection DB_case_routines DB case routines
+ - db_alloc_cursor_column_flags()
 
-int #db_nocase_compare (char *a, char *b)
+ - db_free_cursor_column_flags()
 
-void #db_char_to_lowercase (char *s)
+ - db_set_cursor_column_for_update()
 
-void #db_char_to_uppercase (char *s)
+ - db_unset_cursor_column_for_update()
 
-void #db_Cstring_to_lowercase (char *s)
+ - db_test_cursor_column_for_update()
 
-void #db_Cstring_to_uppercase (char *s)
+ - db_test_cursor_any_column_for_update()
 
+ - db_set_cursor_column_flag()
 
-\subsection DB_column_routines DB column routines
+ - db_unset_cursor_column_flag()
 
+ - db_test_cursor_column_flag()
 
-\subsection DB_columnfmt_routines DB columnfmt routines
+ - db_get_cursor_number_of_columns()
 
+ - db_test_cursor_any_column_flag()
 
-\subsection DB_connect_routines DB connect routines
+DateTime conversion:
 
-int #db_get_connection (dbConnection *connection )
+ - db_convert_value_datetime_into_string()
 
-int #db_set_connection (dbConnection *connection )
+ - db_convert_Cstring_to_value_datetime()
 
+DBmscap management:
 
-\subsection DB_cursor_routines DB *cursor routines
+ - db_dbmscap_filename()
 
-dbTable *#db_get_cursor_table (dbCursor *cursor)
+ - db_has_dbms()
 
-dbToken #db_get_cursor_token (dbCursor *cursor)
+ - db_copy_dbmscap_entry()
 
-int #db_alloc_cursor_column_flags (dbCursor *cursor)
+ - db_read_dbmscap()
 
-int #db_alloc_cursor_table (dbCursor *cursor, int ncols)
+ - db_free_dbmscap()
 
-int #db_get_cursor_number_of_columns (dbCursor *cursor)
+Default settings:
 
-int #db_test_cursor_any_column_flag (dbCursor *cursor)
+ - db_get_default_driver_name()
 
-int #db_test_cursor_any_column_for_update (dbCursor *cursor)
+ - db_get_default_database_name()
 
-int #db_test_cursor_column_flag (dbCursor *cursor, int col)
+ - db_get_default_schema_name()
 
+ - db_get_default_group_name()
 
-\subsection DB_datetime_routines DB datetime routines
+ - db_set_default_connection()
 
-int #db_test_cursor_column_for_update (dbCursor *cursor, int col)
+Dirent (directory entities) array:
 
-int #db_test_cursor_mode_insensitive (dbCursor *cursor)
+ - db_dirent()
 
-int #db_test_cursor_mode_scroll (dbCursor *cursor)
+ - db_free_dirent_array()
 
-int #db_test_cursor_type_fetch (dbCursor *cursor)
+ - db_alloc_dirent_array()
 
-int #db_test_cursor_type_insert (dbCursor *cursor)
+Report errors:
 
-int #db_test_cursor_type_update (dbCursor *cursor)
+ - db_on_error()
 
-void #db_free_cursor_column_flags (dbCursor *cursor)
+ - db_set_error_who()
 
-void #db_free_cursor (dbCursor *cursor)
+ - db_get_error_who()
 
-void #db_init_cursor (dbCursor *cursor)
+ - db_error()
 
-void #db_set_cursor_column_flag (dbCursor *cursor, int col)
+ - db_protocol_error()
 
-void #db_set_cursor_column_for_update (dbCursor *cursor, int col)
+ - db_syserror()
 
-void #db_set_cursor_mode (dbCursor *cursor, int mode)
+ - db_get_error_code()
 
-void #db_set_cursor_mode_insensitive (dbCursor *cursor)
+ - db_memory_error()
 
-void #db_set_cursor_mode_scroll (dbCursor *cursor)
+ - db_procedure_not_implemented()
 
-void #db_set_cursor_table (dbCursor *cursor, dbTable *table)
+ - db_noproc_error()
 
-void #db_set_cursor_token (dbCursor *cursor, dbToken token)
+ - db_clear_error()
 
-void #db_set_cursor_type_insert (dbCursor *cursor)
+ - db_print_error()
 
-void #db_set_cursor_type_readonly (dbCursor *cursor)
+ - db_debug_on()
 
-void #db_set_cursor_type_update (dbCursor *cursor)
+ - db_debug_off()
 
-void #db_unset_cursor_column_flag (dbCursor *cursor, int col)
+ - db_debug()
 
-void #db_unset_cursor_column_for_update (dbCursor *cursor, int col)
+ - db_get_error_msg()
 
-void #db_unset_cursor_mode (dbCursor *cursor)
+ - db_auto_print_errors()
 
-void #db_unset_cursor_mode_insensitive (dbCursor *cursor)
+ - db_auto_print_protocol_errors()
 
-void #db_unset_cursor_mode_scroll (dbCursor *cursor)
+Handle management:
 
+ - db_init_handle()
 
-\subsection DB_datetime_routines DB datetime routines
+ - db_set_handle()
 
+ - db_get_handle_dbname()
 
-\subsection DB_zero_routines DB zero routines
+ - db_get_handle_dbschema()
 
+ - db_free_handle()
 
-\subsection DB_dbmscap_routines DB dbmscap routines
+ - db_free_handle_array()
 
+ - db_alloc_handle_array()
 
-\subsection DB_default_name_routines DB default_name routines
+Index management:
 
+ - db_init_index()
 
-\subsection DB_default_name_routines DB default_name routines
+ - db_free_index()
 
-char *#db_get_default_database ( void )
+ - db_alloc_index_columns()
 
-char *#db_get_default_driver ( void )
+ - db_alloc_index_array()
 
-char *#db_get_default_group_name ( void )
+ - db_free_index_array()
 
-char *#db_get_default_schema_name ( void )
+ - db_set_index_name()
+ 
+ - db_get_index_name()
 
+ - db_set_index_table_name()
 
-\subsection DB_dirent_routines DB dirent routines
+ - db_get_index_table_name()
 
+ - db_get_index_number_of_columns()
 
-\subsection DB_error_routines DB error routines
+ - db_set_index_column_name()
 
+ - db_get_index_column_name()
 
-\subsection DB_handle_routines DB handle routines
+ - db_set_index_type_unique()
 
+ - db_set_index_type_non_unique()
 
-\subsection DB_index_routines DB index routines
+ - db_test_index_type_unique()
 
+ - db_print_index()
 
-\subsection DB_interval_routines DB interval routines
+Range functions:
 
+ - db_interval_range()
 
-\subsection DB_isdir_routines DB isdir routines
+Login functions:
 
+ - db_set_login()
 
-\subsection DB_login_routines DB login routines
+ - db_get_login()
 
+Return codes (internal use only):
 
-\subsection DB_ret_codes_routines DB ret_codes routines
+ - db__send_success()
 
+ - db__send_failure()
 
-\subsection DB_sqlCtype_routines DB sqlCtype routines
+ - db__recv_return_code()
 
+Data type conversion:
 
-\subsection DB_sqlCtype_routines DB sqlCtype routines
+ - db_sqltype_to_Ctype()
 
+ - db_sqltype_name()
 
-\subsection DB_sqltype_routines DB sqltype routines
+String manipulation:
 
+ - db_init_string()
 
-\subsection DB_string_routines DB string routines
+ - db_set_string()
+ 
+ - db_set_string_no_copy()
 
+ - db_sizeof_string()
 
-\subsection DB_strip_routines DB strip routines
+ - db_zero_string()
 
+ - db_enlarge_string()
 
-\subsection DB_table_routines DB table routines
+ - db_get_string()
 
+ - db_free_string()
 
-\subsection DB_token_routines DB token routines
+ - db_free_string_array()
 
+ - db_alloc_string_array()
 
-\subsection DB_value_routines DB value routines
+ - db_append_string()
 
+ - db_copy_string()
 
-\subsection DB_valuefmt_routines DB valuefmt routines
+ - db_double_quote_string()
 
+Table/privileges management:
 
-\subsection DB_whoami_routines DB whoami routines
+ - db_alloc_table()
 
+ - db_init_table()
 
-\subsection DB_xdr_routines DB xdr routines
+ - db_free_table()
 
+ - db_set_table_name()
 
-\subsection DB_xdrchar_routines DB xdrchar *routines
+ - db_get_table_name()
 
+ - db_set_table_description()
 
-\subsection DB_xdrchar_routines DB xdrchar *routines
+ - db_get_table_description()
 
+ - db_get_table_number_of_columns()
 
-\subsection DB_xdrcolumn_routines DB xdrcolumn routines
+ - db_set_table_select_priv_granted()
 
+ - db_set_table_select_priv_not_granted()
 
-\subsection DB_xdrdatetime_routines DB xdrdatetime routines
+ - db_get_table_select_priv()
 
+ - db_set_table_update_priv_granted()
 
-\subsection DB_xdrdouble_routines DB xdrdouble routines
+ - db_set_table_update_priv_not_granted()
 
+ - db_get_table_update_priv()
 
-\subsection DB_xdrfloat_routines DB xdrfloat routines
+ - db_set_table_insert_priv_granted()
 
+ - db_set_table_insert_priv_not_granted()
 
-\subsection DB_xdrhandle_routines DB xdrhandle routines
+ - db_get_table_insert_priv()
 
+ - db_set_table_delete_priv_granted()
 
-\subsection DB_xdrindex_routines DB xdrindex routines
+ - db_set_table_delete_priv_not_granted()
 
+ - db_get_table_delete_priv()
 
-\subsection DB_xdrint_routines DB xdrint routines
+ - db_get_table_column()
 
+ - db_get_table_column_by_name()
 
-\subsection DB_xdrprocedure_routines DB xdrprocedure routines
+ - db_set_table_column()
 
+ - db_append_table_column()
 
-\subsection DB_xdrshort_routines DB xdrshort routines
+ - db_clone_table()
 
+ - db_table_to_sql()
 
-\subsection DB_xdrstring_routines DB xdrstring routines
+Token management:
 
+ - db_find_token()
 
-\subsection DB_xdrstring_routines DB xdrstring routines
+ - db_drop_token()
 
+ - db_new_token()
 
-\subsection DB_xdrtable_routines DB xdrtable routines
+Value management:
 
+ - db_test_value_isnull()
 
-\subsection DB_xdrtoken_routines DB xdrtoken routines
+ - db_get_value_int()
 
+ - db_get_value_double()
 
-\subsection DB_xdrvalue_routines DB xdrvalue routines
+ - db_get_value_as_double()
 
+ - db_get_value_string()
 
-\subsection DB_c_add_col_routines DB c_add_col routines
+ - db_get_value_year()
 
-int #db_add_column (dbDriver driver, dbString *tableName, dbColumn column)
+ - db_get_value_month()
 
+ - db_get_value_day()
 
-\subsection DB_c_bindupdate_routines DB c_bindupdate routines
+ - db_get_value_hour()
 
-int #db_bind_update (dbCursor *cursor)
+ - db_get_value_minute()
 
+ - db_get_value_seconds()
 
-\subsection DB_c_close_cur_routines DB c_close_cur routines
+ - db_set_value_null()
 
-int #db_close_cursor (dbCursor *cursor)
+ - db_set_value_not_null()
 
+ - db_set_value_int()
 
-\subsection DB_c_closedb_routines DB c_closedb routines
+ - db_set_value_double()
 
-int #db_close_database (dbDriver driver)
+ - db_set_value_string()
 
+ - db_set_value_year()
 
-\subsection DB_c_create_idx_routines DB c_create_idx routines
+ - db_set_value_month()
 
-int #db_create_index (dbDriver driver, dbIndex index)
+ - db_set_value_day()
 
+ - db_set_value_hour()
 
-\subsection DB_c_create_tab_routines DB c_create_tab routines
+ - db_set_value_minute()
 
-int #db_create_table (dbDriver driver, dbTable *table)
+ - db_set_value_seconds()
 
+ - db_test_value_datetime_current()
 
-\subsection DB_c_createdb_routines DB c_createdb routines
+ - db_set_value_datetime_current()
 
+ - db_set_value_datetime_not_current()
 
-\subsection DB_c_createdb_routines DB c_createdb routines
+ - db_copy_value()
 
-int #db_create_database (dbDriver driver, dbHandle *handle)
+ - db_CatValArray_init()
 
+ - db_CatValArray_free()
 
-\subsection DB_c_delete_routines DB c_delete routines
+ - db_CatValArray_alloc()
 
-int #db_delete (dbCursor *cursor)
+ - db_CatValArray_realloc()
 
+ - db_convert_Cstring_to_value()
 
-\subsection DB_c_deletedb_routines DB c_deletedb routines
+ - db_convert_value_to_string()
 
-int #db_delete_database (dbDriver driver, dbHandle *handle)
+Misc:?
 
+ - db_isdir()
 
-\subsection DB_c_desc_table_routines DB c_desc_table routines
+ - db_legal_tablename()
 
-int #db_describe_table (dbDriver driver, dbString *name, dbTable *table)
+ - db_whoami
 
+\section dbmiClient DBMI CLIENT functions
 
-\subsection DB_c_drop_col_routines DB c_drop_col routines
+ - db_add_column()
 
-int #db_drop_column (dbDriver driver, dbString *tableName, dbString *columnName)
+ - db_begin_transaction()
 
+ - db_bind_update()
 
-\subsection DB_c_drop_index_routines DB c_drop_index routines
+ - db_CatValArray_get_value()
 
-int #db_drop_index (dbDriver driver, dbString *name)
+ - db_CatValArray_get_value_double()
 
+ - db_CatValArray_get_value_int()
 
-\subsection DB_c_drop_tab_routines DB c_drop_tab routines
+ - db_CatValArray_sort()
 
-int #db_drop_table (dbDriver driver, dbString *name)
+ - db_CatValArray_sort_by_value()
 
+ - db_close_cursor()
+ 
+ - db_close_database()
 
-\subsection DB_c_execute_routines DB c_execute routines
+ - db_close_database_shutdown_driver()
+ 
+ - db_column_Ctype()
 
-int #db_begin_transaction (dbDriver driver)
+ - db_column_sqltype()
 
-int #db_commit_transaction (dbDriver driver)
+ - db_commit_transaction()
 
-int #db_execute_immediate (dbDriver driver, dbString *SQLstatement)
+ - db_copy_table()
 
+ - db_copy_table_where()
+ 
+ - db_copy_table_select()
 
-\subsection DB_c_fetch_routines DB c_fetch routines
+ - db_copy_table_by_ints()
+ 
+ - db_create_database()
 
-int #db_fetch (dbCursor *cursor, int position, int more)
+ - db_create_index()
 
-\subsection DB_c_find#db_routines DB c_finddb routines
+ - db_create_table()
 
+ - db_delete()
 
-\subsection DB_c_find#db_routines DB c_finddb routines
+ - db_delete_database()
 
-int #db_find_database (dbDriver driver, dbHandle *handle, int found)
+ - db_delete_table()
+ 
+ - db_describe_table()
 
+ - db_drop_column()
 
-\subsection DB_c_insert_routines DB c_insert routines
-int #db_insert (dbCursor *cursor)
+ - db_drop_index()
 
+ - db_drop_table()
 
-\subsection DB_c_list_drivers_routines DB c_list_drivers routines
+ - db_execute_immediate()
 
-char *#db_list_drivers (void)
+ - db_fetch()
 
+ - db_find_database()
 
-\subsection DB_c_list_idx_routines DB c_list_idx routines
+ - db_get_column()
+ 
+ - db_get_num_rows()
 
-int #db_list_indexes (dbDriver driver, dbString *table_name, dbIndex list, int count)
+ - db_get_table_number_of_rows()
+ 
+ - db_grant_on_table()
 
+ - db_gversion()
+ 
+ - db_insert()
 
-\subsection DB_c_list_tabs_routines DB c_list_tabs routines
+ - db_list_databases()
 
-int #db_list_tables (dbDriver driver, dbString *names, int count, int system)
+ - db_list_drivers()
 
+ - db_list_indexes()
 
-\subsection DB_c_listdb_routines DB c_listdb routines
+ - db_list_tables()
 
-int #db_list_databases (dbDriver driver, dbString *path, int npaths, dbHandle *handles, int count)
+ - db_open_database()
 
+ - db_open_insert_cursor()
 
-\subsection DB_c_opendb_routines DB c_opendb routines
+ - db_open_select_cursor()
+ 
+ - db_open_update_cursor()
 
+ - db_print_column_definition()
+ 
+ - db_print_table_definition()
 
-\subsection DB_c_openinsert_routines DB c_openinsert routines
+ - db_start_driver_open_database()
 
+ - db_select_CatValArray()
 
-\subsection DB_c_openselect_routines DB c_openselect routines
+ - db_select_int()
 
+ - db_select_value()
 
-\subsection DB_c_openupdate_routines DB c_openupdate routines
+ - db_shutdown_driver()
 
+ - db_start_driver()
+ 
+ - db_table_exists()
 
-\subsection DB_c_priv_routines DB c_priv routines
+ - db_update()
 
 
-\subsection DB_c_priv_routines DB c_priv routines
+\section dbmiDriver DBMI DRIVER functions
 
+ - db_driver()
 
-\subsection DB_c_rows_routines DB c_rows routines
+ - db_driver_mkdir()
 
-int #db_get_num_rows ( dbCursor *cursor )
+ - db_d_add_column()
 
+ - db_d_begin_transaction()
 
-\subsection DB_c_update_routines DB c_update routines
+ - db_d_bind_update()
 
+ - db_d_close_cursor()
 
-\subsection DB_c_version_routines DB c_version routines
+ - db_d_close_database()
 
+ - db_d_commit_transaction()
 
-\subsection DB_copy_tab_routines DB copy_tab routines
+ - db_d_create_database()
 
-int #db_copy_table ()
+ - db_d_create_index()
 
-int #db_copy_table_by_ints ()
+ - db_d_create_table()
 
-int #db_copy_table_select ()
+ - db_d_delete()
 
-int #db_copy_table_where ()
+ - db_d_delete_database()
 
+ - db_d_describe_table()
 
-\subsection DB_db_routines DB db routines
+ - db_d_drop_column()
 
-int #db_close_database_shutdown_driver ()
+ - db_d_drop_index()
 
-int #db_start_driver_open_database ()
+ - db_d_drop_table()
 
+ - db_d_execute_immediate()
 
-\subsection DB_delete_tab_routines DB delete_tab routines
+ - db_d_fetch()
 
-int #db_delete_table ()
+ - db_d_find_database()
 
+ - db_d_get_num_rows()
 
-\subsection DB_printtab_routines DB printtab routines
+ - db_driver_mkdir()
 
+ - db_d_grant_on_table()
 
-\subsection DB_select_routines DB select routines
+ - db_d_insert()
 
+ - db_d_list_databases()
 
-\subsection DB_shutdown_routines DB shutdown routines
+ - db_d_list_indexes()
 
+ - db_d_list_tables()
 
-\subsection DB_shutdown_routines DB shutdown routines
+ - db_d_open_database()
 
+ - db_d_open_insert_cursor()
 
-\subsection DB_start_routines DB start routines
+ - db_d_open_select_cursor()
 
+ - db_d_open_update_cursor()
 
-\subsection DB_d_add_col_routines DB d_add_col routines
+ - db_d_update()
 
+ - db_d_update()
+ 
+\section dbmiContacts Contacts
 
-\subsection DB_d_bindupdate_routines DB d_bindupdate routines
-
-
-\subsection DB_d_close_cur_routines DB d_close_cur routines
-
-
-\subsection DB_d_closedb_routines DB d_closedb routines
-
-
-\subsection DB_d_create_idx_routines DB d_create_idx routines
-
-
-\subsection DB_d_create_tab_routines DB d_create_tab routines
-
-
-\subsection DB_d_createdb_routines DB d_createdb routines
-
-
-\subsection DB_d_delete_routines DB d_delete routines
-
-
-\subsection DB_d_deletedb_routines DB d_deletedb routines
-
-
-\subsection DB_d_deletedb_routines DB d_deletedb routines
-
-
-\subsection DB_d_desc_table_routines DB d_desc_table routines
-
-
-\subsection DB_d_drop_col_routines DB d_drop_col routines
-
-
-\subsection DB_d_drop_index_routines DB d_drop_index routines
-
-
-\subsection DB_d_drop_tab_routines DB d_drop_tab routines
-
-
-\subsection DB_d_execute_routines DB d_execute routines
-
-
-\subsection DB_d_fetch_routines DB d_fetch routines
-
-
-\subsection DB_d_finddb_routines DB d_finddb routines
-
-
-\subsection DB_d_insert_routines DB d_insert routines
-
-
-\subsection DB_d_list_idx_routines DB d_list_idx routines
-
-
-\subsection DB_d_list_tabs_routines DB d_list_tabs routines
-
-
-\subsection DB_d_list_tabs_routines DB d_list_tabs routines
-
-
-\subsection DB_d_listdb_routines DB d_listdb routines
-
-int #db_d_list_databases (void)
-
-
-\subsection DB_d_mkdir_routines DB d_mkdir routines
-
-
-\subsection DB_d_opendb_routines DB d_opendb routines
-
-
-\subsection DB_d_openinsert_routines DB d_openinsert routines
-
-
-\subsection DB_d_openselect_routines DB d_openselect routines
-
-
-\subsection DB_d_openupdate_routines DB d_openupdate routines
-
-
-\subsection DB_d_priv_routines DB d_priv routines
-
-
-\subsection DB_d_rows_routines DB d_rows routines
-
-
-\subsection DB_d_update_routines DB d_update routines
-
-
-\subsection DB_d_version_routines DB d_version routines
-
-
-\subsection DB_d_version_routines DB d_version routines
-
-
-\subsection DB_driver_routines DB driver routines
-
-int #db_driver ()
-
-
-\subsection DB_driver_state_routines DB driver_state routines
-
-
-
-\section contacts Contacts
-
  GRASS Development Team: http://grass.osgeo.org (preferably developers mailing list)
 
+\section dbmiReferences References
 
-\section references References
-
 Text based on: R. Blazek, M. Neteler, and R. Micarelli. The new GRASS 5.1
  vector architecture. In Open source GIS - GRASS users conference 2002,
  Trento, Italy, 11-13 September 2002. University of Trento, Italy, 2002.
  http://www.ing.unitn.it/~grass/proceedings/proceedings/pdfs/Blazek_Radim.pdf
 
-\section seealso See Also
+\section dbmiSeeAlso See Also
  
-GRASS 6 Vector Architecture: \ref vectorlib
+GRASS Vector Architecture: \ref vectorlib
 
-Last change: $Date$
 */

Modified: grass/trunk/lib/python/ctypes/Makefile
===================================================================
--- grass/trunk/lib/python/ctypes/Makefile	2011-04-04 20:16:06 UTC (rev 45852)
+++ grass/trunk/lib/python/ctypes/Makefile	2011-04-05 20:05:12 UTC (rev 45853)
@@ -39,7 +39,7 @@
 vector_HDRS     = vector.h vect/dig_structs.h vect/dig_defines.h
 display_HDRS    = display.h
 stats_HDRS      = stats.h
-dbmi_HDRS       = dbmi.h proto_dbmi.h
+dbmi_HDRS       = dbmi.h dbmidefs.h
 g3d_HDRS        = G3d.h
 arraystats_HDRS = arraystats.h
 cluster_HDRS    = cluster.h



More information about the grass-commit mailing list