diff srogue/passages.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 7f5f5f1ba09c
children e52a8a7ad4c5
line wrap: on
line diff
--- a/srogue/passages.c	Thu Jan 28 18:55:47 2016 -0500
+++ b/srogue/passages.c	Sun Jan 31 13:45:07 2016 -0500
@@ -14,15 +14,20 @@
  * See the file LICENSE.TXT for full copyright and licensing information.
  */
 
+#include <stdlib.h>
 #include "rogue.h"
 #include "rogue.ext"
 
+void conn(int r1, int r2);
+void door(struct room *rm, struct coord *cp);
+
 /*
  * do_passages:
  *	Draw all the passages on a level.
  */
 
-do_passages()
+void
+do_passages(void)
 {
 	reg struct rdes *r1, *r2 = NULL;
 	reg int i, j;
@@ -123,8 +128,8 @@
  *	Cconnect two rooms.
  */
 
-conn(r1, r2)
-int r1, r2;
+void
+conn(int r1, int r2)
 {
 	reg struct room *rpf, *rpt = NULL;
 	reg char rmt, direc;
@@ -255,9 +260,8 @@
  * also enters the door in the exits array of the room.
  */
 
-door(rm, cp)
-struct room *rm;
-struct coord *cp;
+void
+door(struct room *rm, struct coord *cp)
 {
 	cmov(*cp);
 	addch(rnd(10) < level - 1 && rnd(100) < 20 ? SECRETDOOR : DOOR);
@@ -269,7 +273,8 @@
  * add_pass:
  *	add the passages to the current window (wizard command)
  */
-add_pass()
+void
+add_pass(void)
 {
 	reg int y, x, ch;