diff options
author | Paul Janzen <pjanzen@cvs.openbsd.org> | 2000-01-03 23:22:46 +0000 |
---|---|---|
committer | Paul Janzen <pjanzen@cvs.openbsd.org> | 2000-01-03 23:22:46 +0000 |
commit | a31b171dfd7f71d553c9d0de07cd522cc0f01af1 (patch) | |
tree | 5f5c671810f8b9a2b289a8876c9e469e83d99609 /games/sail | |
parent | 9b341581567ed520fee8acba214a2b6fbe454ba5 (diff) |
extern rather than linker commons; jsm@netbsd.org
Diffstat (limited to 'games/sail')
-rw-r--r-- | games/sail/extern.h | 36 | ||||
-rw-r--r-- | games/sail/globals.c | 25 | ||||
-rw-r--r-- | games/sail/pl_7.c | 20 | ||||
-rw-r--r-- | games/sail/player.h | 30 |
4 files changed, 74 insertions, 37 deletions
diff --git a/games/sail/extern.h b/games/sail/extern.h index df1efb84510..e239cb3cccc 100644 --- a/games/sail/extern.h +++ b/games/sail/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.2 1999/01/18 21:53:22 pjanzen Exp $ */ +/* $OpenBSD: extern.h,v 1.3 2000/01/03 23:22:41 pjanzen Exp $ */ /* $NetBSD: extern.h,v 1.8 1998/09/13 15:27:30 hubertf Exp $ */ /* @@ -49,21 +49,21 @@ #endif /* program mode */ -int mode; -jmp_buf restart; +extern int mode; +extern jmp_buf restart; #define MODE_PLAYER 1 #define MODE_DRIVER 2 #define MODE_LOGGER 3 /* command line flags */ -char debug; /* -D */ -char randomize; /* -x, give first available ship */ -char longfmt; /* -l, print score in long format */ -char nobells; /* -b, don't ring bell before Signal */ +extern char debug; /* -D */ +extern char randomize; /* -x, give first available ship */ +extern char longfmt; /* -l, print score in long format */ +extern char nobells; /* -b, don't ring bell before Signal */ /* other initial modes */ -gid_t gid; -gid_t egid; +extern gid_t gid; +extern gid_t egid; #define die() ((random() >> 3) % 6 + 1) #define sqr(a) ((a) * (a)) @@ -264,8 +264,8 @@ struct shipspecs { }; extern struct shipspecs specs[]; -struct scenario *cc; /* the current scenario */ -struct ship *ls; /* &cc->ship[cc->vessels] */ +extern struct scenario *cc; /* the current scenario */ +extern struct ship *ls; /* &cc->ship[cc->vessels] */ #define SHIP(s) (&cc->ship[s]) #define foreachship(sp) for ((sp) = cc->ship; (sp) < ls; (sp)++) @@ -297,13 +297,13 @@ extern const char rangeofshot[]; extern const char dr[], dc[]; -int winddir; -int windspeed; -int turn; -int game; -int alive; -int people; -char hasdriver; +extern int winddir; +extern int windspeed; +extern int turn; +extern int game; +extern int alive; +extern int people; +extern char hasdriver; /* assorted.c */ void table __P((int, int, int, struct ship *, struct ship *, int)); diff --git a/games/sail/globals.c b/games/sail/globals.c index ce09b9476ca..15e46ebac01 100644 --- a/games/sail/globals.c +++ b/games/sail/globals.c @@ -1,4 +1,4 @@ -/* $OpenBSD: globals.c,v 1.4 1999/01/18 06:20:52 pjanzen Exp $ */ +/* $OpenBSD: globals.c,v 1.5 2000/01/03 23:22:41 pjanzen Exp $ */ /* $NetBSD: globals.c,v 1.4 1995/04/22 10:36:57 cgd Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)globals.c 8.2 (Berkeley) 4/28/95"; #else -static char rcsid[] = "$OpenBSD: globals.c,v 1.4 1999/01/18 06:20:52 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: globals.c,v 1.5 2000/01/03 23:22:41 pjanzen Exp $"; #endif #endif /* not lint */ @@ -547,3 +547,24 @@ const char loadname[] = { '-', 'G', 'C', 'R', 'D', 'E' }; const char dr[] = { 0, 1, 1, 0, -1, -1, -1, 0, 1 }; const char dc[] = { 0, 0, -1, -1, -1, 0, 1, 1, 1 }; + +int mode; +jmp_buf restart; + +char debug; /* -D */ +char randomize; /* -x, give first available ship */ +char longfmt; /* -l, print score in long format */ +char nobells; /* -b, don't ring bell before Signal */ + +gid_t gid, egid; + +struct scenario *cc; /* the current scenario */ +struct ship *ls; /* &cc->ship[cc->vessels] */ + +int winddir; +int windspeed; +int turn; +int game; +int alive; +int people; +char hasdriver; diff --git a/games/sail/pl_7.c b/games/sail/pl_7.c index cda98867c30..87032aacb48 100644 --- a/games/sail/pl_7.c +++ b/games/sail/pl_7.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pl_7.c,v 1.2 1999/01/18 06:20:53 pjanzen Exp $ */ +/* $OpenBSD: pl_7.c,v 1.3 2000/01/03 23:22:41 pjanzen Exp $ */ /* $NetBSD: pl_7.c,v 1.6 1995/04/22 10:37:17 cgd Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)pl_7.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: pl_7.c,v 1.2 1999/01/18 06:20:53 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: pl_7.c,v 1.3 2000/01/03 23:22:41 pjanzen Exp $"; #endif #endif /* not lint */ @@ -62,6 +62,22 @@ static const char *sc_prompt; static const char *sc_buf; static int sc_line; +WINDOW *view_w; +WINDOW *slot_w; +WINDOW *scroll_w; +WINDOW *stat_w; +WINDOW *turn_w; + +char done_curses; +char loaded, fired, changed, repaired; +char dont_adjust; +int viewrow, viewcol; +char movebuf[sizeof SHIP(0)->file->movebuf]; +int player; +struct ship *ms; /* memorial structure, &cc->ship[player] */ +struct File *mf; /* ms->file */ +struct shipspecs *mc; /* ms->specs */ + void initscreen() { diff --git a/games/sail/player.h b/games/sail/player.h index 8fb605218e2..65c958f1211 100644 --- a/games/sail/player.h +++ b/games/sail/player.h @@ -1,4 +1,4 @@ -/* $OpenBSD: player.h,v 1.5 1999/01/18 06:20:53 pjanzen Exp $ */ +/* $OpenBSD: player.h,v 1.6 2000/01/03 23:22:41 pjanzen Exp $ */ /* $NetBSD: player.h,v 1.4 1995/04/22 10:37:22 cgd Exp $ */ /* @@ -99,22 +99,22 @@ #define SCREENTEST() (initscr() != NULL && STAT_R < COLS && SCROLL_Y > 0) #endif -WINDOW *view_w; -WINDOW *slot_w; -WINDOW *scroll_w; -WINDOW *stat_w; -WINDOW *turn_w; +extern WINDOW *view_w; +extern WINDOW *slot_w; +extern WINDOW *scroll_w; +extern WINDOW *stat_w; +extern WINDOW *turn_w; -char done_curses; -char loaded, fired, changed, repaired; -char dont_adjust; -int viewrow, viewcol; -char movebuf[sizeof SHIP(0)->file->movebuf]; +extern char done_curses; +extern char loaded, fired, changed, repaired; +extern char dont_adjust; +extern int viewrow, viewcol; +extern char movebuf[sizeof SHIP(0)->file->movebuf]; extern char version[]; -int player; -struct ship *ms; /* memorial structure, &cc->ship[player] */ -struct File *mf; /* ms->file */ -struct shipspecs *mc; /* ms->specs */ +extern int player; +extern struct ship *ms; /* memorial structure, &cc->ship[player] */ +extern struct File *mf; /* ms->file */ +extern struct shipspecs *mc; /* ms->specs */ /* condition codes for leave() */ #define LEAVE_QUIT 0 |