X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/a43fb158d0c5c90291b792d683aa0221403f1893..4c76b7ec11ea4a4c4f121d6623ddec249e227899:/worm/worm.c diff --git a/worm/worm.c b/worm/worm.c index f0656c3c..2c166128 100644 --- a/worm/worm.c +++ b/worm/worm.c @@ -1,4 +1,4 @@ -/* $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 @@ -31,15 +31,15 @@ #include #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 */ @@ -80,10 +80,10 @@ int visible_len; 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); @@ -106,7 +106,8 @@ main(argc, argv) signal(SIGALRM, wake); signal(SIGINT, leave); signal(SIGQUIT, leave); - initscr(); + if (!initscr()) + errx(0, "couldn't initialize screen"); cbreak(); noecho(); #ifdef KEY_LEFT @@ -213,7 +214,7 @@ leave(dummy) void wake(dummy) - int dummy __attribute__((__unused__)); + int dummy __unused; { signal(SIGALRM, wake); fflush(stdout);