X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fexample%2Ffunctions%2F_PDCLIB%2Fseek.c;h=66c328bbd0eecded9703cd96cf69f95d8639a44f;hb=b1fc26afebd4d557ff89a44bc21767a8704c3809;hp=9e2d102fd459a0c71566f69544628e2dbfb13fc8;hpb=393020b6e48719d27699dea6b29e53025bbd5123;p=pdclib diff --git a/platform/example/functions/_PDCLIB/seek.c b/platform/example/functions/_PDCLIB/seek.c index 9e2d102..66c328b 100644 --- a/platform/example/functions/_PDCLIB/seek.c +++ b/platform/example/functions/_PDCLIB/seek.c @@ -1,5 +1,3 @@ -/* $Id$ */ - /* int64_t _PDCLIB_seek( FILE *, int64_t, int ) This file is part of the Public Domain C Library (PDCLib). @@ -8,10 +6,7 @@ #include -#ifndef _PDCLIB_GLUE_H -#define _PDCLIB_GLUE_H #include <_PDCLIB_glue.h> -#endif #include "/usr/include/errno.h" @@ -27,7 +22,10 @@ _PDCLIB_int64_t _PDCLIB_seek( struct _PDCLIB_file_t * stream, _PDCLIB_int64_t of /* EMPTY - OK */ break; default: - _PDCLIB_errno = _PDCLIB_EINVAL; + /* See comments on implementation-defined errno values in + <_PDCLIB_config.h>. + */ + _PDCLIB_errno = _PDCLIB_ERROR; return EOF; break; } @@ -44,10 +42,14 @@ _PDCLIB_int64_t _PDCLIB_seek( struct _PDCLIB_file_t * stream, _PDCLIB_int64_t of { case EBADF: case EFAULT: - _PDCLIB_errno = _PDCLIB_EIO; + /* See comments on implementation-defined errno values in + <_PDCLIB_config.h>. + */ + _PDCLIB_errno = _PDCLIB_ERROR; break; default: - _PDCLIB_errno = _PDCLIB_EUNKNOWN; + /* This should be something like EUNKNOWN. */ + _PDCLIB_errno = _PDCLIB_ERROR; break; } return EOF; @@ -56,7 +58,7 @@ _PDCLIB_int64_t _PDCLIB_seek( struct _PDCLIB_file_t * stream, _PDCLIB_int64_t of #ifdef TEST #include <_PDCLIB_test.h> -int main() +int main( void ) { /* Testing covered by ftell.c */ return TEST_RESULTS;