projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1) Don't bother checking stderr output from sendfiles because tar's
[mmh]
/
uip
/
mhfree.c
diff --git
a/uip/mhfree.c
b/uip/mhfree.c
index
aef86cd
..
38b830e
100644
(file)
--- a/
uip/mhfree.c
+++ b/
uip/mhfree.c
@@
-3,7
+3,9
@@
* mhfree.c -- routines to free the data structures used to
* -- represent MIME messages
*
* 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/mh.h>
*/
#include <h/mh.h>
@@
-11,7
+13,8
@@
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/mime.h>
#include <h/mhparse.h>
-extern int errno;
+/* The list of top-level contents to display */
+CT *cts = NULL;
/*
* prototypes
/*
* prototypes
@@
-20,6
+23,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
@@
-99,6
+103,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)
@@
-267,6
+273,7
@@
free_encoding (CT ct, int toplevel)
if (ce->ce_unlink)
unlink (ce->ce_file);
free (ce->ce_file);
if (ce->ce_unlink)
unlink (ce->ce_file);
free (ce->ce_file);
+ ce->ce_file = NULL;
}
if (toplevel) {
}
if (toplevel) {
@@
-276,3
+283,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);
+}