srogue: add and use md_fdopen().
The implementation was copied from rogue4. Using fdopen() is necessary because the scorefile needs both encread() and encwrite(). For some reason I have failed to discover, one of them uses FILE *'s and the other uses file descriptors.
This commit is contained in:
parent
e857a2cec6
commit
00142507db
3 changed files with 12 additions and 1 deletions
|
|
@ -145,7 +145,7 @@ int amount, aflag;
|
|||
*/
|
||||
if ((fd = scorefd) < 0)
|
||||
return;
|
||||
outf = (FILE *) fdopen(fd, "w");
|
||||
outf = (FILE *) md_fdopen(fd, "w");
|
||||
for (scp = top_ten; scp <= &top_ten[9]; scp++) {
|
||||
scp->sc_score = 0;
|
||||
for (i = 0; i < 80; i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue