Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/join finish fixing PR#15412
details: https://anonhg.NetBSD.org/src/rev/0699fbdb50a4
branches: trunk
changeset: 534397:0699fbdb50a4
user: jonb <jonb%NetBSD.org@localhost>
date: Wed Jul 24 17:03:00 2002 +0000
description:
finish fixing PR#15412
diffstat:
usr.bin/join/join.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r a88c1bd31d0f -r 0699fbdb50a4 usr.bin/join/join.c
--- a/usr.bin/join/join.c Wed Jul 24 14:14:10 2002 +0000
+++ b/usr.bin/join/join.c Wed Jul 24 17:03:00 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: join.c,v 1.20 2002/02/14 03:21:07 jonb Exp $ */
+/* $NetBSD: join.c,v 1.21 2002/07/24 17:03:00 jonb Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@@ -48,7 +48,7 @@
#if 0
static char sccsid[] = "from: @(#)join.c 5.1 (Berkeley) 11/18/91";
#else
-__RCSID("$NetBSD: join.c,v 1.20 2002/02/14 03:21:07 jonb Exp $");
+__RCSID("$NetBSD: join.c,v 1.21 2002/07/24 17:03:00 jonb Exp $");
#endif
#endif /* not lint */
@@ -76,6 +76,8 @@
u_long fieldalloc; /* line field(s) allocated count */
} LINE;
+LINE noline = {"", 0, 0, 0, 0}; /* arg for outfield if no line to output */
+
typedef struct {
FILE *fp; /* file descriptor */
u_long joinf; /* join field (-1, -2, -j) */
@@ -433,6 +435,8 @@
for (cnt = 0; cnt < olistcnt; ++cnt) {
if (olist[cnt].fileno == F->number)
outfield(lp, olist[cnt].fieldno);
+ else
+ outfield(&noline, 1);
}
else
for (cnt = 0; cnt < lp->fieldcnt; ++cnt)
Home |
Main Index |
Thread Index |
Old Index