From 069f378d21f7a92fbd0be1d985d8ce1c8716f433 Mon Sep 17 00:00:00 2001 From: skimo Date: Tue, 16 Mar 2004 14:14:04 +0000 Subject: [PATCH] make join work as specified in the standard --- ex/ex_join.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/ex/ex_join.c b/ex/ex_join.c index 1fad853a..5420b310 100644 --- a/ex/ex_join.c +++ b/ex/ex_join.c @@ -10,7 +10,7 @@ #include "config.h" #ifndef lint -static const char sccsid[] = "$Id: ex_join.c,v 10.16 2001/06/25 15:19:16 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:16 $"; +static const char sccsid[] = "$Id: ex_join.c,v 10.17 2004/03/16 14:14:04 skimo Exp $ (Berkeley) $Date: 2004/03/16 14:14:04 $"; #endif /* not lint */ #include @@ -57,14 +57,7 @@ ex_join(SCR *sp, EXCMD *cmdp) * The count for the join command was off-by-one, * historically, to other counts for other commands. */ - if (FL_ISSET(cmdp->iflags, E_C_COUNT)) - ++cmdp->addr2.lno; - - /* - * If only a single address specified, or, the same address - * specified twice, the from/two addresses will be the same. - */ - if (cmdp->addr1.lno == cmdp->addr2.lno) + if (F_ISSET(cmdp, E_ADDR_DEF) || cmdp->addrcnt == 1) ++cmdp->addr2.lno; clen = tlen = 0; -- 2.11.4.GIT