OSSP CVS Repository

ossp - Difference in ossp-pkg/lmtp2nntp/msg.c versions 1.7 and 1.8
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/lmtp2nntp/msg.c 1.7 -> 1.8

--- msg.c        2001/08/23 07:54:06     1.7
+++ msg.c        2001/08/23 08:36:53     1.8
@@ -91,7 +91,7 @@
      */
 
     /* split message into header and body */
-    if (!str_parse(msg->cpMsg, "m/((?:.*?)\\n)\\n(.*)$/s", &cpHeaders, &msg->cpBody))
+    if (str_parse(msg->cpMsg, "m/((?:.*?)\\n)\\n(.*)$/s", &cpHeaders, &msg->cpBody) <= 0)
         return MSG_ERR_SPLITSPLITBODY;
 
     /* replace envelope From w/o colon by X-F: pseudotag. This eliminates the
@@ -104,7 +104,7 @@
 
     /* unwrap header lines */
     /*FIXME poor man's s///g simulator as current str library doesn't support //global substitution */
-    while (str_parse(cpHeaders, "s/(.*?)\\n[ \\t]+(.*)/$1 $2/s", &cpRem)) {
+    while (str_parse(cpHeaders, "s/(.*?)\\n[ \\t]+(.*)/$1 $2/s", &cpRem) > 0) {
         free(cpHeaders);
         cpHeaders = cpRem;
     }
@@ -114,7 +114,8 @@
     /*FIXME - fix bug "not" [^...] working */
     /*FIXME - improve str_parse(foo, "...", &foo) should free foo() on it's own */
     /*FIXME - add "global" in s/search/replace/g (see above "unwrap hader lines") */
-    while (str_parse(cpHeaders, "m/^([\\w-]+?:)[ \\t]*(.*?)[ \\t]*\\n(.*)/s", &cpName, &cpValue, &cpRem)) {
+    while (str_parse(cpHeaders, "m/^([\\w-]+?:)[ \\t]*(.*?)[ \\t]*\\n(.*)/s",
+                     &cpName, &cpValue, &cpRem) > 0) {
         free(cpHeaders);
         cpHeaders = cpRem;
         argz_add(&msg->azHeaders, &msg->asHeaders, cpName);

CVSTrac 2.0.1