From 9415561a615599cb75e1db5e3679f5551f0da947 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Wed, 20 Nov 2019 20:13:24 -0500 Subject: Remove PSlit --- bin/1sh/1sh.1 | 16 ---------------- bin/1sh/histedit.c | 24 ------------------------ bin/1sh/myhistedit.h | 1 - bin/1sh/var.c | 3 --- 4 files changed, 44 deletions(-) (limited to 'bin/1sh') diff --git a/bin/1sh/1sh.1 b/bin/1sh/1sh.1 index 42d683a8..65e0bda9 100644 --- a/bin/1sh/1sh.1 +++ b/bin/1sh/1sh.1 @@ -1585,22 +1585,6 @@ is active). The default is .Dq Li "+ " . . -.It Va PSlit -Defines the character which may be embedded in pairs, in -.Va PS1 , -.Va PS2 , -.Va RPS1 -or -.Va RPS2 -to indicate to -.Xr editline 7 -that the characters between each pair of occurrences of the -.Va PSlit -character will not appear in the visible prompt, and will not -cause the terminal's cursor to change position, but rather set terminal -attributes for the following prompt character(s) at least one of -which must be present. -. .It Va RPS1 The primary right prompt string. .Va RPS1 diff --git a/bin/1sh/histedit.c b/bin/1sh/histedit.c index 08339a00..0d23e9aa 100644 --- a/bin/1sh/histedit.c +++ b/bin/1sh/histedit.c @@ -223,30 +223,6 @@ sethistsize(const char *hs) } } -void -setpslit(const char *lit_ch) { - wchar_t wc; - - if (!(iflag && editing && el)) - return; - - if (lit_ch == NULL) { - el_set(el, EL_PROMPT, getprompt); - el_set(el, EL_RPROMPT, getrprompt); - return; - } - - mbtowc(&wc, NULL, 1); /* state init */ - - if (mbtowc(&wc, lit_ch, strlen(lit_ch)) <= 0) { - el_set(el, EL_PROMPT, getprompt); - el_set(el, EL_RPROMPT, getrprompt); - } else { - el_set(el, EL_PROMPT_ESC, getprompt, (int)wc); - el_set(el, EL_RPROMPT_ESC, getrprompt, (int)wc); - } -} - void setterm(const char *term) { diff --git a/bin/1sh/myhistedit.h b/bin/1sh/myhistedit.h index 6eebe521..feb4803e 100644 --- a/bin/1sh/myhistedit.h +++ b/bin/1sh/myhistedit.h @@ -41,6 +41,5 @@ extern int displayhist; void histedit(void); void sethistfile(const char *); void sethistsize(const char *); -void setpslit(const char *); void setterm(const char *); diff --git a/bin/1sh/var.c b/bin/1sh/var.c index 83e48732..6cfeefe4 100644 --- a/bin/1sh/var.c +++ b/bin/1sh/var.c @@ -87,7 +87,6 @@ struct varinit { #ifndef NO_HISTORY struct var vhistfile; struct var vhistsize; -struct var vpslit; struct var vterm; #endif struct var venv; @@ -140,8 +139,6 @@ static const struct varinit varinit[] = { { &vrps2, VUNSET, "RPS2=", NULL }, #ifndef NO_HISTORY - { &vpslit, VUNSET, "PSlit=", - setpslit }, { &vterm, VUNSET, "TERM=", setterm }, #endif -- cgit 1.4.1