OSSP CVS Repository

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

Check-in Number: 4127
Date: 2001-Jun-28 14:42:10 (local)
2001-Jun-28 12:42:10 (UTC)
User:simons
Branch:
Comment: Added mechanism for adding an array of formatter callbacks with one function call.
Tickets:
Inspections:
Files:
ossp-pkg/xds/xds.h      1.1 -> 1.2     13 inserted, 3 deleted

ossp-pkg/xds/xds.h 1.1 -> 1.2

--- xds.h        2001/06/28 12:31:22     1.1
+++ xds.h        2001/06/28 12:42:10     1.2
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/xds/Attic/xds.h,v $
-   $Revision: 1.1 $
+   $Revision: 1.2 $
 
    Copyright (c) 2001 by Cable & Wireless Deutschland.
 
@@ -20,16 +20,26 @@
 
 #include <stdlib.h>
 
+typedef int (*xds_formatter_cb)(char* buf, size_t buf_size, void* val);
+typedef struct
+    {
+    char* name;
+    xds_formatter_cb callback;
+    }
+xds_formatter_cb_desc;
+
 typedef struct
     {
+    xds_formatter_cb_desc* formatters;
+    size_t formatters_size;
     }
 xds_ctx;
 
 xds_ctx* xds_init(void);
 void     xds_destroy(xds_ctx* context);
 
-typedef int (*xds_formatter_cb)(char* buf, size_t buf_size, void* val);
 int xds_register(xds_ctx* context, const char* name, xds_formatter_cb callback);
+int xds_vregister(xds_ctx* context, const xds_formatter_cb_desc* callbacks, size_t size);
 
 int xds_mashal(xds_ctx* context, const char* fmt, ...);
 int xds_snmashal(xds_ctx* context, char* buf, size_t buf_size, const char* fmt, ...);

CVSTrac 2.0.1