mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-01 07:15:32 -04:00
Rename: vt_to_slave() -> term_to_slave()
This commit is contained in:
parent
79c3121aa3
commit
9f1525aef7
8 changed files with 46 additions and 46 deletions
20
vt.c
20
vt.c
|
|
@ -1015,23 +1015,3 @@ vt_from_slave(struct terminal *term, const uint8_t *data, size_t len)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
vt_to_slave(struct terminal *term, const void *_data, size_t len)
|
||||
{
|
||||
const uint8_t *data = _data;
|
||||
size_t left = len;
|
||||
|
||||
while (left > 0) {
|
||||
ssize_t ret = write(term->ptmx, data, left);
|
||||
if (ret < 0) {
|
||||
LOG_ERRNO("failed to write to client");
|
||||
return false;
|
||||
}
|
||||
|
||||
data += ret;
|
||||
left -= ret;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue