Lines Matching refs:bufpos

853 static int gl_buffer_char(GetLine *gl, char c, int bufpos);
858 static int gl_buffer_string(GetLine *gl, const char *s, int n, int bufpos);
7491 int bufpos; /* The buffer index being checked. */
7498 bufpos = gl->buff_curpos + 1;
7504 if(bufpos >= gl->ntotal)
7509 for(i=0; i<n && bufpos<gl->ntotal; i++) {
7513 for( ; bufpos<gl->ntotal && !gl_is_word_char((int)gl->line[bufpos]);
7514 bufpos++)
7519 for( ; bufpos<gl->ntotal && gl_is_word_char((int)gl->line[bufpos]);
7520 bufpos++)
7526 return bufpos > 0 ? bufpos-1 : bufpos;
7542 int bufpos; /* The buffer index being checked. */
7547 bufpos = gl->buff_curpos;
7551 for(i=0; i<n && bufpos<gl->ntotal; i++) {
7555 for( ; bufpos<gl->ntotal && gl_is_word_char((int)gl->line[bufpos]);
7556 bufpos++)
7561 for( ; bufpos<gl->ntotal && !gl_is_word_char((int)gl->line[bufpos]);
7562 bufpos++)
7565 return bufpos;
7581 int bufpos; /* The buffer index being checked. */
7586 bufpos = gl->buff_curpos;
7591 for(i=0; i<n && bufpos > gl->insert_curpos; i++) {
7597 while(--bufpos >= gl->insert_curpos &&
7598 !gl_is_word_char((int)gl->line[bufpos]))
7603 while(--bufpos >= gl->insert_curpos &&
7604 gl_is_word_char((int)gl->line[bufpos]))
7609 bufpos++;
7611 return bufpos >= gl->insert_curpos ? bufpos : gl->insert_curpos;
11971 * bufpos int The index in the buffer at which to record the
11977 static int gl_buffer_char(GetLine *gl, char c, int bufpos)
11982 if(bufpos >= gl->linelen)
11987 gl->line[bufpos] = c;
11993 if(bufpos >= gl->ntotal) {
11994 gl->ntotal = bufpos+1;
12009 * bufpos int The index in the buffer at which to place the
12015 static int gl_buffer_string(GetLine *gl, const char *s, int n, int bufpos)
12022 nnew = bufpos + n <= gl->linelen ? n : (gl->linelen - bufpos);
12027 gl_buffer_char(gl, s[i], bufpos + i);