_RBLOCK - block-oriented read operation.

(GCOS8 only)

Usage:

status = _rblock(fp, buf, nbytes, seek);

Where:

FILE *fp;
indicates the stream from which you want to read.
void *buf;
points to the location where you want to place the data that you read. This location must be word-aligned.
int nbytes;
is the number of bytes of data that you want to read. This must be greater than zero and a multiple of 4.
int seek;
is a byte offset within the file, indicating the place where you want to start reading.
int status;
is the number of bytes read, if the operation was successful. If an I/O error occurs, "status" is the negative of the major error status.

Description:

"_rblock" performs a binary read operation on a random or sequential disk file.

For a random disk file, "seek" must be a multiple of 4*64 (since there are four bytes in each word and 64 words in a sector). The "nbytes" value must be less than 256*1024*4.

For a sequential disk file, "seek" must be a multiple of 4*320 and "nbytes" must be less than or equal to 63*4*320 (63 llinks). The file pointer will be advanced by (words+319)/320 llinks (where "words" is the number of words read, normally "nbytes/4").

Copyright © 1996, Thinkage Ltd.