Remove bits and pieces of support for atty, which was made obsolete by

adding history and vi/emacs-style line editing to the shell itself.
Atty was a user-mode terminal emulator (like screen and window) that did
line editing and history.
This commit is contained in:
Tim J. Robbins 2002-10-01 00:54:14 +00:00
parent af98feb19c
commit b1a667509b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104255
4 changed files with 1 additions and 41 deletions

View File

@ -141,11 +141,7 @@ main(int argc, char *argv[])
exitshell(exitstatus);
}
reset();
if (exception == EXINT
#if ATTY
&& (! attyset() || equal(termval(), "emacs"))
#endif
) {
if (exception == EXINT) {
out2c('\n');
flushout(&errout);
}

View File

@ -927,16 +927,6 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs)
STARTSTACKSTR(out);
loop: { /* for each line, until end of word */
#if ATTY
if (c == '\034' && doprompt
&& attyset() && ! equal(termval(), "emacs")) {
attyline();
if (syntax == BASESYNTAX)
return readtoken();
c = pgetc();
goto loop;
}
#endif
CHECKEND(); /* set c to PEOF if at end of here document */
for (;;) { /* until end of line or end of word */
CHECKSTRSPACE(3, out); /* permit 3 calls to USTPUTC */

View File

@ -81,9 +81,6 @@ struct varinit {
};
#if ATTY
struct var vatty;
#endif
#ifndef NO_HISTORY
struct var vhistsize;
#endif
@ -95,16 +92,9 @@ struct var vppid;
struct var vps1;
struct var vps2;
struct var vvers;
#if ATTY
struct var vterm;
#endif
struct var voptind;
const struct varinit varinit[] = {
#if ATTY
{ &vatty, VSTRFIXED|VTEXTFIXED|VUNSET, "ATTY=",
NULL },
#endif
#ifndef NO_HISTORY
{ &vhistsize, VSTRFIXED|VTEXTFIXED|VUNSET, "HISTSIZE=",
sethistsize },
@ -124,10 +114,6 @@ const struct varinit varinit[] = {
*/
{ &vps2, VSTRFIXED|VTEXTFIXED, "PS2=> ",
NULL },
#if ATTY
{ &vterm, VSTRFIXED|VTEXTFIXED|VUNSET, "TERM=",
NULL },
#endif
{ &voptind, VSTRFIXED|VTEXTFIXED, "OPTIND=1",
getoptsreset },
{ NULL, 0, NULL,

View File

@ -71,9 +71,6 @@ struct localvar {
struct localvar *localvars;
#if ATTY
extern struct var vatty;
#endif
extern struct var vifs;
extern struct var vmail;
extern struct var vmpath;
@ -81,9 +78,6 @@ extern struct var vpath;
extern struct var vppid;
extern struct var vps1;
extern struct var vps2;
#if ATTY
extern struct var vterm;
#endif
#ifndef NO_HISTORY
extern struct var vhistsize;
#endif
@ -101,17 +95,11 @@ extern struct var vhistsize;
#define pathval() (vpath.text + 5)
#define ps1val() (vps1.text + 4)
#define ps2val() (vps2.text + 4)
#if ATTY
#define termval() (vterm.text + 5)
#endif
#define optindval() (voptind.text + 7)
#ifndef NO_HISTORY
#define histsizeval() (vhistsize.text + 9)
#endif
#if ATTY
#define attyset() ((vatty.flags & VUNSET) == 0)
#endif
#define mpathset() ((vmpath.flags & VUNSET) == 0)
void initvar(void);