From 1392851782c83d9dfb84d6b851fbfd518ede9052 Mon Sep 17 00:00:00 2001 From: Angel Ortega Date: Mon, 19 May 2008 08:18:28 +0200 Subject: [PATCH] If an .sf2 is given as the main() argument, a mini program to list its instrument is built. --- main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/main.c b/main.c index 3975267..7729496 100644 --- a/main.c +++ b/main.c @@ -118,6 +118,17 @@ static int main_midi(char *script) static int main_ss(char *script) { + char *ptr; + + /* is it an .sf2? create an ad-hoc mini program to list it */ + if ((ptr = strchr(script, '.')) != NULL && strcmp(ptr, ".sf2") == 0) { + char tmp[4096]; + + snprintf(tmp, sizeof(tmp), "{ sf2 \"%s\" }", script); + if (compile_ahs_string(tmp)) + return 4; + } + else if (compile_ahs(script)) return 3; -- 2.11.4.GIT