Various cleanups.

* Remove disused macro.
* GCC doesn't seem to mind if IGNORE() is left off.
* Enumify phase codes.
* Use EXIT_* macros in all exit() calls.
* How did this even work without extern?
* Give advent.h a much-needed makeover.
* Use the chomp indicator in YAML string blocks to avoid code ugliness.
This commit is contained in:
Jason S. Ninneman 2017-06-30 13:51:03 -07:00 committed by Eric S. Raymond
parent 31f27b672c
commit 8bc08773fa
7 changed files with 186 additions and 201 deletions

6
main.c
View file

@ -13,7 +13,7 @@
* and for the offensive globals. Applying the Structured Program
* Theorem can be hard.
*/
#define DEFINE_GLOBALS_FROM_INCLUDES
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
@ -42,7 +42,7 @@ static void sig_handler(int signo)
if (logfp != NULL)
fflush(logfp);
}
exit(0);
exit(EXIT_FAILURE);
}
// LCOV_EXCL_STOP
@ -113,7 +113,7 @@ int main(int argc, char *argv[])
#endif
fprintf(stderr,
" -s suppress command editing\n");
exit(-1);
exit(EXIT_FAILURE);
break;
}
}