this is a rather stupid diff: give ktsearch/ktenter the capability to
return information needed to do a real ktremove instead of the pseudo ktdelete operation which merely unsets the DEFINED flag to mark it as eligible for texpand garbage collection (even worse, !DEFINED entries are still counted)
This commit is contained in:
5
edit.c
5
edit.c
@ -25,7 +25,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.173 2009/08/01 20:32:43 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.174 2009/08/28 19:57:39 tg Exp $");
|
||||
|
||||
/* tty driver characters we are interested in */
|
||||
typedef struct {
|
||||
@ -4161,7 +4161,8 @@ vi_cmd(int argcnt, const char *cmd)
|
||||
|
||||
/* lookup letter in alias list... */
|
||||
alias[1] = cmd[1];
|
||||
ap = ktsearch(&aliases, alias, hash(alias));
|
||||
ap = ktsearch(&aliases, alias, hash(alias),
|
||||
NULL);
|
||||
if (!cmd[1] || !ap || !(ap->flag & ISSET))
|
||||
return (-1);
|
||||
/* check if this is a recursive call... */
|
||||
|
Reference in New Issue
Block a user