9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Steve Simon" <steve@quintile.net>
To: 9fans@9fans.net
Subject: [9fans] Brdline() and continuation lines
Date: Wed, 19 Sep 2012 09:48:51 +0100	[thread overview]
Message-ID: <22e43e02e32dd37beb7f8c52105e45b6@quintile.net> (raw)

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



             reply	other threads:[~2012-09-19  8:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-19  8:48 Steve Simon [this message]
2012-09-19 13:35 ` erik quanstrom
2012-09-19 13:49 ` Charles Forsyth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22e43e02e32dd37beb7f8c52105e45b6@quintile.net \
    --to=steve@quintile.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).