diff xrogue/save.c @ 220:f54901b9c39b

XRogue: convert to ANSI-style function declarations.
author John "Elwin" Edwards
date Wed, 02 Mar 2016 21:13:26 -0500
parents a3d90e31a001
children d3968e9cb98d
line wrap: on
line diff
--- a/xrogue/save.c	Fri Feb 19 21:02:28 2016 -0500
+++ b/xrogue/save.c	Wed Mar 02 21:13:26 2016 -0500
@@ -31,10 +31,16 @@
 extern unsigned char encstr[];
 extern int big_endian;
 
+bool rs_write_int(FILE *savef, int c);
+bool rs_read_int(int inf, int *i);
+bool rs_save_file(FILE *savef);
+bool rs_restore_file(int inf);
+
 int md_unlink(char *file);
+bool save_file(FILE *savef);
 
 bool
-save_game()
+save_game(void)
 {
     register FILE *savef;
     register int c;
@@ -129,12 +135,11 @@
  */
 
 bool
-save_file(savef)
-register FILE *savef;
+save_file(FILE *savef)
 {
     int slines = LINES;
     int scols = COLS;
-    int ret = FALSE;
+    bool ret = FALSE;
     int endian = 0x01020304;
     big_endian = ( *((char *)&endian) == 0x01 );
 
@@ -150,9 +155,8 @@
     return(ret);
 }
 
-restore(file, envp)
-register char *file;
-char **envp;
+bool
+restore(char *file, char *envp[])
 {
     register int inf;
     extern char **environ;
@@ -251,10 +255,7 @@
  */
 
 long
-encwrite(start, size, outf)
-register char *start;
-register unsigned long size;
-register FILE *outf;
+encwrite(char *start, unsigned long size, FILE *outf)
 {
     register unsigned char *ep;
     register int i = 0;
@@ -292,10 +293,7 @@
  */
 
 long
-encread(start, size, inf)
-register char *start;
-register unsigned long size;
-int inf;
+encread(char *start, unsigned long size, int inf)
 {
     register unsigned char *ep;
     register int rd_siz;