From 4ad8ed80a6e8969fd8a2af4ef7e29929126aeaad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sun, 25 Jul 2021 14:32:40 +0200 Subject: xterm: Add patch-interactive-reset --- .../mit/xterm/dist/patch-interactive-reset | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 xsrc/external/mit/xterm/dist/patch-interactive-reset diff --git a/xsrc/external/mit/xterm/dist/patch-interactive-reset b/xsrc/external/mit/xterm/dist/patch-interactive-reset new file mode 100644 index 0000000..30874e5 --- /dev/null +++ b/xsrc/external/mit/xterm/dist/patch-interactive-reset @@ -0,0 +1,47 @@ +$NetBSD$ + +Add interactive-reset(string) action, which does the same as +hard-reset(), but it also sends the given string to the terminal +immediately after performing the reset. + +The typical use is to send ^L after the hard reset, like so: + + interactive-reset(0x0c) + +--- charproc.c.orig 2018-03-14 06:04:22.000000000 +0000 ++++ charproc.c +@@ -205,6 +205,7 @@ static jmp_buf vtjmpbuf; + + /* event handlers */ + static void HandleBell PROTO_XT_ACTIONS_ARGS; ++static void HandleInteractiveReset PROTO_XT_ACTIONS_ARGS; + static void HandleIgnore PROTO_XT_ACTIONS_ARGS; + static void HandleKeymapChange PROTO_XT_ACTIONS_ARGS; + static void HandleVisualBell PROTO_XT_ACTIONS_ARGS; +@@ -250,6 +251,7 @@ static XtActionsRec actionsList[] = { + { "insert-eight-bit", HandleEightBitKeyPressed }, + { "insert-selection", HandleInsertSelection }, + { "insert-seven-bit", HandleKeyPressed }, ++ { "interactive-reset", HandleInteractiveReset }, + { "interpret", HandleInterpret }, + { "keymap", HandleKeymapChange }, + { "popup-menu", HandlePopupMenu }, +@@ -11322,6 +11326,18 @@ HandleVisualBell(Widget w GCC_UNUSED, + } + + /* ARGSUSED */ ++void ++HandleInteractiveReset(Widget w, ++ XEvent *event GCC_UNUSED, ++ String *params GCC_UNUSED, ++ Cardinal *param_count GCC_UNUSED) ++{ ++ ReallyReset(term, True, False); ++ HandleStringEvent(w, event, params, param_count); ++ longjmp(vtjmpbuf, 1); ++} ++ ++/* ARGSUSED */ + static void + HandleIgnore(Widget w, + XEvent *event, -- cgit v1.2.3