fixed https://savannah.gnu.org/bugs/?41934
C-a C-h is a hotkey for 'prev', but C-a h is not.
prepare for v.4.2.0
incompatible protocol
fix screen to run on terminals with long $TERM

According to tic man page:
Terminal names exceeding the maximum alias length
(32 characters on systems with long filenames, 14 characters otherwise)
will  be  truncated  to  the maximum alias length and a warning message
will be printed.

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
test more libraries for tgetent

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
Fix bug when building without nethack commands

When building with -DNONETHACK all commands were off by 1 because of
missing nethack command in table.

Provide dummy command with info message.

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
do proper checks if we are on altscreen or not

fixes screen segfaults with `altscreen on` when using applications making
use of altscreen like mc when resizing screen window

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
Revert "fix screen to run on terminals with long $TERM"

This reverts commit 44020241d033555e8e90fad3c88617dce1aed0bb.
fix screen to run on terminals with long $TERM

According to tic man page:
Terminal names exceeding the maximum alias length
(32 characters on systems with long filenames, 14 characters otherwise)
will be truncated to the maximum alias length and a warning message
will be printed.

Use 32 as it's bigger value and it won't matter on systems with smaller
filenames.

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
Allow screen to run for users with long logins

username can have up to 32 characters

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
allow for defining term and login length if needed

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
fix wrong option name in configure.in

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
Enhance the vsprintf() test to also succeed on Alpha.

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
Add some missing defined(__GLIBC__) to get linux-ish terminal handling.

Thanks: Jan Christoph Nordholz

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
Add a missing include to get a few prototypes that caused build issues on kfreebsd-amd64.

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
fix parallel build

screen FTBFS if make uses parallel building (at least with -j8). This
patch adds the missing dependencies to make parallel builds work, too.

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
fix locking root screen when root has no password

When locking a root-owned screen, check that root has a
password set. If not, ask for an unlocking key.
See https://bugs.launchpad.net/bugs/6760

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
Under BSD set controlling terminal explicitly.

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
increase size of MAXSTR and input line buffer

Increase the MAXSTR macro to suit present-day needs.
Increase the maximum length of the input line buffer likewise.

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
Get rid of several minor gcc warnings.

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>