Make vi's '@' command work again; a precedence warning fix in r1.2 added trunk
authorjld <jld@NetBSD.org>
Sat, 04 Apr 2009 01:13:42 +0000
branchtrunk
changeset 179263 6fcb6a252287
parent 179262 b3e4886682c2
child 179264 32945daf774b
Make vi's '@' command work again; a precedence warning fix in r1.2 added parens in the wrong place such that '@' did nothing. Needs pullup to -5. Reported by Ed Ravin; fixes PR 41134.
dist/nvi/vi/v_at.c
--- a/dist/nvi/vi/v_at.c	Fri Apr 03 22:36:34 2009 +0000
+++ b/dist/nvi/vi/v_at.c	Sat Apr 04 01:13:42 2009 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: v_at.c,v 1.2 2008/12/05 22:51:43 christos Exp $ */
+/*	$NetBSD: v_at.c,v 1.3 2009/04/04 01:13:42 jld Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -94,9 +94,9 @@
 	for (tp = cbp->textq.cqh_last;
 	    tp != (void *)&cbp->textq; tp = tp->q.cqe_prev) {
 		static CHAR_T nl[] = { '\n', 0 };
-		if ((F_ISSET(cbp, CB_LMODE) ||
-		    ((tp->q.cqe_next != (void *)&cbp->textq) &&
-		    v_event_push(sp, NULL, nl, 1, 0))) ||
+		if (((F_ISSET(cbp, CB_LMODE) ||
+		    tp->q.cqe_next != (void *)&cbp->textq) &&
+		    v_event_push(sp, NULL, nl, 1, 0)) ||
 		    v_event_push(sp, NULL, tp->lb, tp->len, 0))
 			return (1);
 	}