--- ray/src/px/mt160r.c 1991/11/12 16:04:57 2.1 +++ ray/src/px/mt160r.c 2003/06/05 19:29:34 2.7 @@ -1,9 +1,6 @@ -/* Copyright (c) 1991 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: mt160r.c,v 2.7 2003/06/05 19:29:34 schorsch Exp $"; #endif - /* * mt160r.c - program to dump pixel file to Mannesman-Tally 160. * @@ -11,11 +8,13 @@ static char SCCSid[] = "$SunId$ LBL"; */ #include +#include +#include "platform.h" #include "color.h" #include "resolu.h" -#define NCOLS 880 /* for wide carriage */ +#define NCOLS 880 /* for wide carriage */ main(argc, argv) @@ -24,7 +23,9 @@ char *argv[]; { int i; int status = 0; - + SET_DEFAULT_BINARY(); + SET_FILE_BINARY(stdin); + SET_FILE_BINARY(stdout); if (argc < 2) status += printp(NULL) == -1; else @@ -41,7 +42,7 @@ char *fname; int xres, yres; COLR scanline[NCOLS]; int i; - + if (fname == NULL) { input = stdin; fname = ""; @@ -110,6 +111,7 @@ int y; } putchar('\r'); putchar('\n'); + fflush(stdout); } } @@ -119,8 +121,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);