This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]