1 /* $OpenBSD: extern.h,v 1.12 2023/01/04 13:00:11 jsg 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 * 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 */ 27 28 #include <sys/types.h> 29 30 #include <string.h> 31 32 /* crc.c */ 33 void crc_start(void); 34 unsigned long crc(const char *, int); 35 36 /* done.c */ 37 int score(void); 38 void done(int); 39 void die(int); 40 41 /* init.c */ 42 void init(void); 43 char *decr(char, char, char, char, char); 44 void linkdata(void); 45 void trapdel(int); 46 void startup(void); 47 48 /* io.c */ 49 void getin(char *, size_t, char *, size_t); 50 int yes(int, int, int); 51 int yesm(int, int, int); 52 int next(void); 53 void rdata(void); 54 int rnum(void); 55 void rdesc(int); 56 void rtrav(void); 57 #ifdef DEBUG 58 void twrite(int); 59 #endif 60 void rvoc(void); 61 void rlocs(void); 62 void rdflt(void); 63 void rliq(void); 64 void rhints(void); 65 void rspeak(int); 66 void mspeak(int); 67 struct text; 68 void speak(const struct text *); 69 void pspeak(int, int); 70 71 /* save.c */ 72 int save(const char *); 73 int restore(const char *); 74 75 /* subr.c */ 76 int toting(int); 77 int here(int); 78 int at(int); 79 int liq2(int); 80 int liq(void); 81 int liqloc(int); 82 int bitset(int, int); 83 int forced(int); 84 int dark(void); 85 int pct(int); 86 int fdwarf(void); 87 int march(void); 88 int mback(void); 89 int specials(void); 90 int trbridge(void); 91 void badmove(void); 92 __dead void bug(int); 93 void checkhints(void); 94 int trsay(void); 95 int trtake(void); 96 int dropper(void); 97 int trdrop(void); 98 int tropen(void); 99 int trkill(void); 100 int trtoss(void); 101 int trfeed(void); 102 int trfill(void); 103 void closing(void); 104 void caveclose(void); 105 106 /* vocab.c */ 107 void dstroy(int); 108 void juggle(int); 109 void move(int, int); 110 int put(int, int, int); 111 void carry(int, int); 112 void drop(int, int); 113 int vocab(const char *, int, int); 114 void prht(void); 115 116 /* These three used to be functions in vocab.c */ 117 #define weq(str1, str2) (!strncmp((str1), (str2), 5)) 118 #define length(str) (strlen((str)) + 1) 119 120 /* wizard.c */ 121 void poof(void); 122 int Start(void); 123 int wizard(void); 124 void ciao(void); 125 int ran(int); 126