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.3 by greg, Thu Nov 12 10:06:11 1992 UTC vs.
Revision 2.7 by schorsch, Mon Jul 21 22:30:19 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1992 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
16 < #include <fcntl.h>
17 < extern int  _fmode;
18 < #endif
12 > #include  "platform.h"
13  
20 extern int  fputs();
14  
15  
16 + int
17   tabstr(s)                               /* put out line followed by tab */
18   register char  *s;
19   {
# Line 29 | Line 23 | register char  *s;
23          }
24          if (*--s == '\n')
25                  putchar('\t');
26 +        return(0);
27   }
28  
29  
# Line 43 | Line 38 | char  **argv;
38          if (argc > 1 && !strcmp(argv[1], "-d")) {
39                  argc--; argv++;
40                  dim = 1;
41 < #ifdef MSDOS
42 <                setmode(fileno(stdin), _fmode = O_BINARY);
48 < #endif
41 >                SET_DEFAULT_BINARY(); /* for output file */
42 >                SET_FILE_BINARY(stdin);
43          } else if (argc == 2 && !strcmp(argv[1], "-")) {
44 < #ifdef MSDOS
45 <                setmode(fileno(stdin), O_BINARY);
52 <                setmode(fileno(stdout), O_BINARY);
53 < #endif
44 >                SET_FILE_BINARY(stdin);
45 >                SET_FILE_BINARY(stdout);
46                  getheader(stdin, NULL, NULL);
47                  copycat();
48                  exit(0);
# Line 71 | Line 63 | char  **argv;
63                          fclose(fp);
64                  }
65          }
66 <        if (argc == 1)
66 >        if (argc == 1) {
67                  if (dim) {
68                          getdim(stdin);
69                  } else {
70                          getheader(stdin, fputs, stdout);
71                          putchar('\n');
72                  }
73 +        }
74          exit(0);
75   }
76  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines