Sign in
plan9port
/
plan9
/
1670a244d90342023fd84cee9fc01347aaed8abc
/
.
/
src
/
lib9
/
write.c
blob: aa32db7f14232733d4b893f4ac4489dc7b048721 [
file
] [
log
] [
blame
]
#include
<u.h>
#define
NOPLAN9DEFINES
#include
<libc.h>
long
p9write
(
int
f
,
void
*
av
,
long
n
)
{
char
*
a
;
long
m
,
t
;
a
=
av
;
t
=
0
;
while
(
t
<
n
){
m
=
write
(
f
,
a
+
t
,
n
-
t
);
if
(
m
<=
0
){
if
(
t
==
0
)
return
m
;
break
;
}
t
+=
m
;
}
return
t
;
}