From 3628aff2ab8f9b5a535f1ef76dbac566f1204429 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 11 Mar 1997 20:51:19 +0000 Subject: [PATCH] lilypond-0.0.41 --- mi2mu/lily-stream.cc | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/mi2mu/lily-stream.cc b/mi2mu/lily-stream.cc index 244e36f43b..da6890aa97 100644 --- a/mi2mu/lily-stream.cc +++ b/mi2mu/lily-stream.cc @@ -41,32 +41,33 @@ Lily_stream::operator <<( String str ) str = str.nomid_str( nl_i, 1 ); } - if ( ( i != str.length_i() - 1 ) && ( nl_i == -1 ) ) + if ( ( i != str.length_i() - 1 ) && ( nl_i == -1 ) ) { while ( i && ( isalnum( str[ i ] ) || ( nobreak_str.index_i( str[ i ] ) != -1 ) ) ) i--; - if ( !i ) { // no room left - if ( column_i_ > 8 * indent_i_ ) { - newline(); - if ( comment_mode_bo_ && ( str[ 0 ] != '%' ) ) - str = '%' + str; - continue; - } - else { // cannot break neatly... - i = max_i; + if ( !i ) { // no room left + if ( column_i_ > 8 * indent_i_ ) { + newline(); + if ( comment_mode_bo_ && ( str[ 0 ] != '%' ) ) + str = '%' + str; + continue; + } + else { // cannot break neatly... + i = max_i; + } } } - + String line = str.left_str( i + 1 ); str = str.mid_str( i + 1, INT_MAX ); *os_p_ << line; + column_i_ += line.length_i(); if ( nl_i != -1 ) newline(); else check_comment( line ); - column_i_ += line.length_i(); - if ( str.length_i() || ( column_i_ >= wrap_column_i_ ) ) { + if ( ( str.length_i() && ( nl_i == -1 ) ) || ( column_i_ >= wrap_column_i_ ) ) { //brr. if ( comment_mode_bo_ ) str = "%" + str; -- 2.39.5