]> pd.if.org Git - pdclib/blobdiff - functions/stdio/fseek.c
Comment cleanups.
[pdclib] / functions / stdio / fseek.c
index d74d55292279cd03f4bdc9a7129d0751b66d9f4a..167c18693800903bc71fb3f315363752ed96c0b5 100644 (file)
@@ -1,6 +1,4 @@
-/* $Id$ */
-
-/* fseek( FILE *, long offset, int )
+/* fseek( FILE *, long, int )
 
    This file is part of the Public Domain C Library (PDCLib).
    Permission is granted to use, modify, and / or redistribute at will.
@@ -38,7 +36,7 @@ int fseek( struct _PDCLIB_file_t * stream, long offset, int whence )
 int main( void )
 {
     FILE * fh;
-    TESTCASE( ( fh = fopen( testfile, "wb+" ) ) != NULL );
+    TESTCASE( ( fh = tmpfile() ) != NULL );
     TESTCASE( fwrite( teststring, 1, strlen( teststring ), fh ) == strlen( teststring ) );
     /* General functionality */
     TESTCASE( fseek( fh, -1, SEEK_END ) == 0  );
@@ -79,7 +77,6 @@ int main( void )
     TESTCASE( fseek( fh, -5, SEEK_SET ) == -1 );
     TESTCASE( fseek( fh, 0, SEEK_END ) == 0 );
     TESTCASE( fclose( fh ) == 0 );
-    remove( testfile );
     return TEST_RESULTS;
 }