comparison arogue7/state.c @ 219:f9ef86cf22b2

Advanced Rogue 7: convert to ANSI-style function declarations. Almost 1500 lines of compiler warnings remain, and the GCC developers are already working on a new version with even more warnings turned on by default.
author John "Elwin" Edwards
date Fri, 19 Feb 2016 21:02:28 -0500
parents aa8e1fc62926
children b67b99f6c92b
comparison
equal deleted inserted replaced
218:56e748983fa8 219:f9ef86cf22b2
70 static int read_error = FALSE; 70 static int read_error = FALSE;
71 static int write_error = FALSE; 71 static int write_error = FALSE;
72 static int format_error = FALSE; 72 static int format_error = FALSE;
73 static int endian = 0x01020304; 73 static int endian = 0x01020304;
74 #define big_endian ( *((char *)&endian) == 0x01 ) 74 #define big_endian ( *((char *)&endian) == 0x01 )
75
76 int list_size(struct linked_list *l);
77 int rs_write_int(FILE *savef, int c);
78 int rs_read_int(int inf, int *i);
79 int rs_write_object_list(FILE *savef, struct linked_list *l);
80 int rs_read_object_list(int inf, struct linked_list **list);
75 81
76 int 82 int
77 rs_write(FILE *savef, void *ptr, size_t size) 83 rs_write(FILE *savef, void *ptr, size_t size)
78 { 84 {
79 if (write_error) 85 if (write_error)
2344 rs_read_stats(inf,&t->maxstats); 2350 rs_read_stats(inf,&t->maxstats);
2345 2351
2346 return(READSTAT); 2352 return(READSTAT);
2347 } 2353 }
2348 2354
2349 int 2355 void
2350 rs_fix_thing(struct thing *t) 2356 rs_fix_thing(struct thing *t)
2351 { 2357 {
2352 struct thing *tp; 2358 struct thing *tp;
2353 2359
2354 if (t->t_reserved < 0) 2360 if (t->t_reserved < 0)