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:
parent
f8d1f422c8
commit
c661fd79d4
33 changed files with 426 additions and 439 deletions
|
|
@ -1009,7 +1009,7 @@ bool drop(struct linked_list *item);
|
|||
bool dropcheck(struct object *op);
|
||||
void dust_appear(void);
|
||||
void eat(void);
|
||||
int encread(char *start, unsigned int size, int inf);
|
||||
int encread(char *start, unsigned int size, FILE *inf);
|
||||
int encwrite(char *start, unsigned int size, FILE *outf);
|
||||
void endit(int sig);
|
||||
void endmsg(void);
|
||||
|
|
@ -1097,6 +1097,7 @@ void raise_level(bool get_spells);
|
|||
short randmonster(bool wander, bool no_unique);
|
||||
void read_scroll(int which, int flag, bool is_scroll);
|
||||
int readchar(void);
|
||||
void reopen_score(void);
|
||||
void res_dexterity(int howmuch);
|
||||
void res_strength(void);
|
||||
bool restore(char *file, char **envp);
|
||||
|
|
@ -1114,7 +1115,7 @@ coord *rndmove(struct thing *who);
|
|||
int roll(int number, int sides);
|
||||
void rollwand(void);
|
||||
struct room *roomin(coord *cp);
|
||||
int rs_restore_file(int inf);
|
||||
int rs_restore_file(FILE *inf);
|
||||
int rs_save_file(FILE *savef);
|
||||
void runners(void);
|
||||
void runto(struct thing *runner, coord *spot);
|
||||
|
|
@ -1191,7 +1192,6 @@ extern int md_unlink(char *file);
|
|||
extern int md_normaluser(void);
|
||||
extern int md_getuid(void);
|
||||
extern long md_memused(void);
|
||||
extern void md_reopen_score(void);
|
||||
extern int md_readchar(WINDOW *win);
|
||||
extern int md_shellescape(void);
|
||||
extern int md_srand(int seed);
|
||||
|
|
@ -1266,7 +1266,6 @@ extern int pray_time; /* Number of prayer points/exp level */
|
|||
extern int spell_power; /* Spell power left at this level */
|
||||
extern int turns; /* Number of turns player has taken */
|
||||
extern int quest_item; /* Item hero is looking for */
|
||||
extern int scorefd; /* File descriptor for the scorefile */
|
||||
extern int cur_relic[]; /* Current relics */
|
||||
extern char take; /* Thing the rogue is taking */
|
||||
extern char prbuf[]; /* Buffer for sprintfs */
|
||||
|
|
@ -1338,4 +1337,5 @@ extern char *stones[NSTONES];
|
|||
extern char *metal[NMETAL];
|
||||
extern char *wood[NWOOD];
|
||||
extern coord ch_ret;
|
||||
extern FILE *scoreboard; /* The scorefile */
|
||||
extern FILE *logfile;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue