Add __attribute__((__noreturn__)) to various function prototypes in games/.
[dragonfly.git] / games / cribbage / cribbage.h
CommitLineData
6693db17 1/*-
984263bc
MD
2 * Copyright (c) 1980, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
6693db17 13 * 3. Neither the name of the University nor the names of its contributors
984263bc
MD
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)cribbage.h 8.1 (Berkeley) 5/31/93
30 */
31
413c6806 32
984263bc
MD
33extern CARD deck[ CARDS ]; /* a deck */
34extern CARD phand[ FULLHAND ]; /* player's hand */
35extern CARD chand[ FULLHAND ]; /* computer's hand */
36extern CARD crib[ CINHAND ]; /* the crib */
37extern CARD turnover; /* the starter */
38
39extern CARD known[ CARDS ]; /* cards we have seen */
40extern int knownum; /* # of cards we know */
41
42extern int pscore; /* player's score */
43extern int cscore; /* comp's score */
44extern int glimit; /* points to win game */
45
46extern int pgames; /* player's games won */
47extern int cgames; /* comp's games won */
48extern int gamecount; /* # games played */
49extern int Lastscore[2]; /* previous score for each */
50
413c6806
EN
51extern bool iwon; /* if comp won last */
52extern bool explain; /* player mistakes explained */
53extern bool rflag; /* if all cuts random */
54extern bool quiet; /* if suppress random mess */
984263bc 55
413c6806 56extern char explstr[]; /* string for explanation */
984263bc 57
b58f1e66 58void addmsg(const char *, ...) __printflike(1, 2);
6693db17
SW
59int adjust(CARD []);
60bool anymove(CARD [], int, int);
61void bye(void);
62int cchose(CARD [], int, int);
63void cdiscard(bool);
64bool chkscr(int *, int);
65bool comphand(CARD [], const char *);
66void cremove(CARD, CARD [], int);
67void do_wait(void);
68void endmsg(void);
cae2835b 69char *get_line(void);
6693db17
SW
70int getuchar(void);
71int infrom(CARD [], int, const char *);
72void instructions(void);
09ac707a 73void intr(int) __dead2;
6693db17
SW
74bool isone(CARD, CARD [], int);
75void makedeck(CARD []);
76void makeknown(CARD [], int);
b58f1e66 77void msg(const char *, ...) __printflike(1, 2);
6693db17
SW
78bool msgcard(CARD, bool);
79int number(int, int, const char *);
80int pegscore(CARD, CARD [], int, int);
81bool plyrhand(CARD [], const char *);
82void prcard(WINDOW *, int, int, CARD, bool);
83void prhand(CARD [], int, WINDOW *, bool);
84int scorehand(CARD [], CARD, int, bool, bool);
85void shuffle(CARD []);
86void sorthand(CARD [], int);