extern.h revision 1.16 1 1.16 dholland /* $NetBSD: extern.h,v 1.16 2012/01/08 18:17:41 dholland Exp $ */
2 1.1 christos
3 1.1 christos /*
4 1.1 christos * Copyright (c) 1997 Christos Zoulas. All rights reserved.
5 1.1 christos *
6 1.1 christos * Redistribution and use in source and binary forms, with or without
7 1.1 christos * modification, are permitted provided that the following conditions
8 1.1 christos * are met:
9 1.1 christos * 1. Redistributions of source code must retain the above copyright
10 1.1 christos * notice, this list of conditions and the following disclaimer.
11 1.1 christos * 2. Redistributions in binary form must reproduce the above copyright
12 1.1 christos * notice, this list of conditions and the following disclaimer in the
13 1.1 christos * documentation and/or other materials provided with the distribution.
14 1.1 christos *
15 1.1 christos * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 1.1 christos * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 1.1 christos * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 1.1 christos * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 1.1 christos * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 1.1 christos * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 1.1 christos * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 1.1 christos * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 1.1 christos * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 1.1 christos * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 1.1 christos */
26 1.1 christos
27 1.5 hubertf #include <string.h>
28 1.16 dholland #include <stdint.h>
29 1.5 hubertf
30 1.1 christos /* crc.c */
31 1.15 dholland struct crcstate {
32 1.15 dholland uint32_t crcval;
33 1.15 dholland unsigned step;
34 1.15 dholland };
35 1.15 dholland
36 1.15 dholland void crc_start(struct crcstate *);
37 1.15 dholland void crc_add(struct crcstate *, const void *, size_t);
38 1.15 dholland uint32_t crc_get(struct crcstate *);
39 1.1 christos
40 1.1 christos /* done.c */
41 1.10 jsm int score(void);
42 1.13 dholland void done(int) __dead;
43 1.10 jsm void die(int);
44 1.1 christos
45 1.1 christos /* init.c */
46 1.10 jsm void init(void);
47 1.10 jsm char *decr(int, int, int, int, int);
48 1.10 jsm void trapdel(int);
49 1.10 jsm void startup(void);
50 1.1 christos
51 1.1 christos /* io.c */
52 1.10 jsm void getin(char **, char **);
53 1.10 jsm int yes(int, int, int);
54 1.10 jsm int yesm(int, int, int);
55 1.10 jsm void rdata(void);
56 1.6 hubertf #ifdef DEBUG
57 1.10 jsm void twrite(int);
58 1.6 hubertf #endif
59 1.10 jsm void rspeak(int);
60 1.10 jsm void mspeak(int);
61 1.1 christos struct text;
62 1.10 jsm void speak(const struct text *);
63 1.10 jsm void pspeak(int, int);
64 1.1 christos
65 1.1 christos /* save.c */
66 1.10 jsm int save(const char *);
67 1.10 jsm int restore(const char *);
68 1.1 christos
69 1.1 christos /* subr.c */
70 1.10 jsm int toting(int);
71 1.10 jsm int here(int);
72 1.10 jsm int at(int);
73 1.10 jsm int liq(void);
74 1.10 jsm int liqloc(int);
75 1.10 jsm int forced(int);
76 1.10 jsm int dark(void);
77 1.10 jsm int pct(int);
78 1.10 jsm int fdwarf(void);
79 1.10 jsm int march(void);
80 1.13 dholland void bug(int) __dead;
81 1.10 jsm void checkhints(void);
82 1.10 jsm int trsay(void);
83 1.10 jsm int trtake(void);
84 1.10 jsm int trdrop(void);
85 1.10 jsm int tropen(void);
86 1.10 jsm int trkill(void);
87 1.10 jsm int trtoss(void);
88 1.10 jsm int trfeed(void);
89 1.10 jsm int trfill(void);
90 1.10 jsm void closing(void);
91 1.10 jsm void caveclose(void);
92 1.1 christos
93 1.1 christos /* vocab.c */
94 1.12 dholland void destroy(int);
95 1.10 jsm void juggle(int);
96 1.10 jsm void move(int, int);
97 1.10 jsm int put(int, int, int);
98 1.10 jsm void carry(int, int);
99 1.10 jsm void drop(int, int);
100 1.10 jsm int vocab(const char *, int, int);
101 1.5 hubertf
102 1.5 hubertf /* These three used to be functions in vocab.c */
103 1.5 hubertf #define copystr(src, dest) strcpy((dest), (src))
104 1.5 hubertf #define weq(str1, str2) (!strncmp((str1), (str2), 5))
105 1.5 hubertf #define length(str) (strlen((str)) + 1)
106 1.5 hubertf
107 1.1 christos /* wizard.c */
108 1.10 jsm void datime(int *, int *);
109 1.10 jsm void poof(void);
110 1.10 jsm int Start(void);
111 1.10 jsm void ciao(void);
112 1.10 jsm int ran(int);
113