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

Comparing ray/src/px/pcond.c (file contents):
Revision 3.11 by greg, Wed Mar 19 13:04:09 1997 UTC vs.
Revision 3.13 by gwlarson, Tue Oct 27 09:08:26 1998 UTC

# Line 85 | Line 85 | char   *argv[];
85                          if (fixfrac > FTINY) what2do |= DO_FIXHIST;
86                          else what2do &= ~DO_FIXHIST;
87                          break;
88 +                case 'I':
89 +                        bool(DO_PREHIST);
90 +                        break;
91                  case 'l':
92                          bool(DO_LINEAR);
93                          break;
# Line 137 | Line 140 | char   *argv[];
140                  default:
141                          goto userr;
142                  }
143 +        if ((what2do & (DO_FIXHIST|DO_PREHIST)) == (DO_FIXHIST|DO_PREHIST)) {
144 +                fprintf(stderr, "%s: only one of -i or -I option\n", progname);
145 +                exit(1);
146 +        }
147          if ((mbcalfile != NULL) + (cwarpfile != NULL) +
148                          (outprims != stdprims) > 1) {
149                  fprintf(stderr,
# Line 164 | Line 171 | char   *argv[];
171          printargs(argc, argv, stdout);  /* add to output header */
172          if (mbcalfile == NULL & outprims != stdprims)
173                  fputprims(outprims, stdout);
174 <        getfovimg();                    /* get foveal sample image */
175 <        if (what2do&DO_FIXHIST)         /* get fixation history? */
174 >        if ((what2do & (DO_PREHIST|DO_VEIL|DO_ACUITY)) != DO_PREHIST)
175 >                getfovimg();            /* get foveal sample image? */
176 >        if (what2do&DO_PREHIST)         /* get histogram? */
177 >                gethisto(stdin);
178 >        else if (what2do&DO_FIXHIST)    /* get fixation history? */
179                  getfixations(stdin);
180          mapimage();                     /* map the picture */
181          if (mapfp != NULL)              /* write out basic mapping */
182                  putmapping(mapfp);
183          exit(0);
184   userr:
185 <        fprintf(stderr, "Usage: %s [-{h|a|v|s|c|l|w}[+-]][-i ffrac][-e ev][-p xr yr xg yg xb yb xw yw|-f mbf.cal|-m rgb.cwp][-u Ldmax][-d Lddyn][-x mapfile] inpic [outpic]\n",
185 >        fprintf(stderr, "Usage: %s [-{h|a|v|s|c|l|w}[+-]][-I|-i ffrac][-e ev][-p xr yr xg yg xb yb xw yw|-f mbf.cal|-m rgb.cwp][-u Ldmax][-d Lddyn][-x mapfile] inpic [outpic]\n",
186                          progname);
187          exit(1);
188   #undef bool
# Line 198 | Line 208 | char   *s;
208                  if (!strcmp(fmt,COLRFMT)) lumf = rgblum;
209                  else if (!strcmp(fmt,CIEFMT)) lumf = cielum;
210                  else lumf = NULL;
211 <                return;                 /* don't echo */
211 >                return(0);              /* don't echo */
212          }
213          if (isprims(s)) {               /* get input primaries */
214                  primsval(inprimS, s);
215                  inprims= inprimS;
216 <                return;                 /* don't echo */
216 >                return(0);              /* don't echo */
217          }
218          if (isexpos(s)) {               /* picture exposure */
219                  inpexp *= exposval(s);
220 <                return;                 /* don't echo */
220 >                return(0);              /* don't echo */
221          }
222          if (isaspect(s))                /* pixel aspect ratio */
223                  pixaspect *= aspectval(s);
224          if (isview(s))                  /* image view */
225                  gotview += sscanview(&ourview, s);
226 <        fputs(s, stdout);
226 >        return(fputs(s, stdout));
227   }
228  
229  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines