680 |
|
{ |
681 |
|
int i; |
682 |
|
|
683 |
< |
for (i = nmats; i > n2alloc; i--) { |
683 |
> |
if (n2alloc == nall) |
684 |
> |
return; |
685 |
> |
for (i = nall; i > n2alloc; i--) { |
686 |
|
rmx_reset(&mop[i].imx); |
687 |
|
if (mop[i].rmp != &mop[i].imx) |
688 |
|
rmx_free(mop[i].rmp); |
692 |
|
fputs("Out of memory in resize_inparr()\n", stderr); |
693 |
|
exit(1); |
694 |
|
} |
695 |
< |
if (n2alloc > nmats) |
696 |
< |
memset(mop+nmats, 0, (n2alloc-nmats)*sizeof(ROPMAT)); |
695 |
> |
if (n2alloc > nall) |
696 |
> |
memset(mop+nall, 0, (n2alloc-nall)*sizeof(ROPMAT)); |
697 |
|
nall = n2alloc; |
698 |
|
} |
699 |
|
|
870 |
|
fprintf(stderr, "%s: unsupported output format\n", argv[0]); |
871 |
|
return(1); |
872 |
|
} |
873 |
+ |
doptimize(1); /* optimize definitions */ |
874 |
|
/* process & write rows */ |
875 |
|
return(combine_input(&mop[nmats], stdout) ? 0 : 1); |
876 |
|
stdin_error: |