-/* $NetBSD: mille.h,v 1.7 1997/10/12 00:54:11 lukem Exp $ */
+/* $NetBSD: mille.h,v 1.12 2003/08/07 09:37:25 agc Exp $ */
/*
* Copyright (c) 1982, 1993
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* safety descriptions
*/
+# undef S_UNKNOWN
+# undef S_IN_HAND
+# undef S_PLAYED
+# undef S_GAS_SAFE
+# undef S_SPARE_SAFE
+# undef S_DRIVE_SAFE
+# undef S_RIGHT_WAY
+# undef S_CONV
# define S_UNKNOWN 0 /* location of safety unknown */
# define S_IN_HAND 1 /* safety in player's hand */
# define S_PLAYED 2 /* safety has been played */
# define nextplay() (Play = other(Play))
# define nextwin(x) (1 - x)
# define opposite(x) (Opposite[x])
-# define issafety(x) (x >= C_GAS_SAFE)
+# define is_safety(x) (x >= C_GAS_SAFE)
/*
* externals
extern bool Debug, Finished, Next, On_exit, Order, Saved;
-extern char *C_fmt, **C_name, *Fromfile, Initstr[];
+extern char Initstr[];
+extern const char *C_fmt, *const *C_name, *Fromfile;
-extern int Card_no, End, Handstart, Movetype, Numcards[], Numgos,
- Numneed[], Numseen[NUM_CARDS], Play, Value[], Window;
+extern int Card_no, End, Handstart, Movetype, Numgos,
+ Numneed[], Numseen[NUM_CARDS], Play, Window;
+extern const int Numcards[], Value[];
-extern CARD Deck[DECK_SZ], Discard, Opposite[NUM_CARDS], Sh_discard,
- *Topcard;
+extern CARD Deck[DECK_SZ], Discard, Sh_discard, *Topcard;
+extern const CARD Opposite[NUM_CARDS];
extern FILE *outf;
void account __P((CARD));
void calcmove __P((void));
-int canplay __P((PLAY *, PLAY *, CARD));
+int canplay __P((const PLAY *, const PLAY *, CARD));
int check_ext __P((bool));
void check_go __P((void));
void check_more __P((void));
-void die __P((int));
+void die __P((int)) __attribute__((__noreturn__));
void domove __P((void));
-bool error __P((char *, ...));
+bool error __P((const char *, ...));
void extrapolate __P((PLAY *));
void finalscore __P((PLAY *));
CARD getcard __P((void));
void getmove __P((void));
int getyn __P((int));
-int haspicked __P((PLAY *));
+int haspicked __P((const PLAY *));
void init __P((void));
-int isrepair __P((CARD));
+int is_repair __P((CARD));
int main __P((int, char **));
void newboard __P((void));
void newscore __P((void));
-int onecard __P((PLAY *));
+int onecard __P((const PLAY *));
int playcard __P((PLAY *));
void prboard __P((void));
void prompt __P((int));
-void prscore __P((int));
+void prscore __P((bool));
int readch __P((void));
-bool rest_f __P((char *));
+bool rest_f __P((const char *));
int roll __P((int, int));
void rub __P((int));
int safety __P((CARD));