[PATCH vncterm v2 1/3] Remove unused state from OSC parser
Johannes Altmanninger
aclopte at gmail.com
Thu Sep 25 08:15:40 CEST 2025
Signed-off-by: Johannes Altmanninger <aclopte at gmail.com>
---
vncterm.c | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/vncterm.c b/vncterm.c
index 8b9e6ce..71baa65 100644
--- a/vncterm.c
+++ b/vncterm.c
@@ -1195,8 +1195,7 @@ enum {
ESnonstd,
ESpalette,
ESidquery,
- ESosc1,
- ESosc2
+ ESosc,
};
static void vncterm_putchar(vncTerm *vt, unicode ch) {
@@ -1276,7 +1275,7 @@ static void vncterm_putchar(vncTerm *vt, unicode ch) {
case '1':
case '2':
case '4':
- vt->tty_state = ESosc1;
+ vt->tty_state = ESosc;
break;
default:
#ifdef DEBUG
@@ -1286,18 +1285,11 @@ static void vncterm_putchar(vncTerm *vt, unicode ch) {
break;
}
break;
- case ESosc1:
- vt->tty_state = ESnormal;
- if (ch == ';') {
- vt->tty_state = ESosc2;
- } else {
+ case ESosc:
+ if (ch == 0x9c || ch == 7) {
#ifdef DEBUG
- fprintf(stderr, "got illegal OSC sequence\n");
+ fprintf(stderr, "OSC sequence\n");
#endif
- }
- break;
- case ESosc2:
- if (ch == 0x9c || ch == 7) {
vt->tty_state = ESnormal;
}
break;
--
2.51.0.167.g6ad8021821.dirty
More information about the pve-devel
mailing list