mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-25 09:05:47 -04:00
term: enqueue data: cleanup
This commit is contained in:
parent
efbc3431ed
commit
91a839bf8e
1 changed files with 8 additions and 14 deletions
22
terminal.c
22
terminal.c
|
|
@ -54,21 +54,15 @@ static void
|
||||||
enqueue_data_for_slave(const void *data, size_t len, size_t offset,
|
enqueue_data_for_slave(const void *data, size_t len, size_t offset,
|
||||||
ptmx_buffer_list_t *buffer_list)
|
ptmx_buffer_list_t *buffer_list)
|
||||||
{
|
{
|
||||||
/*
|
void *copy = xmalloc(len);
|
||||||
* We're in asynchronous mode - push data to queue and let the FDM
|
memcpy(copy, data, len);
|
||||||
* handler take care of it
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
void *copy = xmalloc(len);
|
|
||||||
memcpy(copy, data, len);
|
|
||||||
|
|
||||||
struct ptmx_buffer queued = {
|
struct ptmx_buffer queued = {
|
||||||
.data = copy,
|
.data = copy,
|
||||||
.len = len,
|
.len = len,
|
||||||
.idx = offset,
|
.idx = offset,
|
||||||
};
|
};
|
||||||
tll_push_back(*buffer_list, queued);
|
tll_push_back(*buffer_list, queued);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue