diff --git a/src/cmd/ksh93/README b/src/cmd/ksh93/README index 1a0c296a326a..ca1a152e8e7d 100644 --- a/src/cmd/ksh93/README +++ b/src/cmd/ksh93/README @@ -73,7 +73,7 @@ The options have the following defaults and meanings: be displayed as a numbered list as you type. You can scroll up and down this list or you can use nTAB to make this the current line (n defaults to 1 if omitted). - Experimental. Bugs: https://github.com/ksh93/ksh/issues/233 + Deprecated. Bugs: https://github.com/ksh93/ksh/issues/233 ESH on Compile with emacs command line editing. The original emacs line editor code was provided by Mike Veach at IH. diff --git a/src/cmd/ksh93/SHOPT.sh b/src/cmd/ksh93/SHOPT.sh index 045c905f5f84..d105bc5412fa 100644 --- a/src/cmd/ksh93/SHOPT.sh +++ b/src/cmd/ksh93/SHOPT.sh @@ -18,7 +18,7 @@ SHOPT CRNL= # accept MS Windows newlines () for SHOPT DEVFD= # use /dev/fd instead of FIFOs for process substitutions SHOPT DYNAMIC=1 # dynamic loading for builtins SHOPT ECHOPRINT= # make echo equivalent to print -SHOPT EDPREDICT=0 # History pattern search menu (type #, then ESC TAB). Experimental. +SHOPT EDPREDICT=0 # History pattern search menu (type #, then ESC TAB). Deprecated. SHOPT ESH=1 # emacs/gmacs edit mode SHOPT FILESCAN=1 # fast file scan: while hlist) { @@ -1444,7 +1444,7 @@ int ed_histgen(Edit_t *ep,const char *pattern) maxmatch = ep->e_cur; return(ep->hmax=av-argv); } - stakset(ep->e_stkptr,ep->e_stkoff); + stkset(sh.stk,ep->e_stkptr,ep->e_stkoff); } if((m=strlen(cp)) >= sizeof(ep->hpat)) m = sizeof(ep->hpat)-1; @@ -1463,7 +1463,7 @@ int ed_histgen(Edit_t *ep,const char *pattern) if(strmatch(cp,pattern)) { l = ed_histlencopy(cp,(char*)0); - mp = (Histmatch_t*)stakalloc(sizeof(Histmatch_t)+l); + mp = stkalloc(sh.stk,sizeof(Histmatch_t)+l); mp->next = mplast; mplast = mp; mp->len = l; @@ -1477,7 +1477,7 @@ int ed_histgen(Edit_t *ep,const char *pattern) if(ac>0) { l = ac; - argv = av = (char**)stakalloc((ac+1)*sizeof(char*)); + argv = av = stkalloc(sh.stk,(ac+1)*sizeof(char*)); for(; l>=0 && (*av= (char*)mp); mp=mp->next,av++) l--; *av = 0; @@ -1530,11 +1530,11 @@ void ed_histlist(Edit_t *ep,int n) } else { - stakset(ep->e_stkptr,ep->e_stkoff); + stkset(sh.stk,ep->e_stkptr,ep->e_stkoff); ep->hlist = 0; ep->nhlist = 0; } - ed_putstring(ep,ERASE_EOS); + ed_putstring(ep,erase_eos); if(n) { for(i=1; (mp= *mpp) && i <= 16 ; i++,mpp++) @@ -1562,7 +1562,7 @@ void ed_histlist(Edit_t *ep,int n) } last = i-1; while(i-->0) - ed_putstring(ep,CURSOR_UP); + ed_putstring(ep,cursor_up); } ed_flush(ep); } diff --git a/src/cmd/ksh93/edit/emacs.c b/src/cmd/ksh93/edit/emacs.c index 37239a5715c8..b70c77c6a5a1 100644 --- a/src/cmd/ksh93/edit/emacs.c +++ b/src/cmd/ksh93/edit/emacs.c @@ -1607,7 +1607,7 @@ static void draw(Emacs_t *ep,Draw_t option) if(ep->ed->hlist) { ed_histlist(ep->ed,n); - putstring(ep,Prompt); + ed_putstring(ep->ed,Prompt); ed_setcursor(ep->ed,ep->screen,0,ep->cursor-ep->screen, 0); } else diff --git a/src/cmd/ksh93/edit/vi.c b/src/cmd/ksh93/edit/vi.c index e95afa95fa2a..8db9e633e573 100644 --- a/src/cmd/ksh93/edit/vi.c +++ b/src/cmd/ksh93/edit/vi.c @@ -1772,7 +1772,7 @@ static void refresh(Vi_t* vp, int mode) if(vp->ed->hlist) { ed_histlist(vp->ed,n); - pr_string(vp,Prompt); + ed_putstring(vp->ed,Prompt); vp->ocur_virt = INVALID; ed_setcursor(vp->ed,physical,0,cur_phys,0); }