From: Ralph Corderoy Date: Thu, 21 Sep 2017 15:59:15 +0000 (+0100) Subject: Detect function-pointer `done' being set twice in a row. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/2b83f27e1980a6c5de752bd55c0ff76f53ec15f6?hp=2b83f27e1980a6c5de752bd55c0ff76f53ec15f6 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. ---