diff 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
line wrap: on
line diff
--- a/srogue/rip.c	Thu Jan 28 18:55:47 2016 -0500
+++ b/srogue/rip.c	Sun Jan 31 13:45:07 2016 -0500
@@ -50,8 +50,8 @@
 extern int scorefd;
 extern FILE *logfile;
 
-char	*killname();
-void writelog(int amount, int aflag, char monst);
+char *killname(unsigned char monst);
+void showpack(bool winner, char *howso);
 
 /*
  * death:
@@ -59,8 +59,8 @@
  */
 
 #include <time.h>
-death(monst)
-char monst;
+void
+death(char monst)
 {
 	reg char dp, *killer;
 	struct tm *lt;
@@ -119,9 +119,8 @@
  * score:
  *	Figure score and post it.
  */
-score(amount, aflag, monst)
-char monst;
-int amount, aflag;
+void
+score(int amount, int aflag, char monst)
 {
 	reg struct sc_ent *scp, *sc2;
 	reg int i, fd, prflags = 0;
@@ -261,8 +260,8 @@
  * showtop:
  *	Display the top ten on the screen
  */
-showtop(showname)
-int showname;
+bool
+showtop(int showname)
 {
 	reg int fd, i;
 	char *killer;
@@ -310,7 +309,8 @@
  * total_winner:
  *	The hero made it back out alive
  */
-total_winner()
+void
+total_winner(void)
 {
 	clear();
 addstr("                                                               \n");
@@ -345,9 +345,8 @@
  * showpack:
  *	Display the contents of the hero's pack
  */
-showpack(winner, howso)
-bool winner;
-char *howso;
+void
+showpack(bool winner, char *howso)
 {
 	reg char *iname;
 	reg int cnt, worth, ch;
@@ -392,8 +391,7 @@
  *	Returns what the hero was killed by.
  */
 char *
-killname(monst)
-unsigned char monst;
+killname(unsigned char monst)
 {
 	if (monst < MAXMONS + 1)
 		return monsters[monst].m_name;