This is sample program from “Beginning Linux Programming” book: #include <stdio.h> #include <term.h> #include <curses.h> #include <stdlib.h> int main() { setupterm(“unlisted”, fileno(stdout), (int *)0); printf(“Done.n”); exit(0); } Running it, I have this result: ./badterm ‘unlisted’: unknown terminal type. According to setupterm function definition, it must return 0: “No matching entry in terminfo database”. Instead of this, program terminates. Why? Answer