Xref: utzoo comp.unix.wizards:20755 comp.bugs.sys5:1232 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!prls!pyramid!ctnews!mitisft!dold From: dold@mitisft.Convergent.COM (Clarence Dold) Newsgroups: comp.unix.wizards,comp.bugs.sys5 Subject: Re: stdio broken in SysV? Message-ID: <1410@mitisft.Convergent.COM> Date: 24 Feb 90 17:37:15 GMT References: <2010@sauron.Columbia.NCR.COM> Organization: Convergent Technologies, San Jose, CA Lines: 21 in article <2010@sauron.Columbia.NCR.COM>, wescott@micky.columbia.ncr.com (Mike Wescott) says: > I am trying to port a program. It blows up in fprintf because SysV > stdio has the implicit assumption that a given file descriptor will > be used by no more than one stdio stream. > BTW the "implicit assumption" mentioned above is due to the fact that > the array _bufendtab[] is indexed by fp->_file rather than by fp-_iob > or built into the FILE structure itself. From fopen(3) man page: "...input may not be directly followed by output" [later stated vice-versa] "without an intervening fseek or rewind..." which I believe will straighten out the _bufentab[fd] pointer. -- --- Clarence A Dold - dold@tsmiti.Convergent.COM (408) 435-5293 ...pyramid!ctnews!tsmiti!dold FAX (408) 435-3105 P.O.Box 6685, San Jose, CA 95150-6685 MS#10-007