Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ファイル記述子の代わりに char * buf で機能する readv / writev に相当するものはありますか?
たとえば、char * buf[] の配列があり、そのすべてを 1 つの char buf * にコピーしたいとします。
これを試して:
for (i=0; i<cnt; dest+=iov[i++].iov_len) memcpy(dest, iov[i].iov_base, iov[i].iov_len);
C は、自明な単一ステートメント本体の for ループ用のライブラリ関数でいっぱいの言語ではありません。