Lines Matching defs:ed

82 #define putchar(ed,c)	ed_putchar(ed,c)
121 Edit_t *ed; /* pointer to edit data */
124 #define editb (*ep->ed)
180 Edit_t *ed = (Edit_t*)context;
185 register Emacs_t *ep = ed->e_emacs;
193 ep = ed->e_emacs = newof(0,Emacs_t,1,0);
194 ep->ed = ed;
208 ed_setup(ep->ed,fd,reedit);
238 if(ep->ed->e_multiline)
242 ed_flush(ep->ed);
262 ed_ungetchar(ep->ed,cntl('N'));
273 ed_ungetchar(ep->ed,cntl('Y'));
278 while ((c = ed_getchar(ep->ed,0)) != (-1))
322 c = ed_getchar(ep->ed,2);
334 ed_flush(ep->ed);
343 if(cur>0 && ep->ed->sh->nextprompt)
345 if(ep->ed->e_tabcount==0)
347 ep->ed->e_tabcount=1;
348 ed_ungetchar(ep->ed,ESC);
351 else if(ep->ed->e_tabcount==1)
353 ed_ungetchar(ep->ed,'=');
356 ep->ed->e_tabcount = 0;
363 ed_ungetchar(ep->ed,c); /* save character for next line */
437 ed_ungetchar(ep->ed,cntl('D'));
441 ed_ungetchar(ep->ed,usrerase);
492 c = ed_getchar(ep->ed,1);
560 ed_ungetchar(ep->ed,cntl('W'));
581 putchar(ep->ed,'\n');
584 c = ed_getchar(ep->ed,0);
587 ed_ungetchar(ep->ed,c);
595 putchar(ep->ed,'\n');
601 if(!ep->ed->e_nocrnl)
602 ed_crlf(ep->ed);
604 ep->ed->e_nocrnl = 0;
615 if(ep->ed->hlist)
617 if(ep->ed->hoff == 0)
622 ep->ed->hoff--;
655 if(ep->ed->hlist)
657 if(ep->ed->hoff >= ep->ed->hmax)
662 ep->ed->hoff++;
664 ed_histlist(ep->ed,*ep->ed->hlist!=0);
716 if(ed->e_nlist)
718 ed->e_nlist = 0;
719 stakset(ed->e_stkptr,ed->e_stkoff);
725 ed_crlf(ep->ed);
752 c = ed_getchar(ep->ed,0);
754 ed_ungetchar(ep->ed,c);
765 putchar(ep->ed,c);
775 while ((i=ed_getchar(ep->ed,0)),isdigit(i))
783 ed_ungetchar(ep->ed,i) ;
808 ed_ungetchar(ep->ed,cntl('Y'));
809 ed_ungetchar(ep->ed,cntl('W'));
853 ed_ungetchar(ep->ed,cntl('C'));
860 ed_ungetchar(ep->ed,cntl('D'));
890 ed_ungetchar(ep->ed,usrerase);
899 ed_ungetchar(ep->ed,cntl('N'));
918 ed_ungetchar(ep->ed,cntl('P'));
929 ed_ungetchar(ep->ed,'\n');
930 ed_ungetchar(ep->ed,(out[0]=='#')?cntl('D'):'#');
931 ed_ungetchar(ep->ed,cntl('A'));
965 if(!ep->ed->hlist)
971 ed_ungetchar(ep->ed,'\n');
976 if(ep->ed->hlist)
978 value += ep->ed->hoff;
979 if(value > ep->ed->nhlist)
983 value = histlines - ep->ed->hlist[value-1]->index;
984 ed_histlist(ep->ed,0);
985 ed_ungetchar(ep->ed,cntl('P'));
994 if(ed_expand(ep->ed,(char*)out,&cur,&eol,i,count) < 0)
996 if(ep->ed->e_tabcount==1)
998 ep->ed->e_tabcount=2;
999 ed_ungetchar(ep->ed,cntl('\t'));
1008 ep->ed->e_tabcount=0;
1011 i=ed_getchar(ep->ed,0);
1012 ed_ungetchar(ep->ed,i);
1014 ed_ungetchar(ep->ed,ESC);
1020 ep->ed->e_tabcount=0;
1028 int c = ed_getchar(ep->ed,1);
1064 switch(i=ed_getchar(ep->ed,1))
1068 if(!ep->ed->hlist && cur>0 && eol==cur && (cur<(SEARCHSIZE-2) || ep->prevdirection == -2))
1085 ed_ungetchar(ep->ed,'\r');
1086 ed_ungetchar(ep->ed,cntl('R'));
1091 ed_ungetchar(ep->ed,cntl('P'));
1094 ed_ungetchar(ep->ed,cntl('N'));
1097 ed_ungetchar(ep->ed,cntl('F'));
1100 ed_ungetchar(ep->ed,cntl('B'));
1103 ed_ungetchar(ep->ed,cntl('A'));
1106 ed_ungetchar(ep->ed,cntl('E'));
1109 ed_ungetchar(ep->ed,i);
1115 if(ed_macro(ep->ed,i))
1142 register int i = ed_getchar(ep->ed,0);
1158 if(ed_fulledit(ep->ed)==-1)
1165 ed_ungetchar(ep->ed,'\n');
1246 while ((i = ed_getchar(ep->ed,1))&&(i != '\r')&&(i != '\n'))
1260 if(i == ep->ed->e_intr)
1273 i = ed_getchar(ep->ed,1);
1401 if(ep->ed->hlist)
1402 ed_histlist(ep->ed,0);
1411 n = ed_histgen(ep->ed,(char*)drawbuff);
1415 if(ep->ed->hlist)
1417 ed_histlist(ep->ed,n);
1419 ed_setcursor(ep->ed,ep->screen,0,ep->cursor-ep->screen, 0);
1430 putchar(ep->ed,i);
1437 ncursor = nptr + ed_virt_to_phys(ep->ed,sptr,nptr,cur,0,0);
1502 if(ep->ed->e_multiline && option == REFRESH && ep->ed->e_nocrnl==0)
1503 ed_setcursor(ep->ed, ep->screen, ep->cursor-ep->screen, ep->ed->e_peol, -1);
1534 if(option==FINAL && ep->ed->e_multiline)
1549 newp = ed_setcursor(ep->ed, ep->screen, oldp, newp, 0);
1552 putchar(ep->ed,c);