Path: blob/master/waterbox/libc/functions/_PDCLIB/_PDCLIB_fileops.c
2 views
/* _PDCLIB_fileops12This file is part of the Public Domain C Library (PDCLib).3Permission is granted to use, modify, and / or redistribute at will.4*/56#ifndef REGTEST7#include <stdio.h>8#include <stdint.h>9#include "_PDCLIB_glue.h"10#include <errno.h>1112static bool readf( _PDCLIB_fd_t self, void * buf, size_t length,13size_t * numBytesRead )14{15errno = ENOTSUP;16return false;17}1819static bool writef( _PDCLIB_fd_t self, const void * buf, size_t length,20size_t * numBytesWritten )21{22errno = ENOTSUP;23return false;24}25static bool seekf( _PDCLIB_fd_t self, int_fast64_t offset, int whence,26int_fast64_t* newPos )27{28errno = ENOTSUP;29return false;30}3132static void closef( _PDCLIB_fd_t self )33{34errno = ENOTSUP;35}3637const _PDCLIB_fileops_t _PDCLIB_fileops = {38.read = readf,39.write = writef,40.seek = seekf,41.close = closef,42};4344#endif4546#ifdef TEST47#include "_PDCLIB_test.h"4849int main( void )50{51// Tested by stdio test cases52return TEST_RESULTS;53}5455#endif565758