home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
NETWORK
/
ISP
/
bind.4.8.3.lzh
/
BIND483
/
RES
/
writev.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-09-22
|
404b
|
23 lines
#include "uio.h"
int writev(fildes, iov, iovcnt)
int fildes;
struct iovec *iov;
int iovcnt;
{
int count = 0, res;
while( iovcnt-- > 0 ) {
if ( iov->iov_len > 0 ) {
res = write(fildes, iov->iov_base, iov->iov_len);
count += res;
if ( res == 0 )
return count;
if ( res < 0 )
return res;
}
iov++;
}
return count;
}