projects
/
fw
/
pdclib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Language.
[fw/pdclib]
/
platform
/
example
/
functions
/
_PDCLIB
/
fillbuffer.c
diff --git
a/platform/example/functions/_PDCLIB/fillbuffer.c
b/platform/example/functions/_PDCLIB/fillbuffer.c
index ecfb96859bcc668b63bfe866d6aca7b4017e5ba8..1d450259e55ee8721b3a92b0172ec8a77cd20869 100644
(file)
--- a/
platform/example/functions/_PDCLIB/fillbuffer.c
+++ b/
platform/example/functions/_PDCLIB/fillbuffer.c
@@
-31,6
+31,7
@@
int _PDCLIB_fillbuffer( struct _PDCLIB_file_t * stream )
{
/* TODO: Text stream conversion here */
}
{
/* TODO: Text stream conversion here */
}
+ stream->pos.offset += rc;
stream->bufend = rc;
stream->bufidx = 0;
return 0;
stream->bufend = rc;
stream->bufidx = 0;
return 0;
@@
-40,15
+41,19
@@
int _PDCLIB_fillbuffer( struct _PDCLIB_file_t * stream )
/* Reading error */
switch ( errno )
{
/* 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:
case EBADF:
case EFAULT:
case EINTR:
case EINVAL:
case EIO:
- _PDCLIB_errno = _PDCLIB_E
IO
;
+ _PDCLIB_errno = _PDCLIB_E
RROR
;
break;
default:
break;
default:
- _PDCLIB_errno = _PDCLIB_EUNKNOWN;
+ /* This should be something like EUNKNOWN. */
+ _PDCLIB_errno = _PDCLIB_ERROR;
break;
}
stream->status |= _PDCLIB_ERRORFLAG;
break;
}
stream->status |= _PDCLIB_ERRORFLAG;