add references to termcap data for all term names.

This commit is contained in:
Christopher Jeffrey 2013-02-23 15:58:59 -06:00
parent 26440e76e1
commit fe0e82f046
1 changed files with 8 additions and 2 deletions

View File

@ -791,7 +791,8 @@ Tput.prototype.parseTermcap = function(data) {
, field
, names
, i
, j;
, j
, k;
// remove escaped newlines
data = data.replace(/\\\n[ \t]*/g, '');
@ -810,14 +811,19 @@ Tput.prototype.parseTermcap = function(data) {
if (j === 0) {
names = field.split('|');
term = terms[names[0]] = {
term = {
name: names[0],
names: names,
desc: names.pop()
};
k = names.length;
while (k--) terms[names[k]] = term;
term.bools = {};
term.numbers = {};
term.strings = {};
continue;
}