apidocs with doxygen

This commit is contained in:
pedromorgan
2021-01-16 16:05:28 +00:00
parent 0e3a627ee6
commit da730d3696
27 changed files with 6316 additions and 136 deletions

View File

@@ -13,6 +13,10 @@
#include <ctype.h>
#include <string.h>
/** \addtogroup mdb-dump
* @{
*/
int main(int argc, char **argv)
{
unsigned long i=0;
@@ -85,3 +89,4 @@ int main(int argc, char **argv)
exit(0);
}
/** @}*/

View File

@@ -21,15 +21,15 @@
#include "mdbtools.h"
/**
* mdb_like_cmp
* @s: String to search within.
* @r: Search pattern.
*
* @param s: String to search within.
* @param r: Search pattern.
*
* Tests the string @s to see if it matches the search pattern @r. In the
* search pattern, a percent sign indicates matching on any number of
* characters, and an underscore indicates matching any single character.
*
* Returns: 1 if the string matches, 0 if the string does not match.
* @Returns: 1 if the string matches, 0 if the string does not match.
*/
int mdb_like_cmp(char *s, char *r)
{

View File

@@ -19,10 +19,9 @@
#include "mdbtools.h"
/**
* mdb_stats_on:
* @mdb: Handle to the (open) MDB file to collect stats on.
* @brief Begins collection of statistics on an MDBHandle.
* @param mdb: Handle to the (open) MDB file to collect stats on.
*
* Begins collection of statistics on an MDBHandle.
*
* Statistics in LibMDB will track the number of reads from the MDB file. The
* collection of statistics is started and stopped with the mdb_stats_on and
@@ -39,13 +38,12 @@ mdb_stats_on(MdbHandle *mdb)
mdb->stats->collect = TRUE;
}
/**
* mdb_stats_off:
* @mdb: pointer to handle of MDB file with active stats collection.
* @brief Turns off statistics collection.
* @param mdb: pointer to handle of MDB file with active stats collection.
*
* Turns off statistics collection.
*
* If mdb_stats_off is not called, statistics will be turned off when handle
* is freed using mdb_close.
* If mdb_stats_off() is not called, statistics will be turned off when handle
* is freed using mdb_close().
**/
void
mdb_stats_off(MdbHandle *mdb)
@@ -55,10 +53,10 @@ mdb_stats_off(MdbHandle *mdb)
mdb->stats->collect = FALSE;
}
/**
* mdb_dump_stats:
* @mdb: pointer to handle of MDB file with active stats collection.
* @brief Dumps current statistics to stdout.
* @param mdb: pointer to handle of MDB file with active stats collection.
*
*
* Dumps current statistics to stdout.
**/
void
mdb_dump_stats(MdbHandle *mdb)

View File

@@ -154,14 +154,13 @@ mdb_crack_row3(MdbHandle *mdb, unsigned int row_start, unsigned int row_end,
return 1;
}
/**
* mdb_crack_row:
* @table: Table that the row belongs to
* @row_start: offset to start of row on current page
* @row_end: offset to end of row on current page
* @fields: pointer to MdbField array to be populated by mdb_crack_row
* @brief Cracks a row buffer apart into its component fields.
* @param table: Table that the row belongs to
* @param row_start: offset to start of row on current page
* @param row_size: offset to end of row on current page
* @param fields: pointer to MdbField array to be populated by mdb_crack_row
*
*
* Cracks a row buffer apart into its component fields.
*
* A row buffer is that portion of a data page which contains the values for
* that row. Its beginning and end can be found in the row offset table.
*
@@ -172,7 +171,7 @@ mdb_crack_row3(MdbHandle *mdb, unsigned int row_start, unsigned int row_end,
* This routine is mostly used internally by mdb_fetch_row() but may have some
* applicability for advanced application programs.
*
* Return value: number of fields present, or -1 if the buffer is invalid.
* @return: number of fields present, or -1 if the buffer is invalid.
*/
int
mdb_crack_row(MdbTableDef *table, int row_start, size_t row_size, MdbField *fields)
@@ -743,10 +742,12 @@ mdb_update_row(MdbTableDef *table)
return 0; /* FIXME */
}
/* WARNING the return code is opposite to convention used elsewhere:
* returns 0 on success
* returns 1 on failure
* This might change on next ABI break.
/**
* \warning the return code is opposite to convention used elsewhere:
* @return:
* - 0 on success
* - 1 on failure
* \note This might change on next ABI break.
*/
int
mdb_replace_row(MdbTableDef *table, int row, void *new_row, int new_row_size)

View File

@@ -30,6 +30,11 @@
#endif
#include "connectparams.h"
/** \addtogroup odbc
* @{
*/
/*
* * Last resort place to check for INI file. This is usually set at compile time
* * by build scripts.
@@ -312,3 +317,4 @@ ODBCINSTGetProperties(HODBCINSTPROPERTY hLastProperty)
}
#endif
/** @}*/

View File

@@ -25,6 +25,10 @@
#include <mdbfakeglib.h>
#endif
/** \addtogroup odbc
* @{
*/
typedef struct
{
GString* dsnName;
@@ -44,3 +48,4 @@ gchar* ExtractDSN (ConnectParams* params, const gchar* connectString);
gchar* ExtractDBQ (ConnectParams* params, const gchar* connectString);
#endif
/** @}*/

View File

@@ -35,6 +35,10 @@
extern "C" {
#endif
/** \addtogroup odbc
* @{
*/
struct _henv {
GPtrArray *connections;
char sqlState[6];
@@ -81,3 +85,4 @@ struct _sql_bind_info {
}
#endif
#endif
/** @}*/

View File

@@ -28,6 +28,10 @@
#include <limits.h>
#include "mdbodbc.h"
/** \addtogroup odbc
* @{
*/
//#define TRACE(x) fprintf(stderr,"Function %s\n", x);
#define TRACE(x)
@@ -2375,3 +2379,4 @@ static const char * _odbc_get_client_type_name(MdbColumn *col)
return NULL;
}
/** @}*/

View File

@@ -32,6 +32,10 @@
#include <locale.h>
/** \addtogroup mdbsql
* @{
*/
/* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
@@ -81,13 +85,13 @@ MdbSQL *sql = g_malloc0(sizeof(MdbSQL));
#endif
/**
* mdb_sql_run_query:
* @sql: MDB SQL object to execute the query on.
* @querystr: SQL query string to execute.
*
* Parses @querystr and executes it within the given @sql object.
* @param sql: MdbSQL object to execute the query on.
* @param querystr: SQL query string to execute.
*
* Returns: the updated MDB SQL object, or NULL on error
* Parses \p querystr and executes it within the given \p sql object.
*
* @return the updated MDB SQL object, or NULL on error
**/
MdbSQL*
mdb_sql_run_query (MdbSQL* sql, const gchar* querystr) {
@@ -980,3 +984,4 @@ mdb_sql_dump_results(MdbSQL *sql)
/* the column and table names are no good now */
mdb_sql_reset(sql);
}
/** @}*/