From 17d539d4dad385b70e22c3611c7642e0a020d990 Mon Sep 17 00:00:00 2001 From: solar Date: Sun, 21 Nov 2010 12:17:15 +0000 Subject: [PATCH] Status review. --- functions/_PDCLIB/print.c | 1 - functions/stdio/fgetpos.c | 1 + functions/stdio/fsetpos.c | 1 + functions/stdio/ftell.c | 2 +- functions/stdio/fwrite.c | 1 - functions/stdio/puts.c | 3 +++ 6 files changed, 6 insertions(+), 3 deletions(-) diff --git a/functions/_PDCLIB/print.c b/functions/_PDCLIB/print.c index 46c00d9..8f01979 100644 --- a/functions/_PDCLIB/print.c +++ b/functions/_PDCLIB/print.c @@ -42,7 +42,6 @@ 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 { \ diff --git a/functions/stdio/fgetpos.c b/functions/stdio/fgetpos.c index 5d90382..0d5de42 100644 --- a/functions/stdio/fgetpos.c +++ b/functions/stdio/fgetpos.c @@ -14,6 +14,7 @@ int fgetpos( struct _PDCLIB_file_t * _PDCLIB_restrict stream, struct _PDCLIB_fpo { pos->offset = stream->pos.offset + stream->bufidx - stream->ungetidx; pos->status = stream->pos.status; + /* TODO: Add mbstate. */ return 0; } diff --git a/functions/stdio/fsetpos.c b/functions/stdio/fsetpos.c index 4820f73..1c39c49 100644 --- a/functions/stdio/fsetpos.c +++ b/functions/stdio/fsetpos.c @@ -25,6 +25,7 @@ int fsetpos( struct _PDCLIB_file_t * stream, const struct _PDCLIB_fpos_t * pos ) return EOF; } stream->pos.status = pos->status; + /* TODO: Add mbstate. */ return 0; } diff --git a/functions/stdio/ftell.c b/functions/stdio/ftell.c index 0bf42f5..09dd17f 100644 --- a/functions/stdio/ftell.c +++ b/functions/stdio/ftell.c @@ -13,7 +13,7 @@ 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 ) ) diff --git a/functions/stdio/fwrite.c b/functions/stdio/fwrite.c index 3c40186..ca43967 100644 --- a/functions/stdio/fwrite.c +++ b/functions/stdio/fwrite.c @@ -27,7 +27,6 @@ size_t fwrite( const void * _PDCLIB_restrict ptr, size_t size, size_t nmemb, str { 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 */ diff --git a/functions/stdio/puts.c b/functions/stdio/puts.c index a90e078..e28a2b8 100644 --- a/functions/stdio/puts.c +++ b/functions/stdio/puts.c @@ -30,6 +30,9 @@ int puts( const char * s ) } } } + /* FIXME: Think-o. '\n' is lineend, conversion to platform-specific + tales place only for text streams. + */ s = _PDCLIB_eol; while ( *s != '\0' ) { -- 2.40.0