(main,mobility_check,upda,turn,rea,mobupdate,ef_open,logerror,

emp_config,gamedown,show_motd,match_user,typed_wu,
delete_old_announcements) [_WIN32]: switch the default file mode to
binary to match POSIX.  Remove the now unneccessary ifdef for
the open/fopen. Add text mode for user files (econfig/auth).
This commit is contained in:
Ron Koenderink 2004-12-30 01:31:03 +00:00
parent f6e78f4589
commit 1a8488bc45
13 changed files with 14 additions and 65 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, "rb")) == NULL) {
if ((annfp = fopen(annfil, "r")) == NULL) {
logerror("can't open telegram file %s for reading", annfil);
return;
}
sprintf(tmp_filename, "%s.tmp", annfil);
if ((tmpfp = fopen(tmp_filename, "wb")) == NULL) {
if ((tmpfp = fopen(tmp_filename, "w")) == NULL) {
logerror("can't open telegram file %s for writing",
tmp_filename);
if (fclose(annfp) != 0)