projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove duplicate sm_fgetc() declaration
[mmh]
/
uip
/
mhfree.c
diff --git
a/uip/mhfree.c
b/uip/mhfree.c
index
9d064ba
..
df0ee46
100644
(file)
--- a/
uip/mhfree.c
+++ b/
uip/mhfree.c
@@
-15,6
+15,9
@@
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/mime.h>
#include <h/mhparse.h>
+/* The list of top-level contents to display */
+CT *cts = NULL;
+
/*
* prototypes
*/
/*
* prototypes
*/
@@
-22,6
+25,7
@@
void free_content (CT);
void free_header (CT);
void free_ctinfo (CT);
void free_encoding (CT, int);
void free_header (CT);
void free_ctinfo (CT);
void free_encoding (CT, int);
+void freects_done (int);
/*
* static prototypes
/*
* static prototypes
@@
-101,6
+105,8
@@
free_content (CT ct)
free (ct->c_id);
if (ct->c_descr)
free (ct->c_descr);
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)
if (ct->c_file) {
if (ct->c_unlink)
@@
-279,3
+285,16
@@
free_encoding (CT ct, int toplevel)
ct->c_ceopenfnx = NULL;
}
}
ct->c_ceopenfnx = NULL;
}
}
+
+
+void
+freects_done (int status)
+{
+ CT *ctp;
+
+ if ((ctp = cts))
+ for (; *ctp; ctp++)
+ free_content (*ctp);
+
+ exit (status);
+}