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

Comparing ray/src/cv/bsdfquery.c (file contents):
Revision 2.9 by greg, Thu Apr 13 00:14:36 2017 UTC vs.
Revision 2.12 by greg, Fri Mar 26 22:01:44 2021 UTC

# Line 11 | Line 11 | static const char RCSid[] = "$Id$";
11   */
12  
13   #define _USE_MATH_DEFINES
14 #include <stdio.h>
15 #include <string.h>
14   #include <stdlib.h>
15   #include "rtmath.h"
16   #include "rtio.h"
# Line 57 | Line 55 | tryagain:
55   int
56   main(int argc, char *argv[])
57   {
58 +        int     unbuffered = 0;
59          int     repXYZ = 0;
60          int     inpXML = -1;
61          int     inpfmt = 'a';
# Line 70 | Line 69 | main(int argc, char *argv[])
69          progname = argv[0];
70          while (argc > 2 && argv[1][0] == '-') {
71                  switch (argv[1][1]) {
72 +                case 'u':                       /* unbuffered output */
73 +                        unbuffered = 1;
74 +                        break;
75                  case 'c':                       /* color output */
76                          repXYZ = 1;
77                          break;
# Line 172 | Line 174 | main(int argc, char *argv[])
174                          }
175                          break;
176                  }
177 +                if (unbuffered)
178 +                        fflush(stdout);
179          }
180          /* if (rbf != NULL) free(rbf); */
181          return(0);
182   userr:
183 <        fprintf(stderr, "Usage: %s [-c][-fio] bsdf.{sir|xml}\n", progname);
183 >        fprintf(stderr, "Usage: %s [-u][-c][-fio] bsdf.{sir|xml}\n", progname);
184          return(1);
185   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines