diff --git a/arogue5/main.c b/arogue5/main.c index 3dd5e2f..890870f 100644 --- a/arogue5/main.c +++ b/arogue5/main.c @@ -200,8 +200,7 @@ main(int argc, char *argv[], char *envp[]) } if (!use_savedir) { - if ((whoami == NULL) || (*whoami == '\0') || - (strcmp(whoami,"dosuser")==0)) + if ((*whoami == '\0') || (strcmp(whoami,"dosuser")==0)) { echo(); mvaddstr(23,2,"Rogue's Name? "); @@ -209,7 +208,7 @@ main(int argc, char *argv[], char *envp[]) noecho(); } - if ((whoami == NULL) || (*whoami == '\0')) + if (*whoami == '\0') strcpy(whoami,"Rodney"); } diff --git a/arogue5/mdport.c b/arogue5/mdport.c index a7446e1..28cf09b 100644 --- a/arogue5/mdport.c +++ b/arogue5/mdport.c @@ -132,7 +132,7 @@ md_hasclreol(void) static int md_standout_mode = 0; -int +void md_raw_standout(void) { #ifdef _WIN32 @@ -155,7 +155,7 @@ md_raw_standout(void) #endif } -int +void md_raw_standend(void) { #ifdef _WIN32 @@ -223,7 +223,7 @@ md_fdopen(int fd, char *mode) #endif } -int +void md_normaluser(void) { #ifndef _WIN32 @@ -596,7 +596,7 @@ md_rand(void) #endif } -int +void md_srand(int seed) { #ifdef _WIN32 diff --git a/arogue5/rogue.h b/arogue5/rogue.h index 98dedd8..b81d97a 100644 --- a/arogue5/rogue.h +++ b/arogue5/rogue.h @@ -1189,12 +1189,12 @@ extern char *md_getroguedir(void); extern void md_init(void); extern FILE * md_fdopen(int fd, char *mode); extern int md_unlink(char *file); -extern int md_normaluser(void); +extern void md_normaluser(void); extern int md_getuid(void); extern long md_memused(void); extern int md_readchar(WINDOW *win); extern int md_shellescape(void); -extern int md_srand(int seed); +extern void md_srand(int seed); extern int md_rand(void); extern int md_erasechar(void); extern int md_killchar(void); diff --git a/arogue7/mdport.c b/arogue7/mdport.c index 12258a5..6042b8b 100644 --- a/arogue7/mdport.c +++ b/arogue7/mdport.c @@ -111,7 +111,7 @@ md_init(void) static int md_standout_mode = 0; -int +void md_raw_standout(void) { #ifdef _WIN32 @@ -134,7 +134,7 @@ md_raw_standout(void) #endif } -int +void md_raw_standend(void) { #ifdef _WIN32 @@ -213,7 +213,7 @@ md_creat(char *file, int mode) } -int +void md_normaluser(void) { #ifndef _WIN32 @@ -581,7 +581,7 @@ md_rand(void) #endif } -int +void md_srand(int seed) { #ifdef _WIN32 diff --git a/arogue7/rogue.h b/arogue7/rogue.h index 7415370..c4b6241 100644 --- a/arogue7/rogue.h +++ b/arogue7/rogue.h @@ -1417,12 +1417,12 @@ char *md_getusername(void); void md_init(void); int md_killchar(void); long md_memused(void); -int md_normaluser(void); +void md_normaluser(void); int md_rand(void); unsigned int md_random_seed(void); int md_readchar(WINDOW *win); int md_shellescape(void); -int md_srand(int seed); +void md_srand(int seed); int md_unlink(char *file); int md_unlink_open_file(char *file, FILE *inf); diff --git a/rogue3/init.c b/rogue3/init.c index e979628..7425efc 100644 --- a/rogue3/init.c +++ b/rogue3/init.c @@ -65,7 +65,7 @@ char *ws_guess[MAXSTICKS]; /* Players guess at what wand is */ char *ws_type[MAXSTICKS]; /* Is it a wand or a staff */ char file_name[256]; /* Save file name */ char home[PATH_MAX]; /* User's home directory */ -unsigned char prbuf[80]; /* Buffer for sprintfs */ +char prbuf[80]; /* Buffer for sprintfs */ int max_hp; /* Player's max hit points */ int ntraps; /* Number of traps on this level */ int max_level; /* Deepest player has gone */ diff --git a/rogue3/rogue.h b/rogue3/rogue.h index 5482aeb..2d453f8 100644 --- a/rogue3/rogue.h +++ b/rogue3/rogue.h @@ -469,7 +469,7 @@ extern int p_know[MAXPOTIONS]; /* Does he know what a potion d extern struct magic_item p_magic[MAXPOTIONS]; /* Names and chances for potions */ extern struct thing player; /* The rogue */ extern int playing; /* True until he quits */ -extern unsigned char prbuf[80]; /* Buffer for sprintfs */ +extern char prbuf[80]; /* Buffer for sprintfs */ extern int purse; /* How much gold the rogue has */ extern int quiet; /* Number of quiet turns */ extern char * r_guess[MAXRINGS]; /* Players guess at what ring is */ diff --git a/rogue4/main.c b/rogue4/main.c index 9c5ff61..04b13a7 100644 --- a/rogue4/main.c +++ b/rogue4/main.c @@ -181,7 +181,7 @@ main(int argc, char *argv[], char *envp[]) exit(1); } - if ((whoami == NULL) || (*whoami == '\0') || (strcmp(whoami,"dosuser")==0)) + if ((*whoami == '\0') || (strcmp(whoami,"dosuser")==0)) { echo(); mvaddstr(23,2,"Rogue's Name? "); @@ -189,7 +189,7 @@ main(int argc, char *argv[], char *envp[]) noecho(); } - if ((whoami == NULL) || (*whoami == '\0')) + if (*whoami == '\0') strcpy(whoami,"Rodney"); setup(); diff --git a/srogue/main.c b/srogue/main.c index 0bc2ab5..3a3bf4e 100644 --- a/srogue/main.c +++ b/srogue/main.c @@ -201,7 +201,7 @@ main(int argc, char *argv[], char *envp[]) byebye(1); } - if ((whoami == NULL) || (*whoami == '\0') || (strcmp(whoami,"dosuser")==0)) + if ((*whoami == '\0') || (strcmp(whoami,"dosuser")==0)) { echo(); mvaddstr(23,2,"Rogue's Name? "); @@ -209,7 +209,7 @@ main(int argc, char *argv[], char *envp[]) noecho(); } - if ((whoami == NULL) || (*whoami == '\0')) + if (*whoami == '\0') strcpy(whoami,"Rodney"); setup(); diff --git a/xrogue/rogue.h b/xrogue/rogue.h index e0111ca..0230d59 100644 --- a/xrogue/rogue.h +++ b/xrogue/rogue.h @@ -1503,12 +1503,12 @@ void tstp(); int md_getuid(void); long md_memused(void); -int md_normaluser(void); +void md_normaluser(void); int md_rand(int range); unsigned int md_random_seed(void); void md_setup(void); int md_shellescape(void); -int md_srand(int seed); +void md_srand(int seed); /* * Now all the global variables diff --git a/xrogue/state.c b/xrogue/state.c index 888a5b4..7fe6c8c 100644 --- a/xrogue/state.c +++ b/xrogue/state.c @@ -3152,7 +3152,7 @@ md_rand(int range) #endif } -int +void md_srand(int seed) { #ifdef _WIN32 @@ -3598,7 +3598,7 @@ md_setup(void) noecho(); /* Echo off */ } -int +void md_normaluser(void) { #ifndef _WIN32