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
joerg
fc67b0cd11
Switch terminfo(3) to cdb(5).
2012-06-03 23:19:09 +00:00
roy
b7ddb5da20
Ensure that we request a buffer big enough, although with the current
...
terminfo specification this should never happen.
Correctly return NULL when realloc(3) fails.
2012-06-02 19:10:33 +00:00
joerg
68a65e1a02
Fix a number of memory leaks. Keep final loop of the cleanup in tic(1)
...
under #ifdef __VALGRIND__ though.
2012-06-01 12:08:40 +00:00
joerg
5fafac093e
Use memcmp in place of strncmp, since length is known to no longer than
...
either of the arguments.
2012-06-01 12:02:36 +00:00
dholland
6e357ed2e2
Add cdefs.h per PR 46492.
2012-05-29 00:27:59 +00:00
matt
fa835e8c8b
These directories default to WARNS?=5
2012-03-21 05:37:42 +00:00
christos
968af0c9f3
PR/46075: Asau: fix typo set_color_paid -> set_color_pair
2012-02-22 23:11:20 +00:00
joerg
93a30e6d6f
Kill a bunch of manual __attribute__ usages and replace them with the
...
equivalent sys/cdefs.h invocation.
2011-11-28 12:44:18 +00:00
christos
b9c2e08099
make use we don't touch memory past the end of the buffer. Pointed out
...
by tnozaki.
2011-11-13 15:24:04 +00:00
joerg
5b270365fe
Fix dependencies on generated files.
2011-11-03 07:19:39 +00:00
yamt
e2d8d702cb
use the tools version of utilities for other scripts, too
2011-11-02 20:39:41 +00:00
christos
76151da247
use the tools version.
2011-11-02 20:30:00 +00:00
christos
474f83c4ae
Separate the generators out, so that they can be re-used by tools, and
...
don't play games with curdir/objdir.
2011-11-02 17:48:53 +00:00
roy
9e5def586b
Now that nbperf can generate the same file using the -p option,
...
there is no longer a need to store these files in CVS.
2011-11-02 12:09:25 +00:00
roy
62480e1c72
There is no standard way of getting a list of aliases for the
...
terminal. However, some applications such as telnet want to know this.
ncurses dumps the terminfo header into an undefined variable ttytype
and these applications then parse it to work out the aliases.
We should do the same for now, until a standard mechanism for getting
the information is available or the need for it goes away.
2011-10-05 10:46:08 +00:00