OSSP CVS Repository

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

Check-in Number: 2295
Date: 2002-Jul-17 13:19:30 (local)
2002-Jul-17 11:19:30 (UTC)
User:thl
Branch:
Comment: added errno formatter from lmtp2nntp
Tickets:
Inspections:
Files:
ossp-pkg/l2/l2_ut_fmtcb.c      1.4 -> 1.5     10 inserted, 0 deleted

ossp-pkg/l2/l2_ut_fmtcb.c 1.4 -> 1.5

--- l2_ut_fmtcb.c        2002/01/02 17:07:38     1.4
+++ l2_ut_fmtcb.c        2002/07/17 11:19:30     1.5
@@ -30,6 +30,7 @@
 #include <ctype.h>
 
 #include "l2.h"
+#include <errno.h>
 
 l2_result_t 
 l2_util_fmt_string(
@@ -188,3 +189,12 @@
     return L2_OK;
 }
 
+l2_result_t 
+l2_util_fmt_errno(
+    l2_context_t *ctx, const char id, const char *param,
+    char *bufptr, size_t bufsize, size_t *buflen, va_list *ap)
+{   
+    sprintf(bufptr, "(%d) %s", errno, strerror(errno)); 
+    *buflen = strlen(bufptr);
+    return L2_OK;
+}

CVSTrac 2.0.1