Mercurial > hg > early-roguelike
diff arogue7/wizard.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/wizard.c Sun Feb 07 14:39:21 2016 -0500 +++ b/arogue7/wizard.c Fri Feb 19 21:02:28 2016 -0500 @@ -19,20 +19,21 @@ #include "curses.h" #include <stdlib.h> +#include <string.h> #include <ctype.h> #include "rogue.h" #ifdef PC7300 #include "menu.h" #endif +int getbless(void); /* * create_obj: * Create any object for wizard, scroll, magician, or cleric */ -create_obj(prompt, which_item, which_type) -bool prompt; -int which_item, which_type; +void +create_obj(bool prompt, int which_item, int which_type) { reg struct linked_list *item; reg struct object *obj; @@ -329,7 +330,8 @@ * getbless: * Get a blessing for a wizards object */ -getbless() +int +getbless(void) { reg char bless; @@ -346,7 +348,8 @@ /* * get a non-monster death type */ -getdeath() +int +getdeath(void) { register int i; int which_death; @@ -381,10 +384,10 @@ /* * make a monster for the wizard + * showall -> show uniques and genocided creatures */ -makemonster(showall, label, action) -bool showall; /* showall -> show uniques and genocided creatures */ -char *label, *action; +short +makemonster(bool showall, char *label, char *action) { #ifdef PC7300 register int nextmonst; @@ -439,7 +442,7 @@ /* Print out the monsters */ while (num_monst > 0) { - register left_limit; + int left_limit; if (num_monst < num_lines) left_limit = (num_monst+1)/2; else left_limit = num_lines/2; @@ -508,7 +511,8 @@ * see if user knows password */ -passwd() +bool +passwd(void) { register char *sp, c; char buf[LINELEN], *crypt(); @@ -535,7 +539,8 @@ * Bamf the hero someplace else */ -teleport() +int +teleport(void) { register struct room *new_rp = NULL, *old_rp = roomin(&hero); register int rm, which; @@ -636,8 +641,8 @@ * What a certin object is */ -whatis(what) -struct linked_list *what; +void +whatis(struct linked_list *what) { register struct object *obj; register struct linked_list *item;