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);
}
if (*cp == '+' || *cp == '@') {
foldersToDo[numfolders++] =
- path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ pluspath (cp);
} else
foldersToDo[numfolders++] = cp;
}
ScanFolders();
qsort(folders, nFolders, sizeof(struct Folder), (qsort_comp) CompareFolders);
PrintFolders();
- return done (0);
+ done (0);
+ return 1;
}
/*
void
GetFolderOrder(void)
{
- char *p, *s;
+ unsigned char *p, *s;
int priority = 1;
struct Folder *o;
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;
}
/*
- * 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.
*/