Path: utzoo!attcan!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!tut!santra!hemuli.tik.vtt.fi!tml From: tml@hemuli.tik.vtt.fi (Tor Lillqvist) Newsgroups: comp.unix.wizards Subject: Re: Obscure code. Message-ID: <4624@hemuli.tik.vtt.fi> Date: 28 Mar 90 20:33:49 GMT References: <423@venice.SEDD.TRW.COM> <1990Mar28.131215.14795@ncsuvx.ncsu.edu> Organization: Technical Research Centre of Finland, Laboratory for Information Processing (VTT/TIK) Lines: 17 In article <1990Mar28.131215.14795@ncsuvx.ncsu.edu> rcb@ccpv1.ncsu.edu (Randy Buckland) writes: >waldorf@venice.SEDD.TRW.COM (jerry waldorf) writes: >> _strbuf._flag = _IOREAD | _IOSTRG; >_doscan is an internal routine of {scanf, fscnaf, sscanf}. >for sscanf a fake FILE struct is built to >allow it to call the same routine. One more point if you are porting to HP-UX: There is no _IOSTRG flag, instead you should put _NFILE in _strbuf._file (i.e. an illegal file descriptor). Or something like that, disassemble the sscanf code (with adb) to be sure. -- Tor Lillqvist, working, but not speaking, for the Technical Research Centre of Finland