version 1.10, 1997/08/25 05:31:10 |
version 1.11, 1998/11/16 06:09:12 |
|
|
/* $Id$ |
/* $Id$ */ |
|
|
/*- |
/*- |
* Copyright (c) 1991, 1993, 1994 |
* Copyright (c) 1991, 1993, 1994 |
|
|
int cnt; |
int cnt; |
|
|
/* Output a pair of lines according to the join list (if any). */ |
/* Output a pair of lines according to the join list (if any). */ |
if (olist) |
if (olist) { |
for (cnt = 0; cnt < olistcnt; ++cnt) |
for (cnt = 0; cnt < olistcnt; ++cnt) |
if (olist[cnt].filenum == 1) |
if (olist[cnt].filenum == 1) |
outfield(lp1, olist[cnt].fieldno, 0); |
outfield(lp1, olist[cnt].fieldno, 0); |
else /* if (olist[cnt].filenum == 2) */ |
else /* if (olist[cnt].filenum == 2) */ |
outfield(lp2, olist[cnt].fieldno, 0); |
outfield(lp2, olist[cnt].fieldno, 0); |
else { |
} else { |
/* |
/* |
* Output the join field, then the remaining fields from F1 |
* Output the join field, then the remaining fields from F1 |
* and F2. |
* and F2. |
|
|
{ |
{ |
if (needsep++) |
if (needsep++) |
putchar((int)*tabchar); |
putchar((int)*tabchar); |
if (!ferror(stdout)) |
if (!ferror(stdout)) { |
if (lp->fieldcnt < fieldno || out_empty) { |
if (lp->fieldcnt < fieldno || out_empty) { |
if (empty != NULL) |
if (empty != NULL) |
fputs(empty, stdout); |
fputs(empty, stdout); |
|
|
return; |
return; |
fputs(lp->fields[fieldno], stdout); |
fputs(lp->fields[fieldno], stdout); |
} |
} |
|
} |
if (ferror(stdout)) |
if (ferror(stdout)) |
err(1, "stdout"); |
err(1, "stdout"); |
} |
} |