Commit Graph

29 Commits

Author SHA1 Message Date
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
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
04f58b4824 Clean up some compile warnings. 2017-05-04 09:42:23 +00:00
roy
5b2b9b53e2 Whitespace, fit in 80 and extra braces for readability.
No functional change.
2017-04-20 08:34:23 +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
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
roy
1535311f47 Whitespace 2013-06-07 13:16:18 +00:00
joerg
2f2f99b48a Relax consistency to make it possible to match valid entries. 2012-06-06 13:36:58 +00:00
joerg
fc67b0cd11 Switch terminfo(3) to cdb(5). 2012-06-03 23:19:09 +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
roy
91ab69b0df Remove _ti_freeterm as consumers should just use del_curterm. 2011-10-03 19:18:55 +00:00
roy
ed684e08ea Clean up some compile warnings 2011-04-11 21:37:19 +00:00
roy
007ba6f7e2 Implement captoinfo so that we can convert $TERMCAP into $TERMINFO.
We don't currently map %> %B %D.
That means no conversion for regent100, hz1500, act4, act5, mime terms.
2010-02-26 00:09:00 +00:00
roy
fde317d2b1 libterminfo can now compile a single terminfo description which allows
$TERMINFO to be a terminfo description as well as a file reference.

This enables the user to modify the terminfo description on read-only
media.
2010-02-22 23:05:39 +00:00
roy
420f923a19 Store the generated compiled terminfo descriptions so that we can build
a consistent library just from source.
2010-02-12 12:18:33 +00:00
roy
b32b792e3b Respect TERMINFO_DIRS and document using an embedded database. 2010-02-11 14:36:09 +00:00
roy
a2e27dcd47 Use structures so we know how long each description is. 2010-02-11 13:11:47 +00:00
roy
0c02e7a2e0 Allow a NULL description. 2010-02-11 09:42:03 +00:00
roy
90cead5eeb Embed ansi, dumb, vt100, vt220 and wsvt25 compiled terminal descriptions
into libterminfo.
Constify some foo.
2010-02-11 00:27:09 +00:00
roy
298c3fd52c Don't look in /etc for a terminfo database.
Don't report the rescue database if we did not find the terminal in
there AND we were able to access prior databases.
2010-02-05 19:21:02 +00:00
roy
ae351fab5b Store the aliases against the entry, so that infocmp can reproduce them.
Handy for creating smaller terminfo databases.
2010-02-05 12:31:56 +00:00
roy
e0d0a8eecc Allow loading of a terminfo database in /rescue. 2010-02-05 09:42:21 +00:00
roy
4ca00e00d8 Import my terminfo implementation.
This uses the ncurses terminal definitions.

OK: core@, jdc@
2010-02-03 15:16:32 +00:00