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.
This commit is contained in:
John "Elwin" Edwards 2017-09-15 19:57:54 -04:00
parent f8d1f422c8
commit c661fd79d4
33 changed files with 426 additions and 439 deletions

View file

@ -40,12 +40,14 @@ extern char _flags[], _level[], file_name[], fruit[],
*ws_guess[], *ws_type[];
extern int a_chances[], a_class[], count, dnum, food_left,
fung_hit, fd, group, hungry_state, inpack, lastscore,
level, lfd, max_level, mpos, no_command, no_food, no_move,
fung_hit, group, hungry_state, inpack, lastscore,
level, max_level, mpos, no_command, no_food, no_move,
ntraps, purse, quiet, total;
extern long seed;
extern FILE *score_file, *log_file;
extern WINDOW *hw;
/*
@ -92,5 +94,5 @@ extern int md_readchar(WINDOW *win);
extern int md_shellescape(void);
extern void md_sleep(int s);
extern int md_unlink(char *file);
extern int md_unlink_open_file(char *file, int inf);
extern int md_unlink_open_file(char *file, FILE *inf);
extern unsigned int md_random_seed(void);