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

Comparing ray/src/px/oki20c.c (file contents):
Revision 2.4 by greg, Wed Jan 29 16:51:40 1992 UTC vs.
Revision 2.7 by greg, Fri Jul 3 08:59:26 1992 UTC

# Line 49 | Line 49 | char  *argv[];
49                  dofilter++;
50                  argv++; argc--;
51          }
52 + #ifdef _IOLBF
53 +        stdout->_flag &= ~_IOLBF;
54 + #endif
55          if (argc < 2)
56                  status = printp(NULL) == -1;
57          else
# Line 68 | Line 71 | char  *fname;
71          int  i;
72  
73          if (dofilter) {
74 <                if (fname == NULL)
75 <                        fname = "";
76 <                sprintf(buf, FILTER, fname);
74 >                if (fname == NULL) {
75 >                        sprintf(buf, FILTER, "");
76 >                        fname = "<stdin>";
77 >                } else
78 >                        sprintf(buf, FILTER, fname);
79                  if ((input = popen(buf, "r")) == NULL) {
80                          fprintf(stderr, "Cannot execute: %s\n", buf);
81                          return(-1);
82                  }
78                fname = buf;
83          } else if (fname == NULL) {
84                  input = stdin;
85                  fname = "<stdin>";
# Line 93 | Line 97 | char  *fname;
97                  fprintf(stderr, "%s: bad picture size\n", fname);
98                  return(-1);
99          }
100 <        if (xres > NCOLS || yres > NROWS) {
100 >        if (xres > NCOLS) {
101                  fprintf(stderr, "%s: resolution mismatch\n", fname);
102                  return(-1);
103          }
# Line 101 | Line 105 | char  *fname;
105          fputs("\0333\042", stdout);
106                                  /* clear line buffer */
107          clearlbuf();
104 #ifdef _IOLBF
105        stdout->_flag &= ~_IOLBF;
106 #endif
108                                  /* put out scanlines */
109          for (i = yres-1; i >= 0; i--) {
110                  if (freadcolrs(scanline, xres, input) < 0) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines