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:
+21
-3
@@ -355,7 +355,13 @@ do_rumors()
|
|||||||
Strcat(filename,file_prefix);
|
Strcat(filename,file_prefix);
|
||||||
#endif
|
#endif
|
||||||
Sprintf(eos(filename), DATA_TEMPLATE, RUMOR_FILE);
|
Sprintf(eos(filename), DATA_TEMPLATE, RUMOR_FILE);
|
||||||
if (!(ofp = fopen(filename, WRTMODE))) {
|
if (!(ofp = fopen(filename,
|
||||||
|
#ifdef WIN32
|
||||||
|
WRBMODE
|
||||||
|
#else
|
||||||
|
WRTMODE
|
||||||
|
#endif
|
||||||
|
))) {
|
||||||
perror(filename);
|
perror(filename);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
@@ -363,7 +369,13 @@ do_rumors()
|
|||||||
|
|
||||||
Sprintf(infile, DATA_IN_TEMPLATE, RUMOR_FILE);
|
Sprintf(infile, DATA_IN_TEMPLATE, RUMOR_FILE);
|
||||||
Strcat(infile, ".tru");
|
Strcat(infile, ".tru");
|
||||||
if (!(ifp = fopen(infile, RDTMODE))) {
|
if (!(ifp = fopen(infile,
|
||||||
|
#ifdef WIN32
|
||||||
|
RDBMODE
|
||||||
|
#else
|
||||||
|
RDTMODE
|
||||||
|
#endif
|
||||||
|
))) {
|
||||||
perror(infile);
|
perror(infile);
|
||||||
Fclose(ofp);
|
Fclose(ofp);
|
||||||
Unlink(filename); /* kill empty output file */
|
Unlink(filename); /* kill empty output file */
|
||||||
@@ -393,7 +405,13 @@ do_rumors()
|
|||||||
|
|
||||||
Sprintf(infile, DATA_IN_TEMPLATE, RUMOR_FILE);
|
Sprintf(infile, DATA_IN_TEMPLATE, RUMOR_FILE);
|
||||||
Strcat(infile, ".fal");
|
Strcat(infile, ".fal");
|
||||||
if (!(ifp = fopen(infile, RDTMODE))) {
|
if (!(ifp = fopen(infile,
|
||||||
|
#ifdef WIN32
|
||||||
|
RDBMODE
|
||||||
|
#else
|
||||||
|
RDTMODE
|
||||||
|
#endif
|
||||||
|
))) {
|
||||||
perror(infile);
|
perror(infile);
|
||||||
Fclose(ofp);
|
Fclose(ofp);
|
||||||
Unlink(filename); /* kill incomplete output file */
|
Unlink(filename); /* kill incomplete output file */
|
||||||
|
|||||||
Reference in New Issue
Block a user