diff arogue5/save.c @ 218:56e748983fa8

Advanced Rogue 5: convert to ANSI function declarations. This still leaves over a thousand lines of warning messages, mostly related to the return types of daemons and fuses.
author John "Elwin" Edwards
date Sun, 07 Feb 2016 14:39:21 -0500
parents efdbeec0816d
children 3d4252fa2ed3
line wrap: on
line diff
--- a/arogue5/save.c	Sun Jan 31 13:45:07 2016 -0500
+++ b/arogue5/save.c	Sun Feb 07 14:39:21 2016 -0500
@@ -23,6 +23,8 @@
 #include <signal.h>
 #include "rogue.h"
 
+bool save_file(FILE *savef);
+
 typedef struct stat STAT;
 
 extern char version[], encstr[];
@@ -31,7 +33,7 @@
 STAT sbuf;
 
 bool
-save_game()
+save_game(void)
 {
     register FILE *savef;
     register int c;
@@ -122,8 +124,7 @@
  * write the saved game on the file
  */
 bool
-save_file(savef)
-register FILE *savef;
+save_file(FILE *savef)
 {
     int ret;
     int slines = LINES;
@@ -147,9 +148,8 @@
     return(ret);
 }
 
-restore(file, envp)
-register char *file;
-char **envp;
+bool
+restore(char *file, char **envp)
 {
     register int inf;
 #ifndef _AIX
@@ -264,13 +264,11 @@
 /*
  * perform an encrypted write
  */
-encwrite(start, size, outf)
-register char *start;
-register unsigned size;
-register FILE *outf;
+int
+encwrite(char *start, unsigned int size, FILE *outf)
 {
     register char *ep;
-    register num_written = 0;
+    register int num_written = 0;
 
     ep = encstr;
 
@@ -288,10 +286,8 @@
 /*
  * perform an encrypted read
  */
-encread(start, size, inf)
-register char *start;
-register unsigned size;
-register int inf;
+int
+encread(char *start, unsigned int size, int inf)
 {
     register char *ep;
     register int read_size;