vt: re-align switches

This commit is contained in:
Daniel Eklöf 2019-12-20 20:43:31 +01:00
parent b2f091d243
commit a5f238b388
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

5
vt.c
View file

@ -1068,7 +1068,7 @@ static enum state
state_ground_switch(struct terminal *term, uint8_t data) state_ground_switch(struct terminal *term, uint8_t data)
{ {
switch (data) { switch (data) {
/* (no exit) current enter new state */ /* exit current enter new state */
case 0x00 ... 0x17: case 0x00 ... 0x17:
case 0x19: case 0x19:
case 0x1c ... 0x1f: action(term, ACTION_EXECUTE, data); return STATE_GROUND; case 0x1c ... 0x1f: action(term, ACTION_EXECUTE, data); return STATE_GROUND;
@ -1102,7 +1102,7 @@ static enum state
state_escape_switch(struct terminal *term, uint8_t data) state_escape_switch(struct terminal *term, uint8_t data)
{ {
switch (data) { switch (data) {
/* (no exit) current enter new state */ /* exit current enter new state */
case 0x00 ... 0x17: case 0x00 ... 0x17:
case 0x19: case 0x19:
case 0x1c ... 0x1f: action(term, ACTION_EXECUTE, data); return STATE_ESCAPE; case 0x1c ... 0x1f: action(term, ACTION_EXECUTE, data); return STATE_ESCAPE;
@ -1145,6 +1145,7 @@ state_escape_intermediate_switch(struct terminal *term, uint8_t data)
{ {
assert(false); assert(false);
switch (data) { switch (data) {
/* exit current enter new state */
case 0x00 ... 0x17: case 0x00 ... 0x17:
case 0x19: case 0x19:
case 0x1c ... 0x1f: action(term, ACTION_EXECUTE, data); return STATE_ESCAPE_INTERMEDIATE; case 0x1c ... 0x1f: action(term, ACTION_EXECUTE, data); return STATE_ESCAPE_INTERMEDIATE;