Steve Simon
2012-09-19 08:48:51 UTC
Hi,
Anyone worked out an idiom that would allow me to
use Brdline()/Blinelen() to read a file which
contains continuation lines?
I want to read a text file which consists of lines terminated
by newlines, but lines with leading whitespace are considered
to be continuation lines.
Brdline() is very neat allowing me to parse input lines inside the
Biobuf buffer without copying them to "user space", however if I
do a Brdline(), get a line and then attempt to do another Brdline()
I am in danger of releaseing the buffer space used by the first read.
I am happy if the answer is "Brdline() cannot do this", I just feel like
I am missing a trick, and there is elegant solution.
-Steve
Anyone worked out an idiom that would allow me to
use Brdline()/Blinelen() to read a file which
contains continuation lines?
I want to read a text file which consists of lines terminated
by newlines, but lines with leading whitespace are considered
to be continuation lines.
Brdline() is very neat allowing me to parse input lines inside the
Biobuf buffer without copying them to "user space", however if I
do a Brdline(), get a line and then attempt to do another Brdline()
I am in danger of releaseing the buffer space used by the first read.
I am happy if the answer is "Brdline() cannot do this", I just feel like
I am missing a trick, and there is elegant solution.
-Steve