82 |
|
|
83 |
|
progname = argv[0]; |
84 |
|
for (i = 1; i < argc; i++) { |
85 |
+ |
/* expand arguments */ |
86 |
+ |
while (rval = expandarg(&argc, &argv, i)) |
87 |
+ |
if (rval < 0) { |
88 |
+ |
fprintf(stderr, "%s: cannot expand '%s'", |
89 |
+ |
argv[0], argv[i]); |
90 |
+ |
exit(1); |
91 |
+ |
} |
92 |
|
if (argv[i][0] == '-') |
93 |
|
switch (argv[i][1]) { |
94 |
|
case 'v': |
248 |
|
nextpiece(xp, yp) /* get next piece assignment */ |
249 |
|
int *xp, *yp; |
250 |
|
{ |
244 |
– |
extern char *fgets(); |
251 |
|
struct flock fls; |
252 |
|
char buf[64]; |
253 |
|
|
342 |
|
putc('\n', torp); |
343 |
|
fflush(torp); /* assigns piece to rpict */ |
344 |
|
putpiece(xorg, yorg); /* place piece in output */ |
339 |
– |
if (verbose) { /* notify caller */ |
340 |
– |
printf("%d %d done\n", xorg, yorg); |
341 |
– |
fflush(stdout); |
342 |
– |
} |
345 |
|
} |
346 |
|
} |
347 |
|
|
419 |
|
1) == -1) |
420 |
|
goto seekerr; |
421 |
|
} |
422 |
< |
if (pid == -1) { /* fork failed */ |
422 |
> |
if (verbose) { /* notify caller */ |
423 |
> |
printf("%d %d done\n", xpos, ypos); |
424 |
> |
fflush(stdout); |
425 |
> |
} |
426 |
> |
if (pid == -1) { /* didn't fork or fork failed */ |
427 |
|
#if NFS |
428 |
|
fls.l_type = F_UNLCK; /* release lock */ |
429 |
|
fcntl(outfd, F_SETLKW, &fls); |