1 2 3 4 5 6 7 8 9 10 11
#include <stdio.h> #include <stdlib.h> #include <stdnoreturn.h> #include <ncurses.h> noreturn void die(const char *s) { endwin(); perror(s); exit(EXIT_FAILURE); }