]> diplodocus.org Git - nmh/blobdiff - uip/new.c
Removed call to fpurge() and its platform-specific emulations
[nmh] / uip / new.c
index 752f02831b997bfba91a96502ae681d5ceb86c70..198207a86aef01bc467dbd328c2d12049a5a8a9d 100644 (file)
--- a/uip/new.c
+++ b/uip/new.c
@@ -105,15 +105,16 @@ get_msgnums(char *folder, char *sequences[])
 
     /* copied from seq_read.c:seq_public */
     for (state = FLD;;) {
-        switch (state = m_getfld (state, name, field, sizeof(field), fp)) {
+       int fieldsz = sizeof field;
+       switch (state = m_getfld (state, name, field, &fieldsz, fp)) {
             case FLD:
             case FLDPLUS:
             case FLDEOF:
                 if (state == FLDPLUS) {
                     cp = getcpy (field);
                     while (state == FLDPLUS) {
-                        state = m_getfld (state, name, field,
-                                          sizeof(field), fp);
+                       fieldsz = sizeof field;
+                       state = m_getfld (state, name, field, &fieldsz, fp);
                         cp = add (field, cp);
                     }
 
@@ -409,6 +410,7 @@ main(int argc, char **argv)
     struct node *folder;
 
     sequences[0] = NULL;
+    sequences[1] = NULL;
 
 #ifdef LOCALE
     setlocale(LC_ALL, "");
@@ -437,10 +439,10 @@ main(int argc, char **argv)
                snprintf (help, sizeof(help), "%s [switches] [sequences]",
                          invo_name);
                print_help (help, switches, 1);
-               done (1);
+               done (0);
            case VERSIONSW:
                print_version(invo_name);
-               done (1);
+               done (0);
 
            case FOLDERSSW:
                if (!(folders = *argp++) || *folders == '-')
@@ -456,6 +458,7 @@ main(int argc, char **argv)
        /* have a sequence argument */
        if (!seq_in_list(cp, sequences)) {
            sequences[i++] = cp;
+           sequences[i] = NULL;
        }
     }