Module Name: src
Committed By: dholland
Date: Wed Aug 12 08:51:22 UTC 2009
Modified Files:
src/games/tetris: screen.c screen.h tetris.c tetris.h
Log Message:
sprinkle static
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/games/tetris/screen.c
cvs rdiff -u -r1.8 -r1.9 src/games/tetris/screen.h
cvs rdiff -u -r1.21 -r1.22 src/games/tetris/tetris.c
cvs rdiff -u -r1.11 -r1.12 src/games/tetris/tetris.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/games/tetris/screen.c
diff -u src/games/tetris/screen.c:1.23 src/games/tetris/screen.c:1.24
--- src/games/tetris/screen.c:1.23 Mon May 25 04:33:53 2009
+++ src/games/tetris/screen.c Wed Aug 12 08:51:21 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: screen.c,v 1.23 2009/05/25 04:33:53 dholland Exp $ */
+/* $NetBSD: screen.c,v 1.24 2009/08/12 08:51:21 dholland Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -70,7 +70,7 @@
/*
* Capabilities from TERMCAP.
*/
-short ospeed;
+extern short ospeed;
static char
*bcstr, /* backspace char */
@@ -94,7 +94,7 @@
MSflag; /* can move in standout mode */
-struct tcsinfo { /* termcap string info; some abbrevs above */
+static struct tcsinfo { /* termcap string info; some abbrevs above */
char tcname[3];
char **tcaddr;
} tcstrings[] = {
@@ -136,7 +136,7 @@
*/
#define putstr(s) (void)fputs(s, stdout)
-void
+static void
moveto(int r, int c)
{
char buf[256];
Index: src/games/tetris/screen.h
diff -u src/games/tetris/screen.h:1.8 src/games/tetris/screen.h:1.9
--- src/games/tetris/screen.h:1.8 Tue Jan 27 20:30:30 2004
+++ src/games/tetris/screen.h Wed Aug 12 08:51:21 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: screen.h,v 1.8 2004/01/27 20:30:30 jsm Exp $ */
+/* $NetBSD: screen.h,v 1.9 2009/08/12 08:51:21 dholland Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -45,7 +45,6 @@
*/
#define putpad(s) tputs(s, 1, put)
-void moveto(int, int);
int put(int); /* just calls putchar; for tputs */
void scr_clear(void);
void scr_end(void);
Index: src/games/tetris/tetris.c
diff -u src/games/tetris/tetris.c:1.21 src/games/tetris/tetris.c:1.22
--- src/games/tetris/tetris.c:1.21 Mon May 25 04:33:53 2009
+++ src/games/tetris/tetris.c Wed Aug 12 08:51:21 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: tetris.c,v 1.21 2009/05/25 04:33:53 dholland Exp $ */
+/* $NetBSD: tetris.c,v 1.22 2009/08/12 08:51:21 dholland Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -63,7 +63,7 @@
int Rows, Cols; /* current screen size */
-const struct shape *curshape;
+static const struct shape *curshape;
const struct shape *nextshape;
long fallrate; /* less than 1 million; smaller => faster */
@@ -74,11 +74,10 @@
char key_msg[100];
int showpreview;
-static void elide(void);
-static void setup_board(void);
- int main(int, char **);
- void onintr(int) __dead;
- void usage(void) __dead;
+static void elide(void);
+static void setup_board(void);
+static void onintr(int) __dead;
+static void usage(void) __dead;
/*
* Set up the initial board. The bottom display row is completely set,
@@ -318,7 +317,7 @@
exit(0);
}
-void
+static void
onintr(int signo __unused)
{
scr_clear();
@@ -326,7 +325,7 @@
exit(0);
}
-void
+static void
usage(void)
{
(void)fprintf(stderr, "usage: tetris [-ps] [-k keys] [-l level]\n");
Index: src/games/tetris/tetris.h
diff -u src/games/tetris/tetris.h:1.11 src/games/tetris/tetris.h:1.12
--- src/games/tetris/tetris.h:1.11 Mon May 25 04:33:53 2009
+++ src/games/tetris/tetris.h Wed Aug 12 08:51:21 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: tetris.h,v 1.11 2009/05/25 04:33:53 dholland Exp $ */
+/* $NetBSD: tetris.h,v 1.12 2009/08/12 08:51:21 dholland Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -130,7 +130,6 @@
extern const struct shape shapes[];
#define randshape() (&shapes[random() % 7])
-extern const struct shape *curshape;
extern const struct shape *nextshape;
/*