ncurses 6.1 changed kmous capability from "\e[M" to "\e[<". It seems to
be done to signal that terminal supports sgr mouse mode. screen assumed
that if kmous is set to "\e[M" it is on xterm compatible terminal
anyway, so just dynamically detect which one is used and override
relevant kmapdef.
InitKeytab() is moved, so kmapdef[] can be overriden before
initialization, as InitTermcap() needs to run first, as far as I can
tell this should have no consequences.
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
Fixes problem when pressing arrows in some prompts causes arrows to stop
in other places.
For example pressing up arrow in 'kill --confirm' prompt stops up arrow
from working on 'windowlist'
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
* Change RunBlanker to call OpenDevice so permissions on slave
PTY are correctly set.
* Update handling of file descriptors after fork to be similar to
ForkWindow on at pty (fixes debug and leaked descriptors)
* DEBUG now creates screen.blanker to debug blanker fork
* Allow display of error message when display blocked by blanker
(because message is probably from blanker failing to start)
Bug: 55512
Signed-off-by: Scott Shambarger <devel@shambarger.net>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
* Set eff_uid/eff_gid after setuid/setgid to prevent nested Panic
MakeClientSocket calls xseteuid(eff_uid=0) - results in nested
Panic and SendErrorMsg not getting sent.
* Set ServerSocket to -1 after fork so that child Panic doesn't
remove socket in eexit.
Bug: 55511
Applied with some modifications
Signed-off-by: Scott Shambarger <devel@shambarger.net>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
Move `nomem' label of ChangeWindowSize() to the end of function and
add test for value of `nhlines'
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net
This reverts commit ff98d7ff58.
This can potentially cause double-free. `nmlines' and `nhlines'
should be freed in preceding lines.
`nmlines' and `nhlines' are not used in the rest of the function
except in `nomem' label and their valuse are copied into `p', so
their value should be zeroed.
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net
There's two way to terinate an OSC: ST (\033\\) or BEL (\a). Use
whatever the original request used instead of always forcing a BEL.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
(cherry picked from commit 11a74b8382)
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.
Tested with gnome-terminal and xterm. When called with "?" argument the
current background color is returned:
$ echo -ne "\e]11;?\e\\"
$ 11;rgb:2323/2727/2929
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
(cherry picked from commit 7059bff20a)
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net
Hi there,
just found a few typos, see attachment.
(please, CC me)
Thanks.
--
https://www.juef.space/
From 745ba353867142d3e00f4d2ab06962ba0d3aaaab Mon Sep 17 00:00:00 2001
From: Svyatoslav Mishyn <svyatoslav.mishyn@gmail.com>
Date: Wed, 4 Jul 2018 21:40:48 +0300
Subject: [PATCH] doc: fix typos
Remove "allbox" tbl option from large keybinding table.
When formatting for print, large tbl tables need to be handled
specially to split nicely across the pages; instead we
just add horizontal lines and we let them overflow the pages.
The input translation table seems to fit nicely on one page
and is left as is with the "allbox" option.
bindkey examples seem to be glued to their following descriptions.
This looks bad in the printable versions, so give it some space.
Alternatively we could possibly reverse the indentation and use
something like this:
bindkey -d
Show all of the default key bindings.
but this is inconsistent with other examples.
"Keypad =" table entry had a double horizontal line instead of a single "="
when printed with troff.
From "Tbl -- A Program to Format Tables" by M. E. Lesk:
Single column horizontal lines
-- An input table entry containing only the character (...) = is
taken to be a single or double line extending the full width of the
column. Such lines are extended to meet horizontal or vertical
lines adjoining this column. To obtain these characters explicitly
in a column, either precede them by \& or follow them by a space
before the usual tab or newline.
nroff warning:
tbl:src/doc/screen.1:551: excess data entry `(lastmsg)' discarded
tbl:src/doc/screen.1:553: excess data entry `Repeat the last message displayed in the message line.
' discarded
Linux can be misdetected as SVR4 because it has
libelf installed. This leads to linking with libelf, even though no
symbols from that library were actually used, and to a workaround for
a buggy getlogin() being enabled.
It is not documented which exact SVR4 system had the bug that the
workaround was added for, so all I could do is make an educated guess
at the #defines its compiler would be likely to set.
Modified from patch by Maarten ter Huurne.
Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
AC_PROG_CC already performs sanity checks. And unlike the removed
checks, it does so in a way that supports cross compilation.
Modified from patch by Maarten ter Huurne.
Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
While build dir name contained "yes", and compiled with
producing debugging information (-g), the configure failed.
The pattern of AC_EGREP_CPP (string "yes") mismatched with
dir name. It caused the test of AC_EGREP_CPP incorrect.
Use YES_IS_DEFINED to replace yes which is not often used
as dir name.
Bug: 52329
(Fix release v.4.6.2 or above)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
After freeing D_xtable set the value to NULL so that checks of D_xtable
return false. RAW_PUTCHAR can cause a segfault if invoked after
FreeTransTable. This can happen in FreeDisplay when SetTTY encounters an
error performing an ioctl on the tty.
0 0x000055583e7032a4 in RAW_PUTCHAR (c=110) at display.c:656
1 0x000055583e6cbe4c in PutWinMsg (s=0x55583e932801 <winmsg_buf+1> "clark-dt -* ",
s@entry=0x55583e932800 <winmsg_buf> "nclark-dt -* ", start=<optimized out>, start@entry=0, max=40, max@entry=49) at screen.c:3053
2 0x000055583e7003f6 in PrePutWinMsg (s=0x55583e932800 <winmsg_buf> "nclark-dt -* ", start=0, max=49) at display.c:2174
3 0x000055583e705339 in RefreshLine (y=65, from=<optimized out>, to=48, isblank=0) at display.c:2399
4 0x000055583e70630c in MakeStatus (msg=0x7ffeaa03d7d0 "SetTTY (fd 3): ioctl failed: Input/output error") at display.c:2056
5 0x000055583e6c8a68 in Msg (err=<optimized out>, fmt=<optimized out>) at screen.c:2091
6 0x000055583e6c83a1 in CoreDump (sigsig=<optimized out>) at screen.c:1664
7 <signal handler called>
8 0x000055583e7032a4 in RAW_PUTCHAR (c=110) at display.c:656
9 0x000055583e6cbe4c in PutWinMsg (s=0x55583e932801 <winmsg_buf+1> "clark-dt -* ",
s@entry=0x55583e932800 <winmsg_buf> "nclark-dt -* ", start=<optimized out>, start@entry=0, max=40) at screen.c:3053
10 0x000055583e700443 in PrePutWinMsg (s=0x55583e932800 <winmsg_buf> "nclark-dt -* ", start=0, max=<optimized out>) at display.c:2165
11 0x000055583e705339 in RefreshLine (y=65, from=<optimized out>, to=48, isblank=0) at display.c:2399
12 0x000055583e70630c in MakeStatus (msg=0x7ffeaa040780 "SetTTY (fd 3): ioctl failed: Input/output error") at display.c:2056
13 0x000055583e6c8a68 in Msg (err=<optimized out>, fmt=<optimized out>, fmt@entry=0x55583e719f41 "SetTTY (fd %d): ioctl failed") at screen.c:2091
14 0x000055583e6dfadc in SetTTY (fd=<optimized out>, mp=<optimized out>) at tty.c:624
15 0x000055583e707d08 in FreeDisplay () at display.c:340
16 0x000055583e6c8612 in Detach (mode=mode@entry=2) at screen.c:2000
17 0x000055583e6dbb52 in FinishDetach (m=0x55583e933b80 <m>) at socket.c:1607
18 0x000055583e6ddcd5 in FinishAttach (m=m@entry=0x55583e933b80 <m>) at socket.c:1424
19 0x000055583e6de531 in ReceiveMsg () at socket.c:1235
20 0x000055583e711583 in sched () at sched.c:237
21 0x000055583e6c7113 in main (ac=0, av=<optimized out>) at screen.c:1466
Bug: 52133
Signed-off-by: Nate Clark <nate@neworld.us>