Open EM files in binary mode.
This commit is contained in:
parent
205a50d8ee
commit
7d112a394c
|
@ -153,7 +153,7 @@ static void argument(char *arg)
|
|||
return;
|
||||
}
|
||||
curfile = arg; /* for error messages etc. */
|
||||
if ((ifile = fopen(arg, "r")) == NULL)
|
||||
if ((ifile = fopen(arg, "rb")) == NULL)
|
||||
{
|
||||
error("can't open %s", arg);
|
||||
return;
|
||||
|
@ -385,10 +385,10 @@ void init_files(void)
|
|||
* It has the nice property of generating truly unique names.
|
||||
*/
|
||||
|
||||
tfile = fopen(tmpfil(), "w+");
|
||||
dfile = fopen(tmpfil(), "w+");
|
||||
rtfile = fopen(tmpfil(), "w+");
|
||||
rdfile = fopen(tmpfil(), "w+");
|
||||
tfile = fopen(tmpfil(), "wb+");
|
||||
dfile = fopen(tmpfil(), "wb+");
|
||||
rtfile = fopen(tmpfil(), "wb+");
|
||||
rdfile = fopen(tmpfil(), "wb+");
|
||||
}
|
||||
|
||||
void initproc(void)
|
||||
|
|
|
@ -127,7 +127,7 @@ void copyout(void)
|
|||
if (remtext != 0)
|
||||
remtext = wordsize - remtext;
|
||||
|
||||
if ((ifile = fopen(eout, "w")) == 0)
|
||||
if ((ifile = fopen(eout, "wb")) == 0)
|
||||
fatal("can't create e.out");
|
||||
|
||||
rewind(tfile);
|
||||
|
|
Loading…
Reference in a new issue