--- ray/src/px/pcomb.c 1989/07/11 18:05:05 1.4 +++ ray/src/px/pcomb.c 1989/09/14 09:20:38 1.6 @@ -18,7 +18,7 @@ static char SCCSid[] = "$SunId$ LBL"; #include "calcomp.h" -#define MAXINP 16 /* maximum number of input files */ +#define MAXINP 32 /* maximum number of input files */ struct { char *name; /* file name */ @@ -121,15 +121,15 @@ getfiles: input[nfiles].name = argv[a]; input[nfiles].fp = fopen(argv[a], "r"); if (input[nfiles].fp == NULL) { - eputs(argv[a]); - eputs(": cannot open\n"); + perror(argv[a]); quit(1); } } fputs(input[nfiles].name, stdout); fputs(":\n", stdout); getheader(input[nfiles].fp, tputs); - if (fscanf(input[nfiles].fp, "-Y %d +X %d\n", &ypos, &xpos) != 2) { + if (fgetresolu(&xpos, &ypos, input[nfiles].fp) != + (YMAJOR|YDECR)) { eputs(input[nfiles].name); eputs(": bad picture size\n"); quit(1); @@ -147,7 +147,7 @@ getfiles: } printargs(argc, argv, stdout); putchar('\n'); - printf("-Y %d +X %d\n", yres, xres); + fputresolu(YMAJOR|YDECR, xres, yres, stdout); combine(); quit(0); usage: @@ -200,7 +200,7 @@ combine() /* combine pictures */ } } if (fwritescan(scanout, xres, stdout) < 0) { - eputs("write error\n"); + perror("write error"); quit(1); } }