Lines Matching defs:ed
48 # define echoctl (vp->ed->e_echoctl)
137 Edit_t *ed; /* pointer to edit data */
140 #define editb (*vp->ed)
143 #define putchar(c) ed_putchar(vp->ed,c)
219 Edit_t *ed = (Edit_t*)context;
222 register Vi_t *vp = ed->e_vi;
234 int viraw = (sh_isoption(SH_VIRAW) || ed->sh->st.trap[SH_KEYTRAP]);
242 ed->e_vi = vp = newof(0,Vi_t,1,0);
245 vp->ed = ed;
251 ed_setup(vp->ed,fd, reedit);
270 if(ed->sh->trapnote&SH_SIGSET)
456 last_phys = ed_virt_to_phys(vp->ed,virtual,physical,last_virt,0,0);
484 ed_crlf(vp->ed);
493 ed_crlf(vp->ed);
559 if(vp->ed->e_multiline)
595 if(vp->ed->e_multiline)
600 if(ed->e_nlist)
602 ed->e_nlist = 0;
603 stakset(ed->e_stkptr,ed->e_stkoff);
608 ed_crlf(vp->ed);
625 if(vp->ed->nhlist)
626 ed_histlist(vp->ed,0);
744 while( c=ed_getchar(vp->ed,-1) )
811 if(vp->nonewline==0 && !vp->ed->e_nocrnl)
829 ed_getchar(vp->ed,-1);
862 if(vp->ed->hlist)
864 if(vp->ed->hoff >= vp->ed->hmax)
866 vp->ed->hoff++;
891 if(vp->ed->hlist)
893 if(vp->ed->hoff == 0)
895 vp->ed->hoff--;
897 ed_histlist(vp->ed,*vp->ed->hlist!=0);
899 ed_ungetchar(vp->ed,cntl('L'));
937 if(vp->ed->hlist)
939 ed_histlist(vp->ed,0);
941 ed_ungetchar(vp->ed,c);
942 ed_ungetchar(vp->ed,cntl('L'));
989 if(ed_fulledit(vp->ed)==GOOD)
1032 if(!vp->ed->hlist)
1035 if(vp->ed->hlist)
1037 if(vp->repeat > vp->ed->nhlist-vp->ed->hoff)
1039 curhline = vp->ed->hlist[vp->repeat+vp->ed->hoff-1]->index;
1052 ed_ungetchar(vp->ed,x);
1056 ed_ungetchar(vp->ed,c=ed_getchar(vp->ed,1));
1090 cur_phys = ed_setcursor(vp->ed, physical, cur_phys,x,vp->first_wind);
1337 c = ed_getchar(vp->ed,-1);
1380 if( (c=ed_getchar(vp->ed,mode==SEARCH?1:-2)) == usreof )
1396 c = ed_getchar(vp->ed,2);
1544 if(mode!=SEARCH && last_virt>=0 && (vp->ed->e_tabcount|| !isblank(cur_virt)) && vp->ed->sh->nextprompt)
1546 if(vp->ed->e_tabcount==0)
1548 ed_ungetchar(vp->ed,'\\');
1549 vp->ed->e_tabcount=1;
1552 else if(vp->ed->e_tabcount==1)
1554 ed_ungetchar(vp->ed,'=');
1557 vp->ed->e_tabcount = 0;
1623 switch(motion=getcount(vp,ed_getchar(vp->ed,-1)))
1627 if(!vp->ed->hlist && cur_virt>=0 && cur_virt<(SEARCHSIZE-2) && cur_virt == last_virt)
1640 ed_ungetchar(vp->ed,'n');
1643 ed_ungetchar(vp->ed,'n');
1645 ed_ungetchar(vp->ed,'k');
1648 ed_ungetchar(vp->ed,'j');
1664 ed_ungetchar(vp->ed,motion);
1896 n = ed_histgen(vp->ed,(char*)virtual);
1900 if(vp->ed->hlist)
1902 ed_histlist(vp->ed,n);
1905 ed_setcursor(vp->ed,physical,0,cur_phys,0);
1910 else if(mode==INPUT && v<=1 && vp->ed->hlist)
1911 ed_histlist(vp->ed,0);
1934 ncur_phys = ed_virt_to_phys(vp->ed,virtual,physical,cur_virt,v,p);
2040 if(vp->ed->e_multiline && vp->ofirst_wind==INVALID && !vp->ed->e_nocrnl)
2041 ed_setcursor(vp->ed, physical, last_phys+1, last_phys+1, -1);
2042 vp->ed->e_nocrnl = 0;
2051 ed_flush(vp->ed);
2110 ed_flush(vp->ed);
2367 ed_flush(vp->ed);
2406 if(vp->ed->e_tabcount!=1)
2419 if(ed_expand(vp->ed,(char*)virtual, &cur_virt, &last_virt, c, vp->repeat_set?vp->repeat:-1)<0)
2421 if(vp->ed->e_tabcount)
2423 vp->ed->e_tabcount=2;
2424 ed_ungetchar(vp->ed,'\t');
2435 ed_ungetchar(vp->ed,cntl('L'));
2444 vp->ed->e_tabcount = 0;
2457 if(ed_macro(vp->ed,c))
2507 ed_flush(vp->ed);
2537 c = getcount(vp,ed_getchar(vp->ed,-1));
2566 c = getcount(vp,ed_getchar(vp->ed,-1));
2664 c = getcount(vp,ed_getchar(vp->ed,-1));
2745 if((c=ed_getchar(vp->ed,1))== usrlnext)
2746 c = ed_getchar(vp->ed,2);