diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-07-07 14:32:18 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-07-07 14:32:18 +0000 |
| commit | d63629b370c4e38db527605863f0533666b6f629 (patch) | |
| tree | 6f8690bdcbb5994b15a0195b5f1ca346eb02cdba /osc.c | |
| parent | render: performance: don't stack allocate glyph sequence (diff) | |
performance improvements
* action() returns void - this gets rid of checks in vt_from_slave()
* split up ACTION_PRINT into ACTION_PRINT (ASCII) and ACTION_UTF8_PRINT
ACTION_PRINT is on the hot path, and we want it streamlined.
* Remove run-time checkout for unimplemented state transitions, as we
shouldn't have any of those left.
* Don't re-load current VT state on each iteration in vt_from_slave()
Diffstat (limited to 'osc.c')
| -rw-r--r-- | osc.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -7,7 +7,7 @@ #include "log.h" #include "render.h" -bool +void osc_dispatch(struct terminal *term) { int param = 0; @@ -24,7 +24,7 @@ osc_dispatch(struct terminal *term) if (!isdigit(c)) { LOG_ERR("OSC: invalid parameter: %.*s", (int)term->vt.osc.idx, term->vt.osc.data); - return false; + abort(); } param *= 10; @@ -47,8 +47,7 @@ osc_dispatch(struct terminal *term) default: LOG_ERR("unimplemented: OSC: %.*s", (int)term->vt.osc.idx, term->vt.osc.data); - return false; + abort(); + break; } - - return true; } |
