summaryrefslogtreecommitdiffstats
path: root/bin/sh
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2002-10-01 00:54:14 +0000
committertjr <tjr@FreeBSD.org>2002-10-01 00:54:14 +0000
commita04b479aee620ae0c7e69d0beaea6b55631b3dc6 (patch)
tree6b4e9b3490e38b92d5b91f04acee7b4fc94785d0 /bin/sh
parent8d85d3f96b724e383624fdbd12af2a342fabb2d3 (diff)
downloadFreeBSD-src-a04b479aee620ae0c7e69d0beaea6b55631b3dc6.zip
FreeBSD-src-a04b479aee620ae0c7e69d0beaea6b55631b3dc6.tar.gz
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.
Diffstat (limited to 'bin/sh')
-rw-r--r--bin/sh/main.c6
-rw-r--r--bin/sh/parser.c10
-rw-r--r--bin/sh/var.c14
-rw-r--r--bin/sh/var.h12
4 files changed, 1 insertions, 41 deletions
diff --git a/bin/sh/main.c b/bin/sh/main.c
index 962546b..9dd4fd7 100644
--- a/bin/sh/main.c
+++ b/bin/sh/main.c
@@ -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);
}
diff --git a/bin/sh/parser.c b/bin/sh/parser.c
index 69d6405..4df742d 100644
--- a/bin/sh/parser.c
+++ b/bin/sh/parser.c
@@ -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 */
diff --git a/bin/sh/var.c b/bin/sh/var.c
index b3be70a..1893d77 100644
--- a/bin/sh/var.c
+++ b/bin/sh/var.c
@@ -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,
diff --git a/bin/sh/var.h b/bin/sh/var.h
index 4177599..f2365aa 100644
--- a/bin/sh/var.h
+++ b/bin/sh/var.h
@@ -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);
OpenPOWER on IntegriCloud