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.5 by greg, Fri Oct 11 10:46:57 1996 UTC vs.
Revision 3.6 by greg, Tue Jan 7 14:48:50 1997 UTC

# Line 26 | Line 26 | char   *progname;                      /* global argv[0] */
26  
27   char    *infn;                          /* input file name */
28   FILE    *infp;                          /* input stream */
29 + FILE    *mapfp = NULL;                  /* tone-mapping function stream */
30   VIEW    ourview = STDVIEW;              /* picture view */
31   int     gotview = 0;                    /* picture has view */
32   double  pixaspect = 1.0;                /* pixel aspect ratio */
# Line 113 | Line 114 | char   *argv[];
114                          if (i+1 >= argc) goto userr;
115                          ldmin = atof(argv[++i]);
116                          break;
117 +                case 'm':
118 +                        if (i+1 >= argc) goto userr;
119 +                        if ((mapfp = fopen(argv[++i], "w")) == NULL) {
120 +                                fprintf(stderr,
121 +                                        "%s: cannot open for writing\n",
122 +                                                argv[i]);
123 +                                exit(1);
124 +                        }
125 +                        break;
126                  default:
127                          goto userr;
128                  }
# Line 147 | Line 157 | char   *argv[];
157          if (outprims != inprims)
158                  fputprims(outprims, stdout);
159          mapimage();                     /* map the picture */
160 +        if (mapfp != NULL)              /* write out basic mapping */
161 +                putmapping(mapfp);
162          exit(0);
163   userr:
164 <        fprintf(stderr, "Usage: %s [-{h|a|v|s|c|l|w}[+-]][-e ev][-p xr yr xg yg xb yb xw yw|-f mbf.cal][-t Ldmax][-b Ldmin] inpic [outpic]\n",
164 >        fprintf(stderr, "Usage: %s [-{h|a|v|s|c|l|w}[+-]][-e ev][-p xr yr xg yg xb yb xw yw|-f mbf.cal][-t Ldmax][-b Ldmin][-m mapfile] inpic [outpic]\n",
165                          progname);
166          exit(1);
167   #undef bool

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines