]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - mille/mille.h
Move UCB-licensed code from 4-clause to 3-clause licence.
[bsdgames-darwin.git] / mille / mille.h
index 416e9f0debd07d006813d74d9073dddfe4a41e1a..ea737385f55a954703af818f9426a6527277f549 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: mille.h,v 1.9 1998/09/13 15:27:29 hubertf 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       */
@@ -199,7 +203,7 @@ typedef struct {
 # 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
@@ -207,13 +211,15 @@ typedef struct {
 
 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;
 
@@ -227,7 +233,7 @@ extern WINDOW       *Board, *Miles, *Score;
 
 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));
@@ -239,19 +245,19 @@ 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));