mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:07:34 +00:00
Let each MasterPTY create its slave.
This commit is contained in:
parent
9c51d9dfcd
commit
310a5f4199
5 changed files with 18 additions and 30 deletions
|
@ -1,8 +1,9 @@
|
|||
#include "SlavePTY.h"
|
||||
#include "MasterPTY.h"
|
||||
|
||||
SlavePTY::SlavePTY(unsigned index)
|
||||
SlavePTY::SlavePTY(MasterPTY& master, unsigned index)
|
||||
: TTY(11, index)
|
||||
, m_master(master)
|
||||
, m_index(index)
|
||||
{
|
||||
set_size(80, 25);
|
||||
|
@ -27,10 +28,10 @@ void SlavePTY::on_master_write(const byte* buffer, size_t size)
|
|||
|
||||
void SlavePTY::on_tty_write(const byte* data, size_t size)
|
||||
{
|
||||
m_master->on_slave_write(data, size);
|
||||
m_master.on_slave_write(data, size);
|
||||
}
|
||||
|
||||
bool SlavePTY::can_write(Process& process) const
|
||||
{
|
||||
return m_master->can_write(process);
|
||||
return m_master.can_write(process);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue