Mercurial > hg > early-roguelike
diff rogue4/passages.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 | 0250220d8cdd |
line wrap: on
line diff
--- a/rogue4/passages.c Sat Jan 23 09:35:14 2016 -0500 +++ b/rogue4/passages.c Wed Jan 27 19:41:05 2016 -0500 @@ -10,14 +10,21 @@ * See the file LICENSE.TXT for full copyright and licensing information. */ +#include <stdlib.h> #include <curses.h> #include "rogue.h" +void conn(int r1, int r2); +void door(struct room *rm, coord *cp); +void passnum(void); +void numpass(int y, int x); + /* * do_passages: * Draw all the passages on a level. */ -do_passages() +void +do_passages(void) { register struct rdes *r1, *r2 = NULL; register int i, j; @@ -125,8 +132,8 @@ * conn: * Draw a corridor from a room in a certain direction. */ -conn(r1, r2) -int r1, r2; +void +conn(int r1, int r2) { register struct room *rpf, *rpt = NULL; register char rmt; @@ -269,9 +276,8 @@ * Add a door or possibly a secret door. Also enters the door in * the exits array of the room. */ -door(rm, cp) -register struct room *rm; -register coord *cp; +void +door(struct room *rm, coord *cp) { register int index; @@ -291,7 +297,8 @@ * add_pass: * Add the passages to the current window (wizard command) */ -add_pass() +void +add_pass(void) { register int y, x, ch; @@ -309,7 +316,8 @@ static int pnum; static bool newpnum; -passnum() +void +passnum(void) { register struct room *rp; register int i; @@ -330,8 +338,8 @@ * numpass: * Number a passageway square and its brethren */ -numpass(y, x) -register int y, x; +void +numpass(int y, int x) { register char *fp; register struct room *rp;