83 |
|
*/ |
84 |
|
|
85 |
|
void |
86 |
< |
mergesort( /* merge sorted files with list */ |
86 |
> |
pmergesort( /* merge sorted files with list */ |
87 |
|
|
88 |
|
FILE *fi[], /* array of input files */ |
89 |
|
int nf, /* number of input files */ |
105 |
|
|
106 |
|
for (i = 0; i < nf; i++) { /* initialize input files */ |
107 |
|
if ((pp[i] = palloc()) == NULL) |
108 |
< |
error(SYSTEM, "memory exhausted in mergesort"); |
108 |
> |
error(SYSTEM, "memory exhausted in pmergesort"); |
109 |
|
readp(pp[i], fi[i]); |
110 |
|
} |
111 |
|
|
167 |
|
if ((fp = ofp) == NULL) |
168 |
|
fp = efopen(tfname(height + 1, nt), "w"); |
169 |
|
|
170 |
< |
mergesort(fi, nf, pl, pcmp, fp); |
170 |
> |
pmergesort(fi, nf, pl, pcmp, fp); |
171 |
|
|
172 |
|
for (i = 0; i < nf; i++) { |
173 |
|
fclose(fi[i]); |