More binary mode flag setting.
This commit is contained in:
parent
c573b9bce2
commit
279de30935
|
@ -104,7 +104,10 @@ int C_open(char* nm)
|
|||
*/
|
||||
|
||||
if (nm == 0)
|
||||
{
|
||||
C_ofp = STDOUT; /* standard output */
|
||||
sys_setbinarymode(stdout);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include "alloc.h"
|
||||
#include "system.h"
|
||||
#include "em_label.h"
|
||||
#include "em_arith.h"
|
||||
#include "em_pseu.h"
|
||||
|
@ -136,7 +137,10 @@ EXPORT int EM_open(char *filename)
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fd = stdin;
|
||||
sys_setbinarymode(stdin);
|
||||
}
|
||||
EM_filename = filename;
|
||||
init_input();
|
||||
|
||||
|
|
|
@ -691,14 +691,14 @@ int main(int argc, char* argv[])
|
|||
break;
|
||||
|
||||
case 3: /* Both input and output files specified. */
|
||||
output = fopen(argv[2], "w");
|
||||
output = fopen(argv[2], "wb");
|
||||
if (!output)
|
||||
fatal("unable to open output file.");
|
||||
outputfile = argv[2];
|
||||
/* fall through */
|
||||
|
||||
case 2: /* Input file specified. */
|
||||
input = fopen(argv[1], "r");
|
||||
input = fopen(argv[1], "rb");
|
||||
if (!input)
|
||||
fatal("unable to open input file.");
|
||||
break;
|
||||
|
|
|
@ -228,7 +228,7 @@ int main(int argc, char* argv[])
|
|||
/* fall through */
|
||||
|
||||
case 2: /* Input file specified. */
|
||||
input = fopen(argv[1], "r");
|
||||
input = fopen(argv[1], "rb");
|
||||
if (!input)
|
||||
fatal("unable to open input file.");
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue