tmpfile Question
Blair P. Houghton
bhoughto at hopi.intel.com
Wed Mar 27 16:29:08 AEST 1991
In article <2537.03.91 at drdhh.hanse.de> bjoern at 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..."
More information about the Comp.std.c
mailing list