git.y1.nz

mtm

Ncurses-based terminal multiplexer
download: https://git.y1.nz/archives/mtm.tar.gz
Files | Log | Refs

commit 930d9470a2aa85d5f7954efc218375cde9b78e1b
parent 2d93452a7beae6c28101d92fed74a5804c385a57
Author: Rob King <jking@deadpixi.com>
Date:   Fri, 28 Apr 2017 00:02:06 -0500

Added the vtparser_reset function.

Diffstat:
Mvtparser.c17++++++++++++++---
Mvtparser.h3+++
2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/vtparser.c b/vtparser.c @@ -116,13 +116,24 @@ vtparser_open(void *p) if (!v) return NULL; - reset(v); - v->p = p; - v->s = &ground; + vtparser_reset(v, p); return v; } void +vtparser_reset(VTPARSER *vp, void *p) +{ + reset(vp); + vp->s = &ground; + vp->p = p; + + vp->print = NULL; + memset(vp->cons, 0, sizeof(vp->cons)); + memset(vp->escs, 0, sizeof(vp->escs)); + memset(vp->csis, 0, sizeof(vp->csis)); +} + +void vtparser_close(VTPARSER *vp) { free(vp); diff --git a/vtparser.h b/vtparser.h @@ -57,6 +57,9 @@ VTPARSER * vtparser_open(void *p); void +vtparser_reset(VTPARSER *vp, void *p); + +void vtparser_close(VTPARSER *vp); VTCALLBACK

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.