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

1 /*-
28 * v_chrepeat -- [count];
34 v_chrepeat(SCR *sp, VICMD *vp) in v_chrepeat() argument
36 vp->character = VIP(sp)->lastckey; in v_chrepeat()
38 switch (VIP(sp)->csearchdir) { in v_chrepeat()
43 return (v_chF(sp, vp)); in v_chrepeat()
45 return (v_chf(sp, vp)); in v_chrepeat()
47 return (v_chT(sp, vp)); in v_chrepeat()
49 return (v_cht(sp, vp)); in v_chrepeat()
57 * v_chrrepeat -- [count],
63 v_chrrepeat(SCR *sp, VICMD *vp) in v_chrrepeat() argument
68 vp->character = VIP(sp)->lastckey; in v_chrrepeat()
69 savedir = VIP(sp)->csearchdir; in v_chrrepeat()
71 switch (VIP(sp)->csearchdir) { in v_chrrepeat()
76 rval = v_chf(sp, vp); in v_chrrepeat()
79 rval = v_chF(sp, vp); in v_chrrepeat()
82 rval = v_cht(sp, vp); in v_chrrepeat()
85 rval = v_chT(sp, vp); in v_chrrepeat()
90 VIP(sp)->csearchdir = savedir; in v_chrrepeat()
95 * v_cht -- [count]tc
102 v_cht(SCR *sp, VICMD *vp) in v_cht() argument
104 if (v_chf(sp, vp)) in v_cht()
112 --vp->m_stop.cno; in v_cht()
118 if (!ISMOTION(vp)) in v_cht()
119 vp->m_final = vp->m_stop; in v_cht()
121 VIP(sp)->csearchdir = tSEARCH; in v_cht()
126 * v_chf -- [count]fc
133 v_chf(SCR *sp, VICMD *vp) in v_chf() argument
139 CHAR_T *endp, *p, *startp; in v_chf() local
146 key = vp->character; in v_chf()
147 if (!F_ISSET(vp, VC_ISDOT)) in v_chf()
148 VIP(sp)->lastckey = key; in v_chf()
149 VIP(sp)->csearchdir = fSEARCH; in v_chf()
151 if (db_eget(sp, vp->m_start.lno, &p, &len, &isempty)) { in v_chf()
162 endp = (startp = p) + len; in v_chf()
163 p += vp->m_start.cno; in v_chf()
164 for (cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; cnt--;) { in v_chf()
165 while (++p < endp && *p != key); in v_chf()
166 if (p == endp) { in v_chf()
172 vp->m_stop.cno = p - startp; in v_chf()
175 * Non-motion commands move to the end of the range. in v_chf()
178 vp->m_final = ISMOTION(vp) ? vp->m_start : vp->m_stop; in v_chf()
183 * v_chT -- [count]Tc
190 v_chT(SCR *sp, VICMD *vp) in v_chT() argument
192 if (v_chF(sp, vp)) in v_chT()
200 if (vp->m_start.cno == vp->m_stop.cno) { in v_chT()
209 ++vp->m_stop.cno; in v_chT()
210 vp->m_final = vp->m_stop; in v_chT()
212 VIP(sp)->csearchdir = TSEARCH; in v_chT()
217 * v_chF -- [count]Fc
224 v_chF(SCR *sp, VICMD *vp) in v_chF() argument
230 CHAR_T *endp, *p; in v_chF() local
238 key = vp->character; in v_chF()
239 if (!F_ISSET(vp, VC_ISDOT)) in v_chF()
240 VIP(sp)->lastckey = key; in v_chF()
241 VIP(sp)->csearchdir = FSEARCH; in v_chF()
243 if (db_eget(sp, vp->m_start.lno, &p, &len, &isempty)) { in v_chF()
254 endp = p - 1; in v_chF()
255 p += vp->m_start.cno; in v_chF()
256 for (cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; cnt--;) { in v_chF()
257 while (--p > endp && *p != key); in v_chF()
258 if (p == endp) { in v_chF()
264 vp->m_stop.cno = (p - endp) - 1; in v_chF()
271 vp->m_final = vp->m_stop; in v_chF()
272 if (ISMOTION(vp)) in v_chF()
273 --vp->m_start.cno; in v_chF()