]> git.donarmstrong.com Git - lilypond.git/blobdiff - main.cc
release: 0.0.3
[lilypond.git] / main.cc
diff --git a/main.cc b/main.cc
index 3758840ac6abd726bbbce72abf233f730a2f62e4..21453315654c0119aa24e9faa1d6e94dd2831fe4 100644 (file)
--- a/main.cc
+++ b/main.cc
@@ -1,26 +1,41 @@
 #include <iostream.h>
+#include <assert.h>
 #include "lgetopt.hh"
 #include "misc.hh"
-#include "debug.hh"
-#include "score.hh"
-#include "globvars.hh"
+#include "string.hh"
+#include "main.hh"
 
 extern void parse_file(String s);
-Score *the_score =0;
 
 long_option_init theopts[] = {
-    1, "debug", 'd',
     1, "output", 'o',
+    0, "warranty", 'w',
     0,0,0
 };
 
 
-String outfn="lelie.uit";
-
-void
-set_output(String s)
+void notice()
 {
-    outfn = s;
+    cout <<
+       "LilyPond, a music typesetter.
+Copyright (C) 1996 by
+  Han-Wen Nienhuys <hanwen@stack.urc.tue.nl>
+
+
+    This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License version 2
+as published by the Free Software Foundation.
+
+    This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+    You should have received a copy (refer to the file COPYING) of the
+GNU General Public License along with this program; if not, write to
+the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
+USA.
+"
 }
 
 int
@@ -28,16 +43,16 @@ main (int argc, char **argv)
 {
     Getopt_long oparser(argc, argv,theopts);
 
-    cout << get_version() 
-       << "copyright 1996 Han-Wen Nienhuys\n";
+    cout << get_version();
     
     while (long_option_init * opt = oparser()) {
        switch ( opt->shortname){
-       case 'd':
-           set_debug(oparser.optarg);
-           break;
        case 'o':
-           set_output(oparser.optarg);
+           set_default_output(oparser.optarg);
+           break;
+       case 'w':
+           notice();
+           exit(0);
            break;
        default:
            assert(false);
@@ -49,6 +64,6 @@ main (int argc, char **argv)
     if (!arg) arg = "";
     parse_file(arg);
 
-    the_score->process();
-    the_score->output(outfn);    
+    do_scores();
+    exit (0);
 }