-} *head, *tail, goody;
-int growing = 0;
-int running = 0;
-int slow = 0;
-int score = 0;
-int start_len = LENGTH;
-int lastch;
-char outbuf[BUFSIZ];
-
-void crash __P((void)) __attribute__((__noreturn__));
-void display __P((const struct body *, char));
-int main __P((int, char **));
-void leave __P((int)) __attribute__((__noreturn__));
-void life __P((void));
-void newpos __P((struct body *));
-void process __P((int));
-void prize __P((void));
-int rnd __P((int));
-void setup __P((void));
-void wake __P((int));
+};
+
+static WINDOW *tv;
+static WINDOW *stw;
+static struct body *head, *tail, goody;
+static int growing = 0;
+static int running = 0;
+static int slow = 0;
+static int score = 0;
+static int start_len = LENGTH;
+static int visible_len;
+static int lastch;
+static char outbuf[BUFSIZ];
+
+int main(int, char **);
+static void crash(void) __dead;
+static void display(const struct body *, char);
+static void leave(int) __dead;
+static void life(void);
+static void newpos(struct body *);
+static void process(int);
+static void prize(void);
+static int rnd(int);
+static void setup(void);
+static void wake(int);
+
+static struct body *
+newlink(void)
+{
+ struct body *b;
+
+ b = malloc(sizeof(*b));
+ if (b == NULL) {
+ err(EXIT_FAILURE, NULL);
+ }
+ return b;
+}