UltraRogue: fix various build failures.

This commit is contained in:
John "Elwin" Edwards 2017-01-31 20:33:49 -05:00
parent 11c74c273d
commit b100b40846
5 changed files with 23 additions and 20 deletions

View file

@ -30,6 +30,7 @@ OBJS = armor.o \
magic.o \
main.o \
maze.o \
mdport.o \
memory.o \
misc.o \
monsdata.o \
@ -55,7 +56,8 @@ OBJS = armor.o \
verify.o \
vers.o \
weapons.o \
wizard.o
wizard.o \
xcrypt.o
PROGRAM = ur
@ -78,6 +80,7 @@ CFILES = armor.c \
magic.c \
main.c \
maze.c \
mdport.c \
memory.c \
misc.c \
monsdata.c \
@ -103,7 +106,8 @@ CFILES = armor.c \
verify.c \
vers.c \
weapons.c \
wizard.c
wizard.c \
xcrypt.c
MISC= Makefile README LICENSE.TXT history.txt TODO

View file

@ -225,7 +225,7 @@ doctor_spell_points(struct thing *tp)
called to roll to see if a wandering monster starts up
*/
daemon
void
rollwand(daemon_arg *arg)
{
NOOP(arg);
@ -246,7 +246,7 @@ rollwand(daemon_arg *arg)
digest the hero's food
*/
daemon
void
stomach(daemon_arg *arg)
{
int oldfood, old_hunger;
@ -322,7 +322,7 @@ stomach(daemon_arg *arg)
each other, this routine have been enhanced and may need more work yet
*/
daemon
void
runners(daemon_arg *arg)
{
struct linked_list *item;

View file

@ -28,7 +28,7 @@ static char sccsid[] = "%W% %G%";
#include "dictutil.h"
#include "rogue.h"
int trace;
int dict_trace;
FILE *ft;
@ -83,13 +83,13 @@ void *dict_load_block( DICTIONARY *dict , char *toc_id ,
if ( block == NULL ) {
ptr = malloc( dt_entry->size );
if ( trace > 3 ) {
if ( dict_trace > 3 ) {
fprintf( ft , "\ndict_load_block allocates %lx bytes at location %p\n" ,
dt_entry->size , ptr );
} /* endif */
} else {
ptr = block;
if ( trace > 3 ) {
if ( dict_trace > 3 ) {
fprintf( ft , "\ndict_load_block uses memory at location %p\n" , ptr );
} /* endif */
} /* endif */
@ -113,7 +113,7 @@ void *dict_load_block( DICTIONARY *dict , char *toc_id ,
dt_entry->ptr = ptr;
if ( trace > 3 ) {
if ( dict_trace > 3 ) {
fprintf( ft , "\nLoaded block\nTOC entry: id:%s offset:%lx size:%lx ptr:%p checksum:%lx type:%d\n" ,
dict->toc[index].id , dict->toc[index].offset ,
dict->toc[index].size , dict->toc[index].ptr ,
@ -160,7 +160,7 @@ BOOLEANC dict_save_block( DICTIONARY *dict , char *toc_id , FILE *fo )
return( FALSE );
} /* endif */
if ( trace > 3 ) {
if ( dict_trace > 3 ) {
fprintf( ft , "\nStored block\nTOC entry: id:%s offset:%lx size:%lx ptr:%p checksum:%lx type:%d\n" ,
dict->toc[index].id , dict->toc[index].offset ,
dict->toc[index].size , dict->toc[index].ptr ,
@ -418,7 +418,7 @@ BOOLEANC dict_set_parm_variables( DICTIONARY *dict )
}
/***********
** If trace (global) > 0 , signal an error
** If dict_trace (global) > 0 , signal an error
** If severity > 0 , abort
***********/
@ -426,7 +426,7 @@ void signal_error( char *header , char *message , int severity )
{
FILE *fpe;
if ( trace > 0 ) {
if ( dict_trace > 0 ) {
printf( "%s: %s\n" , header , message );
fpe = fopen( "ERROR.FIL" , "a" );
fprintf( fpe , "\n%s: %s\n" , header , message );

View file

@ -339,7 +339,7 @@ void *mem_realloc(const void *ptr, const size_t new_size)
/* check a pointer to be sure all check bytes are OK. abort if not */
/* always returns 1 if not aborting so that it can be included in */
/* if statement boolean expressions */
int mem_validate(void *ptr)
int mem_validate(const void *ptr)
{
unsigned char *mem_temp = (unsigned char *)ptr;
size_t mem_size;

View file

@ -1062,7 +1062,6 @@ struct delayed_action
#define FUSE 2
typedef void fuse;
typedef void daemon;
typedef union
{
@ -1087,7 +1086,7 @@ struct fuse
struct daemon
{
int index;
daemon (*func)(daemon_arg *arg);
void (*func)(daemon_arg *arg);
};
#define MAXDAEMONS 60
@ -1156,10 +1155,10 @@ extern void activity(void);
/* daemons.c */
extern void doctor_spell_points(struct thing *tp);
extern daemon runners(daemon_arg *arg);
extern daemon doctor(daemon_arg *tp);
extern daemon rollwand(daemon_arg *arg);
extern daemon stomach(daemon_arg *arg);
extern void runners(daemon_arg *arg);
extern void doctor(daemon_arg *tp);
extern void rollwand(daemon_arg *arg);
extern void stomach(daemon_arg *arg);
extern fuse swander(fuse_arg *arg);
extern fuse unconfuse(fuse_arg *arg);
extern fuse unscent(fuse_arg *arg);
@ -1812,4 +1811,4 @@ void md_srandom(long seed);
int md_readchar(WINDOW *win);
#define NOOP(x) (x += 0)
#define CCHAR(x) ( (char) (x & A_CHARTEXT) )
#define CCHAR(x) ( (char) (x & A_CHARTEXT) )