Andrew Borodin
ddd645526a
Update copyright years.
2018-02-04 11:30:22 +03:00
Andrew Borodin
f4eb2c47c9
Indentation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-04-14 18:54:22 +03:00
Thomas Dickey
4d46a10862
Ticket #3697 : (tty_init): unify curses initialization
...
...for various curses implementations.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-04-14 14:06:13 +03:00
Andrew Borodin
e9fd11bfcd
Update copyright years.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 19:12:55 +03:00
Andrew Borodin
28ca14d73a
Aggressive use of whitespace() and whiteness() macros.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Andreas Mohr
469dc1352b
(tty_color_get_name_by_index): cleanup format compiler warning.
...
Found by GCC 6.2.0.
color-internal.c:186:33: error: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'int' [-Werror=format=]
Signed-off-by: Andreas Mohr <and@gmx.li>
2017-01-22 18:44:22 +03:00
Andrew Borodin
c4550374b2
Change type from int to gboolean for variables controlled by checkboxes.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Andrew Borodin
4247120b4a
(tty_init): support curses other than ncurses.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 10:46:18 +03:00
Andrew Borodin
787e24966d
Ticket #3697 : fix broken compatibility with ncurses.
...
Revert "Ticket #3665 : fix compatibility with netbsd curses."
This reverts commit 38d4c655d3
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 10:46:18 +03:00
Andrew Borodin
b19c336951
(parse_256_or_true_color_name): minor optimization.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-13 15:56:59 +03:00
Egmont Koblinger
31320b597c
Ticket #3145 : support for True Color (16 millions colors).
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-13 15:56:59 +03:00
Andrew Borodin
b22e376abf
Fix typos.
2016-09-11 11:11:01 +03:00
Andrew Borodin
0df9d1ce0b
Define NCURSES_CONST if curses library doesn't define it.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:11:01 +03:00
Andrew Borodin
b808dc564f
lib/tty/key.h: remove declaration of unimplemented function.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:32:04 +03:00
Andrew Borodin
c343697407
Minor refactoring of mc shutdown.
...
Move calls of disable_mouse() and disable_bracketed_paste()
to main() because init_mouse() and enable_bracketed_paste()
are called here.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:29:36 +03:00
rofl0r
38d4c655d3
Ticket #3665 : fix compatibility with netbsd curses.
...
The code that manipulates the ncurses backend into changing
the key combination to generate SIGINT from CTRL-c to CTRL-g does
so by accessing undocumented internal ncurses data structures.
This breaks compilation with netbsd-curses[0], and could also break
when the ncurses author decides to change internal structures in a
future release.
Fix it by using a portable approach that works everywhere using libc
primitives instead.
[0] https://github.com/sabotage-linux/netbsd-curses
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:21:02 +03:00
Yuri Khan
968882335a
Do not botch SIGWINCH delivery to the subshell.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-28 09:34:11 +03:00
Andrew Borodin
3204563bff
Move definition of reset_hp_softkeys variable to lib/tty/tty-slang.[ch].
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:28:47 +03:00
Andrew Borodin
eecf1fc946
Fix typo.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
cae521c61d
Clarify type cast in tgetsrt() calls.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
ccad69bccf
Clarify type cast in SLtt_tgetsrt() calls.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
bc14ff44c8
Remove min() and max() macros. Use MIN() and MAX() macros from GLib.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Yuri Khan
c1975a3a35
Do not duplicate alternate screen switching.
...
S-Lang already handles that in SLsmg_init_smg() and SLsmg_reset_smg().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-05 10:01:13 +03:00
Yuri Khan
abb4996589
Ticket #3640 : Subshell cursor position lost after window resizing.
...
Refactoring: rename functions:
do_enter_ca_mode -> tty_enter_ca_mode
do_exit_ca_mode -> tty_exit_ca_mode
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-05 10:01:13 +03:00
Andreas Mohr
9dddb0c78f
lib/tty/tty-ncurses.c: cleanup -Wcast-qual warning.
...
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-16 10:23:44 +03:00
Andreas Mohr
983ada66b0
lib/tty/key.c: cleanup -Wcast-qual warning.
...
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-16 10:23:44 +03:00
Andrew Borodin
8490ca7be4
Drop old mouse API and use the new one.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 15:29:55 +03:00
Andrew Borodin
471ea781ca
Update copyright years.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:10 +03:00
Andreas Mohr
697e406eb8
Robust sizeof() usage at function parameter and use memcpy destination sizeof...
...
...for more resilient to errors.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:09 +03:00
Andrew Borodin
d9ad3d2e32
Clarify __attribute ((format (printf))) usage.
...
Thanks Andreas Mohr <and@gmx.li> for the original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-11-05 14:33:20 +03:00
Andreas Mohr
f1b73ffe6e
Ticket #3465 : add -Wmissing-variable-declarations option...
...
...and fix relative warnings.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:59:18 +03:00
Andrew Borodin
2789e6e390
Ticket #3431 : add missing default cases.
...
Introduce -Wswitch-default check.
Some minor cosmetics.
Thanks Andreas Mohr <and at gmx dot li> for original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:50 +03:00
Andrew Borodin
44bf7e8d80
reset_hp_softkeys variable is used in S-Lang-based mc only.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:48 +03:00
Andreas Mohr
ca95dec659
Ticket #3428 : fix -Wredundant-decls compiler warnings...
...
...and use compiler option for future compile checks.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:48 +03:00
Andrew Borodin
454479549c
Update copyright years.
2015-02-26 09:12:08 +03:00
Egmont Koblinger
89d2db5ca3
Ticket #3065 : support of italic text.
...
Italic text is supported by S-Lang since pre2.3.0-107 and NCurses since 5.9.20130831.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-17 15:22:53 +03:00
Andrew Borodin
052ac838aa
Add semicolon to the table of key code names.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 12:57:47 +03:00
Paul Barker
e78b636eba
Ticket #3267 : mc fails to build against musl libc.
...
mc fails to build when using musl as the libc provider. This is due to
the CTRL() macro not being defined in <termios.h>. We could include
<sys/ttydefaults.h> explicitly but it's easier just to ensure CTRL is
defined.
This patch taken from the Sabotage Linux distro which fixes this. This
patch has also been tested and works with the OpenEmbedded build
system.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-10-01 15:19:54 +04:00
Egmont Koblinger
5943929956
Ticket #3183 : diffviewer line drawing fix.
...
The "topmiddle" and "bottommiddle" characters are defined incorrectly
in many skins. This is because the correct definition wouldn't work
with S-Lang build. The only place these characters are used is the
diffviewer if either the +/- signs or the line numbers are shown,
enabled by pressing S or L. The correct definition of these characters
currently show up as 'v' and 'w' characters.
The fix makes the diffviewer use tty_print_alt_char() as it is being used
in other parts of the code, and hence it fixes the bug.
It also fixes the skin definitions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-03-16 17:02:46 +04:00
Andrew Borodin
e5203cb023
Fix name of FSF in all *.c files.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-28 13:33:17 +04:00
Andrew Borodin
f0da49345a
Collapse list of copyright years to ranges. Add 2014 year.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-10 16:27:03 +04:00
Andrew Borodin
d8b58c84be
Ticket #3134 : fix some inconsistencies in "Learn keys" UI.
...
Reorder keys in "Learn key" window in accordance with the order
of keys on regular keyboards.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-10 16:26:18 +04:00
Andrew Borodin
d870aedad1
Ticket #3114 : fix broken build with NCurses.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-12-04 15:14:07 +04:00
Andrew Borodin
bb65b46790
Fix use of uninitialized memory in sigaction structure.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-11-25 13:47:40 +04:00
Slava Zanko
0ed4a91d7d
Reduce cppcheck warnings (style) in lib subdirectory.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-11-25 13:47:39 +04:00
Slava Zanko
0d489acd58
cppcheck: reduce variable scope.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-11-25 13:47:39 +04:00
Slava Zanko
a3b8a2f005
Use UTF8_CHAR_LEN instead of a magic number
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-11-25 13:47:39 +04:00
Andrew Borodin
5a04c1ede2
Indentation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:27:24 +04:00
Andrew Borodin
6a05f30ecf
Clarify usage of SA_RESTART.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:09 +04:00
Andrew Borodin
e78b1fdf66
Remove redundant checks for g_strdup().
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:08 +04:00