#include <h/md5.h>
#include <h/mts.h>
#include <h/tws.h>
+#include <h/fmt_scan.h>
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/utils.h>
+#include "../sbr/m_mktemp.h"
+#include "../sbr/message_id.h"
+#include "../sbr/mime_type.h"
+#include "mhfree.h"
+#include "mhshowsbr.h"
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
extern int rfc934sw;
extern int contentidsw;
-/* cache policies */
-extern int rcachesw; /* mhcachesbr.c */
-extern int wcachesw; /* mhcachesbr.c */
-
static char prefix[] = "----- =_aaaaaaaaaa";
struct attach_list {
/* mhcachesbr.c */
int find_cache (CT, int, int *, char *, char *, int);
-/* mhfree.c */
-extern CT *cts;
-void freects_done (int) NORETURN;
-void free_ctinfo (CT);
-void free_encoding (CT, int);
-
/*
* static prototypes
*/
int header_encoding, size_t maxunencoded, int verbose)
{
int compnum, state;
- char buf[BUFSIZ], name[NAMESZ];
+ char buf[NMH_BUFSIZ], name[NAMESZ];
char *cp, *np, *vp;
struct multipart *m;
struct part **pp;
case BODY:
fseek (in, (long) (-strlen (buf)), SEEK_CUR);
- /* FALLTHRU */
+ break;
case FILEEOF:
break;
}
/*
- * We initally assume we will find multiple contents in the
+ * We initially assume we will find multiple contents in the
* draft. So create a multipart/mixed content to hold everything.
* We can remove this later, if it is not needed.
*/
{
int extrnal, vrsn;
char *cp, **ap;
- char buffer[BUFSIZ];
+ char buffer[NMH_BUFSIZ];
struct multipart *m;
struct part **pp;
struct stat st;
*/
if (checksw) {
np = mh_xstrdup(MD5_FIELD);
- vp = calculate_digest (ct, (ct->c_encoding == CE_QUOTED) ? 1 : 0);
+ vp = calculate_digest (ct, ct->c_encoding == CE_QUOTED);
add_header (ct, np, vp);
}
/*
* Parse the Content-Type. get_ctinfo() parses MIME parameters, but
- * since we're just feeding it a MIME type we have to add those ourself.
+ * since we're just feeding it a MIME type we have to add those ourselves.
* Map that to a valid content-type label and call any initialization
* function.
*/
"continuing...", invo_name,
ct->c_ctinfo.ci_type,
ct->c_ctinfo.ci_subtype ? "/" : "",
- ct->c_ctinfo.ci_subtype ? ct->c_ctinfo.ci_subtype : "",
+ FENDNULL(ct->c_ctinfo.ci_subtype),
cp);
}
/*
* Set text content charset if it was unspecified. contains8bit
- * selctions:
+ * selections:
* 0: content does not contain 8-bit characters
* 1: content contains 8-bit characters
* -1: ignore content and use user's locale to determine charset
/* reply_file is used to pass the output of the convert. */
reply_file = getcpy (m_mktemp2 (NULL, invo_name, NULL, NULL));
convert_command =
- concat (convert, " ", argstring ? argstring : "", " >", reply_file,
+ concat (convert, " ", FENDNULL(argstring), " >", reply_file,
NULL);
/* Convert here . . . */