diff options
author | Paul Janzen <pjanzen@cvs.openbsd.org> | 2003-05-19 07:58:01 +0000 |
---|---|---|
committer | Paul Janzen <pjanzen@cvs.openbsd.org> | 2003-05-19 07:58:01 +0000 |
commit | 1106f6aedd6c1a74c7c09ba7b9a331733f63c012 (patch) | |
tree | 4a5dc436e4b26543b43911f0e5c197ff1f81da97 /games | |
parent | d2ed9c3749d49b686fce708eeb65427fbd1835f1 (diff) |
ANSI
Diffstat (limited to 'games')
-rw-r--r-- | games/worm/worm.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/games/worm/worm.c b/games/worm/worm.c index 9de4db5d136..b55028db1ac 100644 --- a/games/worm/worm.c +++ b/games/worm/worm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: worm.c,v 1.19 2003/05/19 07:53:54 pjanzen Exp $ */ +/* $OpenBSD: worm.c,v 1.20 2003/05/19 07:58:00 pjanzen Exp $ */ /* * Copyright (c) 1980, 1993 @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)worm.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: worm.c,v 1.19 2003/05/19 07:53:54 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: worm.c,v 1.20 2003/05/19 07:58:00 pjanzen Exp $"; #endif #endif /* not lint */ @@ -101,9 +101,7 @@ void setup(void); void suspend(int); int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { int retval; struct timeval t, tod; @@ -214,31 +212,26 @@ life() } void -display(pos, chr) - struct body *pos; - char chr; +display(struct body *pos, char chr) { wmove(tv, pos->y, pos->x); waddch(tv, chr); } void -leave(dummy) - int dummy; +leave(int dummy) { wantleave = 1; } int -rnd(range) - int range; +rnd(int range) { return random() % range; } void -newpos(bp) - struct body * bp; +newpos(struct body *bp) { if (visible_len == (LINES-3) * (COLS-3) - 1) { endwin(); @@ -264,8 +257,7 @@ prize() } void -process(ch) - int ch; +process(int ch) { int x,y; struct body *nh; @@ -368,8 +360,7 @@ crash() } void -suspend(dummy) - int dummy; +suspend(int dummy) { wantsuspend = 1; } |