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()
This commit is contained in:
Daniel Eklöf 2019-07-07 16:32:18 +02:00
parent 050f7ea6ea
commit d63629b370
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 164 additions and 132 deletions

9
osc.c
View file

@ -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;
}