Lines Matching refs:curpos
461 static int find_prev_word_start(const char *line, int curpos) in find_prev_word_start() argument
463 if (curpos <= 0) return 0; in find_prev_word_start()
466 while (--curpos > 0 && (line[curpos] == ' ' || line[curpos] == '\t')); in find_prev_word_start()
469 while (curpos > 0 && !(line[curpos] == ' ' || line[curpos] == '\t')) in find_prev_word_start()
470 curpos--; in find_prev_word_start()
472 return (curpos <= 0) ? 0 : curpos + 1; in find_prev_word_start()
475 static int find_next_word_end(const char *line, int curpos, int max) in find_next_word_end() argument
477 if (curpos >= max) return max; in find_next_word_end()
480 while (curpos < max && (line[curpos] == ' ' || line[curpos] == '\t')) in find_next_word_end()
481 curpos++; in find_next_word_end()
484 while (curpos < max && !(line[curpos] == ' ' || line[curpos] == '\t')) in find_next_word_end()
485 curpos++; in find_next_word_end()
487 return curpos; in find_next_word_end()