From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <81f54cf5e17d3070cee5e358cce01f70@plan9.jp> To: 9fans@cse.psu.edu From: Joel “chesky” Salomon Date: Thu, 5 Oct 2006 15:32:56 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Subject: [9fans] Binit and Bterm Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: c55505d8-ead1-11e9-9d60-3106f5b1d025 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; 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=E2=80=94or am I court= ing trouble some other way? The man page for bio(2) is a bit vauge on reusing Biobufs. --Joel