X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhfree.c;h=df0ee4658eb3f6af5c91c7502da3b3468b8cfe67;hp=abaeb2bd8ffe242d636628c38fd4ed99e641e91f;hb=d8916ff5d389de5ab225cd6f40aeda1b285d0f28;hpb=1513f7668c494c4583141d6115669b7198c14556 diff --git a/uip/mhfree.c b/uip/mhfree.c index abaeb2b..df0ee46 100644 --- a/uip/mhfree.c +++ b/uip/mhfree.c @@ -15,6 +15,9 @@ #include #include +/* The list of top-level contents to display */ +CT *cts = NULL; + /* * prototypes */ @@ -22,6 +25,7 @@ void free_content (CT); void free_header (CT); void free_ctinfo (CT); void free_encoding (CT, int); +void freects_done (int); /* * static prototypes @@ -281,3 +285,16 @@ free_encoding (CT ct, int toplevel) ct->c_ceopenfnx = NULL; } } + + +void +freects_done (int status) +{ + CT *ctp; + + if ((ctp = cts)) + for (; *ctp; ctp++) + free_content (*ctp); + + exit (status); +}