$NetBSD: patch-ah,v 1.2 2003/12/06 19:28:22 ben Exp $ --- extern.h.orig 1992-06-19 13:55:30.000000000 -0700 +++ extern.h @@ -2,19 +2,19 @@ /* module: action.c */ -int run(int); -int wield(void); -int ydhi(int); -int ycwi(int); -int wear(void); -int dropobj(void); -int readscr(void); -int eatcookie(void); -int quaff(void); +void run(int); +void wield(void); +void ydhi(int); +void ycwi(int); +void wear(void); +void dropobj(void); +void readscr(void); +void eatcookie(void); +void quaff(void); int qwhatitem(void); int whatitem(char *); long readnum(long); -int do_create(void); +void do_create(void); /* module: bill.c */ @@ -24,53 +24,53 @@ int letter3(void); int letter4(void); int letter5(void); int letter6(void); -int mailbill(void); +void mailbill(void); /* module: config.c */ /* module: create.c */ -int makeplayer(void); -int newcavelevel(int); -int makemaze(int); -int eat(int, int); +void makeplayer(void); +void newcavelevel(int); +void makemaze(int); +void eat(int, int); int cannedlevel(int); -int treasureroom(int); -int troom(int, int, int, int, int, int); -int makeobject(int); -int fillmroom(int, int, int); -int froom(int, int, int); -int fillroom(int, int); +void treasureroom(int); +void troom(int, int, int, int, int, int); +void makeobject(int); +void fillmroom(int, int, int); +void froom(int, int, int); +void fillroom(int, int); int fillmonst(int); -int sethp(int); -int checkgen(void); +void sethp(int); +void checkgen(void); /* module: data.c */ /* module: diag.c */ -int diag(void); -int diagdrawscreen(void); +void diag(void); +void diagdrawscreen(void); /* module: display.c */ -int bottomdo(void); -int bottomgold(void); -int bot_spellx(void); -int bot_linex(void); -int bot_hpx(void); -int botside(void); -int bothp(void); -int draws(int, int, int, int); -int drawscreen(void); -int showcell(int, int); -int show1cell(int, int); -int showplayer(void); +void bottomdo(void); +void bottomgold(void); +void bot_spellx(void); +void bot_linex(void); +void bot_hpx(void); +void botside(void); +void bothp(void); +void draws(int, int, int, int); +void drawscreen(void); +void showcell(int, int); +void show1cell(int, int); +void showplayer(void); int moveplayer(int); -int seemagic(int); -int seepage(void); +void seemagic(int); +void seepage(void); /* module: fortune.c */ @@ -78,178 +78,178 @@ char *fortune(char *); /* module: help.c */ -int help(void); -int welcome(void); -int retcont(void); +void help(void); +void welcome(void); +void retcont(void); int openhelp(void); /* module: io.c */ int getcharacter(void); -int newgame(void); +void newgame(void); /*VARARGS*/ -int lprintf(); -int lprint(long); -int lwrite(char *, int); +void lprintf(char *, ...); +void lprint(long); +void lwrite(char *, int); long lgetc1(void); long lrint(void); -int lrfill(char *, int); +void lrfill(char *, int); char *lgetw(void); char *lgetl(void); int lcreat(char *); int lopen(char *); int lappend(char *); -int lrclose(void); -int lwclose(void); -int lprcat(char *); -int init_term(void); -int cl_up(int, int); -int cl_dn(int, int); -int standout(char *); -int set_score_output(void); -int lflush(void); +void lrclose(void); +void lwclose(void); +void lprcat(char *); +void init_term(void); +void cl_up(int, int); +void cl_dn(int, int); +void standout(char *); +void set_score_output(void); +void lflush(void); int putcharacter(int); -int flush_buf(void); -int tmcapcnv(char *, char *); +void flush_buf(void); +void tmcapcnv(char *, char *); char *getword(char *); /* module: main.c */ int main(int, char **); -int parse(void); -int parse2(void); +void parse(void); +void parse2(void); /* module: monster.c */ -int createmonster(int); +void createmonster(int); int cgood(int, int, int, int); -int createitem(int, int, int, int); -int cast(void); -int speldamage(int); -int loseint(void); +void createitem(int, int, int, int); +void cast(void); +void speldamage(int); +void loseint(void); int isconfuse(void); int nospell(int, int); int fullhit(int); -int direct(int, int, char *, int); -int godirect(int, int, char *, int, int); -int ifblind(int, int); -int tdirect(int); -int makewall(int); -int omnidirect(int, int, char *); +void direct(int, int, char *, int); +void godirect(int, int, char *, int, int); +void ifblind(int, int); +void tdirect(int); +void makewall(int); +void omnidirect(int, int, char *); int dirsub(int *, int *); int verifyxy(int *, int *); -int dirpoly(int); -int hitmonster(int, int); +void dirpoly(int); +void hitmonster(int, int); int hitm(int, int, int); -int hitplayer(int, int); -int dropsomething(int, int, int); -int dropgold(int); -int something(int, int, int); +void hitplayer(int, int); +void dropsomething(int, int, int); +void dropgold(int); +void something(int, int, int); int newobject(int, int *); int spattack(int, int, int); -int checkloss(int); -int annihilate(void); -int genmonst(void); +void checkloss(int); +void annihilate(void); +void genmonst(void); int makemonst(int); -int randmonst(void); +void randmonst(void); /* module: moreobj.c */ -int oaltar(void); -int ohear(void); -int othrone(int); -int odeadthrone(void); -int ochest(void); -int ofountain(void); -int fntchange(int); -int fch(int, long *); +void oaltar(void); +void ohear(void); +void othrone(int); +void odeadthrone(void); +void ochest(void); +void ofountain(void); +void fntchange(int); +void fch(int, long *); /* module: movem.c */ -int movemonst(void); -int movemt(int, int); -int mmove(int, int, int, int); -int teleportmonst(int, int, int); +void movemonst(void); +void movemt(int, int); +void mmove(int, int, int, int); +void teleportmonst(int, int, int); /* module: nap.c */ -int nap(int); -int napms(int); +void nap(int); +void napms(int); /* module: object.c */ -int lookforobject(void); -int finditem(int); -int ostairs(int); -int oteleport(int); -int opotion(int); -int quaffpotion(int); -int oscroll(int); -int adjusttime(long); -int read_scroll(int); -int opit(void); -int obottomless(void); -int oelevator(int); -int ostatue(void); -int omirror(void); -int obook(void); -int readbook(int); -int ocookie(void); -int ogold(int); -int ohome(void); -int iopts(void); -int ignore(void); -int closedoor(void); +void lookforobject(void); +void finditem(int); +void ostairs(int); +void oteleport(int); +void opotion(int); +void quaffpotion(int); +void oscroll(int); +void adjusttime(long); +void read_scroll(int); +void opit(void); +void obottomless(void); +void oelevator(int); +void ostatue(void); +void omirror(void); +void obook(void); +void readbook(int); +void ocookie(void); +void ogold(int); +void ohome(void); +void iopts(void); +void ignore(void); +void closedoor(void); /* module: player.c */ -int raiselevel(void); -int loselevel(void); -int raiseexperience(long); -int loseexperience(long); -int losehp(int); -int losemhp(int); -int raisehp(int); -int raisemhp(int); -int raisespells(int); -int raisemspells(int); -int losespells(int); -int losemspells(int); -int positionplayer(void); -int recalc(void); -int quit(void); -int more(void); +void raiselevel(void); +void loselevel(void); +void raiseexperience(long); +void loseexperience(long); +void losehp(int); +void losemhp(int); +void raisehp(int); +void raisemhp(int); +void raisespells(int); +void raisemspells(int); +void losespells(int); +void losemspells(int); +void positionplayer(void); +void recalc(void); +void quit(void); +void more(void); int take(int, int); int drop_object(int); -int enchantarmor(void); -int enchweapon(void); +void enchantarmor(void); +void enchweapon(void); int pocketfull(void); int nearbymonst(void); int stealsomething(int, int); int emptyhanded(void); -int creategem(void); -int adjustcvalues(int, int); -int gettokstr(char *); +void creategem(void); +void adjustcvalues(int, int); +void gettokstr(char *); int getpassword(void); int getyn(void); int packweight(void); /* module: regen.c */ -int regen(void); +void regen(void); /* module: savelev.c */ -int savelevel(void); -int getlevel(); +void savelevel(void); +void getlevel(void); int savegame(char *); -int restoregame(char *); -int greedy(void); -int fsorry(void); -int fcheat(void); -int init_cells(void); -int bwrite(int, char *, long); -int bread(int, char *, long); +void restoregame(char *); +void greedy(void); +void fsorry(void); +void fcheat(void); +void init_cells(void); +void bwrite(int, char *, long); +void bread(int, char *, long); unsigned int sum(unsigned char *, int); /* module: scores.c */ @@ -261,112 +261,112 @@ int hashewon(void); long paytaxes(long); int winshou(void); int shou(int); -int showscores(void); -int showallscores(void); +void showscores(void); +void showallscores(void); int sortboard(void); -int newscore(long, char *, int, int); -int new1sub(long, int, char *, long); -int new2sub(long, int, char *, int); -int died(int); -int diedsub(int); -int showscore3(int); -int showscore1(int, char **); +void newscore(long, char *, int, int); +void new1sub(long, int, char *, long); +void new2sub(long, int, char *, int); +void died(int); +void diedsub(int); +void showscore3(int); +void showscore1(int, char **); /* module: show.c */ -int showstr(void); -int qshowstr(void); -int t_setup(int); -int t_endup(int); -int showwear(void); -int showwield(void); -int showread(void); -int showeat(void); -int showquaff(void); -int show1(int, char **); -int show3(int); +void showstr(void); +void qshowstr(void); +void t_setup(int); +void t_endup(int); +void showwear(void); +void showwield(void); +void showread(void); +void showeat(void); +void showquaff(void); +void show1(int, char **, int); +void show3(int); /* module: signal.c */ -int s2choose(void); -SIGTYPE cntlc(void); -SIGTYPE sgam(void); +void s2choose(void); +SIGTYPE cntlc(int); +SIGTYPE sgam(int); SIGTYPE tstop(int); -int sigsetup(void); -int sigsave(void); -int sigreset(void); -int sigpanic(int); +void sigsetup(void); +void sigsave(void); +void sigreset(void); +SIGTYPE sigpanic(int); /* module: sphere.c */ -int newsphere(int, int, int, int); -int rmsphere(int, int); -int sphboom(int, int); -int movsphere(void); +void newsphere(int, int, int, int); +void rmsphere(int, int); +void sphboom(int, int); +void movsphere(void); /* module: store.c */ -int dnd_2hed(void); -int dnd_hed(void); -int dndstore(void); -int handsfull(void); -int outofstock(void); -int nogold(void); -int dnditem(int); -int sch_hed(void); -int oschool(void); -int obank(void); -int obank2(void); -int banktitle(char *); -int ointerest(void); -int obanksub(void); -int appraise(int, int); -int otradhead(void); -int otradepost(void); -int cnsitm(void); -int olrs(void); -int nomore(void); -int nocash(void); -int pad_hd(void); -int opad(void); +void dnd_2hed(void); +void dnd_hed(void); +void dndstore(void); +void handsfull(void); +void outofstock(void); +void nogold(void); +void dnditem(int); +void sch_hed(void); +void oschool(void); +void obank(void); +void obank2(void); +void banktitle(char *); +void ointerest(void); +void obanksub(void); +void appraise(int, int); +void otradhead(void); +void otradepost(void); +void cnsitm(void); +void olrs(void); +void nomore(void); +void nocash(void); +void pad_hd(void); +void opad(void); int snag(int); -int pick_char(int); +void pick_char(int); /* module: tok.c */ int yylex(void); -int flushall(void); -int sethard(int); -int readopts(void); +void flushall(void); +void sethard(int); +void readopts(void); /* module: tty.c */ -int setctty(void); -int gettty(void); -int settty(void); -int setuptty(void); -int scbr(void); -int sncbr(void); -int setupvt100(void); -int clearvt100(void); +void setctty(void); +void gettty(void); +void settty(void); +void setuptty(void); +void scbr(void); +void sncbr(void); +void setupvt100(void); +void clearvt100(void); #else /* module: action.c */ -int run(); -int wield(); -int ydhi(); -int ycwi(); -int wear(); -int dropobj(); -int readscr(); -int eatcookie(); -int quaff(); +void run(); +void wield(); +void ydhi(); +void ycwi(); +void wear(); +void dropobj(); +void readscr(); +void eatcookie(); +void quaff(); int qwhatitem(); int whatitem(); long readnum(); -int do_create(); +void do_create(); /* module: bill.c */ @@ -376,53 +376,53 @@ int letter3(); int letter4(); int letter5(); int letter6(); -int mailbill(); +void mailbill(); /* module: config.c */ /* module: create.c */ -int makeplayer(); -int newcavelevel(); -int makemaze(); -int eat(); +void makeplayer(); +void newcavelevel(); +void makemaze(); +void eat(); int cannedlevel(); -int treasureroom(); -int troom(); -int makeobject(); -int fillmroom(); -int froom(); -int fillroom(); +void treasureroom(); +void troom(); +void makeobject(); +void fillmroom(); +void froom(); +void fillroom(); int fillmonst(); -int sethp(); -int checkgen(); +void sethp(); +void checkgen(); /* module: data.c */ /* module: diag.c */ -int diag(); -int diagdrawscreen(); +void diag(); +void diagdrawscreen(); /* module: display.c */ -int bottomdo(); -int bottomgold(); -int bot_spellx(); -int bot_linex(); -int bot_hpx(); -int botside(); -int bothp(); -int draws(); -int drawscreen(); -int showcell(); -int show1cell(); -int showplayer(); +void bottomdo(); +void bottomgold(); +void bot_spellx(); +void bot_linex(); +void bot_hpx(); +void botside(); +void bothp(); +void draws(); +void drawscreen(); +void showcell(); +void show1cell(); +void showplayer(); int moveplayer(); -int seemagic(); -int seepage(); +void seemagic(); +void seepage(); /* module: fortune.c */ @@ -430,178 +430,178 @@ char *fortune(); /* module: help.c */ -int help(); -int welcome(); -int retcont(); +void help(); +void welcome(); +void retcont(); int openhelp(); /* module: io.c */ int getcharacter(); -int newgame(); +void newgame(); /*VARARGS*/ -int lprintf(); -int lprint(); -int lwrite(); +void lprintf(char *, ...); +void lprint(); +void lwrite(); long lgetc1(); long lrint(); -int lrfill(); +void lrfill(); char *lgetw(); char *lgetl(); int lcreat(); int lopen(); int lappend(); -int lrclose(); -int lwclose(); -int lprcat(); -int init_term(); -int cl_up(); -int cl_dn(); -int standout(); -int set_score_output(); -int lflush(); +void lrclose(); +void lwclose(); +void lprcat(); +void init_term(); +void cl_up(); +void cl_dn(); +void standout(); +void set_score_output(); +void lflush(); int putcharacter(); -int flush_buf(); -int tmcapcnv(); +void flush_buf(); +void tmcapcnv(); char *getword(); /* module: main.c */ int main(); -int parse(); -int parse2(); +void parse(); +void parse2(); /* module: monster.c */ -int createmonster(); +void createmonster(); int cgood(); -int createitem(); -int cast(); -int speldamage(); -int loseint(); +void createitem(); +void cast(); +void speldamage(); +void loseint(); int isconfuse(); int nospell(); int fullhit(); -int direct(); -int godirect(); -int ifblind(); -int tdirect(); -int makewall(); -int omnidirect(); +void direct(); +void godirect(); +void ifblind(); +void tdirect(); +void makewall(); +void omnidirect(); int dirsub(); int verifyxy(); -int dirpoly(); -int hitmonster(); +void dirpoly(); +void hitmonster(); int hitm(); -int hitplayer(); -int dropsomething(); -int dropgold(); -int something(); +void hitplayer(); +void dropsomething(); +void dropgold(); +void something(); int newobject(); int spattack(); -int checkloss(); -int annihilate(); -int genmonst(); +void checkloss(); +void annihilate(); +void genmonst(); int makemonst(); -int randmonst(); +void randmonst(); /* module: moreobj.c */ -int oaltar(); -int ohear(); -int othrone(); -int odeadthrone(); -int ochest(); -int ofountain(); -int fntchange(); -int fch(); +void oaltar(); +void ohear(); +void othrone(); +void odeadthrone(); +void ochest(); +void ofountain(); +void fntchange(); +void fch(); /* module: movem.c */ -int movemonst(); -int movemt(); -int mmove(); -int teleportmonst(); +void movemonst(); +void movemt(); +void mmove(); +void teleportmonst(); /* module: nap.c */ -int nap(); -int napms(); +void nap(); +void napms(); /* module: object.c */ -int lookforobject(); -int finditem(); -int ostairs(); -int oteleport(); -int opotion(); -int quaffpotion(); -int oscroll(); -int adjusttime(); -int read_scroll(); -int opit(); -int obottomless(); -int oelevator(); -int ostatue(); -int omirror(); -int obook(); -int readbook(); -int ocookie(); -int ogold(); -int ohome(); -int iopts(); -int ignore(); -int closedoor(); +void lookforobject(); +void finditem(); +void ostairs(); +void oteleport(); +void opotion(); +void quaffpotion(); +void oscroll(); +void adjusttime(); +void read_scroll(); +void opit(); +void obottomless(); +void oelevator(); +void ostatue(); +void omirror(); +void obook(); +void readbook(); +void ocookie(); +void ogold(); +void ohome(); +void iopts(); +void ignore(); +void closedoor(); /* module: player.c */ -int raiselevel(); -int loselevel(); -int raiseexperience(); -int loseexperience(); -int losehp(); -int losemhp(); -int raisehp(); -int raisemhp(); -int raisespells(); -int raisemspells(); -int losespells(); -int losemspells(); -int positionplayer(); -int recalc(); -int quit(); -int more(); +void raiselevel(); +void loselevel(); +void raiseexperience(); +void loseexperience(); +void losehp(); +void losemhp(); +void raisehp(); +void raisemhp(); +void raisespells(); +void raisemspells(); +void losespells(); +void losemspells(); +void positionplayer(); +void recalc(); +void quit(); +void more(); int take(); int drop_object(); -int enchantarmor(); -int enchweapon(); +void enchantarmor(); +void enchweapon(); int pocketfull(); int nearbymonst(); int stealsomething(); int emptyhanded(); -int creategem(); -int adjustcvalues(); -int gettokstr(); +void creategem(); +void adjustcvalues(); +void gettokstr(); int getpassword(); int getyn(); int packweight(); /* module: regen.c */ -int regen(); +void regen(); /* module: savelev.c */ -int savelevel(); -int getlevel(); +void savelevel(); +void getlevel(); int savegame(); -int restoregame(); -int greedy(); -int fsorry(); -int fcheat(); -int init_cells(); -int bwrite(); -int bread(); +void restoregame(); +void greedy(); +void fsorry(); +void fcheat(); +void init_cells(); +void bwrite(); +void bread(); unsigned int sum(); /* module: scores.c */ @@ -613,96 +613,96 @@ int hashewon(); long paytaxes(); int winshou(); int shou(); -int showscores(); -int showallscores(); +void showscores(); +void showallscores(); int sortboard(); -int newscore(); -int new1sub(); -int new2sub(); -int died(); -int diedsub(); -int showscore3(); -int showscore1(); +void newscore(); +void new1sub(); +void new2sub(); +void died(); +void diedsub(); +void showscore3(); +void showscore1(); /* module: show.c */ -int showstr(); -int qshowstr(); -int t_setup(); -int t_endup(); -int showwear(); -int showwield(); -int showread(); -int showeat(); -int showquaff(); -int show1(); -int show3(); +void showstr(); +void qshowstr(); +void t_setup(); +void t_endup(); +void showwear(); +void showwield(); +void showread(); +void showeat(); +void showquaff(); +void show1(); +void show3(); /* module: signal.c */ -int s2choose(); -SIGTYPE cntlc(); -SIGTYPE sgam(); -SIGTYPE tstop(); -int sigsetup(); -int sigsave(); -int sigreset(); -int sigpanic(); +void s2choose(); +SIGTYPE cntlc(int); +SIGTYPE sgam(int); +SIGTYPE tstop(int); +void sigsetup(void); +void sigsave(void); +void sigreset(void); +SIGTYPE sigpanic(int); /* module: sphere.c */ -int newsphere(); -int rmsphere(); -int sphboom(); -int movsphere(); +void newsphere(); +void rmsphere(); +void sphboom(); +void movsphere(); /* module: store.c */ -int dnd_2hed(); -int dnd_hed(); -int dndstore(); -int handsfull(); -int outofstock(); -int nogold(); -int dnditem(); -int sch_hed(); -int oschool(); -int obank(); -int obank2(); -int banktitle(); -int ointerest(); -int obanksub(); -int appraise(); -int otradhead(); -int otradepost(); -int cnsitm(); -int olrs(); -int nomore(); -int nocash(); -int pad_hd(); -int opad(); +void dnd_2hed(); +void dnd_hed(); +void dndstore(); +void handsfull(); +void outofstock(); +void nogold(); +void dnditem(); +void sch_hed(); +void oschool(); +void obank(); +void obank2(); +void banktitle(); +void ointerest(); +void obanksub(); +void appraise(); +void otradhead(); +void otradepost(); +void cnsitm(); +void olrs(); +void nomore(); +void nocash(); +void pad_hd(); +void opad(); int snag(); -int pick_char(); +void pick_char(); /* module: tok.c */ int yylex(); -int flushall(); -int sethard(); -int readopts(); +void flushall(); +void sethard(); +void readopts(); /* module: tty.c */ -int setctty(); -int gettty(); -int settty(); -int setuptty(); -int intron(); -int introff(); -int scbr(); -int sncbr(); -int setupvt100(); -int clearvt100(); +void setctty(); +void gettty(); +void settty(); +void setuptty(); +void intron(); +void introff(); +void scbr(); +void sncbr(); +void setupvt100(); +void clearvt100(); #endif /* __STD__ */ @@ -718,20 +718,20 @@ extern char savefilename[],scorefile[], extern char objnamelist[],optsfile[],*potionname[],stealth[MAXX][MAXY]; extern char *scrollname[],*spelcode[],*speldescript[]; extern char *class[],course[],diagfile[],fortfile[],helpfile[]; -extern char *inbuffer,drug[], know[MAXX][MAXY], item[MAXX][MAXY]; +extern char *inbuffer,drug[], know[MAXX][MAXY]; extern char *levelname[],loginname[],logname[],*lpbuf,*lpend; /* extern char *lpnt, *password, mitem[MAXX][MAXY], moved[MAXX][MAXY]; */ extern char *lpnt, *password, moved[MAXX][MAXY]; -extern char *objectname[], *spelname[],*spelmes[],char_class[], iven[]; -extern char nosignal, nobeep,oldx,oldy,playerx,playery, dropflag; +extern char *objectname[], *spelname[],*spelmes[],char_class[]; +extern char nosignal, nobeep,oldx,oldy,dropflag; extern char restorflag,nomove, srcount, char_picked; -extern char nowelcome, level, cheat, enable_scroll; +extern char nowelcome, cheat, enable_scroll; extern char nch[], ndgg[], ckpflag, monstlevel[]; extern char nlpts[], nplt[],nsw[], mail,boldon, splev[]; extern char potprob[], predostuff, scprob[], spelknow[], do_fork, sex; extern char spelweird[MAXMONST+8][SPNUM], wizard; extern char diroffx[],diroffy[],hitflag,hit2flag,hit3flag; -extern char rmst, lasthx,lasthy,lastpx,lastpy; +extern char rmst; extern char ramboflag, compress; extern short hitp[MAXX][MAXY], ivenarg[], screen[MAXX][MAXY]; @@ -739,6 +739,17 @@ extern short iarg[MAXX][MAXY], lastnum; extern int yrepcount,userid; extern int ipoint, iepoint; +extern int potionknown[MAXPOTION]; +extern int scrollknown[MAXSCROLL]; +extern int playerx; +extern int playery; +extern int level; +extern int iven[]; +extern int item[MAXX][MAXY]; +extern int lasthx; +extern int lasthy; +extern int lastpx; +extern int lastpy; extern long initialtime,outstanding_taxes,skill[],gtime,c[],cbak[]; extern long lasttime;