Mercurial > hg > early-roguelike
comparison srogue/rip.c @ 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 | f4f6734771e0 | 
| children | d3968e9cb98d | 
   comparison
  equal
  deleted
  inserted
  replaced
| 216:b24545357d2e | 217:94a0d9dd5ce1 | 
|---|---|
| 48 #define RIP_LINES (sizeof rip / (sizeof (char *))) | 48 #define RIP_LINES (sizeof rip / (sizeof (char *))) | 
| 49 | 49 | 
| 50 extern int scorefd; | 50 extern int scorefd; | 
| 51 extern FILE *logfile; | 51 extern FILE *logfile; | 
| 52 | 52 | 
| 53 char *killname(); | 53 char *killname(unsigned char monst); | 
| 54 void writelog(int amount, int aflag, char monst); | 54 void showpack(bool winner, char *howso); | 
| 55 | 55 | 
| 56 /* | 56 /* | 
| 57 * death: | 57 * death: | 
| 58 * Do something really fun when he dies | 58 * Do something really fun when he dies | 
| 59 */ | 59 */ | 
| 60 | 60 | 
| 61 #include <time.h> | 61 #include <time.h> | 
| 62 death(monst) | 62 void | 
| 63 char monst; | 63 death(char monst) | 
| 64 { | 64 { | 
| 65 reg char dp, *killer; | 65 reg char dp, *killer; | 
| 66 struct tm *lt; | 66 struct tm *lt; | 
| 67 time_t date; | 67 time_t date; | 
| 68 char buf[LINLEN]; | 68 char buf[LINLEN]; | 
| 117 | 117 | 
| 118 /* | 118 /* | 
| 119 * score: | 119 * score: | 
| 120 * Figure score and post it. | 120 * Figure score and post it. | 
| 121 */ | 121 */ | 
| 122 score(amount, aflag, monst) | 122 void | 
| 123 char monst; | 123 score(int amount, int aflag, char monst) | 
| 124 int amount, aflag; | |
| 125 { | 124 { | 
| 126 reg struct sc_ent *scp, *sc2; | 125 reg struct sc_ent *scp, *sc2; | 
| 127 reg int i, fd, prflags = 0; | 126 reg int i, fd, prflags = 0; | 
| 128 reg FILE *outf; | 127 reg FILE *outf; | 
| 129 char *packend; | 128 char *packend; | 
| 259 | 258 | 
| 260 /* | 259 /* | 
| 261 * showtop: | 260 * showtop: | 
| 262 * Display the top ten on the screen | 261 * Display the top ten on the screen | 
| 263 */ | 262 */ | 
| 264 showtop(showname) | 263 bool | 
| 265 int showname; | 264 showtop(int showname) | 
| 266 { | 265 { | 
| 267 reg int fd, i; | 266 reg int fd, i; | 
| 268 char *killer; | 267 char *killer; | 
| 269 struct sc_ent *scp; | 268 struct sc_ent *scp; | 
| 270 | 269 | 
| 308 | 307 | 
| 309 /* | 308 /* | 
| 310 * total_winner: | 309 * total_winner: | 
| 311 * The hero made it back out alive | 310 * The hero made it back out alive | 
| 312 */ | 311 */ | 
| 313 total_winner() | 312 void | 
| 313 total_winner(void) | |
| 314 { | 314 { | 
| 315 clear(); | 315 clear(); | 
| 316 addstr(" \n"); | 316 addstr(" \n"); | 
| 317 addstr(" @ @ @ @ @ @@@ @ @ \n"); | 317 addstr(" @ @ @ @ @ @@@ @ @ \n"); | 
| 318 addstr(" @ @ @@ @@ @ @ @ @ \n"); | 318 addstr(" @ @ @@ @@ @ @ @ @ \n"); | 
| 343 | 343 | 
| 344 /* | 344 /* | 
| 345 * showpack: | 345 * showpack: | 
| 346 * Display the contents of the hero's pack | 346 * Display the contents of the hero's pack | 
| 347 */ | 347 */ | 
| 348 showpack(winner, howso) | 348 void | 
| 349 bool winner; | 349 showpack(bool winner, char *howso) | 
| 350 char *howso; | |
| 351 { | 350 { | 
| 352 reg char *iname; | 351 reg char *iname; | 
| 353 reg int cnt, worth, ch; | 352 reg int cnt, worth, ch; | 
| 354 reg struct linked_list *item; | 353 reg struct linked_list *item; | 
| 355 reg struct object *obj; | 354 reg struct object *obj; | 
| 390 /* | 389 /* | 
| 391 * killname: | 390 * killname: | 
| 392 * Returns what the hero was killed by. | 391 * Returns what the hero was killed by. | 
| 393 */ | 392 */ | 
| 394 char * | 393 char * | 
| 395 killname(monst) | 394 killname(unsigned char monst) | 
| 396 unsigned char monst; | |
| 397 { | 395 { | 
| 398 if (monst < MAXMONS + 1) | 396 if (monst < MAXMONS + 1) | 
| 399 return monsters[monst].m_name; | 397 return monsters[monst].m_name; | 
| 400 else /* things other than monsters */ | 398 else /* things other than monsters */ | 
| 401 switch (monst) { | 399 switch (monst) { | 
