OSSP CVS Repository

ossp - Difference in ossp-pkg/l2/l2.h versions 1.12 and 1.13
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/l2/l2.h 1.12 -> 1.13

--- l2.h 2001/09/03 13:43:33     1.12
+++ l2.h 2001/09/04 13:52:59     1.13
@@ -132,13 +132,14 @@
 };
 
 /* type of formatter callback function */
-typedef int (*l2_formatter_t)(
-    l2_context_t *context, 
-    const char   *name, 
-    const char   *param, 
-    char         *buf, 
-    size_t        bufsize, 
-    va_list       ap
+typedef l2_result_t (*l2_formatter_t)(
+    l2_context_t *ctx,      /* application context */
+    const char    id,       /* input  arg: format string id ('x' of '%x') */
+    const char   *param,    /* input  arg: format string parameter ('foo' of '%{foo}x') */
+    char         *bufptr,   /* input  arg: pointer to output buffer */
+    size_t        bufsize,  /* input  arg: maximum size of output buffer */
+    size_t       *buflen,   /* ouput  arg: written characters in output buffer */
+    va_list      *ap        /* in/out arg: variable argument pointer */
 );
 
 /* list of shipped (output) channel handlers */
@@ -154,8 +155,6 @@
 extern l2_handler_t l2_handler_prefix;
 extern l2_handler_t l2_handler_buffer;
 
-/* parameter operations */
-
 /* channel operations */
 l2_channel_t *l2_channel_create   (l2_handler_t *h);
 l2_result_t   l2_channel_configure(l2_channel_t *ch, const char *fmt, ...);
@@ -165,16 +164,18 @@
 l2_result_t   l2_channel_close    (l2_channel_t *ch);
 l2_result_t   l2_channel_destroy  (l2_channel_t *ch);
 l2_result_t   l2_channel_stack    (l2_channel_t *ch, l2_channel_t *chTop);
-l2_result_t   l2_channel_setparams(l2_param_t p[], const char *fmt, va_list ap);
 
 /* stream operations */
 l2_stream_t  *l2_stream_create    (void);
 l2_result_t   l2_stream_channel   (l2_stream_t *st, l2_channel_t *ch, unsigned int levelmask);
-l2_result_t   l2_stream_formatter (l2_stream_t *st, const char *name, l2_formatter_t cb, l2_context_t *ctx);
+l2_result_t   l2_stream_formatter (l2_stream_t *st, char id, l2_formatter_t cb, l2_context_t *ctx);
 l2_result_t   l2_stream_levels    (l2_stream_t *st, unsigned int levelmask, unsigned int *levelmaskold);
 l2_result_t   l2_stream_log       (l2_stream_t *st, unsigned int log_level, const char *fmt, ...);
 l2_result_t   l2_stream_vlog      (l2_stream_t *st, unsigned int log_level, const char *fmt, va_list ap);
 l2_result_t   l2_stream_destroy   (l2_stream_t *st);
 
+/* utility operations */
+l2_result_t   l2_util_setparams(l2_param_t p[], const char *fmt, va_list ap);
+
 #endif /* __L2_H__ */
 

CVSTrac 2.0.1