drop all deprecated code, you have been warned

This commit is contained in:
tg
2012-04-07 11:19:53 +00:00
parent 2d879f3b79
commit 5b4d0dbbc5
7 changed files with 26 additions and 188 deletions

21
lex.c
View File

@@ -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 */