-/* $NetBSD: worm.c,v 1.25 2004/01/27 20:30:31 jsm Exp $ */
+/* $NetBSD: worm.c,v 1.28 2008/08/08 16:10:47 drochner Exp $ */
/*
* Copyright (c) 1980, 1993
#include <sys/cdefs.h>
#ifndef lint
-__COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
- The Regents of the University of California. All rights reserved.\n");
+__COPYRIGHT("@(#) Copyright (c) 1980, 1993\
+ The Regents of the University of California. All rights reserved.");
#endif /* not lint */
#ifndef lint
#if 0
static char sccsid[] = "@(#)worm.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: worm.c,v 1.25 2004/01/27 20:30:31 jsm Exp $");
+__RCSID("$NetBSD: worm.c,v 1.28 2008/08/08 16:10:47 drochner Exp $");
#endif
#endif /* not lint */
int lastch;
char outbuf[BUFSIZ];
-void crash(void) __attribute__((__noreturn__));
+void crash(void) __dead;
void display(const struct body *, char);
int main(int, char **);
-void leave(int) __attribute__((__noreturn__));
+void leave(int) __dead;
void life(void);
void newpos(struct body *);
void process(int);
signal(SIGALRM, wake);
signal(SIGINT, leave);
signal(SIGQUIT, leave);
- initscr();
+ if (!initscr())
+ errx(0, "couldn't initialize screen");
cbreak();
noecho();
#ifdef KEY_LEFT
void
wake(dummy)
- int dummy __attribute__((__unused__));
+ int dummy __unused;
{
signal(SIGALRM, wake);
fflush(stdout);