3 This file is part of the Public Domain C Library (PDCLib).
4 Permission is granted to use, modify, and / or redistribute at will.
10 #include <_PDCLIB_glue.h>
14 static bool readf( _PDCLIB_fd_t fd, void * buf, size_t length,
15 size_t * numBytesRead )
17 int rv = gd_read(fd.pointer, buf, length, numBytesRead );
22 static bool writef( _PDCLIB_fd_t fd, const void * buf, size_t length,
23 size_t * numBytesWritten )
25 int rv = gd_write(fd.pointer, buf, length, numBytesWritten );
30 static bool seekf( _PDCLIB_fd_t fd, int_fast64_t offset, int whence,
31 int_fast64_t* newPos )
33 int rv = gd_seek( fd.pointer, offset, whence, newPos );
38 static void closef( _PDCLIB_fd_t self )
40 gd_close( self.pointer );
43 const _PDCLIB_fileops_t _PDCLIB_fileops = {
53 #include <_PDCLIB_test.h>
57 // Tested by stdio test cases