From d1d3fd9b61431add77be80e904efaeb5fcb63e65 Mon Sep 17 00:00:00 2001 From: twobit Date: Wed, 8 Aug 2012 20:37:26 +0200 Subject: [PATCH] allow symbles --- synth/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synth/main.c b/synth/main.c index b373497..7ef00bb 100644 --- a/synth/main.c +++ b/synth/main.c @@ -64,7 +64,7 @@ static int parse_tune(const char* filename) { if(strcmp("[INSTRUMENTS]\n", line)) return line_nr; state = 2; } - else if(isalpha(line[0])) { + else if(!isspace(line[0])) { sscanf(line, "%s", wave_names[wave_counter]); } else if(line[0] == '\t') { @@ -105,7 +105,7 @@ static int parse_tune(const char* filename) { state = 4; } else { - if(!isalpha(line[0])) return line_nr; + if(isspace(line[0])) return line_nr; sscanf(line, "%s", pattern_names[pattern_counter]); for(int i = 0; i < pattern_length && fgets(line, 256, file); i++) { line_nr++; @@ -127,7 +127,7 @@ static int parse_tune(const char* filename) { } else if(m == 1) { - if(strcmp("-", note) == 0) + if(strcmp("---", note) == 0) patterns[pattern_counter][i][0] = 0xff; else if(strcmp(".", note) == 0) patterns[pattern_counter][i][0] = 0;