Mail Archives: djgpp-workers/2000/11/03/16:10:44
>
> > Well, I guess the author of this library might be inclined to make an
> > exception for DJGPP. Might be worth asking if this saves the DJGPP
> > team the work of reimplementing these functions.
> >
>
> An implementation of snprintf was posted some time ago. See
> http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp-
> workers/1999/06/09/16:04:27 .
>
hmmm ....
Yes, I forgot about that. It was change somewhat to comply
to C99 snprintf/vsnprintf semantics, I've sent the docs and patches
to Eli, but that was along time ago. It was suppose to be
in V2.03 ? or something. The good thing is that it reused
DJGPP stdio guts but some small cosmetic changes was supposed
to be done on _doprnt() or __putc() to make it aware of the
size of the buffer, after that writing v/snprintf() was trivial,
a few lines of code.
Sorry, I could not find trace of the patches in my $HOME.
The other interresting thing was to have a FILE * memory buffer
GNU lib C will/is provide(ing) the necessary hooks for this
fmemopen() and friends
In any case the stdio guts (_doprnt() and friends) should
pay attention not to overflow its buffer. Once that is
done vsnpritf is trivial and maybe other things can be added.
--
au revoir, alain
----
Aussi haut que l'on soit assis, on n'est toujours assis que sur son cul !!!
- Raw text -