Commit Graph

1284 Commits

Author SHA1 Message Date
Richard Lavigne
c22d4010fb Modify documentation to reflect how to use the new color codes. Documentation still seems incomplete or wrong. 2017-07-31 13:35:44 +02:00
Richard Lavigne
3549f9a4ce Add new color formatting codes. HTML style #ABC or #AABBCC. Starting character can be x or # 2017-07-31 13:35:44 +02:00
Amadeusz Sławiński
f5d11d9d22 reduce user bits granularity
otherwise we end up with w_monitor still enabled after :monitor off

./screen
C-a :defmonitor on
C-a c
sleep 5 && echo -e "\a"
C-a c
C-a :monitor off
sleep 5 && echo -e "\a"
C-a 0
C-a :windowlist

it should render 1 and 2 window differently on windowlist
will need to be checked later, how it works with more than one user

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-31 13:35:44 +02:00
Amadeusz Sławiński
f99b9b8bc0 stop clobbering display variable
not sure why it was done, but it seems to serve no functional purpose at
all and breaks displaying flags in :windowlist
display is used by AddWindowFlags to check whether we should show some
of flags and they are not shown when display == 0

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-24 17:47:17 +02:00
Amadeusz Sławiński
a5d0841f85 check if display exists before dereferencing it
Bug: 43054
Bug: 51500

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-24 17:09:48 +02:00
Amadeusz Sławiński
c8e8793b17 remove leftover debug 2017-07-20 12:35:36 +02:00
Amadeusz Sławiński
2fb4965f09 return number of on screen lines
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-11 16:26:56 +02:00
Amadeusz Sławiński
d5b4bce6b9 fix segfault when querying info on nonUTF screen
Bug: 51402
2017-07-10 21:08:24 +02:00
Amadeusz Sławiński
a9cac76d81 fix typo in comment
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-09 23:51:18 +02:00
Amadeusz Sławiński
2672c2a8f4 remove cruft from pty.c
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-09 23:51:16 +02:00
Amadeusz Sławiński
2aed5aece5 move TtyName inside function
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-09 23:51:12 +02:00
Amadeusz Sławiński
612ade8edd fix failure if compiling with TIOCKSET
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-09 23:51:09 +02:00
Amadeusz Sławiński
0b7f05639e check dup() return value
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-09 23:51:05 +02:00
Amadeusz Sławiński
a0b973f2ae refactor use of sizeof
introduce ARRAY_SIZE, like in Linux kernel
use explicit structs, if not using arrays

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-09 23:51:01 +02:00
Amadeusz Sławiński
6724ef2529 dynamically allocate windows
Bug: 23691
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-09 23:50:53 +02:00
Amadeusz Sławiński
bbda45bc41 allow changing maxwin at runtime
ultimately this setting should probably get dropped for dynamic
allocation

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-09 23:50:49 +02:00
Amadeusz Sławiński
e947382b6d expose less functions via header
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-09 23:50:41 +02:00
Amadeusz Sławiński
86ce25b620 separate handling of 16 color and 256 color escapes
on xterm
echo -e "\e[38;5;1mtest\e[1mtest"
puts both 'test' strings in same color, however in screen, second one is
bright

do note that defbce on, may interfere with this

Bug: 50601
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-09 23:50:32 +02:00
Amadeusz Sławiński
e1dd1c2fe9 type cleanups
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-09 23:50:29 +02:00
Amadeusz Sławiński
4f9fbd49aa cleanup some types in encoding handling
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-09 23:50:24 +02:00
Amadeusz Sławiński
f6b6708126 check dup return values
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-09 23:50:20 +02:00
Amadeusz Sławiński
d50e9516e9 add italics support
Bug: 36676
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-09 23:50:10 +02:00
Amadeusz Sławiński
7e5eea415b Panic if we fail dup
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-09 23:50:04 +02:00
Amadeusz Sławiński
7c0362530b bail out if we fail ftruncate
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-07-09 23:48:44 +02:00
Amadeusz Sławiński
22ff8d2a62 Unicode standard says only 21 bits are used 2017-07-01 21:51:12 +02:00
Matt Whitlock
1f3e3b6725 Fix parallel make install
Fixes:
https://bugs.gentoo.org/show_bug.cgi?id=611130
2017-07-01 21:48:13 +02:00
Amadeusz Sławiński
36ac3e29f1 constify ListGeneric 2017-06-28 21:42:18 +02:00
Amadeusz Sławiński
16b7605e44 check if we could reassociate std streams 2017-06-22 22:56:51 +02:00
Amadeusz Sławiński
86fb54cd3b do proper casting to avoid warnings 2017-06-22 22:48:00 +02:00
Amadeusz Sławiński
8c78d7f959 check results of setgid/uid 2017-06-22 22:42:41 +02:00
Amadeusz Sławiński
eebc0e2689 silence unused variable warning 2017-06-22 22:15:19 +02:00
Amadeusz Sławiński
c68f9e3385 silence -Wunused_result warnings
of course we can fail write() here for reasons, but we don't care as we
are on error path anyway, so we can't fail more

