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.2 by greg, Thu Jun 28 16:39:32 1990 UTC vs.
Revision 2.2 by greg, Mon Sep 21 12:13:25 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 + #endif
18  
19 + extern int  fputs();
20 +
21 +
22   tabstr(s)                               /* put out line followed by tab */
23   register char  *s;
24   {
# Line 37 | Line 43 | char  *argv[];
43                  argc--; argv++;
44                  dim = 1;
45          } else if (argc == 2 && !strcmp(argv[1], "-")) {
46 + #ifdef MSDOS
47 +                setmode(fileno(stdin), O_BINARY);
48 +                setmode(fileno(stdout), O_BINARY);
49 + #endif
50                  getheader(stdin, NULL);
51                  copycat();
52                  exit(0);
# Line 51 | Line 61 | char  *argv[];
61                                  getdim(fp);
62                          } else {
63                                  tabstr(":\n");
64 <                                getheader(fp, tabstr);
64 >                                getheader(fp, tabstr, NULL);
65                                  putchar('\n');
66                          }
67                          fclose(fp);
# Line 61 | Line 71 | char  *argv[];
71                  if (dim) {
72                          getdim(stdin);
73                  } else {
74 <                        copyheader(stdin, stdout);
74 >                        getheader(stdin, fputs, stdout);
75                          putchar('\n');
76                  }
77          exit(0);
# Line 106 | Line 116 | register FILE  *fp;
116   copycat()                       /* copy input to output */
117   {
118          register int    c;
119 <
119 >        
120          while ((c = getchar()) != EOF)
121                  putchar(c);
122   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines