This commit is contained in:
Christopher Jeffrey 2013-03-04 20:03:00 -06:00
parent c7f68baec6
commit 176df61343
1 changed files with 14 additions and 14 deletions

View File

@ -1030,7 +1030,7 @@ Tput.prototype.readTermcap = function(data) {
|| Tput.termcap;
var terms = this.parseTermcap(data)
, term = terms[this.term];
, root = terms[this.term];
if (this.debug) {
this._termcap = terms;
@ -1038,32 +1038,32 @@ Tput.prototype.readTermcap = function(data) {
(function tc(term) {
if (term && term.strings.tc) {
root.inherits = root.inherits || [];
root.inherits.push(term.strings.tc);
if (self.debug && terms[term.strings.tc]) {
console.log(term.names.join('/')
+ ' inherits from '
+ terms[term.strings.tc].names.join('/'));
console.log(term.names.join('/') + ' inherits from '
+ terms[term.strings.tc].names.join('/'));
}
var t = terms[self.term];
t.inherits = t.inherits || [];
t.inherits.push(term.strings.tc);
if (self.debug) {
var names = terms[term.strings.tc]
? terms[term.strings.tc].names
: [term.strings.tc];
console.log(term.names.join('/') + ' inherits from ' + names.join('/'));
}
var inherit = tc(terms[term.strings.tc]);
if (inherit) {
if (0 && self.debug) {
console.log(term.names.join('/')
+ ' inherits from '
+ inherit.names.join('/'));
}
['bools', 'numbers', 'strings'].forEach(function(type) {
merge(term[type], inherit[type]);
});
}
}
return term;
})(term);
})(root);
return term;
return root;
};
/**