rogue4: fix most GCC5 warnings.
Converting all function definitions to ANSI style accounts for most of the change. This has exposed other problems, such as daemons not actually being their stated type, that will require more careful solutions.
This commit is contained in:
parent
384386d71c
commit
c1d6a6af6a
32 changed files with 625 additions and 394 deletions
|
|
@ -21,6 +21,10 @@
|
|||
#undef KERNEL
|
||||
#include "rogue.h"
|
||||
|
||||
void save_file(FILE *savef);
|
||||
extern int rs_save_file(FILE *savef);
|
||||
extern int rs_restore_file(int inf);
|
||||
|
||||
typedef struct stat STAT;
|
||||
|
||||
extern char version[], encstr[];
|
||||
|
|
@ -33,7 +37,8 @@ STAT sbuf;
|
|||
* Implement the "save game" command
|
||||
*/
|
||||
/* This has to be cleaned up, these goto's are annoying. */
|
||||
save_game()
|
||||
bool
|
||||
save_game(void)
|
||||
{
|
||||
register FILE *savef;
|
||||
register int c;
|
||||
|
|
@ -151,8 +156,8 @@ auto_save(int sig)
|
|||
* save_file:
|
||||
* Write the saved game on the file
|
||||
*/
|
||||
save_file(savef)
|
||||
register FILE *savef;
|
||||
void
|
||||
save_file(FILE *savef)
|
||||
{
|
||||
int slines = LINES;
|
||||
int scols = COLS;
|
||||
|
|
@ -189,9 +194,8 @@ register FILE *savef;
|
|||
* Restore a saved game from a file with elaborate checks for file
|
||||
* integrity from cheaters
|
||||
*/
|
||||
restore(file, envp)
|
||||
register char *file;
|
||||
char **envp;
|
||||
bool
|
||||
restore(char *file, char **envp)
|
||||
{
|
||||
register int inf;
|
||||
register bool syml;
|
||||
|
|
@ -324,10 +328,8 @@ char **envp;
|
|||
* encwrite:
|
||||
* Perform an encrypted write
|
||||
*/
|
||||
encwrite(starta, size, outf)
|
||||
void *starta;
|
||||
unsigned int size;
|
||||
register FILE *outf;
|
||||
void
|
||||
encwrite(void *starta, int size, FILE *outf)
|
||||
{
|
||||
register char *ep;
|
||||
register char *start = (char *) starta;
|
||||
|
|
@ -345,10 +347,8 @@ register FILE *outf;
|
|||
* encread:
|
||||
* Perform an encrypted read
|
||||
*/
|
||||
encread(starta, size, inf)
|
||||
register void *starta;
|
||||
unsigned int size;
|
||||
register int inf;
|
||||
int
|
||||
encread(void *starta, int size, int inf)
|
||||
{
|
||||
register char *ep;
|
||||
register int read_size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue