drop all deprecated code, you have been warned
This commit is contained in:
21
lex.c
21
lex.c
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.160 2012/03/31 17:29:59 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.161 2012/04/07 11:19:49 tg Exp $");
|
||||
|
||||
/*
|
||||
* states while lexing word
|
||||
@@ -1440,25 +1440,6 @@ getsc_line(Source *s)
|
||||
alarm(0);
|
||||
}
|
||||
cp = Xstring(s->xs, xp);
|
||||
#if !defined(MKSH_SMALL) && !defined(MKSH_DISABLE_DEPRECATED)
|
||||
if (interactive && *cp == '!' && cur_prompt == PS1) {
|
||||
int linelen;
|
||||
|
||||
linelen = Xlength(s->xs, xp);
|
||||
XcheckN(s->xs, xp, Zfc_e_dash + /* NUL */ 1);
|
||||
/* reload after potential realloc */
|
||||
cp = Xstring(s->xs, xp);
|
||||
/* change initial '!' into space */
|
||||
*cp = ' ';
|
||||
/* NUL terminate the current string */
|
||||
*xp = '\0';
|
||||
/* move the actual string forward */
|
||||
memmove(cp + Zfc_e_dash, cp, linelen + /* NUL */ 1);
|
||||
xp += Zfc_e_dash;
|
||||
/* prepend it with "fc -e -" */
|
||||
memcpy(cp, Tfc_e_dash, Zfc_e_dash);
|
||||
}
|
||||
#endif
|
||||
s->start = s->str = cp;
|
||||
strip_nuls(Xstring(s->xs, xp), Xlength(s->xs, xp));
|
||||
/* Note: if input is all nulls, this is not eof */
|
||||
|
Reference in New Issue
Block a user