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.5 by greg, Thu Nov 18 09:43:02 1993 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 64 | Line 69 | char  *argv[];
69                          printargs(argc, argv, stdout);
70                  fputformat(AMBFMT, stdout);
71                  putchar('\n');
72 + #ifdef MSDOS
73 +                setmode(fileno(stdout), O_BINARY);
74 + #endif
75                  putambmagic(stdout);
76                  writamb(fp);
77          } else {
78 + #ifdef MSDOS
79 +                setmode(fileno(fp), O_BINARY);
80 + #endif
81                  if (checkheader(fp, AMBFMT, header ? stdout : (FILE *)NULL) < 0)
82                          goto formaterr;
83                  if (!hasambmagic(fp))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines