[dev] [st] Support the DECSCUSR CSI escape sequence

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Tue Mar 17 23:11:31 CET 2015

- csiescseq.mode = *p;
+ csiescseq.mode[0] = *p;
+ p++;
+ if (strchr("q", *p))
+ csiescseq.mode[1] = *p;
 }

The strchr is not needed, you can do something like:

        csiescseq.mode[0] = *p++;
        csiescseq.mode[1] = *p;

if the string has only one character then csiescseq.mode[1] will have
only a '\0', but it is not a problem. And in this way the code is more
generic because it can deal with sequences like:

CSI num $ l (DECSCPP)

[I don't talk about add this sequence is only an example)

Regards,
Received on Tue Mar 17 2015 - 23:11:31 CET

This archive was generated by hypermail 2.3.0 : Wed Mar 18 2015 - 08:00:11 CET