bufpos
bufpos = filepos - f->f_ralen;
target = bufpos + offset;
if (bufpos <= target && target < filepos) {
f->f_raoffset += target - bufpos;
f->f_ralen -= target - bufpos;
off_t bufpos, filepos, target;
static int gl_buffer_char(GetLine *gl, char c, int bufpos)
if(bufpos >= gl->linelen)
gl->line[bufpos] = c;
if(bufpos >= gl->ntotal) {
gl->ntotal = bufpos+1;
static int gl_buffer_string(GetLine *gl, const char *s, int n, int bufpos)
nnew = bufpos + n <= gl->linelen ? n : (gl->linelen - bufpos);
gl_buffer_char(gl, s[i], bufpos + i);
int bufpos; /* The buffer index being checked. */
bufpos = gl->buff_curpos + 1;
if(bufpos >= gl->ntotal)
for(i=0; i<n && bufpos<gl->ntotal; i++) {
for( ; bufpos<gl->ntotal && !gl_is_word_char((int)gl->line[bufpos]);
bufpos++)
for( ; bufpos<gl->ntotal && gl_is_word_char((int)gl->line[bufpos]);
bufpos++)
return bufpos > 0 ? bufpos-1 : bufpos;
int bufpos; /* The buffer index being checked. */
bufpos = gl->buff_curpos;
for(i=0; i<n && bufpos<gl->ntotal; i++) {
for( ; bufpos<gl->ntotal && gl_is_word_char((int)gl->line[bufpos]);
bufpos++)
for( ; bufpos<gl->ntotal && !gl_is_word_char((int)gl->line[bufpos]);
bufpos++)
return bufpos;
int bufpos; /* The buffer index being checked. */
bufpos = gl->buff_curpos;
for(i=0; i<n && bufpos > gl->insert_curpos; i++) {
while(--bufpos >= gl->insert_curpos &&
!gl_is_word_char((int)gl->line[bufpos]))
while(--bufpos >= gl->insert_curpos &&
gl_is_word_char((int)gl->line[bufpos]))
bufpos++;
return bufpos >= gl->insert_curpos ? bufpos : gl->insert_curpos;
static int gl_buffer_char(GetLine *gl, char c, int bufpos);
static int gl_buffer_string(GetLine *gl, const char *s, int n, int bufpos);
src = &engp->bufpos;
dst = &engp->bufpos;
if (engp->bufpos + sz >= engp->bufendp) {
cpsz = (size_t)engp->bufendp - (size_t)engp->bufpos;
engp->bufpos = engp->bufp;
engp->bufpos += cpsz;
engp->bufpos = engp->bufp;
engp->bufpos = NULL;
caddr_t bufpos; /* buffer position */
pkt->bufpos = 2;
pkt->buf[pkt->bufpos++] = *pkt->inbuf;
if (pkt->bufpos >= sizeof (dp_header_t)) {
} else if ((pkt->bufpos >= sizeof (bp_msg_t)) &&
"bufpos=%d\n", pkt->bufpos));
pkt->buf[pkt->bufpos++] = *pkt->inbuf;
if (pkt->bufpos >= sizeof (dp_header_t)) {
} else if ((pkt->bufpos >= sizeof (bp_msg_t)) &&
max = pkt->full_length - pkt->bufpos;
bcopy(pkt->inbuf, pkt->buf + pkt->bufpos,
pkt->bufpos += count;
if (pkt->bufpos >= pkt->full_length) {
pkt->buf[pkt->bufpos] = *pkt->inbuf;
pkt->bufpos++;
if (pkt->bufpos >= pkt->full_length) {
int16_t bufpos; /* Position in buffer. */