Skip to content

Commit

Permalink
work around win32 rumor issues (#H80)
Browse files Browse the repository at this point in the history
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?"
  • Loading branch information
nethack.allison committed May 2, 2006
1 parent e80408b commit a3b216e
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions util/makedefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,15 +355,27 @@ 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);
}
Fprintf(ofp,Dont_Edit_Data);

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 */
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit a3b216e

Please sign in to comment.