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 1.3 by greg, Thu Apr 18 14:35:06 1991 UTC vs.
Revision 2.5 by greg, Sat Feb 22 02:07:30 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1986 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   *  getinfo.c - program to read info. header from file.
6   *
# Line 12 | Line 9 | static char SCCSid[] = "$SunId$ LBL";
9  
10   #include  <stdio.h>
11  
12 + #ifdef MSDOS
13 + #include <fcntl.h>
14 + extern int  _fmode;
15 + #endif
16 +
17   extern int  fputs();
18  
19  
20 + int
21   tabstr(s)                               /* put out line followed by tab */
22   register char  *s;
23   {
# Line 24 | Line 27 | register char  *s;
27          }
28          if (*--s == '\n')
29                  putchar('\t');
30 +        return(0);
31   }
32  
33  
34   main(argc, argv)
35   int  argc;
36 < char  *argv[];
36 > char  **argv;
37   {
38          int  dim = 0;
39          FILE  *fp;
# Line 38 | Line 42 | char  *argv[];
42          if (argc > 1 && !strcmp(argv[1], "-d")) {
43                  argc--; argv++;
44                  dim = 1;
45 + #ifdef MSDOS
46 +                setmode(fileno(stdin), _fmode = O_BINARY);
47 + #endif
48          } else if (argc == 2 && !strcmp(argv[1], "-")) {
49 <                getheader(stdin, NULL);
49 > #ifdef MSDOS
50 >                setmode(fileno(stdin), O_BINARY);
51 >                setmode(fileno(stdout), O_BINARY);
52 > #endif
53 >                getheader(stdin, NULL, NULL);
54                  copycat();
55                  exit(0);
56          }
# Line 76 | Line 87 | register FILE  *fp;
87          int  j;
88          register int  c;
89  
90 <        getheader(fp, NULL);    /* skip header */
90 >        getheader(fp, NULL, NULL);      /* skip header */
91  
92          switch (c = getc(fp)) {
93          case '+':               /* picture */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines