purge trampoli.h

This commit is contained in:
nhmall
2020-12-13 10:27:49 -05:00
parent 4729062846
commit 8c42d306f7
17 changed files with 16 additions and 130 deletions

View File

@@ -208,20 +208,6 @@ E char FDECL(cmd_from_func, (int NDECL((*))));
E const char *FDECL(cmdname_from_func, (int NDECL((*)), char *, BOOLEAN_P));
E boolean FDECL(redraw_cmd, (CHAR_P));
E const char *FDECL(levltyp_to_name, (int));
#ifdef USE_TRAMPOLI
E int NDECL(doextcmd);
E int NDECL(domonability);
E int NDECL(doprev_message);
E int NDECL(timed_occupation);
E int NDECL(doattributes);
E int NDECL(wiz_detect);
E int NDECL(wiz_genesis);
E int NDECL(wiz_identify);
E int NDECL(wiz_level_tele);
E int NDECL(wiz_map);
E int NDECL(wiz_where);
E int NDECL(wiz_wish);
#endif /* USE_TRAMPOLI */
E void NDECL(reset_occupations);
E void FDECL(set_occupation, (int (*)(void), const char *, int));
E char NDECL(pgetchar);
@@ -297,10 +283,6 @@ E void FDECL(use_crystal_ball, (struct obj **));
E void NDECL(do_mapping);
E void FDECL(do_vicinity_map, (struct obj *));
E void FDECL(cvt_sdoor_to_door, (struct rm *));
#ifdef USE_TRAMPOLI
E void FDECL(findone, (int, int, genericptr_t));
E void FDECL(openone, (int, int, genericptr_t));
#endif
E int NDECL(findit);
E int NDECL(openit);
E boolean FDECL(detecting, (void (*)(int, int, genericptr)));
@@ -318,9 +300,6 @@ E void FDECL(reveal_terrain, (int, int));
E int FDECL(dig_typ, (struct obj *, XCHAR_P, XCHAR_P));
E boolean NDECL(is_digging);
#ifdef USE_TRAMPOLI
E int NDECL(dig);
#endif
E int NDECL(holetime);
E boolean FDECL(dig_check, (struct monst *, BOOLEAN_P, int, int));
E void FDECL(digactualhole, (int, int, struct monst *, int));
@@ -398,10 +377,6 @@ E int FDECL(warning_of, (struct monst *));
/* ### do.c ### */
#ifdef USE_TRAMPOLI
E int FDECL(drop, (struct obj *));
E int NDECL(wipeoff);
#endif
E int NDECL(dodrop);
E boolean FDECL(boulder_hits_pool, (struct obj *, int, int, BOOLEAN_P));
E boolean FDECL(flooreffects, (struct obj *, int, int, const char *));
@@ -485,14 +460,6 @@ E const char *FDECL(lookup_novel, (const char *, int *));
/* ### do_wear.c ### */
#ifdef USE_TRAMPOLI
E int NDECL(Armor_on);
E int NDECL(Boots_on);
E int NDECL(Gloves_on);
E int NDECL(Helmet_on);
E int FDECL(select_off, (struct obj *));
E int NDECL(take_off);
#endif
E const char *FDECL(fingers_or_gloves, (BOOLEAN_P));
E void FDECL(off_msg, (struct obj *));
E void FDECL(toggle_displacement, (struct obj *, long, BOOLEAN_P));
@@ -562,9 +529,6 @@ E struct obj *FDECL(droppables, (struct monst *));
E int FDECL(dog_nutrition, (struct monst *, struct obj *));
E int FDECL(dog_eat, (struct monst *, struct obj *, int, int, BOOLEAN_P));
E int FDECL(dog_move, (struct monst *, int));
#ifdef USE_TRAMPOLI
E void FDECL(wantdoor, (int, int, genericptr_t));
#endif
E void FDECL(finish_meating, (struct monst *));
/* ### dokick.c ### */
@@ -685,12 +649,6 @@ E const char *FDECL(endgamelevelname, (char *, int));
/* ### eat.c ### */
#ifdef USE_TRAMPOLI
E int NDECL(eatmdone);
E int NDECL(eatfood);
E int NDECL(opentin);
E int NDECL(unfaint);
#endif
E void NDECL(eatmupdate);
E boolean FDECL(is_edible, (struct obj *));
E void NDECL(init_uhunger);
@@ -724,9 +682,6 @@ E boolean FDECL(Popeye, (int));
E void FDECL(done1, (int));
E int NDECL(done2);
#ifdef USE_TRAMPOLI
E void FDECL(done_intr, (int));
#endif
E void FDECL(done_in_by, (struct monst *, int));
#endif /* !MAKEDEFS_C && MDLIB_C */
E void VDECL(panic, (const char *, ...)) PRINTF_F(1, 2) NORETURN;
@@ -866,9 +821,6 @@ E boolean FDECL(Death_quote, (char *, int));
E void FDECL(floating_above, (const char *));
E void FDECL(dogushforth, (int));
#ifdef USE_TRAMPOLI
E void FDECL(gush, (int, int, genericptr_t));
#endif
E void FDECL(dryup, (XCHAR_P, XCHAR_P, BOOLEAN_P));
E void NDECL(drinkfountain);
E void FDECL(dipfountain, (struct obj *));
@@ -1026,9 +978,6 @@ E void FDECL(unsortloot, (Loot **));
E void FDECL(assigninvlet, (struct obj *));
E struct obj *FDECL(merge_choice, (struct obj *, struct obj *));
E int FDECL(merged, (struct obj **, struct obj **));
#ifdef USE_TRAMPOLI
E int FDECL(ckunpaid, (struct obj *));
#endif
E void FDECL(addinv_core1, (struct obj *));
E void FDECL(addinv_core2, (struct obj *));
E struct obj *FDECL(addinv, (struct obj *));
@@ -1144,10 +1093,6 @@ E int NDECL(wiz_light_sources);
/* ### lock.c ### */
#ifdef USE_TRAMPOLI
E int NDECL(forcelock);
E int NDECL(picklock);
#endif
E boolean FDECL(picking_lock, (int *, int *));
E boolean FDECL(picking_at, (int, int));
E void FDECL(breakchestlock, (struct obj *, BOOLEAN_P));
@@ -1318,9 +1263,6 @@ E void NDECL(gain_guardian_angel);
/* ### mklev.c ### */
#ifdef USE_TRAMPOLI
E int FDECL(do_comp, (genericptr_t, genericptr_t));
#endif
E void NDECL(sort_rooms);
E void FDECL(add_room, (int, int, int, int, BOOLEAN_P, SCHAR_P, BOOLEAN_P));
E void FDECL(add_subroom, (struct mkroom *, int, int, int, int, BOOLEAN_P,
@@ -1704,9 +1646,6 @@ E boolean FDECL(find_defensive, (struct monst *));
E int FDECL(use_defensive, (struct monst *));
E int FDECL(rnd_defensive_item, (struct monst *));
E boolean FDECL(find_offensive, (struct monst *));
#ifdef USE_TRAMPOLI
E int FDECL(mbhitm, (struct monst *, struct obj *));
#endif
E int FDECL(use_offensive, (struct monst *));
E int FDECL(rnd_offensive_item, (struct monst *));
E boolean FDECL(find_misc, (struct monst *));
@@ -1998,10 +1937,6 @@ E boolean FDECL(allow_category, (struct obj *));
E boolean FDECL(is_worn_by_type, (struct obj *));
E int FDECL(ck_bag, (struct obj *));
E void FDECL(removed_from_icebox, (struct obj *));
#ifdef USE_TRAMPOLI
E int FDECL(in_container, (struct obj *));
E int FDECL(out_container, (struct obj *));
#endif
E int FDECL(pickup, (int));
E int FDECL(pickup_object, (struct obj *, long, BOOLEAN_P));
E int FDECL(query_category, (const char *, struct obj *, int,
@@ -2104,9 +2039,6 @@ E const char *NDECL(bottlename);
E boolean FDECL(critically_low_hp, (BOOLEAN_P));
E boolean NDECL(stuck_in_wall);
#ifdef USE_TRAMPOLI
E int NDECL(prayer_done);
#endif
E int NDECL(dosacrifice);
E boolean FDECL(can_pray, (BOOLEAN_P));
E int NDECL(dopray);
@@ -2197,9 +2129,6 @@ E void FDECL(drop_boulder_on_player,
(BOOLEAN_P, BOOLEAN_P, BOOLEAN_P, BOOLEAN_P));
E boolean FDECL(drop_boulder_on_monster, (int, int, BOOLEAN_P, BOOLEAN_P));
E void FDECL(wand_explode, (struct obj *, int));
#ifdef USE_TRAMPOLI
E void FDECL(set_lit, (int, int, genericptr_t));
#endif
E void FDECL(litroom, (BOOLEAN_P, struct obj *));
E void FDECL(do_genocide, (int));
E void FDECL(punish, (struct obj *));
@@ -2534,9 +2463,6 @@ E void FDECL(l_register_des, (lua_State *));
/* ### spell.c ### */
E void FDECL(book_cursed, (struct obj *));
#ifdef USE_TRAMPOLI
E int NDECL(learn);
#endif
E int FDECL(study_book, (struct obj *));
E void FDECL(book_disappears, (struct obj *));
E void FDECL(book_substitution, (struct obj *, struct obj *));
@@ -2551,10 +2477,6 @@ E void FDECL(initialspell, (struct obj *));
/* ### steal.c ### */
#ifdef USE_TRAMPOLI
E int NDECL(stealarm);
E void NDECL(unstolenarm);
#endif
E long FDECL(somegold, (long));
E void FDECL(stealgold, (struct monst *));
E void NDECL(thiefdead);

View File

@@ -272,23 +272,10 @@ typedef struct sortloot_item Loot;
#include "display.h"
#include "engrave.h"
#ifdef USE_TRAMPOLI /* this doesn't belong here, but we have little choice */
#undef NDECL
#define NDECL(f) f()
#endif
#include "extern.h"
#include "winprocs.h"
#include "sys.h"
#ifdef USE_TRAMPOLI
#include "wintty.h"
#undef WINTTY_H
#include "trampoli.h"
#undef EXTERN_H
#include "extern.h"
#endif /* USE_TRAMPOLI */
/* flags to control makemon(); goodpos() uses some plus has some of its own*/
#define NO_MM_FLAGS 0x000000L /* use this rather than plain 0 */
#define NO_MINVENT 0x000001L /* suppress minvent when creating mon */

View File

@@ -259,22 +259,6 @@
/* Sanity check, do not modify these blocks. */
/* OVERLAY must be defined with MOVERLAY or VROOMM */
#if (defined(MOVERLAY) || defined(VROOMM))
#ifndef OVERLAY
#define OVERLAY
#endif
#endif
#if defined(FUNCTION_LEVEL_LINKING)
#define OVERLAY
#endif
#if defined(OVERLAY) && !defined(MOVERLAY) && !defined(VROOMM) \
&& !defined(FUNCTION_LEVEL_LINKING)
#define USE_TRAMPOLI
#endif
#if defined(MSDOS) && defined(NO_TERMS)
#ifdef TERMLIB
#if defined(_MSC_VER) || defined(__SC__)

View File

@@ -184,11 +184,10 @@ typedef const char *vA;
* FDECL() is used for functions with a fixed number of arguments;
* VDECL() is used for functions with a variable number of arguments.
* Separate macros are needed because ANSI will mix old-style declarations
* with prototypes, except in the case of varargs, and the OVERLAY-specific
* trampoli.* mechanism conflicts with the ANSI <<f(void)>> syntax.
*/
* with prototypes, except in the case of varargs
*/
#define NDECL(f) f(void) /* overridden later if USE_TRAMPOLI set */
#define NDECL(f) f(void)
#define FDECL(f, p) f p

View File

@@ -1,288 +0,0 @@
/* NetHack 3.7 trampoli.h $NHDT-Date: 1596498566 2020/08/03 23:49:26 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.13 $ */
/* Copyright (c) 1989, by Norm Meluch and Stephen Spackman */
/* NetHack may be freely redistributed. See license for details. */
#ifndef TRAMPOLI_H
#define TRAMPOLI_H
#ifdef USE_TRAMPOLI
/* ### apply.c ### */
#define dig() dig_()
#define doapply() doapply_()
#define dojump() dojump_()
#define dorub() dorub_()
/* ### artifact.c ### */
#define doinvoke() doinvoke_()
/* ### cmd.c ### */
#define doextcmd() doextcmd_()
#define doextlist() doextlist_()
#define domonability() domonability_()
#define enter_explore_mode() enter_explore_mode_()
#define doprev_message() doprev_message_()
#define timed_occupation() timed_occupation_()
#define wiz_attributes() wiz_attributes_()
#define wiz_detect() wiz_detect_()
#define wiz_genesis() wiz_genesis_()
#define wiz_identify() wiz_identify_()
#define wiz_level_tele() wiz_level_tele_()
#define wiz_map() wiz_map_()
#define wiz_where() wiz_where_()
#define wiz_wish() wiz_wish_()
/* ### display.c ### */
#define doredraw() doredraw_()
/* ### do.c ### */
#define doddrop() doddrop_()
#define dodown() dodown_()
#define dodrop() dodrop_()
#define donull() donull_()
#define doup() doup_()
#define dowipe() dowipe_()
#define drop(x) drop_(x)
#define wipeoff() wipeoff_()
/* ### do_name.c ### */
#define ddocall() ddocall_()
#define do_mname() do_mname_()
/* ### do_wear.c ### */
#define Armor_off() Armor_off_()
#define Boots_off() Boots_off_()
#define Gloves_off() Gloves_off_()
#define Helmet_off() Helmet_off_()
#define Armor_on() Armor_on_()
#define Boots_on() Boots_on_()
#define Gloves_on() Gloves_on_()
#define Helmet_on() Helmet_on_()
#define doddoremarm() doddoremarm_()
#define doputon() doputon_()
#define doremring() doremring_()
#define dotakeoff() dotakeoff_()
#define dowear() dowear_()
#define select_off(x) select_off_(x)
#define take_off() take_off_()
/* ### dogmove.c ### */
#define wantdoor(x, y, dummy) wantdoor_(x, y, dummy)
/* ### dokick.c ### */
#define dokick() dokick_()
/* ### dothrow.c ### */
#define dothrow() dothrow_()
/* ### eat.c ### */
#define Hear_again() Hear_again_()
#define eatmdone() eatmdone_()
#define doeat() doeat_()
#define eatfood() eatfood_()
#define opentin() opentin_()
#define unfaint() unfaint_()
/* ### end.c ### */
#define done1(sig) done1_(sig)
#define done2() done2_()
#define done_intr(sig) done_intr_(sig)
#if defined(UNIX) || defined(VMS) || defined(__EMX__)
#define done_hangup(sig) done_hangup_(sig)
#endif
/* ### engrave.c ### */
#define doengrave() doengrave_()
/* ### fountain.c ### */
#define gush(x, y, poolcnt) gush_(x, y, poolcnt)
/* ### hack.c ### */
#define dopickup() dopickup_()
#define identify(x) identify_(x)
/* ### invent.c ### */
#define ckunpaid(x) ckunpaid_(x)
#define ddoinv() ddoinv_()
#define dolook() dolook_()
#define dopramulet() dopramulet_()
#define doprarm() doprarm_()
#define doprgold() doprgold_()
#define doprring() doprring_()
#define doprtool() doprtool_()
#define doprwep() doprwep_()
#define dotypeinv() dotypeinv_()
#define doorganize() doorganize_()
/* ### ioctl.c ### */
#ifdef UNIX
#ifdef SUSPEND
#define dosuspend() dosuspend_()
#endif /* SUSPEND */
#endif /* UNIX */
/* ### lock.c ### */
#define doclose() doclose_()
#define doforce() doforce_()
#define doopen() doopen_()
#define forcelock() forcelock_()
#define picklock() picklock_()
/* ### mklev.c ### */
#define do_comp(x, y) comp_(x, y)
/* ### mondata.c ### */
/* See comment in trampoli.c before uncommenting canseemon. */
/* #define canseemon(x) canseemon_(x) */
/* ### muse.c ### */
#define mbhitm(x, y) mbhitm_(x, y)
/* ### o_init.c ### */
#define dodiscovered() dodiscovered_()
/* ### objnam.c ### */
#define doname(x) doname_(x)
#define xname(x) xname_(x)
/* ### options.c ### */
#define doset() doset_()
#define dotogglepickup() dotogglepickup_()
/* ### pager.c ### */
#define dohelp() dohelp_()
#define dohistory() dohistory_()
#ifdef UNIX
#define intruph() intruph_()
#endif /* UNIX */
#define dowhatdoes() dowhatdoes_()
#define dowhatis() dowhatis_()
#define doquickwhatis() doquickwhatis_()
/* ### pcsys.c ### */
#ifdef SHELL
#define dosh() dosh_()
#endif /* SHELL */
/* ### pickup.c ### */
#define ck_bag(x) ck_bag_(x)
#define doloot() doloot_()
#define in_container(x) in_container_(x)
#define out_container(x) out_container_(x)
/* ### potion.c ### */
#define dodrink() dodrink_()
#define dodip() dodip_()
/* ### pray.c ### */
#define doturn() doturn_()
#define dopray() dopray_()
#define prayer_done() prayer_done_()
#define dosacrifice() dosacrifice_()
/* ### read.c ### */
#define doread() doread_()
#define set_lit(x, y, val) set_lit_(x, y, val)
/* ### rip.c ### */
#define genl_outrip(tmpwin, how) genl_outrip_(tmpwin, how)
/* ### save.c ### */
#define dosave() dosave_()
#if defined(UNIX) || defined(VMS) || defined(__EMX__)
#define hangup(sig) hangup_(sig)
#endif
/* ### search.c ### */
#define doidtrap() doidtrap_()
#define dosearch() dosearch_()
#define findone(zx, zy, num) findone_(zx, zy, num)
#define openone(zx, zy, num) openone_(zx, zy, num)
/* ### shk.c ### */
#define dopay() dopay_()
/* ### sit.c ### */
#define dosit() dosit_()
/* ### sounds.c ### */
#define dotalk() dotalk_()
/* ### spell.c ### */
#define learn() learn_()
#define docast() docast_()
#define dovspell() dovspell_()
/* ### steal.c ### */
#define stealarm() stealarm_()
/* ### trap.c ### */
#define dotele() dotele_()
#define dountrap() dountrap_()
#define float_down() float_down_()
/* ### version.c ### */
#define doversion() doversion_()
#define doextversion() doextversion_()
/* ### wield.c ### */
#define dowield() dowield_()
/* ### zap.c ### */
#define bhitm(x, y) bhitm_(x, y)
#define bhito(x, y) bhito_(x, y)
#define dozap() dozap_()
/* ### getline.c ### */
#define tty_getlin(x, y) tty_getlin_(x, y)
#define tty_get_ext_cmd() tty_get_ext_cmd_()
/* ### termcap.c ### */
#define tty_nhbell() tty_nhbell_()
#define tty_number_pad(x) tty_number_pad_(x)
#define tty_delay_output() tty_delay_output_()
#define tty_start_screen() tty_start_screen_()
#define tty_end_screen() tty_end_screen_()
/* ### topl.c ### */
#define tty_doprev_message() tty_doprev_message_()
#define tty_yn_function(x, y, z) tty_yn_function_(x, y, z)
/* ### wintty.c ### */
#define tty_init_nhwindows(x, y) tty_init_nhwindows_(x, y)
#define tty_player_selection() tty_player_selection_()
#define tty_askname() tty_askname_()
#define tty_get_nh_event() tty_get_nh_event_()
#define tty_exit_nhwindows(x) tty_exit_nhwindows_(x)
#define tty_suspend_nhwindows(x) tty_suspend_nhwindows_(x)
#define tty_resume_nhwindows() tty_resume_nhwindows_()
#define tty_create_nhwindow(x) tty_create_nhwindow_(x)
#define tty_clear_nhwindow(x) tty_clear_nhwindow_(x)
#define tty_display_nhwindow(x, y) tty_display_nhwindow_(x, y)
#define tty_destroy_nhwindow(x) tty_destroy_nhwindow_(x)
#define tty_curs(x, y, z) tty_curs_(x, y, z)
#define tty_putstr(x, y, z) tty_putstr_(x, y, z)
#define tty_display_file(x, y) tty_display_file_(x, y)
#define tty_start_menu(x, b) tty_start_menu_(x, b)
#define tty_add_menu(a, b, c, d, e, f, g, h) \
tty_add_menu_(a, b, c, d, e, f, g, h)
#define tty_end_menu(a, b) tty_end_menu_(a, b)
#define tty_select_menu(a, b, c) tty_select_menu_(a, b, c)
#define tty_update_inventory() tty_update_inventory_()
#define tty_mark_synch() tty_mark_synch_()
#define tty_wait_synch() tty_wait_synch_()
#ifdef CLIPPING
#define tty_cliparound(x, y) tty_cliparound_(x, y)
#endif
#ifdef POSITIONBAR
#define tty_update_positionbar(x) tty_update_positionbar_(x)
#endif
#define tty_print_glyph(a, b, c, d, e) tty_print_glyph_(a, b, c, d, e)
#define tty_raw_print(x) tty_raw_print_(x)
#define tty_raw_print_bold(x) tty_raw_print_bold_(x)
#define tty_nhgetch() tty_nhgetch_()
#define tty_nh_poskey(x, y, z) tty_nh_poskey_(x, y, z)
#endif /* USE_TRAMPOLI */
#endif /* TRAMPOLI_H */