apparently due to some design decisions in gcc/glibc one cannot just
(void)write(...);
hence additional variable
2017-06-22 22:01:17 +02:00
Amadeusz Sławiński
5005299b77 LockTerminal is now unused, so remove it 2017-06-22 22:01:17 +02:00
Amadeusz Sławiński
dc9542b26a authenticate on attach/detach
instead of fake lockscreen
2017-06-22 22:01:17 +02:00
Amadeusz Sławiński
d7ef5114c2 prepare for authentication in socket.c 2017-06-22 16:29:53 +02:00
Amadeusz Sławiński
151af7887b remove LockTerminal call 2017-06-22 16:29:53 +02:00
Amadeusz Sławiński
bf1c6739a6 move forward declaration to proper place 2017-06-22 16:29:53 +02:00
Amadeusz Sławiński
c62bad265d Revert "remove unneeded password stuff from socket attach/detach"
This reverts commit 29501d7426.

Actually this is correct place to ask user for password, as it is
handled server side.
It's bit modified to build, will need also some integration with
authentication.c to check if password is correct.
2017-06-22 16:29:53 +02:00
Guo Ci
6a2f12c28a begin viewing scrollback buffer at the first line of output instead of at the start of the scrollback buffer
This issue has been discussed before:
https://bbs.archlinux.org/viewtopic.php?id=108640

Copy mode and “hardcopy -h” always begin at the start of the scrollback buffer.
If a user sets a large scrollback limit with little output, then copy mode and
the file written by “hardcopy -h” will begin with many blank lines before the
first line of output.

The attached patch limits the scrollback buffer traversal to begin at the first
line of output, instead of the beginning of the scrollback buffer.

Also, code for moving to %age of buffer is changed to use float division so
that two different rep_cnt will not jump to the same location, except for
buffers less than 100 lines. Previously, the computed line number is rounded
down to the nearest 100th due to integer division.

Bug: 49377
2017-06-21 23:29:50 +02:00
Brian De Wolf
d23b14f971 update unicode wide tables
Bug: 50044
2017-06-21 22:52:11 +02:00
Amadeusz Sławiński
310d54ba75 small cleanups 2017-06-21 16:02:26 +02:00
Amadeusz Sławiński
d5d2476a35 remove dangling else 2017-06-20 12:36:10 +02:00
Amadeusz Sławiński
f1ec450fb0 reduce variable scope 2017-06-20 12:27:26 +02:00
Amadeusz Sławiński
c6ac2e4446 Panic() if we fail chown() on socket 2017-06-20 12:21:05 +02:00
Amadeusz Sławiński
d1dfd487bf Panic(), if we can't write to D_userfd 2017-06-19 22:50:42 +02:00
Amadeusz Sławiński
5ab379f727 make pow_detach_msg from screenrc actually work 2017-06-19 22:50:42 +02:00
Amadeusz Sławiński
e1363573da correct variable scope, and name better 2017-06-19 22:50:39 +02:00
Amadeusz Sławiński
5db5fe4511 enable PAM by default, print configuration on ./configure
also add BIG warning for people trying to build without it, basically
running screen as root may make sense on some embedded linux, where you
don't have users, but everyone else should use PAM

while at it improve ./configure output to show final configuration

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-06-10 18:18:20 +02:00
Amadeusz Sławiński
c68a4731d4 fix crash when build without PAM support
apparently crypt and getspnam, don't need to be freed, as the buffer
gets reused by library, if we ever call them again...

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2017-05-30 23:27:06 +02:00
Neal Fultz
945ad54142 Adding status escape for window group 2017-05-30 22:23:03 +02:00