diff srogue/rooms.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 2128c7dc8a40
children e52a8a7ad4c5
line wrap: on
line diff
--- a/srogue/rooms.c	Thu Jan 28 18:55:47 2016 -0500
+++ b/srogue/rooms.c	Sun Jan 31 13:45:07 2016 -0500
@@ -17,11 +17,15 @@
 #include "rogue.h"
 #include "rogue.ext"
 
+void horiz(int cnt);
+void vert(int cnt);
+
 /*
  * do_rooms:
  *	Place the rooms in the dungeon
  */
-do_rooms()
+void
+do_rooms(void)
 {
 	int mloops, mchance, nummons, left_out, roomtries;
 	bool treas = FALSE;
@@ -131,9 +135,8 @@
  * add_mon:
  *	Add a monster to a room
  */
-add_mon(rm, treas)
-struct room *rm;
-bool treas;
+void
+add_mon(struct room *rm, bool treas)
 {
 	reg struct thing *tp;
 	reg struct linked_list *item;
@@ -165,8 +168,8 @@
  * draw_room:
  *	Draw a box around a room
  */
-draw_room(rp)
-struct room *rp;
+void
+draw_room(struct room *rp)
 {
 	reg int j, k;
 
@@ -197,8 +200,8 @@
  * horiz:
  *	draw a horizontal line
  */
-horiz(cnt)
-int cnt;
+void
+horiz(int cnt)
 {
 	while (cnt-- > 0)
 	addch('-');
@@ -209,8 +212,8 @@
  * vert:
  *	draw a vertical line
  */
-vert(cnt)
-int cnt;
+void
+vert(int cnt)
 {
 	reg int x, y;
 
@@ -228,8 +231,7 @@
  *	pick a random spot in a room
  */
 struct coord *
-rnd_pos(rp)
-struct room *rp;
+rnd_pos(struct room *rp)
 {
 	reg int y, x, i;
 	static struct coord spot;
@@ -249,9 +251,8 @@
  * rf_on:
  * 	Returns TRUE if flag is set for room stuff
  */
-rf_on(rm, bit)
-struct room *rm;
-long bit;
+bool
+rf_on(struct room *rm, long bit)
 {
 	return (rm->r_flags & bit);
 }