From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 6 Oct 2006 08:03:58 +0200 From: =?UTF-8?B?Ik5pbHMgTy4gU2Vsw6VzZGFsIg==?= Subject: Re: [9fans] Binit and Bterm In-reply-to: <000001c6e8b6$cbc14250$14aaa8c0@utelsystems.local> To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Message-id: <4525F1CE.9010607@Utel.no> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8; format=flowed References: <000001c6e8b6$cbc14250$14aaa8c0@utelsystems.local> User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: c699cef6-ead1-11e9-9d60-3106f5b1d025 Joel =C3=A2=E2=82=AC=C5=93chesky=C3=A2=E2=82=AC=C2=9D Salomon wrote: > 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. What's one extra, correct, Bterm call among friends ?