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

Comparing ray/src/rt/lookamb.c (file contents):
Revision 2.3 by greg, Thu Jul 16 12:08:44 1992 UTC vs.
Revision 2.6 by greg, Sun Feb 27 10:17:33 1994 UTC

# Line 12 | Line 12 | static char SCCSid[] = "$SunId$ LBL";
12  
13   #include  <stdio.h>
14  
15 + #ifdef MSDOS
16 + #include  <fcntl.h>
17 + #endif
18 +
19   #include  "color.h"
20  
21   #include  "ambient.h"
# Line 25 | Line 29 | AMBVAL  av;
29  
30  
31   main(argc, argv)                /* load ambient values from a file */
32 + int  argc;
33   char  *argv[];
34   {
35          FILE  *fp;
# Line 60 | Line 65 | char  *argv[];
65                  if (header) {
66                          if (checkheader(fp, "ascii", stdout) < 0)
67                                  goto formaterr;
68 <                } else
68 >                } else {
69 >                        newheader("RADIANCE", stdout);
70                          printargs(argc, argv, stdout);
71 +                }
72                  fputformat(AMBFMT, stdout);
73                  putchar('\n');
74 + #ifdef MSDOS
75 +                setmode(fileno(stdout), O_BINARY);
76 + #endif
77                  putambmagic(stdout);
78                  writamb(fp);
79          } else {
80 + #ifdef MSDOS
81 +                setmode(fileno(fp), O_BINARY);
82 + #endif
83                  if (checkheader(fp, AMBFMT, header ? stdout : (FILE *)NULL) < 0)
84                          goto formaterr;
85                  if (!hasambmagic(fp))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines