| /freebsd-12.1/sys/dev/bhnd/nvram/ |
| H A D | bhnd_nvram_data_btxt.c | 158 bufpos = 0; in bhnd_nvram_btxt_getvar_direct() 174 bufpos = 0; in bhnd_nvram_btxt_getvar_direct() 191 while (bufpos < buflen && bhnd_nv_isspace(buf[bufpos])) in bhnd_nvram_btxt_getvar_direct() 193 bufpos++; in bhnd_nvram_btxt_getvar_direct() 199 } else if (bufpos < buflen && buf[bufpos] == '#') { in bhnd_nvram_btxt_getvar_direct() 244 bufpos++; in bhnd_nvram_btxt_getvar_direct() 258 p = memchr(buf+bufpos, '\n', buflen - bufpos); in bhnd_nvram_btxt_getvar_direct() 260 p = memchr(buf+bufpos, '\r', buflen - bufpos); in bhnd_nvram_btxt_getvar_direct() 282 p = memchr(buf+bufpos, '\n', buflen - bufpos); in bhnd_nvram_btxt_getvar_direct() 284 p = memchr(buf+bufpos, '\r', buflen - bufpos); in bhnd_nvram_btxt_getvar_direct() [all …]
|
| H A D | bhnd_nvram_data_bcm.c | 184 size_t buflen, bufpos; in bhnd_nvram_bcm_getvar_direct_common() local 207 bufpos = 0; in bhnd_nvram_bcm_getvar_direct_common() 223 bufpos = 0; in bhnd_nvram_bcm_getvar_direct_common() 256 bufpos += navail; in bhnd_nvram_bcm_getvar_direct_common() 277 bufpos++; in bhnd_nvram_bcm_getvar_direct_common() 291 p = memchr(buf+bufpos, '\0', buflen - bufpos); in bhnd_nvram_bcm_getvar_direct_common() 302 bufpos = buflen; in bhnd_nvram_bcm_getvar_direct_common() 312 p = memchr(buf+bufpos, '\0', buflen - bufpos); in bhnd_nvram_bcm_getvar_direct_common() 330 memmove(buf, buf+bufpos, buflen - bufpos); in bhnd_nvram_bcm_getvar_direct_common() 331 buflen = bufpos; in bhnd_nvram_bcm_getvar_direct_common() [all …]
|
| /freebsd-12.1/usr.bin/grep/ |
| H A D | file.c | 59 static unsigned char *bufpos; variable 74 bufpos = buffer; in grep_refill() 113 return (bufpos); in grep_fgetln() 119 ret = bufpos; in grep_fgetln() 120 len = p - bufpos; in grep_fgetln() 122 bufpos = p; in grep_fgetln() 149 diff = p - bufpos; in grep_fgetln() 153 memcpy(lnbuf + off, bufpos, diff); in grep_fgetln() 155 bufpos = p; in grep_fgetln() 201 bufpos = buffer; in grep_open() [all …]
|
| /freebsd-12.1/contrib/apr/file_io/unix/ |
| H A D | seek.c | 29 thefile->bufpos = thefile->direction = thefile->dataRead = 0; in setptr() 34 thefile->bufpos = newbufpos; in setptr() 39 thefile->bufpos = thefile->dataRead = 0; in setptr() 70 rc = setptr(thefile, thefile->filePtr - thefile->dataRead + thefile->bufpos + *offset); in apr_file_seek() 80 *offset = thefile->filePtr - thefile->dataRead + thefile->bufpos; in apr_file_seek() 104 if (fp->direction == 1 && fp->bufpos != 0) { in apr_file_trunc() 105 apr_off_t len = fp->filePtr + fp->bufpos; in apr_file_trunc() 111 if (off >= 0 && off <= fp->bufpos) in apr_file_trunc() 112 fp->bufpos = fp->bufpos - (size_t)off; in apr_file_trunc() 114 fp->bufpos = 0; in apr_file_trunc() [all …]
|
| H A D | readwrite.c | 41 thefile->bufpos = 0; in file_read_buffered() 54 if (thefile->bufpos >= thefile->dataRead) { in file_read_buffered() 68 thefile->bufpos = 0; in file_read_buffered() 71 …blocksize = size > thefile->dataRead - thefile->bufpos ? thefile->dataRead - thefile->bufpos : siz… in file_read_buffered() 73 thefile->bufpos += blocksize; in file_read_buffered() 165 thefile->bufpos = thefile->dataRead = 0; in apr_file_write() 177 thefile->bufpos += blocksize; in apr_file_write() 246 thefile->bufpos; in apr_file_writev() 321 } while (written < thefile->bufpos && in apr_file_flush_locked() 327 thefile->bufpos = 0; in apr_file_flush_locked() [all …]
|
| H A D | buffer.c | 41 file->bufpos = 0; in apr_file_buffer_set()
|
| H A D | filedup.c | 150 memcpy((*new_file)->buffer, old_file->buffer, old_file->bufpos); in apr_file_setaside()
|
| H A D | open.c | 236 (*new)->bufpos = 0; in apr_file_open()
|
| /freebsd-12.1/sbin/dmesg/ |
| H A D | dmesg.c | 83 size_t buflen, bufpos; in main() local 154 bufpos = MSGBUF_SEQ_TO_POS(&cur, cur.msg_wseq); in main() 155 if (kvm_read(kd, (long)&cur.msg_ptr[bufpos], bp, in main() 156 cur.msg_size - bufpos) != (ssize_t)(cur.msg_size - bufpos)) in main() 158 if (bufpos != 0 && kvm_read(kd, (long)cur.msg_ptr, in main() 159 &bp[cur.msg_size - bufpos], bufpos) != (ssize_t)bufpos) in main()
|
| /freebsd-12.1/stand/libsa/ |
| H A D | lseek.c | 71 off_t bufpos, filepos, target; in lseek() local 108 bufpos = filepos - f->f_ralen; in lseek() 114 target = bufpos + offset; in lseek() 120 if (bufpos <= target && target < filepos) { in lseek() 121 f->f_raoffset += target - bufpos; in lseek() 122 f->f_ralen -= target - bufpos; in lseek()
|
| /freebsd-12.1/contrib/diff/src/ |
| H A D | sdiff.c | 352 char *bufpos; member 370 lf->bufpos = lf->buffer; in lf_refill() 381 char *start = lf->bufpos; in lf_copy() 385 lf->bufpos = (char *) memchr (lf->bufpos, '\n', lf->buflim - lf->bufpos); in lf_copy() 386 if (! lf->bufpos) in lf_copy() 391 start = lf->bufpos; in lf_copy() 396 ++lf->bufpos; in lf_copy() 409 lf->bufpos = (char *) memchr (lf->bufpos, '\n', lf->buflim - lf->bufpos); in lf_skip() 410 if (! lf->bufpos) in lf_skip() 418 ++lf->bufpos; in lf_skip() [all …]
|
| /freebsd-12.1/contrib/ldns/drill/ |
| H A D | work.c | 28 size_t bufpos = 0; in hexstr2bin() local 53 if (bufpos + offset + 1 <= buf_len) { in hexstr2bin() 54 buf[bufpos+offset] = int8; in hexstr2bin() 57 bufpos++; in hexstr2bin() 64 return bufpos; in hexstr2bin()
|
| /freebsd-12.1/contrib/pf/pflogd/ |
| H A D | pflogd.c | 105 static char *bufpos = NULL; /* position in buffer */ variable 534 int len = bufpos - buffer; 556 bufpos = buffer; 569 bufpos = buffer; 618 memcpy(bufpos, &sh, sizeof(sh)); 619 memcpy(bufpos + sizeof(sh), sp, h->caplen); 621 memcpy(bufpos, h, sizeof(*h)); 622 memcpy(bufpos + sizeof(*h), sp, h->caplen); 625 bufpos += len; 752 bufpos = buffer;
|
| /freebsd-12.1/crypto/openssl/crypto/asn1/ |
| H A D | bio_asn1.c | 47 int bufpos; member 196 ret = BIO_write(next, ctx->buf + ctx->bufpos, ctx->buflen); in asn1_bio_write() 202 ctx->bufpos += ret; in asn1_bio_write() 204 ctx->bufpos = 0; in asn1_bio_write()
|
| /freebsd-12.1/contrib/netcat/ |
| H A D | netcat.c | 976 drainbuf(int fd, unsigned char *buf, size_t *bufpos) in drainbuf() argument 981 n = write(fd, buf, *bufpos); in drainbuf() 988 adjust = *bufpos - n; in drainbuf() 991 *bufpos -= n; in drainbuf() 997 fillbuf(int fd, unsigned char *buf, size_t *bufpos) in fillbuf() argument 999 size_t num = BUFSIZE - *bufpos; in fillbuf() 1002 n = read(fd, buf + *bufpos, num); in fillbuf() 1008 *bufpos += n; in fillbuf()
|
| /freebsd-12.1/crypto/openssh/regress/ |
| H A D | netcat.c | 955 drainbuf(int fd, unsigned char *buf, size_t *bufpos) in drainbuf() argument 960 n = write(fd, buf, *bufpos); in drainbuf() 967 adjust = *bufpos - n; in drainbuf() 970 *bufpos -= n; in drainbuf() 976 fillbuf(int fd, unsigned char *buf, size_t *bufpos) in fillbuf() argument 978 size_t num = BUFSIZE - *bufpos; in fillbuf() 981 n = read(fd, buf + *bufpos, num); in fillbuf() 987 *bufpos += n; in fillbuf()
|
| /freebsd-12.1/contrib/bmake/ |
| H A D | parse.c | 493 size_t bufpos; in loadfile() local 559 bufpos = 0; in loadfile() 561 assert(bufpos <= lf->len); in loadfile() 562 if (bufpos == lf->len) { in loadfile() 571 assert(bufpos < lf->len); in loadfile() 572 result = read(fd, lf->buf + bufpos, lf->len - bufpos); in loadfile() 580 bufpos += result; in loadfile() 582 assert(bufpos <= lf->len); in loadfile() 583 lf->len = bufpos; in loadfile()
|
| /freebsd-12.1/lib/libfetch/ |
| H A D | http.c | 137 size_t bufpos; /* current read offset in buffer */ member 230 io->bufpos = 0; in http_fillbuf() 255 io->bufpos = 0; in http_fillbuf() 283 if (!io->buf || io->bufpos == io->buflen) { in http_readfn() 293 rlen = io->buflen - io->bufpos; in http_readfn() 296 memcpy(buf, io->buf + io->bufpos, rlen); in http_readfn() 297 io->bufpos += rlen; in http_readfn()
|
| /freebsd-12.1/contrib/apr/include/arch/unix/ |
| H A D | apr_arch_file_io.h | 110 apr_size_t bufpos; /* Read/Write position in buffer */ member
|
| /freebsd-12.1/cddl/contrib/opensolaris/tools/ctf/cvt/ |
| H A D | ctf.c | 649 caddr_t bufpos; in write_buffer() local 654 bufpos = outbuf; in write_buffer() 655 (void) bcopy_data(h, sizeof (ctf_header_t), &bufpos); in write_buffer() 657 &bufpos); in write_buffer() 658 (void) strtab_write(&buf->ctb_strtab, bcopy_data, &bufpos); in write_buffer() 659 *resszp = bufpos - outbuf; in write_buffer()
|
| /freebsd-12.1/contrib/apr/docs/ |
| H A D | incomplete_types | 33 int bufpos;
|