X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fexample%2Ffunctions%2F_PDCLIB%2Ffillbuffer.c;h=e3cb9bec3f669305e92001daeada532328901854;hb=d6f1494a4f38a212b29a13ee713885058dcf0fe7;hp=8da93ad345fb8a1ff0963eb28cb95d06f81ff1b4;hpb=50c9c6af3784c1fce7a82c50df1e7ef8f9b57bd4;p=pdclib diff --git a/platform/example/functions/_PDCLIB/fillbuffer.c b/platform/example/functions/_PDCLIB/fillbuffer.c index 8da93ad..e3cb9be 100644 --- a/platform/example/functions/_PDCLIB/fillbuffer.c +++ b/platform/example/functions/_PDCLIB/fillbuffer.c @@ -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,7 @@ #include #ifndef REGTEST -#include <_PDCLIB_glue.h> +#include "_PDCLIB_glue.h" #include @@ -41,15 +39,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 +65,7 @@ int _PDCLIB_fillbuffer( struct _PDCLIB_file_t * stream ) #endif #ifdef TEST -#include <_PDCLIB_test.h> +#include "_PDCLIB_test.h" int main( void ) {