Commit Graph

619 Commits

Author SHA1 Message Date
Amadeusz Sławiński
1ca2816117 Release v.4.7.0
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
v.4.7.0
2019-10-02 00:02:48 +02:00
Amadeusz Sławiński
c0349fd511 Update ambiguous and wide characters tables to Unicode 12.1.0
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2019-10-01 23:55:20 +02:00
Amadeusz Sławiński
fad4c29fd9 Fix broken mouse after ncurses 6.1
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>
2019-09-07 18:38:55 +02:00
Amadeusz Sławiński
d6e9a6a693 Clean whole buffer if we don't want to parse it
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>
2019-04-17 20:58:05 +02:00
Alexander Naumov
1e5db24077 Copyright update for 2019 2019-03-29 20:35:44 +01:00
Alexander Naumov
ee2e2254bf Typo in man page
bug #56027
2019-03-29 20:33:09 +01:00
Scott Shambarger
498e53ff09 Fix blanker to work when screen is suid root
* 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>
2019-01-27 16:07:57 +01:00
Scott Shambarger
96718a2146 Prevent Panic causing Panic, and children removing sockets
* 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>
2019-01-27 16:07:36 +01:00
Václav Doležal
d51308fbff Fix confusing indentation on several places
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2018-11-18 16:01:04 +01:00
Václav Doležal
26e61437ef Fix possible unterminated string
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net
2018-11-18 16:01:00 +01:00
Václav Doležal
61d6955517 Fix for nomem handling in resize.c:ChangeWindowSize()
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
2018-11-18 16:00:56 +01:00
Václav Doležal
10ddd81e20 Revert "those 0 assignment made rest of code totally not working"
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
2018-11-18 16:00:51 +01:00
Václav Doležal
14db9f00d3 Fix file descriptor leak
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net
2018-11-18 16:00:47 +01:00
Václav Doležal
bea9483c35 Use memcpy(3) in string substitution
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net
2018-11-18 16:00:42 +01:00
Lubomir Rintel
908458c7c3 ansi: terminate xterm OSC response the same way as the request
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
2018-11-18 16:00:33 +01:00
Lubomir Rintel
c5db181b6e ansi: add support for xterm OSC 11
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
2018-11-18 16:00:25 +01:00
Therese Godefroy
ee12d36719 apply patch by Therese fixing some doc issues
This fixes some issues when documentation is generated for online
viewing.
2018-10-12 00:48:30 +02:00
Svyatoslav Mishyn
f96263221b doc: fix typos
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
2018-07-24 23:19:31 +02:00
Amadeusz Sławiński
26b4c2d790 remove character substitution
it may be not compatible with some man page viewers
2018-06-21 21:47:03 +02:00
Eric S. Raymond
123f7cbbf4 fix man page 2018-06-21 21:41:12 +02:00
Marcin Cieślak
6c880e68a3 manpage: Explain window permissions in a table 2018-05-31 14:38:42 +02:00
Marcin Cieślak
0d9858e71d manpage: Use monospaced font to render example of "displays" 2018-05-31 14:38:34 +02:00
Marcin Cieślak
f891379e02 manpage: Indent both examples for readreg 2018-05-31 14:38:28 +02:00
Marcin Cieślak
a2669fdfa5 manpage: keep nonblock and status parameters on the same line 2018-05-31 14:38:21 +02:00
Marcin Cieślak
e3a4818f6e manpage: explain flow control state indicators with a table 2018-05-31 14:38:15 +02:00
Marcin Cieślak
94b07411c9 manpage: Remove horizontal lines on large tables
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.
2018-05-31 14:38:07 +02:00
Marcin Cieślak
f1935c872e manpage: add vertical space after bindkey examples
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.
2018-05-31 14:38:01 +02:00
Marcin Cieślak
e6d02361b1 manpage: Print = instead of double horizontal line
"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.
2018-05-31 14:37:53 +02:00
Amadeusz Sławiński
3f8777e6cf this actually should be 3 dots
they are part of syntax
2018-05-15 21:21:17 +02:00
Marcin Cieślak
9be818e155 Fix [bug #53552] wording in the manpage 2018-05-07 22:46:30 +02:00
Marcin Cieślak
75667719b7 groff warning: can't find font "p" 2018-05-07 22:46:24 +02:00
Marcin Cieślak
0fb08f4477 Fix (login) entry in the default bindings
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
2018-05-07 22:46:17 +02:00
Marcin Cieślak
97f004299a Provide fallback for Unicode ellipsis 2018-05-07 22:46:10 +02:00
Marcin Cieślak
35c9247dc2 Fix intendation around "displays"
Remove UTF-8 quotes
2018-05-07 22:45:58 +02:00
Amadeusz Sławiński
c91ab990a0 screen v4 has no truecolor support, so remove it from manpage 2018-04-04 23:00:47 +02:00
Alexander Naumov
bcd7cab017 Update Changelog (applying patches - bug#43223)
Cross-compilation support

Thanks for patches to Maarten ter Huurne <maarten@treewalker.org>
and Jussi Kukkonen <jussi.kukkonen@intel.com>

Thanks for testing these (4.6.2) on ARM (Xilinx Zynq) to
Ben Kamen <ben@benkamen.net>
2018-02-24 15:47:20 +01:00
Jussi Kukkonen
ec90292592 [PATCH 4/4] Avoid mis-identifying systems as SVR4
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>
2018-02-24 15:22:05 +01:00
Jussi Kukkonen
c573b89139 [PATCH 3/4] Skip host file system checks when cross-compiling
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>
2018-02-24 15:18:33 +01:00
Jussi Kukkonen
abba47ce42 [PATCH 2/4] Provide cross compile alternatives for AC_TRY_RUN
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>
2018-02-24 15:14:48 +01:00
Jussi Kukkonen
6b320186db [PATCH 1/4] Remove redundant compiler sanity checks
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>
2018-02-24 15:09:10 +01:00
Ryan
40819ffe2b support sgr mouse mose
Bug: #37206
2018-02-07 00:17:07 +01:00
Alexander Naumov
3e9aeb3316 update copyright for 2018 2018-01-11 16:53:20 +01:00
Amadeusz Sławiński
5c3643fb70 fix: configure option "--disable-use-locale" is not working
Bug: 52663
2017-12-16 15:09:57 +01:00
Hongxu Jia
8c2b4061d1 fix configure failed while build dir name contains "yes"
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>
2017-11-08 18:33:41 +01:00
Amadeusz Sławiński
aa6165ef67 Release v.4.6.2
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
v.4.6.2
2017-10-23 14:18:26 +02:00
Alexander Naumov
46bc00dd34 Replace the use of read /dev/kmem by a syscall for AIX platforms
bug #49148
2017-10-04 15:21:36 +02:00
Amadeusz Sławiński
aaac75d809 Revert "fix restoring cursor position after leaving altscreen"
This caused degrade when restoring cursor in other cases,
revert, while looking for better fix

This reverts commit 8062db33b8.

Bug: 51832
2017-10-03 11:11:44 +02:00
Nate Clark
9019b0d063 termcap.c: in FreeTransTable set D_xtable to NULL
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>
2017-09-28 10:54:37 +02:00
Curtis Brown
81d89922ad documentation fix for command "resize" 2017-09-26 16:48:50 +02:00
Jon Jensen
68b87ac1ce Remove documentation for defzombie setting which doesn't exist 2017-08-17 10:12:38 +02:00