--- ray/src/px/mt160r.c 1991/11/12 16:04:57 2.1 +++ 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 = ""; @@ -110,6 +118,7 @@ int y; } putchar('\r'); putchar('\n'); + fflush(stdout); } } @@ -119,8 +128,8 @@ COLR clr; register int x; { static int cerr[NCOLS]; - static int err, errp; - int b; + static int err; + int b, errp; register int isblack; b = normbright(clr);