Mercurial > hg > early-roguelike
comparison srogue/rogue.ext @ 217:94a0d9dd5ce1
Super-Rogue: convert to ANSI-style function declarations.
This fixes most of the build warnings.
| author | John "Elwin" Edwards |
|---|---|
| date | Sun, 31 Jan 2016 13:45:07 -0500 |
| parents | 34d7a614855e |
| children | b67b99f6c92b |
comparison
equal
deleted
inserted
replaced
| 216:b24545357d2e | 217:94a0d9dd5ce1 |
|---|---|
| 1 EXTTHG player; | 1 EXTTHG player; |
| 2 EXTWEP weaps[]; | 2 EXTWEP weaps[]; |
| 3 EXTARM armors[]; | 3 EXTARM armors[]; |
| 4 EXTMON monsters[], *mtlev[]; | 4 EXTMON monsters[], *mtlev[]; |
| 5 EXTTRAP *trap_at(), traps[]; | 5 EXTTRAP traps[]; |
| 6 EXTROOM *roomin(), *oldrp, rooms[]; | 6 EXTROOM *oldrp, rooms[]; |
| 7 EXTCORD *rndmove(), *rnd_pos(), delta, stairs, oldpos, rndspot; | 7 EXTCORD delta, stairs, oldpos, rndspot; |
| 8 EXTLKL *mlist, *lvl_obj, *new_item(), *new_thing(), *new_monster(); | 8 EXTLKL *mlist, *lvl_obj; |
| 9 EXTLKL *find_mons(), *wake_monster(), *find_obj(), *get_item(); | |
| 10 EXTOBJ *cur_armor, *cur_weapon, *cur_ring[]; | 9 EXTOBJ *cur_armor, *cur_weapon, *cur_ring[]; |
| 11 EXTMAG r_magic[], s_magic[], ws_magic[], p_magic[]; | 10 EXTMAG r_magic[], s_magic[], ws_magic[], p_magic[]; |
| 12 EXTMAG things[], a_magic[], w_magic[]; | 11 EXTMAG things[], a_magic[], w_magic[]; |
| 13 EXTINT max_hp, quiet, food_left, hungry_state, level, max_level; | 12 EXTINT max_hp, quiet, food_left, hungry_state, level, max_level; |
| 14 EXTINT foodlev, total, count, demoncnt, fung_hit, ntraps; | 13 EXTINT foodlev, total, count, demoncnt, fung_hit, ntraps; |
| 15 EXTINT lastscore, purse, mpos, seed, dnum, no_food, packvol, playuid; | 14 EXTINT lastscore, purse, mpos, seed, dnum, no_food, packvol, playuid; |
| 16 EXTINT curprice, trader, group, levcount, levtype, ringfood, playgid; | 15 EXTINT curprice, trader, group, levcount, levtype, ringfood, playgid; |
| 17 EXTINT chkstairs(), rollwand(), swander(), notslow(), notfight(), rnd(); | 16 EXTINT chkstairs(), notfight(); |
| 18 EXTINT rchg_str(), wghtchk(), stomach(), doctor(), runners(), status(), sight(); | 17 EXTINT prntfile(); |
| 19 extern void quit(), auto_save(), endit(), byebye(), game_err(); | |
| 20 EXTINT prntfile(), unconfuse(), sapem(); | |
| 21 EXTINT noteth(), notregen(), notinvinc(), unsee(), nohaste(), npch(); | |
| 22 EXTBOOL running, nochange, after, inwhgt, isfight, firstmove, nlmove; | 18 EXTBOOL running, nochange, after, inwhgt, isfight, firstmove, nlmove; |
| 23 EXTBOOL wizard, waswizard, in_shell, amulet, door_stop, playing, use_savedir; | 19 EXTBOOL wizard, waswizard, in_shell, amulet, door_stop, playing, use_savedir; |
| 24 EXTBOOL notify, ws_know[], p_know[], s_know[], r_know[], inpool; | 20 EXTBOOL notify, ws_know[], p_know[], s_know[], r_know[], inpool; |
| 25 EXTCHAR home[], file_name[], whoami[], fruit[], curpurch[], scorefile[]; | 21 EXTCHAR home[], file_name[], whoami[], fruit[], curpurch[], scorefile[]; |
| 26 EXTCHAR *r_stones[], *p_colors[], *s_names[], *ws_type[], *ws_made[]; | 22 EXTCHAR *r_stones[], *p_colors[], *s_names[], *ws_type[], *ws_made[]; |
| 27 EXTCHAR *ws_guess[], *s_guess[], *r_guess[], *p_guess[];/*, *unctrl();*/ | 23 EXTCHAR *ws_guess[], *s_guess[], *r_guess[], *p_guess[];/*, *unctrl();*/ |
| 28 EXTCHAR morestr[], prbuf[], huh[], *identify(), *vowelstr(); | 24 EXTCHAR morestr[], prbuf[], huh[]; |
| 29 EXTCHAR *new(), *strcpy(), *strcat(), *inv_name(), pack_char(), *prname(); | 25 EXTCHAR *release, take, runch; |
| 30 EXTCHAR *num(), *getenv(), *tr_name(), *release, take, runch; | |
| 31 EXTCHAR retstr[], wizstr[], spacemsg[], illegal[], callit[], starlist[]; | 26 EXTCHAR retstr[], wizstr[], spacemsg[], illegal[], callit[], starlist[]; |
| 32 EXTSTAT max_stats, *him; | 27 EXTSTAT max_stats, *him; |
| 33 extern struct magic_info thnginfo[]; | 28 extern struct magic_info thnginfo[]; |
| 34 extern struct real re_stats; | 29 extern struct real re_stats; |
| 35 extern long e_levels[]; | 30 extern long e_levels[]; |
| 44 extern char *sylls[NSYLS]; | 39 extern char *sylls[NSYLS]; |
| 45 extern char *stones[NSTONES]; | 40 extern char *stones[NSTONES]; |
| 46 extern char *wood[NWOOD]; | 41 extern char *wood[NWOOD]; |
| 47 extern char *metal[NMETAL]; | 42 extern char *metal[NMETAL]; |
| 48 | 43 |
| 44 void _attach(struct linked_list **list, struct linked_list *item); | |
| 45 void _detach(struct linked_list **list, struct linked_list *item); | |
| 46 void _free_list(struct linked_list **ptr); | |
| 47 void activity(void); | |
| 48 int add_dam(struct stats *who); | |
| 49 void add_haste(bool potion); | |
| 50 void add_mon(struct room *rm, bool treas); | |
| 51 bool add_pack(struct linked_list *item, bool silent); | |
| 52 void add_pass(void); | |
| 53 void addmsg(char *fmt, ...); | |
| 54 void aggravate(void); | |
| 55 int attack(struct thing *mp); | |
| 56 bool author(void); | |
| 57 void auto_save(int a); | |
| 58 int be_trapped(struct coord *tc, struct thing *th); | |
| 59 void buy_it(void); | |
| 60 void byebye(int how); | |
| 61 bool cansee(int y, int x); | |
| 62 char *charge_str(struct object *obj); | |
| 63 void check_level(void); | |
| 64 void chg_abil(int what, int amt, int how); | |
| 65 void chg_hpt(int howmany, bool alsomax, char what); | |
| 66 void command(void); | |
| 67 bool cordok(int y, int x); | |
| 68 void create_obj(bool fscr); | |
| 69 void cur_null(struct object *op); | |
| 70 void dbotline(WINDOW *scr, char *message); | |
| 71 bool dead_end(char ch); | |
| 72 void death(char monst); | |
| 73 void del_pack(struct linked_list *what); | |
| 74 bool diag_ok(struct coord *sp, struct coord *ep); | |
| 75 void dip_it(void); | |
| 76 void discard(struct linked_list *item); | |
| 77 void displevl(void); | |
| 78 void dispmax(void); | |
| 79 void dispmons(void); | |
| 80 void do_daemons(int flag); | |
| 81 void do_fuses(void); | |
| 82 void do_maze(void); | |
| 83 void do_motion(struct object *obj, int ydelta, int xdelta); | |
| 84 void do_move(int dy, int dx); | |
| 85 void do_passages(void); | |
| 86 void do_post(void); | |
| 87 void do_rooms(void); | |
| 88 void do_run(char ch); | |
| 89 void do_zap(bool gotdir); | |
| 90 void doctor(int fromfuse); | |
| 91 void draw_room(struct room *rp); | |
| 92 int drop(struct linked_list *item); | |
| 93 bool dropcheck(struct object *op); | |
| 94 void eat(void); | |
| 95 int encread(void *starta, unsigned int size, int inf); | |
| 96 void encwrite(void *starta, unsigned int size, FILE *outf); | |
| 97 void endit(int a); | |
| 98 void endmsg(void); | |
| 99 void extinguish(int (*func)()); | |
| 100 int extras(void); | |
| 101 void fall(struct linked_list *item, bool pr); | |
| 102 bool fallpos(struct coord *pos, struct coord *newpos, bool passages); | |
| 103 void fatal(char *s); | |
| 104 bool fight(struct coord *mp, struct object *weap, bool thrown); | |
| 105 struct linked_list *find_mons(int y, int x); | |
| 106 struct linked_list *find_obj(int y, int x); | |
| 107 void fix_stick(struct object *cur); | |
| 108 void fuse(int (*func)(), int arg, int time); | |
| 109 void game_err(int a); | |
| 110 void genocide(void); | |
| 111 bool get_dir(void); | |
| 112 struct linked_list *get_item(char *purpose, int type); | |
| 113 int get_str(char *opt, WINDOW *awin); | |
| 114 int get_worth(struct object *obj); | |
| 115 int getbless(void); | |
| 116 int getindex(char what); | |
| 117 int getpcon(struct stats *who); | |
| 118 int getpdex(struct stats *who, bool heave); | |
| 119 int getpwis(struct stats *who); | |
| 120 void heal_self(int factor, bool updmaxhp); | |
| 121 bool hit_monster(struct coord *mp, struct object *obj); | |
| 122 int hitweight(void); | |
| 123 bool hurt_armor(struct object *obj); | |
| 124 void idenpack(void); | |
| 125 char *identify(int what); | |
| 126 void ignore(void); | |
| 127 bool illeg_ch(unsigned char ch); | |
| 128 void init_everything(void); | |
| 129 void init_ring(struct object *what, bool fromwiz); | |
| 130 void init_weapon(struct object *weap, int type); | |
| 131 void initarmor(struct object *obj, int what); | |
| 132 void initfood(struct object *what); | |
| 133 char *inv_name(struct object *obj, bool drop); | |
| 134 bool inventory(struct linked_list *list, int type); | |
| 135 int itemvol(struct object *wh); | |
| 136 int itemweight(struct object *wh); | |
| 137 bool is_current(struct object *obj); | |
| 138 bool is_magic(struct object *obj); | |
| 139 bool isatrap(char ch); | |
| 140 bool isring(int hand, int ring); | |
| 141 bool iswearing(int ring); | |
| 142 void killed(struct linked_list *item, bool pr); | |
| 143 void lengthen(int (*func)(), int xtime); | |
| 144 void lev_mon(void); | |
| 145 void light(struct coord *cp); | |
| 146 void look(bool wakeup); | |
| 147 bool magring(struct object *what); | |
| 148 bool makemons(int what); | |
| 149 int midx(char whichmon); | |
| 150 void missile(int ydelta, int xdelta); | |
| 151 void money(void); | |
| 152 bool monhurt(struct thing *th); | |
| 153 void msg(char *fmt, ...); | |
| 154 char *new(int size); | |
| 155 struct linked_list *new_item(int size); | |
| 156 void new_level(int ltype); | |
| 157 struct linked_list *new_monster(char type, struct coord *cp, bool treas); | |
| 158 struct linked_list *new_thing(bool treas, int type, int which); | |
| 159 void nohaste(int fromfuse); | |
| 160 void noteth(int fromfuse); | |
| 161 void notinvinc(int fromfuse); | |
| 162 void notregen(int fromfuse); | |
| 163 void notslow(int fromfuse); | |
| 164 char npch(char ch); | |
| 165 char *num(int n1, int n2); | |
| 166 bool o_off(struct object *what, long bit); | |
| 167 bool o_on(struct object *what, long bit); | |
| 168 void option(void); | |
| 169 char pack_char(struct object *obj); | |
| 170 void parse_opts(char *str); | |
| 171 bool passwd(void); | |
| 172 int pick_one(struct magic_item *mag); | |
| 173 void pick_up(char ch); | |
| 174 void picky_inven(void); | |
| 175 bool pl_off(long what); | |
| 176 bool pl_on(long what); | |
| 177 void playit(void); | |
| 178 bool price_it(void); | |
| 179 void quaff(void); | |
| 180 void quit(int a); | |
| 181 void raise_level(void); | |
| 182 void rchg_str(int amt); | |
| 183 void read_scroll(void); | |
| 184 int readchar(void); | |
| 185 void remove_monster(struct coord *mp, struct linked_list *item); | |
| 186 void resoflg(struct object *what, long bit); | |
| 187 bool restore(char *file, char **envp); | |
| 188 void restscr(WINDOW *scr); | |
| 189 bool rf_on(struct room *rm, long bit); | |
| 190 char *ring_num(struct object *what); | |
| 191 void ring_off(void); | |
| 192 void ring_on(void); | |
| 193 void ringabil(void); | |
| 194 int ringex(int rtype); | |
| 195 int rnd(int range); | |
| 196 char rnd_mon(bool wander, bool baddie); | |
| 197 struct coord *rnd_pos(struct room *rp); | |
| 198 int rnd_room(void); | |
| 199 struct coord *rndmove(struct thing *who); | |
| 200 int roll(int number, int sides); | |
| 201 void rollwand(int fromfuse); | |
| 202 struct room *roomin(struct coord *cp); | |
| 203 int rs_restore_file(int inf); | |
| 204 int rs_save_file(FILE *savef); | |
| 205 void runners(void); | |
| 206 void runto(struct coord *runner, struct coord *spot); | |
| 207 void sapem(int fromfuse); | |
| 208 bool save(int which); | |
| 209 bool save_game(void); | |
| 210 bool save_throw(int which, struct thing *tp); | |
| 211 void score(int amount, int aflag, char monst); | |
| 212 void sell_it(void); | |
| 213 void setoflg(struct object *what, long bit); | |
| 214 void setup(void); | |
| 215 char show(int y, int x); | |
| 216 bool showtop(int showname); | |
| 217 void sight(int fromfuse); | |
| 218 void start_daemon(int (*func)(), int arg, int type); | |
| 219 void status(int fromfuse); | |
| 220 bool step_ok(unsigned char ch); | |
| 221 void stomach(int fromfuse); | |
| 222 int str_plus(struct stats *who); | |
| 223 void strucpy(char *s1, char *s2, int len); | |
| 224 void swander(int fromfuse); | |
| 225 bool swing(int at_lvl, int op_arm, int wplus); | |
| 226 void take_off(void); | |
| 227 int teleport(struct coord spot, struct thing *th); | |
| 228 void toss_ring(struct object *what); | |
| 229 void total_winner(void); | |
| 230 int totalenc(void); | |
| 231 char *tr_name(char ch); | |
| 232 struct trap *trap_at(int y, int x); | |
| 233 void unconfuse(int fromfuse); | |
| 234 void unhold(char whichmon); | |
| 235 void unsee(int fromfuse); | |
| 236 void updpack(void); | |
| 237 char *vowelstr(char *str); | |
| 238 void wait_for(WINDOW *win, char ch); | |
| 239 struct linked_list *wake_monster(int y, int x); | |
| 240 void wanderer(void); | |
| 241 void waste_time(void); | |
| 242 void wear(void); | |
| 243 void wghtchk(int fromfuse); | |
| 244 void whatis(struct linked_list *what); | |
| 245 void wield(void); | |
| 246 char winat(int y, int x); | |
| 247 void writelog(int amount, int aflag, char monst); |
