]> diplodocus.org Git - nmh/commit
Detect function-pointer `done' being set twice in a row.
authorRalph Corderoy <ralph@inputplus.co.uk>
Thu, 21 Sep 2017 15:59:15 +0000 (16:59 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Thu, 21 Sep 2017 15:59:15 +0000 (16:59 +0100)
commit2b83f27e1980a6c5de752bd55c0ff76f53ec15f6
tree9a92ba7497938a210592af5765515163eae265df
parent1da3cc1c0b20a17997b4a1dd255016d6c801abf5
Detect function-pointer `done' being set twice in a row.

Make `done' a function that uses a file-static function pointer, and add
set_done() to alter it.  That wants either the old or new value to be
exit(3).  If it's not, it still alters the stored pointer, to maintain
the existing behaviour, but emits a warning on stderr.  mhbuild(1)
triggers that warning, making this hunch worthwhile.
62 files changed:
Makefile.am
h/done.h [new file with mode: 0644]
h/mh.h
sbr/done.c
sbr/error.c
sbr/m_draft.c
sbr/push.c
uip/ali.c
uip/anno.c
uip/ap.c
uip/burst.c
uip/comp.c
uip/dist.c
uip/dp.c
uip/flist.c
uip/fmtdump.c
uip/fmttest.c
uip/folder.c
uip/forw.c
uip/inc.c
uip/install-mh.c
uip/mark.c
uip/mhbuild.c
uip/mhbuildsbr.c
uip/mhfixmsg.c
uip/mhical.c
uip/mhl.c
uip/mhlist.c
uip/mhlogin.c
uip/mhlsbr.c
uip/mhn.c
uip/mhparam.c
uip/mhpath.c
uip/mhshow.c
uip/mhshowsbr.c
uip/mhstore.c
uip/mkstemp.c
uip/msgchk.c
uip/new.c
uip/packf.c
uip/pick.c
uip/post.c
uip/prompter.c
uip/rcvdist.c
uip/rcvpack.c
uip/rcvstore.c
uip/rcvtty.c
uip/refile.c
uip/repl.c
uip/replsbr.c
uip/rmf.c
uip/rmm.c
uip/scan.c
uip/send.c
uip/sendsbr.c
uip/show.c
uip/slocal.c
uip/sortm.c
uip/viamail.c
uip/whatnowproc.c
uip/whatnowsbr.c
uip/whom.c