Source:NetHack 3.0.0/extern.h

From NetHackWiki
Jump to navigation Jump to search

Below is the full text to extern.h from the source code of NetHack 3.0.0. To link to a particular line, write [[NetHack 3.0.0/extern.h#line123]], for example.

Warning! This is the source code from an old release. For the latest release, see Source code

The NetHack General Public License applies to screenshots, source code and other content from NetHack.

This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.

1.    /*	SCCS Id: @(#)extern.h	3.0	88/10/18 */
2.    /* 	Copyright (c)   Steve Creps, 1988. 		 */
3.    /* NetHack may be freely redistributed.  See license for details. */
4.    
5.    #ifndef EXTERN_H
6.    #define EXTERN_H
7.    
8.    #if defined(MSDOS) && !defined(__TURBOC__)
9.    /* MSC include files do not contain "extern" keyword */
10.   #define E
11.   #else
12.   #define E extern
13.   #endif
14.   
15.   /* ### alloc.c ### */
16.   
17.   #ifndef __TURBOC__
18.   E long *alloc P((unsigned int));
19.   #endif
20.   
21.   /* ### apply.c ### */
22.   
23.   E int doapply();
24.   E int holetime();
25.   E void dighole();
26.   E int dorub();
27.   E int dojump();
28.   #ifdef WALKIES
29.   E int number_leashed();
30.   E void o_unleash P((struct obj *));
31.   E void m_unleash P((struct monst *));
32.   E void unleash_all();
33.   E boolean next_to_u();
34.   E struct obj *get_mleash P((struct monst *));
35.   E void check_leash P((xchar,xchar));
36.   #endif
37.   E boolean um_dist P((xchar,xchar,xchar));
38.   
39.   /* ### artifact.c ### */
40.   
41.   #ifdef NAMED_ITEMS
42.   E void mkartifact P((struct obj **));
43.   E boolean is_artifact P((struct obj *));
44.   E boolean spec_ability P((struct obj *,unsigned));
45.   E int restr_name P((struct obj *,char *));
46.   # if defined(THEOLOGY) && defined(ALTARS)
47.   E struct obj *mk_aligned_artifact P((int));
48.   # endif
49.   E int defends P((int,struct obj *));
50.   E int spec_abon P((struct obj *,struct permonst *));
51.   E int spec_dbon P((struct obj *,struct permonst *,int));
52.   #endif
53.   
54.   /* ### attrib.c ### */
55.   
56.   E void adjattrib P((int,int,boolean));
57.   E void change_luck P((schar));
58.   E int stone_luck P((boolean));
59.   E void gainstr P((struct obj *,int));
60.   E void losestr P((int));
61.   E void restore_attrib();
62.   E void init_attr P((int));
63.   #ifdef POLYSELF
64.   E void redist_attr();
65.   #endif
66.   E void adjabil P((int));
67.   E int newhp();
68.   E schar acurr();
69.   E void adjalign P((int));
70.   
71.   /* ### bones.c ### */
72.   
73.   E void savebones();
74.   E int getbones();
75.   E void name_file P((char *,int));
76.   
77.   /* ### cmd.c ### */
78.   
79.   E void set_occupation P((int(*)(),char *,int));
80.   #ifdef REDO
81.   E char pgetchar();
82.   E void pushch P((char));
83.   E void savech P((char));
84.   #endif
85.   E char unctrl P((char));
86.   E void rhack P((char *));
87.   E char lowc P((char));
88.   E void enlightenment();
89.   E int xytod P((schar,schar));
90.   E void dtoxy P((coord *,int));
91.   E int movecmd P((char));
92.   E int getdir P((boolean));
93.   E void confdir();
94.   E int isok P((int,int));
95.   E int doextlist();
96.   
97.   /* ### dbridge.c ### */
98.   
99.   E boolean is_pool P((int,int));
100.  #ifdef STRONGHOLD
101.  E void initsym P((int,int));
102.  E int is_drawbridge_wall P((int, int));
103.  E boolean is_db_wall P((int, int));
104.  E boolean find_drawbridge P((int *, int*));
105.  E boolean create_drawbridge P((int, int, int, boolean));
106.  E void open_drawbridge P((int, int));
107.  E void close_drawbridge P((int, int));
108.  E void destroy_drawbridge P((int, int));
109.  #endif	/* STRONGHOLD /**/
110.  
111.  /* ### decl.c ### */
112.  
113.  /* ### demon.c ### */
114.  
115.  E void dsummon P((struct permonst *));
116.  E int demon_talk P((struct monst *));
117.  E long bribe P((struct monst *));
118.  E int dprince ();
119.  E int dlord ();
120.  E int ndemon ();
121.  
122.  /* ### do.c ### */
123.  
124.  E int dodrop();
125.  E boolean flooreffects P((struct obj *,int,int));
126.  E void doaltarobj P((struct obj *));
127.  E boolean canletgo P((struct obj *,char *));
128.  E void dropx P((struct obj *));
129.  E void dropy P((struct obj *));
130.  E int doddrop();
131.  E int dodown();
132.  E int doup();
133.  E void goto_level P((int,boolean));
134.  E int donull();
135.  E int dowipe();
136.  E struct obj *splitobj P((struct obj *,int));
137.  E void set_wounded_legs P((long,int));
138.  E void heal_legs();
139.  
140.  /* ### do_name.c ### */
141.  
142.  E void getpos P((coord *,int,char *));
143.  E int do_mname();
144.  E struct obj *oname P((struct obj *,char *,int));
145.  E int ddocall();
146.  E void docall P((struct obj *));
147.  E char *x_monnam P((struct monst *,int));
148.  E char *lmonnam P((struct monst *));
149.  E char *mon_nam P((struct monst *));
150.  E char *Monnam P((struct monst *));
151.  E char *a_monnam P((struct monst *,char *));
152.  E char *Amonnam P((struct monst *,char *));
153.  E char *Xmonnam P((struct monst *));
154.  E char *defmonnam P((struct monst *));
155.  E char *rndmonnam();
156.  #ifdef REINCARNATION
157.  E char *roguename();
158.  #endif
159.  
160.  /* ### do_wear.c ### */
161.  
162.  E void off_msg P((struct obj *));
163.  E boolean is_helmet P((struct obj *));
164.  E boolean is_gloves P((struct obj *));
165.  E boolean is_boots P((struct obj *));
166.  E boolean is_cloak P((struct obj *));
167.  E boolean is_shield P((struct obj *));
168.  E void set_wear();
169.  E int Armor_off();
170.  E int Armor_gone();
171.  E int Helmet_off();
172.  E int Gloves_off();
173.  E int Boots_off();
174.  E int Cloak_off();
175.  E int Shield_off();
176.  E void Amulet_off();
177.  E void Ring_on P((struct obj *));
178.  E void Ring_off P((struct obj *));
179.  E void Ring_gone P((struct obj *));
180.  E void Blindf_on P((struct obj *));
181.  E void Blindf_off P((struct obj *));
182.  E int dotakeoff();
183.  E int doremring();
184.  E int cursed P((struct obj *));
185.  E int armoroff P((struct obj *));
186.  E int dowear();
187.  E int doputon();
188.  E void find_ac();
189.  E void glibr();
190.  E struct obj *some_armor();
191.  E void corrode_armor();
192.  E int doddoremarm();
193.  E void adj_abon P((struct obj *,schar));
194.  
195.  /* ### dog.c ### */
196.  
197.  E void initedog P((struct monst *));
198.  E void make_familiar P((struct obj *));
199.  E struct monst *makedog();
200.  E void losedogs();
201.  E void keepdogs();
202.  E void fall_down P((struct monst *,int));
203.  E int dogfood P((struct monst *,struct obj *));
204.  E int inroom P((xchar,xchar));
205.  E int tamedog P((struct monst *,struct obj *));
206.  
207.  /* ### dogmove.c ### */
208.  
209.  E int dog_move P((struct monst *,int));
210.  
211.  /* ### dokick.c ### */
212.  
213.  E boolean ghitm P((struct monst *,long));
214.  E boolean bad_kick_throw_pos P((xchar,xchar));
215.  E struct monst *ghit P((int,int,int));
216.  E int dokick();
217.  
218.  /* ### dothrow.c ### */
219.  
220.  E int dothrow();
221.  E int throwit P((struct obj *));
222.  E int thitmonst P((struct monst *,struct obj *));
223.  E int breaks P((struct obj *,boolean));
224.  
225.  /* ### eat.c ### */
226.  
227.  E void init_uhunger();
228.  E int Hear_again();
229.  E int doeat();
230.  E void gethungry();
231.  E void morehungry P((int));
232.  E void lesshungry P((int));
233.  E void newuhs P((boolean));
234.  E void vomit();
235.  E struct obj *floorfood P((char *,int));
236.  
237.  /* ### end.c ### */
238.  
239.  E int done1();
240.  E int done2();
241.  E void done_in_by P((struct monst *));
242.  E void panic P((char *,...));
243.  E void done P((char *));
244.  E void clearlocks();
245.  #ifdef NOSAVEONHANGUP
246.  E void hangup();
247.  #endif
248.  
249.  /* ### engrave.c ### */
250.  
251.  #ifdef ELBERETH
252.  E int sengr_at P((char *,xchar,xchar));
253.  #endif
254.  E void u_wipe_engr P((int));
255.  E void wipe_engr_at P((xchar,xchar,xchar));
256.  E void read_engr_at P((int,int));
257.  E void make_engr_at P((int,int,char *));
258.  E int freehand();
259.  E int doengrave();
260.  E void save_engravings P((int));
261.  E void rest_engravings P((int));
262.  
263.  /* ### exper.c ### */
264.  
265.  E long newuexp P((unsigned));
266.  E int experience P((struct monst *,int));
267.  E void more_experienced P((int,int));
268.  E void losexp();
269.  E void newexplevel();
270.  E void pluslvl();
271.  E long rndexp();
272.  
273.  /* ### extralev.c ### */
274.  
275.  #ifdef REINCARNATION
276.  E void makeroguerooms();
277.  E void corr P((int,int));
278.  E void makerogueghost();
279.  #endif
280.  
281.  /* ### fountain.c ### */
282.  
283.  #ifdef FOUNTAINS
284.  E void dryup();
285.  E void drinkfountain();
286.  E void dipfountain P((struct obj *));
287.  #endif /* FOUNTAINS */
288.  #ifdef SINKS
289.  E void drinksink();
290.  #endif
291.  
292.  /* ### getline.c ### */
293.  
294.  E void getlin P((char *));
295.  E void getret();
296.  E void cgetret P((char *));
297.  E void xwaitforspace P((char *));
298.  E char *parse();
299.  E char readchar();
300.  #ifdef COM_COMPL
301.  E void get_ext_cmd P((char *));
302.  #endif /* COM_COMPL */
303.  
304.  /* ### hack.c ### */
305.  
306.  E void unsee();
307.  E void seeoff P((int));
308.  E void movobj P((struct obj *,xchar,xchar));
309.  E boolean may_dig P((xchar,xchar));
310.  E void domove();
311.  E void spoteffects();
312.  E int dopickup();
313.  E void lookaround();
314.  E int monster_nearby();
315.  E int cansee P((xchar,xchar));
316.  E int sgn P((int));
317.  E void getcorners
318.  	P((xchar *,xchar *,xchar *,xchar *,xchar *,xchar *,xchar *,xchar *));
319.  E void setsee();
320.  E void nomul P((int));
321.  E void losehp P((int,char *));
322.  E int weight_cap();
323.  E int inv_weight();
324.  E int inv_cnt();
325.  E int little_to_big P((int));
326.  E int big_to_little P((int));     
327.  #ifdef STUPID_CPP	/* otherwise these functions are macros in hack.h */
328.  E char yn();
329.  E char ynq();
330.  E char ynaq();
331.  E char nyaq();
332.  E char *plur P((long));
333.  E void makeknown P((unsigned));
334.  #endif
335.  
336.  /* ### invent.c ### */
337.  
338.  E struct obj *addinv P((struct obj *));
339.  E void useup P((struct obj *));
340.  E void freeinv P((struct obj *));
341.  E void delobj P((struct obj *));
342.  E void freeobj P((struct obj *));
343.  E void freegold P((struct gold *));
344.  E struct monst *m_at P((int,int));
345.  E struct obj *o_at P((int,int));
346.  E struct obj *sobj_at P((int,int,int));
347.  E int carried P((struct obj *));
348.  E struct obj *carrying P((int));
349.  E struct obj *o_on P((unsigned int,struct obj *));
350.  E struct gold *g_at P((int,int));
351.  E struct obj *getobj P((char *,char *));
352.  E int ggetobj P((char *,int(*)(),int));
353.  E int askchain P((struct obj *,int,char *,int,int(*)(),int(*)(),int,char *));
354.  E void prinv P((struct obj *));
355.  E int ddoinv();
356.  E void doinv P((char *));
357.  E int dotypeinv();
358.  E int dolook();
359.  E void stackobj P((struct obj *));
360.  E int doprgold();
361.  E int doprwep();
362.  E int doprarm();
363.  E int doprring();
364.  E int dopramulet();
365.  E int doprtool();
366.  E int digit P((char));
367.  E void useupf P((struct obj *));
368.  E char *let_to_name P((char));
369.  E void reassign();
370.  
371.  /* ### ioctl.c ### */
372.  
373.  #ifdef UNIX
374.  E void getioctls();
375.  E void setioctls();
376.  #ifdef SUSPEND
377.  E int dosuspend();
378.  #endif /* SUSPEND */
379.  #endif /* UNIX */
380.  
381.  /* ### lock.c ### */
382.  
383.  E int pick_lock P((struct obj *));
384.  E int doforce();
385.  E int boxlock P((struct obj *,struct obj *));
386.  E int doorlock P((struct obj *,int,int));
387.  E int doopen();
388.  E int doclose();
389.  
390.  /* ### makemon.c ### */
391.  
392.  E struct monst *makemon P((struct permonst *,int,int));
393.  E void enexto P((coord *,xchar,xchar));
394.  E int goodpos P((int,int));
395.  E void rloc P((struct monst *));
396.  E struct monst *mkmon_at P((char *,int,int));
397.  E void init_monstr();
398.  E struct permonst *rndmonst();
399.  E struct permonst *mkclass P((char));
400.  E int adj_lev P((struct permonst *));
401.  E struct permonst *grow_up P((struct monst *));
402.  E int mongets P((struct monst *,int));
403.  #ifdef REINCARNATION
404.  E struct permonst *roguemon();
405.  #endif
406.  #ifdef GOLEMS
407.  E int golemhp P((int));
408.  #endif /* GOLEMS */
409.  E boolean peace_minded P((struct permonst *));
410.  E void set_malign P((struct monst *));
411.  E void set_mimic_sym P((struct monst *));
412.  
413.  /* ### mcastu.c ### */
414.  
415.  E int castmu P((struct monst *,struct attack *));
416.  E int buzzmu P((struct monst *,struct attack *));
417.  
418.  /* ### mhitm.c ### */
419.  
420.  E int fightm P((struct monst *));
421.  E int mattackm P((struct monst *,struct monst *));
422.  E int noattacks P((struct permonst *));
423.  
424.  /* ### mhitu.c ### */
425.  
426.  #ifdef POLYSELF
427.  E boolean incompatible P((struct monst *));
428.  E struct monst *cloneu();
429.  #endif
430.  E boolean is_nymph P((struct monst *));
431.  E boolean sp_melee P((struct monst *));
432.  E int mattacku P((struct monst *));
433.  E void mdamageu P((struct monst *,int));
434.  #ifdef SEDUCE
435.  E void doseduce P((struct monst *));
436.  #endif
437.  
438.  /* ### mklev.c ### */
439.  
440.  E int somex P((struct mkroom *));
441.  E int somey P((struct mkroom *));
442.  #ifdef ORACLE
443.  E boolean place_oracle P((struct mkroom *,int *,int *,int *));
444.  #endif
445.  E void mklev();
446.  E int okdoor P((xchar,xchar));
447.  E void dodoor P((int,int,struct mkroom *));
448.  E void mktrap P((int,int,struct mkroom *));
449.  E void mkfount P((int,struct mkroom *));
450.  
451.  /* ### mkmaze.c ### */
452.  
453.  #if defined(WALLIFIED_MAZE) || defined(STRONGHOLD)
454.  E void wallification P((int,int,int,int,boolean));
455.  #endif
456.  E void walkfrom P((int,int));
457.  E void makemaz();
458.  E void move P((int *,int *,int));
459.  E void mazexy P((coord *));
460.  E void bound_digging();
461.  
462.  /* ### mkobj.c ### */
463.  
464.  E struct obj *mkobj_at P((char,int,int));
465.  E struct obj *mksobj_at P((int,int,int));
466.  E struct obj *mkobj P((char,boolean));
467.  E int rndmonnum();
468.  E struct obj *mksobj P((int,boolean));
469.  E int letter P((int));
470.  E int weight P((struct obj *));
471.  E void mkgold P((long,int,int));
472.  E struct obj *mkcorpse_at P((struct permonst *,int,int));
473.  E struct obj *mk_tt_corpse P((int,int));
474.  E struct obj *mkstatue P((struct permonst *,int,int));
475.  E struct obj *mk_named_object P((int, struct permonst *,int,int,char *,int));
476.  #ifdef MEDUSA
477.  E struct obj *mk_tt_statue P((int,int));
478.  #endif
479.  E void bless P((struct obj *));
480.  E void curse P((struct obj *));
481.  E void blessorcurse P((struct obj *,int));
482.  E boolean is_flammable P((struct obj *));
483.  E boolean is_rustprone P((struct obj *));
484.  E void set_omask P((xchar,xchar));
485.  
486.  /* ### mkroom.c ### */
487.  
488.  E void mkroom P((int));
489.  E void shrine_pos P((int *, int*, struct mkroom *));
490.  E boolean nexttodoor P((int,int));
491.  E boolean has_dnstairs P((struct mkroom *));
492.  E boolean has_upstairs P((struct mkroom *));
493.  E int dist2 P((int,int,int,int));
494.  E struct permonst *courtmon();
495.  E int bcsign P((struct obj *));
496.  
497.  /* ### mon.c ### */
498.  
499.  E void movemon();
500.  E void meatgold P((struct monst *));
501.  E void meatobj P((struct monst *));
502.  E void mpickgold P((struct monst *));
503.  E void mpickgems P((struct monst *));
504.  E int curr_mon_load P((struct monst *));
505.  E int max_mon_load P((struct monst *));
506.  E boolean can_carry P((struct monst *,struct obj *));
507.  E void mpickstuff P((struct monst *,char *));
508.  E int mfndpos P((struct monst *,coord *,long *,long));
509.  E int dist P((int,int));
510.  E void poisontell P((int));
511.  E void poisoned P((char *,int,char *));
512.  E void mondead P((struct monst *));
513.  E void replmon P((struct monst *,struct monst *));
514.  E void relmon P((struct monst *));
515.  E void monfree P((struct monst *));
516.  E void unstuck P((struct monst *));
517.  E void killed P((struct monst *));
518.  E void xkilled P((struct monst *,int));
519.  E void kludge P((char *,char *,...));
520.  E void rescham();
521.  E void restartcham();
522.  E int newcham P((struct monst *,struct permonst *));
523.  E void mnexto P((struct monst *));
524.  E void mnearto P((struct monst *, xchar, xchar, boolean));
525.  E void setmangry P((struct monst *));
526.  E int disturb P((struct monst *));
527.  E void mondied P((struct monst *));
528.  E void mongone P((struct monst *));
529.  E void monstone P((struct monst *));
530.  #ifdef GOLEMS
531.  E void golemeffects P((struct monst *, int, int));
532.  #endif /* GOLEMS */
533.  
534.  /* ### mondata.c ### */
535.  
536.  E boolean attacktype P((struct permonst *,int));
537.  E boolean resists_ston P((struct permonst *));
538.  E boolean resists_drli P((struct permonst *));
539.  E boolean ranged_attk P((struct permonst *));
540.  E boolean can_track P((struct permonst *));
541.  #ifdef POLYSELF
542.  E boolean breakarm P((struct permonst *));
543.  E boolean sliparm P((struct permonst *));
544.  #endif
545.  E boolean sticks P((struct permonst *));
546.  E boolean canseemon P((struct monst *));
547.  E boolean dmgtype P((struct permonst *,int));
548.  E int monsndx P((struct permonst *));
549.  E int name_to_mon P((char *));
550.  #ifdef POLYSELF
551.  E boolean webmaker P((struct permonst *));
552.  #endif
553.  E boolean is_female P((struct monst *));
554.  E int gender P((struct monst *));
555.  E boolean levl_follower P((struct monst *));
556.  E struct permonst *player_mon();
557.  
558.  /* ### monmove.c ### */
559.  
560.  E int dochugw P((struct monst *));
561.  E boolean onscary P((int,int,struct monst *));
562.  E int dochug P((struct monst *));
563.  E int m_move P((struct monst *,int));
564.  E void set_apparxy P((struct monst *));
565.  E boolean mdig_tunnel P((struct monst *));
566.  
567.  /* ### monst.c ### */
568.  
569.  /* ### msdos.c ### */
570.  
571.  #ifdef MSDOS
572.  E void flushout();
573.  E int tgetch();
574.  E int dosh();
575.  E long freediskspace P((char *));
576.  E long filesize P((char *));
577.  E void eraseall P((char *,char *));
578.  E void copybones P((int));
579.  E void playwoRAMdisk();
580.  E int saveDiskPrompt P((int));
581.  E void gameDiskPrompt();
582.  E void read_config_file();
583.  E void set_lock_and_bones();
584.  E void append_slash P((char *));
585.  E void getreturn P((char *));
586.  E void msmsg P((char *,...));
587.  E void chdrive P((char *));
588.  E void disable_ctrlP();
589.  E void enable_ctrlP();
590.  E FILE *fopenp P((char *,char *));
591.  E void msexit P((int));
592.  #endif /* MSDOS */
593.  
594.  /* ### mthrowu.c ### */
595.  
596.  E int thitu P((int,int,char *));
597.  E int thrwmu P((struct monst *));
598.  E int spitmu P((struct monst *));
599.  E int breamu P((struct monst *,struct attack *));
600.  E boolean linedup P((xchar,xchar,xchar,xchar));
601.  E boolean lined_up P((struct monst *));
602.  E struct obj *m_carrying P((struct monst *,int));
603.  E void m_useup P((struct monst *,struct obj *));
604.  
605.  /* ### music.c ### */
606.  
607.  #ifdef MUSIC
608.  E int do_play_instrument P((struct obj *));
609.  #endif /* MUSIC /**/
610.  
611.  /* ### o_init.c ### */
612.  
613.  E int letindex P((char));
614.  E void init_objects();
615.  E void oinit();
616.  E void savenames P((int));
617.  E void restnames P((int));
618.  E int dodiscovered();
619.  
620.  /* ### objnam.c ### */
621.  
622.  E char *typename P((int));
623.  E char *distant_name P((struct obj *, char *(*)(struct obj *)));
624.  E char *xname P((struct obj *));
625.  E char *doname P((struct obj *));
626.  E void setan P((char *,char *));
627.  E char *aobjnam P((struct obj *,char *));
628.  E char *Doname2 P((struct obj *));
629.  E void lcase P((char *));
630.  E char *makeplural P((char *));
631.  E struct obj *readobjnam P((char *));
632.  E boolean uses_known P((struct obj *));
633.  
634.  /* ### options.c ### */
635.  
636.  E void initoptions();
637.  E void parseoptions P((char *,boolean));
638.  E int doset();
639.  E int dotogglepickup();
640.  E void option_help();
641.  E int fruitadd P((char *));
642.  
643.  /* ### pager.c ### */
644.  
645.  E int dowhatis();
646.  E int dowhatdoes();
647.  E void set_whole_screen();
648.  #ifdef NEWS
649.  E int readnews();
650.  #endif /* NEWS */
651.  E void set_pager P((int));
652.  E int page_line P((char *));
653.  E void cornline P((int,char *));
654.  E int dohelp();
655.  E int dohistory();
656.  E int page_file P((char *,boolean));
657.  #ifdef UNIX
658.  #ifdef SHELL
659.  E int dosh();
660.  #endif /* SHELL */
661.  E int child P((int));
662.  #endif /* UNIX */
663.  
664.  /* ### pcmain.c ### */
665.  
666.  #ifdef MSDOS
667.  E int (*occupation)();
668.  E int (*afternmv)();
669.  E void askname();
670.  E void impossible P((char *,...));
671.  #ifdef CHDIR
672.  E void chdirx P((char *,char));
673.  #endif /* CHDIR */
674.  E void stop_occupation();
675.  #endif /* MSDOS */
676.  
677.  /* ### pctty.c ### */
678.  
679.  #ifdef MSDOS
680.  E void gettty();
681.  E void settty P((char *));
682.  E void error P((char *,...));
683.  #endif /* MSDOS */
684.  
685.  /* ### pcunix.c ### */
686.  
687.  #ifdef MSDOS
688.  #ifndef TOS
689.  E void setrandom();
690.  E int getyear();
691.  E char *getdate();
692.  E int phase_of_the_moon();
693.  E int night();
694.  E int midnight();
695.  E void gethdate P((char *));
696.  E int uptodate P((int));
697.  #endif /* TOS */
698.  E void regularize P((char *));
699.  #endif /* MSDOS */
700.  
701.  /* ### pickup.c ### */
702.  
703.  E void pickup P((int));
704.  E int doloot();
705.  E void get_all_from_box();
706.  E void use_container P((struct obj *, int));
707.  E void inc_cwt P((struct obj *, struct obj *));
708.  E void delete_contents P((struct obj *));
709.  E void dec_cwt P((struct obj *, struct obj *));
710.  
711.  /* ### polyself.c ### */
712.  
713.  #ifdef POLYSELF
714.  E void polyself();
715.  E int polymon P((int));
716.  E void rehumanize();
717.  E int dobreathe();
718.  E int dospit();
719.  E int doremove();
720.  E int dospinweb();
721.  E int dosummon();
722.  E int doconfuse();
723.  E int dohide();
724.  #endif
725.  E char *body_part P((int));
726.  E int poly_gender();
727.  #ifdef POLYSELF
728.  #ifdef GOLEMS
729.  E void ugolemeffects P((int, int));
730.  #endif /* GOLEMS */
731.  #endif
732.  
733.  /* ### potion.c ### */
734.  
735.  E void make_confused P((long,boolean));
736.  E void make_stunned P((long,boolean));
737.  E void make_blinded P((long,boolean));
738.  E void make_sick P((long,boolean));
739.  E void make_hallucinated P((long,boolean));
740.  E int dodrink();
741.  E int dopotion P((struct obj *));
742.  E int peffects P((struct obj *));
743.  E void healup P((int,int,boolean,boolean));
744.  E void strange_feeling P((struct obj *,char *));
745.  E void potionhit P((struct monst *,struct obj *));
746.  E void potionbreathe P((struct obj *));
747.  E int dodip();
748.  E void djinni_from_bottle P((struct obj *));
749.  E int monster_detect P((struct obj *));
750.  E int object_detect P((struct obj *));
751.  
752.  /* ### pray.c ### */
753.  
754.  # ifdef THEOLOGY
755.  E int dosacrifice();
756.  E int dopray();
757.  E char *u_gname();
758.  #endif
759.  E int doturn();
760.  #ifdef ALTARS
761.  E char *a_gname();
762.  E char *a_gname_at P((xchar,xchar));
763.  # ifdef THEOLOGY
764.  E void altar_wrath P((int,int));
765.  # endif
766.  #endif
767.  
768.  /* ### pri.c ### */
769.  
770.  E void swallowed();
771.  E void setclipped();
772.  E void at P((xchar,xchar,uchar,uchar));
773.  E void prme();
774.  E void shieldeff P((xchar,xchar));
775.  E int doredraw();
776.  E void docrt();
777.  E void docorner P((int,int));
778.  E void seeglds();
779.  E void seeobjs();
780.  E void seemons();
781.  E void pmon P((struct monst *));
782.  E void unpmon P((struct monst *));
783.  E void nscr();
784.  E void bot();
785.  E void mstatusline P((struct monst *));
786.  E void ustatusline();
787.  E void cls();
788.  E void max_rank_sz();
789.  E char rndmonsym();
790.  E char rndobjsym();
791.  E const char *hcolor();
792.  
793.  /* ### priest.c ### */
794.  
795.  E int move_special P((struct monst *,schar,schar,boolean,boolean,
796.  			xchar,xchar,xchar,xchar));
797.  #if defined(ALTARS) && defined(THEOLOGY)
798.  E struct mkroom *in_temple P((int,int));
799.  E int pri_move P((struct monst *));
800.  E void priestini P((int,int,int,int));
801.  E char *priestname P((struct monst *));
802.  E boolean p_coaligned P((struct monst *));
803.  E void intemple();
804.  E void priest_talk P((struct monst *));
805.  E boolean u_in_sanctuary P((struct mkroom *));
806.  E void ghod_hitsu();
807.  E void angry_priest();
808.  #endif
809.  
810.  /* ### prisym.c ### */
811.  
812.  E void atl P((int,int,char));
813.  E void on_scr P((int,int));
814.  E void tmp_at P((int,int));
815.  E void Tmp_at2 P((int,int));
816.  E void curs_on_u();
817.  E void pru();
818.  E void prl P((int,int));
819.  E uchar news0 P((xchar,xchar));
820.  E void newsym P((int,int));
821.  E void mnewsym P((int,int));
822.  E void nosee P((int,int));
823.  E void prl1 P((int,int));
824.  E void nose1 P((int,int));
825.  E int vism_at P((int,int));
826.  #ifdef NEWSCR
827.  E void pobj P((struct obj *));
828.  #endif /* NEWSCR */
829.  E void unpobj P((struct obj *));
830.  
831.  /* ### read.c ### */
832.  
833.  E int doread();
834.  E int seffects P((struct obj *));
835.  E int identify P((struct obj *));
836.  E void litroom P((boolean));
837.  E void do_genocide P((int));
838.  E void do_mapping();
839.  E void do_vicinity_map();
840.  E int destroy_arm P((struct obj *));
841.  E int trap_detect P((struct obj *));
842.  E int gold_detect P((struct obj *));
843.  E int food_detect P((struct obj *));
844.  E void punish P((struct obj *));
845.  E void unpunish();
846.  E boolean cant_create P((int *));
847.  #if defined(WIZARD) || defined(EXPLORE_MODE)
848.  E boolean create_particular();
849.  #endif
850.  
851.  /* ### restore.c ### */
852.  
853.  E int dorecover P((int));
854.  E void getlev P((int,int,xchar,boolean));
855.  #ifdef ZEROCOMP
856.  E void minit();
857.  E int mread P((int,genericptr_t,unsigned int));
858.  #else
859.  E void mread P((int,genericptr_t,unsigned int));
860.  #endif
861.  
862.  /* ### rip.c ### */
863.  
864.  E void outrip();
865.  
866.  /* ### rnd.c ### */
867.  
868.  E int rn1 P((int,int));
869.  E int rn2 P((int));
870.  E int rnl P((int));
871.  E int rnd P((int));
872.  E int d P((int,int));
873.  E int rne P((int));
874.  #ifdef THEOLOGY
875.  E int rnz P((int));
876.  #endif
877.  
878.  /* ### rumors.c ### */
879.  
880.  E void outrumor P((int,boolean));
881.  #ifdef ORACLE
882.  E int doconsult P((struct monst *));
883.  #endif
884.  
885.  /* ### save.c ### */
886.  
887.  E int dosave();
888.  #ifndef NOSAVEONHANGUP
889.  E int hangup();
890.  #endif /* NOSAVEONHANGUP */
891.  E int dosave0();
892.  #if defined(DGK) && !defined(TOS)
893.  E boolean savelev P((int,xchar,int));
894.  E boolean swapin_file P((int));
895.  #else /* DGK && !TOS */
896.  E void savelev P((int, xchar));
897.  #endif /* DGK && !TOS */
898.  #ifdef ZEROCOMP
899.  E void bflush P((int));
900.  #endif
901.  E void bwrite P((int,genericptr_t,unsigned int));
902.  E void savefruitchn P((int));
903.  
904.  /* ### search.c ### */
905.  
906.  E int findit();
907.  E int dosearch();
908.  E int dosearch0 P((int));
909.  E int doidtrap();
910.  E void wakeup P((struct monst *));
911.  E void seemimic P((struct monst *));
912.  
913.  /* ### shk.c ### */
914.  
915.  E char *shkname P((struct monst *));
916.  E void shkdead P((struct monst *));
917.  E void replshk P((struct monst *,struct monst *));
918.  E int inshop();
919.  E int inhishop P((struct monst *));
920.  E void obfree P((struct obj *,struct obj *));
921.  E int dopay();
922.  E void home_shk P((struct monst *));
923.  E void make_happy_shk P((struct monst *));
924.  E boolean paybill();
925.  E void pay_for_door P((int,int,char *));
926.  E void addtobill P((struct obj *,boolean));
927.  E void splitbill P((struct obj *,struct obj *));
928.  E void subfrombill P((struct obj *));
929.  E int doinvbill P((int));
930.  E int shkcatch P((struct obj *));
931.  E int shk_move P((struct monst *));
932.  E int online P((xchar,xchar));
933.  E boolean is_fshk P((struct monst *));
934.  E void shopdig P((int));
935.  E boolean in_shop P((int,int));
936.  E boolean costly_spot P((int,int));
937.  E void check_unpaid P((struct obj *));
938.  
939.  /* ### shknam.c ### */
940.  
941.  E void stock_room P((struct shclass *,struct mkroom *));
942.  E int saleable P((int,struct obj *));
943.  E int get_shop_item P((int));
944.  
945.  /* ### sit.c ### */
946.  
947.  #if defined(THRONES) || defined(SPELLS)
948.  E void take_gold();
949.  #endif
950.  E int dosit();
951.  E void rndcurse();
952.  E void attrcurse();
953.  
954.  /* ### sp_lev.c ### */
955.  
956.  #ifdef STRONGHOLD
957.  E boolean load_special P((char *));
958.  #endif /* STRONGHOLD /**/
959.  
960.  /* ### sounds.c ### */
961.  
962.  E void verbalize P((char *));
963.  #ifdef SOUNDS
964.  E void dosounds();
965.  E void growl P((struct monst *));
966.  E void yelp P((struct monst *));
967.  E void whimper P((struct monst *));
968.  #endif
969.  E int dotalk();
970.  
971.  /* ### spell.c ### */
972.  
973.  #ifdef SPELLS
974.  E int study_book P((struct obj *));
975.  E int docast();
976.  E int spelleffects P((int, boolean));
977.  E void losespells();
978.  E int dovspell();
979.  #endif /* SPELLS */
980.  
981.  /* ### steal.c ### */
982.  
983.  E long somegold();
984.  E void stealgold P((struct monst *));
985.  E int steal P((struct monst *));
986.  E void mpickobj P((struct monst *,struct obj *));
987.  E void stealamulet P((struct monst *));
988.  E void relobj P((struct monst *,int));
989.  
990.  /* ### termcap.c ### */
991.  
992.  E void startup();
993.  E void start_screen();
994.  E void end_screen();
995.  E void curs P((int,int));
996.  E void cmov P((int,int));
997.  E void xputc P((char));
998.  E void xputs P((char *));
999.  E void cl_end();
1000. E void clear_screen();
1001. E void home();
1002. E void standoutbeg();
1003. E void standoutend();
1004. E void revbeg();
1005. #if 0
1006. E void boldbeg();
1007. E void blinkbeg();
1008. E void dimbeg();
1009. #endif
1010. E void m_end();
1011. E void backsp();
1012. E void bell();
1013. E void graph_on();
1014. E void graph_off();
1015. E void delay_output();
1016. E void cl_eos();
1017. 
1018. /* ### timeout.c ### */
1019. 
1020. E void timeout();
1021. E void hatch_eggs();
1022. 
1023. /* ### topl.c ### */
1024. 
1025. E int doredotopl();
1026. E void remember_topl();
1027. E void addtopl P((char *));
1028. E void more();
1029. E void cmore P((char *));
1030. E void clrlin();
1031. E void pline P((const char *,...));
1032. E void You P((const char *,...));
1033. E void Your P((const char *,...));
1034. E void putsym P((char));
1035. E void putstr P((char *));
1036. E char yn_function P((char *,char));
1037. 
1038. /* ### topten.c ### */
1039. 
1040. E void topten();
1041. E char *eos P((char *));
1042. E void prscore P((int,char **));
1043. E struct obj *tt_oname P((struct obj *));
1044. 
1045. /* ### track.c ### */
1046. 
1047. E void initrack();
1048. E void settrack();
1049. E coord *gettrack P((int,int));
1050. 
1051. /* ### trap.c ### */
1052. 
1053. E boolean rust_dmg P((struct obj *,char *,int,boolean));
1054. E struct trap *maketrap P((int,int,int));
1055. E int teleok P((int,int));
1056. E void dotrap P((struct trap *));
1057. E int mintrap P((struct monst *));
1058. E void selftouch P((char *));
1059. E void float_up();
1060. E int float_down();
1061. E void tele();
1062. E void teleds P((int,int));
1063. E int dotele();
1064. E void placebc P((int));
1065. E void unplacebc();
1066. E void level_tele();
1067. E void drown();
1068. #ifdef SPELLS
1069. E void drain_en P((int));
1070. #endif
1071. E int dountrap();
1072. E void chest_trap P((struct obj *,int));
1073. E void wake_nearby();
1074. E void deltrap P((struct trap *));
1075. E struct trap *t_at P((int,int));
1076. E void b_trapped();
1077. E boolean unconscious();
1078. 
1079. /* ### u_init.c ### */
1080. 
1081. E void u_init();
1082. E void plnamesuffix();
1083. 
1084. /* ### uhitm.c ### */
1085. 
1086. E struct monst *clone_mon P((struct monst *));
1087. E boolean special_case P((struct monst *));
1088. E boolean attack P((struct monst *));
1089. E boolean hmon P((struct monst *,struct obj *,int));
1090. 
1091. /* ### unixmain.c ### */
1092. 
1093. #ifdef UNIX
1094. E int (*occupation)();
1095. E int (*afternmv)();
1096. E void glo P((int));
1097. E void askname();
1098. E void impossible P((char *,...));
1099. E void stop_occupation();
1100. #endif /* UNIX */
1101. 
1102. /* ### unixtty.c ### */
1103. 
1104. #ifdef UNIX
1105. E void gettty();
1106. E void settty P((char *));
1107. E void setftty();
1108. E void intron();
1109. E void introff();
1110. E void error P((char *, char *, char *));
1111. #endif /* UNIX */
1112. 
1113. /* ### unixunix.c ### */
1114. 
1115. #ifdef UNIX
1116. E void setrandom();
1117. E int getyear();
1118. E char *getdate();
1119. E int phase_of_the_moon();
1120. E int night();
1121. E int midnight();
1122. E void gethdate P((char *));
1123. E int uptodate P((int));
1124. E void getlock();
1125. #ifdef MAIL
1126. E void getmailstatus();
1127. E void ckmailstatus();
1128. E void readmail();
1129. #endif /* MAIL */
1130. E void regularize P((char *));
1131. #endif /* UNIX */
1132. 
1133. /* ### vault.c ### */
1134. 
1135. E void setgd();
1136. E void invault();
1137. E int gd_move();
1138. E void gddead();
1139. E void replgd P((struct monst *,struct monst *));
1140. E void paygd();
1141. 
1142. /* ### version.c ### */
1143. 
1144. E int doversion();
1145. 
1146. /* ### weapon.c ### */
1147. 
1148. E int hitval P((struct obj *,struct permonst *));
1149. E int dmgval P((struct obj *,struct permonst *));
1150. E void set_uasmon();
1151. E struct obj *select_rwep P((struct monst *));
1152. E struct obj *select_hwep P((struct monst *));
1153. E int abon();
1154. E int dbon();
1155. 
1156. /* ### were.c ### */
1157. 
1158. E void were_change P((struct monst *));
1159. E void new_were P((struct monst *));
1160. E boolean were_summon P((struct permonst *,boolean));
1161. #ifdef POLYSELF
1162. E void you_were();
1163. #endif /* POLYSELF */
1164. 
1165. /* ### wield.c ### */
1166. 
1167. E void setuwep P((struct obj *));
1168. E void uwepgone();
1169. E int dowield();
1170. E void corrode_weapon();
1171. E int chwepon P((struct obj *,int));
1172. E int welded P((struct obj *));
1173. E void weldmsg P((struct obj *,boolean));
1174. 
1175. /* ### wizard.c ### */
1176. 
1177. E void amulet();
1178. E int mon_has_amulet P((struct monst *));
1179. E int wiz_get_amulet P((struct monst *));
1180. E void aggravate();
1181. E void clonewiz();
1182. #ifdef HARD
1183. E void nasty();
1184. E void resurrect();
1185. E void intervene();
1186. E void wizdead P((struct monst *));
1187. #endif /* HARD */
1188. E void cuss P((struct monst *));
1189. 
1190. /* ### worm.c ### */
1191. 
1192. #ifdef WORM
1193. E int getwn P((struct monst *));
1194. E void initworm P((struct monst *));
1195. E void worm_move P((struct monst *));
1196. E void worm_nomove P((struct monst *));
1197. E void wormdead P((struct monst *));
1198. E void wormhit P((struct monst *));
1199. E void wormsee P((unsigned int));
1200. E void cutworm P((struct monst *,xchar,xchar,uchar));
1201. #endif /* WORM */
1202. 
1203. /* ### worn.c ### */
1204. 
1205. E void setworn P((struct obj *,long));
1206. E void setnotworn P((struct obj *));
1207. 
1208. /* ### write.c ### */
1209. 
1210. E void dowrite P((struct obj *));
1211. 
1212. /* ### zap.c ### */
1213. 
1214. E struct monst *revive P((struct obj *,boolean));
1215. E int zappable P((struct obj *));
1216. E void zapnodir P((struct obj *));
1217. E int dozap();
1218. E int zapyourself P((struct obj *));
1219. E void weffects P((struct obj *));
1220. E char *exclam P((int));
1221. E void hit P((char *,struct monst *,char *));
1222. E void miss P((char *,struct monst *));
1223. E struct monst *bhit P((int,int,int,char,int(*)(),int(*)(),struct obj *));
1224. E struct monst *boomhit P((int,int));
1225. E void buzz P((int,int,xchar,xchar,int,int));
1226. E void rloco P((struct obj *));
1227. E void fracture_rock P((struct obj *));
1228. E boolean break_statue P((struct obj *));
1229. E void destroy_item P((int,int));
1230. E int destroy_mitem P((struct monst *,int,int));
1231. E int resist P((struct monst *,char,int,int));
1232. E void makewish();
1233. 
1234. #undef E
1235. 
1236. #endif /* EXTERN_H /**/