(wrmakesrc,wripglob,wrgamesdef,info,apro,mobupdate,rea,turn

upda,ef_open,logerror,emp_config,match_user,show_motd,gamedown,
typed_wu,delete_old_announcements,mobility_check,mobility_init,
allocate_memory,write_newcap_script,main,files,fairland,doconfig,)
[_WIN32]: Switchback to default mode of text.
"t" (text) is not included the ISO/ANSI C standard but "b" (binary)
is included.
This commit is contained in:
Ron Koenderink 2005-03-02 12:47:15 +00:00
parent d4af51c9e2
commit 55e6aca9e0
17 changed files with 28 additions and 41 deletions

View file

@ -65,12 +65,12 @@ delete_old_announcements(void)
old = now - days(anno_keep_days);
logerror("Deleting annos older than %s", ctime(&old));
if ((annfp = fopen(annfil, "r")) == NULL) {
if ((annfp = fopen(annfil, "rb")) == NULL) {
logerror("can't open telegram file %s for reading", annfil);
return;
}
sprintf(tmp_filename, "%s.tmp", annfil);
if ((tmpfp = fopen(tmp_filename, "w")) == NULL) {
if ((tmpfp = fopen(tmp_filename, "wb")) == NULL) {
logerror("can't open telegram file %s for writing",
tmp_filename);
if (fclose(annfp) != 0)