#include <h/mime.h>
#include <h/mhparse.h>
#include <h/mhcachesbr.h>
+#include "h/done.h"
#include <h/utils.h>
-#include "../sbr/m_maildir.h"
+#include "mhmisc.h"
+#include "sbr/m_maildir.h"
#include "mhfree.h"
#include "mhshowsbr.h"
#undef X
-/* mhmisc.c */
-extern int npart;
-extern int ntype;
-extern char *parts[NPARTS + 1];
-extern char *types[NTYPES + 1];
-extern int userrs;
-
int debugsw = 0;
int verbosw = 0;
#define quitser pipeser
-/* mhparse.c */
-CT parse_mime (char *);
-
-/* mhmisc.c */
-int part_ok (CT);
-int type_ok (CT, int);
-void flush_errors (void);
-
/*
* static prototypes
*/
if (nmh_init(argv[0], 1)) { return 1; }
- done=freects_done;
+ set_done(freects_done);
arguments = getarguments (invo_name, argc, argv, 1);
argp = arguments;
case FORMSW:
if (!(cp = *argp++) || *cp == '-')
adios (NULL, "missing argument to %s", argp[-2]);
- mh_xfree(formsw);
- formsw = getcpy (etcpath (cp));
+ free(formsw);
+ formsw = mh_xstrdup(etcpath(cp));
continue;
/*
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
*/
if ((cp = getenv ("MHN"))) {
if ((fp = fopen (cp, "r"))) {
- readconfig ((struct node **) 0, fp, cp, 0);
+ readconfig(NULL, fp, cp, 0);
fclose (fp);
} else {
admonish ("", "unable to read $MHN profile (%s)", cp);
* Read the standard profile setup
*/
if ((fp = fopen (cp = etcpath ("mhn.defaults"), "r"))) {
- readconfig ((struct node **) 0, fp, cp, 0);
+ readconfig(NULL, fp, cp, 0);
fclose (fp);
}
/* Check for private cache location */
if (!(cache_private = context_find (nmhprivcache)))
cache_private = ".cache";
- cache_private = getcpy (m_maildir (cache_private));
+ cache_private = mh_xstrdup(m_maildir(cache_private));
/*
* Cache the current directory before we do any chdirs()'s.
execvp ("mhbuild", vec);
fprintf (stderr, "unable to exec ");
- _exit (-1);
+ _exit(1);
}
/*
execvp ("mhbuild", vec);
fprintf (stderr, "unable to exec ");
- _exit (-1);
+ _exit(1);
}
if (file && msgs.size)