i - pointer to number of characters already delivered in this call
n - pointer to maximum number of characters to be delivered in this call
s - the buffer into which the character shall be delivered
- TODO: ref. fputs() for a better way to buffer handling
*/
#define DELIVER( x ) \
do { \
{
pos->offset = stream->pos.offset + stream->bufidx - stream->ungetidx;
pos->status = stream->pos.status;
+ /* TODO: Add mbstate. */
return 0;
}
return EOF;
}
stream->pos.status = pos->status;
+ /* TODO: Add mbstate. */
return 0;
}
long int ftell( struct _PDCLIB_file_t * stream )
{
- /* TODO: A bit too fuzzy in the head now. stream->ungetidx should be in here
+ /* FIXME: A bit too fuzzy in the head now. stream->ungetidx should be in here
somewhere.
*/
if ( stream->pos.offset > ( LONG_MAX - stream->bufidx ) )
{
for ( size_t size_i = 0; size_i < size; ++size_i )
{
- /* TODO: Should line-buffered streams be flushed on '\n' or system EOL? */
if ( ( stream->buffer[ stream->bufidx++ ] = ((char*)ptr)[ nmemb_i * size + size_i ] ) == '\n' )
{
/* Remember last newline, in case we have to do a partial line-buffered flush */
}
}
}
+ /* FIXME: Think-o. '\n' is lineend, conversion to platform-specific
+ tales place only for text streams.
+ */
s = _PDCLIB_eol;
while ( *s != '\0' )
{