📄 readv.c
字号:
#ifndef LINTstatic const char rcsid[] = "$Id: readv.c,v 1.1 2001/03/29 06:30:35 marka Exp $";#endif#include "port_before.h"#include <sys/types.h>#include <sys/uio.h>#include <sys/stat.h>#include <sys/socket.h>#include "port_after.h"#ifndef NEED_READVint __bindcompat_readv;#elseint__readv(fd, vp, vpcount) int fd; const struct iovec *vp; int vpcount;{ int count = 0; while (vpcount-- > 0) { int bytes = read(fd, vp->iov_base, vp->iov_len); if (bytes < 0) return (-1); count += bytes; if (bytes != vp->iov_len) break; vp++; } return (count);}#endif /* NEED_READV */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -