dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit 95e4ab913ec1b36816dd76ceb416c53169427b6a
parent 0b500e8c469059db49578f6f9ae686407ed231cf
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Thu, 23 Oct 2014 14:45:45 +0200

Remove custom escape handler mechanism

Diffstat:
vt.c | 20--------------------
vt.h | 21---------------------
2 files changed, 0 insertions(+), 41 deletions(-)

diff --git a/vt.c b/vt.c @@ -148,9 +148,6 @@ struct Vt { char title[256]; vt_event_handler_t event_handler; - - /* custom escape sequence handler */ - vt_escseq_handler_t escseq_handler; void *data; }; @@ -911,18 +908,6 @@ static void try_interpret_escape_seq(Vt *t) if (!*t->ebuf) return; - if (t->escseq_handler) { - switch ((*(t->escseq_handler)) (t, t->ebuf)) { - case VT_ESCSEQ_HANDLER_OK: - cancel_escape_sequence(t); - return; - case VT_ESCSEQ_HANDLER_NOTYET: - if (t->elen + 1 >= sizeof(t->ebuf)) - goto cancel; - return; - } - } - switch (*t->ebuf) { case '#': /* ignore DECDHL, DECSWL, DECDWL, DECHCP, DECFPP */ if (t->elen == 2) { @@ -1738,11 +1723,6 @@ void vt_shutdown(void) free(color2palette); } -void vt_set_escseq_handler(Vt *t, vt_escseq_handler_t handler) -{ - t->escseq_handler = handler; -} - void vt_set_event_handler(Vt *t, vt_event_handler_t handler) { t->event_handler = handler; diff --git a/vt.h b/vt.h @@ -31,27 +31,7 @@ #define mmask_t unsigned long #endif -enum { - /* means escape sequence was handled */ - VT_ESCSEQ_HANDLER_OK, - /* means the escape sequence was not recognized yet, but - * there is hope that it still will once more characters - * arrive (i.e. it is not yet complete). - * - * The library will thus continue collecting characters - * and calling the handler as each character arrives until - * either OK or NOWAY is returned. - */ - VT_ESCSEQ_HANDLER_NOTYET, - /* means the escape sequence was not recognized, and there - * is no chance that it will even if more characters are - * added to it. - */ - VT_ESCSEQ_HANDLER_NOWAY -}; - typedef struct Vt Vt; -typedef int (*vt_escseq_handler_t)(Vt *, char *es); enum { VT_EVENT_TITLE, @@ -62,7 +42,6 @@ typedef void (*vt_event_handler_t)(Vt *, int event, void *data); void vt_init(void); void vt_set_keytable(char const * const keytable_overlay[], int count); void vt_shutdown(void); -void vt_set_escseq_handler(Vt *, vt_escseq_handler_t); void vt_set_event_handler(Vt *, vt_event_handler_t); void vt_set_data(Vt *, void *); void *vt_get_data(Vt *);