X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fstdio%2F_PDCLIB_fvopen.c;fp=functions%2Fstdio%2F_PDCLIB_fdopen.c;h=466009b04d070f069a28d1aa8899f57ff39f0cce;hp=c628ebcd1e5da4ebf48131e2b9771c47c4d0cce1;hb=c5d49235e09fbd58416f10dec2799e61cf3431c8;hpb=4c7c56442f6b3e08c17594dd4e8095fca3aec9cf diff --git a/functions/stdio/_PDCLIB_fdopen.c b/functions/stdio/_PDCLIB_fvopen.c similarity index 90% rename from functions/stdio/_PDCLIB_fdopen.c rename to functions/stdio/_PDCLIB_fvopen.c index c628ebc..466009b 100644 --- a/functions/stdio/_PDCLIB_fdopen.c +++ b/functions/stdio/_PDCLIB_fvopen.c @@ -1,6 +1,6 @@ /* $Id$ */ -/* _PDCLIB_fdopen( _PDCLIB_fd_t fd, const char * ) +/* _PDCLIB_fvopen( _PDCLIB_fd_t fd, _PDCLIB_fileops_t * ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. @@ -16,7 +16,8 @@ extern struct _PDCLIB_file_t * _PDCLIB_filelist; -struct _PDCLIB_file_t * _PDCLIB_fdopen( _PDCLIB_fd_t fd, +struct _PDCLIB_file_t * _PDCLIB_fvopen( _PDCLIB_fd_t fd, + const _PDCLIB_fileops_t * ops, int mode, const char * _PDCLIB_restrict filename ) { @@ -47,6 +48,7 @@ struct _PDCLIB_file_t * _PDCLIB_fdopen( _PDCLIB_fd_t fd, } rc->status = mode; + rc->ops = ops; rc->handle = fd; /* Setting pointers into the memory block allocated above */ rc->ungetbuf = (unsigned char *)rc + sizeof( struct _PDCLIB_file_t );