Changeset View
Changeset View
Standalone View
Standalone View
bin/pax/buf_subs.c
Show First 20 Lines • Show All 479 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
int | int | ||||
wr_rdbuf(char *out, int outcnt) | wr_rdbuf(char *out, int outcnt) | ||||
{ | { | ||||
int cnt; | int cnt; | ||||
/* | /* | ||||
* while there is data to copy copy into the write buffer. when the | * while there is data to copy into the write buffer. when the | ||||
* write buffer fills, flush it to the archive and continue | * write buffer fills, flush it to the archive and continue | ||||
*/ | */ | ||||
while (outcnt > 0) { | while (outcnt > 0) { | ||||
cnt = bufend - bufpt; | cnt = bufend - bufpt; | ||||
if ((cnt <= 0) && ((cnt = buf_flush(blksz)) < 0)) | if ((cnt <= 0) && ((cnt = buf_flush(blksz)) < 0)) | ||||
return(-1); | return(-1); | ||||
/* | /* | ||||
* only move what we have space for | * only move what we have space for | ||||
▲ Show 20 Lines • Show All 494 Lines • Show Last 20 Lines |