diff options
author | 1999-02-10 12:29:47 +0000 | |
---|---|---|
committer | 1999-02-10 12:29:47 +0000 | |
commit | f2e552ba9ea473d3399e7b124077a7e4a856138b (patch) | |
tree | ce3f13ceac941baa50c07a090d8cbd73be7fda90 /backgammon/common_source/back.h | |
parent | 19bd733c3aad11dcfb4bbcf06abf79ff64442032 (diff) | |
download | bsdgames-darwin-f2e552ba9ea473d3399e7b124077a7e4a856138b.tar.gz bsdgames-darwin-f2e552ba9ea473d3399e7b124077a7e4a856138b.tar.zst bsdgames-darwin-f2e552ba9ea473d3399e7b124077a7e4a856138b.zip |
The patch below makes the game backgammon(6) use `const' where
appropriate. It also removes some obsolete, unused code to check the
number of users on the system (obsoleted by dm); removes a prototype
for an unused function that was removed earlier; and removes a control
character from one message that was I think intended to clear the
screen on some particular terminal (though I can't find the comment to
that effect in any of the BSD source trees I have handy) but no longer
serves any useful purpose.
From PR 6580 by Joseph Myers <jsm28@cam.ac.uk>.
Also contains two more patches, one in teachgammon/tutor.h (by Joseph)
and one in common_source/fancy.c (by me).
Diffstat (limited to 'backgammon/common_source/back.h')
-rw-r--r-- | backgammon/common_source/back.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/backgammon/common_source/back.h b/backgammon/common_source/back.h index 8121dfea..f507061e 100644 --- a/backgammon/common_source/back.h +++ b/backgammon/common_source/back.h @@ -1,4 +1,4 @@ -/* $NetBSD: back.h,v 1.9 1998/09/13 15:31:07 hubertf Exp $ */ +/* $NetBSD: back.h,v 1.10 1999/02/10 12:29:47 hubertf Exp $ */ /* * Copyright (c) 1980, 1993 @@ -65,8 +65,8 @@ * */ -extern char EXEC[]; /* object for main program */ -extern char TEACH[]; /* object for tutorial program */ +extern const char EXEC[]; /* object for main program */ +extern const char TEACH[]; /* object for tutorial program */ extern int pnum; /* color of player: -1 = white @@ -120,10 +120,10 @@ extern char cin[100]; /* input line of current move (used for reconstructing input after a backspace) */ -extern char *color[]; +extern const char *const color[]; /* colors as strings */ -extern char **colorptr; /* color of current player */ -extern char **Colorptr; /* color of current player, capitalized */ +extern const char *const *colorptr; /* color of current player */ +extern const char *const *Colorptr; /* color of current player, capitalized */ extern int colen; /* length of color of current player */ extern struct termios old, noech, raw;/* original tty status */ @@ -153,7 +153,7 @@ void fixcol __P((int, int, int, int, int)); void fixpos __P((int, int, int, int, int)); void fixtty __P((struct termios *)); void getarg __P((char ***)); -int getcaps __P((char *)); +int getcaps __P((const char *)); void getmove __P((void)); void getout __P((int)) __attribute__((__noreturn__)); void gwrite __P((void)); @@ -168,23 +168,22 @@ int movokay __P((int)); void newline __P((void)); void newpos __P((void)); void nexturn __P((void)); -void norec __P((char *)); +void norec __P((const char *)); void odds __P((int, int, int)); void proll __P((void)); int quit __P((void)); int readc __P((void)); -void recover __P((char *)); +void recover __P((const char *)); void refresh __P((void)); void roll __P((void)); int rsetbrd __P((void)); void save __P((int)); -int text __P((char **)); -void tos __P((void)); +int text __P((const char *const *)); void wrboard __P((void)); void wrbsub __P((void)); void wrhit __P((int)); void wrint __P((int)); void writec __P((char)); -void writel __P((char *)); +void writel __P((const char *)); void wrscore __P((void)); int yorn __P((char)); |