blob: a189d0e3274d41f2312c5624372ddad145d3acc8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
include <mach.h>
# AWRITE -- Asychronous block write to a binary file. Writes can only
# start at a character offset which is an integral multiple of the file
# block size.
procedure awrite (fd, buffer, nchars, char_offset)
int fd
int nchars
char buffer[ARB]
long char_offset
int nbytes
long byte_offset
begin
nbytes = nchars * SZB_CHAR
byte_offset = (char_offset-1) * SZB_CHAR + 1
call awriteb (fd, buffer, nbytes, byte_offset)
end
|