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

Comparing ray/src/px/pcomb.c (file contents):
Revision 1.20 by greg, Thu May 30 10:14:39 1991 UTC vs.
Revision 2.1 by greg, Tue Nov 12 16:04:51 1991 UTC

# Line 16 | Line 16 | static char SCCSid[] = "$SunId$ LBL";
16  
17   #include "color.h"
18  
19 + #include  "resolu.h"
20 +
21   #include "calcomp.h"
22  
23   #define MAXINP          32              /* maximum number of input files */
24   #define WINSIZ          9               /* scanline window size */
25   #define MIDSCN          4               /* current scan position */
26  
25 #define BRT             (-1)            /* special index for brightness */
26
27   struct {
28          char    *name;          /* file or command name */
29          FILE    *fp;            /* stream pointer */
# Line 34 | Line 34 | struct {
34  
35   int     nfiles;                         /* number of input files */
36  
37 < char    *vcolin[3] = {"ri", "gi", "bi"};
38 < char    *vcolout[3] = {"ro", "go", "bo"};
37 > char    vcolin[3][4] = {"ri", "gi", "bi"};
38 > char    vcolout[3][4] = {"ro", "go", "bo"};
39   char    vbrtin[] = "li";
40   char    vbrtout[] = "lo";
41 < char    *vcolexp[3] = {"re", "ge", "be"};
41 > char    vcolexp[3][4] = {"re", "ge", "be"};
42   char    vbrtexp[] = "le";
43  
44   char    vnfiles[] = "nfiles";
# Line 68 | Line 68 | main(argc, argv)
68   int     argc;
69   char    *argv[];
70   {
71        char    buf[128];
71          int     original;
72          double  f;
73          int     a, i;
# Line 111 | Line 110 | char   *argv[];
110                                  break;
111                          case 'o':
112                                  original++;
113 <                                break;
113 >                                continue;
114                          case 's':
115                                  f = atof(argv[++a]);
116                                  scalecolor(input[nfiles].coef, f);
# Line 152 | Line 151 | char   *argv[];
151                  if (argv[a][0] == '-')
152                          switch (argv[a][1]) {
153                          case 'x':
154 <                                strcpy(buf, vxres);
156 <                                strcat(buf, ":");
157 <                                strcat(buf, argv[++a]);
158 <                                scompile(buf, NULL, 0);
154 >                                varset(vxres, ':', eval(argv[++a]));
155                                  continue;
156                          case 'y':
157 <                                strcpy(buf, vyres);
162 <                                strcat(buf, ":");
163 <                                strcat(buf, argv[++a]);
164 <                                scompile(buf, NULL, 0);
157 >                                varset(vyres, ':', eval(argv[++a]));
158                                  continue;
159                          case 'w':
160                                  continue;
# Line 190 | Line 183 | char   *argv[];
183          printargs(argc, argv, stdout);
184          fputformat(COLRFMT, stdout);
185          putchar('\n');
186 <        fputresolu(YMAJOR|YDECR, xres, yres, stdout);
186 >        fprtresolu(xres, yres, stdout);
187                                                  /* combine pictures */
188          combine();
189          quit(0);
# Line 241 | Line 234 | checkfile()                    /* ready a file */
234                  eputs(": not in Radiance picture format\n");
235                  quit(1);
236          }
237 <        if (fgetresolu(&xinp, &yinp, input[nfiles].fp) != (YMAJOR|YDECR)) {
237 >        if (fgetresolu(&xinp, &yinp, input[nfiles].fp) < 0) {
238                  eputs(input[nfiles].name);
239                  eputs(": bad picture size\n");
240                  quit(1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines