uwe
c71ebe1c3f
Ignore terminfo padding specifications when checking whether
...
exit_attribute_mode contains exit_alt_charset_mode.
Fixes PR lib/53653.
2018-10-26 22:22:24 +00:00
roy
d34c5681a4
curses: fix ripoffline
...
When creating stdscr, ensure it's placed and sized in accordance with
lines ripped off.
LINES is no longer adjusted for lines ripped off.
POSIX makes no mention that it should be adjusted.
Bottom lines are now placed correctly.
Lines ripped off are now displayed after calling initscr.
ok kamil@
Fixes PR #53635
2018-10-02 17:35:44 +00:00
roy
5128a2ed79
POSIX says that use_env(3) must precede setupterm(3).
...
The former lives in curses.h, but the latter lives in term.h.
This is solved by moving the function to libterminfo.
Because the environment can affect the terminal capabilities for
lines and columns, it follows that the tty size should affect it to.
So move that code to libterminfo and adjust in libcurses.
2017-03-23 00:55:39 +00:00
christos
010ddb1dfc
Make this compile again (gcc does not like strcmp(maybe-NULL, maybe-NULL);
...
simplify the life of the {compiler,human eyes}.
2017-03-20 20:44:06 +00:00
roy
8dcd50a6a0
Move ESCDELAY to curses.c so all globals are close to each other.
...
Remove _reentrant and use ESCDELAY and TABSIZE as we're not really
reentrant.
2017-01-31 09:17:53 +00:00
roy
7487819a0b
Check _cursesi_term is set in a few places and sprinkle some static.
2017-01-30 16:50:44 +00:00
roy
64b2ce979c
If either set_escdelay(3) or set_tabsize(3) are called, set _reentrant
...
to ensure we use the saved value for the sceen.
This effectively makes ESCDELAY and TABSIZE read-only when either
of these functions are called.
2017-01-30 14:55:58 +00:00
roy
c77e1d014f
Move the ripoffline logic out of screen.c and into ripoffline.c.
...
Store ripped off lines in the SCREEN structure so we can repaint then
when the terminal is resized.
Fix mvwin(3) so it can move windows in the ripped off area.
2017-01-11 20:43:03 +00:00
roy
25445577c0
Implement POSIX curses function ripoffline(3).
2017-01-10 10:13:24 +00:00
roy
50a63ac8d2
KNF.
...
Normalise coding style.
White space police.
Sprinkle some extra braces to make the flow more clear.
No functional changes.
2017-01-06 13:53:18 +00:00
roy
433b66d936
Whitespace
2017-01-05 21:42:04 +00:00
roy
47cc2fc353
Add the set_escdelay(3) and set_tabsize(3) ncurses extensions.
2017-01-05 20:31:37 +00:00
roy
77943ff6ed
Implement POSIX curses use_env function.
2016-12-31 17:46:35 +00:00
roy
1c3d328353
Add the POSIX filter() function to libcurses.
2016-12-30 22:38:38 +00:00
jdc
dfb25fd120
Remove extra new line in debugging output.
2016-01-09 19:05:13 +00:00
christos
7099a15c75
PR/50092: don't leak screen on multiple setterms.
2015-11-24 01:59:32 +00:00
roy
2e2213ef89
Add TABSIZE, which is derived from terminfo init_tabs.
...
Use this when processing \t.
If TABSIZE is set in the environment, this takes precedence.
2013-10-16 19:59:29 +00:00
dsainty
8ed5bc1d62
Fix a NULL dereference if the exit_alt_charset_mode capability is not defined.
...
The previous version of this file changed a terminal initialisation test on
the exit_attribute_mode capability, checking for the exit_alt_charset_mode
capability as a substring, rather than performing a search for the hard-coded
^O character.
That works better on terminals where ^O is not the correct value for
exit_alt_charset_mode. But it works worse on terminals that don't have a
definition specified for exit_alt_charset_mode.
For example:
% TERMCAP='xterm:me=\E[m:' TERM=xterm vi
segmentation fault (core dumped) TERMCAP='xterm:me=\E[m:' TERM=xterm vi
The crash can be avoided (without fixing the bug) by defining
exit_alt_charset_mode:
% TERMCAP='xterm|:me=\E[m:ae=:' TERM=xterm vi
ex/vi: Error: xterm: No such process
We now test exit_alt_charset_mode for NULL before continuing with the fatal
test, restoring the original no-crash behaviour.
XXX does_ctrl_o() is now just a naive reimplementation of strstr(), so should
probably just use strstr() instead.
2013-09-25 03:28:20 +00:00
jdc
b29886d4e9
Extend does_ctrl_o() to compare exit attribute and ext ACS sequences.
2013-05-05 14:24:05 +00:00
roy
258cf0abec
Add capfile(5) to describe the termcap format.
...
Adjust various man pages and other documentation to point to capfile(5)
instead of termcap(5).
Remove getcap(3) as curses hasn't been building it for a long time.
Punt wrterm.c as tset no longer uses it.
2012-04-21 12:27:24 +00:00
roy
64afaacce6
Move longname(3) from curses to terminfo, pre-cursor to fix PR/43386.
2011-10-04 11:01:13 +00:00
roy
582936ff0d
Don't assume the terminal has a description.
2010-02-11 11:45:47 +00:00
roy
98eb889579
Userland now builds and uses terminfo instead of termcap.
...
OK: core@, jdc@
2010-02-03 15:34:37 +00:00
roy
43d5eb454b
Prepare curses for the possibility of changing from termcap to terminfo.
...
term.h #defines lines, pad_char and no_color_video macros which conflict
with existing curses code. We change lines to alines and nlines depending
on use, pad_char to padchar and no_color_video becomes no_color_attributes
but with a strong alias from no_color_video.
2009-07-22 16:57:14 +00:00
christos
4534498c64
Get the ESCDELAY from the environment.
2009-02-22 20:05:48 +00:00
martin
167a3a9d68
Make it build without HAVE_WCHAR
2007-10-06 20:14:41 +00:00
jdc
260ad27047
We don't need separate #ifdef's for __ALTCHARSET and WA_ALTCHARSET, as they
...
are defined to be the same in curses.h.
2007-09-19 22:00:43 +00:00
blymn
e124de36d8
Merge in wide curses code done as a Summer of Code project by
...
Ruibiao Qiu.
2007-05-28 15:01:53 +00:00
jdc
1f221324cf
Add debug "areas" that allow selective debugging by setting the
...
"CURSES_TRACE_MASK" environment variable. Postive vales include
debug areas, negative values exclude them.
2007-01-21 13:25:36 +00:00
blymn
6b3a44ef27
Remove _cursesi_genbuf, it was not being set and caused a SIGSEGV
...
in getcap(). Fixed getcap() to use screen->cursesi_genbuf.
Thanks to Peter Bex for spotting this. This closes pr lib/26404.
2004-07-24 13:10:47 +00:00
fvdl
3144ca7d6b
Don't compare a char to NULL.
2003-10-21 00:30:05 +00:00
agc
eb7c1594f1
Move UCB-licensed code from 4-clause to 3-clause licence.
...
Patches provided by Joel Baker in PR 22280, verified by myself.
2003-08-07 16:42:00 +00:00
jdc
ea7837ba99
Redo the conflict calculation (again).
...
Assume that "me" clears all attributes apart from acs.
Problem noticed when working on window(1).
2003-02-02 17:54:38 +00:00
jdc
ec51d5cc4b
Change the way we calculate conflicts when turning off attributes.
...
We now check the termcap entries for "\E[m" or "\E[0m" or a longer
"\E[ ... m" sequence containing a "0".
2003-01-27 21:12:29 +00:00
jdc
d899fbce8b
Set LINES and COLS here so that __swflags() sets flags on the initial windows.
...
Remove no longer useful debug output.
2002-12-05 17:04:25 +00:00
jdc
5436cf8ed4
Add a hack for xterm-like terminals where "\E[m" will turn off
...
other attributes.
2002-09-11 15:23:24 +00:00
christos
ce1b68c92d
PR/17352: David Laight: Curses core-dumps on windows > 1024 wide.
2002-06-26 18:13:59 +00:00
blymn
ef5927835e
Remove extraneous tabs from blank lines.
2002-01-02 10:38:27 +00:00
blymn
51344953b1
* Remove termcap globals from public interface
...
* Clean up commented out code
2001-12-11 11:18:17 +00:00
blymn
c84d91aad5
* Major change to add support for the newterm/set_term functions.
...
* Added fix to getch.c suggested by Gabriel Rosenkoetter (thanks :-)
2001-12-02 09:14:20 +00:00
jdc
c9e9551689
Revert the change to the `pc' capability from the previous change. Pointed
...
out in email by Thomas Dickey.
2000-12-22 17:07:12 +00:00
jdc
606508da77
Rename variables refering to termcap capabilities from NN to __tc_nn. Case
...
adjusted to match termcap capability. A few other variable names renamed too
(ones related to or derived from termcap variables).
2000-12-19 21:34:24 +00:00
jdc
778f1338aa
Restore changes 1.23->1.24 that were accidently overwritten.
2000-06-12 21:04:08 +00:00
jdc
2d0dfab73b
Make sure tspace is large enough to hold all capabilities.
2000-06-12 20:48:34 +00:00
blymn
fb6ac2def9
Fix broken getcap call - it was always returning NULL. Thanks Itojun
...
for spotting this one!
2000-06-03 06:33:12 +00:00
mycroft
5e7069506f
We already initialize UP and BC when we fire up Curses, so pass a null pointer
...
to t_goto() to avoid doing it again... and again... and...
2000-05-19 01:05:43 +00:00
mycroft
6d4f51a947
Fix pasto.
2000-04-29 00:50:05 +00:00
mycroft
c7d40b65f9
Speed up refresh in the presence of attributes by precalculating a mask for
...
each `end' command to turn off other attributes in the case of conflicts.
2000-04-29 00:42:26 +00:00
jdc
bd499f9b1b
Background colour erase is 'ut' not 'be'.
2000-04-27 00:21:43 +00:00
blymn
bb083e0e5c
* Fixed need for duplicate namp string in setterm.c
...
* Added meta function (turns meta bit on and off on terminal if supported)
* Added curs_set to control cursor visibility if supported.
2000-04-22 13:29:01 +00:00