static int all = FALSE; /* scan all folders in top level? */
static int alphaOrder = FALSE; /* want alphabetical order only */
static int recurse = FALSE; /* show nested folders? */
static int showzero = TRUE; /* show folders even if no messages in seq? */
static int all = FALSE; /* scan all folders in top level? */
static int alphaOrder = FALSE; /* want alphabetical order only */
static int recurse = FALSE; /* show nested folders? */
static int showzero = TRUE; /* show folders even if no messages in seq? */
* sequence found, and total num messages */
static char curfol[BUFSIZ]; /* name of the current folder */
* sequence found, and total num messages */
static char curfol[BUFSIZ]; /* name of the current folder */
case HELPSW:
snprintf(buf, sizeof(buf), "%s [+folder1 [+folder2 ...]][switches]", invo_name);
print_help(buf, switches, 1);
case HELPSW:
snprintf(buf, sizeof(buf), "%s [+folder1 [+folder2 ...]][switches]", invo_name);
print_help(buf, switches, 1);
- adios(NULL, "too many sequences (more than %d) specified", NUMATTRS);
+ adios(EX_USAGE, NULL, "too many sequences (more than %d) specified", NUMATTRS);
- adios(NULL, "profile entry %s set, but empty, and no sequence given", usequence);
+ adios(EX_CONFIG, NULL, "profile entry %s set, but empty, and no sequence given", usequence);
ap = brkstring(dp, " ", "\n");
for (; ap && *ap; ap++) {
if (numsequences >= NUMATTRS) {
ap = brkstring(dp, " ", "\n");
for (; ap && *ap; ap++) {
if (numsequences >= NUMATTRS) {
- adios(NULL, "too many sequences (more than %d) in %s profile entry", NUMATTRS, usequence);
+ adios(EX_USAGE, NULL, "too many sequences (more than %d) in %s profile entry", NUMATTRS, usequence);
qsort(folders, nFolders, sizeof(struct Folder),
(qsort_comp) CompareFolders);
PrintFolders();
qsort(folders, nFolders, sizeof(struct Folder),
(qsort_comp) CompareFolders);
PrintFolders();
** If base directory, don't add it to the
** folder list. We just recurse into it.
*/
** If base directory, don't add it to the
** folder list. We just recurse into it.
*/
- if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) {
+ if (strcmp(dp->d_name, ".")==0 ||
+ strcmp(dp->d_name, "..")==0) {
- int i, j, len, has_private = 0;
- int maxfolderlen = 0, maxseqlen = 0;
+ unsigned int i, j, len, has_private = 0;
+ unsigned int maxfolderlen = 0, maxseqlen = 0;
for (i = 0; i < nFolders; i++)
printf("%s\n", folders[i].name);
return;
for (i = 0; i < nFolders; i++)
printf("%s\n", folders[i].name);
return;
for (j = 0; j < numsequences; j++) {
if (folders[i].nSeq[j] > 0 || showzero) {
/* Add `+' to end of name of current folder */
for (j = 0; j < numsequences; j++) {
if (folders[i].nSeq[j] > 0 || showzero) {
/* Add `+' to end of name of current folder */
- if (o->name[0] == '*' && !strcmp(o->name + 1,
- name + (nl - ol + 1))) {
+ if (o->name[0] == '*' &&
+ strcmp(o->name + 1, name + (nl - ol + 1))==0) {
snprintf(atrcur, sizeof(atrcur), "atr-%s-", seq_cur);
atrlen = strlen(atrcur);
snprintf(atrcur, sizeof(atrcur), "atr-%s-", seq_cur);
atrlen = strlen(atrcur);