From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] Binit and Bterm From: Tim Wiess Date: Thu, 5 Oct 2006 13:26:26 -0700 In-Reply-To: <81f54cf5e17d3070cee5e358cce01f70@plan9.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: JoelCSalomon@Gmail.com Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: c564534e-ead1-11e9-9d60-3106f5b1d025 since you are just doing reads then no i don't believe the Bterm is necessary. > I=E2=80=99ve got a function in the Brain-Dead SHell=E2=84=A2 that I=E2=80= =99m writing for > homework that looks like this: > Biobuf in; >=20 > 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. >=20 > My question is: is the call Bterm necessary, or will Binit > reinitialize the global Biobuf correctly on its own=E2=80=94or am I cou= rting > trouble some other way? The man page for bio(2) is a bit vauge on > reusing Biobufs. >=20 > --Joel