Lines Matching refs:ncopy
457 ssize_t ncopy, orig_bsize = bsize; in shf_read() local
470 ncopy = shf->rnleft; in shf_read()
471 if (ncopy > bsize) in shf_read()
472 ncopy = bsize; in shf_read()
473 memcpy(buf, shf->rp, ncopy); in shf_read()
474 buf += ncopy; in shf_read()
475 bsize -= ncopy; in shf_read()
476 shf->rp += ncopy; in shf_read()
477 shf->rnleft -= ncopy; in shf_read()
494 ssize_t ncopy; in shf_getse() local
517 ncopy = end ? end - shf->rp + 1 : shf->rnleft; in shf_getse()
518 if (ncopy > bsize) in shf_getse()
519 ncopy = bsize; in shf_getse()
520 memcpy(buf, (char *) shf->rp, ncopy); in shf_getse()
521 shf->rp += ncopy; in shf_getse()
522 shf->rnleft -= ncopy; in shf_getse()
523 buf += ncopy; in shf_getse()
524 bsize -= ncopy; in shf_getse()
660 ssize_t n, ncopy, orig_nbytes = nbytes; in shf_write() local
670 if ((ncopy = shf->wnleft) && in shf_write()
672 if (ncopy > nbytes) in shf_write()
673 ncopy = nbytes; in shf_write()
674 memcpy(shf->wp, buf, ncopy); in shf_write()
675 nbytes -= ncopy; in shf_write()
676 buf += ncopy; in shf_write()
677 shf->wp += ncopy; in shf_write()
678 shf->wnleft -= ncopy; in shf_write()
693 ncopy = nbytes; in shf_write()
695 ncopy -= nbytes % shf->wbsize; in shf_write()
696 nbytes -= ncopy; in shf_write()
697 while (ncopy > 0) { in shf_write()
698 n = write(shf->fd, buf, ncopy); in shf_write()
713 ncopy -= n; in shf_write()