make libterm use the actuall ctty id

This commit is contained in:
Lisa Milne 2025-08-30 11:48:57 +10:00
parent 4e36e1749f
commit 5da5e60b44
2 changed files with 6 additions and 6 deletions

View file

@ -187,6 +187,9 @@ var bios = {
if (ind < 0)
return null;
return window.localStorage.getItem(fn).toString();
},
clear:function() {
window.localStorage.clear();
}
},
init:function() {

View file

@ -2,19 +2,16 @@ clite.libs.data = function() {
clite.libs.load('libterm','term',function(io,env) {
// TODO: get the controlling tty id
return Object.create({
ctty:clite.proc.getTTY(io.pid),
// clears the terminal
clear:function() {
var ctty = 0;
clite.tty.clear(ctty);
clite.tty.clear(this.ctty);
},
ttyctrl:function(fn,v) {
var ctty = 0;
return clite.tty.ttyctrl(ctty,fn,v);
return clite.tty.ttyctrl(this.ctty,fn,v);
}
});