This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Implement fmemopen
Eric Blake wrote:
So my implementation needs to be made a bit smarter - when in write-only mode,
remember the character being overwritten by the trailing NUL, then when seeking
to a different location, restore that byte (ie. the trailing NUL should always
correspond to the current position, rather than being a permanent artifact of
writing).
Huh? That seems odd - what if I am writing bin bytes to the memory
stream that purposely contain a NULL.
I do not have the POSIX docs - nor have I read them - but my gut tells
me - I should be able to write bin data to this stream.
-Duane.