diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /sys/fio/aread.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/fio/aread.x')
-rw-r--r-- | sys/fio/aread.x | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/fio/aread.x b/sys/fio/aread.x new file mode 100644 index 00000000..a57c92c9 --- /dev/null +++ b/sys/fio/aread.x @@ -0,0 +1,24 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <mach.h> + +# AREAD -- Asychronous block read from a binary file. Reads can only +# start at a character offset which is an integral multiple of the file +# block size. + +procedure aread (fd, buffer, maxchars, char_offset) + +int fd # FIO file descriptor +int maxchars # maximum number of chars to be read +char buffer[ARB] # buffer into which data is to be read +long char_offset # one-indexed char offset in file + +int maxbytes +long byte_offset + +begin + maxbytes = maxchars * SZB_CHAR + byte_offset = (char_offset-1) * SZB_CHAR + 1 + + call areadb (fd, buffer, maxbytes, byte_offset) +end |