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

Comparing ray/src/util/getinfo.c (file contents):
Revision 2.1 by greg, Tue Nov 12 16:05:05 1991 UTC vs.
Revision 2.3 by greg, Thu Nov 12 10:06:11 1992 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1986 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 12 | Line 12 | static char SCCSid[] = "$SunId$ LBL";
12  
13   #include  <stdio.h>
14  
15 + #ifdef MSDOS
16 + #include <fcntl.h>
17 + extern int  _fmode;
18 + #endif
19 +
20   extern int  fputs();
21  
22  
# Line 29 | Line 34 | register char  *s;
34  
35   main(argc, argv)
36   int  argc;
37 < char  *argv[];
37 > char  **argv;
38   {
39          int  dim = 0;
40          FILE  *fp;
# Line 38 | Line 43 | char  *argv[];
43          if (argc > 1 && !strcmp(argv[1], "-d")) {
44                  argc--; argv++;
45                  dim = 1;
46 + #ifdef MSDOS
47 +                setmode(fileno(stdin), _fmode = O_BINARY);
48 + #endif
49          } else if (argc == 2 && !strcmp(argv[1], "-")) {
50 <                getheader(stdin, NULL);
50 > #ifdef MSDOS
51 >                setmode(fileno(stdin), O_BINARY);
52 >                setmode(fileno(stdout), O_BINARY);
53 > #endif
54 >                getheader(stdin, NULL, NULL);
55                  copycat();
56                  exit(0);
57          }
# Line 76 | Line 88 | register FILE  *fp;
88          int  j;
89          register int  c;
90  
91 <        getheader(fp, NULL);    /* skip header */
91 >        getheader(fp, NULL, NULL);      /* skip header */
92  
93          switch (c = getc(fp)) {
94          case '+':               /* picture */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines