OSDN Git Service

refine cbuffer
[jnethack/source.git] / include / extern.h
1 /* NetHack 3.6  extern.h        $NHDT-Date: 1573940539 2019/11/16 21:42:19 $  $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.741 $ */
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 #define E extern
9
10 /* ### alloc.c ### */
11
12 #if 0
13 E long *FDECL(alloc, (unsigned int));
14 #endif
15 E char *FDECL(fmt_ptr, (const genericptr));
16
17 /* This next pre-processor directive covers almost the entire file,
18  * interrupted only occasionally to pick up specific functions as needed. */
19 #if !defined(MAKEDEFS_C) && !defined(LEV_LEX_C)
20
21 /* ### allmain.c ### */
22
23 E void FDECL(moveloop, (BOOLEAN_P));
24 E void NDECL(stop_occupation);
25 E void NDECL(display_gamewindows);
26 E void NDECL(newgame);
27 E void FDECL(welcome, (BOOLEAN_P));
28 E time_t NDECL(get_realtime);
29 E int FDECL(argcheck, (int, char **, enum earlyarg));
30
31 /* ### apply.c ### */
32
33 E int NDECL(doapply);
34 E int NDECL(dorub);
35 E int NDECL(dojump);
36 E int FDECL(jump, (int));
37 E int NDECL(number_leashed);
38 E void FDECL(o_unleash, (struct obj *));
39 E void FDECL(m_unleash, (struct monst *, BOOLEAN_P));
40 E void NDECL(unleash_all);
41 E boolean FDECL(leashable, (struct monst *));
42 E boolean NDECL(next_to_u);
43 E struct obj *FDECL(get_mleash, (struct monst *));
44 E const char *NDECL(beautiful);
45 E void FDECL(check_leash, (XCHAR_P, XCHAR_P));
46 E boolean FDECL(um_dist, (XCHAR_P, XCHAR_P, XCHAR_P));
47 E boolean FDECL(snuff_candle, (struct obj *));
48 E boolean FDECL(snuff_lit, (struct obj *));
49 E boolean FDECL(catch_lit, (struct obj *));
50 E void FDECL(use_unicorn_horn, (struct obj *));
51 E boolean FDECL(tinnable, (struct obj *));
52 E void NDECL(reset_trapset);
53 E void FDECL(fig_transform, (ANY_P *, long));
54 E int FDECL(unfixable_trouble_count, (BOOLEAN_P));
55
56 /* ### artifact.c ### */
57
58 E void NDECL(init_artifacts);
59 E void FDECL(save_artifacts, (int));
60 E void FDECL(restore_artifacts, (int));
61 E const char *FDECL(artiname, (int));
62 E struct obj *FDECL(mk_artifact, (struct obj *, ALIGNTYP_P));
63 E const char *FDECL(artifact_name, (const char *, short *));
64 E boolean FDECL(exist_artifact, (int, const char *));
65 E void FDECL(artifact_exists, (struct obj *, const char *, BOOLEAN_P));
66 E int NDECL(nartifact_exist);
67 E boolean FDECL(arti_immune, (struct obj *, int));
68 E boolean FDECL(spec_ability, (struct obj *, unsigned long));
69 E boolean FDECL(confers_luck, (struct obj *));
70 E boolean FDECL(arti_reflects, (struct obj *));
71 E boolean FDECL(shade_glare, (struct obj *));
72 E boolean FDECL(restrict_name, (struct obj *, const char *));
73 E boolean FDECL(defends, (int, struct obj *));
74 E boolean FDECL(defends_when_carried, (int, struct obj *));
75 E boolean FDECL(protects, (struct obj *, BOOLEAN_P));
76 E void FDECL(set_artifact_intrinsic, (struct obj *, BOOLEAN_P, long));
77 E int FDECL(touch_artifact, (struct obj *, struct monst *));
78 E int FDECL(spec_abon, (struct obj *, struct monst *));
79 E int FDECL(spec_dbon, (struct obj *, struct monst *, int));
80 E void FDECL(discover_artifact, (XCHAR_P));
81 E boolean FDECL(undiscovered_artifact, (XCHAR_P));
82 E int FDECL(disp_artifact_discoveries, (winid));
83 E boolean FDECL(artifact_hit, (struct monst *, struct monst *, struct obj *,
84                                int *, int));
85 E int NDECL(doinvoke);
86 E boolean FDECL(finesse_ahriman, (struct obj *));
87 E void FDECL(arti_speak, (struct obj *));
88 E boolean FDECL(artifact_light, (struct obj *));
89 E long FDECL(spec_m2, (struct obj *));
90 E boolean FDECL(artifact_has_invprop, (struct obj *, UCHAR_P));
91 E long FDECL(arti_cost, (struct obj *));
92 E struct obj *FDECL(what_gives, (long *));
93 E const char *FDECL(glow_color, (int));
94 E const char *FDECL(glow_verb, (int, BOOLEAN_P));
95 E void FDECL(Sting_effects, (int));
96 E int FDECL(retouch_object, (struct obj **, BOOLEAN_P));
97 E void FDECL(retouch_equipment, (int));
98 E void NDECL(mkot_trap_warn);
99 E boolean FDECL(is_magic_key, (struct monst *, struct obj *));
100 E struct obj *FDECL(has_magic_key, (struct monst *));
101
102 /* ### attrib.c ### */
103
104 E boolean FDECL(adjattrib, (int, int, int));
105 E void FDECL(gainstr, (struct obj *, int, BOOLEAN_P));
106 E void FDECL(losestr, (int));
107 E void FDECL(poisontell, (int, BOOLEAN_P));
108 E void FDECL(poisoned, (const char *, int, const char *, int, BOOLEAN_P));
109 E void FDECL(change_luck, (SCHAR_P));
110 E int FDECL(stone_luck, (BOOLEAN_P));
111 E void NDECL(set_moreluck);
112 E void NDECL(restore_attrib);
113 E void FDECL(exercise, (int, BOOLEAN_P));
114 E void NDECL(exerchk);
115 E void FDECL(init_attr, (int));
116 E void NDECL(redist_attr);
117 E void FDECL(adjabil, (int, int));
118 E int NDECL(newhp);
119 E schar FDECL(acurr, (int));
120 E schar NDECL(acurrstr);
121 E boolean FDECL(extremeattr, (int));
122 E void FDECL(adjalign, (int));
123 E int FDECL(is_innate, (int));
124 E char *FDECL(from_what, (int));
125 E void FDECL(uchangealign, (int, int));
126
127 /* ### ball.c ### */
128
129 E void FDECL(ballrelease, (BOOLEAN_P));
130 E void NDECL(ballfall);
131 #ifndef BREADCRUMBS
132 E void NDECL(placebc);
133 E void NDECL(unplacebc);
134 E int NDECL(unplacebc_and_covet_placebc);
135 E void FDECL(lift_covet_and_placebc, (int));
136 #else
137 E void FDECL(Placebc, (const char *, int));
138 E void FDECL(Unplacebc, (const char *, int));
139 E int FDECL(Unplacebc_and_covet_placebc, (const char *, int));
140 E void FDECL(Lift_covet_and_placebc, (int, const char *, int));
141 #define placebc() Placebc(__FUNCTION__, __LINE__)
142 #define unplacebc() Unplacebc(__FUNCTION__, __LINE__)
143 #define unplacebc_and_covet_placebc() \
144             Unplacebc_and_covet_placebc(__FUNCTION__, __LINE__)
145 #define lift_covet_and_placebc(x) \
146             Lift_covet_and_placebc(x, __FUNCTION__, __LINE__) 
147 #endif
148 E void FDECL(set_bc, (int));
149 E void FDECL(move_bc, (int, int, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P));
150 E boolean FDECL(drag_ball, (XCHAR_P, XCHAR_P, int *, xchar *, xchar *,
151                             xchar *, xchar *, boolean *, BOOLEAN_P));
152 E void FDECL(drop_ball, (XCHAR_P, XCHAR_P));
153 E void NDECL(drag_down);
154 E void NDECL(bc_sanity_check);
155
156 /* ### bones.c ### */
157
158 E void FDECL(sanitize_name, (char *));
159 E void FDECL(drop_upon_death, (struct monst *, struct obj *, int, int));
160 E boolean NDECL(can_make_bones);
161 E void FDECL(savebones, (int, time_t, struct obj *));
162 E int NDECL(getbones);
163
164 /* ### botl.c ### */
165
166 E char *NDECL(do_statusline1);
167 E void NDECL(check_gold_symbol);
168 E char *NDECL(do_statusline2);
169 E void NDECL(bot);
170 E void NDECL(timebot);
171 E int FDECL(xlev_to_rank, (int));
172 E const char *FDECL(rank_of, (int, SHORT_P, BOOLEAN_P));
173 E int FDECL(title_to_mon, (const char *, int *, int *));
174 E void NDECL(max_rank_sz);
175 #ifdef SCORE_ON_BOTL
176 E long NDECL(botl_score);
177 #endif
178 E int FDECL(describe_level, (char *));
179 E void FDECL(status_initialize, (BOOLEAN_P));
180 E void NDECL(status_finish);
181 E boolean NDECL(exp_percent_changing);
182 E int NDECL(stat_cap_indx);
183 E int NDECL(stat_hunger_indx);
184 E const char *FDECL(bl_idx_to_fldname, (int));
185 #ifdef STATUS_HILITES
186 E void NDECL(status_eval_next_unhilite);
187 E void NDECL(reset_status_hilites);
188 E boolean FDECL(parse_status_hl1, (char *op, BOOLEAN_P));
189 E void FDECL(status_notify_windowport, (BOOLEAN_P));
190 E void NDECL(clear_status_hilites);
191 E int NDECL(count_status_hilites);
192 E boolean NDECL(status_hilite_menu);
193 #endif
194
195 /* ### cmd.c ### */
196
197 E char NDECL(randomkey);
198 E void FDECL(random_response, (char *, int));
199 E int NDECL(rnd_extcmd_idx);
200 E int NDECL(doconduct);
201 E int NDECL(domonability);
202 E char FDECL(cmd_from_func, (int NDECL((*))));
203 E boolean FDECL(redraw_cmd, (CHAR_P));
204 #ifdef USE_TRAMPOLI
205 E int NDECL(doextcmd);
206 E int NDECL(domonability);
207 E int NDECL(doprev_message);
208 E int NDECL(timed_occupation);
209 E int NDECL(doattributes);
210 E int NDECL(wiz_detect);
211 E int NDECL(wiz_genesis);
212 E int NDECL(wiz_identify);
213 E int NDECL(wiz_level_tele);
214 E int NDECL(wiz_map);
215 E int NDECL(wiz_where);
216 E int NDECL(wiz_wish);
217 #endif /* USE_TRAMPOLI */
218 E void NDECL(reset_occupations);
219 E void FDECL(set_occupation, (int (*)(void), const char *, int));
220 E char NDECL(pgetchar);
221 E void FDECL(pushch, (CHAR_P));
222 E void FDECL(savech, (CHAR_P));
223 E const char *FDECL(key2extcmddesc, (UCHAR_P));
224 E boolean FDECL(bind_specialkey, (UCHAR_P, const char *));
225 E char FDECL(txt2key, (char *));
226 E void FDECL(parseautocomplete, (char *, BOOLEAN_P));
227 E void FDECL(reset_commands, (BOOLEAN_P));
228 E void FDECL(rhack, (char *));
229 E int NDECL(doextlist);
230 E int NDECL(extcmd_via_menu);
231 E int NDECL(enter_explore_mode);
232 E void FDECL(enlightenment, (int, int));
233 E void FDECL(youhiding, (BOOLEAN_P, int));
234 E void FDECL(show_conduct, (int));
235 E boolean FDECL(bind_key, (UCHAR_P, const char *));
236 E void NDECL(dokeylist);
237 E int FDECL(xytod, (SCHAR_P, SCHAR_P));
238 E void FDECL(dtoxy, (coord *, int));
239 E int FDECL(movecmd, (CHAR_P));
240 E int NDECL(dxdy_moveok);
241 E int FDECL(getdir, (const char *));
242 E void NDECL(confdir);
243 E const char *FDECL(directionname, (int));
244 E int FDECL(isok, (int, int));
245 E int FDECL(get_adjacent_loc,
246             (const char *, const char *, XCHAR_P, XCHAR_P, coord *));
247 E const char *FDECL(click_to_cmd, (int, int, int));
248 E char FDECL(get_count, (char *, CHAR_P, long, long *, BOOLEAN_P));
249 #ifdef HANGUPHANDLING
250 E void FDECL(hangup, (int));
251 E void NDECL(end_of_input);
252 #endif
253 E char NDECL(readchar);
254 E void NDECL(sanity_check);
255 E char* FDECL(key2txt, (UCHAR_P, char *));
256 E char FDECL(yn_function, (const char *, const char *, CHAR_P));
257 E boolean FDECL(paranoid_query, (BOOLEAN_P, const char *));
258
259 /* ### dbridge.c ### */
260
261 E boolean FDECL(is_pool, (int, int));
262 E boolean FDECL(is_lava, (int, int));
263 E boolean FDECL(is_pool_or_lava, (int, int));
264 E boolean FDECL(is_ice, (int, int));
265 E boolean FDECL(is_moat, (int, int));
266 E schar FDECL(db_under_typ, (int));
267 E int FDECL(is_drawbridge_wall, (int, int));
268 E boolean FDECL(is_db_wall, (int, int));
269 E boolean FDECL(find_drawbridge, (int *, int *));
270 E boolean FDECL(create_drawbridge, (int, int, int, BOOLEAN_P));
271 E void FDECL(open_drawbridge, (int, int));
272 E void FDECL(close_drawbridge, (int, int));
273 E void FDECL(destroy_drawbridge, (int, int));
274
275 /* ### decl.c ### */
276
277 E void NDECL(decl_init);
278
279 /* ### detect.c ### */
280
281 E boolean FDECL(trapped_chest_at, (int, int, int));
282 E boolean FDECL(trapped_door_at, (int, int, int));
283 E struct obj *FDECL(o_in, (struct obj *, CHAR_P));
284 E struct obj *FDECL(o_material, (struct obj *, unsigned));
285 E int FDECL(gold_detect, (struct obj *));
286 E int FDECL(food_detect, (struct obj *));
287 E int FDECL(object_detect, (struct obj *, int));
288 E int FDECL(monster_detect, (struct obj *, int));
289 E int FDECL(trap_detect, (struct obj *));
290 E const char *FDECL(level_distance, (d_level *));
291 E void FDECL(use_crystal_ball, (struct obj **));
292 E void NDECL(do_mapping);
293 E void FDECL(do_vicinity_map, (struct obj *));
294 E void FDECL(cvt_sdoor_to_door, (struct rm *));
295 #ifdef USE_TRAMPOLI
296 E void FDECL(findone, (int, int, genericptr_t));
297 E void FDECL(openone, (int, int, genericptr_t));
298 #endif
299 E int NDECL(findit);
300 E int NDECL(openit);
301 E boolean FDECL(detecting, (void (*)(int, int, genericptr)));
302 E void FDECL(find_trap, (struct trap *));
303 E void NDECL(warnreveal);
304 E int FDECL(dosearch0, (int));
305 E int NDECL(dosearch);
306 E void NDECL(sokoban_detect);
307 #ifdef DUMPLOG
308 E void NDECL(dump_map);
309 #endif
310 E void FDECL(reveal_terrain, (int, int));
311
312 /* ### dig.c ### */
313
314 E int FDECL(dig_typ, (struct obj *, XCHAR_P, XCHAR_P));
315 E boolean NDECL(is_digging);
316 #ifdef USE_TRAMPOLI
317 E int NDECL(dig);
318 #endif
319 E int NDECL(holetime);
320 E boolean FDECL(dig_check, (struct monst *, BOOLEAN_P, int, int));
321 E void FDECL(digactualhole, (int, int, struct monst *, int));
322 E boolean FDECL(dighole, (BOOLEAN_P, BOOLEAN_P, coord *));
323 E int FDECL(use_pick_axe, (struct obj *));
324 E int FDECL(use_pick_axe2, (struct obj *));
325 E boolean FDECL(mdig_tunnel, (struct monst *));
326 E void FDECL(draft_message, (BOOLEAN_P));
327 E void FDECL(watch_dig, (struct monst *, XCHAR_P, XCHAR_P, BOOLEAN_P));
328 E void NDECL(zap_dig);
329 E struct obj *FDECL(bury_an_obj, (struct obj *, boolean *));
330 E void FDECL(bury_objs, (int, int));
331 E void FDECL(unearth_objs, (int, int));
332 E void FDECL(rot_organic, (ANY_P *, long));
333 E void FDECL(rot_corpse, (ANY_P *, long));
334 E struct obj *FDECL(buried_ball, (coord *));
335 E void NDECL(buried_ball_to_punishment);
336 E void NDECL(buried_ball_to_freedom);
337 E schar FDECL(fillholetyp, (int, int, BOOLEAN_P));
338 E void FDECL(liquid_flow,
339              (XCHAR_P, XCHAR_P, SCHAR_P, struct trap *, const char *));
340 E boolean FDECL(conjoined_pits, (struct trap *, struct trap *, BOOLEAN_P));
341 #if 0
342 E void FDECL(bury_monst, (struct monst *));
343 E void NDECL(bury_you);
344 E void NDECL(unearth_you);
345 E void NDECL(escape_tomb);
346 E void FDECL(bury_obj, (struct obj *));
347 #endif
348
349 /* ### display.c ### */
350
351 E void FDECL(magic_map_background, (XCHAR_P, XCHAR_P, int));
352 E void FDECL(map_background, (XCHAR_P, XCHAR_P, int));
353 E void FDECL(map_trap, (struct trap *, int));
354 E void FDECL(map_object, (struct obj *, int));
355 E void FDECL(map_invisible, (XCHAR_P, XCHAR_P));
356 E boolean FDECL(unmap_invisible, (int, int));
357 E void FDECL(unmap_object, (int, int));
358 E void FDECL(map_location, (int, int, int));
359 E void FDECL(feel_newsym, (XCHAR_P, XCHAR_P));
360 E void FDECL(feel_location, (XCHAR_P, XCHAR_P));
361 E void FDECL(newsym, (int, int));
362 E void FDECL(newsym_force, (int, int));
363 E void FDECL(shieldeff, (XCHAR_P, XCHAR_P));
364 E void FDECL(tmp_at, (int, int));
365 E void FDECL(flash_glyph_at, (int, int, int, int));
366 E void FDECL(swallowed, (int));
367 E void FDECL(under_ground, (int));
368 E void FDECL(under_water, (int));
369 E void NDECL(see_monsters);
370 E void NDECL(set_mimic_blocking);
371 E void NDECL(see_objects);
372 E void NDECL(see_traps);
373 E void NDECL(curs_on_u);
374 E int NDECL(doredraw);
375 E void NDECL(docrt);
376 E void NDECL(redraw_map);
377 E void FDECL(show_glyph, (int, int, int));
378 E void NDECL(clear_glyph_buffer);
379 E void FDECL(row_refresh, (int, int, int));
380 E void NDECL(cls);
381 E void FDECL(flush_screen, (int));
382 E int FDECL(back_to_glyph, (XCHAR_P, XCHAR_P));
383 E int FDECL(zapdir_to_glyph, (int, int, int));
384 E int FDECL(glyph_at, (XCHAR_P, XCHAR_P));
385 E void NDECL(set_wall_state);
386 E void FDECL(unset_seenv, (struct rm *, int, int, int, int));
387 E int FDECL(warning_of, (struct monst *));
388
389 /* ### do.c ### */
390
391 #ifdef USE_TRAMPOLI
392 E int FDECL(drop, (struct obj *));
393 E int NDECL(wipeoff);
394 #endif
395 E int NDECL(dodrop);
396 E boolean FDECL(boulder_hits_pool, (struct obj *, int, int, BOOLEAN_P));
397 E boolean FDECL(flooreffects, (struct obj *, int, int, const char *));
398 E void FDECL(doaltarobj, (struct obj *));
399 E boolean FDECL(canletgo, (struct obj *, const char *));
400 E void FDECL(dropx, (struct obj *));
401 E void FDECL(dropy, (struct obj *));
402 E void FDECL(dropz, (struct obj *, BOOLEAN_P));
403 E void FDECL(obj_no_longer_held, (struct obj *));
404 E int NDECL(doddrop);
405 E int NDECL(dodown);
406 E int NDECL(doup);
407 #ifdef INSURANCE
408 E void NDECL(save_currentstate);
409 #endif
410 E void FDECL(u_collide_m, (struct monst *));
411 E void FDECL(goto_level, (d_level *, BOOLEAN_P, BOOLEAN_P, BOOLEAN_P));
412 E void FDECL(schedule_goto, (d_level *, BOOLEAN_P, BOOLEAN_P, int,
413                              const char *, const char *));
414 E void NDECL(deferred_goto);
415 E boolean FDECL(revive_corpse, (struct obj *));
416 E void FDECL(revive_mon, (ANY_P *, long));
417 E int NDECL(donull);
418 E int NDECL(dowipe);
419 E void FDECL(set_wounded_legs, (long, int));
420 E void FDECL(heal_legs, (int));
421
422 /* ### do_name.c ### */
423
424 E char *FDECL(coord_desc, (int, int, char *, CHAR_P));
425 E boolean FDECL(getpos_menu, (coord *, int));
426 E int FDECL(getpos, (coord *, BOOLEAN_P, const char *));
427 E void FDECL(getpos_sethilite, (void (*f)(int), boolean (*d)(int,int)));
428 E void FDECL(new_mname, (struct monst *, int));
429 E void FDECL(free_mname, (struct monst *));
430 E void FDECL(new_oname, (struct obj *, int));
431 E void FDECL(free_oname, (struct obj *));
432 E const char *FDECL(safe_oname, (struct obj *));
433 E struct monst *FDECL(christen_monst, (struct monst *, const char *));
434 E struct obj *FDECL(oname, (struct obj *, const char *));
435 E boolean FDECL(objtyp_is_callable, (int));
436 E int NDECL(docallcmd);
437 E void FDECL(docall, (struct obj *));
438 E const char *NDECL(rndghostname);
439 E char *FDECL(x_monnam, (struct monst *, int, const char *, int, BOOLEAN_P));
440 E char *FDECL(l_monnam, (struct monst *));
441 E char *FDECL(mon_nam, (struct monst *));
442 E char *FDECL(noit_mon_nam, (struct monst *));
443 E char *FDECL(Monnam, (struct monst *));
444 E char *FDECL(noit_Monnam, (struct monst *));
445 E char *FDECL(noname_monnam, (struct monst *, int));
446 E char *FDECL(m_monnam, (struct monst *));
447 E char *FDECL(y_monnam, (struct monst *));
448 E char *FDECL(Adjmonnam, (struct monst *, const char *));
449 E char *FDECL(Amonnam, (struct monst *));
450 E char *FDECL(a_monnam, (struct monst *));
451 E char *FDECL(distant_monnam, (struct monst *, int, char *));
452 E char *FDECL(mon_nam_too, (struct monst *, struct monst *));
453 E char *FDECL(minimal_monnam, (struct monst *, BOOLEAN_P));
454 E char *FDECL(rndmonnam, (char *));
455 E const char *FDECL(hcolor, (const char *));
456 E const char *NDECL(rndcolor);
457 E const char *FDECL(hliquid, (const char *));
458 E const char *NDECL(roguename);
459 E struct obj *FDECL(realloc_obj,
460                     (struct obj *, int, genericptr_t, int, const char *));
461 E char *FDECL(coyotename, (struct monst *, char *));
462 E char *FDECL(rndorcname, (char *));
463 E struct monst *FDECL(christen_orc, (struct monst *, const char *,
464                                      const char *));
465 E const char *FDECL(noveltitle, (int *));
466 E const char *FDECL(lookup_novel, (const char *, int *));
467
468 /* ### do_wear.c ### */
469
470 #ifdef USE_TRAMPOLI
471 E int NDECL(Armor_on);
472 E int NDECL(Boots_on);
473 E int NDECL(Gloves_on);
474 E int NDECL(Helmet_on);
475 E int FDECL(select_off, (struct obj *));
476 E int NDECL(take_off);
477 #endif
478 E const char *FDECL(fingers_or_gloves, (BOOLEAN_P));
479 E void FDECL(off_msg, (struct obj *));
480 E void FDECL(set_wear, (struct obj *));
481 E boolean FDECL(donning, (struct obj *));
482 E boolean FDECL(doffing, (struct obj *));
483 E void FDECL(cancel_doff, (struct obj *, long));
484 E void NDECL(cancel_don);
485 E int FDECL(stop_donning, (struct obj *));
486 E int NDECL(Armor_off);
487 E int NDECL(Armor_gone);
488 E int NDECL(Helmet_off);
489 E int NDECL(Gloves_off);
490 E int NDECL(Boots_on);
491 E int NDECL(Boots_off);
492 E int NDECL(Cloak_off);
493 E int NDECL(Shield_off);
494 E int NDECL(Shirt_off);
495 E void NDECL(Amulet_off);
496 E void FDECL(Ring_on, (struct obj *));
497 E void FDECL(Ring_off, (struct obj *));
498 E void FDECL(Ring_gone, (struct obj *));
499 E void FDECL(Blindf_on, (struct obj *));
500 E void FDECL(Blindf_off, (struct obj *));
501 E int NDECL(dotakeoff);
502 E int NDECL(doremring);
503 E int FDECL(cursed, (struct obj *));
504 E int FDECL(armoroff, (struct obj *));
505 E int FDECL(canwearobj, (struct obj *, long *, BOOLEAN_P));
506 E int NDECL(dowear);
507 E int NDECL(doputon);
508 E void NDECL(find_ac);
509 E void NDECL(glibr);
510 E struct obj *FDECL(some_armor, (struct monst *));
511 E struct obj *FDECL(stuck_ring, (struct obj *, int));
512 E struct obj *NDECL(unchanger);
513 E void NDECL(reset_remarm);
514 E int NDECL(doddoremarm);
515 E int FDECL(destroy_arm, (struct obj *));
516 E void FDECL(adj_abon, (struct obj *, SCHAR_P));
517 E boolean
518 FDECL(inaccessible_equipment, (struct obj *, const char *, BOOLEAN_P));
519
520 /* ### dog.c ### */
521
522 E void FDECL(newedog, (struct monst *));
523 E void FDECL(free_edog, (struct monst *));
524 E void FDECL(initedog, (struct monst *));
525 E struct monst *FDECL(make_familiar,
526                       (struct obj *, XCHAR_P, XCHAR_P, BOOLEAN_P));
527 E struct monst *NDECL(makedog);
528 E void NDECL(update_mlstmv);
529 E void NDECL(losedogs);
530 E void FDECL(mon_arrive, (struct monst *, BOOLEAN_P));
531 E void FDECL(mon_catchup_elapsed_time, (struct monst *, long));
532 E void FDECL(keepdogs, (BOOLEAN_P));
533 E void FDECL(migrate_to_level, (struct monst *, XCHAR_P, XCHAR_P, coord *));
534 E int FDECL(dogfood, (struct monst *, struct obj *));
535 E boolean FDECL(tamedog, (struct monst *, struct obj *));
536 E void FDECL(abuse_dog, (struct monst *));
537 E void FDECL(wary_dog, (struct monst *, BOOLEAN_P));
538
539 /* ### dogmove.c ### */
540
541 E struct obj *FDECL(droppables, (struct monst *));
542 E int FDECL(dog_nutrition, (struct monst *, struct obj *));
543 E int FDECL(dog_eat, (struct monst *, struct obj *, int, int, BOOLEAN_P));
544 E int FDECL(dog_move, (struct monst *, int));
545 #ifdef USE_TRAMPOLI
546 E void FDECL(wantdoor, (int, int, genericptr_t));
547 #endif
548 E void FDECL(finish_meating, (struct monst *));
549
550 /* ### dokick.c ### */
551
552 E boolean FDECL(ghitm, (struct monst *, struct obj *));
553 E void FDECL(container_impact_dmg, (struct obj *, XCHAR_P, XCHAR_P));
554 E int NDECL(dokick);
555 E boolean FDECL(ship_object, (struct obj *, XCHAR_P, XCHAR_P, BOOLEAN_P));
556 E void FDECL(obj_delivery, (BOOLEAN_P));
557 E void FDECL(deliver_obj_to_mon, (struct monst *mtmp, int, unsigned long));
558 E schar FDECL(down_gate, (XCHAR_P, XCHAR_P));
559 E void FDECL(impact_drop, (struct obj *, XCHAR_P, XCHAR_P, XCHAR_P));
560
561 /* ### dothrow.c ### */
562
563 E int NDECL(dothrow);
564 E int NDECL(dofire);
565 E void FDECL(endmultishot, (BOOLEAN_P));
566 E void FDECL(hitfloor, (struct obj *, BOOLEAN_P));
567 E void FDECL(hurtle, (int, int, int, BOOLEAN_P));
568 E void FDECL(mhurtle, (struct monst *, int, int, int));
569 E boolean FDECL(throwing_weapon, (struct obj *));
570 E void FDECL(throwit, (struct obj *, long, BOOLEAN_P));
571 E int FDECL(omon_adj, (struct monst *, struct obj *, BOOLEAN_P));
572 E int FDECL(thitmonst, (struct monst *, struct obj *));
573 E int FDECL(hero_breaks, (struct obj *, XCHAR_P, XCHAR_P, BOOLEAN_P));
574 E int FDECL(breaks, (struct obj *, XCHAR_P, XCHAR_P));
575 E void FDECL(release_camera_demon, (struct obj *, XCHAR_P, XCHAR_P));
576 E void FDECL(breakobj, (struct obj *, XCHAR_P, XCHAR_P, BOOLEAN_P, BOOLEAN_P));
577 E boolean FDECL(breaktest, (struct obj *));
578 E boolean FDECL(walk_path, (coord *, coord *,
579                             boolean (*)(genericptr, int, int), genericptr_t));
580 E boolean FDECL(hurtle_jump, (genericptr_t, int, int));
581 E boolean FDECL(hurtle_step, (genericptr_t, int, int));
582
583 /* ### drawing.c ### */
584 #endif /* !MAKEDEFS_C && !LEV_LEX_C */
585 E int FDECL(def_char_to_objclass, (CHAR_P));
586 E int FDECL(def_char_to_monclass, (CHAR_P));
587 #if !defined(MAKEDEFS_C) && !defined(LEV_LEX_C)
588 E void FDECL(switch_symbols, (int));
589 E void FDECL(assign_graphics, (int));
590 E void NDECL(init_symbols);
591 E void NDECL(init_showsyms);
592 E void NDECL(init_primary_symbols);
593 E void NDECL(init_rogue_symbols);
594 E void NDECL(init_ov_primary_symbols);
595 E void NDECL(init_ov_rogue_symbols);
596 E void FDECL(clear_symsetentry, (int, BOOLEAN_P));
597 E void FDECL(update_primary_symset, (struct symparse *, int));
598 E void FDECL(update_rogue_symset, (struct symparse *, int));
599 E void FDECL(update_ov_primary_symset, (struct symparse *, int));
600 E void FDECL(update_ov_rogue_symset, (struct symparse *, int));
601 E boolean FDECL(cursed_object_at, (int, int));
602 E nhsym FDECL(get_othersym, (int, int));
603
604 /* ### dungeon.c ### */
605
606 E void FDECL(save_dungeon, (int, BOOLEAN_P, BOOLEAN_P));
607 E void FDECL(restore_dungeon, (int));
608 E void FDECL(insert_branch, (branch *, BOOLEAN_P));
609 E void NDECL(init_dungeons);
610 E s_level *FDECL(find_level, (const char *));
611 E s_level *FDECL(Is_special, (d_level *));
612 E branch *FDECL(Is_branchlev, (d_level *));
613 E boolean FDECL(builds_up, (d_level *));
614 E xchar FDECL(ledger_no, (d_level *));
615 E xchar NDECL(maxledgerno);
616 E schar FDECL(depth, (d_level *));
617 E xchar FDECL(dunlev, (d_level *));
618 E xchar FDECL(dunlevs_in_dungeon, (d_level *));
619 E xchar FDECL(ledger_to_dnum, (XCHAR_P));
620 E xchar FDECL(ledger_to_dlev, (XCHAR_P));
621 E xchar FDECL(deepest_lev_reached, (BOOLEAN_P));
622 E boolean FDECL(on_level, (d_level *, d_level *));
623 E void FDECL(next_level, (BOOLEAN_P));
624 E void FDECL(prev_level, (BOOLEAN_P));
625 E void FDECL(u_on_newpos, (int, int));
626 E void FDECL(u_on_rndspot, (int));
627 E void FDECL(u_on_sstairs, (int));
628 E void NDECL(u_on_upstairs);
629 E void NDECL(u_on_dnstairs);
630 E boolean FDECL(On_stairs, (XCHAR_P, XCHAR_P));
631 E void FDECL(get_level, (d_level *, int));
632 E boolean FDECL(Is_botlevel, (d_level *));
633 E boolean FDECL(Can_fall_thru, (d_level *));
634 E boolean FDECL(Can_dig_down, (d_level *));
635 E boolean FDECL(Can_rise_up, (int, int, d_level *));
636 E boolean FDECL(has_ceiling, (d_level *));
637 E boolean FDECL(In_quest, (d_level *));
638 E boolean FDECL(In_mines, (d_level *));
639 E branch *FDECL(dungeon_branch, (const char *));
640 E boolean FDECL(at_dgn_entrance, (const char *));
641 E boolean FDECL(In_hell, (d_level *));
642 E boolean FDECL(In_V_tower, (d_level *));
643 E boolean FDECL(On_W_tower_level, (d_level *));
644 E boolean FDECL(In_W_tower, (int, int, d_level *));
645 E void FDECL(find_hell, (d_level *));
646 E void FDECL(goto_hell, (BOOLEAN_P, BOOLEAN_P));
647 E void FDECL(assign_level, (d_level *, d_level *));
648 E void FDECL(assign_rnd_level, (d_level *, d_level *, int));
649 E int FDECL(induced_align, (int));
650 E boolean FDECL(Invocation_lev, (d_level *));
651 E xchar NDECL(level_difficulty);
652 E schar FDECL(lev_by_name, (const char *));
653 E schar FDECL(print_dungeon, (BOOLEAN_P, schar *, xchar *));
654 E char *FDECL(get_annotation, (d_level *));
655 E int NDECL(donamelevel);
656 E int NDECL(dooverview);
657 E void FDECL(show_overview, (int, int));
658 E void FDECL(forget_mapseen, (int));
659 E void FDECL(rm_mapseen, (int));
660 E void FDECL(init_mapseen, (d_level *));
661 E void NDECL(recalc_mapseen);
662 E void FDECL(mapseen_temple, (struct monst *));
663 E void FDECL(room_discovered, (int));
664 E void FDECL(recbranch_mapseen, (d_level *, d_level *));
665 E void FDECL(overview_stats, (winid, const char *, long *, long *));
666 E void FDECL(remdun_mapseen, (int));
667 E const char *FDECL(endgamelevelname, (char *, int));
668
669 /* ### eat.c ### */
670
671 #ifdef USE_TRAMPOLI
672 E int NDECL(eatmdone);
673 E int NDECL(eatfood);
674 E int NDECL(opentin);
675 E int NDECL(unfaint);
676 #endif
677 E void NDECL(eatmupdate);
678 E boolean FDECL(is_edible, (struct obj *));
679 E void NDECL(init_uhunger);
680 E int NDECL(Hear_again);
681 E void NDECL(reset_eat);
682 E int NDECL(doeat);
683 E int FDECL(use_tin_opener, (struct obj *));
684 E void NDECL(gethungry);
685 E void FDECL(morehungry, (int));
686 E void FDECL(lesshungry, (int));
687 E boolean NDECL(is_fainted);
688 E void NDECL(reset_faint);
689 E void NDECL(violated_vegetarian);
690 E void FDECL(newuhs, (BOOLEAN_P));
691 E struct obj *FDECL(floorfood, (const char *, int));
692 E void NDECL(vomit);
693 E int FDECL(eaten_stat, (int, struct obj *));
694 E void FDECL(food_disappears, (struct obj *));
695 E void FDECL(food_substitution, (struct obj *, struct obj *));
696 E void FDECL(eating_conducts, (struct permonst *));
697 E int FDECL(eat_brains, (struct monst *, struct monst *, BOOLEAN_P, int *));
698 E void NDECL(fix_petrification);
699 E void FDECL(consume_oeaten, (struct obj *, int));
700 E boolean FDECL(maybe_finished_meal, (BOOLEAN_P));
701 E void FDECL(set_tin_variety, (struct obj *, int));
702 E int FDECL(tin_variety_txt, (char *, int *));
703 E void FDECL(tin_details, (struct obj *, int, char *));
704 E boolean FDECL(Popeye, (int));
705
706 /* ### end.c ### */
707
708 E void FDECL(done1, (int));
709 E int NDECL(done2);
710 #ifdef USE_TRAMPOLI
711 E void FDECL(done_intr, (int));
712 #endif
713 E void FDECL(done_in_by, (struct monst *, int));
714 #endif /* !MAKEDEFS_C && !LEV_LEX_C */
715 E void VDECL(panic, (const char *, ...)) PRINTF_F(1, 2) NORETURN;
716 #if !defined(MAKEDEFS_C) && !defined(LEV_LEX_C)
717 E void FDECL(done, (int));
718 E void FDECL(container_contents, (struct obj *, BOOLEAN_P,
719                                   BOOLEAN_P, BOOLEAN_P));
720 E void FDECL(nh_terminate, (int)) NORETURN;
721 E int NDECL(dovanquished);
722 E int NDECL(num_genocides);
723 E void FDECL(delayed_killer, (int, int, const char *));
724 E struct kinfo *FDECL(find_delayed_killer, (int));
725 E void FDECL(dealloc_killer, (struct kinfo *));
726 E void FDECL(save_killers, (int, int));
727 E void FDECL(restore_killers, (int));
728 E char *FDECL(build_english_list, (char *));
729 #if defined(PANICTRACE) && !defined(NO_SIGNAL)
730 E void FDECL(panictrace_setsignals, (BOOLEAN_P));
731 #endif
732
733 /* ### engrave.c ### */
734
735 E char *FDECL(random_engraving, (char *));
736 E void FDECL(wipeout_text, (char *, int, unsigned));
737 E boolean FDECL(can_reach_floor, (BOOLEAN_P));
738 E void FDECL(cant_reach_floor, (int, int, BOOLEAN_P, BOOLEAN_P));
739 E const char *FDECL(surface, (int, int));
740 E const char *FDECL(ceiling, (int, int));
741 E struct engr *FDECL(engr_at, (XCHAR_P, XCHAR_P));
742 E int FDECL(sengr_at, (const char *, XCHAR_P, XCHAR_P, BOOLEAN_P));
743 E void FDECL(u_wipe_engr, (int));
744 E void FDECL(wipe_engr_at, (XCHAR_P, XCHAR_P, XCHAR_P, BOOLEAN_P));
745 E void FDECL(read_engr_at, (int, int));
746 E void FDECL(make_engr_at, (int, int, const char *, long, XCHAR_P));
747 E void FDECL(del_engr_at, (int, int));
748 E int NDECL(freehand);
749 E int NDECL(doengrave);
750 E void NDECL(sanitize_engravings);
751 E void FDECL(save_engravings, (int, int));
752 E void FDECL(rest_engravings, (int));
753 E void FDECL(engr_stats, (const char *, char *, long *, long *));
754 E void FDECL(del_engr, (struct engr *));
755 E void FDECL(rloc_engr, (struct engr *));
756 E void FDECL(make_grave, (int, int, const char *));
757
758 /* ### exper.c ### */
759
760 E long FDECL(newuexp, (int));
761 E int NDECL(newpw);
762 E int FDECL(experience, (struct monst *, int));
763 E void FDECL(more_experienced, (int, int));
764 E void FDECL(losexp, (const char *));
765 E void NDECL(newexplevel);
766 E void FDECL(pluslvl, (BOOLEAN_P));
767 E long FDECL(rndexp, (BOOLEAN_P));
768
769 /* ### explode.c ### */
770
771 E void FDECL(explode, (int, int, int, int, CHAR_P, int));
772 E long FDECL(scatter, (int, int, int, unsigned int, struct obj *));
773 E void FDECL(splatter_burning_oil, (int, int, BOOLEAN_P));
774 E void FDECL(explode_oil, (struct obj *, int, int));
775
776 /* ### extralev.c ### */
777
778 E void NDECL(makeroguerooms);
779 E void FDECL(corr, (int, int));
780 E void NDECL(makerogueghost);
781
782 /* ### files.c ### */
783
784 E char *FDECL(fname_encode, (const char *, CHAR_P, char *, char *, int));
785 E char *FDECL(fname_decode, (CHAR_P, char *, char *, int));
786 E const char *FDECL(fqname, (const char *, int, int));
787 E FILE *FDECL(fopen_datafile, (const char *, const char *, int));
788 #ifdef MFLOPPY
789 E void NDECL(set_lock_and_bones);
790 #endif
791 E void FDECL(set_levelfile_name, (char *, int));
792 E int FDECL(create_levelfile, (int, char *));
793 E int FDECL(open_levelfile, (int, char *));
794 E void FDECL(delete_levelfile, (int));
795 E void NDECL(clearlocks);
796 E int FDECL(create_bonesfile, (d_level *, char **, char *));
797 #ifdef MFLOPPY
798 E void NDECL(cancel_bonesfile);
799 #endif
800 E void FDECL(commit_bonesfile, (d_level *));
801 E int FDECL(open_bonesfile, (d_level *, char **));
802 E int FDECL(delete_bonesfile, (d_level *));
803 E void NDECL(compress_bonesfile);
804 E void FDECL(set_savefile_name, (BOOLEAN_P));
805 #ifdef INSURANCE
806 E void FDECL(save_savefile_name, (int));
807 #endif
808 #ifndef MICRO
809 E void NDECL(set_error_savefile);
810 #endif
811 E int NDECL(create_savefile);
812 E int NDECL(open_savefile);
813 E int NDECL(delete_savefile);
814 E int NDECL(restore_saved_game);
815 E void FDECL(nh_compress, (const char *));
816 E void FDECL(nh_uncompress, (const char *));
817 E boolean FDECL(lock_file, (const char *, int, int));
818 E void FDECL(unlock_file, (const char *));
819 #ifdef USER_SOUNDS
820 E boolean FDECL(can_read_file, (const char *));
821 #endif
822 E void FDECL(config_error_init, (BOOLEAN_P, const char *, BOOLEAN_P));
823 E void FDECL(config_erradd, (const char *));
824 E int NDECL(config_error_done);
825 E boolean FDECL(read_config_file, (const char *, int));
826 E void FDECL(check_recordfile, (const char *));
827 E void NDECL(read_wizkit);
828 E int FDECL(read_sym_file, (int));
829 E int FDECL(parse_sym_line, (char *, int));
830 E void FDECL(paniclog, (const char *, const char *));
831 E void FDECL(testinglog, (const char *, const char *, const char *));
832 E int FDECL(validate_prefix_locations, (char *));
833 #ifdef SELECTSAVED
834 E char *FDECL(plname_from_file, (const char *));
835 #endif
836 E char **NDECL(get_saved_games);
837 E void FDECL(free_saved_games, (char **));
838 #ifdef SELF_RECOVER
839 E boolean NDECL(recover_savefile);
840 #endif
841 #ifdef SYSCF_FILE
842 E void NDECL(assure_syscf_file);
843 #endif
844 E int FDECL(nhclose, (int));
845 #ifdef HOLD_LOCKFILE_OPEN
846 E void NDECL(really_close);
847 #endif
848 #ifdef DEBUG
849 E boolean FDECL(debugcore, (const char *, BOOLEAN_P));
850 #endif
851 E void NDECL(reveal_paths);
852 E boolean FDECL(read_tribute, (const char *, const char *, int,
853                                char *, int, unsigned));
854 E boolean FDECL(Death_quote, (char *, int));
855
856 /* ### fountain.c ### */
857
858 E void FDECL(floating_above, (const char *));
859 E void FDECL(dogushforth, (int));
860 #ifdef USE_TRAMPOLI
861 E void FDECL(gush, (int, int, genericptr_t));
862 #endif
863 E void FDECL(dryup, (XCHAR_P, XCHAR_P, BOOLEAN_P));
864 E void NDECL(drinkfountain);
865 E void FDECL(dipfountain, (struct obj *));
866 E void FDECL(breaksink, (int, int));
867 E void NDECL(drinksink);
868
869 /* ### hack.c ### */
870
871 E boolean FDECL(is_valid_travelpt, (int,int));
872 E anything *FDECL(uint_to_any, (unsigned));
873 E anything *FDECL(long_to_any, (long));
874 E anything *FDECL(monst_to_any, (struct monst *));
875 E anything *FDECL(obj_to_any, (struct obj *));
876 E boolean FDECL(revive_nasty, (int, int, const char *));
877 E void FDECL(movobj, (struct obj *, XCHAR_P, XCHAR_P));
878 E boolean FDECL(may_dig, (XCHAR_P, XCHAR_P));
879 E boolean FDECL(may_passwall, (XCHAR_P, XCHAR_P));
880 E boolean FDECL(bad_rock, (struct permonst *, XCHAR_P, XCHAR_P));
881 E int FDECL(cant_squeeze_thru, (struct monst *));
882 E boolean FDECL(invocation_pos, (XCHAR_P, XCHAR_P));
883 E boolean FDECL(test_move, (int, int, int, int, int));
884 #ifdef DEBUG
885 E int NDECL(wiz_debug_cmd_traveldisplay);
886 #endif
887 E boolean NDECL(u_rooted);
888 E void NDECL(domove);
889 E boolean NDECL(overexertion);
890 E void NDECL(invocation_message);
891 E void NDECL(switch_terrain);
892 E boolean FDECL(pooleffects, (BOOLEAN_P));
893 E void FDECL(spoteffects, (BOOLEAN_P));
894 E char *FDECL(in_rooms, (XCHAR_P, XCHAR_P, int));
895 E boolean FDECL(in_town, (int, int));
896 E void FDECL(check_special_room, (BOOLEAN_P));
897 E int NDECL(dopickup);
898 E void NDECL(lookaround);
899 E boolean FDECL(crawl_destination, (int, int));
900 E int NDECL(monster_nearby);
901 E void FDECL(nomul, (int));
902 E void FDECL(unmul, (const char *));
903 E void FDECL(losehp, (int, const char *, BOOLEAN_P));
904 E int NDECL(weight_cap);
905 E int NDECL(inv_weight);
906 E int NDECL(near_capacity);
907 E int FDECL(calc_capacity, (int));
908 E int NDECL(max_capacity);
909 E boolean FDECL(check_capacity, (const char *));
910 E int FDECL(inv_cnt, (BOOLEAN_P));
911 E long FDECL(money_cnt, (struct obj *));
912
913 /* ### hacklib.c ### */
914
915 E boolean FDECL(digit, (CHAR_P));
916 E boolean FDECL(letter, (CHAR_P));
917 E char FDECL(highc, (CHAR_P));
918 E char FDECL(lowc, (CHAR_P));
919 E char *FDECL(lcase, (char *));
920 E char *FDECL(ucase, (char *));
921 E char *FDECL(upstart, (char *));
922 E char *FDECL(mungspaces, (char *));
923 E char *FDECL(trimspaces, (char *));
924 E char *FDECL(strip_newline, (char *));
925 E char *FDECL(stripchars, (char *, const char *, const char *));
926 E char *FDECL(eos, (char *));
927 E boolean FDECL(str_end_is, (const char *, const char *));
928 E char *FDECL(strkitten, (char *, CHAR_P));
929 E void FDECL(copynchars, (char *, const char *, int));
930 E char FDECL(chrcasecpy, (int, int));
931 E char *FDECL(strcasecpy, (char *, const char *));
932 E char *FDECL(s_suffix, (const char *));
933 E char *FDECL(ing_suffix, (const char *));
934 E char *FDECL(xcrypt, (const char *, char *));
935 E boolean FDECL(onlyspace, (const char *));
936 E char *FDECL(tabexpand, (char *));
937 E char *FDECL(visctrl, (CHAR_P));
938 E char *FDECL(strsubst, (char *, const char *, const char *));
939 E int FDECL(strNsubst, (char *, const char *, const char *, int));
940 E const char *FDECL(ordin, (int));
941 E char *FDECL(sitoa, (int));
942 E int FDECL(sgn, (int));
943 E int FDECL(rounddiv, (long, int));
944 E int FDECL(dist2, (int, int, int, int));
945 E int FDECL(isqrt, (int));
946 E int FDECL(distmin, (int, int, int, int));
947 E boolean FDECL(online2, (int, int, int, int));
948 E boolean FDECL(pmatch, (const char *, const char *));
949 E boolean FDECL(pmatchi, (const char *, const char *));
950 E boolean FDECL(pmatchz, (const char *, const char *));
951 #ifndef STRNCMPI
952 E int FDECL(strncmpi, (const char *, const char *, int));
953 #endif
954 #ifndef STRSTRI
955 E char *FDECL(strstri, (const char *, const char *));
956 #endif
957 E boolean
958 FDECL(fuzzymatch, (const char *, const char *, const char *, BOOLEAN_P));
959 E void FDECL(init_random, (int FDECL((*fn), (int))));
960 E void FDECL(reseed_random, (int FDECL((*fn), (int))));
961 E time_t NDECL(getnow);
962 E int NDECL(getyear);
963 #if 0
964 E char *FDECL(yymmdd, (time_t));
965 #endif
966 E long FDECL(yyyymmdd, (time_t));
967 E long FDECL(hhmmss, (time_t));
968 E char *FDECL(yyyymmddhhmmss, (time_t));
969 E time_t FDECL(time_from_yyyymmddhhmmss, (char *));
970 E int NDECL(phase_of_the_moon);
971 E boolean NDECL(friday_13th);
972 E int NDECL(night);
973 E int NDECL(midnight);
974 E void FDECL(strbuf_init, (strbuf_t *));
975 E void FDECL(strbuf_append, (strbuf_t *, const char *));
976 E void FDECL(strbuf_reserve, (strbuf_t *, int));
977 E void FDECL(strbuf_empty, (strbuf_t *));
978 E void FDECL(strbuf_nl_to_crlf, (strbuf_t *));
979
980 /* ### invent.c ### */
981
982 E Loot *FDECL(sortloot, (struct obj **, unsigned, BOOLEAN_P,
983                          boolean (*)(OBJ_P)));
984 E void FDECL(unsortloot, (Loot **));
985 E void FDECL(assigninvlet, (struct obj *));
986 E struct obj *FDECL(merge_choice, (struct obj *, struct obj *));
987 E int FDECL(merged, (struct obj **, struct obj **));
988 #ifdef USE_TRAMPOLI
989 E int FDECL(ckunpaid, (struct obj *));
990 #endif
991 E void FDECL(addinv_core1, (struct obj *));
992 E void FDECL(addinv_core2, (struct obj *));
993 E struct obj *FDECL(addinv, (struct obj *));
994 E struct obj *FDECL(hold_another_object,
995                     (struct obj *, const char *, const char *, const char *));
996 E void FDECL(useupall, (struct obj *));
997 E void FDECL(useup, (struct obj *));
998 E void FDECL(consume_obj_charge, (struct obj *, BOOLEAN_P));
999 E void FDECL(freeinv_core, (struct obj *));
1000 E void FDECL(freeinv, (struct obj *));
1001 E void FDECL(delallobj, (int, int));
1002 E void FDECL(delobj, (struct obj *));
1003 E struct obj *FDECL(sobj_at, (int, int, int));
1004 E struct obj *FDECL(nxtobj, (struct obj *, int, BOOLEAN_P));
1005 E struct obj *FDECL(carrying, (int));
1006 E boolean NDECL(have_lizard);
1007 E struct obj *NDECL(u_have_novel);
1008 E struct obj *FDECL(o_on, (unsigned int, struct obj *));
1009 E boolean FDECL(obj_here, (struct obj *, int, int));
1010 E boolean NDECL(wearing_armor);
1011 E boolean FDECL(is_worn, (struct obj *));
1012 E struct obj *FDECL(g_at, (int, int));
1013 E boolean FDECL(splittable, (struct obj *));
1014 E struct obj *FDECL(getobj, (const char *, const char *));
1015 E int FDECL(ggetobj, (const char *, int (*)(OBJ_P), int,
1016                       BOOLEAN_P, unsigned *));
1017 E int FDECL(askchain, (struct obj **, const char *, int, int (*)(OBJ_P),
1018                        int (*)(OBJ_P), int, const char *));
1019 E void FDECL(fully_identify_obj, (struct obj *));
1020 E int FDECL(identify, (struct obj *));
1021 E int FDECL(count_unidentified, (struct obj *));
1022 E void FDECL(identify_pack, (int, BOOLEAN_P));
1023 E void NDECL(learn_unseen_invent);
1024 E void NDECL(update_inventory);
1025 E void FDECL(prinv, (const char *, struct obj *, long));
1026 E char *FDECL(xprname,
1027               (struct obj *, const char *, CHAR_P, BOOLEAN_P, long, long));
1028 E int NDECL(ddoinv);
1029 E char FDECL(display_inventory, (const char *, BOOLEAN_P));
1030 E int FDECL(display_binventory, (int, int, BOOLEAN_P));
1031 E struct obj *FDECL(display_cinventory, (struct obj *));
1032 E struct obj *FDECL(display_minventory, (struct monst *, int, char *));
1033 E int NDECL(dotypeinv);
1034 E const char *FDECL(dfeature_at, (int, int, char *));
1035 E int FDECL(look_here, (int, BOOLEAN_P));
1036 E int NDECL(dolook);
1037 E boolean FDECL(will_feel_cockatrice, (struct obj *, BOOLEAN_P));
1038 E void FDECL(feel_cockatrice, (struct obj *, BOOLEAN_P));
1039 E void FDECL(stackobj, (struct obj *));
1040 E boolean FDECL(mergable, (struct obj *, struct obj *));
1041 E int NDECL(doprgold);
1042 E int NDECL(doprwep);
1043 E int NDECL(doprarm);
1044 E int NDECL(doprring);
1045 E int NDECL(dopramulet);
1046 E int NDECL(doprtool);
1047 E int NDECL(doprinuse);
1048 E void FDECL(useupf, (struct obj *, long));
1049 E char *FDECL(let_to_name, (CHAR_P, BOOLEAN_P, BOOLEAN_P));
1050 E void NDECL(free_invbuf);
1051 E void NDECL(reassign);
1052 E int NDECL(doorganize);
1053 E void NDECL(free_pickinv_cache);
1054 E int FDECL(count_unpaid, (struct obj *));
1055 E int FDECL(count_buc, (struct obj *, int, boolean (*)(OBJ_P)));
1056 E void FDECL(tally_BUCX, (struct obj *, BOOLEAN_P,
1057                           int *, int *, int *, int *, int *));
1058 E long FDECL(count_contents, (struct obj *,
1059                               BOOLEAN_P, BOOLEAN_P, BOOLEAN_P, BOOLEAN_P));
1060 E void FDECL(carry_obj_effects, (struct obj *));
1061 E const char *FDECL(currency, (long));
1062 E void FDECL(silly_thing, (const char *, struct obj *));
1063
1064 /* ### ioctl.c ### */
1065
1066 #if defined(UNIX) || defined(__BEOS__)
1067 E void NDECL(getwindowsz);
1068 E void NDECL(getioctls);
1069 E void NDECL(setioctls);
1070 #ifdef SUSPEND
1071 E int NDECL(dosuspend);
1072 #endif /* SUSPEND */
1073 #endif /* UNIX || __BEOS__ */
1074
1075 /* ### light.c ### */
1076
1077 E void FDECL(new_light_source, (XCHAR_P, XCHAR_P, int, int, ANY_P *));
1078 E void FDECL(del_light_source, (int, ANY_P *));
1079 E void FDECL(do_light_sources, (char **));
1080 E void FDECL(show_transient_light, (struct obj *, int, int));
1081 E void NDECL(transient_light_cleanup);
1082 E struct monst *FDECL(find_mid, (unsigned, unsigned));
1083 E void FDECL(save_light_sources, (int, int, int));
1084 E void FDECL(restore_light_sources, (int));
1085 E void FDECL(light_stats, (const char *, char *, long *, long *));
1086 E void FDECL(relink_light_sources, (BOOLEAN_P));
1087 E void NDECL(light_sources_sanity_check);
1088 E void FDECL(obj_move_light_source, (struct obj *, struct obj *));
1089 E boolean NDECL(any_light_source);
1090 E void FDECL(snuff_light_source, (int, int));
1091 E boolean FDECL(obj_sheds_light, (struct obj *));
1092 E boolean FDECL(obj_is_burning, (struct obj *));
1093 E void FDECL(obj_split_light_source, (struct obj *, struct obj *));
1094 E void FDECL(obj_merge_light_sources, (struct obj *, struct obj *));
1095 E void FDECL(obj_adjust_light_radius, (struct obj *, int));
1096 E int FDECL(candle_light_range, (struct obj *));
1097 E int FDECL(arti_light_radius, (struct obj *));
1098 E const char *FDECL(arti_light_description, (struct obj *));
1099 E int NDECL(wiz_light_sources);
1100
1101 /* ### lock.c ### */
1102
1103 #ifdef USE_TRAMPOLI
1104 E int NDECL(forcelock);
1105 E int NDECL(picklock);
1106 #endif
1107 E boolean FDECL(picking_lock, (int *, int *));
1108 E boolean FDECL(picking_at, (int, int));
1109 E void FDECL(breakchestlock, (struct obj *, BOOLEAN_P));
1110 E void NDECL(reset_pick);
1111 E void FDECL(maybe_reset_pick, (struct obj *));
1112 E int FDECL(pick_lock, (struct obj *));
1113 E int NDECL(doforce);
1114 E boolean FDECL(boxlock, (struct obj *, struct obj *));
1115 E boolean FDECL(doorlock, (struct obj *, int, int));
1116 E int NDECL(doopen);
1117 E boolean FDECL(stumble_on_door_mimic, (int, int));
1118 E int FDECL(doopen_indir, (int, int));
1119 E int NDECL(doclose);
1120
1121 #ifdef MAC
1122 /* These declarations are here because the main code calls them. */
1123
1124 /* ### macfile.c ### */
1125
1126 E int FDECL(maccreat, (const char *, long));
1127 E int FDECL(macopen, (const char *, int, long));
1128 E int FDECL(macclose, (int));
1129 E int FDECL(macread, (int, void *, unsigned));
1130 E int FDECL(macwrite, (int, void *, unsigned));
1131 E long FDECL(macseek, (int, long, short));
1132 E int FDECL(macunlink, (const char *));
1133
1134 /* ### macmain.c ### */
1135
1136 E boolean NDECL(authorize_wizard_mode);
1137
1138 /* ### macsnd.c ### */
1139
1140 E void FDECL(mac_speaker, (struct obj *, char *));
1141
1142 /* ### macunix.c ### */
1143
1144 E void FDECL(regularize, (char *));
1145 E void NDECL(getlock);
1146
1147 /* ### macwin.c ### */
1148
1149 E void FDECL(lock_mouse_cursor, (Boolean));
1150 E int NDECL(SanePositions);
1151
1152 /* ### mttymain.c ### */
1153
1154 E void FDECL(getreturn, (char *));
1155 E void VDECL(msmsg, (const char *, ...));
1156 E void NDECL(gettty);
1157 E void NDECL(setftty);
1158 E void FDECL(settty, (const char *));
1159 E int NDECL(tgetch);
1160 E void FDECL(cmov, (int x, int y));
1161 E void FDECL(nocmov, (int x, int y));
1162
1163 #endif /* MAC */
1164
1165 /* ### mail.c ### */
1166
1167 #ifdef MAIL
1168 #ifdef UNIX
1169 E void NDECL(free_maildata);
1170 E void NDECL(getmailstatus);
1171 E void NDECL(ck_server_admin_msg);
1172 #endif
1173 E void NDECL(ckmailstatus);
1174 E void FDECL(readmail, (struct obj *));
1175 #endif /* MAIL */
1176
1177 /* ### makemon.c ### */
1178
1179 E void FDECL(dealloc_monst, (struct monst *));
1180 E boolean FDECL(is_home_elemental, (struct permonst *));
1181 E struct monst *FDECL(clone_mon, (struct monst *, XCHAR_P, XCHAR_P));
1182 E int FDECL(monhp_per_lvl, (struct monst *));
1183 E void FDECL(newmonhp, (struct monst *, int));
1184 E struct mextra *NDECL(newmextra);
1185 E void FDECL(copy_mextra, (struct monst *, struct monst *));
1186 E void FDECL(dealloc_mextra, (struct monst *));
1187 E struct monst *FDECL(makemon, (struct permonst *, int, int, int));
1188 E boolean FDECL(create_critters, (int, struct permonst *, BOOLEAN_P));
1189 E struct permonst *NDECL(rndmonst);
1190 E void FDECL(reset_rndmonst, (int));
1191 E struct permonst *FDECL(mkclass, (CHAR_P, int));
1192 E struct permonst *FDECL(mkclass_aligned, (CHAR_P, int, ALIGNTYP_P));
1193 E int FDECL(mkclass_poly, (int));
1194 E int FDECL(adj_lev, (struct permonst *));
1195 E struct permonst *FDECL(grow_up, (struct monst *, struct monst *));
1196 E int FDECL(mongets, (struct monst *, int));
1197 E int FDECL(golemhp, (int));
1198 E boolean FDECL(peace_minded, (struct permonst *));
1199 E void FDECL(set_malign, (struct monst *));
1200 E void FDECL(newmcorpsenm, (struct monst *));
1201 E void FDECL(freemcorpsenm, (struct monst *));
1202 E void FDECL(set_mimic_sym, (struct monst *));
1203 E int FDECL(mbirth_limit, (int));
1204 E void FDECL(mimic_hit_msg, (struct monst *, SHORT_P));
1205 E void FDECL(mkmonmoney, (struct monst *, long));
1206 E int FDECL(bagotricks, (struct obj *, BOOLEAN_P, int *));
1207 E boolean FDECL(propagate, (int, BOOLEAN_P, BOOLEAN_P));
1208 E boolean FDECL(usmellmon, (struct permonst *));
1209
1210 /* ### mapglyph.c ### */
1211
1212 E int FDECL(mapglyph, (int, int *, int *, unsigned *, int, int, unsigned));
1213 E char *FDECL(encglyph, (int));
1214 E char *FDECL(decode_mixed, (char *, const char *));
1215 E void FDECL(genl_putmixed, (winid, int, const char *));
1216
1217 /* ### mcastu.c ### */
1218
1219 E int FDECL(castmu, (struct monst *, struct attack *, BOOLEAN_P, BOOLEAN_P));
1220 E int FDECL(buzzmu, (struct monst *, struct attack *));
1221
1222 /* ### mhitm.c ### */
1223
1224 E int FDECL(fightm, (struct monst *));
1225 E int FDECL(mattackm, (struct monst *, struct monst *));
1226 E boolean FDECL(engulf_target, (struct monst *, struct monst *));
1227 E int FDECL(mdisplacem, (struct monst *, struct monst *, BOOLEAN_P));
1228 E void FDECL(paralyze_monst, (struct monst *, int));
1229 E int FDECL(sleep_monst, (struct monst *, int, int));
1230 E void FDECL(slept_monst, (struct monst *));
1231 E void FDECL(xdrainenergym, (struct monst *, BOOLEAN_P));
1232 E long FDECL(attk_protection, (int));
1233 E void FDECL(rustm, (struct monst *, struct obj *));
1234
1235 /* ### mhitu.c ### */
1236
1237 E const char *FDECL(mpoisons_subj, (struct monst *, struct attack *));
1238 E void NDECL(u_slow_down);
1239 E struct monst *NDECL(cloneu);
1240 E void FDECL(expels, (struct monst *, struct permonst *, BOOLEAN_P));
1241 E struct attack *FDECL(getmattk, (struct monst *, struct monst *,
1242                                   int, int *, struct attack *));
1243 E int FDECL(mattacku, (struct monst *));
1244 E int FDECL(magic_negation, (struct monst *));
1245 E boolean NDECL(gulp_blnd_check);
1246 E int FDECL(gazemu, (struct monst *, struct attack *));
1247 E void FDECL(mdamageu, (struct monst *, int));
1248 E int FDECL(could_seduce, (struct monst *, struct monst *, struct attack *));
1249 E int FDECL(doseduce, (struct monst *));
1250
1251 /* ### minion.c ### */
1252
1253 E void FDECL(newemin, (struct monst *));
1254 E void FDECL(free_emin, (struct monst *));
1255 E int FDECL(monster_census, (BOOLEAN_P));
1256 E int FDECL(msummon, (struct monst *));
1257 E void FDECL(summon_minion, (ALIGNTYP_P, BOOLEAN_P));
1258 E int FDECL(demon_talk, (struct monst *));
1259 E long FDECL(bribe, (struct monst *));
1260 E int FDECL(dprince, (ALIGNTYP_P));
1261 E int FDECL(dlord, (ALIGNTYP_P));
1262 E int NDECL(llord);
1263 E int FDECL(ndemon, (ALIGNTYP_P));
1264 E int NDECL(lminion);
1265 E void FDECL(lose_guardian_angel, (struct monst *));
1266 E void NDECL(gain_guardian_angel);
1267
1268 /* ### mklev.c ### */
1269
1270 #ifdef USE_TRAMPOLI
1271 E int FDECL(do_comp, (genericptr_t, genericptr_t));
1272 #endif
1273 E void NDECL(sort_rooms);
1274 E void FDECL(add_room, (int, int, int, int, BOOLEAN_P, SCHAR_P, BOOLEAN_P));
1275 E void FDECL(add_subroom, (struct mkroom *, int, int, int, int, BOOLEAN_P,
1276                            SCHAR_P, BOOLEAN_P));
1277 E void NDECL(makecorridors);
1278 E void FDECL(add_door, (int, int, struct mkroom *));
1279 E void NDECL(mklev);
1280 #ifdef SPECIALIZATION
1281 E void FDECL(topologize, (struct mkroom *, BOOLEAN_P));
1282 #else
1283 E void FDECL(topologize, (struct mkroom *));
1284 #endif
1285 E void FDECL(place_branch, (branch *, XCHAR_P, XCHAR_P));
1286 E boolean FDECL(occupied, (XCHAR_P, XCHAR_P));
1287 E int FDECL(okdoor, (XCHAR_P, XCHAR_P));
1288 E void FDECL(dodoor, (int, int, struct mkroom *));
1289 E void FDECL(mktrap, (int, int, struct mkroom *, coord *));
1290 E void FDECL(mkstairs, (XCHAR_P, XCHAR_P, CHAR_P, struct mkroom *));
1291 E void NDECL(mkinvokearea);
1292 E void FDECL(mineralize, (int, int, int, int, BOOLEAN_P));
1293
1294 /* ### mkmap.c ### */
1295
1296 E void FDECL(flood_fill_rm, (int, int, int, BOOLEAN_P, BOOLEAN_P));
1297 E void FDECL(remove_rooms, (int, int, int, int));
1298 /* E void FDECL(mkmap, (lev_init *)); -- need sp_lev.h for lev_init */
1299
1300 /* ### mkmaze.c ### */
1301
1302 E void FDECL(wallification, (int, int, int, int));
1303 E void FDECL(fix_wall_spines, (int, int, int, int));
1304 E void FDECL(walkfrom, (int, int, SCHAR_P));
1305 E void FDECL(makemaz, (const char *));
1306 E void FDECL(mazexy, (coord *));
1307 E void NDECL(bound_digging);
1308 E void FDECL(mkportal, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P));
1309 E boolean FDECL(bad_location, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P,
1310                                XCHAR_P, XCHAR_P));
1311 E void FDECL(place_lregion, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P,
1312                              XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, d_level *));
1313 E void NDECL(fixup_special);
1314 E void NDECL(fumaroles);
1315 E void NDECL(movebubbles);
1316 E void NDECL(water_friction);
1317 E void FDECL(save_waterlevel, (int, int));
1318 E void FDECL(restore_waterlevel, (int));
1319 E const char *FDECL(waterbody_name, (XCHAR_P, XCHAR_P));
1320
1321 /* ### mkobj.c ### */
1322
1323 E struct oextra *NDECL(newoextra);
1324 E void FDECL(copy_oextra, (struct obj *, struct obj *));
1325 E void FDECL(dealloc_oextra, (struct obj *));
1326 E void FDECL(newomonst, (struct obj *));
1327 E void FDECL(free_omonst, (struct obj *));
1328 E void FDECL(newomid, (struct obj *));
1329 E void FDECL(free_omid, (struct obj *));
1330 E void FDECL(newolong, (struct obj *));
1331 E void FDECL(free_olong, (struct obj *));
1332 E void FDECL(new_omailcmd, (struct obj *, const char *));
1333 E void FDECL(free_omailcmd, (struct obj *));
1334 E struct obj *FDECL(mkobj_at, (CHAR_P, int, int, BOOLEAN_P));
1335 E struct obj *FDECL(mksobj_at, (int, int, int, BOOLEAN_P, BOOLEAN_P));
1336 E struct obj *FDECL(mksobj_migr_to_species, (int, unsigned, BOOLEAN_P, BOOLEAN_P));
1337 E struct obj *FDECL(mkobj, (CHAR_P, BOOLEAN_P));
1338 E int NDECL(rndmonnum);
1339 E boolean FDECL(bogon_is_pname, (CHAR_P));
1340 E struct obj *FDECL(splitobj, (struct obj *, long));
1341 E struct obj *FDECL(unsplitobj, (struct obj *));
1342 E void NDECL(clear_splitobjs);
1343 E void FDECL(replace_object, (struct obj *, struct obj *));
1344 E struct obj *FDECL(unknwn_contnr_contents, (struct obj *));
1345 E void FDECL(bill_dummy_object, (struct obj *));
1346 E void FDECL(costly_alteration, (struct obj *, int));
1347 E struct obj *FDECL(mksobj, (int, BOOLEAN_P, BOOLEAN_P));
1348 E int FDECL(bcsign, (struct obj *));
1349 E int FDECL(weight, (struct obj *));
1350 E struct obj *FDECL(mkgold, (long, int, int));
1351 E struct obj *FDECL(mkcorpstat, (int, struct monst *, struct permonst *, int,
1352                                  int, unsigned));
1353 E int FDECL(corpse_revive_type, (struct obj *));
1354 E struct obj *FDECL(obj_attach_mid, (struct obj *, unsigned));
1355 E struct monst *FDECL(get_mtraits, (struct obj *, BOOLEAN_P));
1356 E struct obj *FDECL(mk_tt_object, (int, int, int));
1357 E struct obj *FDECL(mk_named_object,
1358                     (int, struct permonst *, int, int, const char *));
1359 E struct obj *FDECL(rnd_treefruit_at, (int, int));
1360 E void FDECL(set_corpsenm, (struct obj *, int));
1361 E void FDECL(start_corpse_timeout, (struct obj *));
1362 E void FDECL(bless, (struct obj *));
1363 E void FDECL(unbless, (struct obj *));
1364 E void FDECL(curse, (struct obj *));
1365 E void FDECL(uncurse, (struct obj *));
1366 E void FDECL(blessorcurse, (struct obj *, int));
1367 E void FDECL(set_bknown, (struct obj *, unsigned));
1368 E boolean FDECL(is_flammable, (struct obj *));
1369 E boolean FDECL(is_rottable, (struct obj *));
1370 E void FDECL(place_object, (struct obj *, int, int));
1371 E void FDECL(remove_object, (struct obj *));
1372 E void FDECL(discard_minvent, (struct monst *));
1373 E void FDECL(obj_extract_self, (struct obj *));
1374 E void FDECL(extract_nobj, (struct obj *, struct obj **));
1375 E void FDECL(extract_nexthere, (struct obj *, struct obj **));
1376 E int FDECL(add_to_minv, (struct monst *, struct obj *));
1377 E struct obj *FDECL(add_to_container, (struct obj *, struct obj *));
1378 E void FDECL(add_to_migration, (struct obj *));
1379 E void FDECL(add_to_buried, (struct obj *));
1380 E void FDECL(dealloc_obj, (struct obj *));
1381 E void FDECL(obj_ice_effects, (int, int, BOOLEAN_P));
1382 E long FDECL(peek_at_iced_corpse_age, (struct obj *));
1383 E int FDECL(hornoplenty, (struct obj *, BOOLEAN_P));
1384 E void NDECL(obj_sanity_check);
1385 E struct obj *FDECL(obj_nexto, (struct obj *));
1386 E struct obj *FDECL(obj_nexto_xy, (struct obj *, int, int, BOOLEAN_P));
1387 E struct obj *FDECL(obj_absorb, (struct obj **, struct obj **));
1388 E struct obj *FDECL(obj_meld, (struct obj **, struct obj **));
1389 E void FDECL(pudding_merge_message, (struct obj *, struct obj *));
1390 E struct obj *FDECL(init_dummyobj, (struct obj *, SHORT_P, long));
1391
1392 /* ### mkroom.c ### */
1393
1394 E void FDECL(mkroom, (int));
1395 E void FDECL(fill_zoo, (struct mkroom *));
1396 E struct permonst *NDECL(antholemon);
1397 E boolean FDECL(nexttodoor, (int, int));
1398 E boolean FDECL(has_dnstairs, (struct mkroom *));
1399 E boolean FDECL(has_upstairs, (struct mkroom *));
1400 E int FDECL(somex, (struct mkroom *));
1401 E int FDECL(somey, (struct mkroom *));
1402 E boolean FDECL(inside_room, (struct mkroom *, XCHAR_P, XCHAR_P));
1403 E boolean FDECL(somexy, (struct mkroom *, coord *));
1404 E void FDECL(mkundead, (coord *, BOOLEAN_P, int));
1405 E struct permonst *NDECL(courtmon);
1406 E void FDECL(save_rooms, (int));
1407 E void FDECL(rest_rooms, (int));
1408 E struct mkroom *FDECL(search_special, (SCHAR_P));
1409 E int FDECL(cmap_to_type, (int));
1410
1411 /* ### mon.c ### */
1412
1413 E void NDECL(mon_sanity_check);
1414 E int FDECL(undead_to_corpse, (int));
1415 E int FDECL(genus, (int, int));
1416 E int FDECL(pm_to_cham, (int));
1417 E int FDECL(minliquid, (struct monst *));
1418 E int NDECL(movemon);
1419 E int FDECL(meatmetal, (struct monst *));
1420 E int FDECL(meatobj, (struct monst *));
1421 E void FDECL(mpickgold, (struct monst *));
1422 E boolean FDECL(mpickstuff, (struct monst *, const char *));
1423 E int FDECL(curr_mon_load, (struct monst *));
1424 E int FDECL(max_mon_load, (struct monst *));
1425 E int FDECL(can_carry, (struct monst *, struct obj *));
1426 E int FDECL(mfndpos, (struct monst *, coord *, long *, long));
1427 E boolean FDECL(monnear, (struct monst *, int, int));
1428 E void NDECL(dmonsfree);
1429 E void FDECL(elemental_clog, (struct monst *));
1430 E int FDECL(mcalcmove, (struct monst *));
1431 E void NDECL(mcalcdistress);
1432 E void FDECL(replmon, (struct monst *, struct monst *));
1433 E void FDECL(relmon, (struct monst *, struct monst **));
1434 E struct obj *FDECL(mlifesaver, (struct monst *));
1435 E boolean FDECL(corpse_chance, (struct monst *, struct monst *, BOOLEAN_P));
1436 E void FDECL(mondead, (struct monst *));
1437 E void FDECL(mondied, (struct monst *));
1438 E void FDECL(mongone, (struct monst *));
1439 E void FDECL(monstone, (struct monst *));
1440 E void FDECL(monkilled, (struct monst *, const char *, int));
1441 E void FDECL(unstuck, (struct monst *));
1442 E void FDECL(killed, (struct monst *));
1443 E void FDECL(xkilled, (struct monst *, int));
1444 E void FDECL(mon_to_stone, (struct monst *));
1445 E void FDECL(m_into_limbo, (struct monst *));
1446 E void FDECL(mnexto, (struct monst *));
1447 E void FDECL(maybe_mnexto, (struct monst *));
1448 E int FDECL(mnearto, (struct monst *, XCHAR_P, XCHAR_P, BOOLEAN_P));
1449 E void FDECL(m_respond, (struct monst *));
1450 E void FDECL(setmangry, (struct monst *, BOOLEAN_P));
1451 E void FDECL(wakeup, (struct monst *, BOOLEAN_P));
1452 E void NDECL(wake_nearby);
1453 E void FDECL(wake_nearto, (int, int, int));
1454 E void FDECL(seemimic, (struct monst *));
1455 E void NDECL(rescham);
1456 E void NDECL(restartcham);
1457 E void FDECL(restore_cham, (struct monst *));
1458 E boolean FDECL(hideunder, (struct monst *));
1459 E void FDECL(hide_monst, (struct monst *));
1460 E void FDECL(mon_animal_list, (BOOLEAN_P));
1461 E boolean FDECL(validvamp, (struct monst *, int *, int));
1462 E int FDECL(select_newcham_form, (struct monst *));
1463 E void FDECL(mgender_from_permonst, (struct monst *, struct permonst *));
1464 E int FDECL(newcham,
1465             (struct monst *, struct permonst *, BOOLEAN_P, BOOLEAN_P));
1466 E int FDECL(can_be_hatched, (int));
1467 E int FDECL(egg_type_from_parent, (int, BOOLEAN_P));
1468 E boolean FDECL(dead_species, (int, BOOLEAN_P));
1469 E void NDECL(kill_genocided_monsters);
1470 E void FDECL(golemeffects, (struct monst *, int, int));
1471 E boolean FDECL(angry_guards, (BOOLEAN_P));
1472 E void NDECL(pacify_guards);
1473 E void FDECL(decide_to_shapeshift, (struct monst *, int));
1474 E boolean FDECL(vamp_stone, (struct monst *));
1475
1476 /* ### mondata.c ### */
1477
1478 E void FDECL(set_mon_data, (struct monst *, struct permonst *));
1479 E struct attack *FDECL(attacktype_fordmg, (struct permonst *, int, int));
1480 E boolean FDECL(attacktype, (struct permonst *, int));
1481 E boolean FDECL(noattacks, (struct permonst *));
1482 E boolean FDECL(poly_when_stoned, (struct permonst *));
1483 E boolean FDECL(resists_drli, (struct monst *));
1484 E boolean FDECL(resists_magm, (struct monst *));
1485 E boolean FDECL(resists_blnd, (struct monst *));
1486 E boolean
1487 FDECL(can_blnd, (struct monst *, struct monst *, UCHAR_P, struct obj *));
1488 E boolean FDECL(ranged_attk, (struct permonst *));
1489 E boolean FDECL(hates_silver, (struct permonst *));
1490 E boolean FDECL(mon_hates_silver, (struct monst *));
1491 E boolean FDECL(mon_hates_light, (struct monst *));
1492 E boolean FDECL(passes_bars, (struct permonst *));
1493 E boolean FDECL(can_blow, (struct monst *));
1494 E boolean FDECL(can_chant, (struct monst *));
1495 E boolean FDECL(can_be_strangled, (struct monst *));
1496 E boolean FDECL(can_track, (struct permonst *));
1497 E boolean FDECL(breakarm, (struct permonst *));
1498 E boolean FDECL(sliparm, (struct permonst *));
1499 E boolean FDECL(sticks, (struct permonst *));
1500 E boolean FDECL(cantvomit, (struct permonst *));
1501 E int FDECL(num_horns, (struct permonst *));
1502 /* E boolean FDECL(canseemon, (struct monst *)); */
1503 E struct attack *FDECL(dmgtype_fromattack, (struct permonst *, int, int));
1504 E boolean FDECL(dmgtype, (struct permonst *, int));
1505 E int FDECL(max_passive_dmg, (struct monst *, struct monst *));
1506 E boolean FDECL(same_race, (struct permonst *, struct permonst *));
1507 E int FDECL(monsndx, (struct permonst *));
1508 E int FDECL(name_to_mon, (const char *));
1509 E int FDECL(name_to_monclass, (const char *, int *));
1510 E int FDECL(gender, (struct monst *));
1511 E int FDECL(pronoun_gender, (struct monst *, BOOLEAN_P));
1512 E boolean FDECL(levl_follower, (struct monst *));
1513 E int FDECL(little_to_big, (int));
1514 E int FDECL(big_to_little, (int));
1515 E boolean FDECL(big_little_match, (int, int));
1516 E const char *FDECL(locomotion, (const struct permonst *, const char *));
1517 E const char *FDECL(stagger, (const struct permonst *, const char *));
1518 E const char *FDECL(on_fire, (struct permonst *, struct attack *));
1519 E const struct permonst *FDECL(raceptr, (struct monst *));
1520 E boolean FDECL(olfaction, (struct permonst *));
1521 #if 1 /*JP*/
1522 E const char *FDECL(jumpedthrough, (const struct permonst *,const char *));
1523 #endif
1524
1525 /* ### monmove.c ### */
1526
1527 E boolean FDECL(itsstuck, (struct monst *));
1528 E boolean FDECL(mb_trapped, (struct monst *));
1529 E boolean FDECL(monhaskey, (struct monst *, BOOLEAN_P));
1530 E void FDECL(mon_regen, (struct monst *, BOOLEAN_P));
1531 E int FDECL(dochugw, (struct monst *));
1532 E boolean FDECL(onscary, (int, int, struct monst *));
1533 E void FDECL(monflee, (struct monst *, int, BOOLEAN_P, BOOLEAN_P));
1534 E void FDECL(mon_yells, (struct monst *, const char *));
1535 E int FDECL(dochug, (struct monst *));
1536 E boolean FDECL(m_digweapon_check, (struct monst *, XCHAR_P, XCHAR_P));
1537 E int FDECL(m_move, (struct monst *, int));
1538 E void FDECL(dissolve_bars, (int, int));
1539 E boolean FDECL(closed_door, (int, int));
1540 E boolean FDECL(accessible, (int, int));
1541 E void FDECL(set_apparxy, (struct monst *));
1542 E boolean FDECL(can_ooze, (struct monst *));
1543 E boolean FDECL(can_fog, (struct monst *));
1544 E boolean FDECL(should_displace,
1545                 (struct monst *, coord *, long *, int, XCHAR_P, XCHAR_P));
1546 E boolean FDECL(undesirable_disp, (struct monst *, XCHAR_P, XCHAR_P));
1547
1548 /* ### monst.c ### */
1549
1550 E void NDECL(monst_init);
1551
1552 /* ### monstr.c ### */
1553
1554 E void NDECL(monstr_init);
1555
1556 /* ### mplayer.c ### */
1557
1558 E struct monst *FDECL(mk_mplayer,
1559                       (struct permonst *, XCHAR_P, XCHAR_P, BOOLEAN_P));
1560 E void FDECL(create_mplayers, (int, BOOLEAN_P));
1561 E void FDECL(mplayer_talk, (struct monst *));
1562
1563 #if defined(MICRO) || defined(WIN32)
1564
1565 /* ### msdos.c,os2.c,tos.c,winnt.c ### */
1566
1567 #ifndef WIN32
1568 E int NDECL(tgetch);
1569 #endif
1570 #ifndef TOS
1571 E char NDECL(switchar);
1572 #endif
1573 #ifndef __GO32__
1574 E long FDECL(freediskspace, (char *));
1575 #ifdef MSDOS
1576 E int FDECL(findfirst_file, (char *));
1577 E int NDECL(findnext_file);
1578 E long FDECL(filesize_nh, (char *));
1579 #else
1580 E int FDECL(findfirst, (char *));
1581 E int NDECL(findnext);
1582 E long FDECL(filesize, (char *));
1583 #endif /* MSDOS */
1584 E char *NDECL(foundfile_buffer);
1585 #endif /* __GO32__ */
1586 E void FDECL(chdrive, (char *));
1587 #ifndef TOS
1588 E void NDECL(disable_ctrlP);
1589 E void NDECL(enable_ctrlP);
1590 #endif
1591 #if defined(MICRO) && !defined(WINNT)
1592 E void NDECL(get_scr_size);
1593 #ifndef TOS
1594 E void FDECL(gotoxy, (int, int));
1595 #endif
1596 #endif
1597 #ifdef TOS
1598 E int FDECL(_copyfile, (char *, char *));
1599 E int NDECL(kbhit);
1600 E void NDECL(set_colors);
1601 E void NDECL(restore_colors);
1602 #ifdef SUSPEND
1603 E int NDECL(dosuspend);
1604 #endif
1605 #endif /* TOS */
1606 #ifdef WIN32
1607 E char *FDECL(get_username, (int *));
1608 E void FDECL(nt_regularize, (char *));
1609 E int NDECL((*nt_kbhit));
1610 E void FDECL(Delay, (int));
1611 #endif /* WIN32 */
1612 #endif /* MICRO || WIN32 */
1613
1614 /* ### mthrowu.c ### */
1615
1616 E int FDECL(thitu, (int, int, struct obj **, const char *));
1617 E int FDECL(ohitmon, (struct monst *, struct obj *, int, BOOLEAN_P));
1618 E void FDECL(thrwmu, (struct monst *));
1619 E int FDECL(spitmu, (struct monst *, struct attack *));
1620 E int FDECL(breamu, (struct monst *, struct attack *));
1621 E boolean FDECL(linedup, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, int));
1622 E boolean FDECL(lined_up, (struct monst *));
1623 E struct obj *FDECL(m_carrying, (struct monst *, int));
1624 E int FDECL(thrwmm, (struct monst *, struct monst *));
1625 E int FDECL(spitmm, (struct monst *, struct attack *, struct monst *));
1626 E int FDECL(breamm, (struct monst *, struct attack *, struct monst *));
1627 E void FDECL(m_useupall, (struct monst *, struct obj *));
1628 E void FDECL(m_useup, (struct monst *, struct obj *));
1629 E void FDECL(m_throw, (struct monst *, int, int, int, int, int, struct obj *));
1630 E void FDECL(hit_bars, (struct obj **, int, int, int, int,
1631                         BOOLEAN_P, BOOLEAN_P));
1632 E boolean FDECL(hits_bars, (struct obj **, int, int, int, int, int, int));
1633
1634 /* ### muse.c ### */
1635
1636 E boolean FDECL(find_defensive, (struct monst *));
1637 E int FDECL(use_defensive, (struct monst *));
1638 E int FDECL(rnd_defensive_item, (struct monst *));
1639 E boolean FDECL(find_offensive, (struct monst *));
1640 #ifdef USE_TRAMPOLI
1641 E int FDECL(mbhitm, (struct monst *, struct obj *));
1642 #endif
1643 E int FDECL(use_offensive, (struct monst *));
1644 E int FDECL(rnd_offensive_item, (struct monst *));
1645 E boolean FDECL(find_misc, (struct monst *));
1646 E int FDECL(use_misc, (struct monst *));
1647 E int FDECL(rnd_misc_item, (struct monst *));
1648 E boolean FDECL(searches_for_item, (struct monst *, struct obj *));
1649 E boolean FDECL(mon_reflects, (struct monst *, const char *));
1650 E boolean FDECL(ureflects, (const char *, const char *));
1651 E void FDECL(mcureblindness, (struct monst *, BOOLEAN_P));
1652 E boolean FDECL(munstone, (struct monst *, BOOLEAN_P));
1653 E boolean FDECL(munslime, (struct monst *, BOOLEAN_P));
1654
1655 /* ### music.c ### */
1656
1657 E void FDECL(awaken_soldiers, (struct monst *));
1658 E int FDECL(do_play_instrument, (struct obj *));
1659
1660 /* ### nhlan.c ### */
1661 #ifdef LAN_FEATURES
1662 E void NDECL(init_lan_features);
1663 E char *NDECL(lan_username);
1664 #endif
1665
1666 /* ### nhregex.c ### */
1667 E struct nhregex *NDECL(regex_init);
1668 E boolean FDECL(regex_compile, (const char *, struct nhregex *));
1669 E const char *FDECL(regex_error_desc, (struct nhregex *));
1670 E boolean FDECL(regex_match, (const char *, struct nhregex *));
1671 E void FDECL(regex_free, (struct nhregex *));
1672
1673 /* ### nttty.c ### */
1674
1675 #ifdef WIN32
1676 E void NDECL(get_scr_size);
1677 E int NDECL(nttty_kbhit);
1678 E void FDECL(nttty_open, (int));
1679 E void NDECL(nttty_rubout);
1680 E int NDECL(tgetch);
1681 E int FDECL(ntposkey, (int *, int *, int *));
1682 E void FDECL(set_output_mode, (int));
1683 E void NDECL(synch_cursor);
1684 E void NDECL(nethack_enter_nttty);
1685 E void NDECL(nttty_exit);
1686 #endif
1687
1688 /* ### o_init.c ### */
1689
1690 E void NDECL(init_objects);
1691 E void FDECL(obj_shuffle_range, (int, int *, int *));
1692 E int NDECL(find_skates);
1693 E void NDECL(oinit);
1694 E void FDECL(savenames, (int, int));
1695 E void FDECL(restnames, (int));
1696 E void FDECL(discover_object, (int, BOOLEAN_P, BOOLEAN_P));
1697 E void FDECL(undiscover_object, (int));
1698 E int NDECL(dodiscovered);
1699 E int NDECL(doclassdisco);
1700 E void NDECL(rename_disco);
1701
1702 /* ### objects.c ### */
1703
1704 E void NDECL(objects_init);
1705
1706 /* ### objnam.c ### */
1707
1708 E char *FDECL(obj_typename, (int));
1709 E char *FDECL(simple_typename, (int));
1710 E char *FDECL(safe_typename, (int));
1711 E boolean FDECL(obj_is_pname, (struct obj *));
1712 E char *FDECL(distant_name, (struct obj *, char *(*)(OBJ_P)));
1713 E char *FDECL(fruitname, (BOOLEAN_P));
1714 E struct fruit *FDECL(fruit_from_indx, (int));
1715 E struct fruit *FDECL(fruit_from_name, (const char *, BOOLEAN_P, int *));
1716 E void FDECL(reorder_fruit, (BOOLEAN_P));
1717 E char *FDECL(xname, (struct obj *));
1718 E char *FDECL(mshot_xname, (struct obj *));
1719 E boolean FDECL(the_unique_obj, (struct obj *));
1720 E boolean FDECL(the_unique_pm, (struct permonst *));
1721 E boolean FDECL(erosion_matters, (struct obj *));
1722 E char *FDECL(doname, (struct obj *));
1723 E char *FDECL(doname_with_price, (struct obj *));
1724 E char *FDECL(doname_vague_quan, (struct obj *));
1725 E boolean FDECL(not_fully_identified, (struct obj *));
1726 E char *FDECL(corpse_xname, (struct obj *, const char *, unsigned));
1727 E char *FDECL(cxname, (struct obj *));
1728 E char *FDECL(cxname_singular, (struct obj *));
1729 E char *FDECL(killer_xname, (struct obj *));
1730 E char *FDECL(short_oname,
1731               (struct obj *, char *(*)(OBJ_P), char *(*)(OBJ_P), unsigned));
1732 E const char *FDECL(singular, (struct obj *, char *(*)(OBJ_P)));
1733 E char *FDECL(an, (const char *));
1734 E char *FDECL(An, (const char *));
1735 E char *FDECL(The, (const char *));
1736 E char *FDECL(the, (const char *));
1737 E char *FDECL(aobjnam, (struct obj *, const char *));
1738 E char *FDECL(yobjnam, (struct obj *, const char *));
1739 E char *FDECL(Yobjnam2, (struct obj *, const char *));
1740 E char *FDECL(Tobjnam, (struct obj *, const char *));
1741 #if 0 /*JP*/
1742 E char *FDECL(otense, (struct obj *, const char *));
1743 E char *FDECL(vtense, (const char *, const char *));
1744 #endif
1745 E char *FDECL(Doname2, (struct obj *));
1746 E char *FDECL(yname, (struct obj *));
1747 E char *FDECL(Yname2, (struct obj *));
1748 E char *FDECL(ysimple_name, (struct obj *));
1749 E char *FDECL(Ysimple_name2, (struct obj *));
1750 E char *FDECL(simpleonames, (struct obj *));
1751 E char *FDECL(ansimpleoname, (struct obj *));
1752 E char *FDECL(thesimpleoname, (struct obj *));
1753 E char *FDECL(bare_artifactname, (struct obj *));
1754 E char *FDECL(makeplural, (const char *));
1755 E char *FDECL(makesingular, (const char *));
1756 E struct obj *FDECL(readobjnam, (char *, struct obj *));
1757 E int FDECL(rnd_class, (int, int));
1758 E const char *FDECL(suit_simple_name, (struct obj *));
1759 E const char *FDECL(cloak_simple_name, (struct obj *));
1760 E const char *FDECL(helm_simple_name, (struct obj *));
1761 E const char *FDECL(gloves_simple_name, (struct obj *));
1762 E const char *FDECL(mimic_obj_name, (struct monst *));
1763 E char *FDECL(safe_qbuf, (char *, const char *, const char *, struct obj *,
1764                           char *(*)(OBJ_P), char *(*)(OBJ_P), const char *));
1765 E int FDECL(shiny_obj, (CHAR_P));
1766
1767 /* ### options.c ### */
1768
1769 E void NDECL(reglyph_darkroom);
1770 E boolean FDECL(match_optname, (const char *, const char *, int, BOOLEAN_P));
1771 E void NDECL(initoptions);
1772 E void NDECL(initoptions_init);
1773 E void NDECL(initoptions_finish);
1774 E boolean FDECL(parseoptions, (char *, BOOLEAN_P, BOOLEAN_P));
1775 E int NDECL(doset);
1776 E int NDECL(dotogglepickup);
1777 E void NDECL(option_help);
1778 E void FDECL(next_opt, (winid, const char *));
1779 E int FDECL(fruitadd, (char *, struct fruit *));
1780 E int FDECL(choose_classes_menu, (const char *, int, BOOLEAN_P,
1781                                   char *, char *));
1782 E boolean FDECL(parsebindings, (char *));
1783 E void FDECL(oc_to_str, (char *, char *));
1784 E void FDECL(add_menu_cmd_alias, (CHAR_P, CHAR_P));
1785 E char FDECL(get_menu_cmd_key, (CHAR_P));
1786 E char FDECL(map_menu_cmd, (CHAR_P));
1787 E void FDECL(show_menu_controls, (winid, BOOLEAN_P));
1788 E void FDECL(assign_warnings, (uchar *));
1789 E char *FDECL(nh_getenv, (const char *));
1790 E void FDECL(set_duplicate_opt_detection, (int));
1791 E void FDECL(set_wc_option_mod_status, (unsigned long, int));
1792 E void FDECL(set_wc2_option_mod_status, (unsigned long, int));
1793 E void FDECL(set_option_mod_status, (const char *, int));
1794 E int FDECL(add_autopickup_exception, (const char *));
1795 E void NDECL(free_autopickup_exceptions);
1796 E int FDECL(load_symset, (const char *, int));
1797 E void NDECL(free_symsets);
1798 E boolean FDECL(parsesymbols, (char *, int));
1799 E struct symparse *FDECL(match_sym, (char *));
1800 E void NDECL(set_playmode);
1801 E int FDECL(sym_val, (const char *));
1802 E int FDECL(query_color, (const char *));
1803 E int FDECL(query_attr, (const char *));
1804 E const char *FDECL(clr2colorname, (int));
1805 E int FDECL(match_str2clr, (char *));
1806 E int FDECL(match_str2attr, (const char *, BOOLEAN_P));
1807 E boolean FDECL(add_menu_coloring, (char *));
1808 E boolean FDECL(get_menu_coloring, (const char *, int *, int *));
1809 E void NDECL(free_menu_coloring);
1810 E boolean FDECL(msgtype_parse_add, (char *));
1811 E int FDECL(msgtype_type, (const char *, BOOLEAN_P));
1812 E void FDECL(hide_unhide_msgtypes, (BOOLEAN_P, int));
1813 E void NDECL(msgtype_free);
1814
1815 /* ### pager.c ### */
1816
1817 E char *FDECL(self_lookat, (char *));
1818 E void FDECL(mhidden_description, (struct monst *, BOOLEAN_P, char *));
1819 E boolean FDECL(object_from_map, (int,int,int,struct obj **));
1820 E int FDECL(do_screen_description, (coord, BOOLEAN_P, int, char *,
1821                                     const char **, struct permonst **));
1822 E int FDECL(do_look, (int, coord *));
1823 E int NDECL(dowhatis);
1824 E int NDECL(doquickwhatis);
1825 E int NDECL(doidtrap);
1826 E int NDECL(dowhatdoes);
1827 E char *FDECL(dowhatdoes_core, (CHAR_P, char *));
1828 E int NDECL(dohelp);
1829 E int NDECL(dohistory);
1830
1831 /* ### xxmain.c ### */
1832
1833 #if defined(MICRO) || defined(WIN32)
1834 #ifdef CHDIR
1835 E void FDECL(chdirx, (char *, BOOLEAN_P));
1836 #endif /* CHDIR */
1837 E boolean NDECL(authorize_wizard_mode);
1838 #endif /* MICRO || WIN32 */
1839 #if defined(WIN32)
1840 E int NDECL(getlock);
1841 E const char *NDECL(get_portable_device);
1842 #endif
1843
1844 /* ### pcsys.c ### */
1845
1846 #if defined(MICRO) || defined(WIN32)
1847 E void NDECL(flushout);
1848 E int NDECL(dosh);
1849 #ifdef MFLOPPY
1850 E void FDECL(eraseall, (const char *, const char *));
1851 E void FDECL(copybones, (int));
1852 E void NDECL(playwoRAMdisk);
1853 E int FDECL(saveDiskPrompt, (int));
1854 E void NDECL(gameDiskPrompt);
1855 #endif
1856 E void FDECL(append_slash, (char *));
1857 E void FDECL(getreturn, (const char *));
1858 #ifndef AMIGA
1859 E void VDECL(msmsg, (const char *, ...));
1860 #endif
1861 E FILE *FDECL(fopenp, (const char *, const char *));
1862 #endif /* MICRO || WIN32 */
1863
1864 /* ### pctty.c ### */
1865
1866 #if defined(MICRO) || defined(WIN32)
1867 E void NDECL(gettty);
1868 E void FDECL(settty, (const char *));
1869 E void NDECL(setftty);
1870 E void VDECL(error, (const char *, ...));
1871 #if defined(TIMED_DELAY) && defined(_MSC_VER)
1872 E void FDECL(msleep, (unsigned));
1873 #endif
1874 #endif /* MICRO || WIN32 */
1875
1876 /* ### pcunix.c ### */
1877
1878 #if defined(MICRO)
1879 E void FDECL(regularize, (char *));
1880 #if defined(PC_LOCKING)
1881 E void NDECL(getlock);
1882 #endif
1883 #endif /* MICRO */
1884
1885 /* ### pickup.c ### */
1886
1887 E int FDECL(collect_obj_classes, (char *, struct obj *, BOOLEAN_P,
1888                                   boolean FDECL((*), (OBJ_P)), int *));
1889 E boolean FDECL(rider_corpse_revival, (struct obj *, BOOLEAN_P));
1890 E boolean FDECL(menu_class_present, (int));
1891 E void FDECL(add_valid_menu_class, (int));
1892 E boolean FDECL(allow_all, (struct obj *));
1893 E boolean FDECL(allow_category, (struct obj *));
1894 E boolean FDECL(is_worn_by_type, (struct obj *));
1895 E int FDECL(ck_bag, (struct obj *));
1896 #ifdef USE_TRAMPOLI
1897 E int FDECL(in_container, (struct obj *));
1898 E int FDECL(out_container, (struct obj *));
1899 #endif
1900 E int FDECL(pickup, (int));
1901 E int FDECL(pickup_object, (struct obj *, long, BOOLEAN_P));
1902 E int FDECL(query_category, (const char *, struct obj *, int,
1903                              menu_item **, int));
1904 E int FDECL(query_objlist, (const char *, struct obj **, int,
1905                             menu_item **, int, boolean (*)(OBJ_P)));
1906 E struct obj *FDECL(pick_obj, (struct obj *));
1907 E int NDECL(encumber_msg);
1908 E int FDECL(container_at, (int, int, BOOLEAN_P));
1909 E int NDECL(doloot);
1910 E void FDECL(observe_quantum_cat, (struct obj *, BOOLEAN_P, BOOLEAN_P));
1911 E boolean FDECL(container_gone, (int (*)(OBJ_P)));
1912 E boolean NDECL(u_handsy);
1913 E int FDECL(use_container, (struct obj **, int, BOOLEAN_P));
1914 E int FDECL(loot_mon, (struct monst *, int *, boolean *));
1915 E int NDECL(dotip);
1916 E struct autopickup_exception *FDECL(check_autopickup_exceptions, (struct obj *));
1917 E boolean FDECL(autopick_testobj, (struct obj *, BOOLEAN_P));
1918
1919 /* ### pline.c ### */
1920
1921 #ifdef DUMPLOG
1922 E void FDECL(dumplogmsg, (const char *));
1923 E void NDECL(dumplogfreemessages);
1924 #endif
1925 E void VDECL(pline, (const char *, ...)) PRINTF_F(1, 2);
1926 E void VDECL(custompline, (unsigned, const char *, ...)) PRINTF_F(2, 3);
1927 E void VDECL(Norep, (const char *, ...)) PRINTF_F(1, 2);
1928 E void NDECL(free_youbuf);
1929 E void VDECL(You, (const char *, ...)) PRINTF_F(1, 2);
1930 E void VDECL(Your, (const char *, ...)) PRINTF_F(1, 2);
1931 E void VDECL(You_feel, (const char *, ...)) PRINTF_F(1, 2);
1932 E void VDECL(You_cant, (const char *, ...)) PRINTF_F(1, 2);
1933 E void VDECL(You_hear, (const char *, ...)) PRINTF_F(1, 2);
1934 E void VDECL(You_see, (const char *, ...)) PRINTF_F(1, 2);
1935 E void VDECL(pline_The, (const char *, ...)) PRINTF_F(1, 2);
1936 E void VDECL(There, (const char *, ...)) PRINTF_F(1, 2);
1937 E void VDECL(verbalize, (const char *, ...)) PRINTF_F(1, 2);
1938 E void VDECL(raw_printf, (const char *, ...)) PRINTF_F(1, 2);
1939 E void VDECL(impossible, (const char *, ...)) PRINTF_F(1, 2);
1940 E void VDECL(config_error_add, (const char *, ...)) PRINTF_F(1, 2);
1941
1942 /* ### polyself.c ### */
1943
1944 E void NDECL(set_uasmon);
1945 E void NDECL(float_vs_flight);
1946 E void NDECL(change_sex);
1947 E void FDECL(polyself, (int));
1948 E int FDECL(polymon, (int));
1949 E void NDECL(rehumanize);
1950 E int NDECL(dobreathe);
1951 E int NDECL(dospit);
1952 E int NDECL(doremove);
1953 E int NDECL(dospinweb);
1954 E int NDECL(dosummon);
1955 E int NDECL(dogaze);
1956 E int NDECL(dohide);
1957 E int NDECL(dopoly);
1958 E int NDECL(domindblast);
1959 E void NDECL(uunstick);
1960 E void FDECL(skinback, (BOOLEAN_P));
1961 E const char *FDECL(mbodypart, (struct monst *, int));
1962 E const char *FDECL(body_part, (int));
1963 E int NDECL(poly_gender);
1964 E void FDECL(ugolemeffects, (int, int));
1965 E boolean NDECL(ugenocided);
1966 E const char *NDECL(udeadinside);
1967
1968 /* ### potion.c ### */
1969
1970 E void FDECL(set_itimeout, (long *, long));
1971 E void FDECL(incr_itimeout, (long *, int));
1972 E void FDECL(make_confused, (long, BOOLEAN_P));
1973 E void FDECL(make_stunned, (long, BOOLEAN_P));
1974 E void FDECL(make_sick, (long, const char *, BOOLEAN_P, int));
1975 E void FDECL(make_slimed, (long, const char *));
1976 E void FDECL(make_stoned, (long, const char *, int, const char *));
1977 E void FDECL(make_vomiting, (long, BOOLEAN_P));
1978 E void FDECL(make_blinded, (long, BOOLEAN_P));
1979 E void NDECL(toggle_blindness);
1980 E boolean FDECL(make_hallucinated, (long, BOOLEAN_P, long));
1981 E void FDECL(make_deaf, (long, BOOLEAN_P));
1982 E void FDECL(make_glib, (int));
1983 E void NDECL(self_invis_message);
1984 E int NDECL(dodrink);
1985 E int FDECL(dopotion, (struct obj *));
1986 E int FDECL(peffects, (struct obj *));
1987 E void FDECL(healup, (int, int, BOOLEAN_P, BOOLEAN_P));
1988 E void FDECL(strange_feeling, (struct obj *, const char *));
1989 E void FDECL(potionhit, (struct monst *, struct obj *, int));
1990 E void FDECL(potionbreathe, (struct obj *));
1991 E int NDECL(dodip);
1992 E void FDECL(mongrantswish, (struct monst **));
1993 E void FDECL(djinni_from_bottle, (struct obj *));
1994 E struct monst *FDECL(split_mon, (struct monst *, struct monst *));
1995 E const char *NDECL(bottlename);
1996
1997 /* ### pray.c ### */
1998
1999 E boolean FDECL(critically_low_hp, (BOOLEAN_P));
2000 E boolean NDECL(stuck_in_wall);
2001 #ifdef USE_TRAMPOLI
2002 E int NDECL(prayer_done);
2003 #endif
2004 E int NDECL(dosacrifice);
2005 E boolean FDECL(can_pray, (BOOLEAN_P));
2006 E int NDECL(dopray);
2007 E const char *NDECL(u_gname);
2008 E int NDECL(doturn);
2009 E const char *NDECL(a_gname);
2010 E const char *FDECL(a_gname_at, (XCHAR_P x, XCHAR_P y));
2011 E const char *FDECL(align_gname, (ALIGNTYP_P));
2012 E const char *FDECL(halu_gname, (ALIGNTYP_P));
2013 E const char *FDECL(align_gtitle, (ALIGNTYP_P));
2014 E void FDECL(altar_wrath, (int, int));
2015
2016 /* ### priest.c ### */
2017
2018 E int FDECL(move_special, (struct monst *, BOOLEAN_P, SCHAR_P, BOOLEAN_P,
2019                            BOOLEAN_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P));
2020 E char FDECL(temple_occupied, (char *));
2021 E boolean FDECL(inhistemple, (struct monst *));
2022 E int FDECL(pri_move, (struct monst *));
2023 E void FDECL(priestini, (d_level *, struct mkroom *, int, int, BOOLEAN_P));
2024 E aligntyp FDECL(mon_aligntyp, (struct monst *));
2025 E char *FDECL(priestname, (struct monst *, char *));
2026 E boolean FDECL(p_coaligned, (struct monst *));
2027 E struct monst *FDECL(findpriest, (CHAR_P));
2028 E void FDECL(intemple, (int));
2029 E void FDECL(forget_temple_entry, (struct monst *));
2030 E void FDECL(priest_talk, (struct monst *));
2031 E struct monst *FDECL(mk_roamer, (struct permonst *, ALIGNTYP_P, XCHAR_P,
2032                                   XCHAR_P, BOOLEAN_P));
2033 E void FDECL(reset_hostility, (struct monst *));
2034 E boolean FDECL(in_your_sanctuary, (struct monst *, XCHAR_P, XCHAR_P));
2035 E void FDECL(ghod_hitsu, (struct monst *));
2036 E void NDECL(angry_priest);
2037 E void NDECL(clearpriests);
2038 E void FDECL(restpriest, (struct monst *, BOOLEAN_P));
2039 E void FDECL(newepri, (struct monst *));
2040 E void FDECL(free_epri, (struct monst *));
2041 E const char *FDECL(align_str, (ALIGNTYP_P));
2042 E char *FDECL(piousness, (BOOLEAN_P, const char *));
2043 E void FDECL(mstatusline, (struct monst *));
2044 E void NDECL(ustatusline);
2045
2046 /* ### quest.c ### */
2047
2048 E void NDECL(onquest);
2049 E void NDECL(nemdead);
2050 E void FDECL(artitouch, (struct obj *));
2051 E boolean NDECL(ok_to_quest);
2052 E void FDECL(leader_speaks, (struct monst *));
2053 E void NDECL(nemesis_speaks);
2054 E void FDECL(quest_chat, (struct monst *));
2055 E void FDECL(quest_talk, (struct monst *));
2056 E void FDECL(quest_stat_check, (struct monst *));
2057 E void FDECL(finish_quest, (struct obj *));
2058
2059 /* ### questpgr.c ### */
2060
2061 E void NDECL(load_qtlist);
2062 E void NDECL(unload_qtlist);
2063 E short FDECL(quest_info, (int));
2064 E const char *NDECL(ldrname);
2065 E boolean FDECL(is_quest_artifact, (struct obj *));
2066 E struct obj *FDECL(find_quest_artifact, (unsigned));
2067 E void FDECL(com_pager, (int));
2068 E void FDECL(qt_pager, (int));
2069 E struct permonst *NDECL(qt_montype);
2070 E void NDECL(deliver_splev_message);
2071
2072 /* ### random.c ### */
2073
2074 #if defined(RANDOM) && !defined(__GO32__) /* djgpp has its own random */
2075 E void FDECL(srandom, (unsigned));
2076 E char *FDECL(initstate, (unsigned, char *, int));
2077 E char *FDECL(setstate, (char *));
2078 E long NDECL(random);
2079 #endif /* RANDOM */
2080
2081 /* ### read.c ### */
2082
2083 E void FDECL(learnscroll, (struct obj *));
2084 E char *FDECL(tshirt_text, (struct obj *, char *));
2085 E int NDECL(doread);
2086 E boolean FDECL(is_chargeable, (struct obj *));
2087 E void FDECL(recharge, (struct obj *, int));
2088 E void FDECL(forget_objects, (int));
2089 E void FDECL(forget_levels, (int));
2090 E void NDECL(forget_traps);
2091 E void FDECL(forget_map, (int));
2092 E int FDECL(seffects, (struct obj *));
2093 E void FDECL(drop_boulder_on_player,
2094              (BOOLEAN_P, BOOLEAN_P, BOOLEAN_P, BOOLEAN_P));
2095 E boolean FDECL(drop_boulder_on_monster, (int, int, BOOLEAN_P, BOOLEAN_P));
2096 E void FDECL(wand_explode, (struct obj *, int));
2097 #ifdef USE_TRAMPOLI
2098 E void FDECL(set_lit, (int, int, genericptr_t));
2099 #endif
2100 E void FDECL(litroom, (BOOLEAN_P, struct obj *));
2101 E void FDECL(do_genocide, (int));
2102 E void FDECL(punish, (struct obj *));
2103 E void NDECL(unpunish);
2104 E boolean FDECL(cant_revive, (int *, BOOLEAN_P, struct obj *));
2105 E boolean NDECL(create_particular);
2106
2107 /* ### rect.c ### */
2108
2109 E void NDECL(init_rect);
2110 E NhRect *FDECL(get_rect, (NhRect *));
2111 E NhRect *NDECL(rnd_rect);
2112 E void FDECL(remove_rect, (NhRect *));
2113 E void FDECL(add_rect, (NhRect *));
2114 E void FDECL(split_rects, (NhRect *, NhRect *));
2115
2116 /* ## region.c ### */
2117 E void NDECL(clear_regions);
2118 E void NDECL(run_regions);
2119 E boolean FDECL(in_out_region, (XCHAR_P, XCHAR_P));
2120 E boolean FDECL(m_in_out_region, (struct monst *, XCHAR_P, XCHAR_P));
2121 E void NDECL(update_player_regions);
2122 E void FDECL(update_monster_region, (struct monst *));
2123 E NhRegion *FDECL(visible_region_at, (XCHAR_P, XCHAR_P));
2124 E void FDECL(show_region, (NhRegion *, XCHAR_P, XCHAR_P));
2125 E void FDECL(save_regions, (int, int));
2126 E void FDECL(rest_regions, (int, BOOLEAN_P));
2127 E void FDECL(region_stats, (const char *, char *, long *, long *));
2128 E NhRegion *FDECL(create_gas_cloud, (XCHAR_P, XCHAR_P, int, int));
2129 E boolean NDECL(region_danger);
2130 E void NDECL(region_safety);
2131
2132 /* ### restore.c ### */
2133
2134 E void FDECL(inven_inuse, (BOOLEAN_P));
2135 E int FDECL(dorecover, (int));
2136 E void FDECL(restcemetery, (int, struct cemetery **));
2137 E void FDECL(trickery, (char *));
2138 E void FDECL(getlev, (int, int, XCHAR_P, BOOLEAN_P));
2139 E void FDECL(get_plname_from_file, (int, char *));
2140 #ifdef SELECTSAVED
2141 E int FDECL(restore_menu, (winid));
2142 #endif
2143 E void NDECL(minit);
2144 E boolean FDECL(lookup_id_mapping, (unsigned, unsigned *));
2145 E void FDECL(mread, (int, genericptr_t, unsigned int));
2146 E int FDECL(validate, (int, const char *));
2147 E void NDECL(reset_restpref);
2148 E void FDECL(set_restpref, (const char *));
2149 E void FDECL(set_savepref, (const char *));
2150
2151 /* ### rip.c ### */
2152
2153 E void FDECL(genl_outrip, (winid, int, time_t));
2154
2155 /* ### rnd.c ### */
2156
2157 #ifdef USE_ISAAC64
2158 E void FDECL(init_isaac64, (unsigned long, int FDECL((*fn), (int))));
2159 E long NDECL(nhrand);
2160 #endif
2161 E int FDECL(rn2, (int));
2162 E int FDECL(rn2_on_display_rng, (int));
2163 E int FDECL(rnl, (int));
2164 E int FDECL(rnd, (int));
2165 E int FDECL(d, (int, int));
2166 E int FDECL(rne, (int));
2167 E int FDECL(rnz, (int));
2168
2169 /* ### role.c ### */
2170
2171 E boolean FDECL(validrole, (int));
2172 E boolean FDECL(validrace, (int, int));
2173 E boolean FDECL(validgend, (int, int, int));
2174 E boolean FDECL(validalign, (int, int, int));
2175 E int FDECL(randrole, (BOOLEAN_P));
2176 E int FDECL(randrace, (int));
2177 E int FDECL(randgend, (int, int));
2178 E int FDECL(randalign, (int, int));
2179 E int FDECL(str2role, (const char *));
2180 E int FDECL(str2race, (const char *));
2181 E int FDECL(str2gend, (const char *));
2182 E int FDECL(str2align, (const char *));
2183 E boolean FDECL(ok_role, (int, int, int, int));
2184 E int FDECL(pick_role, (int, int, int, int));
2185 E boolean FDECL(ok_race, (int, int, int, int));
2186 E int FDECL(pick_race, (int, int, int, int));
2187 E boolean FDECL(ok_gend, (int, int, int, int));
2188 E int FDECL(pick_gend, (int, int, int, int));
2189 E boolean FDECL(ok_align, (int, int, int, int));
2190 E int FDECL(pick_align, (int, int, int, int));
2191 E void NDECL(rigid_role_checks);
2192 E boolean FDECL(setrolefilter, (const char *));
2193 E boolean NDECL(gotrolefilter);
2194 E void NDECL(clearrolefilter);
2195 E char *FDECL(build_plselection_prompt, (char *, int, int, int, int, int));
2196 E char *FDECL(root_plselection_prompt, (char *, int, int, int, int, int));
2197 E void NDECL(plnamesuffix);
2198 E void FDECL(role_selection_prolog, (int, winid));
2199 E void FDECL(role_menu_extra, (int, winid, BOOLEAN_P));
2200 E void NDECL(role_init);
2201 E const char *FDECL(Hello, (struct monst *));
2202 E const char *NDECL(Goodbye);
2203
2204 /* ### rumors.c ### */
2205
2206 E char *FDECL(getrumor, (int, char *, BOOLEAN_P));
2207 E char *FDECL(get_rnd_text, (const char *, char *, int FDECL((*), (int))));
2208 E void FDECL(outrumor, (int, int));
2209 E void FDECL(outoracle, (BOOLEAN_P, BOOLEAN_P));
2210 E void FDECL(save_oracles, (int, int));
2211 E void FDECL(restore_oracles, (int));
2212 E int FDECL(doconsult, (struct monst *));
2213 E void NDECL(rumor_check);
2214
2215 /* ### save.c ### */
2216
2217 E int NDECL(dosave);
2218 E int NDECL(dosave0);
2219 E boolean FDECL(tricked_fileremoved, (int, char *));
2220 #ifdef INSURANCE
2221 E void NDECL(savestateinlock);
2222 #endif
2223 #ifdef MFLOPPY
2224 E boolean FDECL(savelev, (int, XCHAR_P, int));
2225 E boolean FDECL(swapin_file, (int));
2226 E void NDECL(co_false);
2227 #else
2228 E void FDECL(savelev, (int, XCHAR_P, int));
2229 #endif
2230 E genericptr_t FDECL(mon_to_buffer, (struct monst *, int *));
2231 E void FDECL(bufon, (int));
2232 E void FDECL(bufoff, (int));
2233 E void FDECL(bflush, (int));
2234 E void FDECL(bwrite, (int, genericptr_t, unsigned int));
2235 E void FDECL(bclose, (int));
2236 E void FDECL(def_bclose, (int));
2237 #if defined(ZEROCOMP)
2238 E void FDECL(zerocomp_bclose, (int));
2239 #endif
2240 E void FDECL(savecemetery, (int, int, struct cemetery **));
2241 E void FDECL(savefruitchn, (int, int));
2242 E void FDECL(store_plname_in_file, (int));
2243 E void NDECL(free_dungeons);
2244 E void NDECL(freedynamicdata);
2245 E void FDECL(store_savefileinfo, (int));
2246
2247 /* ### shk.c ### */
2248
2249 E void FDECL(setpaid, (struct monst *));
2250 E long FDECL(money2mon, (struct monst *, long));
2251 E void FDECL(money2u, (struct monst *, long));
2252 E void FDECL(shkgone, (struct monst *));
2253 E void FDECL(set_residency, (struct monst *, BOOLEAN_P));
2254 E void FDECL(replshk, (struct monst *, struct monst *));
2255 E void FDECL(restshk, (struct monst *, BOOLEAN_P));
2256 E char FDECL(inside_shop, (XCHAR_P, XCHAR_P));
2257 E void FDECL(u_left_shop, (char *, BOOLEAN_P));
2258 E void FDECL(remote_burglary, (XCHAR_P, XCHAR_P));
2259 E void FDECL(u_entered_shop, (char *));
2260 E void FDECL(pick_pick, (struct obj *));
2261 E boolean FDECL(same_price, (struct obj *, struct obj *));
2262 E void NDECL(shopper_financial_report);
2263 E int FDECL(inhishop, (struct monst *));
2264 E struct monst *FDECL(shop_keeper, (CHAR_P));
2265 E boolean FDECL(tended_shop, (struct mkroom *));
2266 E boolean FDECL(is_unpaid, (struct obj *));
2267 E void FDECL(delete_contents, (struct obj *));
2268 E void FDECL(obfree, (struct obj *, struct obj *));
2269 E void FDECL(home_shk, (struct monst *, BOOLEAN_P));
2270 E void FDECL(make_happy_shk, (struct monst *, BOOLEAN_P));
2271 E void FDECL(make_happy_shoppers, (BOOLEAN_P));
2272 E void FDECL(hot_pursuit, (struct monst *));
2273 E void FDECL(make_angry_shk, (struct monst *, XCHAR_P, XCHAR_P));
2274 E int NDECL(dopay);
2275 E boolean FDECL(paybill, (int, BOOLEAN_P));
2276 E void NDECL(finish_paybill);
2277 E struct obj *FDECL(find_oid, (unsigned));
2278 E long FDECL(contained_cost,
2279              (struct obj *, struct monst *, long, BOOLEAN_P, BOOLEAN_P));
2280 E long FDECL(contained_gold, (struct obj *));
2281 E void FDECL(picked_container, (struct obj *));
2282 E void FDECL(gem_learned, (int));
2283 E void FDECL(alter_cost, (struct obj *, long));
2284 E long FDECL(unpaid_cost, (struct obj *, BOOLEAN_P));
2285 E boolean FDECL(billable, (struct monst **, struct obj *, CHAR_P, BOOLEAN_P));
2286 E void FDECL(addtobill, (struct obj *, BOOLEAN_P, BOOLEAN_P, BOOLEAN_P));
2287 E void FDECL(splitbill, (struct obj *, struct obj *));
2288 E void FDECL(subfrombill, (struct obj *, struct monst *));
2289 E long FDECL(stolen_value,
2290              (struct obj *, XCHAR_P, XCHAR_P, BOOLEAN_P, BOOLEAN_P));
2291 E void FDECL(sellobj_state, (int));
2292 E void FDECL(sellobj, (struct obj *, XCHAR_P, XCHAR_P));
2293 E int FDECL(doinvbill, (int));
2294 E struct monst *FDECL(shkcatch, (struct obj *, XCHAR_P, XCHAR_P));
2295 E void FDECL(add_damage, (XCHAR_P, XCHAR_P, long));
2296 E int FDECL(repair_damage, (struct monst *, struct damage *, int *,
2297                             BOOLEAN_P));
2298 E int FDECL(shk_move, (struct monst *));
2299 E void FDECL(after_shk_move, (struct monst *));
2300 E boolean FDECL(is_fshk, (struct monst *));
2301 E void FDECL(shopdig, (int));
2302 E void FDECL(pay_for_damage, (const char *, BOOLEAN_P));
2303 E boolean FDECL(costly_spot, (XCHAR_P, XCHAR_P));
2304 E struct obj *FDECL(shop_object, (XCHAR_P, XCHAR_P));
2305 E void FDECL(price_quote, (struct obj *));
2306 E void FDECL(shk_chat, (struct monst *));
2307 E void FDECL(check_unpaid_usage, (struct obj *, BOOLEAN_P));
2308 E void FDECL(check_unpaid, (struct obj *));
2309 E void FDECL(costly_gold, (XCHAR_P, XCHAR_P, long));
2310 E long FDECL(get_cost_of_shop_item, (struct obj *, int *));
2311 E int FDECL(oid_price_adjustment, (struct obj *, unsigned));
2312 E boolean FDECL(block_door, (XCHAR_P, XCHAR_P));
2313 E boolean FDECL(block_entry, (XCHAR_P, XCHAR_P));
2314 E char *FDECL(shk_your, (char *, struct obj *));
2315 E char *FDECL(Shk_Your, (char *, struct obj *));
2316 E void FDECL(globby_bill_fixup, (struct obj *, struct obj *));
2317 E void FDECL(globby_donation, (struct obj *, struct obj *));
2318
2319 /* ### shknam.c ### */
2320
2321 E void FDECL(neweshk, (struct monst *));
2322 E void FDECL(free_eshk, (struct monst *));
2323 E void FDECL(stock_room, (int, struct mkroom *));
2324 E boolean FDECL(saleable, (struct monst *, struct obj *));
2325 E int FDECL(get_shop_item, (int));
2326 E char *FDECL(Shknam, (struct monst *));
2327 E char *FDECL(shkname, (struct monst *));
2328 E boolean FDECL(shkname_is_pname, (struct monst *));
2329 E boolean FDECL(is_izchak, (struct monst *, BOOLEAN_P));
2330
2331 /* ### sit.c ### */
2332
2333 E void NDECL(take_gold);
2334 E int NDECL(dosit);
2335 E void NDECL(rndcurse);
2336 E void NDECL(attrcurse);
2337
2338 /* ### sounds.c ### */
2339
2340 E void NDECL(dosounds);
2341 E const char *FDECL(growl_sound, (struct monst *));
2342 E void FDECL(growl, (struct monst *));
2343 E void FDECL(yelp, (struct monst *));
2344 E void FDECL(whimper, (struct monst *));
2345 E void FDECL(beg, (struct monst *));
2346 E int NDECL(dotalk);
2347 #ifdef USER_SOUNDS
2348 E int FDECL(add_sound_mapping, (const char *));
2349 E void FDECL(play_sound_for_message, (const char *));
2350 #endif
2351
2352 /* ### sys.c ### */
2353
2354 E void NDECL(sys_early_init);
2355 E void NDECL(sysopt_release);
2356 E void FDECL(sysopt_seduce_set, (int));
2357
2358 /* ### sys/msdos/sound.c ### */
2359
2360 #ifdef MSDOS
2361 E int FDECL(assign_soundcard, (char *));
2362 #endif
2363
2364 /* ### sp_lev.c ### */
2365
2366 E boolean FDECL(check_room, (xchar *, xchar *, xchar *, xchar *, BOOLEAN_P));
2367 E boolean FDECL(create_room, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P,
2368                               XCHAR_P, XCHAR_P, XCHAR_P));
2369 E void FDECL(create_secret_door, (struct mkroom *, XCHAR_P));
2370 E boolean
2371 FDECL(dig_corridor, (coord *, coord *, BOOLEAN_P, SCHAR_P, SCHAR_P));
2372 E void FDECL(fill_room, (struct mkroom *, BOOLEAN_P));
2373 E boolean FDECL(load_special, (const char *));
2374 E xchar FDECL(selection_getpoint, (int, int, struct opvar *));
2375 E struct opvar *FDECL(selection_opvar, (char *));
2376 E void FDECL(opvar_free_x, (struct opvar *));
2377 E void FDECL(set_selection_floodfillchk, (int FDECL((*), (int,int))));
2378 E void FDECL(selection_floodfill, (struct opvar *, int, int, BOOLEAN_P));
2379
2380 /* ### spell.c ### */
2381
2382 E void FDECL(book_cursed, (struct obj *));
2383 #ifdef USE_TRAMPOLI
2384 E int NDECL(learn);
2385 #endif
2386 E int FDECL(study_book, (struct obj *));
2387 E void FDECL(book_disappears, (struct obj *));
2388 E void FDECL(book_substitution, (struct obj *, struct obj *));
2389 E void NDECL(age_spells);
2390 E int NDECL(docast);
2391 E int FDECL(spell_skilltype, (int));
2392 E int FDECL(spelleffects, (int, BOOLEAN_P));
2393 E int FDECL(tport_spell, (int));
2394 E void NDECL(losespells);
2395 E int NDECL(dovspell);
2396 E void FDECL(initialspell, (struct obj *));
2397
2398 /* ### steal.c ### */
2399
2400 #ifdef USE_TRAMPOLI
2401 E int NDECL(stealarm);
2402 #endif
2403 E long FDECL(somegold, (long));
2404 E void FDECL(stealgold, (struct monst *));
2405 E void FDECL(remove_worn_item, (struct obj *, BOOLEAN_P));
2406 E int FDECL(steal, (struct monst *, char *));
2407 E int FDECL(mpickobj, (struct monst *, struct obj *));
2408 E void FDECL(stealamulet, (struct monst *));
2409 E void FDECL(maybe_absorb_item, (struct monst *, struct obj *, int, int));
2410 E void FDECL(mdrop_obj, (struct monst *, struct obj *, BOOLEAN_P));
2411 E void FDECL(mdrop_special_objs, (struct monst *));
2412 E void FDECL(relobj, (struct monst *, int, BOOLEAN_P));
2413 E struct obj *FDECL(findgold, (struct obj *));
2414
2415 /* ### steed.c ### */
2416
2417 E void NDECL(rider_cant_reach);
2418 E boolean FDECL(can_saddle, (struct monst *));
2419 E int FDECL(use_saddle, (struct obj *));
2420 E void FDECL(put_saddle_on_mon, (struct obj *, struct monst *));
2421 E boolean FDECL(can_ride, (struct monst *));
2422 E int NDECL(doride);
2423 E boolean FDECL(mount_steed, (struct monst *, BOOLEAN_P));
2424 E void NDECL(exercise_steed);
2425 E void NDECL(kick_steed);
2426 E void FDECL(dismount_steed, (int));
2427 E void FDECL(place_monster, (struct monst *, int, int));
2428 E boolean FDECL(stucksteed, (BOOLEAN_P));
2429
2430 /* ### teleport.c ### */
2431
2432 E boolean FDECL(goodpos, (int, int, struct monst *, unsigned));
2433 E boolean FDECL(enexto, (coord *, XCHAR_P, XCHAR_P, struct permonst *));
2434 E boolean FDECL(enexto_core, (coord *, XCHAR_P, XCHAR_P,
2435                               struct permonst *, unsigned));
2436 E void FDECL(teleds, (int, int, BOOLEAN_P));
2437 E boolean FDECL(safe_teleds, (BOOLEAN_P));
2438 E boolean FDECL(teleport_pet, (struct monst *, BOOLEAN_P));
2439 E void NDECL(tele);
2440 E boolean FDECL(scrolltele, (struct obj *));
2441 E int NDECL(dotelecmd);
2442 E int FDECL(dotele, (BOOLEAN_P));
2443 E void NDECL(level_tele);
2444 E void FDECL(domagicportal, (struct trap *));
2445 E void FDECL(tele_trap, (struct trap *));
2446 E void FDECL(level_tele_trap, (struct trap *, unsigned));
2447 E void FDECL(rloc_to, (struct monst *, int, int));
2448 E boolean FDECL(rloc, (struct monst *, BOOLEAN_P));
2449 E boolean FDECL(tele_restrict, (struct monst *));
2450 E void FDECL(mtele_trap, (struct monst *, struct trap *, int));
2451 E int FDECL(mlevel_tele_trap, (struct monst *, struct trap *,
2452                                BOOLEAN_P, int));
2453 E boolean FDECL(rloco, (struct obj *));
2454 E int NDECL(random_teleport_level);
2455 E boolean FDECL(u_teleport_mon, (struct monst *, BOOLEAN_P));
2456
2457 /* ### tile.c ### */
2458 #ifdef USE_TILES
2459 E void FDECL(substitute_tiles, (d_level *));
2460 #endif
2461
2462 /* ### timeout.c ### */
2463
2464 E void NDECL(burn_away_slime);
2465 E void NDECL(nh_timeout);
2466 E void FDECL(fall_asleep, (int, BOOLEAN_P));
2467 E void FDECL(attach_egg_hatch_timeout, (struct obj *, long));
2468 E void FDECL(attach_fig_transform_timeout, (struct obj *));
2469 E void FDECL(kill_egg, (struct obj *));
2470 E void FDECL(hatch_egg, (ANY_P *, long));
2471 E void FDECL(learn_egg_type, (int));
2472 E void FDECL(burn_object, (ANY_P *, long));
2473 E void FDECL(begin_burn, (struct obj *, BOOLEAN_P));
2474 E void FDECL(end_burn, (struct obj *, BOOLEAN_P));
2475 E void NDECL(do_storms);
2476 E boolean FDECL(start_timer, (long, SHORT_P, SHORT_P, ANY_P *));
2477 E long FDECL(stop_timer, (SHORT_P, ANY_P *));
2478 E long FDECL(peek_timer, (SHORT_P, ANY_P *));
2479 E void NDECL(run_timers);
2480 E void FDECL(obj_move_timers, (struct obj *, struct obj *));
2481 E void FDECL(obj_split_timers, (struct obj *, struct obj *));
2482 E void FDECL(obj_stop_timers, (struct obj *));
2483 E boolean FDECL(obj_has_timer, (struct obj *, SHORT_P));
2484 E void FDECL(spot_stop_timers, (XCHAR_P, XCHAR_P, SHORT_P));
2485 E long FDECL(spot_time_expires, (XCHAR_P, XCHAR_P, SHORT_P));
2486 E long FDECL(spot_time_left, (XCHAR_P, XCHAR_P, SHORT_P));
2487 E boolean FDECL(obj_is_local, (struct obj *));
2488 E void FDECL(save_timers, (int, int, int));
2489 E void FDECL(restore_timers, (int, int, BOOLEAN_P, long));
2490 E void FDECL(timer_stats, (const char *, char *, long *, long *));
2491 E void FDECL(relink_timers, (BOOLEAN_P));
2492 E int NDECL(wiz_timeout_queue);
2493 E void NDECL(timer_sanity_check);
2494
2495 /* ### topten.c ### */
2496
2497 E void FDECL(formatkiller, (char *, unsigned, int, BOOLEAN_P));
2498 E int FDECL(observable_depth, (d_level *));
2499 E void FDECL(topten, (int, time_t));
2500 E void FDECL(prscore, (int, char **));
2501 E struct toptenentry *NDECL(get_rnd_toptenentry);
2502 E struct obj *FDECL(tt_oname, (struct obj *));
2503
2504 /* ### track.c ### */
2505
2506 E void NDECL(initrack);
2507 E void NDECL(settrack);
2508 E coord *FDECL(gettrack, (int, int));
2509
2510 /* ### trap.c ### */
2511
2512 E boolean FDECL(burnarmor, (struct monst *));
2513 E int FDECL(erode_obj, (struct obj *, const char *, int, int));
2514 E boolean FDECL(grease_protect, (struct obj *, const char *, struct monst *));
2515 E struct trap *FDECL(maketrap, (int, int, int));
2516 E void FDECL(fall_through, (BOOLEAN_P, unsigned));
2517 E struct monst *FDECL(animate_statue,
2518                       (struct obj *, XCHAR_P, XCHAR_P, int, int *));
2519 E struct monst *FDECL(activate_statue_trap,
2520                       (struct trap *, XCHAR_P, XCHAR_P, BOOLEAN_P));
2521 E void FDECL(set_utrap, (unsigned, unsigned));
2522 E void FDECL(reset_utrap, (BOOLEAN_P));
2523 E void FDECL(dotrap, (struct trap *, unsigned));
2524 E void FDECL(seetrap, (struct trap *));
2525 E void FDECL(feeltrap, (struct trap *));
2526 E int FDECL(mintrap, (struct monst *));
2527 E void FDECL(instapetrify, (const char *));
2528 E void FDECL(minstapetrify, (struct monst *, BOOLEAN_P));
2529 E void FDECL(selftouch, (const char *));
2530 E void FDECL(mselftouch, (struct monst *, const char *, BOOLEAN_P));
2531 E void NDECL(float_up);
2532 E void FDECL(fill_pit, (int, int));
2533 E int FDECL(float_down, (long, long));
2534 E void NDECL(climb_pit);
2535 E boolean FDECL(fire_damage, (struct obj *, BOOLEAN_P, XCHAR_P, XCHAR_P));
2536 E int FDECL(fire_damage_chain,
2537             (struct obj *, BOOLEAN_P, BOOLEAN_P, XCHAR_P, XCHAR_P));
2538 E boolean FDECL(lava_damage, (struct obj *, XCHAR_P, XCHAR_P));
2539 E void acid_damage(struct obj *);
2540 E int FDECL(water_damage, (struct obj *, const char *, BOOLEAN_P));
2541 E void FDECL(water_damage_chain, (struct obj *, BOOLEAN_P));
2542 E boolean NDECL(drown);
2543 E void FDECL(drain_en, (int));
2544 E int NDECL(dountrap);
2545 E void FDECL(cnv_trap_obj, (int, int, struct trap *, BOOLEAN_P));
2546 E int FDECL(untrap, (BOOLEAN_P));
2547 E boolean FDECL(openholdingtrap, (struct monst *, boolean *));
2548 E boolean FDECL(closeholdingtrap, (struct monst *, boolean *));
2549 E boolean FDECL(openfallingtrap, (struct monst *, BOOLEAN_P, boolean *));
2550 E boolean FDECL(chest_trap, (struct obj *, int, BOOLEAN_P));
2551 E void FDECL(deltrap, (struct trap *));
2552 E boolean FDECL(delfloortrap, (struct trap *));
2553 E struct trap *FDECL(t_at, (int, int));
2554 E void FDECL(b_trapped, (const char *, int));
2555 E boolean NDECL(unconscious);
2556 E void FDECL(blow_up_landmine, (struct trap *));
2557 E int FDECL(launch_obj, (SHORT_P, int, int, int, int, int));
2558 E boolean NDECL(launch_in_progress);
2559 E void NDECL(force_launch_placement);
2560 E boolean FDECL(uteetering_at_seen_pit, (struct trap *));
2561 E boolean FDECL(uescaped_shaft, (struct trap *));
2562 E boolean NDECL(lava_effects);
2563 E void NDECL(sink_into_lava);
2564 E void NDECL(sokoban_guilt);
2565
2566 /* ### u_init.c ### */
2567
2568 E void NDECL(u_init);
2569
2570 /* ### uhitm.c ### */
2571
2572 E void FDECL(erode_armor, (struct monst *, int));
2573 E boolean FDECL(attack_checks, (struct monst *, struct obj *));
2574 E void FDECL(check_caitiff, (struct monst *));
2575 E int FDECL(find_roll_to_hit, (struct monst *, UCHAR_P, struct obj *,
2576                                int *, int *));
2577 E boolean FDECL(attack, (struct monst *));
2578 E boolean FDECL(hmon, (struct monst *, struct obj *, int, int));
2579 E boolean FDECL(shade_miss, (struct monst *, struct monst *, struct obj *,
2580                              BOOLEAN_P, BOOLEAN_P));
2581 E int FDECL(damageum, (struct monst *, struct attack *, int));
2582 E void FDECL(missum, (struct monst *, struct attack *, BOOLEAN_P));
2583 E int FDECL(passive, (struct monst *, struct obj *, BOOLEAN_P, int,
2584                       UCHAR_P, BOOLEAN_P));
2585 E void FDECL(passive_obj, (struct monst *, struct obj *, struct attack *));
2586 E void FDECL(stumble_onto_mimic, (struct monst *));
2587 E int FDECL(flash_hits_mon, (struct monst *, struct obj *));
2588 E void FDECL(light_hits_gremlin, (struct monst *, int));
2589
2590 /* ### unixmain.c ### */
2591
2592 #ifdef UNIX
2593 #ifdef PORT_HELP
2594 E void NDECL(port_help);
2595 #endif
2596 E void FDECL(sethanguphandler, (void (*)(int)));
2597 E boolean NDECL(authorize_wizard_mode);
2598 E boolean FDECL(check_user_string, (char *));
2599 E char *NDECL(get_login_name);
2600 #endif /* UNIX */
2601
2602 /* ### unixtty.c ### */
2603
2604 #if defined(UNIX) || defined(__BEOS__)
2605 E void NDECL(gettty);
2606 E void FDECL(settty, (const char *));
2607 E void NDECL(setftty);
2608 E void NDECL(intron);
2609 E void NDECL(introff);
2610 E void VDECL(error, (const char *, ...)) PRINTF_F(1, 2);
2611 #endif /* UNIX || __BEOS__ */
2612
2613 /* ### unixunix.c ### */
2614
2615 #ifdef UNIX
2616 E void NDECL(getlock);
2617 E void FDECL(regularize, (char *));
2618 #if defined(TIMED_DELAY) && !defined(msleep) && defined(SYSV)
2619 E void FDECL(msleep, (unsigned));
2620 #endif
2621 #ifdef SHELL
2622 E int NDECL(dosh);
2623 #endif /* SHELL */
2624 #if defined(SHELL) || defined(DEF_PAGER) || defined(DEF_MAILREADER)
2625 E int FDECL(child, (int));
2626 #endif
2627 #ifdef PANICTRACE
2628 E boolean FDECL(file_exists, (const char *));
2629 #endif
2630 #endif /* UNIX */
2631
2632 /* ### unixres.c ### */
2633
2634 #ifdef UNIX
2635 #ifdef GNOME_GRAPHICS
2636 E int FDECL(hide_privileges, (BOOLEAN_P));
2637 #endif
2638 #endif /* UNIX */
2639
2640 /* ### vault.c ### */
2641
2642 E void FDECL(newegd, (struct monst *));
2643 E void FDECL(free_egd, (struct monst *));
2644 E boolean FDECL(grddead, (struct monst *));
2645 E struct monst *NDECL(findgd);
2646 E void NDECL(vault_summon_gd);
2647 E char FDECL(vault_occupied, (char *));
2648 E void FDECL(uleftvault, (struct monst *));
2649 E void NDECL(invault);
2650 E int FDECL(gd_move, (struct monst *));
2651 E void FDECL(paygd, (BOOLEAN_P));
2652 E long NDECL(hidden_gold);
2653 E boolean NDECL(gd_sound);
2654 E void FDECL(vault_gd_watching, (unsigned int));
2655
2656 /* ### version.c ### */
2657
2658 E char *FDECL(version_string, (char *));
2659 #if 1 /*JP*/
2660 E char *FDECL(version_string_j, (char *));
2661 #endif
2662 E char *FDECL(getversionstring, (char *));
2663 E int NDECL(doversion);
2664 E int NDECL(doextversion);
2665 #ifdef MICRO
2666 E boolean FDECL(comp_times, (long));
2667 #endif
2668 E boolean
2669 FDECL(check_version, (struct version_info *, const char *, BOOLEAN_P));
2670 E boolean FDECL(uptodate, (int, const char *));
2671 E void FDECL(store_version, (int));
2672 E unsigned long FDECL(get_feature_notice_ver, (char *));
2673 E unsigned long NDECL(get_current_feature_ver);
2674 E const char *FDECL(copyright_banner_line, (int));
2675 E void FDECL(early_version_info, (BOOLEAN_P));
2676
2677 #ifdef RUNTIME_PORT_ID
2678 E char *FDECL(get_port_id, (char *));
2679 #endif
2680 #ifdef RUNTIME_PASTEBUF_SUPPORT
2681 E void FDECL(port_insert_pastebuf, (char *));
2682 #endif
2683
2684 /* ### video.c ### */
2685
2686 #ifdef MSDOS
2687 E int FDECL(assign_video, (char *));
2688 #ifdef NO_TERMS
2689 E void NDECL(gr_init);
2690 E void NDECL(gr_finish);
2691 #endif
2692 E void FDECL(tileview, (BOOLEAN_P));
2693 #endif
2694 #ifdef VIDEOSHADES
2695 E int FDECL(assign_videoshades, (char *));
2696 E int FDECL(assign_videocolors, (char *));
2697 #endif
2698
2699 /* ### vis_tab.c ### */
2700
2701 #ifdef VISION_TABLES
2702 E void NDECL(vis_tab_init);
2703 #endif
2704
2705 /* ### vision.c ### */
2706
2707 E void NDECL(vision_init);
2708 E int FDECL(does_block, (int, int, struct rm *));
2709 E void NDECL(vision_reset);
2710 E void FDECL(vision_recalc, (int));
2711 E void FDECL(block_point, (int, int));
2712 E void FDECL(unblock_point, (int, int));
2713 E boolean FDECL(clear_path, (int, int, int, int));
2714 E void FDECL(do_clear_area, (int, int, int,
2715                              void (*)(int, int, genericptr), genericptr_t));
2716 E unsigned FDECL(howmonseen, (struct monst *));
2717
2718 #ifdef VMS
2719
2720 /* ### vmsfiles.c ### */
2721
2722 E int FDECL(vms_link, (const char *, const char *));
2723 E int FDECL(vms_unlink, (const char *));
2724 E int FDECL(vms_creat, (const char *, unsigned int));
2725 E int FDECL(vms_open, (const char *, int, unsigned int));
2726 E boolean FDECL(same_dir, (const char *, const char *));
2727 E int FDECL(c__translate, (int));
2728 E char *FDECL(vms_basename, (const char *));
2729
2730 /* ### vmsmail.c ### */
2731
2732 E unsigned long NDECL(init_broadcast_trapping);
2733 E unsigned long NDECL(enable_broadcast_trapping);
2734 E unsigned long NDECL(disable_broadcast_trapping);
2735 #if 0
2736 E struct mail_info *NDECL(parse_next_broadcast);
2737 #endif /*0*/
2738
2739 /* ### vmsmain.c ### */
2740
2741 E int FDECL(main, (int, char **));
2742 #ifdef CHDIR
2743 E void FDECL(chdirx, (const char *, BOOLEAN_P));
2744 #endif /* CHDIR */
2745 E void FDECL(sethanguphandler, (void (*)(int)));
2746 E boolean NDECL(authorize_wizard_mode);
2747
2748 /* ### vmsmisc.c ### */
2749
2750 E void NDECL(vms_abort) NORETURN;
2751 E void FDECL(vms_exit, (int)) NORETURN;
2752 #ifdef PANICTRACE
2753 E void FDECL(vms_traceback, (int));
2754 #endif
2755
2756 /* ### vmstty.c ### */
2757
2758 E int NDECL(vms_getchar);
2759 E void NDECL(gettty);
2760 E void FDECL(settty, (const char *));
2761 E void FDECL(shuttty, (const char *));
2762 E void NDECL(setftty);
2763 E void NDECL(intron);
2764 E void NDECL(introff);
2765 E void VDECL(error, (const char *, ...)) PRINTF_F(1, 2);
2766 #ifdef TIMED_DELAY
2767 E void FDECL(msleep, (unsigned));
2768 #endif
2769
2770 /* ### vmsunix.c ### */
2771
2772 E void NDECL(getlock);
2773 E void FDECL(regularize, (char *));
2774 E int NDECL(vms_getuid);
2775 E boolean FDECL(file_is_stmlf, (int));
2776 E int FDECL(vms_define, (const char *, const char *, int));
2777 E int FDECL(vms_putenv, (const char *));
2778 E char *NDECL(verify_termcap);
2779 #if defined(CHDIR) || defined(SHELL) || defined(SECURE)
2780 E void NDECL(privoff);
2781 E void NDECL(privon);
2782 #endif
2783 #ifdef SHELL
2784 E int NDECL(dosh);
2785 #endif
2786 #if defined(SHELL) || defined(MAIL)
2787 E int FDECL(vms_doshell, (const char *, BOOLEAN_P));
2788 #endif
2789 #ifdef SUSPEND
2790 E int NDECL(dosuspend);
2791 #endif
2792 #ifdef SELECTSAVED
2793 E int FDECL(vms_get_saved_games, (const char *, char ***));
2794 #endif
2795
2796 #endif /* VMS */
2797
2798 /* ### weapon.c ### */
2799
2800 E const char *FDECL(weapon_descr, (struct obj *));
2801 E int FDECL(hitval, (struct obj *, struct monst *));
2802 E int FDECL(dmgval, (struct obj *, struct monst *));
2803 E int FDECL(special_dmgval, (struct monst *, struct monst *, long, long *));
2804 E void FDECL(silver_sears, (struct monst *, struct monst *, long));
2805 E struct obj *FDECL(select_rwep, (struct monst *));
2806 E boolean FDECL(monmightthrowwep, (struct obj *));
2807 E struct obj *FDECL(select_hwep, (struct monst *));
2808 E void FDECL(possibly_unwield, (struct monst *, BOOLEAN_P));
2809 E void FDECL(mwepgone, (struct monst *));
2810 E int FDECL(mon_wield_item, (struct monst *));
2811 E int NDECL(abon);
2812 E int NDECL(dbon);
2813 E void FDECL(wet_a_towel, (struct obj *, int, BOOLEAN_P));
2814 E void FDECL(dry_a_towel, (struct obj *, int, BOOLEAN_P));
2815 E char *FDECL(skill_level_name, (int, char *));
2816 E const char *FDECL(skill_name, (int));
2817 E boolean FDECL(can_advance, (int, BOOLEAN_P));
2818 E int NDECL(enhance_weapon_skill);
2819 E void FDECL(unrestrict_weapon_skill, (int));
2820 E void FDECL(use_skill, (int, int));
2821 E void FDECL(add_weapon_skill, (int));
2822 E void FDECL(lose_weapon_skill, (int));
2823 E int FDECL(weapon_type, (struct obj *));
2824 E int NDECL(uwep_skill_type);
2825 E int FDECL(weapon_hit_bonus, (struct obj *));
2826 E int FDECL(weapon_dam_bonus, (struct obj *));
2827 E void FDECL(skill_init, (const struct def_skill *));
2828
2829 /* ### were.c ### */
2830
2831 E void FDECL(were_change, (struct monst *));
2832 E int FDECL(counter_were, (int));
2833 E int FDECL(were_beastie, (int));
2834 E void FDECL(new_were, (struct monst *));
2835 E int FDECL(were_summon, (struct permonst *, BOOLEAN_P, int *, char *));
2836 E void NDECL(you_were);
2837 E void FDECL(you_unwere, (BOOLEAN_P));
2838 E void FDECL(set_ulycn, (int));
2839
2840 /* ### wield.c ### */
2841
2842 E void FDECL(setuwep, (struct obj *));
2843 E void FDECL(setuqwep, (struct obj *));
2844 E void FDECL(setuswapwep, (struct obj *));
2845 E int NDECL(dowield);
2846 E int NDECL(doswapweapon);
2847 E int NDECL(dowieldquiver);
2848 E boolean FDECL(wield_tool, (struct obj *, const char *));
2849 E int NDECL(can_twoweapon);
2850 E void NDECL(drop_uswapwep);
2851 E int NDECL(dotwoweapon);
2852 E void NDECL(uwepgone);
2853 E void NDECL(uswapwepgone);
2854 E void NDECL(uqwepgone);
2855 E void NDECL(untwoweapon);
2856 E int FDECL(chwepon, (struct obj *, int));
2857 E int FDECL(welded, (struct obj *));
2858 E void FDECL(weldmsg, (struct obj *));
2859 E void FDECL(setmnotwielded, (struct monst *, struct obj *));
2860 E boolean FDECL(mwelded, (struct obj *));
2861
2862 /* ### windows.c ### */
2863
2864 E void FDECL(choose_windows, (const char *));
2865 #ifdef WINCHAIN
2866 void FDECL(addto_windowchain, (const char *s));
2867 void NDECL(commit_windowchain);
2868 #endif
2869 E boolean NDECL(genl_can_suspend_no);
2870 E boolean NDECL(genl_can_suspend_yes);
2871 E char FDECL(genl_message_menu, (CHAR_P, int, const char *));
2872 E void FDECL(genl_preference_update, (const char *));
2873 E char *FDECL(genl_getmsghistory, (BOOLEAN_P));
2874 E void FDECL(genl_putmsghistory, (const char *, BOOLEAN_P));
2875 #ifdef HANGUPHANDLING
2876 E void NDECL(nhwindows_hangup);
2877 #endif
2878 E void NDECL(genl_status_init);
2879 E void NDECL(genl_status_finish);
2880 E void FDECL(genl_status_enablefield, (int, const char *, const char *,
2881                                        BOOLEAN_P));
2882 E void FDECL(genl_status_update, (int, genericptr_t, int, int, int,
2883                                   unsigned long *));
2884 #ifdef DUMPLOG
2885 E char *FDECL(dump_fmtstr, (const char *, char *, BOOLEAN_P));
2886 #endif
2887 E void FDECL(dump_open_log, (time_t));
2888 E void NDECL(dump_close_log);
2889 E void FDECL(dump_redirect, (BOOLEAN_P));
2890 E void FDECL(dump_forward_putstr, (winid, int, const char*, int));
2891
2892 /* ### winnt.c ### */
2893 #ifdef WIN32
2894 E void NDECL(nethack_enter_winnt);
2895 #endif
2896
2897 /* ### wizard.c ### */
2898
2899 E void NDECL(amulet);
2900 E int FDECL(mon_has_amulet, (struct monst *));
2901 E int FDECL(mon_has_special, (struct monst *));
2902 E int FDECL(tactics, (struct monst *));
2903 E boolean FDECL(has_aggravatables, (struct monst *));
2904 E void NDECL(aggravate);
2905 E void NDECL(clonewiz);
2906 E int NDECL(pick_nasty);
2907 E int FDECL(nasty, (struct monst *));
2908 E void NDECL(resurrect);
2909 E void NDECL(intervene);
2910 E void NDECL(wizdead);
2911 E void FDECL(cuss, (struct monst *));
2912
2913 /* ### worm.c ### */
2914
2915 E int NDECL(get_wormno);
2916 E void FDECL(initworm, (struct monst *, int));
2917 E void FDECL(worm_move, (struct monst *));
2918 E void FDECL(worm_nomove, (struct monst *));
2919 E void FDECL(wormgone, (struct monst *));
2920 E void FDECL(wormhitu, (struct monst *));
2921 E void FDECL(cutworm, (struct monst *, XCHAR_P, XCHAR_P, BOOLEAN_P));
2922 E void FDECL(see_wsegs, (struct monst *));
2923 E void FDECL(detect_wsegs, (struct monst *, BOOLEAN_P));
2924 E void FDECL(save_worm, (int, int));
2925 E void FDECL(rest_worm, (int));
2926 E void FDECL(place_wsegs, (struct monst *, struct monst *));
2927 E void FDECL(sanity_check_worm, (struct monst *));
2928 E void FDECL(remove_worm, (struct monst *));
2929 E void FDECL(place_worm_tail_randomly, (struct monst *, XCHAR_P, XCHAR_P));
2930 E int FDECL(size_wseg, (struct monst *));
2931 E int FDECL(count_wsegs, (struct monst *));
2932 E boolean FDECL(worm_known, (struct monst *));
2933 E boolean FDECL(worm_cross, (int, int, int, int));
2934 E int FDECL(wseg_at, (struct monst *, int, int));
2935
2936 /* ### worn.c ### */
2937
2938 E void FDECL(setworn, (struct obj *, long));
2939 E void FDECL(setnotworn, (struct obj *));
2940 E struct obj *FDECL(wearmask_to_obj, (long));
2941 E long FDECL(wearslot, (struct obj *));
2942 E void FDECL(mon_set_minvis, (struct monst *));
2943 E void FDECL(mon_adjust_speed, (struct monst *, int, struct obj *));
2944 E void FDECL(update_mon_intrinsics,
2945              (struct monst *, struct obj *, BOOLEAN_P, BOOLEAN_P));
2946 E int FDECL(find_mac, (struct monst *));
2947 E void FDECL(m_dowear, (struct monst *, BOOLEAN_P));
2948 E struct obj *FDECL(which_armor, (struct monst *, long));
2949 E void FDECL(mon_break_armor, (struct monst *, BOOLEAN_P));
2950 E void FDECL(bypass_obj, (struct obj *));
2951 E void NDECL(clear_bypasses);
2952 E void FDECL(bypass_objlist, (struct obj *, BOOLEAN_P));
2953 E struct obj *FDECL(nxt_unbypassed_obj, (struct obj *));
2954 E struct obj *FDECL(nxt_unbypassed_loot, (Loot *, struct obj *));
2955 E int FDECL(racial_exception, (struct monst *, struct obj *));
2956
2957 /* ### write.c ### */
2958
2959 E int FDECL(dowrite, (struct obj *));
2960
2961 /* ### zap.c ### */
2962
2963 E void FDECL(learnwand, (struct obj *));
2964 E int FDECL(bhitm, (struct monst *, struct obj *));
2965 E void FDECL(probe_monster, (struct monst *));
2966 E boolean FDECL(get_obj_location, (struct obj *, xchar *, xchar *, int));
2967 E boolean FDECL(get_mon_location, (struct monst *, xchar *, xchar *, int));
2968 E struct monst *FDECL(get_container_location,
2969                       (struct obj * obj, int *, int *));
2970 E struct monst *FDECL(montraits, (struct obj *, coord *, BOOLEAN_P));
2971 E struct monst *FDECL(revive, (struct obj *, BOOLEAN_P));
2972 E int FDECL(unturn_dead, (struct monst *));
2973 E void FDECL(cancel_item, (struct obj *));
2974 E boolean FDECL(drain_item, (struct obj *, BOOLEAN_P));
2975 E struct obj *FDECL(poly_obj, (struct obj *, int));
2976 E boolean FDECL(obj_resists, (struct obj *, int, int));
2977 E boolean FDECL(obj_shudders, (struct obj *));
2978 E void FDECL(do_osshock, (struct obj *));
2979 E int FDECL(bhito, (struct obj *, struct obj *));
2980 E int FDECL(bhitpile,
2981             (struct obj *, int (*)(OBJ_P, OBJ_P), int, int, SCHAR_P));
2982 E int FDECL(zappable, (struct obj *));
2983 E void FDECL(zapnodir, (struct obj *));
2984 E int NDECL(dozap);
2985 E int FDECL(zapyourself, (struct obj *, BOOLEAN_P));
2986 E void FDECL(ubreatheu, (struct attack *));
2987 E int FDECL(lightdamage, (struct obj *, BOOLEAN_P, int));
2988 E boolean FDECL(flashburn, (long));
2989 E boolean FDECL(cancel_monst, (struct monst *, struct obj *, BOOLEAN_P,
2990                                BOOLEAN_P, BOOLEAN_P));
2991 E void NDECL(zapsetup);
2992 E void NDECL(zapwrapup);
2993 E void FDECL(weffects, (struct obj *));
2994 E int FDECL(spell_damage_bonus, (int));
2995 E const char *FDECL(exclam, (int force));
2996 E void FDECL(hit, (const char *, struct monst *, const char *));
2997 E void FDECL(miss, (const char *, struct monst *));
2998 E struct monst *FDECL(bhit, (int, int, int, enum bhit_call_types,
2999                              int (*)(MONST_P, OBJ_P),
3000                              int (*)(OBJ_P, OBJ_P), struct obj **));
3001 E struct monst *FDECL(boomhit, (struct obj *, int, int));
3002 E int FDECL(zhitm, (struct monst *, int, int, struct obj **));
3003 E int FDECL(burn_floor_objects, (int, int, BOOLEAN_P, BOOLEAN_P));
3004 E void FDECL(buzz, (int, int, XCHAR_P, XCHAR_P, int, int));
3005 E void FDECL(dobuzz, (int, int, XCHAR_P, XCHAR_P, int, int, BOOLEAN_P));
3006 E void FDECL(melt_ice, (XCHAR_P, XCHAR_P, const char *));
3007 E void FDECL(start_melt_ice_timeout, (XCHAR_P, XCHAR_P, long));
3008 E void FDECL(melt_ice_away, (ANY_P *, long));
3009 E int FDECL(zap_over_floor, (XCHAR_P, XCHAR_P, int, boolean *, SHORT_P));
3010 E void FDECL(fracture_rock, (struct obj *));
3011 E boolean FDECL(break_statue, (struct obj *));
3012 E void FDECL(destroy_item, (int, int));
3013 E int FDECL(destroy_mitem, (struct monst *, int, int));
3014 E int FDECL(resist, (struct monst *, CHAR_P, int, int));
3015 E void NDECL(makewish);
3016
3017 #endif /* !MAKEDEFS_C && !LEV_LEX_C */
3018
3019 #if 1 /*JP*/
3020
3021 /* ### jlib.c  ### */
3022
3023 E int FDECL(is_kanji, (unsigned int));
3024 E void FDECL(setkcode,(int));
3025 E unsigned char *FDECL(e2sj, (unsigned char *));
3026 E unsigned char *FDECL(sj2e, (unsigned char *));
3027 E const char *FDECL(str2ic, (const char *));
3028 #ifdef SJIS_FILESYSTEM
3029 E const char *FDECL(ic2str, (const char *));
3030 #endif
3031 E int FDECL(jbuffer, (unsigned int, unsigned int *, void (*)(unsigned int), void (*)(unsigned char *)));
3032 E int FDECL(cbuffer, (unsigned int));
3033 E void FDECL(cputchar,(int));
3034 E void FDECL(jputchar,(int));
3035 E void FDECL(jputs,(const char *));
3036 E int FDECL(is_kanji2, (const char *,int));
3037 E int FDECL(is_kanji1, (const char *,int));
3038 E int FDECL(offset_in_kanji, (const unsigned char *, int));
3039 E int FDECL(isspace_8, (int));
3040 E void FDECL(split_japanese, (char *,char *,char *,int));
3041 E void FDECL(jrndm_replace, (char *));
3042 E const char *FDECL(joffmsg, (struct obj *, const char **));
3043 E const char *FDECL(jonmsg, (struct obj *, const char **));
3044 E const char *FDECL(numeral, (struct obj *));
3045 E struct trans_verb *FDECL(trans_verb, (const char *));
3046
3047 /* ### jconj.c  ### */
3048
3049 E const char *FDECL(jconj, (const char *,const char *));
3050 E const char *FDECL(jcan, (const char *));
3051 E const char *FDECL(jcannot, (const char *));
3052 E const char *FDECL(jpast, (const char *));
3053 E const char *FDECL(jpolite, (const char *));
3054 E const char *FDECL(jconj_adj, (const char *));
3055 E int FDECL(jrubout, (char *, int, int, int));
3056
3057 #endif
3058
3059 #undef E
3060
3061 #endif /* EXTERN_H */