--- ray/src/px/ra_pr24.c 1991/10/14 17:09:39 1.10 +++ ray/src/px/ra_pr24.c 1992/09/21 12:15:02 2.3 @@ -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"; @@ -10,12 +10,20 @@ static char SCCSid[] = "$SunId$ LBL"; #include +#ifdef MSDOS +#include +#endif + #include "rasterfile.h" #include "color.h" -extern double atof(), pow(); +#include "resolu.h" +extern double pow(); + +extern char *malloc(); + double gamma = 2.2; /* gamma correction */ int bradj = 0; /* brightness adjustment */ @@ -32,7 +40,12 @@ char *argv[]; struct rasterfile head; int reverse = 0; int i; - +#ifdef MSDOS + extern int _fmode; + _fmode = O_BINARY; + setmode(fileno(stdin), O_BINARY); + setmode(fileno(stdout), O_BINARY); +#endif progname = argv[0]; head.ras_type = RT_STANDARD; @@ -89,13 +102,13 @@ char *argv[]; printargs(i, argv, stdout); fputformat(COLRFMT, stdout); putchar('\n'); - fputresolu(YMAJOR|YDECR, xmax, ymax, stdout); + fprtresolu(xmax, ymax, stdout); /* convert file */ pr2ra(head.ras_type); } else { /* get header info. */ if (checkheader(stdin, COLRFMT, NULL) < 0 || - fgetresolu(&xmax, &ymax, stdin) != (YMAJOR|YDECR)) + fgetresolu(&xmax, &ymax, stdin) < 0) quiterr("bad picture format"); /* write rasterfile header */ head.ras_magic = RAS_MAGIC;