Delete the many local copies from each caller.
sbr/unquote.h \
thirdparty/jsmn/jsmn.h \
uip/mhfree.h \
+ uip/mhmisc.h \
uip/mhoutsbr.h \
uip/mhshowsbr.h \
#
char *content_charset (CT);
void reverse_alternative_parts (CT);
-/*
- * Given a content structure, return true if the content has a disposition
- * of "inline".
- *
- * Arguments are:
- *
- * ct - Content structure to examine
- */
-int is_inline(CT ct) PURE;
-
/*
* Given a list of messages, display information about them on standard
* output.
void annolist(char *, char *, char *, int);
void annopreserve(int);
void m_pclose(void);
-int make_intermediates(char *);
int mhl(int, char **);
int mhlsbr(int, char **, FILE *(*)(char *));
int distout (char *, char *, char *);
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/utils.h>
+#include "mhmisc.h"
#include "../sbr/m_mktemp.h"
#include "../sbr/message_id.h"
#include "../sbr/mime_type.h"
} convert_list;
-/* mhmisc.c */
-void content_error (char *, CT, char *, ...);
-
/* mhcachesbr.c */
int find_cache (CT, int, int *, char *, char *, int);
#include <h/mhparse.h>
#include <h/mhcachesbr.h>
#include <h/utils.h>
+#include "mhmisc.h"
#include "../sbr/lock_file.h"
#include "../sbr/m_mktemp.h"
char *cache_public;
char *cache_private;
-
-/* mhmisc.c */
-int part_ok (CT);
-int type_ok (CT, int);
-void content_error (char *, CT, char *, ...);
-void flush_errors (void);
-
/*
* static prototypes
*/
#include "../sbr/m_maildir.h"
#include "../sbr/m_mktemp.h"
#include "../sbr/mime_type.h"
+#include "mhmisc.h"
#include "mhfree.h"
#include "mhoutsbr.h"
#include "mhshowsbr.h"
/* flags to/from parse_header_attrs */
extern int suppress_extraneous_trailing_semicolon_warning;
-/* mhmisc.c */
-void flush_errors (void);
-
/*
* static prototypes
*/
#include <h/mhparse.h>
#include <h/mhcachesbr.h>
#include <h/utils.h>
+#include "mhmisc.h"
#include "../sbr/m_maildir.h"
#include "mhfree.h"
/* mhparse.c */
CT parse_mime (char *);
-/* mhmisc.c */
-int part_ok (CT);
-int type_ok (CT, int);
-void flush_errors (void);
-
/*
* static prototypes
*/
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/utils.h>
-
-/* mhmisc.c */
-int part_ok (CT);
-int type_ok (CT, int);
-void flush_errors (void);
+#include "mhmisc.h"
/*
* static prototypes
#include <h/mhparse.h>
#include <h/utils.h>
#include "../sbr/makedir.h"
+#include "mhmisc.h"
extern int debugsw;
static char *errs = NULL;
-/*
- * prototypes
- */
-int part_ok (CT) PURE;
-int part_exact(CT ct) PURE;
-int type_ok (CT, int);
-void content_error (char *, CT, char *, ...) CHECK_PRINTF(3, 4);
-void flush_errors (void);
-
-
int
part_ok (CT ct)
{
/*
- * Returns true if this content is marked as "inline".
+ * Returns true if the content has a disposition of "inline".
*
* Technically we should check parent content to see if they have
* disposition to use as a default, but we don't right now. Maybe
--- /dev/null
+/* mhmisc.h -- misc routines to process MIME messages
+ *
+ * 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.
+ */
+
+int part_ok(CT) PURE;
+int part_exact(CT) PURE;
+int type_ok(CT, int);
+int is_inline(CT) PURE;
+int make_intermediates(char *);
+void content_error(char *, CT, char *, ...) CHECK_PRINTF(3, 4);
+void flush_errors(void);
#include <h/mhparse.h>
#include <h/mhcachesbr.h>
#include <h/utils.h>
+#include "mhmisc.h"
#include "../sbr/m_maildir.h"
#include "mhfree.h"
#include "mhshowsbr.h"
/* mhparse.c */
CT parse_mime (char *);
-/* mhmisc.c */
-int part_ok (CT);
-int type_ok (CT, int);
-void flush_errors (void);
-
/*
* static prototypes
*/
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/utils.h>
+#include "mhmisc.h"
#include <h/mhcachesbr.h>
#include "../sbr/m_mktemp.h"
#include "mhfree.h"
};
-/* mhmisc.c */
-int part_ok (CT);
-int type_ok (CT, int);
-void content_error (char *, CT, char *, ...);
-
/*
* static prototypes
*/
#include <h/mhparse.h>
#include <h/mhcachesbr.h>
#include <h/utils.h>
+#include "mhmisc.h"
#include "../sbr/m_maildir.h"
#include "../sbr/m_popen.h"
#include "mhfree.h"
/* mhparse.c */
CT parse_mime (char *);
-/* mhmisc.c */
-int part_ok (CT);
-int type_ok (CT, int);
-void flush_errors (void);
-
/*
* static prototypes
*/
#include <h/mhparse.h>
#include <h/fmt_scan.h>
#include <h/utils.h>
+#include "mhmisc.h"
#include "mhshowsbr.h"
#include "../sbr/m_mktemp.h"
#ifdef HAVE_ICONV
int headersw = -1;
-/* mhmisc.c */
-int part_ok (CT);
-int part_exact (CT);
-int type_ok (CT, int);
-void content_error (char *, CT, char *, ...);
-void flush_errors (void);
-
/*
* static prototypes
*/
#include <h/mhparse.h>
#include <h/mhcachesbr.h>
#include <h/utils.h>
+#include "mhmisc.h"
#include "../sbr/m_maildir.h"
#include "mhfree.h"
int debugsw = 0;
CT parse_mime (char *);
-/* mhmisc.c */
-int part_ok (CT);
-int type_ok (CT, int);
-void flush_errors (void);
-
/*
* static prototypes
*/
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/utils.h>
+#include "mhmisc.h"
#include "mhshowsbr.h"
#include "../sbr/m_maildir.h"
#include "../sbr/m_mktemp.h"
typedef int (*qsort_comp) (const void *, const void *);
-/* mhmisc.c */
-int part_ok (CT);
-int type_ok (CT, int);
-void flush_errors (void);
-
/*
* static prototypes
*/