RE: ANSI C-code
From
codewar65@FREEWAY to
tenser on Mon Jul 29 23:20:48 2019
I process incoming data one byte at a time and run it through an ANSI parsing state machine. State 0 is default (not in an ESC sequence) and just processes the character (control are executed, characters are displayed, ESC sets the state to 1). State 1 means you recieved an ESC and now you look for a [ to get
into a CSI state where you are collecting parameter bytes, or other characters
to setup an other state (OSC, Simple ESC stuff). And so on.
If I hit a breaking character (bad parameter or intermediate or final character), I output the character, abort the sequence, and reset the state to 0.
--- ENiGMA 1/2 v0.0.10-alpha (linux; x64; 10.13.0)
* Origin: Xibalba -+- xibalba.l33t.codes:44510 (80:774/20)
■ Synchronet ■ Freeway BBS, Bendigo Australia. freeway.apana.org.au