diff options
author | jkh <jkh@FreeBSD.org> | 2000-11-28 20:03:23 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 2000-11-28 20:03:23 +0000 |
commit | 8c1ad5939936de051229123b210d7f9e70c83d14 (patch) | |
tree | a306144605803b8142900d9f08e18d6cf73b2958 /sys/kern/tty.c | |
parent | 644ee6003f020d2d286f7b4b37bc447c94d00f32 (diff) | |
download | FreeBSD-src-8c1ad5939936de051229123b210d7f9e70c83d14.zip FreeBSD-src-8c1ad5939936de051229123b210d7f9e70c83d14.tar.gz |
Kernel support for erase2 character.
Submitted by: Rui Pedro Mendes Salgueiro <rps@mat.uc.pt>
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r-- | sys/kern/tty.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 87fb980..1117708 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -459,9 +459,9 @@ parmrk: * processing takes place. */ /* - * erase (^H / ^?) + * erase or erase2 (^H / ^?) */ - if (CCEQ(cc[VERASE], c)) { + if (CCEQ(cc[VERASE], c) || CCEQ(cc[VERASE2], c) ) { if (tp->t_rawq.c_cc) ttyrub(unputc(&tp->t_rawq), tp); goto endcase; @@ -2010,8 +2010,17 @@ ttyrub(c, tp) (void)ttyoutput('\\', tp); } ttyecho(c, tp); - } else + } else { ttyecho(tp->t_cc[VERASE], tp); + /* + * This code may be executed not only when an ERASE key + * is pressed, but also when ^U (KILL) or ^W (WERASE) are. + * So, I didn't think it was worthwhile to pass the extra + * information (which would need an extra parameter, + * changing every call) needed to distinguish the ERASE2 + * case from the ERASE. + */ + } --tp->t_rocount; } |