Mercurial > hg > early-roguelike
diff arogue7/passages.c @ 219:f9ef86cf22b2
Advanced Rogue 7: convert to ANSI-style function declarations.
Almost 1500 lines of compiler warnings remain, and the GCC developers
are already working on a new version with even more warnings turned on
by default.
author | John "Elwin" Edwards |
---|---|
date | Fri, 19 Feb 2016 21:02:28 -0500 |
parents | 1cd604c827a3 |
children | e52a8a7ad4c5 |
line wrap: on
line diff
--- a/arogue7/passages.c Sun Feb 07 14:39:21 2016 -0500 +++ b/arogue7/passages.c Fri Feb 19 21:02:28 2016 -0500 @@ -18,15 +18,20 @@ * @(#)passages.c 3.4 (Berkeley) 6/15/81 */ +#include <stdlib.h> #include "curses.h" #include "rogue.h" +void conn(int r1, int r2); +void door(struct room *rm, coord *cp); + /* * 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; @@ -134,8 +139,8 @@ * 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; @@ -348,9 +353,8 @@ * 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) { struct linked_list *newroom; coord *exit;