9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Binit and Bterm
@ 2006-10-05 19:32 Joel “chesky” Salomon
  2006-10-05 20:26 ` Tim Wiess
  0 siblings, 1 reply; 12+ messages in thread
From: Joel “chesky” Salomon @ 2006-10-05 19:32 UTC (permalink / raw)
  To: 9fans

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



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-10-06  6:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <000001c6e8b6$cbc14250$14aaa8c0@utelsystems.local>
2006-10-06  6:03 ` [9fans] Binit and Bterm "Nils O. Selåsdal"
2006-10-05 19:32 Joel “chesky” Salomon
2006-10-05 20:26 ` Tim Wiess
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

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).