comparison rogue4/extern.h @ 279:d3968e9cb98d

Use C stdio functions for score files and save files. Switching from Unix file descriptor operations to C standard FILE* functions will reduce portability problems.
author John "Elwin" Edwards
date Fri, 15 Sep 2017 19:57:54 -0400
parents 3d4252fa2ed3
children 70aa5808c782
comparison
equal deleted inserted replaced
278:c222f9d56776 279:d3968e9cb98d
38 prbuf[], *r_guess[], *release, runch, 38 prbuf[], *r_guess[], *release, runch,
39 *s_guess[], *s_names[], take, whoami[], 39 *s_guess[], *s_names[], take, whoami[],
40 *ws_guess[], *ws_type[]; 40 *ws_guess[], *ws_type[];
41 41
42 extern int a_chances[], a_class[], count, dnum, food_left, 42 extern int a_chances[], a_class[], count, dnum, food_left,
43 fung_hit, fd, group, hungry_state, inpack, lastscore, 43 fung_hit, group, hungry_state, inpack, lastscore,
44 level, lfd, max_level, mpos, no_command, no_food, no_move, 44 level, max_level, mpos, no_command, no_food, no_move,
45 ntraps, purse, quiet, total; 45 ntraps, purse, quiet, total;
46 46
47 extern long seed; 47 extern long seed;
48
49 extern FILE *score_file, *log_file;
48 50
49 extern WINDOW *hw; 51 extern WINDOW *hw;
50 52
51 /* 53 /*
52 * Function types 54 * Function types
90 extern void md_normaluser(void); 92 extern void md_normaluser(void);
91 extern int md_readchar(WINDOW *win); 93 extern int md_readchar(WINDOW *win);
92 extern int md_shellescape(void); 94 extern int md_shellescape(void);
93 extern void md_sleep(int s); 95 extern void md_sleep(int s);
94 extern int md_unlink(char *file); 96 extern int md_unlink(char *file);
95 extern int md_unlink_open_file(char *file, int inf); 97 extern int md_unlink_open_file(char *file, FILE *inf);
96 extern unsigned int md_random_seed(void); 98 extern unsigned int md_random_seed(void);