瀏覽代碼

dbmi: initial doxygen strings for handle.c + typos

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@39566 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 15 年之前
父節點
當前提交
076f4a2616
共有 3 個文件被更改,包括 58 次插入39 次删除
  1. 2 2
      lib/db/dbmi_base/cursor.c
  2. 55 36
      lib/db/dbmi_base/handle.c
  3. 1 1
      lib/db/dbmi_client/db.c

+ 2 - 2
lib/db/dbmi_base/cursor.c

@@ -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>

+ 55 - 36
lib/db/dbmi_base/handle.c

@@ -1,12 +1,25 @@
+/*!
+  \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>
 
 /*!
-   \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)
 {
     db_init_string(&handle->dbName);
@@ -14,11 +27,15 @@ void db_init_handle(dbHandle * handle)
 }
 
 /*!
-   \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 @@ int db_set_handle(dbHandle * handle, const char *dbName, const char *dbSchema)
 }
 
 /*!
-   \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 @@ void db_free_handle(dbHandle * handle)
 }
 
 /*!
-   \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 @@ void db_free_handle_array(dbHandle * handle, int count)
     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;

+ 1 - 1
lib/db/dbmi_client/db.c

@@ -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,