diff --git a/dcs.c b/dcs.c deleted file mode 100644 index c591974a..00000000 --- a/dcs.c +++ /dev/null @@ -1,32 +0,0 @@ -#include "dcs.h" - -#define LOG_MODULE "dcs" -#define LOG_ENABLE_DBG 0 -#include "log.h" - -void -dcs_passthrough(struct terminal *term) -{ - LOG_DBG("DCS passthrough: %.*s (%zu bytes)", - (int)term->vt.dcs.idx, term->vt.dcs.data, term->vt.dcs.idx); -} - -bool -dcs_ensure_size(struct terminal *term, size_t required_size) -{ - if (required_size <= term->vt.dcs.size) - return true; - - size_t new_size = (required_size + 127) / 128 * 128; - assert(new_size > 0); - - uint8_t *new_data = realloc(term->vt.dcs.data, new_size); - if (new_data == NULL) { - LOG_ERRNO("failed to increase size of DCS buffer"); - return false; - } - - term->vt.dcs.data = new_data; - term->vt.dcs.size = new_size; - return true; -} diff --git a/dcs.h b/dcs.h deleted file mode 100644 index 38108444..00000000 --- a/dcs.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#include -#include "terminal.h" - -void dcs_passthrough(struct terminal *term); -bool dcs_ensure_size(struct terminal *term, size_t required_size); diff --git a/main.c b/main.c index 2ec17618..54140fd0 100644 --- a/main.c +++ b/main.c @@ -842,7 +842,6 @@ out: xkb_context_unref(term.kbd.xkb); free(term.vt.osc.data); - free(term.vt.dcs.data); for (int row = 0; row < term.normal.num_rows; row++) grid_row_free(term.normal.rows[row]); free(term.normal.rows); diff --git a/meson.build b/meson.build index 9b1aa679..5d1bd058 100644 --- a/meson.build +++ b/meson.build @@ -63,7 +63,6 @@ executable( 'config.c', 'config.h', 'commands.c', 'commands.h', 'csi.c', 'csi.h', - 'dcs.c', 'dcs.h', 'font.c', 'font.h', 'grid.c', 'grid.h', 'input.c', 'input.h', diff --git a/terminal.h b/terminal.h index a6cf65cd..a32f7890 100644 --- a/terminal.h +++ b/terminal.h @@ -129,11 +129,6 @@ struct vt { size_t size; size_t idx; } osc; - struct { - uint8_t *data; - size_t size; - size_t idx; - } dcs; struct { uint8_t data[4]; size_t idx; diff --git a/vt.c b/vt.c index 6511ceba..1c71e4bc 100644 --- a/vt.c +++ b/vt.c @@ -9,7 +9,6 @@ #define LOG_ENABLE_DBG 0 #include "log.h" #include "csi.h" -#include "dcs.h" #include "grid.h" #include "osc.h" @@ -931,20 +930,9 @@ action(struct terminal *term, enum action _action, uint8_t c) break; case ACTION_HOOK: - term->vt.dcs.idx = 0; - break; - case ACTION_PUT: - if (!dcs_ensure_size(term, term->vt.dcs.idx + 1)) - break; - term->vt.dcs.data[term->vt.dcs.idx++] = c; - break; - case ACTION_UNHOOK: - if (!dcs_ensure_size(term, term->vt.dcs.idx + 1)) - break; - term->vt.dcs.data[term->vt.dcs.idx] = '\0'; - dcs_passthrough(term); + /* We have no parent terminal to pass through to */ break; case ACTION_UTF8_2_ENTRY: