=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mg/re_search.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- src/usr.bin/mg/re_search.c 2006/05/28 23:30:16 1.23 +++ src/usr.bin/mg/re_search.c 2006/07/25 08:22:32 1.24 @@ -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 @@ * 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 @@ * 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 @@ * 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 @@ /* 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 @@ /* 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);