X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/0db4e9eaa147062611dd63e80e2a2df567d398ba..ed4e21fb32d214ed9c45d0bd4eac9d3dd8ee6c9d:/uip/mhfree.c diff --git a/uip/mhfree.c b/uip/mhfree.c index ec0f8d3b..1bb488d1 100644 --- a/uip/mhfree.c +++ b/uip/mhfree.c @@ -1,6 +1,4 @@ - -/* - * mhfree.c -- routines to free the data structures used to +/* mhfree.c -- routines to free the data structures used to * -- represent MIME messages * * This code is Copyright (c) 2002, by the authors of nmh. See the @@ -12,21 +10,16 @@ #include #include #include +#include "../sbr/m_mktemp.h" +#include "mhfree.h" /* The list of top-level contents to display */ CT *cts = NULL; -/* - * prototypes - */ -void free_header (CT); -void free_ctinfo (CT); -void free_encoding (CT, int); -void freects_done (int); - /* * static prototypes */ +static void free_header (CT); static void free_text (CT); static void free_multi (CT); static void free_partial (CT); @@ -77,7 +70,9 @@ free_content (CT ct) } break; - case CT_TEXT: + default: + /* Assume that the ct is for text. mhfixmsg(1) uses it for + decoding application content. */ free_text (ct); break; } @@ -124,7 +119,7 @@ free_content (CT ct) * for this content. */ -void +static void free_header (CT ct) { HF hp1, hp2; @@ -169,7 +164,7 @@ free_text (CT ct) if (!(t = (struct text *) ct->c_ctparams)) return; - free ((char *) t); + free(t); ct->c_ctparams = NULL; } @@ -191,11 +186,11 @@ free_multi (CT ct) for (part = m->mp_parts; part; part = next) { next = part->mp_next; free_content (part->mp_part); - free ((char *) part); + free(part); } m->mp_parts = NULL; - free ((char *) m); + free(m); ct->c_ctparams = NULL; } @@ -210,7 +205,7 @@ free_partial (CT ct) mh_xfree(p->pm_partid); - free ((char *) p); + free(p); ct->c_ctparams = NULL; } @@ -226,7 +221,7 @@ free_external (CT ct) free_content (e->eb_content); mh_xfree(e->eb_body); mh_xfree(e->eb_url); - free ((char *) e); + free(e); ct->c_ctparams = NULL; } @@ -279,7 +274,7 @@ free_encoding (CT ct, int toplevel) } -void +void NORETURN freects_done (int status) { CT *ctp;