Reorganize forward_to_tty, tty_write, tty_raw_write functions

Add tty_raw_write function and reorganize roles of them.

tty_raw_write:
Performs any processing that must be done character-by-character on the
fly. That is, output delays and ONULBRK processing.

tty_write :
Converts input data using output mapping and passes it to tty_raw_write.

forward_to_tty :
Converts input data according to the input/output mode and passes it to
tty_write. (output-mapping function move to tty_write. tx_total
statistics counting move to tty_raw_write and tty_sync.)
This commit is contained in:
yabu76 2026-01-02 00:35:52 +09:00
parent 6425ffe66a
commit 3b7fe3d258
2 changed files with 112 additions and 74 deletions

View file

@ -86,5 +86,5 @@ void tty_line_set(int fd, tty_line_config_t line_config[]);
void tty_search(void);
GList *tty_search_for_serial_devices(void);
void forward_to_tty(int fd, char output_char);
ssize_t tty_write(int fd, void *buffer, size_t count);
ssize_t tty_write(int fd, const void *buffer, size_t count);
void tty_sync(int fd);