X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Ffgets.c;h=fd893443b8679a27149c3f8f65d2e47ee0bd6b92;hb=202af43c19ec4f5f1d1b2827a7ef0b46abfebed5;hp=6fbc2ef7961509b7e0c93aeae610d001f1a84f90;hpb=e6d28b5afddd8b3e3564af2264aa8b705e711b67;p=pdclib diff --git a/functions/stdio/fgets.c b/functions/stdio/fgets.c index 6fbc2ef..fd89344 100644 --- a/functions/stdio/fgets.c +++ b/functions/stdio/fgets.c @@ -9,10 +9,9 @@ #include #ifndef REGTEST +#include <_PDCLIB_io.h> -#include <_PDCLIB_glue.h> - -char * fgets_unlocked( char * _PDCLIB_restrict s, int size, struct _PDCLIB_file_t * _PDCLIB_restrict stream ) +char * _PDCLIB_fgets_unlocked( char * _PDCLIB_restrict s, int size, FILE * _PDCLIB_restrict stream ) { if ( size == 0 ) { @@ -36,11 +35,11 @@ char * fgets_unlocked( char * _PDCLIB_restrict s, int size, struct _PDCLIB_file_ } char * fgets( char * _PDCLIB_restrict s, int size, - struct _PDCLIB_file_t * _PDCLIB_restrict stream ) + FILE * _PDCLIB_restrict stream ) { - flockfile( stream ); - char* r = fgets_unlocked( s, size, stream ); - funlockfile( stream ); + _PDCLIB_flockfile( stream ); + char* r = _PDCLIB_fgets_unlocked( s, size, stream ); + _PDCLIB_funlockfile( stream ); return r; }