diff options
Diffstat (limited to 'usr.bin/mg/re_search.c')
-rw-r--r-- | usr.bin/mg/re_search.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/mg/re_search.c b/usr.bin/mg/re_search.c index bdc57aa2d05..87233eb0727 100644 --- a/usr.bin/mg/re_search.c +++ b/usr.bin/mg/re_search.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re_search.c,v 1.23 2006/05/28 23:30:16 kjell Exp $ */ +/* $OpenBSD: re_search.c,v 1.24 2006/07/25 08:22:32 kjell Exp $ */ /* This file is in the public domain. */ @@ -310,7 +310,7 @@ re_forwsrch(void) * Don't start matching past end of line -- must move to * beginning of next line, unless at end of file. */ - if (clp != curbp->b_linep) { + if (clp != curbp->b_headp) { clp = lforw(clp); tbo = 0; } @@ -318,7 +318,7 @@ re_forwsrch(void) * Note this loop does not process the last line, but this editor * always makes the last line empty so this is good. */ - while (clp != (curbp->b_linep)) { + while (clp != (curbp->b_headp)) { re_match[0].rm_so = tbo; re_match[0].rm_eo = llength(clp); error = regexec(&re_buff, ltext(clp), RE_NMATCH, re_match, @@ -364,7 +364,7 @@ re_backsrch(void) * Note this loop does not process the last line, but this editor * always makes the last line empty so this is good. */ - while (clp != (curbp->b_linep)) { + while (clp != (curbp->b_headp)) { re_match[0].rm_so = 0; re_match[0].rm_eo = llength(clp); lastmatch.rm_so = -1; @@ -516,7 +516,7 @@ killmatches(int cond) /* Consider dot on next line */ clp = lforw(clp); - while (clp != (curbp->b_linep)) { + while (clp != (curbp->b_headp)) { /* see if line matches */ re_match[0].rm_so = 0; re_match[0].rm_eo = llength(clp); @@ -591,7 +591,7 @@ countmatches(int cond) /* Consider dot on next line */ clp = lforw(clp); - while (clp != (curbp->b_linep)) { + while (clp != (curbp->b_headp)) { /* see if line matches */ re_match[0].rm_so = 0; re_match[0].rm_eo = llength(clp); |