screen.c: Get rid of global state