char **arguments;
char buf[BUFSIZ];
- if (nmh_init(argv[0], 1)) { return 1; }
+ if (nmh_init(argv[0], true, true)) { return 1; }
/*
* If program was invoked with name ending
ambigsw(cp, switches);
done(1);
case UNKWNSW:
- adios(NULL, "-%s unknown", cp);
+ die("-%s unknown", cp);
case HELPSW:
snprintf(buf, sizeof(buf), "%s [+folder1 [+folder2 ...]][switches]",
case SEQSW:
if (!(cp = *argp++) || *cp == '-')
- adios (NULL, "missing argument to %s", argp[-2]);
+ die("missing argument to %s", argp[-2]);
svector_push_back (sequencesToDo, cp);
break;
for (; ap && *ap; ap++)
svector_push_back (sequencesToDo, *ap);
} else {
- adios (NULL, "no sequence specified or %s profile entry found", usequence);
+ die("no sequence specified or %s profile entry found", usequence);
}
}
AddFolder(char *name, int force)
{
unsigned int i;
- int msgnum, nonzero;
+ int msgnum;
+ bool nonzero;
ivector_t seqnum = ivector_create (0), nSeq = ivector_create (0);
struct Folder *f;
struct msgs *mp;
}
/* Check if any of the sequence checks were nonzero */
- nonzero = 0;
+ nonzero = false;
for (i = 0; i < svector_size (sequencesToDo); i++) {
if (ivector_at (nSeq, i) > 0) {
- nonzero = 1;
+ nonzero = true;
break;
}
}
PrintFolders(void)
{
char tmpname[BUFSIZ];
- unsigned int i, j, len, has_private = 0;
+ unsigned int i, j, len;
+ bool has_private = false;
unsigned int maxfolderlen = 0, maxseqlen = 0;
int maxnum = 0, maxseq = 0;
/* check if this sequence is private in any of the folders */
if (ivector_at (folders[i].private, j))
- has_private = 1;
+ has_private = true;
}
}