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.2 by greg, Mon Sep 21 12:13:25 1992 UTC vs.
Revision 2.3 by greg, Thu Nov 12 10:06:11 1992 UTC

# Line 14 | Line 14 | static char SCCSid[] = "$SunId$ LBL";
14  
15   #ifdef MSDOS
16   #include <fcntl.h>
17 + extern int  _fmode;
18   #endif
19  
20   extern int  fputs();
# Line 33 | 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 42 | 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   #ifdef MSDOS
51                  setmode(fileno(stdin), O_BINARY);
52                  setmode(fileno(stdout), O_BINARY);
53   #endif
54 <                getheader(stdin, NULL);
54 >                getheader(stdin, NULL, NULL);
55                  copycat();
56                  exit(0);
57          }
# Line 84 | 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 */
# Line 116 | Line 120 | register FILE  *fp;
120   copycat()                       /* copy input to output */
121   {
122          register int    c;
123 <        
123 >
124          while ((c = getchar()) != EOF)
125                  putchar(c);
126   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines