X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fflist.c;h=97488bbb3094d89d922abd4d4b02680ebb0b231f;hb=76b51b746c95647aceff29ab178eff496843f528;hp=758d308162fc5ecc229eabf2c9dbc099eb03ecac;hpb=008837e090c008e3afe7a9c8667070bafa091e62;p=mmh diff --git a/uip/flist.c b/uip/flist.c index 758d308..97488bb 100644 --- a/uip/flist.c +++ b/uip/flist.c @@ -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; } @@ -288,7 +287,7 @@ main(int argc, char **argv) void GetFolderOrder(void) { - char *p, *s; + unsigned char *p, *s; int priority = 1; struct Folder *o; @@ -400,7 +399,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 +605,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. */