xref: /openbsd/games/adventure/extern.h (revision 09467b48)
1 /*	$OpenBSD: extern.h,v 1.11 2017/06/23 12:56:25 fcambus Exp $	*/
2 /*	$NetBSD: extern.h,v 1.3 1997/10/11 01:55:27 lukem Exp $	*/
3 
4 /*
5  * Copyright (c) 1997 Christos Zoulas.  All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  * 3. All advertising materials mentioning features or use of this software
16  *    must display the following acknowledgement:
17  *	This product includes software developed by Christos Zoulas.
18  * 4. The name of the author may not be used to endorse or promote products
19  *    derived from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
33 #include <sys/types.h>
34 
35 #include <string.h>
36 
37 /* crc.c */
38 void crc_start(void);
39 unsigned long crc(const char *, int);
40 
41 /* done.c */
42 int score(void);
43 void done(int);
44 void die(int);
45 
46 /* init.c */
47 void init(void);
48 char   *decr(char, char, char, char, char);
49 void linkdata(void);
50 void trapdel(int);
51 void startup(void);
52 
53 /* io.c */
54 void getin(char *, size_t, char *, size_t);
55 int yes(int, int, int);
56 int yesm(int, int, int);
57 int next(void);
58 void rdata(void);
59 int rnum(void);
60 void rdesc(int);
61 void rtrav(void);
62 #ifdef DEBUG
63 void twrite(int);
64 #endif
65 void rvoc(void);
66 void rlocs(void);
67 void rdflt(void);
68 void rliq(void);
69 void rhints(void);
70 void rspeak(int);
71 void mspeak(int);
72 struct text;
73 void speak(const struct text *);
74 void pspeak(int, int);
75 
76 /* save.c */
77 int save(const char *);
78 int restore(const char *);
79 
80 /* subr.c */
81 int toting(int);
82 int here(int);
83 int at(int);
84 int liq2(int);
85 int liq(void);
86 int liqloc(int);
87 int bitset(int, int);
88 int forced(int);
89 int dark(void);
90 int pct(int);
91 int fdwarf(void);
92 int march(void);
93 int mback(void);
94 int specials(void);
95 int trbridge(void);
96 void badmove(void);
97 __dead void bug(int);
98 void checkhints(void);
99 int trsay(void);
100 int trtake(void);
101 int dropper(void);
102 int trdrop(void);
103 int tropen(void);
104 int trkill(void);
105 int trtoss(void);
106 int trfeed(void);
107 int trfill(void);
108 void closing(void);
109 void caveclose(void);
110 
111 /* vocab.c */
112 void dstroy(int);
113 void juggle(int);
114 void move(int, int);
115 int put(int, int, int);
116 void carry(int, int);
117 void drop(int, int);
118 int vocab(const char *, int, int);
119 void prht(void);
120 
121 /* These three used to be functions in vocab.c */
122 #define weq(str1, str2)		(!strncmp((str1), (str2), 5))
123 #define length(str)			(strlen((str)) + 1)
124 
125 /* wizard.c */
126 void poof(void);
127 int Start(void);
128 int wizard(void);
129 void ciao(void);
130 int ran(int);
131