• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /barrelfish-2018-10-04/lib/linenoise/

Lines Matching refs:pos

144     size_t pos;         /* Current cursor position. */
187 (int)l->len,(int)l->pos,(int)l->oldpos,plen,rows,rpos, \
367 ls->len = ls->pos = strlen(lc.cvec[i]);
371 ls->pos = saved.pos;
397 ls->len = ls->pos = nwritten;
473 size_t pos = l->pos;
476 while((plen+pos) >= l->cols) {
479 pos--;
496 snprintf(seq,64,"\r\x1b[%dC", (int)(pos+plen));
547 if (l->pos &&
548 l->pos == l->len &&
549 (l->pos+plen) % l->cols == 0)
560 rpos2 = (plen+l->pos+l->cols)/l->cols; /* current cursor relative row. */
571 col = (plen+(int)l->pos) % (int)l->cols;
580 l->oldpos = l->pos;
600 if (l->len == l->pos) {
601 l->buf[l->pos] = c;
602 l->pos++;
613 memmove(l->buf+l->pos+1,l->buf+l->pos,l->len-l->pos);
614 l->buf[l->pos] = c;
616 l->pos++;
626 if (l->pos > 0) {
627 l->pos--;
634 if (l->pos != l->len) {
635 l->pos++;
642 if (l->pos != 0) {
643 l->pos = 0;
650 if (l->pos != l->len) {
651 l->pos = l->len;
677 l->len = l->pos = strlen(l->buf);
685 if (l->len > 0 && l->pos < l->len) {
686 memmove(l->buf+l->pos,l->buf+l->pos+1,l->len-l->pos-1);
695 if (l->pos > 0 && l->len > 0) {
696 memmove(l->buf+l->pos-1,l->buf+l->pos,l->len-l->pos);
697 l->pos--;
707 size_t old_pos = l->pos;
710 while (l->pos > 0 && l->buf[l->pos-1] == ' ')
711 l->pos--;
712 while (l->pos > 0 && l->buf[l->pos-1] != ' ')
713 l->pos--;
714 diff = old_pos - l->pos;
715 memmove(l->buf+l->pos,l->buf+old_pos,l->len-old_pos+1);
740 l.oldpos = l.pos = 0;
798 if (l.pos > 0 && l.pos < l.len) {
799 int aux = buf[l.pos-1];
800 buf[l.pos-1] = buf[l.pos];
801 buf[l.pos] = aux;
802 if (l.pos != l.len-1) l.pos++;
878 l.pos = l.len = 0;
882 buf[l.pos] = '\0';
883 l.len = l.pos;