summaryrefslogtreecommitdiffstats
path: root/tetris
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2009-08-12 08:44:45 +0000
committerdholland <dholland@NetBSD.org>2009-08-12 08:44:45 +0000
commit39a1066cab493ece48c6e692513d1311b7e27c44 (patch)
treea896a49b2b5b09b9763d953ea2ce9ec0e813beb3 /tetris
parent4fa17c6f9afc7c76d0350d5d9e5996391aa18137 (diff)
downloadbsdgames-darwin-39a1066cab493ece48c6e692513d1311b7e27c44.tar.gz
bsdgames-darwin-39a1066cab493ece48c6e692513d1311b7e27c44.tar.zst
bsdgames-darwin-39a1066cab493ece48c6e692513d1311b7e27c44.zip
sprinkle static
Diffstat (limited to 'tetris')
-rw-r--r--tetris/screen.c8
-rw-r--r--tetris/screen.h3
-rw-r--r--tetris/tetris.c17
-rw-r--r--tetris/tetris.h3
4 files changed, 14 insertions, 17 deletions
diff --git a/tetris/screen.c b/tetris/screen.c
index edbcddf9..38efd686 100644
--- a/tetris/screen.c
+++ b/tetris/screen.c
@@ -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 @@ static void stopset(int) __dead;
/*
* Capabilities from TERMCAP.
*/
-short ospeed;
+extern short ospeed;
static char
*bcstr, /* backspace char */
@@ -94,7 +94,7 @@ static int
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 @@ put(int c)
*/
#define putstr(s) (void)fputs(s, stdout)
-void
+static void
moveto(int r, int c)
{
char buf[256];
diff --git a/tetris/screen.h b/tetris/screen.h
index 99779e07..c0b39053 100644
--- a/tetris/screen.h
+++ b/tetris/screen.h
@@ -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 @@ extern char *SOstr; /* begin standout mode */
*/
#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);
diff --git a/tetris/tetris.c b/tetris/tetris.c
index 69b2312f..9584026a 100644
--- a/tetris/tetris.c
+++ b/tetris/tetris.c
@@ -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 @@ cell board[B_SIZE]; /* 1 => occupied, 0 => empty */
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 @@ gid_t gid, egid;
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 @@ main(int argc, char *argv[])
exit(0);
}
-void
+static void
onintr(int signo __unused)
{
scr_clear();
@@ -326,7 +325,7 @@ onintr(int signo __unused)
exit(0);
}
-void
+static void
usage(void)
{
(void)fprintf(stderr, "usage: tetris [-ps] [-k keys] [-l level]\n");
diff --git a/tetris/tetris.h b/tetris/tetris.h
index 35a70a3c..37f0d9ba 100644
--- a/tetris/tetris.h
+++ b/tetris/tetris.h
@@ -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 @@ struct shape {
extern const struct shape shapes[];
#define randshape() (&shapes[random() % 7])
-extern const struct shape *curshape;
extern const struct shape *nextshape;
/*