--- ray/src/px/mt160r.c 1992/01/29 15:18:34 2.3 +++ ray/src/px/mt160r.c 1993/08/02 14:39:10 2.5 @@ -1,4 +1,4 @@ -/* Copyright (c) 1991 Regents of the University of California */ +/* Copyright (c) 1992 Regents of the University of California */ #ifndef lint static char SCCSid[] = "$SunId$ LBL"; @@ -11,11 +11,14 @@ static char SCCSid[] = "$SunId$ LBL"; */ #include +#ifdef MSDOS +#include +#endif #include "color.h" #include "resolu.h" -#define NCOLS 880 /* for wide carriage */ +#define NCOLS 880 /* for wide carriage */ main(argc, argv) @@ -24,7 +27,12 @@ char *argv[]; { int i; int status = 0; - +#ifdef MSDOS + extern int _fmode; + _fmode = O_BINARY; + setmode(fileno(stdin), O_BINARY); + setmode(fileno(stdout), O_BINARY); +#endif if (argc < 2) status += printp(NULL) == -1; else @@ -41,7 +49,7 @@ char *fname; int xres, yres; COLR scanline[NCOLS]; int i; - + if (fname == NULL) { input = stdin; fname = ""; @@ -65,9 +73,6 @@ char *fname; } fputs("\033[6~\033[7z", stdout); -#ifdef _IOLBF - stdout->_flag &= ~_IOLBF; -#endif for (i = yres-1; i >= 0; i--) { if (freadcolrs(scanline, xres, input) < 0) {