Lines Matching refs:xcp
931 static char *xcp; /* current position */ variable
1158 for (cp = xcp; cp < (xcp + nb); ++nc) in x_nb2nc()
1241 xlp = xcp = xep = buf; in x_emacs()
1242 *xcp = 0; in x_emacs()
1303 x_goto(xcp); in x_emacs()
1384 memmove(xcp + len, xcp, xep - xcp + 1); in x_do_ins()
1385 memmove(xcp, cp, len); in x_do_ins()
1386 xcp += len; in x_do_ins()
1395 char *cp = xcp; in x_ins()
1406 x_adj_ok = tobool(xcp >= xlp); in x_ins()
1420 if (xcp == xbuf) { in x_del_back()
1425 x_goto(xcp - 1); in x_del_back()
1426 } while ((++i < x_arg) && (xcp != xbuf)); in x_del_back()
1437 cp = xcp; in x_del_char()
1465 cp = xcp; in x_delete()
1476 nb = cp - xcp; in x_delete()
1479 if (xmp != NULL && xmp > xcp) { in x_delete()
1480 if (xcp + nb > xmp) in x_delete()
1481 xmp = xcp; in x_delete()
1493 memmove(xcp, xcp + nb, xep - xcp + 1); in x_delete()
1497 x_zots(xcp); in x_delete()
1554 char *cp = xcp; in x_bword()
1578 char *cp = xcp; in x_fword()
1590 nc = x_nb2nc(cp - xcp); in x_fword()
1602 xcp = cp; in x_goto()
1604 } else if (cp < xcp) { in x_goto()
1606 while (cp < xcp) in x_goto()
1607 x_bs3(&xcp); in x_goto()
1608 } else if (cp > xcp) { in x_goto()
1610 while (cp > xcp) in x_goto()
1611 x_zotc3(&xcp); in x_goto()
1684 if (xcp == xbuf) { in x_mv_back()
1689 x_goto(xcp - 1); in x_mv_back()
1690 if (xcp == xbuf) in x_mv_back()
1699 char *cp = xcp, *cp2; in x_mv_forw()
1701 if (xcp == xep) { in x_mv_forw()
1718 char *cp = xcp; in x_search_char_forw()
1740 char *cp = xcp, *p, tmp[4]; in x_search_char_back()
1858 xep = xcp = strnul(xbuf); in x_load_hist()
2012 size_t curs = xcp - xbuf; in x_search_dir()
2042 x_push(xep - (xcp = xbuf)); in x_del_line()
2045 *xcp = 0; in x_del_line()
2166 if (xcp == xbuf) { in x_transpose()
2169 } else if (xcp == xep || Flag(FGMACS)) { in x_transpose()
2170 if (xcp - xbuf == 1) { in x_transpose()
2178 x_bs3(&xcp); in x_transpose()
2179 if (utf_mbtowc(&tmpa, xcp) == (size_t)-1) { in x_transpose()
2183 x_bs3(&xcp); in x_transpose()
2184 if (utf_mbtowc(&tmpb, xcp) == (size_t)-1) { in x_transpose()
2188 utf_wctomb(xcp, tmpa); in x_transpose()
2189 x_zotc3(&xcp); in x_transpose()
2190 utf_wctomb(xcp, tmpb); in x_transpose()
2191 x_zotc3(&xcp); in x_transpose()
2197 if (utf_mbtowc(&tmpa, xcp) == (size_t)-1) { in x_transpose()
2201 x_bs3(&xcp); in x_transpose()
2202 if (utf_mbtowc(&tmpb, xcp) == (size_t)-1) { in x_transpose()
2206 utf_wctomb(xcp, tmpa); in x_transpose()
2207 x_zotc3(&xcp); in x_transpose()
2208 utf_wctomb(xcp, tmpb); in x_transpose()
2209 x_zotc3(&xcp); in x_transpose()
2246 size_t col = xcp - xbuf; in x_kill()
2265 strndupx(killstack[killsp], xcp, nchars, AEDIT); in x_push()
2282 xmp = xcp; in x_yank()
2300 x_goto(xcp - len); in x_meta_yank()
2321 xlp = xep = xcp = xbp = xbuf; in x_intr()
2323 *xcp = 0; in x_intr()
2604 xmp = xcp; in x_set_mark()
2618 if (xmp > xcp) { in x_kill_region()
2619 rsize = xmp - xcp; in x_kill_region()
2620 xr = xcp; in x_kill_region()
2622 rsize = xcp - xmp; in x_kill_region()
2641 xmp = xcp; in x_xchg_point_mark()
2711 nwords = x_cf_glob(&i, xbuf, xep - xbuf, xcp - xbuf, in x_expand()
2745 nwords = x_cf_glob(&flags, xbuf, xep - xbuf, xcp - xbuf, in do_complete()
2797 xcp = xbuf + start; in do_complete()
2799 memmove(xcp, xcp + olen, xep - xcp + 1); in do_complete()
2848 if ((xbp = xcp - (x_displen / 2)) < xbuf) in x_adjust()
2855 xbp = xcp >= xep ? xep : x_bs0(xcp, xbuf); in x_adjust()
2862 if (xbp == xbuf && xcp != xbuf && col_left >= 0 && col_left < pwidth) { in x_adjust()
3051 xcp = xbp = xbuf; in x_comment()
3063 char *o_xbp = xbp, *o_xep = xep, *o_xcp = xcp; in x_version()
3068 xbuf = xbp = xcp = v; in x_version()
3078 xcp = o_xcp; in x_version()
3237 char *cp = xcp; in x_fold_case()
3316 while (cp > xcp) in x_lastpos()
5608 } else if (xmp < xcp) { in x_eval_region()
5610 evend = xcp; in x_eval_region()
5612 evbeg = xcp; in x_eval_region()
5638 xcp = evbeg + newlen; in x_eval_region()
5639 xep = xcp + restlen; in x_eval_region()
5640 memmove(xcp, evend, restlen + /* NUL */ 1); in x_eval_region()