diff --git a/src/syncterm/term.c b/src/syncterm/term.c index 0466b53be47206fa6efa4e3ad26db1c07cf74a83..0626f4afe6e8e9ca7ad8efc7911fa0abfe9eaab5 100644 --- a/src/syncterm/term.c +++ b/src/syncterm/term.c @@ -7,6 +7,14 @@ struct terminal term; const int tabs[11]={1,8,16,24,32,40,48,56,64,72,80}; +int backlines=200; + +void play_music(void) +{ + /* ToDo Music code parsing stuff */ + term.music=0; +} + void scrolldown(void) { char *buf; @@ -268,7 +276,7 @@ void do_ansi(void) break; case 'M': case 'N': - /* ToDo add music */ + term.music=1; break; case 'P': /* Delete char */ i=atoi(term.escbuf+1); @@ -483,6 +491,7 @@ void doterm(void) term.save_ypos=0; term.escbuf[0]=0; term.sequence=0; + term.music=0; ch[1]=0; /* Main input loop */ @@ -504,6 +513,11 @@ void doterm(void) do_ansi(); } } + else if (term.music) { + strcat(term.musicbuf,ch); + if(ch==14) + play_music(); + } else { switch(ch[0]) { case 0: diff --git a/src/syncterm/term.h b/src/syncterm/term.h index ac78fe9da6beb8428ef4f6b316b8a68dc16ba0e1..2c3e5bb17ba414e0d155ffa4ad007ec2bbe8e9be 100644 --- a/src/syncterm/term.h +++ b/src/syncterm/term.h @@ -14,6 +14,7 @@ struct terminal { int save_ypos; char escbuf[1024]; int sequence; + int music; }; extern struct terminal term;