]> pd.if.org Git - pdclib/blobdiff - functions/stdio/fgets.c
PDCLib includes with quotes, not <>.
[pdclib] / functions / stdio / fgets.c
index 6fbc2ef7961509b7e0c93aeae610d001f1a84f90..8752892bedc1a26103fe375089a5fff82b4b111b 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /* fgets( char *, int, FILE * )
 
    This file is part of the Public Domain C Library (PDCLib).
@@ -9,10 +7,9 @@
 #include <stdio.h>
 
 #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,18 +33,18 @@ 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;
 }
 
 #endif
 
 #ifdef TEST
-#include <_PDCLIB_test.h>
+#include "_PDCLIB_test.h"
 #include <string.h>
 
 int main( void )