]> diplodocus.org Git - nmh/blobdiff - uip/rcvdist.c
Removed call to fpurge() and its platform-specific emulations
[nmh] / uip / rcvdist.c
index 702dc9aa78733015f21a033e7e93af0063bc53b1..fd58396a3874c0a4433bfc1403af1ce8ccdbf9d4 100644 (file)
@@ -171,7 +171,7 @@ rcvdistout (FILE *inb, char *form, char *addrs)
     register int char_read = 0, format_len, i, state;
     register char **ap;
     char *cp, *scanl, name[NAMESZ], tmpbuf[SBUFSIZ];
-    register struct comp *cptr, **savecomp;
+    register struct comp *cptr;
     FILE *out;
 
     if (!(out = fopen (drft, "w")))
@@ -193,21 +193,25 @@ rcvdistout (FILE *inb, char *form, char *addrs)
        cptr->c_text = addrs;
 
     for (state = FLD;;) {
-       switch (state = m_getfld (state, name, tmpbuf, SBUFSIZ, inb)) {
+       int msg_count = SBUFSIZ;
+       switch (state = m_getfld (state, name, tmpbuf, &msg_count, inb)) {
            case FLD: 
            case FLDPLUS: 
-               i = fmt_addcomp(name, tmpbuf);
+               i = fmt_addcomptext(name, tmpbuf);
                if (i != -1) {
                    char_read += msg_count;
                    while (state == FLDPLUS) {
-                       state = m_getfld (state, name, tmpbuf, SBUFSIZ, inb);
+                       msg_count = SBUFSIZ;
+                       state = m_getfld (state, name, tmpbuf, &msg_count, inb);
                        fmt_appendcomp(i, name, tmpbuf);
                        char_read += msg_count;
                    }
                }
 
-               while (state == FLDPLUS)
-                   state = m_getfld (state, name, tmpbuf, SBUFSIZ, inb);
+               while (state == FLDPLUS) {
+                   msg_count = SBUFSIZ;
+                   state = m_getfld (state, name, tmpbuf, &msg_count, inb);
+               }
                break;
 
            case LENERR: