]>
git.cameronkatri.com Git - bsdgames-darwin.git/blob - hack/extern.h
1 /* $NetBSD: extern.h,v 1.4 2001/03/25 20:43:58 jsm Exp $ */
4 * Copyright (c) 1997 The NetBSD Foundation, Inc.
7 * This code is derived from software contributed to The NetBSD Foundation
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the NetBSD
21 * Foundation, Inc. and its contributors.
22 * 4. Neither the name of The NetBSD Foundation nor the names of its
23 * contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
26 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 * POSSIBILITY OF SUCH DAMAGE.
48 long *alloc
__P((unsigned));
49 long *enlarge
__P((char *, unsigned));
52 int doapply
__P((void));
53 int holetime
__P((void));
54 void dighole
__P((void));
57 void savebones
__P((void));
58 int getbones
__P((void));
61 void unsee
__P((void));
62 void seeoff
__P((int));
63 void domove
__P((void));
64 void movobj
__P((struct obj
*, int, int));
65 int dopickup
__P((void));
66 void pickup
__P((int));
67 void lookaround
__P((void));
68 int monster_nearby
__P((void));
69 int rroom
__P((int, int));
70 int cansee
__P((xchar
, xchar
));
72 void setsee
__P((void));
73 void nomul
__P((int));
76 void losestr
__P((int));
77 void losehp
__P((int, const char *));
78 void losehp_m
__P((int, struct monst
*));
79 void losexp
__P((void));
80 int inv_weight
__P((void));
81 int inv_cnt
__P((void));
82 long newuexp
__P((void));
85 void rhack
__P((const char *));
86 int doextcmd
__P((void));
88 char unctrl
__P((int));
89 int movecmd
__P((int));
90 int getdir
__P((boolean
));
91 void confdir
__P((void));
92 int finddir
__P((void));
93 int isroom
__P((int, int));
94 int isok
__P((int, int));
97 int dodrop
__P((void));
98 void dropx
__P((struct obj
*));
99 void dropy
__P((struct obj
*));
100 int doddrop
__P((void));
101 int dodown
__P((void));
102 int doup
__P((void));
103 void goto_level
__P((int, boolean
));
104 int donull
__P((void));
105 int dopray
__P((void));
106 int dothrow
__P((void));
107 struct obj
*splitobj
__P((struct obj
*, int));
108 void more_experienced
__P((int, int));
109 void set_wounded_legs
__P((long, int));
110 void heal_legs
__P((void));
113 coord getpos
__P((int, const char *));
114 int do_mname
__P((void));
115 void do_oname
__P((struct obj
*));
116 int ddocall
__P((void));
117 void docall
__P((struct obj
*));
118 char *xmonnam
__P((struct monst
*, int));
119 char *lmonnam
__P((struct monst
*));
120 char *monnam
__P((struct monst
*));
121 char *Monnam
__P((struct monst
*));
122 char *amonnam
__P((struct monst
*, const char *));
123 char *Amonnam
__P((struct monst
*, const char *));
124 char *Xmonnam
__P((struct monst
*));
125 char *visctrl
__P((int));
128 void off_msg
__P((struct obj
*));
129 int doremarm
__P((void));
130 int doremring
__P((void));
131 int dorr
__P((struct obj
*));
132 int cursed
__P((struct obj
*));
133 int armoroff
__P((struct obj
*));
134 int doweararm
__P((void));
135 int dowearring
__P((void));
136 void ringoff
__P((struct obj
*));
137 void find_ac
__P((void));
138 void glibr
__P((void));
139 struct obj
*some_armor
__P((void));
140 void corrode_armor
__P((void));
143 void makedog
__P((void));
144 void initedog
__P((struct monst
*));
145 void losedogs
__P((void));
146 void keepdogs
__P((void));
147 void fall_down
__P((struct monst
*));
148 int dogfood
__P((struct obj
*));
149 int dog_move
__P((struct monst
*, int));
150 int inroom
__P((xchar
, xchar
));
151 int tamedog
__P((struct monst
*, struct obj
*));
154 void init_uhunger
__P((void));
155 int opentin
__P((void));
156 int Meatdone
__P((void));
157 int doeat
__P((void));
158 void gethungry
__P((void));
159 void morehungry
__P((int));
160 void lesshungry
__P((int));
161 int unfaint
__P((void));
162 void newuhs
__P((boolean
));
163 int poisonous
__P((struct obj
*));
164 int eatcorpse
__P((struct obj
*));
167 int dodone
__P((void));
168 void done1
__P((int));
169 void done_intr
__P((int));
170 void done_hangup
__P((int));
171 void done_in_by
__P((struct monst
*));
172 void done
__P((const char *));
173 void topten
__P((void));
174 void outheader
__P((void));
176 int outentry
__P((int, struct toptenentry
*, int));
177 char *itoa
__P((int));
178 const char *ordin
__P((int));
179 void clearlocks
__P((void));
180 void hangup
__P((int)) __attribute__((__noreturn__
));
181 char *eos
__P((char *));
182 void charcat
__P((char *, int));
183 void prscore
__P((int, char **));
186 struct engr
*engr_at
__P((xchar
, xchar
));
187 int sengr_at
__P((const char *, xchar
, xchar
));
188 void u_wipe_engr
__P((int));
189 void wipe_engr_at
__P((xchar
, xchar
, xchar
));
190 void read_engr_at
__P((int, int));
191 void make_engr_at
__P((int, int, const char *));
192 int doengrave
__P((void));
193 void save_engravings
__P((int));
194 void rest_engravings
__P((int));
195 void del_engr
__P((struct engr
*));
198 int hitmm
__P((struct monst
*, struct monst
*));
199 void mondied
__P((struct monst
*));
200 void monstone
__P((struct monst
*));
201 int fightm
__P((struct monst
*));
202 int thitu
__P((int, int, const char *));
203 boolean hmon
__P((struct monst
*, struct obj
*, int));
204 int attack
__P((struct monst
*));
207 struct obj
*addinv
__P((struct obj
*));
208 void useup
__P((struct obj
*));
209 void freeinv
__P((struct obj
*));
210 void delobj
__P((struct obj
*));
211 void freeobj
__P((struct obj
*));
212 void freegold
__P((struct gold
*));
213 void deltrap
__P((struct trap
*));
214 struct monst
*m_at
__P((int, int));
215 struct obj
*o_at
__P((int, int));
216 struct obj
*sobj_at
__P((int, int, int));
217 int carried
__P((struct obj
*));
218 int carrying
__P((int));
219 struct obj
*o_on
__P((unsigned int, struct obj
*));
220 struct trap
*t_at
__P((int, int));
221 struct gold
*g_at
__P((int, int));
222 struct obj
*mkgoldobj
__P((long));
223 struct obj
*getobj
__P((const char *, const char *));
224 int ckunpaid
__P((struct obj
*));
225 int ggetobj
__P((const char *, int (*fn
)(struct obj
*), int));
226 int askchain
__P((struct obj
*, char *, int, int (*)(struct obj
*),
227 int (*)(struct obj
*), int));
228 char obj_to_let
__P((struct obj
*));
229 void prinv
__P((struct obj
*));
230 int ddoinv
__P((void));
231 void doinv
__P((char *));
232 int dotypeinv
__P((void));
233 int dolook
__P((void));
234 void stackobj
__P((struct obj
*));
235 int merged
__P((struct obj
*, struct obj
*, int));
236 int countgold
__P((void));
237 int doprgold
__P((void));
238 int doprwep
__P((void));
239 int doprarm
__P((void));
240 int doprring
__P((void));
241 int digit
__P((int));
244 void getioctls
__P((void));
245 void setioctls
__P((void));
246 int dosuspend
__P((void));
249 void savelev
__P((int, xchar
));
250 void bwrite
__P((int, const void *, unsigned));
251 void saveobjchn
__P((int, struct obj
*));
252 void savemonchn
__P((int, struct monst
*));
253 void savegoldchn
__P((int, struct gold
*));
254 void savetrapchn
__P((int, struct trap
*));
255 void getlev
__P((int, int, xchar
));
256 void mread
__P((int, char *, unsigned));
257 void mklev
__P((void));
261 void askname
__P((void));
262 void impossible
__P((const char *, ...))
263 __attribute__((__format__(__printf__
, 1, 2)));
264 void stop_occupation
__P((void));
267 struct monst
*makemon
__P((const struct permonst
*, int, int));
268 coord enexto
__P((xchar
, xchar
));
269 int goodpos
__P((int, int));
270 void rloc
__P((struct monst
*));
271 struct monst
*mkmon_at
__P((int, int, int));
274 int mhitu
__P((struct monst
*));
275 int hitu
__P((struct monst
*, int));
278 void makelevel
__P((void));
279 int makerooms
__P((void));
280 void addrs
__P((int, int, int, int));
281 void addrsx
__P((int, int, int, int, boolean
));
283 int comp
__P((const void *, const void *));
284 coord finddpos
__P((int, int, int, int));
285 int okdoor
__P((int, int));
286 void dodoor
__P((int, int, struct mkroom
*));
287 void dosdoor
__P((int, int, struct mkroom
*, int));
288 int maker
__P((schar
, schar
, schar
, schar
));
289 void makecorridors
__P((void));
290 void join
__P((int, int));
291 void make_niches
__P((void));
292 void makevtele
__P((void));
293 void makeniche
__P((boolean
));
294 void mktrap
__P((int, int, struct mkroom
*));
297 void makemaz
__P((void));
298 void walkfrom
__P((int, int));
299 void move
__P((int *, int *, int));
300 int okay
__P((int, int, int));
301 coord mazexy
__P((void));
304 struct obj
*mkobj_at
__P((int, int, int));
305 void mksobj_at
__P((int, int, int));
306 struct obj
*mkobj
__P((int));
307 struct obj
*mksobj
__P((int));
308 int letter
__P((int));
309 int weight
__P((struct obj
*));
310 void mkgold
__P((long, int, int));
313 void mkshop
__P((void));
314 void mkzoo
__P((int));
315 const struct permonst
*morguemon
__P((void));
316 void mkswamp
__P((void));
317 int nexttodoor
__P((int, int));
318 int has_dnstairs
__P((struct mkroom
*));
319 int has_upstairs
__P((struct mkroom
*));
320 int isbig
__P((struct mkroom
*));
321 int dist2
__P((int, int, int, int));
325 void movemon
__P((void));
326 void justswld
__P((struct monst
*, const char *));
327 void youswld
__P((struct monst
*, int, int, const char *));
328 int dochugw
__P((struct monst
*));
329 int dochug
__P((struct monst
*));
330 int m_move
__P((struct monst
*, int));
331 void mpickgold
__P((struct monst
*));
332 void mpickgems
__P((struct monst
*));
333 int mfndpos
__P((struct monst
*, coord
[9 ], int[9 ], int));
334 int dist
__P((int, int));
335 void poisoned
__P((const char *, const char *));
336 void mondead
__P((struct monst
*));
337 void replmon
__P((struct monst
*, struct monst
*));
338 void relmon
__P((struct monst
*));
339 void monfree
__P((struct monst
*));
340 void dmonsfree
__P((void));
341 void unstuck
__P((struct monst
*));
342 void killed
__P((struct monst
*));
343 void kludge
__P((const char *, const char *));
344 void rescham
__P((void));
345 int newcham
__P((struct monst
*, const struct permonst
*));
346 void mnexto
__P((struct monst
*));
347 int ishuman
__P((struct monst
*));
348 void setmangry
__P((struct monst
*));
349 int canseemon
__P((struct monst
*));
354 int letindex
__P((int));
355 void init_objects
__P((void));
356 int probtype
__P((int));
357 void setgemprobs
__P((void));
358 void oinit
__P((void));
359 void savenames
__P((int));
360 void restnames
__P((int));
361 int dodiscovered
__P((void));
362 int interesting_to_discover
__P((int));
365 char *strprepend
__P((char *, char *));
366 char *sitoa
__P((int));
367 char *typename
__P((int));
368 char *xname
__P((struct obj
*));
369 char *doname
__P((struct obj
*));
370 void setan
__P((const char *, char *));
371 char *aobjnam
__P((struct obj
*, const char *));
372 char *Doname
__P((struct obj
*));
373 struct obj
*readobjnam
__P((char *));
376 void initoptions
__P((void));
377 void parseoptions
__P((char *, boolean
));
378 int doset
__P((void));
381 int dowhatis
__P((void));
382 void intruph
__P((int));
383 void page_more
__P((FILE *, int));
384 void set_whole_screen
__P((void));
385 int readnews
__P((void));
386 void set_pager
__P((int));
387 int page_line
__P((const char *));
388 void cornline
__P((int, const char *));
389 int dohelp
__P((void));
390 int page_file
__P((const char *, boolean
));
391 int dosh
__P((void));
392 int child
__P((int));
395 int dodrink
__P((void));
396 void pluslvl
__P((void));
397 void strange_feeling
__P((struct obj
*, const char *));
398 void potionhit
__P((struct monst
*, struct obj
*));
399 void potionbreathe
__P((struct obj
*));
400 int dodip
__P((void));
401 void ghost_from_bottle
__P((void));
404 void swallowed
__P((void));
405 void panic
__P((const char *, ...))
406 __attribute__((__format__(__printf__
, 1, 2)));
407 void atl
__P((int, int, int));
408 void on_scr
__P((int, int));
409 void tmp_at
__P((schar
, schar
));
410 void Tmp_at
__P((schar
, schar
));
411 void setclipped
__P((void)) __attribute__((__noreturn__
));
412 void at
__P((xchar
, xchar
, int));
413 void prme
__P((void));
414 int doredraw
__P((void));
415 void docrt
__P((void));
416 void docorner
__P((int, int));
417 void curs_on_u
__P((void));
418 void pru
__P((void));
419 void prl
__P((int, int));
420 char news0
__P((xchar
, xchar
));
421 void newsym
__P((int, int));
422 void mnewsym
__P((int, int));
423 void nosee
__P((int, int));
424 void prl1
__P((int, int));
425 void nose1
__P((int, int));
426 int vism_at
__P((int, int));
427 void pobj
__P((struct obj
*));
428 void unpobj
__P((struct obj
*));
429 void seeobjs
__P((void));
430 void seemons
__P((void));
431 void pmon
__P((struct monst
*));
432 void unpmon
__P((struct monst
*));
433 void nscr
__P((void));
434 void cornbot
__P((int));
435 void bot
__P((void));
436 void mstatusline
__P((struct monst
*));
437 void cls
__P((void));
440 int doread
__P((void));
441 int identify
__P((struct obj
*));
442 void litroom
__P((boolean
));
443 int monstersym
__P((int));
446 void outrip
__P((void));
447 void center
__P((int, char *));
450 void init_rumors
__P((FILE *));
451 int skipline
__P((FILE *));
452 void outline
__P((FILE *));
453 void outrumor
__P((void));
457 int dosave
__P((void));
458 int dosave0
__P((int));
459 int dorecover
__P((int));
460 struct obj
*restobjchn
__P((int));
461 struct monst
*restmonchn
__P((int));
464 int findit
__P((void));
465 int dosearch
__P((void));
466 int doidtrap
__P((void));
467 void wakeup
__P((struct monst
*));
468 void seemimic
__P((struct monst
*));
471 void obfree
__P((struct obj
*, struct obj
*));
472 void paybill
__P((void));
473 char *shkname
__P((struct monst
*));
474 void shkdead
__P((struct monst
*));
475 void replshk
__P((struct monst
*, struct monst
*));
476 int inshop
__P((void));
477 int dopay
__P((void));
479 struct obj
*bp_to_obj
__P((struct bill_x
*));
480 void addtobill
__P((struct obj
*));
481 void splitbill
__P((struct obj
*, struct obj
*));
482 void subfrombill
__P((struct obj
*));
483 int doinvbill
__P((int));
484 int shkcatch
__P((struct obj
*));
485 int shk_move
__P((struct monst
*));
486 void shopdig
__P((int));
487 int online
__P((int, int));
488 int follower
__P((struct monst
*));
491 void findname
__P((char *, int));
494 long somegold
__P((void));
495 void stealgold
__P((struct monst
*));
496 int stealarm
__P((void));
497 int steal
__P((struct monst
*));
498 void mpickobj
__P((struct monst
*, struct obj
*));
499 int stealamulet
__P((struct monst
*));
500 void relobj
__P((struct monst
*, int));
503 void startup
__P((void));
504 void start_screen
__P((void));
505 void end_screen
__P((void));
506 void curs
__P((int, int));
507 void nocmov
__P((int, int));
508 void cmov
__P((int, int));
509 int xputc
__P((int));
510 void xputs
__P((char *));
511 void cl_end
__P((void));
512 void clear_screen
__P((void));
513 void home
__P((void));
514 void standoutbeg
__P((void));
515 void standoutend
__P((void));
516 void backsp
__P((void));
517 void bell
__P((void));
518 void delay_output
__P((void));
519 void cl_eos
__P((void));
522 void timeout
__P((void));
523 void stoned_dialogue
__P((void));
526 int doredotopl
__P((void));
527 void redotoplin
__P((void));
528 void remember_topl
__P((void));
529 void addtopl
__P((const char *));
530 void xmore
__P((const char *));
531 void more
__P((void));
532 void cmore
__P((const char *));
533 void clrlin
__P((void));
534 void pline
__P((const char *, ...))
535 __attribute__((__format__(__printf__
, 1, 2)));
536 void vpline
__P((const char *, va_list))
537 __attribute__((__format__(__printf__
, 1, 0)));
538 void putsym
__P((int));
539 void putstr
__P((const char *));
542 void initrack
__P((void));
543 void settrack
__P((void));
544 coord
*gettrack
__P((int, int));
547 struct trap
*maketrap
__P((int, int, int));
548 void dotrap
__P((struct trap
*));
549 int mintrap
__P((struct monst
*));
550 void selftouch
__P((const char *));
551 void float_up
__P((void));
552 void float_down
__P((void));
553 void vtele
__P((void));
554 void tele
__P((void));
555 void teleds
__P((int, int));
556 int teleok
__P((int, int));
557 int dotele
__P((void));
558 void placebc
__P((int));
559 void unplacebc
__P((void));
560 void level_tele
__P((void));
561 void drown
__P((void));
564 void gettty
__P((void));
565 void settty
__P((const char *));
566 void setctty
__P((void));
567 void setftty
__P((void));
568 void error
__P((const char *, ...))
569 __attribute__((__format__(__printf__
, 1, 2),__noreturn__
));
570 void getlin
__P((char *));
571 void getret
__P((void));
572 void cgetret
__P((const char *));
573 void xwaitforspace
__P((const char *));
574 char *parse
__P((void));
575 char readchar
__P((void));
576 void end_of_input
__P((void)) __attribute__((__noreturn__
));
579 void u_init
__P((void));
581 void ini_inv
__P((struct trobj
*));
582 void wiz_inv
__P((void));
583 void plnamesuffix
__P((void));
584 int role_index
__P((int));
587 void setrandom
__P((void));
588 struct tm
*getlt
__P((void));
589 int getyear
__P((void));
590 char *getdate
__P((void));
591 int phase_of_the_moon
__P((void));
592 int night
__P((void));
593 int midnight
__P((void));
594 void gethdate
__P((char *));
595 int uptodate
__P((int));
596 int veryold
__P((int));
597 void getlock
__P((void));
598 void getmailstatus
__P((void));
599 void ckmailstatus
__P((void));
600 void newmail
__P((void));
601 void mdrush
__P((struct monst
*, boolean
));
602 void readmail
__P((void));
603 void regularize
__P((char *));
606 void setgd
__P((void));
607 int gd_move
__P((void));
608 void gddead
__P((void));
609 void replgd
__P((struct monst
*, struct monst
*));
610 void invault
__P((void));
613 int doversion
__P((void));
616 void setuwep
__P((struct obj
*));
617 int dowield
__P((void));
618 void corrode_weapon
__P((void));
619 int chwepon
__P((struct obj
*, int));
622 void amulet
__P((void));
623 int wiz_hit
__P((struct monst
*));
624 void inrange
__P((struct monst
*));
625 void aggravate
__P((void));
626 void clonewiz
__P((struct monst
*));
630 int getwn
__P((struct monst
*));
631 void initworm
__P((struct monst
*));
632 void worm_move
__P((struct monst
*));
633 void worm_nomove
__P((struct monst
*));
634 void wormdead
__P((struct monst
*));
635 void wormhit
__P((struct monst
*));
636 void wormsee
__P((unsigned));
638 void pwseg
__P((struct wseg
*));
639 void cutworm
__P((struct monst
*, xchar
, xchar
, uchar
));
640 void remseg
__P((struct wseg
*));
644 void setworn
__P((struct obj
*, long));
645 void setnotworn
__P((struct obj
*));
648 void bhitm
__P((struct monst
*, struct obj
*));
649 int bhito
__P((struct obj
*, struct obj
*));
650 int dozap
__P((void));
651 const char *exclam
__P((int));
652 void hit
__P((const char *, struct monst
*, const char *));
653 void miss
__P((const char *, struct monst
*));
654 struct monst
*bhit
__P((int, int, int, int,
655 void (*)(struct monst
*, struct obj
*),
656 int (*)(struct obj
*, struct obj
*),
658 struct monst
*boomhit
__P((int, int));
659 char dirlet
__P((int, int));
660 void buzz
__P((int, xchar
, xchar
, int, int));
661 int zhit
__P((struct monst
*, int));
662 int revive
__P((struct obj
*));
663 void rloco
__P((struct obj
*));
664 void fracture_rock
__P((struct obj
*));
665 void burn_scrolls
__P((void));
668 int rn1
__P((int, int));
671 int d
__P((int, int));
672 #endif /* _EXTERN_H_ */