Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/usr.bin/join Pull up revision 1.21 (requested by jonb i...



details:   https://anonhg.NetBSD.org/src/rev/26b691592a66
branches:  netbsd-1-6
changeset: 529315:26b691592a66
user:      he <he%NetBSD.org@localhost>
date:      Sun Nov 10 15:34:06 2002 +0000

description:
Pull up revision 1.21 (requested by jonb in ticket #540):
  Finish fixing PR#15412 -- deal with ``-e'' option properly.

diffstat:

 usr.bin/join/join.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r 2494bf78a0d7 -r 26b691592a66 usr.bin/join/join.c
--- a/usr.bin/join/join.c       Sun Nov 10 07:43:40 2002 +0000
+++ b/usr.bin/join/join.c       Sun Nov 10 15:34:06 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.20.2.1 2002/11/10 15:34:06 he 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.20.2.1 2002/11/10 15:34:06 he 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