diff options
Diffstat (limited to 'Build/source/texk/mendexk/fwrite.c')
-rw-r--r-- | Build/source/texk/mendexk/fwrite.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Build/source/texk/mendexk/fwrite.c b/Build/source/texk/mendexk/fwrite.c index 07b332fa647..10eb46c9b93 100644 --- a/Build/source/texk/mendexk/fwrite.c +++ b/Build/source/texk/mendexk/fwrite.c @@ -77,8 +77,13 @@ void indwrite(char *filename, struct index *ind, int pagenum) char datama[256],lbuff[4096]; FILE *fp; - if (filename[0]!='\0' && kpse_out_name_ok(filename)) fp=fopen(filename,"w"); - else fp=stdout; + if (filename[0]!='\0' && kpse_out_name_ok(filename)) fp=fopen(filename,"wb"); + else { + fp=stdout; +#ifdef WIN32 + setmode(fileno(fp), _O_BINARY); +#endif + } convert(atama,datama); fputs(preamble,fp); |