Lines Matching refs:ncopy
447 ssize_t ncopy, orig_bsize = bsize; in shf_read() local
459 ncopy = shf->rnleft; in shf_read()
460 if (ncopy > bsize) in shf_read()
461 ncopy = bsize; in shf_read()
462 memcpy(buf, shf->rp, ncopy); in shf_read()
463 buf += ncopy; in shf_read()
464 bsize -= ncopy; in shf_read()
465 shf->rp += ncopy; in shf_read()
466 shf->rnleft -= ncopy; in shf_read()
483 ssize_t ncopy; in shf_getse() local
505 ncopy = end ? end - shf->rp + 1 : shf->rnleft; in shf_getse()
506 if (ncopy > bsize) in shf_getse()
507 ncopy = bsize; in shf_getse()
508 memcpy(buf, (char *) shf->rp, ncopy); in shf_getse()
509 shf->rp += ncopy; in shf_getse()
510 shf->rnleft -= ncopy; in shf_getse()
511 buf += ncopy; in shf_getse()
512 bsize -= ncopy; in shf_getse()
628 ssize_t n, ncopy, orig_nbytes = nbytes; in shf_write() local
637 if ((ncopy = shf->wnleft) && in shf_write()
639 if (ncopy > nbytes) in shf_write()
640 ncopy = nbytes; in shf_write()
641 memcpy(shf->wp, buf, ncopy); in shf_write()
642 nbytes -= ncopy; in shf_write()
643 buf += ncopy; in shf_write()
644 shf->wp += ncopy; in shf_write()
645 shf->wnleft -= ncopy; in shf_write()
660 ncopy = nbytes; in shf_write()
662 ncopy -= nbytes % shf->wbsize; in shf_write()
663 nbytes -= ncopy; in shf_write()
664 while (ncopy > 0) { in shf_write()
665 n = write(shf->fd, buf, ncopy); in shf_write()
680 ncopy -= n; in shf_write()