Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!think.com!spool.mu.edu!cs.umn.edu!talon.UCS.ORST.EDU!usenet!ogicse!intelhf!ichips!iwarp.intel.com!inews!hopi!bhoughto From: bhoughto@hopi.intel.com (Blair P. Houghton) Newsgroups: comp.std.c Subject: Re: tmpfile Question Keywords: tmpfile, conforming Message-ID: <3485@inews.intel.com> Date: 27 Mar 91 06:29:08 GMT Article-I.D.: inews.3485 References: <2537.03.91@drdhh.hanse.de> Sender: news@inews.intel.com Organization: Intel Corp, Chandler, AZ Lines: 30 In article <2537.03.91@drdhh.hanse.de> bjoern@drdhh.hanse.de writes: >My question is: >May a conforming program call tmpfile() more than once ? You can call it, but if you get NULL as the return value or end up clobbering the same file, the implementation still conforms... (Btw, mode "wb+" truncates the file to 0 length then allows fseek()/rewind() operations on it; the 'b' indicates that when opened the access pointer can be positioned past the end of the data due to null padding, but if the file is truncated to 0 length... ? ) >The MW Book doesn't say anything about it and my clib >always creates the same file (brain-damaged at all). This is conformant behavior, nonetheless. >I would like to have a definitive statement before >I go and complain to my vendor. Complain, anyway. They weren't prevented from having it open uniquely-named files, but there's nothing there that says it should. Better yet, tell them how to write it and they might just do it that way. --Blair "...for the next 'release'...in six months...for Eastern Borneo only..."