From: fred Date: Sun, 24 Mar 2002 20:04:54 +0000 (+0000) Subject: lilypond-0.1.41 X-Git-Tag: release/1.5.59~3484 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d55114cb7991a11654440a519be6c9b4ba150395;p=lilypond.git lilypond-0.1.41 --- diff --git a/VERSION b/VERSION index 1cb7a136d9..11280fe443 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ TOPLEVEL_MAJOR_VERSION = 0 TOPLEVEL_MINOR_VERSION = 1 -TOPLEVEL_PATCH_LEVEL = 39 +TOPLEVEL_PATCH_LEVEL = 41 TOPLEVEL_MY_PATCH_LEVEL = # use the above to send patches, always empty for released version: diff --git a/flower/NEWS b/flower/NEWS index f7db23a49c..0629855834 100644 --- a/flower/NEWS +++ b/flower/NEWS @@ -1,3 +1,13 @@ +pl 34.jcn2 + - memmem optimise + +pl 35 + - bf: libc-extension: memmem + +pl 34 + - string.icc + - String_convert::precision_str: double to string with fixed precision + pl 33 - String naming - unix style paths diff --git a/flower/include/cursor.tcc b/flower/include/cursor.tcc index 84c60d836a..ea204e1dc6 100644 --- a/flower/include/cursor.tcc +++ b/flower/include/cursor.tcc @@ -79,7 +79,7 @@ template int Cursor::operator-(Cursor rhs) const { - assert (rhs.list == list); + assert (&rhs.list_ == &list_); int dif = 0; // search from *this on further up (positive difference) diff --git a/flower/libc-extension.cc b/flower/libc-extension.cc index b380b1fd2d..d8a9fcd6e4 100644 --- a/flower/libc-extension.cc +++ b/flower/libc-extension.cc @@ -15,69 +15,73 @@ char* strnlwr (char* start_l ,int n) { - char * p = start_l + n; - while (--p >= start_l) + char * p = start_l + n; + while (--p >= start_l) { - *p = tolower (*p); /* a macro on some compilers */ + *p = tolower (*p); /* a macro on some compilers */ } - return start_l; + return start_l; } char* strnupr (char* start_l, int n) { - char * p = start_l + n; - while (--p >= start_l) + char * p = start_l + n; + while (--p >= start_l) { - *p = toupper (*p); /* a macro on some compilers */ + *p = toupper (*p); /* a macro on some compilers */ } - return start_l; + return start_l; } #if !HAVE_MEMMEM /** locate a substring. #memmem# finds the first occurrence of - #needle# in #haystack# - */ + #needle# in #haystack#. This is not ANSI-C. -char * -memmem (Byte const * haystack, int haystack_len, - Byte const *needle,int needle_len) + The prototype is not in accordance with the Linux Programmer's + Manual v1.15, but it is with /usr/include/string.h */ + +Byte * +memmem (Byte const *needle,int needle_len, + Byte const *haystack, int haystack_len) { - Byte const * end_haystack = haystack + haystack_len - needle_len; - Byte const * end_needle = needle + needle_len ; + Byte const * end_haystack = haystack + haystack_len - needle_len + 1; + Byte const * end_needle = needle + needle_len ; - /* Ahhh ... Some minimal lowlevel stuff. This *is* nice; Varation - is the spice of life */ - while (haystack < end_haystack) + /* Ahhh ... Some minimal lowlevel stuff. This *is* nice; Varation + is the spice of life */ + while (haystack < end_haystack) { - Byte const *subneedle_l = needle; - Byte const *subhaystack_l = haystack; - while (subneedle_l < end_needle) + Byte const *subneedle_l = needle; + Byte const *subhaystack_l = haystack; + while (subneedle_l < end_needle) { - if (*subneedle_l++ != *subhaystack_l++) - goto next; // yeah. I should be prosecuted. + if (*subneedle_l++ != *subhaystack_l++) + { + haystack ++; + continue; + } } - // completed the needle. Gotcha. - return (char*) haystack; - next: - haystack++; + // completed the needle. Gotcha. + return (Byte *) haystack; } - return 0; + return 0; } + #endif Byte * memrchr (Byte const * p, int n, char c) { - const Byte * q = p+n; - while (q > p) + const Byte * q = p+n; + while (q > p) { - if (*--q == c) - return (Byte*)q; + if (*--q == c) + return (Byte*)q; } - return 0; + return 0; } @@ -85,34 +89,34 @@ template inline void my_swap (T &t1, T &t2, T &tmp) { - tmp = t1; - t1 = t2; - t2 = tmp; + tmp = t1; + t1 = t2; + t2 = tmp; } Byte* strrev (Byte* byte_l, int length_i) { - Byte tmp_byte; + Byte tmp_byte; - Byte* left_l = byte_l; - Byte* right_l = byte_l + length_i; + Byte* left_l = byte_l; + Byte* right_l = byte_l + length_i; - while (right_l > left_l) + while (right_l > left_l) { - my_swap (*right_l-- , *left_l++ , tmp_byte); + my_swap (*right_l-- , *left_l++ , tmp_byte); } - return byte_l; + return byte_l; } #if ! HAVE_SNPRINTF int snprintf (char *str, size_t, - char const *format, ...) + char const *format, ...) { - va_list ap; - va_start (ap, format); - int i = vsprintf (str, format, ap); - va_end (ap); - return i; + va_list ap; + va_start (ap, format); + int i = vsprintf (str, format, ap); + va_end (ap); + return i; } #endif diff --git a/init/feta20.ly b/init/feta20.ly index af554f556a..dcf020e145 100644 --- a/init/feta20.ly +++ b/init/feta20.ly @@ -1,5 +1,5 @@ -% Creator: mf-to-table.py version 0.4 -% Automatically generated on Mon Jan 5 15:23:56 1998 +% Creator: mf-to-table.py version 0.5 +% Automatically generated on % Do not edit % input from out/feta20.log % name=\symboltables { diff --git a/input/scsii-menuetto.ly b/input/scsii-menuetto.ly index febd0720e6..363390eb8c 100644 --- a/input/scsii-menuetto.ly +++ b/input/scsii-menuetto.ly @@ -6,7 +6,7 @@ instrument = "Menuetto I"; % duh description = "Cello suite transcribed for Viola"; source = "?"; opus = "BWV 1008 no. 5"; -composer = "Johann Sebastian Bach (1685-1750)"; +composer = "Johann Sebastian Bach(1685-1750)"; enteredby = "JCN"; copyright = "public domain"; } @@ -22,13 +22,13 @@ copyright = "public domain"; % \tempo{Moderato} % \metron{4=120} % -% \key\F % \key is F ( f-major ) +% \key\F % \key is F( f-major ) % % \slope{30} % Fool MusiXTeX into 30 / 10 steeper beam % % because piece is set very tightly IImenuetto = \melodic{ - \property Voice.beamslopedamping = \infinity +% \property Voice.beamslopedamping = \infinity \clef"alto"; \property Staff.instrument = cello \meter 3/4; @@ -40,19 +40,30 @@ IImenuetto = \melodic{ %%2 \textstyle "finger"; % ugh. - < [ bes8^"1"( e8 c8_"2"_"4" > - )a8 bes8-. g8-. ] a4-.^"4" | - + \multi 2 < + { \stemup; [ bes8^"1"( )a8 bes8-. g8-. ] a4-.^"4" } + + { \stemdown; < e8_"2" c8_"4" > } + > | + \stemboth; %%3 - \property Voice.beamslopedamping = \normal +% \property Voice.beamslopedamping = \normal < d4 'bes4-. > g4-. [ f8-. e8-. ] | - \property Voice.beamslopedamping = \infinity +% \property Voice.beamslopedamping = \infinity %%4 - < [ f8( 'a > e8 )d8 cis8-. 'b8-. 'a8-. ] + \multi 2 < + { \stemup; [ f8( e8 )d8 cis8-. 'b8-. 'a8-. ] } + { \stemdown; 'a } + > | + \stemboth; %%5 < a2 f2 d2 > bes!4-. | %%6 - < [ bes8 e8 > a8 bes8-. g8-. ] + \multi 2 < + { \stemup; [ bes8 a8 bes8-. g8-. ] } + { \stemdown; e8 } + > + \stemboth; c'!4-. | %%7 < a4-. f4> @@ -60,58 +71,83 @@ IImenuetto = \melodic{ < e'4-.-\downbow g4 'g4 > | %%8 < cis'2.-\upbow e2. 'a2. > - \bar ":|:"; + \bar ":|:"; %%9 \clef "violin"; < e'2 a2 \f > - \property Voice.beamslopedamping = \normal +% \property Voice.beamslopedamping = \normal [ d'8( e'16 )f'16 ] | - \property Voice.beamslopedamping = \infinity +% \property Voice.beamslopedamping = \infinity %%10 - < [ e'8( g8 > d' cis'_"2" )e' a () g8 ] | + \multi 2 < + { \stemup; [ e'8( d' cis'_"2" )e' a( )g8 ] } + { \stemdown; g8 } + > | + \stemboth; %%11 - \multi 2 < - {\stemup a4() d'4 cis'4-. } - { \stemdown f2 e4 } > | - \stemboth + \multi 2 < + { \stemup; a4( )d'4 cis'4-. } + { \stemdown; f2 e4 } + > | + \stemboth; %%12 - % oeps: slur gets attached at d8 iso g'8! -% < [ g'8^"4"( d8 > f' e' )f' d'^"3"() c' ] | - % wrong still... - < { [ g'8^"4"( f' e' )f' d'^"3"() c' ] } { [ d8 ] } > | + \multi 2 < + { \stemup; [ g'8^"4"( f' e' )f' d'^"3"( ) c' ] } + { \stemdown; d8 } + > | + \stemboth; %%13 \clef "alto"; \multi 2 < - { \stemup bes2 c'4 } - { \stemdown g4() f4 e4 }% ugh + + { \stemup; bes2 c'4 } + { \stemdown; g4( )f4 e4 }% ugh > | - \stemboth + \stemboth; %%14 - < [ a8 f8 > g8 a8 f8 ] < d'4-\upbow e4 'bes4 > | + \multi 2 < + { \stemup; [ a8 g8 a8 f8 ] } + { \stemdown; f8 } + > + \stemboth; + < d'4-\upbow e4 'bes4 > | %%15 - < c'4-\downbow f4 'a4 > [ bes8() a8 g8 a8 ] | + < c'4-\downbow f4 'a4 > [ bes8( )a8 g8 a8 ] | %%16 [ f( e8 )f a8-. g8-. bes8-. ] | %%17 < a2^"0"^\trill fis2_"3" > bes4 | %%18 - < { [ c'8 () bes8 c' a8 ] } es8 > fis4^\trill | + \multi 2 < + { \stemup; [ c'8( )bes8 c' a8 ] } + { \stemdown; es8 } + > + \stemboth; + fis4^\trill | %%19 < d'4-\downbow g4 'bes4 > < c'4-\upbow g4 c4 > < [ bes8 d8 > a8 ] | %%20 - < { [ c'8 ( bes8 a8 )bes g() bes8 ] } d8 g8 > | + \multi 2 < + { \stemup; [ c'8( bes8 a8 )bes g( )bes8 ] } + { \stemdown; < d8 g8 > } + > | + \stemboth; %%21 \multi 2 < - {\stemup d'4( \stemup )cis'4 d'4 } - { \stemdown g2 f4 } + { \stemup; d'4( )cis'4 d'4 } + { \stemdown; g2 f4 } > | - \stemboth + \stemboth; %%22 - < { [ g8 () f8 g8 e8 ] } cis8 > < f4 d4 > | + \multi 2 < + { \stemup; [ g8( )f8 g8 e8 ] f4 } + { \stemdown; cis8 d4 } + > | + \stemboth; %%23 - \property Voice.beamslopedamping = \normal +% \property Voice.beamslopedamping = \normal [ 'g8 g8 ] < e4.^\trill 'a4. > d8-\upbow | - \property Voice.beamslopedamping = \infinity +% \property Voice.beamslopedamping = \infinity %%24 \textstyle "roman"; % ugh < d2.^"fine" 'a2. 'd2._"3 mins."> @@ -124,6 +160,11 @@ IImenuetto = \melodic{ } \paper{ linewidth= 150.0\mm; + % how does this work? + % why does space not have dim? + arithmetic_basicspace = 3.2; + % how can multiplier have dim? + arithmetic_mulitplier = 9.\pt; \output "scsii-menuetto.out"; } \midi{ diff --git a/lily/include/midi-item.hh b/lily/include/midi-item.hh index c422e04db8..4df2a4744b 100644 --- a/lily/include/midi-item.hh +++ b/lily/include/midi-item.hh @@ -20,6 +20,7 @@ struct Midi_item { DECLARE_MY_RUNTIME_TYPEINFO; Midi_item (Audio_item* audio_item_l); + virtual ~Midi_item (); static String i2varint_str (int i); void output (Midi_stream* midi_stream_l) const; virtual String str() const = 0; diff --git a/lily/midi-def.cc b/lily/midi-def.cc index 480e0a7969..e7da659d19 100644 --- a/lily/midi-def.cc +++ b/lily/midi-def.cc @@ -62,7 +62,7 @@ Midi_def::print() const #ifndef NPRINT Music_output_def::print (); DOUT << "Midi {"; - DOUT << "4/min: " << Real (60) / (whole_in_seconds_mom_ * 4); + DOUT << "4/min: " << Moment (60) / (whole_in_seconds_mom_ * Moment (4)); DOUT << "}\n"; #endif } diff --git a/lily/midi-item.cc b/lily/midi-item.cc index 18736a92db..a23919f509 100644 --- a/lily/midi-item.cc +++ b/lily/midi-item.cc @@ -265,7 +265,11 @@ Midi_instrument::Midi_instrument (int channel_i, String instrument_str) instrument_str_.to_lower(); channel_i_ = channel_i; } - + +Midi_item::~Midi_item () +{ +} + String Midi_instrument::str() const { diff --git a/lily/score.cc b/lily/score.cc index a32773e433..97203dec9c 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -22,6 +22,7 @@ Score::Score() + : Input() { header_p_ = 0; music_p_ = 0; diff --git a/lily/scores.cc b/lily/scores.cc index a5081a25b3..5badc05fb0 100644 --- a/lily/scores.cc +++ b/lily/scores.cc @@ -25,7 +25,8 @@ do_scores() { for (int i=0; i < global_score_array.size(); i++) { - Score *&is_p = global_score_array[i]; +// Score *&is_p = global_score_array[i]; + Score* is_p = global_score_array[i]; if (!is_p->header_p_) is_p->header_p_ = new Header; diff --git a/make/Variables.make b/make/Variables.make index 83a4a29e03..0d2d6795b5 100644 --- a/make/Variables.make +++ b/make/Variables.make @@ -146,9 +146,9 @@ CFLAGS = $(ICFLAGS) $(DEFINES) $(INCLUDES) $(USER_CFLAGS) $(EXTRA_CFLAGS) # huh, but still, no warnings even provoced with linux's gcc 2.7.2.1? # -pipe makes it go faster, but is not supported on all platforms. +# EXTRA_CXXFLAGS= -fno-rtti -fno-exceptions -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wconversion EXTRA_CXXFLAGS= -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wconversion - CXXFLAGS = $(CFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS) $(MODULE_CXXFLAGS) INCLUDES = -Iinclude -I$(outdir) -I$(include-lib) -I$(libout) -I$(include-flower) -I$(flowerout) CXX_OUTPUT_OPTION = $< -o $@ diff --git a/mi2mu/include/mudela-item.hh b/mi2mu/include/mudela-item.hh index 9423959b6d..76754ebc80 100644 --- a/mi2mu/include/mudela-item.hh +++ b/mi2mu/include/mudela-item.hh @@ -22,6 +22,7 @@ class Mudela_item { public: Mudela_item (Mudela_column* mudela_column_l); + virtual ~Mudela_item (); virtual Moment at_mom(); virtual Moment duration_mom(); diff --git a/mi2mu/mudela-item.cc b/mi2mu/mudela-item.cc index b4b1d46b29..d70200e3c5 100644 --- a/mi2mu/mudela-item.cc +++ b/mi2mu/mudela-item.cc @@ -17,6 +17,10 @@ Mudela_item::Mudela_item (Mudela_column* mudela_column_l) mudela_column_l_ = mudela_column_l; } +Mudela_item::~Mudela_item () +{ +} + Moment Mudela_item::at_mom () {