--- ray/src/px/ttyimage.c 1992/09/21 12:15:22 2.2 +++ ray/src/px/ttyimage.c 2004/03/28 20:33:14 2.5 @@ -1,9 +1,6 @@ -/* Copyright (c) 1992 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: ttyimage.c,v 2.5 2004/03/28 20:33:14 schorsch Exp $"; #endif - /* * ttyimage.c - program to dump pixel file to dumb terminal. * @@ -11,20 +8,20 @@ static char SCCSid[] = "$SunId$ LBL"; */ #include -#ifdef MSDOS -#include -#endif +#include +#include "platform.h" #include "color.h" #include "resolu.h" #define NCOLS 133 +static int shade(COLR clr); -main(argc, argv) -int argc; -char **argv; + +int +main(int argc, char **argv) { FILE *input; int xres, yres; @@ -37,9 +34,7 @@ char **argv; fprintf(stderr, "%s: can't open file \"%s\"\n", argv[0], argv[1]); exit(1); } -#ifdef MSDOS - setmode(fileno(input), O_BINARY); -#endif + SET_FILE_BINARY(input); /* get picture dimensions */ if (checkheader(input, COLRFMT, NULL) < 0 || fgetresolu(&xres, &yres, input) < 0) { @@ -66,9 +61,10 @@ char **argv; } -int -shade(clr) /* return character for color */ -COLR clr; +static int +shade( /* return character for color */ + COLR clr +) { #define NSHADES 13