X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Ffopen.c;h=4a74e1776ddcc74973e2fb4981d555c19cbd4fa8;hb=893f940203d5b4d4edb1b3b557f3b22da1a27eff;hp=9a01fe3debc8f225a5bdd1244ba85814355589f1;hpb=17032bd4d730f9c2dbe91e9ec92248c922bebb28;p=pdclib.old diff --git a/functions/stdio/fopen.c b/functions/stdio/fopen.c index 9a01fe3..4a74e17 100644 --- a/functions/stdio/fopen.c +++ b/functions/stdio/fopen.c @@ -82,6 +82,7 @@ struct _PDCLIB_file_t * fopen( const char * _PDCLIB_restrict filename, const cha _PDCLIB_filelist = rc; /* Setting buffer, and mark as internal. TODO: Check for unbuffered? */ if ( ( rc->buffer = malloc( BUFSIZ ) ) == NULL ) goto fail; + rc->bufsize = BUFSIZ; rc->status |= ( _PDCLIB_LIBBUFFER | _PDCLIB_VIRGINSTR ); /* TODO: Setting mbstate */ return rc;