* mhfree.c -- routines to free the data structures used to
* -- represent MIME messages
*
- * $Id$
- *
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
#include <h/mime.h>
#include <h/mhparse.h>
-extern int errno;
+/* 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
free (ct->c_id);
if (ct->c_descr)
free (ct->c_descr);
+ if (ct->c_dispo)
+ free (ct->c_dispo);
if (ct->c_file) {
if (ct->c_unlink)
ct->c_ceopenfnx = NULL;
}
}
+
+
+void
+freects_done (int status)
+{
+ CT *ctp;
+
+ if ((ctp = cts))
+ for (; *ctp; ctp++)
+ free_content (*ctp);
+
+ exit (status);
+}