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.4 by greg, Tue Jul 11 18:05:05 1989 UTC vs.
Revision 1.7 by greg, Fri Jul 20 14:38:06 1990 UTC

# Line 18 | Line 18 | static char SCCSid[] = "$SunId$ LBL";
18  
19   #include "calcomp.h"
20  
21 < #define MAXINP          16              /* maximum number of input files */
21 > #define MAXINP          32              /* maximum number of input files */
22  
23   struct {
24          char    *name;          /* file name */
# Line 82 | Line 82 | char   *argv[];
82                                  fcompile(argv[++a]);
83                                  break;
84                          case 'e':
85 <                                scompile(NULL, argv[++a]);
85 >                                scompile(argv[++a], NULL, 0);
86                                  break;
87                          default:
88                                  goto usage;
# Line 121 | Line 121 | getfiles:
121                          input[nfiles].name = argv[a];
122                          input[nfiles].fp = fopen(argv[a], "r");
123                          if (input[nfiles].fp == NULL) {
124 <                                eputs(argv[a]);
125 <                                eputs(": cannot open\n");
124 >                                perror(argv[a]);
125                                  quit(1);
126                          }
127                  }
128                  fputs(input[nfiles].name, stdout);
129                  fputs(":\n", stdout);
130                  getheader(input[nfiles].fp, tputs);
131 <                if (fscanf(input[nfiles].fp, "-Y %d +X %d\n", &ypos, &xpos) != 2) {
131 >                if (fgetresolu(&xpos, &ypos, input[nfiles].fp) !=
132 >                                (YMAJOR|YDECR)) {
133                          eputs(input[nfiles].name);
134                          eputs(": bad picture size\n");
135                          quit(1);
# Line 147 | Line 147 | getfiles:
147          }
148          printargs(argc, argv, stdout);
149          putchar('\n');
150 <        printf("-Y %d +X %d\n", yres, xres);
150 >        fputresolu(YMAJOR|YDECR, xres, yres, stdout);
151          combine();
152          quit(0);
153   usage:
# Line 200 | Line 200 | combine()                      /* combine pictures */
200                          }
201                  }
202                  if (fwritescan(scanout, xres, stdout) < 0) {
203 <                        eputs("write error\n");
203 >                        perror("write error");
204                          quit(1);
205                  }
206          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines