OSSP CVS Repository

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

Check-in Number: 2153
Date: 2002-May-23 11:37:15 (local)
2002-May-23 09:37:15 (UTC)
User:thl
Branch:
Comment: renamed and relocated
Tickets:
Inspections:
Files:
ossp-pkg/lmtp2nntp/lmtp2nntp_msg.c      1.13 -> 1.14     6 inserted, 8 deleted
ossp-pkg/lmtp2nntp/lmtp2nntp_msg.h      1.4 -> 1.5     2 inserted, 0 deleted

ossp-pkg/lmtp2nntp/lmtp2nntp_msg.c 1.13 -> 1.14

--- lmtp2nntp_msg.c      2002/05/23 09:34:27     1.13
+++ lmtp2nntp_msg.c      2002/05/23 09:37:15     1.14
@@ -558,7 +558,6 @@
     return rc;
 }
 
-#define MAXOUT 32 /* strlen("Mon, 31 Jul 2002 12:34:56 +0123")+1 */
 static var_rc_t canonifydate(
     const char  *cpArg,  size_t nArg,
     const char  *cpVal,  size_t nVal,
@@ -635,9 +634,9 @@
 
     printf("DEBUG: cpVal=\"%41s\", cpArg=\"%s\"\n", cpVal, cpArg);
     if ((cpVal == NULL) || (strlen(cpVal) == 0)) {
-        *cppOut    = (char *)mallocex(MAXOUT);
-        *pnOutsize = MAXOUT;
-        (void /*FIXME*/)tai_format(now, *cppOut, MAXOUT, "%a, %d %b %Y %H:%M:%S %z");
+        *cppOut    = (char *)mallocex(DATELENMAX);
+        *pnOutsize = DATELENMAX;
+        (void /*FIXME*/)tai_format(now, *cppOut, DATELENMAX, "%a, %d %b %Y %H:%M:%S %z");
         *pnOut     = strlen(*cppOut);
     }
     else {
@@ -655,9 +654,9 @@
             && ((futurerange != NULL) && (tai_op(value, TAI_OP_LT, futurerange) == TAI_OK))
 #endif
             ) {
-            *cppOut    = (char *)mallocex(MAXOUT);
-            *pnOutsize = MAXOUT;
-            (void /*FIXME*/)tai_format(value, *cppOut, MAXOUT, "%a, %d %b %Y %H:%M:%S %z");
+            *cppOut    = (char *)mallocex(DATELENMAX);
+            *pnOutsize = DATELENMAX;
+            (void /*FIXME*/)tai_format(value, *cppOut, DATELENMAX, "%a, %d %b %Y %H:%M:%S %z");
             *pnOut     = strlen(*cppOut);
         }
         else {
@@ -679,7 +678,6 @@
 
     return VAR_OK;
 }
-#undef MAXOUT //FIXME is there a better way to do it?
 
 static var_rc_t createmessageid(
     const char  *cpArg,  size_t nArg,


ossp-pkg/lmtp2nntp/lmtp2nntp_msg.h 1.4 -> 1.5

--- lmtp2nntp_msg.h      2002/05/23 08:35:12     1.4
+++ lmtp2nntp_msg.h      2002/05/23 09:37:15     1.5
@@ -63,6 +63,8 @@
 #define WRAPAT 120          /* join wraps header lines when exceeding this value */
 #define WRAPUSING "\n    "  /* join inserts this value when wrapping lines       */
 
+#define DATELENMAX 32       /* strlen("Mon, 31 Jul 2002 12:34:56 +0123")+1 */
+
 typedef enum {
     MSG_OK,
     MSG_ERR_MEM,

CVSTrac 2.0.1