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. */ in gl_nth_word_end_forward() local
7498 bufpos = gl->buff_curpos + 1; in gl_nth_word_end_forward()
7504 if(bufpos >= gl->ntotal) in gl_nth_word_end_forward()
7509 for(i=0; i<n && bufpos<gl->ntotal; i++) { in gl_nth_word_end_forward()
7513 for( ; bufpos<gl->ntotal && !gl_is_word_char((int)gl->line[bufpos]); in gl_nth_word_end_forward()
7514 bufpos++) in gl_nth_word_end_forward()
7519 for( ; bufpos<gl->ntotal && gl_is_word_char((int)gl->line[bufpos]); in gl_nth_word_end_forward()
7520 bufpos++) in gl_nth_word_end_forward()
7526 return bufpos > 0 ? bufpos-1 : bufpos; in gl_nth_word_end_forward()
7542 int bufpos; /* The buffer index being checked. */ in gl_nth_word_start_forward() local
7547 bufpos = gl->buff_curpos; in gl_nth_word_start_forward()
7551 for(i=0; i<n && bufpos<gl->ntotal; i++) { in gl_nth_word_start_forward()
7555 for( ; bufpos<gl->ntotal && gl_is_word_char((int)gl->line[bufpos]); in gl_nth_word_start_forward()
7556 bufpos++) in gl_nth_word_start_forward()
7561 for( ; bufpos<gl->ntotal && !gl_is_word_char((int)gl->line[bufpos]); in gl_nth_word_start_forward()
7562 bufpos++) in gl_nth_word_start_forward()
7565 return bufpos; in gl_nth_word_start_forward()
7581 int bufpos; /* The buffer index being checked. */ in gl_nth_word_start_backward() local
7586 bufpos = gl->buff_curpos; in gl_nth_word_start_backward()
7591 for(i=0; i<n && bufpos > gl->insert_curpos; i++) { in gl_nth_word_start_backward()
7597 while(--bufpos >= gl->insert_curpos && in gl_nth_word_start_backward()
7598 !gl_is_word_char((int)gl->line[bufpos])) in gl_nth_word_start_backward()
7603 while(--bufpos >= gl->insert_curpos && in gl_nth_word_start_backward()
7604 gl_is_word_char((int)gl->line[bufpos])) in gl_nth_word_start_backward()
7609 bufpos++; in gl_nth_word_start_backward()
7611 return bufpos >= gl->insert_curpos ? bufpos : gl->insert_curpos; in gl_nth_word_start_backward()
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;
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);