From 5fa829d0bd4c4783c2d926d6a56c75d3060a5519 Mon Sep 17 00:00:00 2001 From: cgd Date: Sat, 19 Jun 1999 00:13:19 +0000 Subject: [PATCH] teach the message prompting code to use control-U as line kill character. (not really the right thing, but it already hard-codes backspace and delete rather than using the terminal settings...) --- usr.bin/msgc/msg_sys.def | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/usr.bin/msgc/msg_sys.def b/usr.bin/msgc/msg_sys.def index a071ce928f8e..be27279c3604 100644 --- a/usr.bin/msgc/msg_sys.def +++ b/usr.bin/msgc/msg_sys.def @@ -1,4 +1,4 @@ -/* $NetBSD: msg_sys.def,v 1.3 1999/06/19 00:00:48 cgd Exp $ */ +/* $NetBSD: msg_sys.def,v 1.4 1999/06/19 00:13:19 cgd Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -157,8 +157,17 @@ static void msg_vprompt (char *msg, char *def, char *val, int max_chars, } } else msg_beep (); - } - else if (count < (max_chars - 1) && isprint(ch)) { + } else if (ch == 0x15) { /* ^U; line kill */ + while (count > 0) { + count--; + if (do_echo) { + getyx(msg_win, y, x); + x--; + wmove(msg_win, y, x); + wdelch(msg_win); + } + } + } else if (count < (max_chars - 1) && isprint(ch)) { if (do_echo) waddch (msg_win, ch); ibuf[count++] = ch;