From 6e61d0b2736fb22d3d573244d6cab49a3db817d8 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Fri, 31 Jan 2014 14:32:51 +1000 Subject: Move CSI variable declarations to where they are used. --- handlekeys.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/handlekeys.c b/handlekeys.c index 205f94a..4ce14f5 100644 --- a/handlekeys.c +++ b/handlekeys.c @@ -331,22 +331,24 @@ void handle_keys(long extra, int (*handle_sequence)(long extra, char *sequence), TODO So abort the current CSI and start from scratch. */ - char *t, csFinal[8]; - int csIndex = 1, csParams[8]; - - csFinal[0] = 0; - p = 0; - // Unspecified params default to a value that is command dependant. - // However, they will never be negative, so we can use -1 to flag a default value. - for (j = 0; j < (sizeof(csParams) / sizeof(*csParams)); j++) - csParams[j] = -1; - if ('M' == buffer[1]) { // TODO - We have a mouse report, which is CSI M ..., where the rest is binary encoded, more or less. Not fitting into the CSI format. } else { + char *t, csFinal[8]; + int csIndex = 1, csParams[8]; + + csFinal[0] = 0; + p = 0; + + // Unspecified params default to a value that is command dependant. + // However, they will never be negative, so we can use -1 to flag + // a default value. + for (j = 0; j < (sizeof(csParams) / sizeof(*csParams)); j++) + csParams[j] = -1; + // Check for the private bit. if (index("<=>?", buffer[1])) { -- cgit v1.1