diff rogue4/new_level.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 9535a08ddc39
children 3d4252fa2ed3
line wrap: on
line diff
--- a/rogue4/new_level.c	Sat Jan 23 09:35:14 2016 -0500
+++ b/rogue4/new_level.c	Wed Jan 27 19:41:05 2016 -0500
@@ -11,6 +11,7 @@
  * See the file LICENSE.TXT for full copyright and licensing information.
  */
 
+#include <stdlib.h>
 #include <time.h>
 #include <curses.h>
 #include <string.h>
@@ -20,7 +21,11 @@
 #define MAXTREAS 10	/* maximum number of treasures in a treasure room */
 #define MINTREAS 2	/* minimum number of treasures in a treasure room */
 
-new_level()
+void put_things(void);
+void treas_room(void);
+
+void
+new_level(void)
 {
     register int rm, i;
     register THING *tp;
@@ -112,7 +117,8 @@
  * rnd_room:
  *	Pick a room that is really there
  */
-rnd_room()
+int
+rnd_room(void)
 {
     register int rm;
 
@@ -127,7 +133,8 @@
  * put_things:
  *	Put potions and scrolls on this level
  */
-put_things()
+void
+put_things(void)
 {
     register int i;
     register THING *cur;
@@ -197,7 +204,8 @@
  */
 #define MAXTRIES 10	/* max number of tries to put down a monster */
 
-treas_room()
+void
+treas_room(void)
 {
     register int nm, index;
     register THING *tp;