]> pd.if.org Git - pdclib/blobdiff - functions/stdio/fseek.c
Testdriver for gets(). Turns out fseek() was not tested yet.
[pdclib] / functions / stdio / fseek.c
index 43789c8a71b6cca2cf43ffab38ccd22260bc0c26..1c5332d0b5832f8e49535a6bb69e8214891dab2f 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <_PDCLIB_glue.h>
 
-int fseek( struct _PDCLIB_file_t * _PDCLIB_restrict stream, long offset, int whence )
+int fseek( struct _PDCLIB_file_t * stream, long offset, int whence )
 {
     if ( stream->status & _PDCLIB_FWRITE )
     {
@@ -26,7 +26,7 @@ int fseek( struct _PDCLIB_file_t * _PDCLIB_restrict stream, long offset, int whe
     {
         stream->status &= ~ ( _PDCLIB_FREAD | _PDCLIB_FWRITE );
     }
-    return ( _PDCLIB_seek( stream, offset, whence ) == offset ) ? 0 : EOF;
+    return ( _PDCLIB_seek( stream, offset, whence ) != EOF ) ? 0 : EOF;
 }
 
 #endif
@@ -36,7 +36,7 @@ int fseek( struct _PDCLIB_file_t * _PDCLIB_restrict stream, long offset, int whe
 
 int main( void )
 {
-    /* Testing covered by ftell.c */
+    TESTCASE( NO_TESTDRIVER );
     return TEST_RESULTS;
 }