remove the 'stuff' functionality altogether,

ksh93 doesn't have it, and I don't know, nor
do I care about what "the BRL ^T mini-systat
feature" is.
This commit is contained in:
tg 2006-08-08 20:17:22 +00:00
parent 5176249248
commit 4661992d5b
4 changed files with 17 additions and 61 deletions

View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.t,v 1.51 2006/08/02 13:34:02 tg Exp $
# $MirOS: src/bin/mksh/check.t,v 1.52 2006/08/08 20:17:20 tg Exp $
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $
# $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $
# $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $
@ -3790,5 +3790,5 @@ category: pdksh
stdin:
echo $KSH_VERSION
expected-stdout:
@(#)MIRBSD KSH R28 2006/08/02
@(#)MIRBSD KSH R28 2006/08/08
---

60
edit.c
View File

@ -5,7 +5,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.35 2006/08/08 20:07:52 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.36 2006/08/08 20:17:20 tg Exp $");
/* tty driver characters we are interested in */
typedef struct {
@ -1001,19 +1001,17 @@ static void bind_if_not_bound(int, int, int);
#define XFUNC_search_char_back 40
#define XFUNC_search_hist 41
#define XFUNC_set_mark 42
#define XFUNC_stuff 43
#define XFUNC_stuffreset 44
#define XFUNC_transpose 45
#define XFUNC_xchg_point_mark 46
#define XFUNC_yank 47
#define XFUNC_comp_list 48
#define XFUNC_expand 49
#define XFUNC_fold_capitalize 50
#define XFUNC_fold_lower 51
#define XFUNC_fold_upper 52
#define XFUNC_set_arg 53
#define XFUNC_comment 54
#define XFUNC_version 55
#define XFUNC_transpose 43
#define XFUNC_xchg_point_mark 44
#define XFUNC_yank 45
#define XFUNC_comp_list 46
#define XFUNC_expand 47
#define XFUNC_fold_capitalize 48
#define XFUNC_fold_lower 49
#define XFUNC_fold_upper 50
#define XFUNC_set_arg 51
#define XFUNC_comment 52
#define XFUNC_version 53
/* XFUNC_* must be < 128 */
@ -1060,8 +1058,6 @@ static int x_search_char_forw (int);
static int x_search_char_back (int);
static int x_search_hist (int);
static int x_set_mark (int);
static int x_stuff (int);
static int x_stuffreset (int);
static int x_transpose (int);
static int x_xchg_point_mark (int);
static int x_yank (int);
@ -1118,8 +1114,6 @@ static const struct x_ftab x_ftab[] = {
{ x_search_char_back, "search-character-backward", XF_ARG },
{ x_search_hist, "search-history", 0 },
{ x_set_mark, "set-mark-command", 0 },
{ x_stuff, "stuff", 0 },
{ x_stuffreset, "stuff-reset", 0 },
{ x_transpose, "transpose-chars", 0 },
{ x_xchg_point_mark, "exchange-point-and-mark", 0 },
{ x_yank, "yank", 0 },
@ -2152,36 +2146,6 @@ x_error(int c __attribute__((unused)))
return KSTD;
}
static int
x_stuffreset(int c)
{
#ifdef TIOCSTI
(void)x_stuff(c);
return KINTR;
#else
x_zotc(c);
xlp = xcp = xep = xbp = xbuf;
xlp_valid = true;
*xcp = 0;
x_redraw(-1);
return KSTD;
#endif
}
static int
x_stuff(int c)
{
#ifdef TIOCSTI
char ch = c;
bool savmode = x_mode(false);
(void)ioctl(tty_fd, TIOCSTI, &ch);
(void)x_mode(savmode);
x_redraw(-1);
#endif
return KSTD;
}
static char *
x_mapin(const char *cp)
{

10
mksh.1
View File

@ -1,4 +1,4 @@
.\" $MirOS: src/bin/mksh/mksh.1,v 1.50 2006/08/08 20:07:53 tg Exp $
.\" $MirOS: src/bin/mksh/mksh.1,v 1.51 2006/08/08 20:17:21 tg Exp $
.\" $OpenBSD: ksh.1,v 1.116 2006/07/26 10:13:25 jmc Exp $
.\" $OpenBSD: sh.1tbl,v 1.53 2004/12/10 01:56:56 jaredy Exp $
.\"
@ -4572,14 +4572,6 @@ The history buffer retains only a finite number of lines; the oldest
are discarded as necessary.
.It set-mark-command: ^[ Ns Aq space
Set the mark at the cursor position.
.It stuff:
On systems supporting it, pushes the bound character back onto the terminal
input where it may receive special processing by the terminal handler.
This is useful for the BRL ^T mini-systat feature, for example.
.It stuff-reset:
Acts like
.Ic stuff ,
then aborts input the same as an interrupt.
.It transpose-chars: ^T
If at the end of line, or if the
.Ic gmacs

View File

@ -1,3 +1,3 @@
/* $MirOS: src/bin/mksh/version.h,v 1.4 2006/08/02 13:34:03 tg Exp $ */
/* $MirOS: src/bin/mksh/version.h,v 1.5 2006/08/08 20:17:22 tg Exp $ */
EXTERN const char MKSH_VERSION[] I__("@(#)MIRBSD KSH R28 2006/08/02");
EXTERN const char MKSH_VERSION[] I__("@(#)MIRBSD KSH R28 2006/08/08");