bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gawk bug with RS="^..."


From: Aharon Robbins
Subject: Re: gawk bug with RS="^..."
Date: Mon, 20 Dec 2004 13:11:16 +0200

> > > [...] RS matched the second line, [...] at the beginning of the buffer
> > 
> > That's not the case.  [...] It's more likely an issue
> > that gawk isn't using whatever regex magic that says that the starting
> > position is in the middle of a buffer so that ^ fails to match.
>
> You are right, of course.  So the fix would be to set the flag as soon
> as gawk moves from the beginning of the file.  Please cc it here if you
> fix it.  (I might get to it, eventually.)

Unfortunately, it's not a flag.  The interface is

        re_search(pat, buf, start_index, length, regs)

and the simple change to the code to not use a start index of zero
broke the test suite.

It's not worth the trouble to fix at this point.

Arnold




reply via email to

[Prev in Thread] Current Thread [Next in Thread]