3 |
|
#endif |
4 |
|
/* |
5 |
|
* General component matrix combiner, operating on a row at a time. |
6 |
+ |
* |
7 |
+ |
* Multi-processing mode under Unix creates children that each work |
8 |
+ |
* on one input row at a time, fed by the original process. Final conversion |
9 |
+ |
* and output to stdout is sorted by last child while its siblings send it |
10 |
+ |
* their record calculations. |
11 |
|
*/ |
12 |
|
|
8 |
– |
#include <errno.h> |
13 |
|
#include <math.h> |
14 |
|
#include "platform.h" |
15 |
+ |
#include "rtprocess.h" |
16 |
|
#include "rtio.h" |
12 |
– |
#include "resolu.h" |
17 |
|
#include "rmatrix.h" |
18 |
|
#include "calcomp.h" |
15 |
– |
#include "paths.h" |
19 |
|
|
20 |
|
#ifndef M_PI |
21 |
|
#define M_PI 3.14159265358979323846 |
58 |
|
int cur_col; /* current input/output column */ |
59 |
|
int cur_chan; /* if we're looping channels */ |
60 |
|
|
61 |
+ |
SUBPROC *cproc = NULL; /* child process array */ |
62 |
+ |
int nchildren = 0; /* # of child processes */ |
63 |
+ |
int inchild = -1; /* our child ID (-1: parent) */ |
64 |
+ |
|
65 |
|
static int checksymbolic(ROPMAT *rop); |
66 |
|
|
67 |
|
static int |
193 |
|
{ |
194 |
|
const int nc = rop->imx.ncomp; |
195 |
|
const int dt = rop->imx.dtype; |
196 |
+ |
double cf = 1; |
197 |
|
int i, j; |
198 |
|
/* check suffix => reference file */ |
199 |
|
if (strchr(rop->preop.csym, '.') > rop->preop.csym) |
214 |
|
int comp = 0; |
215 |
|
switch (rop->preop.csym[j]) { |
216 |
|
case 'B': |
217 |
+ |
case 'b': |
218 |
|
++comp; |
219 |
|
/* fall through */ |
220 |
|
case 'G': |
221 |
+ |
case 'g': |
222 |
|
++comp; |
223 |
|
/* fall through */ |
224 |
|
case 'R': |
225 |
+ |
case 'r': |
226 |
+ |
if (rop->preop.csym[j] <= 'Z') |
227 |
+ |
cf = 1./WHTEFFICACY; |
228 |
|
if (dt == DTxyze) { |
229 |
|
for (i = 3; i--; ) |
230 |
< |
rop->preop.cmat[j*nc+i] = 1./WHTEFFICACY * |
218 |
< |
xyz2rgbmat[comp][i]; |
230 |
> |
rop->preop.cmat[j*nc+i] = cf*xyz2rgbmat[comp][i]; |
231 |
|
} else if (nc == 3) |
232 |
|
rop->preop.cmat[j*nc+comp] = 1.; |
233 |
|
else |
234 |
|
rgbrow(rop, j, comp); |
235 |
|
break; |
236 |
|
case 'Z': |
237 |
+ |
case 'z': |
238 |
|
++comp; |
239 |
|
/* fall through */ |
240 |
|
case 'Y': |
241 |
+ |
case 'y': |
242 |
|
++comp; |
243 |
|
/* fall through */ |
244 |
|
case 'X': |
245 |
+ |
case 'x': |
246 |
+ |
if ((rop->preop.csym[j] <= 'Z') & (dt != DTxyze)) |
247 |
+ |
cf = WHTEFFICACY; |
248 |
|
if (dt == DTxyze) { |
249 |
|
rop->preop.cmat[j*nc+comp] = 1.; |
250 |
|
} else if (nc == 3) { |
256 |
|
else |
257 |
|
xyzrow(rop, j, comp); |
258 |
|
|
259 |
< |
for (i = nc*(dt != DTxyze); i--; ) |
260 |
< |
rop->preop.cmat[j*nc+i] *= WHTEFFICACY; |
259 |
> |
for (i = nc*(cf != 1); i--; ) |
260 |
> |
rop->preop.cmat[j*nc+i] *= cf; |
261 |
|
break; |
262 |
|
case 'S': /* scotopic (il)luminance */ |
263 |
+ |
cf = WHTSCOTOPIC; |
264 |
+ |
/* fall through */ |
265 |
+ |
case 's': |
266 |
|
sensrow(rop, j, scolor2scotopic); |
267 |
< |
for (i = nc; i--; ) |
268 |
< |
rop->preop.cmat[j*nc+i] *= WHTSCOTOPIC; |
267 |
> |
for (i = nc*(cf != 1); i--; ) |
268 |
> |
rop->preop.cmat[j*nc+i] *= cf; |
269 |
|
break; |
270 |
|
case 'M': /* melanopic (il)luminance */ |
271 |
+ |
cf = WHTMELANOPIC; |
272 |
+ |
/* fall through */ |
273 |
+ |
case 'm': |
274 |
|
sensrow(rop, j, scolor2melanopic); |
275 |
< |
for (i = nc; i--; ) |
276 |
< |
rop->preop.cmat[j*nc+i] *= WHTMELANOPIC; |
275 |
> |
for (i = nc*(cf != 1); i--; ) |
276 |
> |
rop->preop.cmat[j*nc+i] *= cf; |
277 |
|
break; |
278 |
|
case 'A': /* average component */ |
279 |
+ |
case 'a': |
280 |
|
for (i = nc; i--; ) |
281 |
|
rop->preop.cmat[j*nc+i] = 1./(double)nc; |
282 |
|
break; |
291 |
|
memcpy(rop->rmp->wlpart, WLPART, sizeof(rop->rmp->wlpart)); |
292 |
|
rop->rmp->ncomp = rop->preop.clen / nc; |
293 |
|
/* decide on output type */ |
294 |
< |
if (!strcmp(rop->preop.csym, "XYZ")) { |
294 |
> |
if (!strcasecmp(rop->preop.csym, "XYZ")) { |
295 |
|
if (dt <= DTspec) |
296 |
|
rop->rmp->dtype = DTxyze; |
297 |
< |
} else if (!strcmp(rop->preop.csym, "RGB")) { |
297 |
> |
} else if (!strcasecmp(rop->preop.csym, "RGB")) { |
298 |
|
if (dt <= DTspec) |
299 |
|
rop->rmp->dtype = DTrgbe; |
300 |
|
} else if (rop->rmp->dtype == DTspec) |
398 |
|
return(0); |
399 |
|
rmx_free(res); |
400 |
|
} else if (dst != src) |
401 |
< |
memcpy(dst->mtx, src->mtx, |
378 |
< |
sizeof(double)*dst->ncomp*dst->ncols*dst->nrows); |
401 |
> |
memcpy(dst->mtx, src->mtx, rmx_array_size(dst)); |
402 |
|
if (ro->nsf == dst->ncomp) |
403 |
|
rmx_scale(dst, ro->sca); |
404 |
|
return(1); |
546 |
|
} |
547 |
|
|
548 |
|
static int |
549 |
< |
combine_input(ROPMAT *res, FILE *fout) |
549 |
> |
output_loop(void) |
550 |
|
{ |
551 |
< |
int set_r, set_c; |
552 |
< |
RMATRIX *tmp = NULL; |
553 |
< |
int co_set; |
554 |
< |
int i; |
555 |
< |
/* allocate input row buffers */ |
551 |
> |
const size_t row_size = rmx_array_size(mop[nmats].rmp); |
552 |
> |
int i = nmats; |
553 |
> |
int cur_child = 0; |
554 |
> |
|
555 |
> |
if (mop[nmats].rmp != &mop[nmats].imx) /* output is split? */ |
556 |
> |
rmx_reset(&mop[nmats].imx); |
557 |
> |
while (i-- > 0) { /* close input matrices */ |
558 |
> |
fclose(mop[i].infp); /* ! pclose() */ |
559 |
> |
mop[i].infp = NULL; |
560 |
> |
rmx_reset(&mop[i].imx); |
561 |
> |
if (mop[i].rmp != &mop[i].imx) { |
562 |
> |
rmx_free(mop[i].rmp); |
563 |
> |
mop[i].rmp = &mop[i].imx; |
564 |
> |
} |
565 |
> |
} |
566 |
> |
#ifdef getc_unlocked |
567 |
> |
flockfile(stdout); /* we own this, now */ |
568 |
> |
#endif |
569 |
> |
for ( ; ; ) { /* loop until no more */ |
570 |
> |
ssize_t rv; |
571 |
> |
rv = readbuf(cproc[cur_child].r, mop[nmats].rmp->mtx, row_size); |
572 |
> |
if (!rv) /* out of rows? */ |
573 |
> |
break; |
574 |
> |
if (rv != row_size) { |
575 |
> |
fputs("Read error in output loop\n", stderr); |
576 |
> |
return(0); |
577 |
> |
} /* do final conversion */ |
578 |
> |
if (!rmx_write_data(mop[nmats].rmp->mtx, mop[nmats].rmp->ncomp, |
579 |
> |
mop[nmats].rmp->ncols, mop[nmats].rmp->dtype, stdout)) { |
580 |
> |
fputs("Conversion/write error in output loop\n", stderr); |
581 |
> |
return(0); |
582 |
> |
} |
583 |
> |
cur_child++; |
584 |
> |
cur_child *= (cur_child < inchild); |
585 |
> |
} |
586 |
> |
return(fflush(stdout) != EOF); |
587 |
> |
} |
588 |
> |
|
589 |
> |
static int |
590 |
> |
spawned_children(int np) |
591 |
> |
{ |
592 |
> |
int i, rv; |
593 |
> |
|
594 |
> |
#if defined(_WIN32) || defined(_WIN64) |
595 |
> |
if (np > 1) { |
596 |
> |
fputs("Warning: only one process under Windows\n", stderr); |
597 |
> |
np = 1; |
598 |
> |
} else |
599 |
> |
#endif |
600 |
> |
if ((in_nrows > 0) & (np*4 > in_nrows)) |
601 |
> |
np = in_nrows/4; |
602 |
> |
/* we'll be doing a row at a time */ |
603 |
|
for (i = 0; i < nmats; i++) { |
604 |
< |
mop[i].imx.nrows = 1; /* we'll be doing a row at a time */ |
604 |
> |
mop[i].imx.nrows = 1; |
605 |
|
if (!rmx_prepare(&mop[i].imx)) |
606 |
|
goto memerror; |
607 |
|
if (mop[i].rmp != &mop[i].imx) { |
610 |
|
goto memerror; |
611 |
|
} |
612 |
|
} |
613 |
< |
/* prep output row buffers */ |
614 |
< |
if (mcat || res->preop.clen > 0) { |
615 |
< |
if (!split_input(res)) /* need separate buffer */ |
613 |
> |
/* prep output row buffer(s) */ |
614 |
> |
if (mcat || mop[nmats].preop.clen > 0) { |
615 |
> |
if (!split_input(&mop[nmats])) /* need separate buffer */ |
616 |
|
return(0); |
617 |
< |
if (res->preop.clen > 0) |
618 |
< |
res->rmp->ncomp = res->preop.clen / res->imx.ncomp; |
619 |
< |
res->rmp->nrows = 1; |
620 |
< |
if (!mcat | !mcat_last && !rmx_prepare(res->rmp)) |
617 |
> |
if (mop[nmats].preop.clen > 0) |
618 |
> |
mop[nmats].rmp->ncomp = mop[nmats].preop.clen / |
619 |
> |
mop[nmats].imx.ncomp; |
620 |
> |
} |
621 |
> |
mop[nmats].imx.nrows = 1; |
622 |
> |
if (!rmx_prepare(&mop[nmats].imx)) |
623 |
> |
goto memerror; |
624 |
> |
if (mop[nmats].rmp != &mop[nmats].imx) { |
625 |
> |
mop[nmats].rmp->nrows = 1; |
626 |
> |
if (!rmx_prepare(mop[nmats].rmp)) |
627 |
|
goto memerror; |
628 |
|
} |
629 |
+ |
if (np <= 1) { /* single process return */ |
630 |
+ |
#ifdef getc_unlocked |
631 |
+ |
for (i = 0; i < nmats; i++) |
632 |
+ |
flockfile(mop[i].infp); |
633 |
+ |
flockfile(stdout); |
634 |
+ |
#endif |
635 |
+ |
return(0); |
636 |
+ |
} |
637 |
+ |
fflush(stdout); /* flush header & spawn children */ |
638 |
+ |
nchildren = np + 1; /* extra child to sequence output */ |
639 |
+ |
cproc = (SUBPROC *)malloc(sizeof(SUBPROC)*nchildren); |
640 |
+ |
if (!cproc) |
641 |
+ |
goto memerror; |
642 |
+ |
for (i = nchildren; i--; ) cproc[i] = sp_inactive; |
643 |
+ |
cproc[nchildren-1].flags |= PF_FILT_OUT; |
644 |
+ |
/* start each child */ |
645 |
+ |
for (i = 0; i < nchildren; i++) { |
646 |
+ |
rv = open_process(&cproc[i], NULL); |
647 |
+ |
if (rv <= 0) break; |
648 |
+ |
} |
649 |
+ |
if (rv < 0) { |
650 |
+ |
perror("fork"); |
651 |
+ |
close_processes(cproc, i); |
652 |
+ |
exit(1); |
653 |
+ |
} |
654 |
+ |
if (rv) { /* are we the parent? */ |
655 |
+ |
i = nchildren-1; /* last child is sole reader */ |
656 |
+ |
while (i-- > 0) { |
657 |
+ |
close(cproc[i].r); |
658 |
+ |
cproc[i].r = -1; |
659 |
+ |
} |
660 |
+ |
return(1); /* parent return value */ |
661 |
+ |
} |
662 |
+ |
inchild = i; /* our child index */ |
663 |
+ |
while (i-- > 0) /* only parent writes siblings */ |
664 |
+ |
close(cproc[i].w); |
665 |
+ |
|
666 |
+ |
if (inchild == nchildren-1) /* last child sequences output */ |
667 |
+ |
exit(output_loop() ? 0 : 1); |
668 |
+ |
|
669 |
+ |
i = inchild; /* won't read from siblings */ |
670 |
+ |
while (i-- > 0) |
671 |
+ |
close(cproc[i].r); |
672 |
+ |
i = nmats; /* redirect input matrix streams */ |
673 |
+ |
while (i-- > 0) { |
674 |
+ |
if (mop[i].infp != stdin) |
675 |
+ |
fclose(mop[i].infp); /* ! pclose() */ |
676 |
+ |
mop[i].infp = stdin; |
677 |
+ |
mop[i].imx.dtype = DTrmx_native; |
678 |
+ |
mop[i].imx.pflags &= ~RMF_SWAPIN; |
679 |
+ |
} |
680 |
+ |
fpurge(stdin); /* discard any previous matrix input */ |
681 |
+ |
#ifdef getc_unlocked |
682 |
+ |
flockfile(stdin); |
683 |
+ |
#endif |
684 |
+ |
mop[nmats].rmp->dtype = DTrmx_native; |
685 |
+ |
return(0); /* worker child return value */ |
686 |
+ |
memerror: |
687 |
+ |
fputs("Out of memory in spawned_children()\n", stderr); |
688 |
+ |
exit(1); |
689 |
+ |
} |
690 |
+ |
|
691 |
+ |
static int |
692 |
+ |
parent_loop(void) |
693 |
+ |
{ |
694 |
+ |
int i; |
695 |
+ |
|
696 |
+ |
rmx_reset(&mop[nmats].imx); /* not touching output side */ |
697 |
+ |
if (mop[nmats].rmp != &mop[nmats].imx) { |
698 |
+ |
rmx_free(mop[nmats].rmp); |
699 |
+ |
mop[nmats].rmp = &mop[nmats].imx; |
700 |
+ |
} |
701 |
+ |
#ifdef getc_unlocked |
702 |
+ |
for (i = 0; i < nmats; i++) /* we handle matrix inputs */ |
703 |
+ |
flockfile(mop[i].infp); |
704 |
+ |
#endif |
705 |
+ |
/* load & send rows to kids */ |
706 |
+ |
for (cur_row = 0; (in_nrows <= 0) | (cur_row < in_nrows); cur_row++) { |
707 |
+ |
int wfd = cproc[cur_row % (nchildren-1)].w; |
708 |
+ |
for (i = 0; i < nmats; i++) |
709 |
+ |
if (!rmx_load_row(mop[i].imx.mtx, &mop[i].imx, mop[i].infp)) { |
710 |
+ |
if (cur_row > in_nrows) /* unknown #input rows? */ |
711 |
+ |
break; |
712 |
+ |
fprintf(stderr, "%s: parent read error at row %d\n", |
713 |
+ |
mop[i].inspec, cur_row); |
714 |
+ |
return(0); |
715 |
+ |
} |
716 |
+ |
if (i < nmats) |
717 |
+ |
break; |
718 |
+ |
for (i = 0; i < nmats; i++) |
719 |
+ |
if (writebuf(wfd, mop[i].imx.mtx, rmx_array_size(&mop[i].imx)) |
720 |
+ |
!= rmx_array_size(&mop[i].imx)) |
721 |
+ |
return(0); |
722 |
+ |
} |
723 |
+ |
i = close_processes(cproc, nchildren); |
724 |
+ |
free(cproc); cproc = NULL; nchildren = 0; |
725 |
+ |
if (i < 0) { |
726 |
+ |
fputs("Warning: lost child in parent_loop()\n", stderr); |
727 |
+ |
return(1); |
728 |
+ |
} |
729 |
+ |
if (i > 0) { |
730 |
+ |
fprintf(stderr, "Child exited with status %d\n", i); |
731 |
+ |
return(0); |
732 |
+ |
} |
733 |
+ |
return(1); /* return success! */ |
734 |
+ |
memerror: |
735 |
+ |
fputs("Out of memory in parent_loop()\n", stderr); |
736 |
+ |
exit(1); |
737 |
+ |
} |
738 |
+ |
|
739 |
+ |
static int |
740 |
+ |
combine_input(void) |
741 |
+ |
{ |
742 |
+ |
const int row0 = (inchild >= 0)*inchild; |
743 |
+ |
const int rstep = nchildren ? nchildren-1 : 1; |
744 |
+ |
ROPMAT *res = &mop[nmats]; |
745 |
+ |
int set_r, set_c; |
746 |
+ |
RMATRIX *tmp = NULL; |
747 |
+ |
int co_set; |
748 |
+ |
int i; |
749 |
+ |
|
750 |
|
if (mcat && mcat_last && |
751 |
|
!(tmp = rmx_alloc(1, res->imx.ncols, res->rmp->ncomp))) |
752 |
|
goto memerror; |
556 |
– |
res->imx.nrows = 1; |
557 |
– |
if (!rmx_prepare(&res->imx)) |
558 |
– |
goto memerror; |
753 |
|
/* figure out what the user set */ |
754 |
|
co_set = fundefined("co"); |
755 |
|
if (!co_set) |
765 |
|
} else /* save a little time */ |
766 |
|
set_r = set_c = 0; |
767 |
|
/* read/process row-by-row */ |
768 |
< |
for (cur_row = 0; (in_nrows <= 0) | (cur_row < in_nrows); cur_row++) { |
768 |
> |
for (cur_row = row0; (in_nrows <= 0) | (cur_row < in_nrows); cur_row += rstep) { |
769 |
|
RMATRIX *mres = NULL; |
770 |
< |
for (i = 0; i < nmats; i++) { |
770 |
> |
for (i = 0; i < nmats; i++) |
771 |
|
if (!rmx_load_row(mop[i].imx.mtx, &mop[i].imx, mop[i].infp)) { |
772 |
< |
if (in_nrows <= 0) /* normal end? */ |
773 |
< |
goto loop_exit; |
772 |
> |
if (cur_row > in_nrows) /* unknown #input rows? */ |
773 |
> |
break; |
774 |
|
fprintf(stderr, "%s: read error at row %d\n", |
775 |
|
mop[i].inspec, cur_row); |
776 |
|
return(0); |
777 |
|
} |
778 |
+ |
if (i < nmats) |
779 |
+ |
break; |
780 |
+ |
for (i = 0; i < nmats; i++) |
781 |
|
if (!apply_op(mop[i].rmp, &mop[i].imx, &mop[i].preop)) |
782 |
|
return(0); |
586 |
– |
} |
783 |
|
if (set_r) varset("r", '=', cur_row); |
784 |
|
for (cur_col = 0; cur_col < in_ncols; cur_col++) { |
785 |
|
if (set_c) varset("c", '=', cur_col); |
817 |
|
} |
818 |
|
rmx_free(mres); mres = NULL; |
819 |
|
if (!rmx_write_data(res->rmp->mtx, res->rmp->ncomp, |
820 |
< |
res->rmp->ncols, res->rmp->dtype, fout)) |
820 |
> |
res->rmp->ncols, res->rmp->dtype, stdout)) |
821 |
|
return(0); |
822 |
+ |
if (inchild >= 0 && fflush(stdout) == EOF) |
823 |
+ |
return(0); |
824 |
|
} |
825 |
< |
loop_exit: |
628 |
< |
#if 0 /* we're about to exit, so who cares? */ |
629 |
< |
rmx_free(tmp); /* clean up */ |
630 |
< |
rmx_reset(res->rmp); |
631 |
< |
rmx_reset(&res->imx); |
632 |
< |
for (i = 0; i < nmats; i++) { |
633 |
< |
rmx_reset(mop[i].rmp); |
634 |
< |
rmx_reset(&mop[i].imx); |
635 |
< |
if (mop[i].inspec[0] == '!') |
636 |
< |
pclose(mop[i].infp); |
637 |
< |
else if (mop[i].inspec != stdin_name) |
638 |
< |
fclose(mop[i].infp); |
639 |
< |
mop[i].infp = NULL; |
640 |
< |
} |
641 |
< |
#endif |
642 |
< |
return(fflush(fout) != EOF); |
825 |
> |
return(inchild >= 0 || fflush(stdout) != EOF); |
826 |
|
memerror: |
827 |
|
fputs("Out of buffer space in combine_input()\n", stderr); |
828 |
|
return(0); |
846 |
|
{ |
847 |
|
int i; |
848 |
|
|
849 |
< |
for (i = nmats; i > n2alloc; i--) { |
849 |
> |
if (n2alloc == nall) |
850 |
> |
return; |
851 |
> |
for (i = nall; i > n2alloc; i--) { |
852 |
|
rmx_reset(&mop[i].imx); |
853 |
|
if (mop[i].rmp != &mop[i].imx) |
854 |
|
rmx_free(mop[i].rmp); |
858 |
|
fputs("Out of memory in resize_inparr()\n", stderr); |
859 |
|
exit(1); |
860 |
|
} |
861 |
< |
if (n2alloc > nmats) |
862 |
< |
memset(mop+nmats, 0, (n2alloc-nmats)*sizeof(ROPMAT)); |
861 |
> |
if (n2alloc > nall) |
862 |
> |
memset(mop+nall, 0, (n2alloc-nall)*sizeof(ROPMAT)); |
863 |
|
nall = n2alloc; |
864 |
|
} |
865 |
|
|
872 |
|
const char *defCsym = NULL; |
873 |
|
int echoheader = 1; |
874 |
|
int stdin_used = 0; |
875 |
+ |
int nproc = 1; |
876 |
|
const char *mcat_spec = NULL; |
877 |
|
int n2comp = 0; |
878 |
|
uby8 comp_ndx[128]; |
900 |
|
case 'h': |
901 |
|
echoheader = !echoheader; |
902 |
|
break; |
903 |
+ |
case 'n': |
904 |
+ |
nproc = atoi(argv[++i]); |
905 |
+ |
if (nproc <= 0) |
906 |
+ |
goto userr; |
907 |
+ |
break; |
908 |
|
case 'e': |
909 |
|
if (!n) goto userr; |
910 |
|
comp_ndx[n2comp++] = i++; |
953 |
|
if (n && !isflt(argv[i+1])) { |
954 |
|
mop[nmats].preop.csym = argv[++i]; |
955 |
|
mop[nmats].preop.clen = 0; |
956 |
+ |
mcat_last = 0; |
957 |
|
break; |
958 |
|
} |
959 |
|
if (n > MAXCOMP*MAXCOMP) n = MAXCOMP*MAXCOMP; |
1043 |
|
fprintf(stderr, "%s: unsupported output format\n", argv[0]); |
1044 |
|
return(1); |
1045 |
|
} |
1046 |
+ |
doptimize(1); /* optimize definitions */ |
1047 |
+ |
if (spawned_children(nproc)) /* running in parent process? */ |
1048 |
+ |
return(parent_loop() ? 0 : 1); |
1049 |
|
/* process & write rows */ |
1050 |
< |
return(combine_input(&mop[nmats], stdout) ? 0 : 1); |
1050 |
> |
return(combine_input() ? 0 : 1); |
1051 |
|
stdin_error: |
1052 |
|
fprintf(stderr, "%s: %s used for more than one input\n", |
1053 |
|
argv[0], stdin_name); |
1054 |
|
return(1); |
1055 |
|
userr: |
1056 |
|
fprintf(stderr, |
1057 |
< |
"Usage: %s [-h][-f{adfc}][-e expr][-f file][-s sf .. | -c ce ..] m1 .. -m mcat > mres\n", |
1057 |
> |
"Usage: %s [-h][-f{adfc}][-n nproc][-e expr][-f file][-s sf .. | -c ce ..] m1 .. -m mcat > mres\n", |
1058 |
|
argv[0]); |
1059 |
|
return(1); |
1060 |
|
} |