Super-Rogue: convert to ANSI-style function declarations.

This fixes most of the build warnings.
This commit is contained in:
John "Elwin" Edwards 2016-01-31 13:45:07 -05:00
parent 0f87d5b4d8
commit 59f448e92e
33 changed files with 783 additions and 518 deletions

View file

@ -22,7 +22,8 @@
* waste_time:
* Do nothing but let other things happen
*/
waste_time()
void
waste_time(void)
{
if (inwhgt) /* if from wghtchk, then done */
return;
@ -35,8 +36,8 @@ waste_time()
* getindex:
* Convert a type into an index for the things structures
*/
getindex(what)
char what;
int
getindex(char what)
{
int index = -1;
@ -58,8 +59,7 @@ char what;
* print the name of a trap
*/
char *
tr_name(ch)
char ch;
tr_name(char ch)
{
reg char *s;
@ -92,8 +92,8 @@ char ch;
* Look:
* A quick glance all around the player
*/
look(wakeup)
bool wakeup;
void
look(bool wakeup)
{
reg char ch;
reg int oldx, oldy, y, x;
@ -230,8 +230,7 @@ bool wakeup;
* find the unclaimed object at y, x
*/
struct linked_list *
find_obj(y, x)
int y, x;
find_obj(int y, int x)
{
reg struct linked_list *obj;
reg struct object *op;
@ -248,7 +247,8 @@ int y, x;
* eat:
* Let the hero eat some food.
*/
eat()
void
eat(void)
{
reg struct linked_list *item;
reg struct object *obj;
@ -297,7 +297,8 @@ eat()
* aggravate:
* aggravate all the monsters on this level
*/
aggravate()
void
aggravate(void)
{
reg struct linked_list *mi;
@ -310,8 +311,7 @@ aggravate()
* If string starts with a vowel, return "n" for an "an"
*/
char *
vowelstr(str)
char *str;
vowelstr(char *str)
{
switch (tolower(*str)) {
case 'a':
@ -329,8 +329,8 @@ char *str;
* is_current:
* See if the object is one of the currently used items
*/
is_current(obj)
struct object *obj;
bool
is_current(struct object *obj)
{
if (obj == NULL)
return FALSE;
@ -346,7 +346,8 @@ struct object *obj;
* get_dir:
* Set up the direction coordinates
*/
get_dir()
bool
get_dir(void)
{
reg char *prompt;
reg bool gotit;
@ -384,8 +385,8 @@ get_dir()
* initfood:
* Set up stuff for a food-type object
*/
initfood(what)
struct object *what;
void
initfood(struct object *what)
{
what->o_type = FOOD;
what->o_group = NORMFOOD;