]> diplodocus.org Git - nmh/blobdiff - uip/slocal.c
Removed call to fpurge() and its platform-specific emulations
[nmh] / uip / slocal.c
index a7283bf8f5e702fa05d2d53edc6f11dac128390e..5eadea45fee8885a6df489eefd41f1f4c0face07 100644 (file)
@@ -740,13 +740,15 @@ parse (int fd)
      * a lookup table.
      */
     for (i = 0, state = FLD;;) {
-       switch (state = m_getfld (state, name, field, sizeof(field), in)) {
+       int fieldsz = sizeof field;
+       switch (state = m_getfld (state, name, field, &fieldsz, in)) {
            case FLD: 
            case FLDEOF: 
            case FLDPLUS: 
                lp = add (field, NULL);
                while (state == FLDPLUS) {
-                   state = m_getfld (state, name, field, sizeof(field), in);
+                   fieldsz = sizeof field;
+                   state = m_getfld (state, name, field, &fieldsz, in);
                    lp = add (field, lp);
                }
                for (p = hdrs; p->p_name; p++) {
@@ -1044,18 +1046,6 @@ usr_folder (int fd, char *string)
     /* use rcvstore to put message in folder */
     status = usr_pipe (fd, "rcvstore", rcvstoreproc, vec, 1);
 
-#if 0
-    /*
-     * Currently, verbose status messages are handled by usr_pipe().
-     */
-    if (verbose) {
-       if (status == 0)
-           verbose_printf (", success.\n");
-       else
-           verbose_printf (", failed.\n");
-    }
-#endif
-
     return status;
 }
 
@@ -1277,13 +1267,6 @@ you_lose:
                /* get copy of envelope information ("From " line) */
                envelope = getcpy (buffer);
 
-#if 0
-               /* First go ahead and put "From " line in message */
-               fputs (buffer, ffp);
-               if (ferror (ffp))
-                   goto fputs_error;
-#endif
-
                /* Put the delivery date in message */
                fputs (ddate, ffp);
                if (ferror (ffp))
@@ -1443,21 +1426,25 @@ suppress_duplicates (int fd, char *file)
     rewind (in);
 
     for (state = FLD;;) {
-       state = m_getfld (state, name, buf, sizeof(buf), in);
+       int bufsz = sizeof buf;
+       state = m_getfld (state, name, buf, &bufsz, in);
        switch (state) {
            case FLD:
            case FLDPLUS:
            case FLDEOF:
                /* Search for the message ID */
                if (mh_strcasecmp (name, "Message-ID")) {
-                   while (state == FLDPLUS)
-                       state = m_getfld (state, name, buf, sizeof(buf), in);
+                   while (state == FLDPLUS) {
+                       bufsz = sizeof buf;
+                       state = m_getfld (state, name, buf, &bufsz, in);
+                   }
                    continue;
                }
 
                cp = add (buf, NULL);
                while (state == FLDPLUS) {
-                   state = m_getfld (state, name, buf, sizeof(buf), in);
+                   bufsz = sizeof buf;
+                   state = m_getfld (state, name, buf, &bufsz, in);
                    cp = add (buf, cp);
                }
                key.dptr = trimcpy (cp);