diff arogue5/rip.c @ 218:56e748983fa8

Advanced Rogue 5: convert to ANSI function declarations. This still leaves over a thousand lines of warning messages, mostly related to the return types of daemons and fuses.
author John "Elwin" Edwards
date Sun, 07 Feb 2016 14:39:21 -0500
parents 80a590e67206
children d3968e9cb98d
line wrap: on
line diff
--- a/arogue5/rip.c	Sun Jan 31 13:45:07 2016 -0500
+++ b/arogue5/rip.c	Sun Feb 07 14:39:21 2016 -0500
@@ -71,15 +71,17 @@
     0
 };
 
-char	*killname();
-
-
-
+char *killname(short monst);
+void scorein(struct sc_ent scores[], int fd);
+void scoreout(struct sc_ent scores[], FILE *outf);
+void showpack(char *howso);
+int update(struct sc_ent top_ten[], unsigned long amount, short quest, 
+           char *whoami, short flags, short level, short monst, short ctype, 
+           char *system, char *login);
 
 
 void
-byebye(sig)
-int sig;
+byebye(int sig)
 {
     NOOP(sig);
     if (!isendwin()) {
@@ -96,8 +98,8 @@
  *	Do something really fun when he dies
  */
 
-death(monst)
-register short monst;
+void
+death(short monst)
 {
     register char **dp = rip, *killer;
     register struct tm *lt;
@@ -125,8 +127,7 @@
 }
 
 char *
-killname(monst)
-register short monst;
+killname(short monst)
 {
     static char mons_name[LINELEN];
     int i;
@@ -162,9 +163,8 @@
  */
 
 /* VARARGS2 */
-score(amount, flags, monst)
-unsigned long amount;
-short monst;
+void
+score(unsigned long amount, int flags, short monst)
 {
     static struct sc_ent top_ten[NUMSCORE];
     register struct sc_ent *scp;
@@ -626,9 +626,8 @@
  *	Convert a character string that has been translated from a
  * score file by scoreout() back to a score file structure.
  */
-scorein(scores, fd)
-struct sc_ent scores[];
-int fd;
+void
+scorein(struct sc_ent scores[], int fd)
 {
     int i;
     char scoreline[100];
@@ -652,9 +651,8 @@
  * this for compatibility sake since some machines write out fields in
  * different orders.
  */
-scoreout(scores, outf)
-struct sc_ent scores[];
-FILE *outf;
+void
+scoreout(struct sc_ent scores[], FILE *outf)
 {
     int i;
     char scoreline[100];
@@ -676,8 +674,8 @@
  * showpack:
  *	Display the contents of the hero's pack
  */
-showpack(howso)
-char *howso;
+void
+showpack(char *howso)
 {
 	reg char *iname;
 	reg int cnt, packnum;
@@ -706,7 +704,8 @@
 	refresh();
 }
 
-total_winner()
+void
+total_winner(void)
 {
     register struct linked_list *item;
     register struct object *obj;
@@ -760,11 +759,10 @@
     exit(0);
 }
 
-update(top_ten, amount, quest, whoami, flags, level, monst, ctype, system, login)
-struct sc_ent top_ten[];
-unsigned long amount;
-short quest, flags, level, monst, ctype;
-char *whoami, *system, *login;
+int
+update(struct sc_ent top_ten[], unsigned long amount, short quest, 
+       char *whoami, short flags, short level, short monst, short ctype, 
+       char *system, char *login)
 {
     register struct sc_ent *scp, *sc2;
     int retval=0;	/* 1 if a change, 0 otherwise */