From 39a1066cab493ece48c6e692513d1311b7e27c44 Mon Sep 17 00:00:00 2001 From: dholland Date: Wed, 12 Aug 2009 08:44:45 +0000 Subject: sprinkle static --- tetris/screen.c | 8 ++++---- tetris/screen.h | 3 +-- tetris/tetris.c | 17 ++++++++--------- tetris/tetris.h | 3 +-- 4 files changed, 14 insertions(+), 17 deletions(-) (limited to 'tetris') 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; /* -- cgit v1.2.3-56-ge451