Lines Matching refs:vp

135 #define editb	(*vp->ed)
138 #define putchar(c) ed_putchar(vp->ed,c)
217 register Vi_t *vp = ed->e_vi; in ed_viread() local
235 if(!vp) in ed_viread()
237 ed->e_vi = vp = newof(0,Vi_t,1,0); in ed_viread()
238 vp->lastline = (genchar*)malloc(MAXLINE*CHARSIZE); in ed_viread()
239 vp->direction = -1; in ed_viread()
240 vp->ed = ed; in ed_viread()
246 ed_setup(vp->ed,fd, reedit); in ed_viread()
258 ioctl(fd,FIORDCHK,&vp->typeahead); in ed_viread()
273 vp->typeahead = ((newtime-oldtime) < NTICKS); in ed_viread()
369 vp->first_wind = 0; in ed_viread()
372 vp->last_wind = i; in ed_viread()
373 vp->long_line = ' '; in ed_viread()
374 vp->long_char = ' '; in ed_viread()
375 vp->o_v_char = '\0'; in ed_viread()
376 vp->ocur_phys = 0; in ed_viread()
377 vp->ocur_virt = MAXCHAR; in ed_viread()
378 vp->ofirst_wind = 0; in ed_viread()
380 vp->u_column = INVALID - 1; in ed_viread()
381 vp->U_space = Ubuf; in ed_viread()
382 vp->u_space = ubuf; in ed_viread()
388 if( vp->last_cmd == '\0' ) in ed_viread()
392 vp->last_cmd = 'i'; in ed_viread()
393 vp->findchar = INVALID; in ed_viread()
394 vp->lastmotion = '\0'; in ed_viread()
395 vp->lastrepeat = 1; in ed_viread()
396 vp->repeat = 1; in ed_viread()
451 last_phys = ed_virt_to_phys(vp->ed,virtual,physical,last_virt,0,0); in ed_viread()
455 vp->last_wind = w_size - 1; in ed_viread()
458 vp->last_wind = last_phys; in ed_viread()
459 genncpy(window, virtual, vp->last_wind+1); in ed_viread()
473 && (vp->typeahead || cntl_char) ) in ed_viread()
475 refresh(vp,TRANSLATE); in ed_viread()
476 pr_string(vp,Prompt); in ed_viread()
477 putstring(vp,0, last_phys+1); in ed_viread()
479 ed_crlf(vp->ed); in ed_viread()
488 ed_crlf(vp->ed); in ed_viread()
491 vp->last_cmd = 'i'; in ed_viread()
492 save_last(vp); in ed_viread()
525 pr_string(vp,"\b\b\b\b \b\b"); in ed_viread()
536 pr_string(vp,Prompt); in ed_viread()
538 refresh(vp,CONTROL); in ed_viread()
540 refresh(vp,INPUT); in ed_viread()
545 refresh(vp,TRANSLATE); in ed_viread()
554 if(vp->ed->e_multiline) in ed_viread()
557 sync_cursor(vp); in ed_viread()
577 vp->U_saved = 0; in ed_viread()
580 cur_phys = vp->first_wind; in ed_viread()
581 vp->ofirst_wind = INVALID; in ed_viread()
582 refresh(vp,INPUT); in ed_viread()
585 getline(vp,APPEND); in ed_viread()
587 getline(vp,APPEND); in ed_viread()
589 getline(vp,ESC); in ed_viread()
590 if(vp->ed->e_multiline) in ed_viread()
591 cursor(vp, last_phys); in ed_viread()
600 if( vp->addnl ) in ed_viread()
603 ed_crlf(vp->ed); in ed_viread()
608 if(vp->bigvi) in ed_viread()
610 vp->bigvi = 0; in ed_viread()
620 if(vp->ed->nhlist) in ed_viread()
621 ed_histlist(vp->ed,0); in ed_viread()
638 static void append(Vi_t *vp,int c, int mode) in append() argument
663 static void backword(Vi_t *vp,int nwords, register int cmd) in backword() argument
707 static int cntlmode(Vi_t *vp) in cntlmode() argument
716 if(!vp->U_saved) in cntlmode()
720 gencpy(vp->U_space, virtual); in cntlmode()
721 vp->U_saved = 1; in cntlmode()
724 save_last(vp); in cntlmode()
726 real_u_space = vp->u_space; in cntlmode()
729 vp->repeat = 1; in cntlmode()
733 sync_cursor(vp); in cntlmode()
741 while( c=ed_getchar(vp->ed,-1) ) in cntlmode()
743 vp->repeat_set = 0; in cntlmode()
749 sync_cursor(vp); in cntlmode()
755 c = getcount(vp,c); in cntlmode()
757 vp->lastrepeat = vp->repeat; in cntlmode()
762 if(mvcursor(vp,c)) in cntlmode()
764 sync_cursor(vp); in cntlmode()
765 vp->repeat = 1; in cntlmode()
773 c = vp->last_cmd; in cntlmode()
774 vp->repeat = vp->lastrepeat; in cntlmode()
775 i = textmod(vp,c, c); in cntlmode()
779 i = textmod(vp,c, 0); in cntlmode()
792 vp->last_cmd = c; in cntlmode()
793 vp->lastrepeat = vp->repeat; in cntlmode()
795 vp->repeat = 1; in cntlmode()
808 if(vp->nonewline==0 && !vp->ed->e_nocrnl) in cntlmode()
810 vp->nonewline = 0; in cntlmode()
811 pr_string(vp,Prompt); in cntlmode()
813 cur_phys = vp->first_wind; in cntlmode()
814 vp->ofirst_wind = INVALID; in cntlmode()
815 vp->long_line = ' '; in cntlmode()
821 save_v(vp); in cntlmode()
822 del_line(vp,BAD); in cntlmode()
824 append(vp,c,APPEND); in cntlmode()
825 refresh(vp,CONTROL); in cntlmode()
826 ed_getchar(vp->ed,-1); in cntlmode()
827 restore_v(vp); in cntlmode()
828 ed_ungetchar(vp->ed,'a'); in cntlmode()
836 save_v(vp); in cntlmode()
837 switch( search(vp,c) ) in cntlmode()
850 if( vp->u_column == INVALID ) in cntlmode()
851 del_line(vp,BAD); in cntlmode()
853 restore_v(vp); in cntlmode()
861 if(vp->ed->hlist) in cntlmode()
863 if(vp->ed->hoff >= vp->ed->hmax) in cntlmode()
865 vp->ed->hoff++; in cntlmode()
869 curhline += vp->repeat; in cntlmode()
877 vp->u_space = tmp_u_space; in cntlmode()
878 vp->u_column = tmp_u_column; in cntlmode()
879 restore_v(vp); in cntlmode()
880 vp->u_space = real_u_space; in cntlmode()
883 save_v(vp); in cntlmode()
890 if(vp->ed->hlist) in cntlmode()
892 if(vp->ed->hoff == 0) in cntlmode()
894 vp->ed->hoff--; in cntlmode()
896 ed_histlist(vp->ed,*vp->ed->hlist!=0); in cntlmode()
897 vp->nonewline++; in cntlmode()
898 ed_ungetchar(vp->ed,cntl('L')); in cntlmode()
904 vp->u_space = tmp_u_space; in cntlmode()
905 i = vp->u_column; in cntlmode()
906 save_v(vp); in cntlmode()
907 vp->u_space = real_u_space; in cntlmode()
908 tmp_u_column = vp->u_column; in cntlmode()
909 vp->u_column = i; in cntlmode()
912 curhline -= vp->repeat; in cntlmode()
915 curhline += vp->repeat; in cntlmode()
918 save_v(vp); in cntlmode()
925 strcpy((char*)virtual,(char*)vp->u_space); in cntlmode()
927 ed_internal((char*)vp->u_space,vp->u_space); in cntlmode()
936 if(vp->ed->hlist) in cntlmode()
938 ed_histlist(vp->ed,0); in cntlmode()
940 ed_ungetchar(vp->ed,c); in cntlmode()
941 ed_ungetchar(vp->ed,cntl('L')); in cntlmode()
942 vp->nonewline = 1; in cntlmode()
950 restore_v(vp); in cntlmode()
954 save_v(vp); in cntlmode()
959 gencpy(virtual, vp->U_space); in cntlmode()
960 last_virt = genlen(vp->U_space) - 1; in cntlmode()
967 if(vp->repeat_set==0) in cntlmode()
973 if(vp->repeat_set==0) in cntlmode()
974 vp->repeat = histmin+1; in cntlmode()
975 if( vp->repeat <= histmin || vp->repeat > histmax ) in cntlmode()
979 curhline = vp->repeat; in cntlmode()
980 save_v(vp); in cntlmode()
989 if(ed_fulledit(vp->ed)==GOOD) in cntlmode()
1017 append(vp,'#', APPEND); in cntlmode()
1027 refresh(vp,INPUT); in cntlmode()
1033 if(!vp->ed->hlist) in cntlmode()
1036 if(vp->ed->hlist) in cntlmode()
1038 if(vp->repeat > vp->ed->nhlist-vp->ed->hoff) in cntlmode()
1040 curhline = vp->ed->hlist[vp->repeat+vp->ed->hoff-1]->index; in cntlmode()
1053 ed_ungetchar(vp->ed,x); in cntlmode()
1057 ed_ungetchar(vp->ed,c=ed_getchar(vp->ed,1)); in cntlmode()
1060 vp->repeat = 1; in cntlmode()
1068 vp->repeat = 1; in cntlmode()
1072 refresh(vp,CONTROL); in cntlmode()
1073 vp->repeat = 1; in cntlmode()
1086 static void cursor(Vi_t *vp,register int x) in cursor() argument
1092 cur_phys = ed_setcursor(vp->ed, physical, cur_phys,x,vp->first_wind); in cursor()
1106 static void cdelete(Vi_t *vp,register int nchars, int mode) in cdelete() argument
1119 vp->o_v_char = cp[0]; in cdelete()
1153 static void del_line(register Vi_t *vp, int mode) in del_line() argument
1159 save_v(vp); in del_line()
1163 cdelete(vp,last_virt+1, BAD); in del_line()
1164 refresh(vp,CONTROL); in del_line()
1168 vp->findchar = INVALID; in del_line()
1171 vp->last_wind = INVALID; in del_line()
1172 vp->first_wind = 0; in del_line()
1173 vp->o_v_char = '\0'; in del_line()
1174 vp->ocur_phys = 0; in del_line()
1175 vp->ocur_virt = MAXCHAR; in del_line()
1176 vp->ofirst_wind = 0; in del_line()
1193 static int delmotion(Vi_t *vp,int motion, int mode) in delmotion() argument
1201 save_v(vp); in delmotion()
1207 end = mvcursor(vp,motion); in delmotion()
1235 cdelete(vp,delta, mode); in delmotion()
1248 static void endword(Vi_t *vp, int nwords, register int cmd) in endword() argument
1285 static void forward(Vi_t *vp,register int nwords, int cmd) in forward() argument
1325 static int getcount(register Vi_t *vp,register int c) in getcount() argument
1334 vp->repeat_set++; in getcount()
1339 c = ed_getchar(vp->ed,-1); in getcount()
1343 vp->repeat *= i; in getcount()
1366 static void getline(register Vi_t* vp,register int mode) in getline() argument
1372 vp->addnl = 1; in getline()
1382 if( (c=ed_getchar(vp->ed,mode==SEARCH?1:-2)) == usreof ) in getline()
1398 c = ed_getchar(vp->ed,2); in getline()
1399 append(vp,c, mode); in getline()
1400 refresh(vp,INPUT); in getline()
1404 vp->ed->e_tabcount = 0; in getline()
1411 append(vp,c, mode); in getline()
1430 refresh(vp,INPUT); in getline()
1434 tmp = cntlmode(vp); in getline()
1438 vp->bigvi = (tmp==BIGVI); in getline()
1460 cdelete(vp,cur_virt+1, BAD); in getline()
1469 cdelete(vp,1, BAD); in getline()
1470 append(vp,usrerase, mode); in getline()
1477 cdelete(vp,1, BAD); in getline()
1487 sync_cursor(vp); in getline()
1491 cdelete(vp,1, BAD); in getline()
1501 cdelete(vp,1, BAD); in getline()
1506 backword(vp,1, 'W'); in getline()
1507 cdelete(vp,tmp - cur_virt + 1, BAD); in getline()
1514 cdelete(vp,1, BAD); in getline()
1515 append(vp,usrkill, mode); in getline()
1522 delmotion(vp, '$', BAD); in getline()
1528 cdelete(vp,tmp - cur_virt + 1, BAD); in getline()
1531 del_line(vp,GOOD); in getline()
1538 vp->addnl = 0; in getline()
1543 save_last(vp); in getline()
1544 refresh(vp,INPUT); in getline()
1549 …if(mode!=SEARCH && last_virt>=0 && (vp->ed->e_tabcount|| !isblank(cur_virt)) && vp->ed->sh->nextpr… in getline()
1556 if(vp->ed->e_tabcount==0) in getline()
1558 ed_ungetchar(vp->ed,'\\'); in getline()
1559 vp->ed->e_tabcount=1; in getline()
1562 else if(vp->ed->e_tabcount==1) in getline()
1564 ed_ungetchar(vp->ed,'='); in getline()
1567 vp->ed->e_tabcount = 0; in getline()
1575 replace(vp,c, 1); in getline()
1580 cdelete(vp,1, BAD); in getline()
1584 append(vp,c, mode); in getline()
1587 refresh(vp,INPUT); in getline()
1601 static int mvcursor(register Vi_t* vp,register int motion) in mvcursor() argument
1623 tcur_virt = vp->repeat-1; in mvcursor()
1633 switch(motion=getcount(vp,ed_getchar(vp->ed,-1))) in mvcursor()
1637 if(!vp->ed->hlist && cur_virt>=0 && cur_virt<(SEARCHSIZE-2) && cur_virt == last_virt) in mvcursor()
1649 vp->direction = -2; in mvcursor()
1650 ed_ungetchar(vp->ed,'n'); in mvcursor()
1652 else if(cur_virt==0 && vp->direction == -2) in mvcursor()
1653 ed_ungetchar(vp->ed,'n'); in mvcursor()
1655 ed_ungetchar(vp->ed,'k'); in mvcursor()
1658 ed_ungetchar(vp->ed,'j'); in mvcursor()
1674 ed_ungetchar(vp->ed,motion); in mvcursor()
1692 tcur_virt += vp->repeat*incr; in mvcursor()
1703 backword(vp,vp->repeat, motion); in mvcursor()
1712 endword(vp, vp->repeat, motion); in mvcursor()
1719 switch(vp->last_find) in mvcursor()
1752 vp->last_find = motion; in mvcursor()
1753 if((vp->findchar=getrchar(vp))==ESC) in mvcursor()
1757 count = vp->repeat; in mvcursor()
1761 && virtual[tcur_virt] != vp->findchar ); in mvcursor()
1767 if( fold(vp->last_find) == 'T' ) in mvcursor()
1807 forward(vp,vp->repeat, motion); in mvcursor()
1824 static void pr_string(register Vi_t *vp, register const char *sp) in pr_string() argument
1841 static void putstring(register Vi_t *vp,register int col, register int nchars) in putstring() argument
1877 static void refresh(register Vi_t* vp, int mode) in refresh() argument
1881 register int first_w = vp->first_wind; in refresh()
1906 n = ed_histgen(vp->ed,(char*)virtual); in refresh()
1910 if(vp->ed->hlist) in refresh()
1912 ed_histlist(vp->ed,n); in refresh()
1913 pr_string(vp,Prompt); in refresh()
1914 vp->ocur_virt = INVALID; in refresh()
1915 ed_setcursor(vp->ed,physical,0,cur_phys,0); in refresh()
1920 else if(mode==INPUT && v<=1 && vp->ed->hlist) in refresh()
1921 ed_histlist(vp->ed,0); in refresh()
1923 if( v<vp->ocur_virt || vp->ocur_virt==INVALID in refresh()
1924 || ( v==vp->ocur_virt in refresh()
1925 && (!is_print(virtual[v]) || !is_print(vp->o_v_char))) ) in refresh()
1934 p = vp->ocur_phys; in refresh()
1935 v = vp->ocur_virt; in refresh()
1944 ncur_phys = ed_virt_to_phys(vp->ed,virtual,physical,cur_virt,v,p); in refresh()
1960 cursor(vp,first_w); in refresh()
1964 vp->first_wind = cur_phys = first_w; in refresh()
1970 if( first_w==vp->ofirst_wind && ncur_phys>=vp->ocur_phys && opflag==1 ) in refresh()
1972 p = vp->ocur_phys; in refresh()
1981 for(; (p<=last_phys && w<=vp->last_wind); ++p, ++w) in refresh()
1988 if( (p>last_phys || p>=first_w+w_size) && w>vp->last_wind in refresh()
1989 && cur_virt==vp->ocur_virt ) in refresh()
2006 while( w <= vp->last_wind ) in refresh()
2008 vp->last_wind = --w; in refresh()
2014 cursor(vp,p); in refresh()
2019 while( w <= vp->last_wind ) in refresh()
2023 vp->last_wind = --new_lw; in refresh()
2028 vp->long_char = '>'; in refresh()
2030 vp->long_char = '<'; in refresh()
2032 vp->long_char = '*'; in refresh()
2035 vp->long_char = ' '; in refresh()
2037 if( vp->long_line != vp->long_char ) in refresh()
2045 putchar(vp->long_char); in refresh()
2047 vp->long_line = vp->long_char; in refresh()
2050 if(vp->ed->e_multiline && vp->ofirst_wind==INVALID && !vp->ed->e_nocrnl) in refresh()
2051 ed_setcursor(vp->ed, physical, last_phys+1, last_phys+1, -1); in refresh()
2052 vp->ed->e_nocrnl = 0; in refresh()
2053 vp->ocur_phys = ncur_phys; in refresh()
2054 vp->ocur_virt = cur_virt; in refresh()
2055 vp->ofirst_wind = first_w; in refresh()
2060 cursor(vp,ncur_phys); in refresh()
2061 ed_flush(vp->ed); in refresh()
2075 static void replace(register Vi_t *vp, register int c, register int increment) in replace() argument
2085 cur_window = cur_phys - vp->first_wind; in replace()
2086 if( vp->ocur_virt == INVALID || !is_print(c) in replace()
2088 || !is_print(vp->o_v_char) in replace()
2090 || !iswascii(c) || mbwidth(vp->o_v_char)>1 in replace()
2098 cdelete(vp,1, BAD); in replace()
2099 append(vp,c, APPEND); in replace()
2102 refresh(vp,CONTROL); in replace()
2119 vp->o_v_char = c; in replace()
2120 ed_flush(vp->ed); in replace()
2131 static void restore_v(register Vi_t *vp) in restore_v() argument
2136 if( vp->u_column == INVALID-1 ) in restore_v()
2142 gencpy(tmpspace, vp->u_space); in restore_v()
2143 tmpcol = vp->u_column; in restore_v()
2144 save_v(vp); in restore_v()
2148 vp->ocur_virt = MAXCHAR; /** invalidate refresh optimization **/ in restore_v()
2158 static void save_last(register Vi_t* vp) in save_last() argument
2167 genncpy(vp->lastline, (&virtual[first_virt]), i); in save_last()
2168 vp->lastline[i] = '\0'; in save_last()
2179 static void save_v(register Vi_t *vp) in save_v() argument
2184 gencpy(vp->u_space, virtual); in save_v()
2185 vp->u_column = cur_virt; in save_v()
2204 static int curline_search(Vi_t *vp, const char *string) in curline_search() argument
2209 ed_external(vp->u_space,(char*)vp->u_space); in curline_search()
2211 for(dp=(char*)vp->u_space,dpmax=dp+strlen(dp)-len; dp<=dpmax; dp++) in curline_search()
2214 return(dp-(char*)vp->u_space); in curline_search()
2217 ed_internal((char*)vp->u_space,vp->u_space); in curline_search()
2222 static int search(register Vi_t* vp,register int mode) in search() argument
2229 if( vp->direction == -2 && mode != 'n') in search()
2230 vp->direction = -1; in search()
2234 del_line(vp,BAD); in search()
2235 append(vp,mode, APPEND); in search()
2236 refresh(vp,INPUT); in search()
2238 getline(vp,SEARCH); in search()
2241 vp->direction = mode=='/' ? -1 : 1; in search()
2253 del_line(vp,BAD); in search()
2262 new_direction = -vp->direction; in search()
2264 new_direction = vp->direction; in search()
2273 if(mode=='?' && (i=curline_search(vp,((char*)virtual)+1))>=0) in search()
2290 vp->ocur_virt = INVALID; in search()
2307 static void sync_cursor(register Vi_t *vp) in sync_cursor() argument
2320 if(vp->first_wind==vp->ofirst_wind && cur_virt>vp->ocur_virt && vp->ocur_virt!=INVALID) in sync_cursor()
2323 p = vp->ocur_phys + 1; in sync_cursor()
2328 v = vp->ocur_virt + 1; in sync_cursor()
2368 if( new_phys < vp->first_wind || new_phys >= vp->first_wind + w_size ) in sync_cursor()
2373 refresh(vp,CONTROL); in sync_cursor()
2377 cursor(vp,new_phys); in sync_cursor()
2378 ed_flush(vp->ed); in sync_cursor()
2379 vp->ocur_phys = cur_phys; in sync_cursor()
2380 vp->ocur_virt = cur_virt; in sync_cursor()
2381 vp->o_v_char = virtual[vp->ocur_virt]; in sync_cursor()
2394 static int textmod(register Vi_t *vp,register int c, int mode) in textmod() argument
2397 register genchar *p = vp->lastline; in textmod()
2398 register int trepeat = vp->repeat; in textmod()
2401 if(mode && (fold(vp->lastmotion)=='F' || fold(vp->lastmotion)=='T')) in textmod()
2402 vp->lastmotion = ';'; in textmod()
2417 if(vp->ed->e_tabcount!=1) in textmod()
2427 save_v(vp); in textmod()
2432 if(ed_expand(vp->ed,(char*)virtual, &cur_virt, &last_virt, c, vp->repeat_set?vp->repeat:-1)<0) in textmod()
2434 if(vp->ed->e_tabcount) in textmod()
2436 vp->ed->e_tabcount=2; in textmod()
2437 ed_ungetchar(vp->ed,'\t'); in textmod()
2444 else if((c=='=' || (c=='\\'&&virtual[i]=='/')) && !vp->repeat_set) in textmod()
2447 vp->nonewline++; in textmod()
2448 ed_ungetchar(vp->ed,cntl('L')); in textmod()
2455 vp->ocur_virt = MAXCHAR; in textmod()
2457 vp->ed->e_tabcount = 0; in textmod()
2464 c = vp->lastmacro; in textmod()
2466 if((c=getrchar(vp))==ESC) in textmod()
2469 vp->lastmacro = c; in textmod()
2470 if(ed_macro(vp->ed,c)) in textmod()
2472 save_v(vp); in textmod()
2481 save_v(vp); in textmod()
2484 if(vp->repeat_set==0) in textmod()
2485 vp->repeat = -1; in textmod()
2486 p = (genchar*)hist_word((char*)tmpbuf,MAXLINE,vp->repeat); in textmod()
2499 append(vp,i,APPEND); in textmod()
2507 sync_cursor(vp); in textmod()
2516 save_v(vp); in textmod()
2520 cursor(vp,cur_phys + 1); in textmod()
2521 ed_flush(vp->ed); in textmod()
2527 sync_cursor(vp); in textmod()
2536 save_v(vp); in textmod()
2539 vp->o_v_char = virtual[cur_virt]; in textmod()
2550 c = vp->lastmotion; in textmod()
2552 c = getcount(vp,ed_getchar(vp->ed,-1)); in textmod()
2554 vp->lastmotion = c; in textmod()
2557 del_line(vp,GOOD); in textmod()
2561 if(!delmotion(vp, c, 'c')) in textmod()
2579 c = vp->lastmotion; in textmod()
2581 c = getcount(vp,ed_getchar(vp->ed,-1)); in textmod()
2583 vp->lastmotion = c; in textmod()
2586 del_line(vp,GOOD); in textmod()
2589 if(!delmotion(vp, c, 'd')) in textmod()
2602 vp->ocur_virt = INVALID; in textmod()
2613 save_v(vp); in textmod()
2617 ++vp->u_column; in textmod()
2628 append(vp,c,mode); in textmod()
2639 save_v(vp); in textmod()
2648 if((c=getrchar(vp))==ESC) in textmod()
2651 save_v(vp); in textmod()
2653 replace(vp,c, trepeat!=0); in textmod()
2661 save_v(vp); in textmod()
2662 cdelete(vp,vp->repeat, BAD); in textmod()
2678 c = vp->lastmotion; in textmod()
2680 c = getcount(vp,ed_getchar(vp->ed,-1)); in textmod()
2682 vp->lastmotion = c; in textmod()
2687 else if(!delmotion(vp, c, 'y')) in textmod()
2704 save_v(vp); in textmod()
2717 replace(vp,c, 1); in textmod()
2727 refresh(vp,CONTROL); in textmod()
2758 static int getrchar(register Vi_t *vp) in getrchar() argument
2761 if((c=ed_getchar(vp->ed,1))== usrlnext) in getrchar()
2762 c = ed_getchar(vp->ed,2); in getrchar()