diff options
author | Kjell Wooding <kjell@cvs.openbsd.org> | 2006-07-25 08:27:10 +0000 |
---|---|---|
committer | Kjell Wooding <kjell@cvs.openbsd.org> | 2006-07-25 08:27:10 +0000 |
commit | 6fa69567b7af822d74014fa4cbf3f5d3d8f34ffc (patch) | |
tree | 5ce76eb7ce91f51b9dd1960fbe251c0aa0c1e1b7 /usr.bin/mg/file.c | |
parent | b27fa2f6a9aae6a0a87897200334b193aa2882dd (diff) |
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
Diffstat (limited to 'usr.bin/mg/file.c')
-rw-r--r-- | usr.bin/mg/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |