comparison arogue5/state.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 1cf517d5d2a8
children b49d8b963df3
comparison
equal deleted inserted replaced
217:94a0d9dd5ce1 218:56e748983fa8
61 #include <curses.h> 61 #include <curses.h>
62 #include <stdio.h> 62 #include <stdio.h>
63 #include <stdlib.h> 63 #include <stdlib.h>
64 #include <string.h> 64 #include <string.h>
65 #include "rogue.h" 65 #include "rogue.h"
66
67 int rs_read_int(int inf, int *i);
68 int rs_write_int(FILE *savef, int c);
69 int list_size(struct linked_list *l);
70 int rs_write_object_list(FILE *savef, struct linked_list *l);
71 int rs_read_object_list(int inf, struct linked_list **list);
66 72
67 #define READSTAT (format_error || read_error ) 73 #define READSTAT (format_error || read_error )
68 #define WRITESTAT (write_error) 74 #define WRITESTAT (write_error)
69 75
70 static int read_error = FALSE; 76 static int read_error = FALSE;
1710 rs_read_room(inf,&r[n]); 1716 rs_read_room(inf,&r[n]);
1711 1717
1712 return(READSTAT); 1718 return(READSTAT);
1713 } 1719 }
1714 1720
1721 int
1715 rs_write_room_reference(FILE *savef, struct room *rp) 1722 rs_write_room_reference(FILE *savef, struct room *rp)
1716 { 1723 {
1717 int i, room = -1; 1724 int i, room = -1;
1718 1725
1719 if (write_error) 1726 if (write_error)
2222 rs_read_stats(inf, &t->maxstats); 2229 rs_read_stats(inf, &t->maxstats);
2223 2230
2224 return(READSTAT); 2231 return(READSTAT);
2225 } 2232 }
2226 2233
2227 int 2234 void
2228 rs_fix_thing(struct thing *t) 2235 rs_fix_thing(struct thing *t)
2229 { 2236 {
2230 struct thing *tp; 2237 struct thing *tp;
2231 2238
2232 if (t->t_reserved < 0) 2239 if (t->t_reserved < 0)
2432 fflush(savef); 2439 fflush(savef);
2433 2440
2434 return(WRITESTAT); 2441 return(WRITESTAT);
2435 } 2442 }
2436 2443
2444 int
2437 rs_restore_file(int inf) 2445 rs_restore_file(int inf)
2438 { 2446 {
2439 int i; 2447 int i;
2440 2448
2441 if (read_error || format_error) 2449 if (read_error || format_error)