]> git.donarmstrong.com Git - lilypond.git/blobdiff - mi2mu/main.cc
release: 0.0.64
[lilypond.git] / mi2mu / main.cc
index 06589c789152107a0cb72d93731ca767fcab8b40..5009b8dd7b220758a3484d3f0256c47249abd4fa 100644 (file)
@@ -76,21 +76,20 @@ int
 main( int argc_i, char* argv_sz_a[] )
 {
        Long_option_init long_option_init_a[] = {
-               0, "be-blonde", 'b',
-               0, "debug", 'd',
-               0, "help", 'h',
-               0, "no-silly", 'n',
-               1, "output", 'o',
-               0, "no-plets", 'p',
-               0, "quiet", 'q',
-               1, "smallest", 's',
-               0, "verbose", 'v',
-               0, "warranty", 'w',
-               0, "no-double-dots", 'x',
-               0,0,0
+               {0, "be-blonde", 'b'},
+               {0, "debug", 'd'},
+               {0, "help", 'h'},
+               {0, "no-silly", 'n'},
+               {1, "output", 'o'},
+               {0, "no-plets", 'p'},
+               {0, "quiet", 'q'},
+               {1, "smallest", 's'},
+               {0, "verbose", 'v'},
+               {0, "warranty", 'w'},
+               {0, "no-double-dots", 'x'},
+               {0,0,0}
        };
        Getopt_long getopt_long( argc_i, argv_sz_a, long_option_init_a );
-       identify();
 
        String output_str;
        while ( Long_option_init* long_option_init_p = getopt_long() )
@@ -102,6 +101,7 @@ main( int argc_i, char* argv_sz_a[] )
                        level_ver = DEBUG_ver;
                        break;
                case 'h':
+                       identify();
                        usage();
                        exit( 0 );
                        break;
@@ -125,6 +125,7 @@ main( int argc_i, char* argv_sz_a[] )
                case 's': {
                                int i = String_convert::dec2_i( getopt_long.optarg );
                                if ( !i ) {
+                                       identify();
                                        usage();
                                        exit( 2 ); //usage
                                }
@@ -135,6 +136,7 @@ main( int argc_i, char* argv_sz_a[] )
                        level_ver = VERBOSE_ver;
                        break;
                case 'w':
+                       identify();
                        notice();
                        exit( 0 );
                        break;
@@ -146,6 +148,9 @@ main( int argc_i, char* argv_sz_a[] )
                        break;
                }
   
+       // flag -q must be checked first
+       identify();
+
        char* arg_sz = 0;
        while ( ( arg_sz = getopt_long.get_next_arg() ) ) {
                My_midi_parser midi_parser( arg_sz, & source );