(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:
parent
d4af51c9e2
commit
55e6aca9e0
17 changed files with 28 additions and 41 deletions
|
@ -88,10 +88,6 @@ main(void)
|
|||
char *cp;
|
||||
char *pathname;
|
||||
|
||||
#if defined(_WIN32)
|
||||
_fmode = _O_BINARY;
|
||||
#endif
|
||||
|
||||
if ((pathname = safe_getcwd()) == NULL) {
|
||||
printf("Can't get current path!\n");
|
||||
exit(-1);
|
||||
|
@ -141,7 +137,7 @@ wrmakesrc(char *pathname)
|
|||
char buf[256];
|
||||
|
||||
sprintf(buf, "%s/src/make.src", pathname);
|
||||
if ((fp = fopen(buf, "w")) == NULL) {
|
||||
if ((fp = fopen(buf, "wb")) == NULL) {
|
||||
printf("Cannot open %s for writing, exiting.\n", buf);
|
||||
exit(-1);
|
||||
}
|
||||
|
@ -158,7 +154,7 @@ wripglob(char *filename)
|
|||
FILE *fp;
|
||||
|
||||
printf("Writing %s\n", filename);
|
||||
if ((fp = fopen(filename, "w")) == NULL) {
|
||||
if ((fp = fopen(filename, "wb")) == NULL) {
|
||||
printf("Cannot open %s for writing, exiting.\n", filename);
|
||||
exit(-1);
|
||||
}
|
||||
|
@ -175,7 +171,7 @@ wrauth(char *filename)
|
|||
FILE *fp;
|
||||
|
||||
printf("Writing %s\n", filename);
|
||||
if ((fp = fopen(filename, "wt")) == NULL) {
|
||||
if ((fp = fopen(filename, "w")) == NULL) {
|
||||
printf("Cannot open %s for writing, exiting.\n", filename);
|
||||
exit(-1);
|
||||
}
|
||||
|
@ -232,7 +228,7 @@ wrgamesdef(char *filename)
|
|||
}
|
||||
|
||||
printf("Writing %s\n", filename);
|
||||
if ((fp = fopen(filename, "w")) == NULL) {
|
||||
if ((fp = fopen(filename, "wb")) == NULL) {
|
||||
printf("Cannot open %s for writing, exiting.\n", filename);
|
||||
exit(-1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue