2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
5 ANSI C function read().
10 #include <dos/dosextens.h>
11 #include <proto/exec.h>
12 #include <proto/dos.h>
17 /*****************************************************************************
30 Read an amount of bytes from a file descriptor.
33 fd - The file descriptor to read from
34 buf - The buffer to read the bytes into
35 count - Read this many bytes.
38 The number of characters read (may range from 0 when the file
39 descriptor contains no more characters to count) or -1 on error.
48 open(), read(), fread()
52 ******************************************************************************/
55 fdesc
*fdesc
= __getfdesc(fd
);
69 cnt
= Read ((BPTR
)fdesc
->fcb
->fh
, buf
, count
);
72 errno
= IoErr2errno (IoErr ());