OSSP CVS Repository

ossp - Check-in [4791]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4791
Date: 2004-Oct-29 21:42:20 (local)
2004-Oct-29 19:42:20 (UTC)
User:rse
Branch:
Comment: o Various code comment cleanups. o Fixed dmalloc support.
Tickets:
Inspections:
Files:
ossp-pkg/var/ChangeLog      1.9 -> 1.10     6 inserted, 0 deleted
ossp-pkg/var/devtool.conf      1.12 -> 1.13     1 inserted, 0 deleted
ossp-pkg/var/var.c      1.104 -> 1.105     6 inserted, 3 deleted
ossp-pkg/var/var.h      1.31 -> 1.32     26 inserted, 5 deleted
ossp-pkg/var/var_test.c      1.50 -> 1.51     2 inserted, 1 deleted

ossp-pkg/var/ChangeLog 1.9 -> 1.10

--- ChangeLog    2004/10/29 19:29:12     1.9
+++ ChangeLog    2004/10/29 19:42:20     1.10
@@ -13,6 +13,12 @@
 
   Changes between 1.1.1 and 1.1.2 (12-Sep-2004 to xx-Oct-2004)
 
+   o Various code comment cleanups.
+     [Ralf S. Engelschall <rse@engelschall.com>]
+
+   o Fixed dmalloc support.
+     [Ralf S. Engelschall <rse@engelschall.com>]
+
    o Fixed "var-config --libs" output.
      [Ralf S. Engelschall <rse@engelschall.com>]
 


ossp-pkg/var/devtool.conf 1.12 -> 1.13

--- devtool.conf 2004/10/29 19:27:34     1.12
+++ devtool.conf 2004/10/29 19:42:20     1.13
@@ -16,6 +16,7 @@
     ./configure \
         --prefix=/tmp/var \
         --disable-shared \
+        --with-dmalloc=/usr/opkg \
         --enable-maintainer \
         --enable-debug \
         "$@"


ossp-pkg/var/var.c 1.104 -> 1.105

--- var.c        2004/04/04 09:57:10     1.104
+++ var.c        2004/10/29 19:42:20     1.105
@@ -32,6 +32,7 @@
 #include "config.h"
 #endif
 
+/* required system headers */
 #include <stdlib.h>
 #include <stdarg.h>
 #include <ctype.h>
@@ -44,11 +45,13 @@
 #else
 #  include <regex.h>
 #endif
-#include "var.h"
 #if defined(HAVE_DMALLOC_H) && defined(WITH_DMALLOC)
-#include "dmalloc.h"
+#include <dmalloc.h>
 #endif
 
+/* required internal headers */
+#include "var.h"
+
 /* unique library identifier */
 const char var_id[] = "OSSP var";
 
@@ -2719,7 +2722,7 @@
     "formatting failure"                                       /* VAR_ERR_FORMATTING_FAILURE */
 };
 
-/* transslate a return code into its corresponding descriptive text */
+/* translate a return code into its corresponding descriptive text */
 var_rc_t var_strerror(var_t *var, var_rc_t rc, char **str)
 {
     if (str == NULL)


ossp-pkg/var/var.h 1.31 -> 1.32

--- var.h        2004/04/04 08:07:34     1.31
+++ var.h        2004/10/29 19:42:20     1.32
@@ -31,10 +31,22 @@
 #ifndef __VAR_H__
 #define __VAR_H__
 
+/* required system headers */
 #include <stdlib.h>
 #include <stdarg.h>
 
-/* Error codes */
+/* minimum C++ support */
+#ifdef __cplusplus
+#define DECLARATION_BEGIN extern "C" {
+#define DECLARATION_END   }
+#else
+#define DECLARATION_BEGIN
+#define DECLARATION_END
+#endif
+
+DECLARATION_BEGIN
+
+/* error codes */
 typedef enum {
     VAR_ERR_CALLBACK                        = -64,
     VAR_ERR_FORMATTING_FAILURE              = -45,
@@ -85,15 +97,18 @@
     VAR_OK                                  =   0
 } var_rc_t;
 
+/* opaque data type */
 struct var_st;
 typedef struct var_st var_t;
 
+/* var_config() modes */
 typedef enum {
     VAR_CONFIG_SYNTAX,
     VAR_CONFIG_CB_VALUE,
     VAR_CONFIG_CB_OPERATION
 } var_config_t;
 
+/* VAR_CONFIG_SYNTAX type */
 typedef struct {
     char  escape;       /* default: '\' */
     char  delim_init;   /* default: '$' */
@@ -105,22 +120,26 @@
     char *name_chars;   /* default: "a-zA-Z0-9_" */
 } var_syntax_t;
 
+/* VAR_CONFIG_CB_VALUE type */
 typedef var_rc_t (*var_cb_value_t)(
     var_t *var, void *ctx,
-    const char  *var_ptr, size_t  var_len, int var_idx,
+    const char  *var_ptr, size_t  var_len, int     var_idx,
     const char **val_ptr, size_t *val_len, size_t *val_size
 );
 
+/* VAR_CONFIG_CB_OPERATION type */
 typedef var_rc_t (*var_cb_operation_t)(
     var_t *var, void *ctx,
-    const char  *op_ptr, size_t op_len,
-    const char  *arg_ptr, size_t arg_len,
-    const char  *val_ptr, size_t val_len,
+    const char  *op_ptr,  size_t   op_len,
+    const char  *arg_ptr, size_t  arg_len,
+    const char  *val_ptr, size_t  val_len,
     const char **out_ptr, size_t *out_len, size_t *out_size
 );
 
+/* library API identification */
 extern const char var_id[];
 
+/* library API functions */
 var_rc_t  var_create    (var_t **var);
 var_rc_t  var_destroy   (var_t  *var);
 var_rc_t  var_config    (var_t  *var, var_config_t mode, ...);
@@ -130,5 +149,7 @@
 var_rc_t  var_format    (var_t  *var, char **dst_ptr, int force_expand, const char *fmt, ...);
 var_rc_t  var_strerror  (var_t  *var, var_rc_t rc, char **str);
 
+DECLARATION_END
+
 #endif /* __VAR_H__ */
 


ossp-pkg/var/var_test.c 1.50 -> 1.51

--- var_test.c   2004/04/04 08:07:34     1.50
+++ var_test.c   2004/10/29 19:42:20     1.51
@@ -29,13 +29,14 @@
 */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <errno.h>
 #include <ctype.h>
 
 #include "config.h"
 #if defined(HAVE_DMALLOC_H) && defined(WITH_DMALLOC)
-#include "dmalloc.h"
+#include <dmalloc.h>
 #endif
 
 #include "var.h"

CVSTrac 2.0.1