summaryrefslogtreecommitdiff
path: root/usr.bin/mg/random.c
diff options
context:
space:
mode:
authorKjell Wooding <kjell@cvs.openbsd.org>2006-07-25 08:27:10 +0000
committerKjell Wooding <kjell@cvs.openbsd.org>2006-07-25 08:27:10 +0000
commit6fa69567b7af822d74014fa4cbf3f5d3d8f34ffc (patch)
tree5ce76eb7ce91f51b9dd1960fbe251c0aa0c1e1b7 /usr.bin/mg/random.c
parentb27fa2f6a9aae6a0a87897200334b193aa2882dd (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/random.c')
-rw-r--r--usr.bin/mg/random.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mg/random.c b/usr.bin/mg/random.c
index f7bb587037b..6daeec30152 100644
--- a/usr.bin/mg/random.c
+++ b/usr.bin/mg/random.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: random.c,v 1.21 2006/07/25 08:22:32 kjell Exp $ */
+/* $OpenBSD: random.c,v 1.22 2006/07/25 08:27:09 kjell Exp $ */
/* This file is in the public domain. */
@@ -31,7 +31,7 @@ showcpos(int f, int n)
int ratio;
/* collect the data */
- clp = lforw(curbp->b_headp);
+ clp = bfirstlp(curbp);
cchar = 0;
cline = 0;
cbyte = 0;