Module Name:    src
Committed By:   dholland
Date:           Wed Aug 12 08:56:41 UTC 2009

Modified Files:
        src/games/worm: worm.c

Log Message:
sprinkle static


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/games/worm/worm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/worm/worm.c
diff -u src/games/worm/worm.c:1.28 src/games/worm/worm.c:1.29
--- src/games/worm/worm.c:1.28	Fri Aug  8 16:10:47 2008
+++ src/games/worm/worm.c	Wed Aug 12 08:56:41 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: worm.c,v 1.28 2008/08/08 16:10:47 drochner Exp $	*/
+/*	$NetBSD: worm.c,v 1.29 2009/08/12 08:56:41 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)worm.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: worm.c,v 1.28 2008/08/08 16:10:47 drochner Exp $");
+__RCSID("$NetBSD: worm.c,v 1.29 2009/08/12 08:56:41 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -63,34 +63,36 @@
 #define RUNLEN 8
 #define CNTRL(p) (p-'A'+1)
 
-WINDOW *tv;
-WINDOW *stw;
 struct body {
 	int x;
 	int y;
 	struct body *prev;
 	struct body *next;
-} *head, *tail, goody;
-int growing = 0;
-int running = 0;
-int slow = 0;
-int score = 0;
-int start_len = LENGTH;
-int visible_len;
-int lastch;
-char outbuf[BUFSIZ];
+};
+
+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];
 
-void	crash(void) __dead;
-void	display(const struct body *, char);
 int	main(int, char **);
-void	leave(int) __dead;
-void	life(void);
-void	newpos(struct body *);
-void	process(int);
-void	prize(void);
-int	rnd(int);
-void	setup(void);
-void	wake(int);
+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);
 
 int
 main(argc, argv)
@@ -155,7 +157,7 @@
 	}
 }
 
-void
+static void
 life()
 {
 	struct body *bp, *np;
@@ -190,7 +192,7 @@
 	visible_len = start_len + 1;
 }
 
-void
+static void
 display(pos, chr)
 	const struct body *pos;
 	char chr;
@@ -199,7 +201,7 @@
 	waddch(tv, chr);
 }
 
-void
+static void
 leave(dummy)
 	int dummy;
 {
@@ -212,7 +214,7 @@
 	exit(0);
 }
 
-void
+static void
 wake(dummy)
 	int dummy __unused;
 {
@@ -221,14 +223,14 @@
 	process(lastch);
 }
 
-int
+static int
 rnd(range)
 	int range;
 {
 	return abs((rand()>>5)+(rand()>>5)) % range;
 }
 
-void
+static void
 newpos(bp)
 	struct body * bp;
 {
@@ -246,7 +248,7 @@
 	} while(winch(tv) != ' ');
 }
 
-void
+static void
 prize()
 {
 	int value;
@@ -257,7 +259,7 @@
 	wrefresh(tv);
 }
 
-void
+static void
 process(ch)
 	int ch;
 {
@@ -352,13 +354,13 @@
 		alarm(1);
 }
 
-void
+static void
 crash()
 {
 	leave(0);
 }
 
-void
+static void
 setup()
 {
 	clear();

Reply via email to