dvtm

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

commit d0de571c5040139bc360a12a6903fccb2065c0b1
parent 1d5c9f30986a8fb46bc47b6c09f11e130702edfe
Author: Marc Andre Tanner <mat@brain-dump.org>
Date:   Thu, 21 Apr 2011 12:08:27 +0200

madtty: cleanups

Signed-off-by: Marc Andre Tanner <mat@brain-dump.org>

Diffstat:
madtty.c | 8++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/madtty.c b/madtty.c @@ -635,10 +635,8 @@ static void es_interpret_csi(madtty_t *t) const char *p = t->ebuf + 1; char verb = t->ebuf[t->elen - 1]; - p += (t->ebuf[1] == '?'); /* CSI private mode */ - /* parse numeric parameters */ - while (*p) { + for (p += (t->ebuf[1] == '?'); *p; p++) { if (IS_CONTROL(*p)) { madtty_process_nonprinting(t, *p); } else if (*p == ';') { @@ -651,8 +649,6 @@ static void es_interpret_csi(madtty_t *t) csiparam[param_count - 1] *= 10; csiparam[param_count - 1] += *p - '0'; } - - p++; } if (t->ebuf[1] == '?') { @@ -1437,7 +1433,7 @@ void madtty_keypress(madtty_t *t, int keycode) case KEY_RIGHT: case KEY_LEFT: { char keyseq[3] = { '\e', (t->curskeymode ? 'O' : '['), keytable[keycode][0] }; - term_write(t, keyseq, 3); + term_write(t, keyseq, sizeof keyseq); break; } default: