sbr/m_rand.h \
sbr/makedir.h \
sbr/message_id.h \
+ sbr/mime_type.h \
thirdparty/jsmn/jsmn.h \
uip/mhfree.h \
uip/mhoutsbr.h \
void m_unknown(m_getfld_state_t *, FILE *);
-/*
- * Return a MIME content-type string for the specified file.
- *
- * If the system supports it, will use the "file" command to determine
- * the appropriate content-type. Otherwise it will try to determine the
- * content-type from the suffix. If that fails, the file will be scanned
- * and either assigned a MIME type of text/plain or application/octet-stream
- * depending if binary content is present.
- *
- * Arguments:
- *
- * filename - The name of the file to determine the MIME type of.
- *
- * Returns a pointer to a content-type string (which may include MIME
- * parameters, such as charset). Returns a NULL if it cannot determine
- * the MIME type of the file. Returns allocated storage that must be
- * free'd.
- */
-char *mime_type(const char *filename);
-
/*
* Clear the screen, using the appropriate entry from the terminfo database
*/
#include <h/mh.h>
#include <h/utils.h>
#include <h/tws.h>
+#include "mime_type.h"
#ifdef MIMETYPEPROC
static char *get_file_info(const char *, const char *);
--- /dev/null
+/* mime_type.h -- determine the MIME Content-Type of a file.
+ *
+ * This code is Copyright (c) 2017, by the authors of nmh. See the
+ * COPYRIGHT file in the root directory of the nmh distribution for
+ * complete copyright information.
+ */
+
+/* Return a MIME content-type string for the specified file.
+ *
+ * If the system supports it, will use the "file" command to determine
+ * the appropriate content-type. Otherwise it will try to determine the
+ * content-type from the suffix. If that fails, the file will be scanned
+ * and either assigned a MIME type of text/plain or application/octet-stream
+ * depending if binary content is present.
+ *
+ * Arguments:
+ *
+ * filename - The name of the file to determine the MIME type of.
+ *
+ * Returns a pointer to a content-type string (which may include MIME
+ * parameters, such as charset). Returns a NULL if it cannot determine
+ * the MIME type of the file. Returns allocated storage that must be
+ * free'd.
+ */
+char *mime_type(const char *filename);
#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"
#include <h/signals.h>
#include "../sbr/m_maildir.h"
#include "../sbr/m_mktemp.h"
+#include "../sbr/mime_type.h"
#include "mhfree.h"
#include "mhoutsbr.h"
#include "mhshowsbr.h"
#endif
#include "../sbr/m_maildir.h"
#include "../sbr/m_mktemp.h"
+#include "../sbr/mime_type.h"
#define WHATNOW_SWITCHES \
X("draftfolder +folder", 0, DFOLDSW) \