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

Comparing ray/src/util/vwrays.c (file contents):
Revision 3.15 by greg, Tue Aug 16 02:22:50 2011 UTC vs.
Revision 3.16 by greg, Sat Aug 20 20:57:52 2011 UTC

# Line 31 | Line 31 | int    zfd = -1;
31  
32   int     fromstdin = 0;
33  
34 + int     unbuffered = 0;
35 +
36   char    *progname;
37  
38  
# Line 112 | Line 114 | main(
114                  case 'i':                       /* get pixels from stdin */
115                          fromstdin = 1;
116                          break;
117 +                case 'u':                       /* unbuffered output */
118 +                        unbuffered = 1;
119 +                        break;
120                  default:
121                          goto userr;
122                  }
# Line 151 | Line 156 | main(
156          exit(0);
157   userr:
158          fprintf(stderr,
159 <        "Usage: %s [ -i -f{a|f|d} | -d ] { view opts .. | picture [zbuf] }\n",
159 >        "Usage: %s [ -i -u -f{a|f|d} | -d ] { view opts .. | picture [zbuf] }\n",
160                          progname);
161          exit(1);
162   }
# Line 211 | Line 216 | pix2rays(
216                          rdir[0] *= d; rdir[1] *= d; rdir[2] *= d;
217                  }
218                  (*putr)(rorg, rdir);
219 +                if (unbuffered)
220 +                        fflush(stdout);
221          }
222          if (!feof(fp)) {
223                  fprintf(stderr, "%s: expected px py on input\n", progname);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines