Commit Graph

131 Commits

Author SHA1 Message Date
uwe
b42d6bc7c1 Fix pasto. 2018-10-10 21:09:58 +00:00
roy
7b8fbc2d04 terminfo: if $TERMINFO.cdb doesn't exist, try $TERMINFO
This allows this command sequence to work:
tic -o /tmp/foo foo
TERMINFO=/tmp/foo TERM=foo infocmp
2018-10-08 20:44:34 +00:00
abhinav
69d19b9c6c Remove tputs from NAME section since it is described in terminfo(3) 2017-10-22 16:44:51 +00:00
abhinav
6c258b9750 Add missing functions to the NAME section 2017-10-22 16:42:34 +00:00
roy
2e0a9a1da6 Improve the scope of some variables. 2017-05-16 12:03:41 +00:00
roy
8e374e1b75 Remove ticcmp and extend _ti_checkname so it can be used instead. 2017-05-16 11:16:37 +00:00
roy
fc79bac804 Fix prior for multiple terminfo aliases. 2017-05-16 10:29:06 +00:00
roy
2b9f5c3f2c Instead of poking in the binary blob to work out if this is our terminal,
assume it is and load it.
Once loaded then check it's really for us.
This allows us to work out if the indexed alias entry is correct we
this was not checked previously.
2017-05-16 10:25:40 +00:00
roy
2678fcfdf5 Don't bother allocating space for the database name, just print
directly to the static buffer storage.
2017-05-16 09:19:48 +00:00
roy
3edb4adc61 Move pathbuf into the function where it's actually used. 2017-05-16 08:52:14 +00:00
roy
34c6060f1f Clean up some more warnings. 2017-05-04 09:46:30 +00:00
roy
04f58b4824 Clean up some compile warnings. 2017-05-04 09:42:23 +00:00
roy
db8a6fb0b3 Fix some compile warnings. 2017-05-01 19:09:22 +00:00
roy
ac826cc7fc Whitespace police. 2017-05-01 18:39:02 +00:00
roy
5b2b9b53e2 Whitespace, fit in 80 and extra braces for readability.
No functional change.
2017-04-20 08:34:23 +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
roy
d5c74a0225 Allow terminfo users to update flag and numeric capabilities as they do
strings.
2017-03-23 00:39:06 +00:00
roy
c8a6d4546d Revert botched commit. 2017-03-23 00:36:37 +00:00
roy
8bf4334f27 term.h 2017-03-23 00:23:29 +00:00
roy
a3b8817f64 Revert prior .... some ncurses application expect to be able to update
the terminal capabilities.
2017-03-23 00:17:57 +00:00
roy
0f7015d835 Ensure there is a terminal to return capabilities from. 2017-03-20 14:46:28 +00:00
roy
0a316e40f7 Warn about unprintable characters in capability strings. 2017-02-11 15:13:17 +00:00
roy
0fb82a6eaf Following a newline, strip leading whitespace from capability strings. 2017-02-11 14:57:15 +00:00
abhinav
c8b491e821 Fix a typo. 2017-01-29 16:52:38 +00:00
roy
ca57f21848 Correct terminfo variable pkey_norm to plab_norm. 2017-01-12 13:53:11 +00:00
roy
53035e70de Fix some off by one issues with arraycount ..thanks coypu. 2017-01-11 20:53:52 +00:00
christos
ee97ae6abf off-by-one in memcpy. Found by ASAN (Carsten Kunze)
XXX: pullup 7.
2016-11-24 17:09:55 +00:00
christos
8b22ec00d4 - if we are freeing cur_term, set it to NULL.
- preserve and free "last" properly.

$ cat foo.c
#include <stdio.h>
#include <termcap.h>

int
main(void)
{
	tgetent(NULL, "dumb");
	tgetent(NULL, "network");
	tgetflag("so");
	return 0;
}
$ cc foo.c -lterminfo
$ MALLOC_OPTIONS=J ./a.out
Boom.

XXX: pullup-7
2016-04-01 19:59:08 +00:00
christos
f5cb16e708 Always copy the area buffer, even when the length was the same
(from Rin Okuyama)
2015-11-26 01:03:22 +00:00
christos
f464a786c5 From PR/50092:
- handle calling _ti_readterm with an existing initialized terminal
- simplify free code
Also:
- fix an inconsistency in userdefs count computation
2015-11-25 19:13:49 +00:00
christos
30fc0caf54 We have the max length; use snprintf. 2015-11-25 18:46:59 +00:00
christos
db71acfd71 PR/50092: Rin Okuyama: Fix memory leak. 2015-11-25 18:46:24 +00:00
christos
7ddef8633d PR/50092: Fix memory leak. 2015-11-25 18:38:21 +00:00
christos
e804370940 fix ti_puts prototype 2015-11-23 22:35:28 +00:00
riastradh
6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
joerg
2786173415 Use an empty string, not a null pointer for nullname. 2013-11-18 20:51:03 +00:00
wiz
a5684d07dd Use Mt for email addresses. 2013-07-20 21:39:55 +00:00
roy
1535311f47 Whitespace 2013-06-07 13:16:18 +00:00
njoly
40b41484a6 Fix c&p error in string descriptions. 2013-03-15 14:27:41 +00:00
roy
40e555b80b Provide a disabled implentation of tlparm and ti_tlparm for completeness.
This also improves the readability of _ti_tiparm.
2013-01-25 17:28:50 +00:00
roy
943df88df1 Add descriptions for terminfo keys to term.h
These are extracted by genman and placed into the compiled terminfo.5
Fixes PR lib/47090
2013-01-25 12:52:45 +00:00
roy
57755c0fa8 For platforms where we cannot fit a char * into a long, return NULL
and set errno to ENOTSUPP.
2013-01-25 12:30:05 +00:00
roy
b05cdd2b82 Fix building our terminals with a non standard NETBSDSRCDIR, PR lib/46793.
Thanks to Bernd Ernesti.
2013-01-24 14:17:40 +00:00
roy
a17592c001 Move the strings vs long analysis to a private function, but allow
tput(1) to use it so we can work with string parameters to capabilities.
2013-01-24 10:41:28 +00:00
roy
77e0da2e1e As tparm accepts longs we should treat them as long during expansion.
Also, fix the ~ and ! logic.
2013-01-24 10:28:28 +00:00
roy
cf892bbeee Fix %t logic and don't output any %; or %e parts.
Fixes PR lib/47490 thanks to Julien Oster
2013-01-23 13:06:18 +00:00
msaitoh
f1f8803538 Fix off by one error. 2012-11-30 10:14:18 +00:00
joerg
11b4a6201b Add tic dependency only for the USETOOLS case. 2012-08-20 15:44:02 +00:00
joerg
2f2f99b48a Relax consistency to make it possible to match valid entries. 2012-06-06 13:36:58 +00:00
wiz
1728003ef9 Bump date for previous. 2012-06-05 17:22:01 +00:00