mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
dcs: initial handling of DCS in general
Add data structure to term->vt. This structure tracks the free-form data that is passed-through, and the handler to call at the end. Intermediates and parameters are collected by the normal VT parser. Then, when we enter the passthrough state, we call dcs_hook(). This function checks the intermediate(s) and parameters, and selects the appropriate unhook handler (and optionally does some execution already). In passthrough mode, we simply append strings to an internal buffer. This might have to be changed in the future, if we need to support a DCS that needs to execute as we go. In unhook (i.e. when the DCS is terminated), we execute the unhook handler. As a proof-of-concept, handlers for BSU/ESU (Begin/End Synchronized Update) has been added (but are left unimplemented).
This commit is contained in:
parent
0b30316261
commit
5a6cbb8c3e
5 changed files with 106 additions and 0 deletions
8
dcs.h
Normal file
8
dcs.h
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "terminal.h"
|
||||
|
||||
void dcs_hook(struct terminal *term, uint8_t final);
|
||||
void dcs_put(struct terminal *term, uint8_t c);
|
||||
void dcs_unhook(struct terminal *term);
|
||||
Loading…
Add table
Add a link
Reference in a new issue