--- ray/src/util/getinfo.c 1998/10/27 08:47:17 2.4 +++ ray/src/util/getinfo.c 2003/06/05 19:29:35 2.6 @@ -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: getinfo.c,v 2.6 2003/06/05 19:29:35 schorsch Exp $"; #endif - /* * getinfo.c - program to read info. header from file. * @@ -12,12 +9,8 @@ static char SCCSid[] = "$SunId$ LBL"; #include -#ifdef MSDOS -#include -extern int _fmode; -#endif +#include "platform.h" -extern int fputs(); int @@ -45,14 +38,11 @@ char **argv; if (argc > 1 && !strcmp(argv[1], "-d")) { argc--; argv++; dim = 1; -#ifdef MSDOS - setmode(fileno(stdin), _fmode = O_BINARY); -#endif + SET_DEFAULT_BINARY(); /* for output file */ + SET_FILE_BINARY(stdin); } else if (argc == 2 && !strcmp(argv[1], "-")) { -#ifdef MSDOS - setmode(fileno(stdin), O_BINARY); - setmode(fileno(stdout), O_BINARY); -#endif + SET_FILE_BINARY(stdin); + SET_FILE_BINARY(stdout); getheader(stdin, NULL, NULL); copycat(); exit(0);