Home
last modified time | relevance | path

Searched refs:bufpos (Results 1 – 21 of 21) sorted by relevance

/freebsd-13.1/contrib/apr/file_io/unix/
H A Dseek.c29 thefile->bufpos = thefile->direction = thefile->dataRead = 0; in setptr()
34 thefile->bufpos = newbufpos; in setptr()
39 thefile->bufpos = thefile->dataRead = 0; in setptr()
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()
118 fp->bufpos = fp->direction = fp->dataRead = 0; in apr_file_trunc()
[all …]
H A Dreadwrite.c41 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 Dbuffer.c41 file->bufpos = 0; in apr_file_buffer_set()
H A Dfiledup.c150 memcpy((*new_file)->buffer, old_file->buffer, old_file->bufpos); in apr_file_setaside()
H A Dopen.c236 (*new)->bufpos = 0; in apr_file_open()
/freebsd-13.1/sys/dev/bhnd/nvram/
H A Dbhnd_nvram_data_btxt.c157 bufpos = 0; in bhnd_nvram_btxt_getvar_direct()
173 bufpos = 0; in bhnd_nvram_btxt_getvar_direct()
190 while (bufpos < buflen && bhnd_nv_isspace(buf[bufpos])) in bhnd_nvram_btxt_getvar_direct()
192 bufpos++; in bhnd_nvram_btxt_getvar_direct()
198 } else if (bufpos < buflen && buf[bufpos] == '#') { in bhnd_nvram_btxt_getvar_direct()
242 bufpos++; in bhnd_nvram_btxt_getvar_direct()
256 p = memchr(buf+bufpos, '\n', buflen - bufpos); in bhnd_nvram_btxt_getvar_direct()
258 p = memchr(buf+bufpos, '\r', buflen - bufpos); in bhnd_nvram_btxt_getvar_direct()
280 p = memchr(buf+bufpos, '\n', buflen - bufpos); in bhnd_nvram_btxt_getvar_direct()
282 p = memchr(buf+bufpos, '\r', buflen - bufpos); in bhnd_nvram_btxt_getvar_direct()
[all …]
H A Dbhnd_nvram_data_bcm.c184 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-13.1/usr.bin/grep/
H A Dfile.c59 static char *bufpos; variable
74 bufpos = buffer; in grep_refill()
112 return (bufpos); in grep_fgetln()
118 len = p - bufpos; in grep_fgetln()
121 memcpy(lnbuf, bufpos, len); in grep_fgetln()
123 bufpos = p; in grep_fgetln()
151 diff = p - bufpos; in grep_fgetln()
155 memcpy(lnbuf + off, bufpos, diff); in grep_fgetln()
157 bufpos = p; in grep_fgetln()
204 bufpos = buffer; in grep_open()
[all …]
/freebsd-13.1/sbin/dmesg/
H A Ddmesg.c83 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-13.1/stand/libsa/
H A Dlseek.c71 off_t bufpos, filepos, target; in lseek() local
110 bufpos = filepos - f->f_ralen; in lseek()
116 target = bufpos + offset; in lseek()
122 if (bufpos <= target && target < filepos) { in lseek()
123 f->f_raoffset += target - bufpos; in lseek()
124 f->f_ralen -= target - bufpos; in lseek()
/freebsd-13.1/contrib/diff/src/
H A Dsdiff.c352 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-13.1/contrib/ldns/drill/
H A Dwork.c28 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-13.1/contrib/pf/pflogd/
H A Dpflogd.c105 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-13.1/crypto/openssl/crypto/asn1/
H A Dbio_asn1.c47 int bufpos; member
201 ret = BIO_write(next, ctx->buf + ctx->bufpos, ctx->buflen); in asn1_bio_write()
207 ctx->bufpos += ret; in asn1_bio_write()
209 ctx->bufpos = 0; in asn1_bio_write()
/freebsd-13.1/contrib/netcat/
H A Dnetcat.c1022 drainbuf(int fd, unsigned char *buf, size_t *bufpos) in drainbuf() argument
1027 n = write(fd, buf, *bufpos); in drainbuf()
1034 adjust = *bufpos - n; in drainbuf()
1037 *bufpos -= n; in drainbuf()
1043 fillbuf(int fd, unsigned char *buf, size_t *bufpos) in fillbuf() argument
1045 size_t num = BUFSIZE - *bufpos; in fillbuf()
1048 n = read(fd, buf + *bufpos, num); in fillbuf()
1054 *bufpos += n; in fillbuf()
/freebsd-13.1/crypto/openssh/regress/
H A Dnetcat.c964 drainbuf(int fd, unsigned char *buf, size_t *bufpos) in drainbuf() argument
969 n = write(fd, buf, *bufpos); in drainbuf()
976 adjust = *bufpos - n; in drainbuf()
979 *bufpos -= n; in drainbuf()
985 fillbuf(int fd, unsigned char *buf, size_t *bufpos) in fillbuf() argument
987 size_t num = BUFSIZE - *bufpos; in fillbuf()
990 n = read(fd, buf + *bufpos, num); in fillbuf()
996 *bufpos += n; in fillbuf()
/freebsd-13.1/contrib/apr/include/arch/unix/
H A Dapr_arch_file_io.h110 apr_size_t bufpos; /* Read/Write position in buffer */ member
/freebsd-13.1/lib/libfetch/
H A Dhttp.c138 size_t bufpos; /* current read offset in buffer */ member
231 io->bufpos = 0; in http_fillbuf()
256 io->bufpos = 0; in http_fillbuf()
284 if (!io->buf || io->bufpos == io->buflen) { in http_readfn()
294 rlen = io->buflen - io->bufpos; in http_readfn()
297 memcpy(buf, io->buf + io->bufpos, rlen); in http_readfn()
298 io->bufpos += rlen; in http_readfn()
/freebsd-13.1/cddl/contrib/opensolaris/tools/ctf/cvt/
H A Dctf.c642 caddr_t bufpos; in write_buffer() local
647 bufpos = outbuf; in write_buffer()
648 (void) bcopy_data(h, sizeof (ctf_header_t), &bufpos); in write_buffer()
650 &bufpos); in write_buffer()
651 (void) strtab_write(&buf->ctb_strtab, bcopy_data, &bufpos); in write_buffer()
652 *resszp = bufpos - outbuf; in write_buffer()
/freebsd-13.1/contrib/sendmail/src/
H A Dsm_resolve.c529 gen_dns_reply(buf, buflen, bufpos, query, qtype, domain, class, type, ttl, size, data, txtlen, pref… in gen_dns_reply() argument
532 unsigned char *bufpos;
558 if (bufpos != NULL)
559 cp = bufpos;
/freebsd-13.1/contrib/apr/docs/
H A Dincomplete_types33 int bufpos;