Remove RPATH code though. Discussions on nmh-workers have convinced me.
[mmh] / sbr / m_getfld.c
index 85a323b..2ebb44a 100644 (file)
@@ -578,7 +578,6 @@ finish:
        return (state);
 }
 
-static char fromline[BUFSIZ] = "";
 
 void
 thisisanmbox(FILE *iob)
@@ -610,11 +609,9 @@ thisisanmbox(FILE *iob)
        }
        ismbox = TRUE;
        delimstr = "\nFrom ";
-       cp = fromline;
-       while ((c = getc(iob)) != '\n' && cp - fromline < BUFSIZ - 1)
-               *cp++ = c;
-       *cp = '\0';
-
+       while ((c = getc(iob)) != '\n' && c >= 0) {
+               continue;
+       }
        c = strlen(delimstr);
        fdelim = (unsigned char *) mh_xmalloc((size_t) (c + 3));
        *fdelim++ = '\0';
@@ -650,7 +647,6 @@ m_Eom(int c, FILE *iob)
        register long pos = 0L;
        register int i;
        char text[10];
-       register char *cp;
 
        pos = ftell(iob);
        if ((i = fread(text, sizeof *text, edelimlen, iob)) != edelimlen ||
@@ -668,43 +664,15 @@ m_Eom(int c, FILE *iob)
        }
 
        if (ismbox) {
-               cp = fromline;
-               while ((c = getc(iob)) != '\n' && c >= 0 && cp - fromline < BUFSIZ - 1)
-                       *cp++ = c;
-               *cp = '\0';
+               while ((c = getc(iob)) != '\n' && c >= 0) {
+                       continue;
+               }
        }
 
        return 1;
 }
 
 
-/*
-** Return the Return-Path and Delivery-Date header information.
-**
-** Currently, I'm assuming that the "From " line takes the following form:
-**         "From" sender@host  date        (sendmail delivery)
-*/
-int
-get_returnpath(char *rp, int rplen, char *dd, int ddlen)
-{
-       char *cp;
-
-       if (!(cp = strchr(fromline, ' '))) {
-               return 0;
-       }
-       /* Extract the Return-Path. */
-       snprintf(rp, rplen, "%.*s\n", (int)(cp - fromline), fromline);
-       /* Advance over the whitespace. */
-       while (*cp == ' ' || *cp == '\t') {
-               cp++;
-       }
-       /* Extract the Delivery-Date. */
-       snprintf(dd, ddlen, "%.*s\n", 24, cp);
-       *fromline = '\0';
-       return 1;
-}
-
-
 static unsigned char *
 matchc(int patln, char *pat, int strln, char *str)
 {