#include <h/mh.h>
#include <h/utils.h>
-#define FALSE 0
-#define TRUE 1
-
/*
* We allocate space to record the names of folders
* (foldersToDo array), this number of elements at a time.
* If program was invoked with name ending
* in `s', then add switch `-all'.
*/
- if (argv[0][strlen (argv[0]) - 1] == 's')
- all = TRUE;
+ all = HasSuffixC(argv[0], 's');
arguments = getarguments (invo_name, argc, argv, 1);
argp = arguments;
if ((cp = context_find(usequence)) && *cp) {
char **ap, *dp;
- dp = getcpy(cp);
+ dp = mh_xstrdup(cp);
ap = brkstring (dp, " ", "\n");
for (; ap && *ap; ap++)
svector_push_back (sequencesToDo, *ap);
/* Oops, error occurred. Record it and continue. */
AllocFolders(&folders, &nFoldersAlloced, nFolders + 1);
f = &folders[nFolders++];
- f->name = getcpy(name);
+ f->name = mh_xstrdup(name);
f->error = 1;
f->priority = AssignPriority(f->name);
return 0;
/* save general folder information */
AllocFolders(&folders, &nFoldersAlloced, nFolders + 1);
f = &folders[nFolders++];
- f->name = getcpy(name);
+ f->name = mh_xstrdup(name);
f->nMsgs = mp->nummsg;
f->nSeq = ivector_create (0);
f->private = ivector_create (0);
{
if (!alphaOrder && f1->priority != f2->priority)
return f1->priority - f2->priority;
- else
- return strcmp(f1->name, f2->name);
+ return strcmp(f1->name, f2->name);
}
/*
{
int atrlen;
char atrcur[BUFSIZ];
- register struct node *np;
+ struct node *np;
snprintf (atrcur, sizeof(atrcur), "atr-%s-", current);
atrlen = strlen (atrcur);