3 /* fwrite( const void *, size_t, size_t, FILE * )
5 This file is part of the Public Domain C Library (PDCLib).
6 Permission is granted to use, modify, and / or redistribute at will.
10 #include <_PDCLIB_glue.h>
14 size_t fwrite( const void * _PDCLIB_restrict ptr, size_t size, size_t nmemb, struct _PDCLIB_file_t * _PDCLIB_restrict stream )
16 return _PDCLIB_write( stream->handle, ptr, size * nmemb );
22 #include <_PDCLIB_test.h>
27 TESTCASE( ( fh = fopen( "testfile", "w" ) ) != NULL );
28 TESTCASE( fwrite( "SUCCESS testing fwrite()\n", 1, 25, fh ) == 25 );
29 TESTCASE( fclose( fh ) == 0 );
30 /* TODO: Add readback test. */
31 TESTCASE( remove( "testfile" ) == 0 );