Lines Matching +full:vp +full:- +full:p

1 /*-
28 * v_replace -- [count]r<char>
42 v_replace(SCR *sp, VICMD *vp) in v_replace() argument
51 CHAR_T *p; in v_replace() local
66 if (db_get(sp, vp->m_start.lno, DBG_FATAL, &p, &len)) in v_replace()
83 cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; in v_replace()
84 vp->m_stop.lno = vp->m_start.lno; in v_replace()
85 vp->m_stop.cno = vp->m_start.cno + cnt - 1; in v_replace()
86 if (vp->m_stop.cno > len - 1) { in v_replace()
87 v_eol(sp, &vp->m_start); in v_replace()
96 if (!F_ISSET(vp, VC_ISDOT)) { in v_replace()
97 sp->showmode = SM_REPLACE; in v_replace()
117 vip->rlast = ev.e_c; in v_replace()
118 vip->rvalue = ev.e_value; in v_replace()
143 MEMMOVE(bp, p, len); in v_replace()
144 p = bp; in v_replace()
148 * N characters with <carriage-return> or <newline> characters. This in v_replace()
152 if ((!quote && vip->rvalue == K_CR) || vip->rvalue == K_NL) { in v_replace()
154 vp->m_stop.lno = vp->m_start.lno + 1; in v_replace()
155 vp->m_stop.cno = 0; in v_replace()
158 if (db_set(sp, vp->m_start.lno, p, vp->m_start.cno)) in v_replace()
168 p += vp->m_start.cno + cnt; in v_replace()
169 len -= vp->m_start.cno + cnt; in v_replace()
171 for (; len && isblank(*p); --len, ++p); in v_replace()
173 if ((tp = text_init(sp, p, len, len)) == NULL) in v_replace()
177 if (v_txt_auto(sp, vp->m_start.lno, NULL, 0, tp)) in v_replace()
179 vp->m_stop.cno = tp->ai ? tp->ai - 1 : 0; in v_replace()
181 vp->m_stop.cno = 0; in v_replace()
183 vp->m_stop.cno = tp->ai ? tp->ai - 1 : 0; in v_replace()
184 if (db_append(sp, 1, vp->m_start.lno, tp->lb, tp->len)) in v_replace()
191 STRSET(bp + vp->m_start.cno, vip->rlast, cnt); in v_replace()
192 rval = db_set(sp, vp->m_start.lno, bp, len); in v_replace()
196 vp->m_final = vp->m_stop; in v_replace()