- } else if (feof(streams[1])) {
- while (!feof(streams[0])) {
- if (order > 0)
- writeline(thisline[0], 1);
- fgets(thisline[0], 100, streams[0]);
+ } else if (i) {
+ i = (i & BB_EOF_0 ? 1 : 0);
+ while (!feof(streams[i])) {
+ if ((order < 0 && i) || (order > 0 && !i))
+ writeline(thisline[i], i);
+ fgets(thisline[i], LINE_LEN, streams[i]);