Mercurial > hg > early-roguelike
changeset 257:c4b12d2d1dcd
UltraRogue: fix various build failures.
author | John "Elwin" Edwards |
---|---|
date | Tue, 31 Jan 2017 20:33:49 -0500 |
parents | c495a4f288c6 |
children | 2908dc47f9e2 |
files | urogue/Makefile urogue/daemons.c urogue/dictutil.c urogue/memory.c urogue/rogue.h |
diffstat | 5 files changed, 23 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/urogue/Makefile Tue Jan 31 19:56:04 2017 -0500 +++ b/urogue/Makefile Tue Jan 31 20:33:49 2017 -0500 @@ -30,6 +30,7 @@ magic.o \ main.o \ maze.o \ + mdport.o \ memory.o \ misc.o \ monsdata.o \ @@ -55,7 +56,8 @@ verify.o \ vers.o \ weapons.o \ - wizard.o + wizard.o \ + xcrypt.o PROGRAM = ur @@ -78,6 +80,7 @@ magic.c \ main.c \ maze.c \ + mdport.c \ memory.c \ misc.c \ monsdata.c \ @@ -103,7 +106,8 @@ verify.c \ vers.c \ weapons.c \ - wizard.c + wizard.c \ + xcrypt.c MISC= Makefile README LICENSE.TXT history.txt TODO
--- a/urogue/daemons.c Tue Jan 31 19:56:04 2017 -0500 +++ b/urogue/daemons.c Tue Jan 31 20:33:49 2017 -0500 @@ -225,7 +225,7 @@ called to roll to see if a wandering monster starts up */ -daemon +void rollwand(daemon_arg *arg) { NOOP(arg); @@ -246,7 +246,7 @@ digest the hero's food */ -daemon +void stomach(daemon_arg *arg) { int oldfood, old_hunger; @@ -322,7 +322,7 @@ each other, this routine have been enhanced and may need more work yet */ -daemon +void runners(daemon_arg *arg) { struct linked_list *item;
--- a/urogue/dictutil.c Tue Jan 31 19:56:04 2017 -0500 +++ b/urogue/dictutil.c Tue Jan 31 20:33:49 2017 -0500 @@ -28,7 +28,7 @@ #include "dictutil.h" #include "rogue.h" -int trace; +int dict_trace; FILE *ft; @@ -83,13 +83,13 @@ 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 @@ 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 @@ 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 @@ } /*********** -** If trace (global) > 0 , signal an error +** If dict_trace (global) > 0 , signal an error ** If severity > 0 , abort ***********/ @@ -426,7 +426,7 @@ { 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 );
--- a/urogue/memory.c Tue Jan 31 19:56:04 2017 -0500 +++ b/urogue/memory.c Tue Jan 31 20:33:49 2017 -0500 @@ -339,7 +339,7 @@ /* 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;
--- a/urogue/rogue.h Tue Jan 31 19:56:04 2017 -0500 +++ b/urogue/rogue.h Tue Jan 31 20:33:49 2017 -0500 @@ -1062,7 +1062,6 @@ #define FUSE 2 typedef void fuse; -typedef void daemon; typedef union { @@ -1087,7 +1086,7 @@ struct daemon { int index; - daemon (*func)(daemon_arg *arg); + void (*func)(daemon_arg *arg); }; #define MAXDAEMONS 60 @@ -1156,10 +1155,10 @@ /* 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 @@ int md_readchar(WINDOW *win); #define NOOP(x) (x += 0) -#define CCHAR(x) ( (char) (x & A_CHARTEXT) ) \ No newline at end of file +#define CCHAR(x) ( (char) (x & A_CHARTEXT) )