X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fexample_cygwin%2Ffunctions%2Fstdio%2Ftmpfile.c;fp=platform%2Fexample_cygwin%2Ffunctions%2Fstdio%2Ftmpfile.c;h=0000000000000000000000000000000000000000;hb=0cd903b82201176f3148f6d18d68fd30b82746d5;hp=705af2e3670a1bddd9fc1b901f279eff6d9a28e6;hpb=56bacb39160e13397fde32a36329461f3ae56ec1;p=pdclib diff --git a/platform/example_cygwin/functions/stdio/tmpfile.c b/platform/example_cygwin/functions/stdio/tmpfile.c deleted file mode 100644 index 705af2e..0000000 --- a/platform/example_cygwin/functions/stdio/tmpfile.c +++ /dev/null @@ -1,40 +0,0 @@ -/* tmpfile( void ) - - This file is part of the Public Domain C Library (PDCLib). - Permission is granted to use, modify, and / or redistribute at will. -*/ - -#include - -#ifndef REGTEST - -struct _PDCLIB_file_t * tmpfile( void ) -{ - /* TODO: Implement */ - return NULL; -} - -#endif - -#ifdef TEST -#include <_PDCLIB_test.h> - -int main( void ) -{ - FILE * fh; - char filename[ L_tmpnam ]; - FILE * fhtest; - TESTCASE( ( fh = tmpfile() ) != NULL ); - TESTCASE( fputc( 'x', fh ) == 'x' ); - /* Checking that file is actually there */ - TESTCASE_NOREG( strcpy( filename, fh->filename ) == filename ); - TESTCASE_NOREG( ( fhtest = fopen( filename, "r" ) ) != NULL ); - TESTCASE_NOREG( fclose( fhtest ) == 0 ); - /* Closing tmpfile */ - TESTCASE( fclose( fh ) == 0 ); - /* Checking that file was deleted */ - TESTCASE_NOREG( fopen( filename, "r" ) == NULL ); - return TEST_RESULTS; -} - -#endif