From 9affa2c88a6718d79ddbb34178e6c865db12fa84 Mon Sep 17 00:00:00 2001 From: fred Date: Sat, 5 Oct 1996 16:17:19 +0000 Subject: [PATCH] lilypond-0.0.1 --- main.cc | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 main.cc diff --git a/main.cc b/main.cc new file mode 100644 index 0000000000..3758840ac6 --- /dev/null +++ b/main.cc @@ -0,0 +1,54 @@ +#include +#include "lgetopt.hh" +#include "misc.hh" +#include "debug.hh" +#include "score.hh" +#include "globvars.hh" + +extern void parse_file(String s); +Score *the_score =0; + +long_option_init theopts[] = { + 1, "debug", 'd', + 1, "output", 'o', + 0,0,0 +}; + + +String outfn="lelie.uit"; + +void +set_output(String s) +{ + outfn = s; +} + +int +main (int argc, char **argv) +{ + Getopt_long oparser(argc, argv,theopts); + + cout << get_version() + << "copyright 1996 Han-Wen Nienhuys\n"; + + while (long_option_init * opt = oparser()) { + switch ( opt->shortname){ + case 'd': + set_debug(oparser.optarg); + break; + case 'o': + set_output(oparser.optarg); + break; + default: + assert(false); + break; + } + } + char *arg = oparser.get_next_arg(); + + if (!arg) arg = ""; + parse_file(arg); + + the_score->process(); + the_score->output(outfn); +} -- 2.39.5