ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/ra_pr24.c
(Generate patch)

Comparing ray/src/px/ra_pr24.c (file contents):
Revision 1.10 by greg, Mon Oct 14 17:09:39 1991 UTC vs.
Revision 2.3 by greg, Mon Sep 21 12:15:02 1992 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1991 Regents of the University of California */
1 > /* Copyright (c) 1992 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 10 | Line 10 | static char SCCSid[] = "$SunId$ LBL";
10  
11   #include  <stdio.h>
12  
13 + #ifdef MSDOS
14 + #include  <fcntl.h>
15 + #endif
16 +
17   #include  "rasterfile.h"
18  
19   #include  "color.h"
20  
21 < extern double  atof(), pow();
21 > #include  "resolu.h"
22  
23 + extern double  pow();
24 +
25 + extern char  *malloc();
26 +
27   double  gamma = 2.2;                    /* gamma correction */
28  
29   int  bradj = 0;                         /* brightness adjustment */
# Line 32 | Line 40 | char  *argv[];
40          struct rasterfile  head;
41          int  reverse = 0;
42          int  i;
43 <        
43 > #ifdef MSDOS
44 >        extern int  _fmode;
45 >        _fmode = O_BINARY;
46 >        setmode(fileno(stdin), O_BINARY);
47 >        setmode(fileno(stdout), O_BINARY);
48 > #endif
49          progname = argv[0];
50  
51          head.ras_type = RT_STANDARD;
# Line 89 | Line 102 | char  *argv[];
102                  printargs(i, argv, stdout);
103                  fputformat(COLRFMT, stdout);
104                  putchar('\n');
105 <                fputresolu(YMAJOR|YDECR, xmax, ymax, stdout);
105 >                fprtresolu(xmax, ymax, stdout);
106                                          /* convert file */
107                  pr2ra(head.ras_type);
108          } else {
109                                          /* get header info. */
110                  if (checkheader(stdin, COLRFMT, NULL) < 0 ||
111 <                        fgetresolu(&xmax, &ymax, stdin) != (YMAJOR|YDECR))
111 >                                fgetresolu(&xmax, &ymax, stdin) < 0)
112                          quiterr("bad picture format");
113                                          /* write rasterfile header */
114                  head.ras_magic = RAS_MAGIC;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines