comparison rogue4/rip.c @ 215:1b73a8641b37

rogue4: fix most GCC5 warnings. Converting all function definitions to ANSI style accounts for most of the change. This has exposed other problems, such as daemons not actually being their stated type, that will require more careful solutions.
author John "Elwin" Edwards
date Wed, 27 Jan 2016 19:41:05 -0500
parents ee250e3646fd
children 23d2e2bf812f
comparison
equal deleted inserted replaced
214:e5a15b09ce1d 215:1b73a8641b37
16 #include <signal.h> 16 #include <signal.h>
17 #include <sys/types.h> 17 #include <sys/types.h>
18 #include <string.h> 18 #include <string.h>
19 #include <stdlib.h> 19 #include <stdlib.h>
20 #include "rogue.h" 20 #include "rogue.h"
21
22 char *killname(char monst, bool doart);
21 23
22 static char *rip[] = { 24 static char *rip[] = {
23 " __________", 25 " __________",
24 " / \\", 26 " / \\",
25 " / REST \\", 27 " / REST \\",
39 /* 41 /*
40 * score: 42 * score:
41 * Figure score and post it. 43 * Figure score and post it.
42 */ 44 */
43 /* VARARGS2 */ 45 /* VARARGS2 */
44 score(amount, flags, monst) 46 void
45 int amount, flags; 47 score(int amount, int flags, char monst)
46 char monst;
47 { 48 {
48 register struct sc_ent *scp; 49 register struct sc_ent *scp;
49 register int i; 50 register int i;
50 register struct sc_ent *sc2; 51 register struct sc_ent *sc2;
51 register FILE *outf; 52 register FILE *outf;
295 296
296 /* 297 /*
297 * death: 298 * death:
298 * Do something really fun when he dies 299 * Do something really fun when he dies
299 */ 300 */
300 death(monst) 301 void
301 register char monst; 302 death(char monst)
302 { 303 {
303 register char **dp = rip, *killer; 304 register char **dp = rip, *killer;
304 register struct tm *lt; 305 register struct tm *lt;
305 time_t date; 306 time_t date;
306 char buf[MAXSTR]; 307 char buf[MAXSTR];
339 340
340 /* 341 /*
341 * total_winner: 342 * total_winner:
342 * Code for a winner 343 * Code for a winner
343 */ 344 */
344 total_winner() 345 void
346 total_winner(void)
345 { 347 {
346 register THING *obj; 348 register THING *obj;
347 register int worth = 0; 349 register int worth = 0;
348 register char c; 350 register char c;
349 register int oldpurse; 351 register int oldpurse;
459 /* 461 /*
460 * killname: 462 * killname:
461 * Convert a code to a monster name 463 * Convert a code to a monster name
462 */ 464 */
463 char * 465 char *
464 killname(monst, doart) 466 killname(char monst, bool doart)
465 register char monst;
466 bool doart;
467 { 467 {
468 register const char *sp; 468 register const char *sp;
469 register bool article; 469 register bool article;
470 470
471 sp = prbuf; 471 sp = prbuf;