]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.49
authorfred <fred>
Sun, 24 Mar 2002 19:38:13 +0000 (19:38 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:38:13 +0000 (19:38 +0000)
mi2mu/lily-stream.cc
mi2mu/main.cc
mi2mu/midi-event.cc
mi2mu/my-midi-lexer.cc
mi2mu/my-midi-parser.cc

index f1b61cab5bdc3b36fa2bc6cfc0857a51fee5dc4c..8552c422679ad7cebe531d508aa49e1cab401856 100644 (file)
@@ -25,7 +25,7 @@ Lily_stream::~Lily_stream()
 {
     delete os_p_;
     if ( indent_i_ )
-       warning( "lily indent level: " + String( indent_i_ ), 0 );
+       warning( "lily indent level: " + String( indent_i_ ));
 }
 
 Lily_stream&
@@ -131,7 +131,7 @@ Lily_stream::open()
 {
     os_p_ = new ofstream( filename_str_ );
     if ( !*os_p_ )
-       error ( "can't open `" + filename_str_ + "\'", 0 );
+       error ( "can't open `" + filename_str_ + "\'");
 }
 
 void
index b8795395afaef95173aed5cc12cc521da2170781..b3f057799145f9926b891a5353b1b613bea7d2fb 100644 (file)
@@ -11,9 +11,6 @@ Sources* source_l_g = &source;
 
 Verbose level_ver = NORMAL_ver;
 
-//ugh
-char const* defined_ch_C = 0;
-
 // ugh, another global
 String
 find_file( String str )
@@ -21,42 +18,6 @@ find_file( String str )
     return str;
 }
 
-// ugh, copied from warn.cc, cannot use
-void
-message( String message_str, char const* context_ch_C )
-{
-    String str = "mi2mu: ";
-    Source_file* sourcefile_l = source_l_g->sourcefile_l( context_ch_C );
-    if ( sourcefile_l ) {
-       str += sourcefile_l->file_line_no_str(context_ch_C) + String(": ");
-    }
-    str += message_str;
-    if ( sourcefile_l ) {
-       str += ":\n";
-       str += sourcefile_l->error_str( context_ch_C );
-    }
-//    if ( busy_parsing() )
-    cerr << endl; // until we have fine output manager...
-    cerr << str << endl;
-}
-
-void
-warning( String message_str, char const* context_ch_C )
-{
-    message( "warning: " + message_str, context_ch_C );
-}
-
-void
-error( String message_str, char const* context_ch_C )
-{
-    message( message_str, context_ch_C );
-    // since when exits error again?
-    // i-d say: error: errorlevel |= 1; -> no output upon error
-    //          warning: recovery -> output (possibly wrong)
-    if ( midi_lexer_l_g )
-        midi_lexer_l_g->errorlevel_i_ |= 1;
-}
-
 void
 usage()
 {
index c909e07c7b1bf9de10ad9dff3080bcbb973cc242..d0715208efeb69aec9e6fe120961464fa101ac15 100644 (file)
@@ -174,7 +174,7 @@ Midi_time::Midi_time( int num_i, int den_i, int clocks_4_i, int count_32_i )
 {
        sync_f_ = 1.0;
        if ( count_32_i != 8 )
-               warning( String( "#32 in quarter: " ) + String( count_32_i ), 0 );
+               warning( String( "#32 in quarter: " ) + String( count_32_i ));
        num_i_ = num_i;
        den_i_ = den_i;
        clocks_1_i_ = clocks_4_i * 4; 
index 8893005c76758d5878d00c0d00791959fb765737..7109ebfbe402086e61ab43ad2db61874de55d20b 100644 (file)
@@ -29,9 +29,12 @@ My_midi_lexer::~My_midi_lexer()
 void
 My_midi_lexer::error( char const* sz_l )
 {
-    if ( !source_file_l_ ) {
+    if (1|| !source_file_l_ ) {
        cerr << "error at EOF" << sz_l << '\n';
     } else {
+       
+       // FIXME
+       #if 0
        char const* ch_C = here_ch_C();
        if ( ch_C ) {
            ch_C--;
@@ -40,7 +43,8 @@ My_midi_lexer::error( char const* sz_l )
            ch_C++;
        }
        errorlevel_i_ |= 1;
-       ::error( sz_l, ch_C );
+       error( sz_l);
+       #endif
     }
 }
 
index 1530e36ac81d06fb1f7d52107ac2aef5c04c4b12..a8a2fb1e3b4c4cec9f36740724783b5c92173e8e 100644 (file)
@@ -142,7 +142,7 @@ My_midi_parser::set_division_4( int division_4_i )
        division_1_i_ = division_4_i * 4;
        Duration::division_1_i_s = division_1_i_;
        if ( division_4_i < 0 )
-               warning( "seconds iso metrical time" , 0 );
+               warning( "seconds iso metrical time" );
 }
 
 void