9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Tim Wiess <tim@nop.cx>
To: 9fans@cse.psu.edu
Cc: JoelCSalomon@Gmail.com
Subject: Re: [9fans] Binit and Bterm
Date: Thu,  5 Oct 2006 13:26:26 -0700	[thread overview]
Message-ID: <c5d12f2312edc98140971001a3302a22@akira.nop.cx> (raw)
In-Reply-To: <81f54cf5e17d3070cee5e358cce01f70@plan9.jp>

    since you are just doing reads then no i don't believe
    the Bterm is necessary.


> I’ve got a function in the Brain-Dead SHell™ that I’m writing for
> homework that looks like this:
> 	Biobuf in;
> 
> 	void bdsh(int f) {
> 		Binit(&in, f, OREAD); yyparse(); Bterm(&in);
> 	}
> This function gets called for each file named in argv[] after main()
> open(2)s it.
> 
> My question is: is the call Bterm necessary, or will Binit
> reinitialize the global Biobuf correctly on its own—or am I courting
> trouble some other way?  The man page for bio(2) is a bit vauge on
> reusing Biobufs.
> 
> --Joel



  reply	other threads:[~2006-10-05 20:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-05 19:32 Joel “chesky” Salomon
2006-10-05 20:26 ` Tim Wiess [this message]
2006-10-05 20:33   ` Joel “chesky” Salomon
2006-10-05 20:43     ` Russ Cox
2006-10-05 20:47     ` Charles Forsyth
2006-10-05 21:00       ` Joel “chesky” Salomon
2006-10-05 21:08         ` Charles Forsyth
2006-10-05 21:09           ` Joel “chesky” Salomon
2006-10-05 21:38             ` Martin Neubauer
2006-10-05 21:42               ` Charles Forsyth
2006-10-05 21:42     ` Tim Wiess
     [not found] <000001c6e8b6$cbc14250$14aaa8c0@utelsystems.local>
2006-10-06  6:03 ` "Nils O. Selåsdal"

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=c5d12f2312edc98140971001a3302a22@akira.nop.cx \
    --to=tim@nop.cx \
    --cc=9fans@cse.psu.edu \
    --cc=JoelCSalomon@Gmail.com \
    /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).