]> diplodocus.org Git - nmh/blobdiff - uip/flist.c
inc/test-eom-align: Fix MMDF-mbox `B' size calculation.
[nmh] / uip / flist.c
index cd5682af6dd8ffff4e42c3f93a306acdcfeb64b2..e3c84a43ec6f44f26f2eae9b4d8c353169df0433 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <h/mh.h>
 #include <h/utils.h>
+#include "h/done.h"
 #include "sbr/m_maildir.h"
 
 /*
@@ -126,7 +127,7 @@ main(int argc, char **argv)
     /* allocate the initial space to record the folder names */
     numfolders = 0;
     maxfolders = MAXFOLDERS;
-    foldersToDo = (char **) mh_xmalloc ((size_t) (maxfolders * sizeof(*foldersToDo)));
+    foldersToDo = mh_xmalloc ((size_t) (maxfolders * sizeof(*foldersToDo)));
 
     /* no sequences yet */
     sequencesToDo = svector_create (0);
@@ -202,7 +203,7 @@ main(int argc, char **argv)
             */
            if (numfolders >= maxfolders) {
                maxfolders += MAXFOLDERS;
-               foldersToDo = (char **) mh_xrealloc (foldersToDo,
+               foldersToDo = mh_xrealloc (foldersToDo,
                    (size_t) (maxfolders * sizeof(*foldersToDo)));
            }
            if (*cp == '+' || *cp == '@') {
@@ -274,7 +275,7 @@ GetFolderOrder(void)
            AllocFolders(&orders, &nOrdersAlloced, nOrders + 1);
            o = &orders[nOrders++];
            o->priority = priority++;
-           o->name = (char *) mh_xmalloc(p - s + 1);
+           o->name = mh_xmalloc(p - s + 1);
            strncpy(o->name, s, p - s);
            o->name[p - s] = 0;
        } else
@@ -410,7 +411,7 @@ BuildFolderListRecurse(char *dirName, struct stat *s, int searchdepth)
        /* Check to see if the name of the file is a number
         * if it is, we assume it's a mail file and skip it
         */
-       for (n = dp->d_name; *n && isdigit((unsigned char) *n); n++);
+       for (n = dp->d_name; isdigit((unsigned char)*n); n++);
        if (!*n)
            continue;
        strncpy (name, base, sizeof(name) - 2);
@@ -614,10 +615,10 @@ AllocFolders(struct Folder **f, int *nfa, int n)
        return;
     if (*f == NULL) {
        *nfa = 10;
-       *f = (struct Folder *) mh_xmalloc (*nfa * (sizeof(struct Folder)));
+       *f = mh_xmalloc (*nfa * (sizeof(struct Folder)));
     } else {
        *nfa *= 2;
-       *f = (struct Folder *) mh_xrealloc (*f, *nfa * (sizeof(struct Folder)));
+       *f = mh_xrealloc (*f, *nfa * (sizeof(struct Folder)));
     }
 }