瀏覽代碼

- some doxygen documentation for db_ut.h

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@3042 689a6050-402a-0410-94f2-e92a70836424
Henning Westerholt 18 年之前
父節點
當前提交
97841ad1e3
共有 1 個文件被更改,包括 21 次插入3 次删除
  1. 21 3
      lib/srdb1/db_ut.c

+ 21 - 3
lib/srdb1/db_ut.c

@@ -33,9 +33,20 @@
 #include <string.h>
 #include <string.h>
 #include <strings.h>
 #include <strings.h>
 
 
+/**
+ * \file db_ut.c
+ * \brief Utility functions that are needed from database drivers.
+ *
+ * Contains methods for datatype conversation in both directions 
+ * and some SQL print functions.
+ */
 
 
-/*
+
+/**
  * Convert a string to integer
  * Convert a string to integer
+ * \param _s source string
+ * \param _v target value
+ * \return -1 on error, 0 on success
  */
  */
 inline int db_str2int(const char* _s, int* _v)
 inline int db_str2int(const char* _s, int* _v)
 {
 {
@@ -152,8 +163,15 @@ inline int db_str2time(const char* _s, time_t* _v)
 }
 }
 
 
 
 
-/*
- * Convert time_t to string
+/**
+ * Convert a time_t value to string
+ * \param _v source value
+ * \param _s target string
+ * \param _l available length and target length
+ * \return -1 on error, 0 on success
+ * \todo This functions add quotes to the time value. This
+ * should be done in the val2str function, as some databases
+ * like db_berkeley don't need or like this at all.
  */
  */
 inline int db_time2str(time_t _v, char* _s, int* _l)
 inline int db_time2str(time_t _v, char* _s, int* _l)
 {
 {