work around win32 rumor issues (#H80)

With makedefs changed to open the files as binary, the
rumors generation and retrieval seems to work consistently.

win32tty
T start=000067 (000043), end=020658 (0050b2), size=020591 (00506f)
F start=020658 (0050b2), end=043641 (00aa79), size=022983 (0059c7)
T 000067 A blindfold can be very useful if you're telepathic.
F 020658 "So when I die, the first thing I will see in heaven is a score list?"

win32gui
T start=000067 (000043), end=020658 (0050b2), size=020591 (00506f)
F start=020658 (0050b2), end=043641 (00aa79), size=022983 (0059c7)
T 000067 A blindfold can be very useful if you're telepathic.
F 020658 "So when I die, the first thing I will see in heaven is a score list?"
This commit is contained in:
nethack.allison
2006-05-02 22:10:54 +00:00
parent e80408bec2
commit a3b216e475

View File

@@ -355,7 +355,13 @@ do_rumors()
Strcat(filename,file_prefix);
#endif
Sprintf(eos(filename), DATA_TEMPLATE, RUMOR_FILE);
if (!(ofp = fopen(filename, WRTMODE))) {
if (!(ofp = fopen(filename,
#ifdef WIN32
WRBMODE
#else
WRTMODE
#endif
))) {
perror(filename);
exit(EXIT_FAILURE);
}
@@ -363,7 +369,13 @@ do_rumors()
Sprintf(infile, DATA_IN_TEMPLATE, RUMOR_FILE);
Strcat(infile, ".tru");
if (!(ifp = fopen(infile, RDTMODE))) {
if (!(ifp = fopen(infile,
#ifdef WIN32
RDBMODE
#else
RDTMODE
#endif
))) {
perror(infile);
Fclose(ofp);
Unlink(filename); /* kill empty output file */
@@ -393,7 +405,13 @@ do_rumors()
Sprintf(infile, DATA_IN_TEMPLATE, RUMOR_FILE);
Strcat(infile, ".fal");
if (!(ifp = fopen(infile, RDTMODE))) {
if (!(ifp = fopen(infile,
#ifdef WIN32
RDBMODE
#else
RDTMODE
#endif
))) {
perror(infile);
Fclose(ofp);
Unlink(filename); /* kill incomplete output file */