* uip/mhlistsbr.c, uip/mhlsbr.c, uip/picksbr.c: cast
[mmh] / uip / flist.c
index 758d308..b5226ce 100644 (file)
@@ -114,7 +114,6 @@ int AddFolder(char *, int);
 void BuildFolderList(char *, int);
 void BuildFolderListRecurse(char *, struct stat *, int);
 void PrintFolders(void);
-static int num_digits (int);
 void AllocFolders(struct Folder **, int *, int);
 int AssignPriority(char *);
 static void do_readonly_folders(void);
@@ -233,7 +232,7 @@ main(int argc, char **argv)
            }
            if (*cp == '+' || *cp == '@') {
                foldersToDo[numfolders++] =
-                   path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+                   pluspath (cp);
            } else
                foldersToDo[numfolders++] = cp;
        }
@@ -277,7 +276,8 @@ main(int argc, char **argv)
     ScanFolders();
     qsort(folders, nFolders, sizeof(struct Folder), (qsort_comp) CompareFolders);
     PrintFolders();
-    return done (0);
+    done (0);
+    return 1;
 }
 
 /*
@@ -288,7 +288,7 @@ main(int argc, char **argv)
 void
 GetFolderOrder(void)
 {
-    char *p, *s;
+    unsigned char *p, *s;
     int priority = 1;
     struct Folder *o;
 
@@ -400,7 +400,8 @@ BuildFolderList(char *dirName, int searchdepth)
 void
 BuildFolderListRecurse(char *dirName, struct stat *s, int searchdepth)
 {
-    char *base, *n, name[PATH_MAX];
+    char *base, name[PATH_MAX];
+    unsigned char *n;
     int nlinks;
     DIR *dir;
     struct dirent *dp;
@@ -605,29 +606,6 @@ PrintFolders(void)
 }
 
 /*
- * Calculate the number of digits in a nonnegative integer
- */
-static int
-num_digits (int n)
-{
-    int ndigits = 0;
-
-    /* Sanity check */
-    if (n < 0)
-       adios (NULL, "oops, num_digits called with negative value");
-
-    if (n == 0)
-       return 1;
-
-    while (n) {
-       n /= 10;
-       ndigits++;
-    }
-
-    return ndigits;
-}
-
-/*
  * Put them in priority order.
  */