]> pd.if.org Git - pdclib/blobdiff - platform/example/functions/_PDCLIB/fillbuffer.c
Whitespace cleanups.
[pdclib] / platform / example / functions / _PDCLIB / fillbuffer.c
index 8da93ad345fb8a1ff0963eb28cb95d06f81ff1b4..0e1b0e39cec1ee678b1fc9b09f4ceddb44fc4be5 100644 (file)
@@ -1,6 +1,4 @@
-/* $Id$ */
-
-/* _PDCLIB_fillbuffer( struct _PDCLIB_file_t * stream )
+/* _PDCLIB_fillbuffer( struct _PDCLIB_file_t * )
 
    This file is part of the Public Domain C Library (PDCLib).
    Permission is granted to use, modify, and / or redistribute at will.
@@ -13,7 +11,8 @@
 #include <stdio.h>
 
 #ifndef REGTEST
-#include <_PDCLIB_glue.h>
+
+#include "_PDCLIB_glue.h"
 
 #include </usr/include/errno.h>
 
@@ -41,15 +40,19 @@ int _PDCLIB_fillbuffer( struct _PDCLIB_file_t * stream )
         /* Reading error */
         switch ( errno )
         {
+            /* See comments on implementation-defined errno values in
+               <_PDCLIB_config.h>.
+            */
             case EBADF:
             case EFAULT:
             case EINTR:
             case EINVAL:
             case EIO:
-                _PDCLIB_errno = _PDCLIB_EIO;
+                _PDCLIB_errno = _PDCLIB_ERROR;
                 break;
             default:
-                _PDCLIB_errno = _PDCLIB_EUNKNOWN;
+                /* This should be something like EUNKNOWN. */
+                _PDCLIB_errno = _PDCLIB_ERROR;
                 break;
         }
         stream->status |= _PDCLIB_ERRORFLAG;
@@ -63,7 +66,8 @@ int _PDCLIB_fillbuffer( struct _PDCLIB_file_t * stream )
 #endif
 
 #ifdef TEST
-#include <_PDCLIB_test.h>
+
+#include "_PDCLIB_test.h"
 
 int main( void )
 {
@@ -72,4 +76,3 @@ int main( void )
 }
 
 #endif
-