[GRASS-SVN] r39566 - in grass/trunk/lib/db: dbmi_base dbmi_client

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Oct 18 14:03:58 EDT 2009


Author: martinl
Date: 2009-10-18 14:03:58 -0400 (Sun, 18 Oct 2009)
New Revision: 39566

Modified:
   grass/trunk/lib/db/dbmi_base/cursor.c
   grass/trunk/lib/db/dbmi_base/handle.c
   grass/trunk/lib/db/dbmi_client/db.c
Log:
dbmi: initial doxygen strings for handle.c + typos


Modified: grass/trunk/lib/db/dbmi_base/cursor.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/cursor.c	2009-10-18 15:59:59 UTC (rev 39565)
+++ grass/trunk/lib/db/dbmi_base/cursor.c	2009-10-18 18:03:58 UTC (rev 39566)
@@ -3,14 +3,14 @@
   
   \brief DBMI Library (base) - cursors management
   
-  (C) 1999-2008 by the GRASS Development Team
+  (C) 1999-2009 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
- */
+*/
 
 #include <stdlib.h>
 #include <grass/dbmi.h>

Modified: grass/trunk/lib/db/dbmi_base/handle.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/handle.c	2009-10-18 15:59:59 UTC (rev 39565)
+++ grass/trunk/lib/db/dbmi_base/handle.c	2009-10-18 18:03:58 UTC (rev 39566)
@@ -1,3 +1,17 @@
+/*!
+  \file db/dbmi_base/handle.c
+  
+  \brief DBMI Library (base) - handle management
+  
+  (C) 1999-2009 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
+*/
+
 #include <stdlib.h>
 #include <grass/dbmi.h>
 
@@ -2,7 +16,6 @@
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Initialize handle (i.e database/schema)
+
+  \param handle pointer to dbHandle to be initialized
+*/
 void db_init_handle(dbHandle * handle)
@@ -14,11 +27,15 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Set handle
+
+  \param handle pointer to dbHandle
+  \param dbName database name
+  \param dbSchema schema name
+
+  \return DB_OK on success
+  \return error code on failure
+*/
 int db_set_handle(dbHandle * handle, const char *dbName, const char *dbSchema)
 {
     int stat;
@@ -31,33 +48,34 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get handle database name
+
+  \param handle pointer to dbHandle
+
+  \return pointer to string with database name
+*/
 const char *db_get_handle_dbname(dbHandle * handle)
 {
     return db_get_string(&handle->dbName);
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Get handle schema name
+
+  \param handle pointer to dbHandle
+
+  \return pointer to string with schema name
+*/
 const char *db_get_handle_dbschema(dbHandle * handle)
 {
     return db_get_string(&handle->dbSchema);
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Free dbHandle structure
+  
+  \param handle pointer to dbHandle
+*/
 void db_free_handle(dbHandle * handle)
 {
     db_free_string(&handle->dbName);
@@ -65,11 +83,11 @@
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Free array of handles
+
+  \param handle pointer to first dbHandle in the array
+  \param count number of handles in the array
+*/
 void db_free_handle_array(dbHandle * handle, int count)
 {
     int i;
@@ -77,16 +95,17 @@
     if (handle) {
 	for (i = 0; i < count; i++)
 	    db_free_handle(&handle[i]);
-	free(handle);
+	G_free((void *) handle);
     }
 }
 
 /*!
-   \fn 
-   \brief 
-   \return 
-   \param 
- */
+  \brief Allocate array of handles
+
+  \param count number of handles in the array
+
+  \return pointer to first dbHandle in the array
+*/
 dbHandle *db_alloc_handle_array(int count)
 {
     int i;

Modified: grass/trunk/lib/db/dbmi_client/db.c
===================================================================
--- grass/trunk/lib/db/dbmi_client/db.c	2009-10-18 15:59:59 UTC (rev 39565)
+++ grass/trunk/lib/db/dbmi_client/db.c	2009-10-18 18:03:58 UTC (rev 39566)
@@ -22,7 +22,7 @@
   \param drvname driver name
   \param dbname database name
 
-  \return poiner to dbDriver structure
+  \return pointer to dbDriver structure
   \return NULL on failure
  */
 dbDriver *db_start_driver_open_database(const char *drvname,



More information about the grass-commit mailing list