From 6fa69567b7af822d74014fa4cbf3f5d3d8f34ffc Mon Sep 17 00:00:00 2001 From: Kjell Wooding Date: Tue, 25 Jul 2006 08:27:10 +0000 Subject: Add bfirstlp(), blastlp() macros, returning the first and last lines of a buffer respectively. Removes an ugly construction than necessitated "go to first line"-type comments throughout the code. No binary change --- usr.bin/mg/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/mg/file.c') diff --git a/usr.bin/mg/file.c b/usr.bin/mg/file.c index 75b3b006f88..234d310a54c 100644 --- a/usr.bin/mg/file.c +++ b/usr.bin/mg/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.61 2006/07/25 08:22:32 kjell Exp $ */ +/* $OpenBSD: file.c,v 1.62 2006/07/25 08:27:09 kjell Exp $ */ /* This file is in the public domain. */ @@ -218,7 +218,7 @@ readin(char *fname) for (wp = wheadp; wp != NULL; wp = wp->w_wndp) { if (wp->w_bufp == curbp) { - wp->w_dotp = wp->w_linep = lforw(curbp->b_headp); + wp->w_dotp = wp->w_linep = bfirstlp(curbp); wp->w_doto = 0; wp->w_markp = NULL; wp->w_marko = 0; -- cgit v1.2.3