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.
screen.c: In function ‘main’:
screen.c:940:4: warning: ‘strncpy’ output truncated before terminating nul copying 6 bytes from a string of the same length [-Wstringop-truncation]
strncpy(ap, "SCREEN", 6); /* name this process "SCREEN-BACKEND" */
^~~~~~~~~~~~~~~~~~~~~~~~
this is readded based on code which already was there
in older versions
we need TIOCSCTTY ioctl to set session control terminal
I'm not adding any system ifdefs, as it doesn't seem
like it should break anything on linux
Bug: 49170
In file included from /usr/include/string.h:494,
from os.h:41,
from screen.h:37,
from winmsgbuf.h:28,
from process.h:4,
from process.c:36:
In function ‘strncpy’,
inlined from ‘ShowDInfo’ at process.c:6241:3:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ offset [386, 513] is out of the bounds [0, 128] of object ‘buf’ with type ‘char[128]’ [-Warray-bounds]
return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
process.c: In function ‘ShowDInfo’:
process.c:6231:7: note: ‘buf’ declared here
char buf[128], *p;
^~~
later in code we set l = 512, but buffer is only 128, increase buffer
size to 512
help.c: In function ‘helppage’:
help.c:222:52: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 220 and 228 [-Wformat-overflow=]
sprintf(cbuf, "Command key: %s Literal %s: %s", Esc_buf, Esc_buf, buf);
^~ ~~~
In file included from /usr/include/stdio.h:862,
from os.h:32,
from acls.h:32,
from comm.h:8,
from help.h:4,
from help.c:34:
/usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 29 and 292 bytes into a destination of size 256
return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cbuf has size of 256, while Esc_buf has size of 5 and buf of 256
so printing literal string + those others may end up with longer string
in cbuf
fix that by increasing cbuf size
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
I don't even want to look at mails & git log why it was so broken
even before refactoring (probably my fault ... - need to get to
implementing automated teast at some time)
those variables are used to maintain most recently used list and I want
to reuse w_next to make proper list of windows instead of wtab
when we loop it doesn't make difference in which order we go, so we may
as well keep looping using mru list (and review later when we introduce
in order list)