Implement mu_onexit functions; use MU stdstream in mh and mimeview.
* include/mailutils/types.hin (mu_onexit_t): New typedef. * include/mailutils/util.h (mu_onexit_reset, mu_onexit): New protos. * libmailutils/base/onexit.c: New file. * libmailutils/base/Makefile.am (libbase_la_SOURCES): Add onexit.c * libmailutils/stdstream/basestr.c (stdstream_flushall): New function. (mu_stdstream_setup): Rewrite the fd checking algorithm. Register stdstream_flushall as an onexit function. * mh/anno.c: Use MU stdstream. * mh/mh.h: Include mailutils/stdstream.h. * mh/mh_init.c (mh_init): Call mu_stdstream_setup; use MU stdstream. * mh/mh_whatnow.c (_whatnow): Use MU stdstream. * mh/mhl.c (open_output,list_message): Likewise. * mh/mhn.c (mhn_show,store_handler): Likewise. * pop3d/popauth.c: Use MU stdstream. * mimeview/mimetypes.y: Use MU stdstream. * mimeview/mimeview.c: Likewise. (mimeview_fp): Remove. (mimeview_stream): New variable. * mimeview/mimeview.h (mimeview_fp): Remove. (mimeview_stream): New variable. * lib/mailcap.c (find_entry): Don't report ENOENT.
Showing
16 changed files
with
284 additions
and
187 deletions
libmailutils/base/onexit.c
0 → 100644
-
Please register or sign in to post a comment