From 1cb9fab398f9e5449464be98aa5dbc5d99420b7a Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 02:03:31 +0000 Subject: [PATCH] lilypond-1.5.16 --- configure | 253 +++++++++++++++------------- lily/beam.cc | 4 +- lily/folded-repeat-iterator.cc | 4 +- lily/include/lily-guile.hh | 2 + lily/include/music-sequence.hh | 15 +- lily/include/repeated-music.hh | 2 +- lily/lily-guile.cc | 29 +++- lily/music-sequence.cc | 68 +++----- lily/parser.yy | 57 +++---- lily/repeated-music.cc | 22 ++- lily/sequential-music.cc | 4 +- lily/simultaneous-music-iterator.cc | 3 +- lily/simultaneous-music.cc | 6 +- lily/unfolded-repeat-iterator.cc | 2 +- scm/music-property-description.scm | 10 +- 15 files changed, 242 insertions(+), 239 deletions(-) diff --git a/configure b/configure index 3aab916d87..3f9f6b4dcd 100755 --- a/configure +++ b/configure @@ -71,6 +71,8 @@ ac_help="$ac_help --enable-checking set runtime checks (assert calls). Default: on" ac_help="$ac_help --enable-debugging compile with debugging info. Default: on" +ac_help="$ac_help + --enable-optimising compile with optimising. Default: on" ac_help="$ac_help --enable-profiling compile with gprof support. Default: off" ac_help="$ac_help @@ -626,12 +628,12 @@ fi fi echo $ac_n "checking Package""... $ac_c" 1>&6 -echo "configure:630: checking Package" >&5 +echo "configure:632: checking Package" >&5 if test "x$PACKAGE" = "xSTEPMAKE"; then echo "$ac_t""Stepmake package!" 1>&6 echo $ac_n "checking builddir""... $ac_c" 1>&6 -echo "configure:635: checking builddir" >&5 +echo "configure:637: checking builddir" >&5 if test "$srcdir" = "."; then builddir=. else @@ -669,7 +671,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. echo "$ac_t""$PACKAGE" 1>&6 echo $ac_n "checking builddir""... $ac_c" 1>&6 -echo "configure:673: checking builddir" >&5 +echo "configure:675: checking builddir" >&5 if test "$srcdir" = "."; then builddir=. srcdir_build=no @@ -689,7 +691,7 @@ echo "configure:673: checking builddir" >&5 fi echo $ac_n "checking for stepmake""... $ac_c" 1>&6 -echo "configure:693: checking for stepmake" >&5 +echo "configure:695: checking for stepmake" >&5 # Check for installed stepmake if test -d $stepmake; then echo "$ac_t""$stepmake" 1>&6 @@ -811,7 +813,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:815: checking host system type" >&5 +echo "configure:817: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -836,7 +838,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:840: checking for $ac_word" >&5 +echo "configure:842: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -871,7 +873,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:875: checking for $ac_word" >&5 +echo "configure:877: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_FIND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -908,7 +910,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:912: checking for $ac_word" >&5 +echo "configure:914: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -943,7 +945,7 @@ test -n "$TAR" || TAR="error" # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:947: checking for $ac_word" >&5 +echo "configure:949: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -983,7 +985,7 @@ fi # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:987: checking for $ac_word" >&5 +echo "configure:989: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SHELL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1020,7 +1022,7 @@ fi # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1024: checking for $ac_word" >&5 +echo "configure:1026: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1061,7 +1063,7 @@ fi # Extract the first word of "${PYTHON:-python}", so it can be a program name with args. set dummy ${PYTHON:-python}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1065: checking for $ac_word" >&5 +echo "configure:1067: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1227,6 +1229,13 @@ if test "${enable_debugging+set}" = set; then fi + # Check whether --enable-optimising or --disable-optimising was given. +if test "${enable_optimising+set}" = set; then + enableval="$enable_optimising" + optimise_b=$enableval +fi + + # Check whether --enable-profiling or --disable-profiling was given. if test "${enable_profiling+set}" = set; then enableval="$enable_profiling" @@ -1262,7 +1271,7 @@ EOF # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1266: checking for $ac_word" >&5 +echo "configure:1275: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1292,7 +1301,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1296: checking for $ac_word" >&5 +echo "configure:1305: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1343,7 +1352,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1347: checking for $ac_word" >&5 +echo "configure:1356: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1375,7 +1384,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1379: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1388: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1386,12 +1395,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1390 "configure" +#line 1399 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1417,12 +1426,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1421: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1430: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1426: checking whether we are using GNU C" >&5 +echo "configure:1435: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1431,7 +1440,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1450,7 +1459,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1454: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1463: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1488,7 +1497,7 @@ fi CPPFLAGS=${CPPFLAGS:-""} echo $ac_n "checking for IEEE-conformance compiler flags""... $ac_c" 1>&6 -echo "configure:1492: checking for IEEE-conformance compiler flags" >&5 +echo "configure:1501: checking for IEEE-conformance compiler flags" >&5 save_cflags="$CFLAGS" case "$host" in alpha*-*-*) @@ -1510,7 +1519,7 @@ echo "configure:1492: checking for IEEE-conformance compiler flags" >&5 # AC_HAVE_HEADERS(limits.h malloc.h string.h unistd.h values.h) echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1514: checking how to run the C preprocessor" >&5 +echo "configure:1523: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1525,13 +1534,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1542,13 +1551,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1559,13 +1568,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1593,17 +1602,17 @@ for ac_hdr in assert.h sys/stat.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1597: checking for $ac_hdr" >&5 +echo "configure:1606: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1630,12 +1639,12 @@ fi done echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 -echo "configure:1634: checking whether stat file-mode macros are broken" >&5 +echo "configure:1643: checking whether stat file-mode macros are broken" >&5 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1686,14 +1695,8 @@ EOF fi -DEFINES="$DEFINES -DSTRING_UTILS_INLINED" -cat >> confdefs.h <<\EOF -#define STRINGS_UTILS_INLINED 1 -EOF - - echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:1697: checking how to run the C++ preprocessor" >&5 +echo "configure:1700: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1706,12 +1709,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1748,7 +1751,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1752: checking for $ac_word" >&5 +echo "configure:1755: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1780,7 +1783,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1784: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:1787: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1791,12 +1794,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 1795 "configure" +#line 1798 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:1800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1822,12 +1825,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1826: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1829: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:1831: checking whether we are using GNU C++" >&5 +echo "configure:1834: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1836,7 +1839,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -1855,7 +1858,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:1859: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1862: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1889,17 +1892,17 @@ fi ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6 -echo "configure:1893: checking for FlexLexer.h" >&5 +echo "configure:1896: checking for FlexLexer.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1936,7 +1939,7 @@ fi echo $ac_n "checking "g++ version"""... $ac_c" 1>&6 -echo "configure:1940: checking "g++ version"" >&5 +echo "configure:1943: checking "g++ version"" >&5 cxx_version=`$CXX --version` echo "$ac_t"""$cxx_version"" 1>&6 # urg, egcs: how to check for egcs >= 1.1? @@ -1954,12 +1957,12 @@ echo "configure:1940: checking "g++ version"" >&5 echo $ac_n "checking whether explicit instantiation is needed""... $ac_c" 1>&6 -echo "configure:1958: checking whether explicit instantiation is needed" >&5 +echo "configure:1961: checking whether explicit instantiation is needed" >&5 if eval "test \"`echo '$''{'lily_cv_need_explicit_instantiation'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < struct foo { static int baz; }; @@ -1969,7 +1972,7 @@ int main() { return foo::baz; ; return 0; } EOF -if { (eval echo configure:1973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lily_cv_need_explicit_instantiation=no else @@ -1996,7 +1999,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2000: checking for $ac_word" >&5 +echo "configure:2003: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2039,7 +2042,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2043: checking for $ac_word" >&5 +echo "configure:2046: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2074,7 +2077,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2078: checking for $ac_word" >&5 +echo "configure:2081: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2142,7 +2145,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2146: checking for $ac_word" >&5 +echo "configure:2149: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2175,7 +2178,7 @@ test -n "$AR" || AR="error" # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2179: checking for $ac_word" >&5 +echo "configure:2182: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2230,7 +2233,7 @@ fi echo $ac_n "checking language""... $ac_c" 1>&6 -echo "configure:2234: checking language" >&5 +echo "configure:2237: checking language" >&5 case "$language" in En* | en* | Am* | am* | US* | us*) lang=English;; @@ -2266,7 +2269,7 @@ EOF echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 -echo "configure:2270: checking for gettext in -lintl" >&5 +echo "configure:2273: checking for gettext in -lintl" >&5 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2274,7 +2277,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2318,12 +2321,12 @@ fi for ac_func in gettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2322: checking for $ac_func" >&5 +echo "configure:2325: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2381,7 +2384,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2385: checking for $ac_word" >&5 +echo "configure:2388: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2412,7 +2415,7 @@ done test -n "$MSGFMT" || MSGFMT="\$(SHELL) \$(step-bindir)/fake-msgfmt.sh " echo $ac_n "checking whether msgfmt accepts -o""... $ac_c" 1>&6 -echo "configure:2416: checking whether msgfmt accepts -o" >&5 +echo "configure:2419: checking whether msgfmt accepts -o" >&5 msgfmt_output="`msgfmt -o bla 2>&1 | grep usage`" if test "$msgfmt_output" = ""; then echo "$ac_t""yes" 1>&6 @@ -2440,7 +2443,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2444: checking for $ac_word" >&5 +echo "configure:2447: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_METAFONT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2476,7 +2479,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2480: checking for $ac_word" >&5 +echo "configure:2483: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MFONT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2514,7 +2517,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2518: checking for $ac_word" >&5 +echo "configure:2521: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_METAPOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2550,7 +2553,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2554: checking for $ac_word" >&5 +echo "configure:2557: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MPOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2589,7 +2592,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2593: checking for $ac_word" >&5 +echo "configure:2596: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_INIMETAFONT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2625,7 +2628,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2629: checking for $ac_word" >&5 +echo "configure:2632: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_INIMFONT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2663,7 +2666,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2667: checking for $ac_word" >&5 +echo "configure:2670: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_INIMETAPOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2699,7 +2702,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2703: checking for $ac_word" >&5 +echo "configure:2706: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_INIMPOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2733,7 +2736,7 @@ test -n "$INIMPOST" || INIMPOST="-echo no inimp or inimpost" fi echo $ac_n "checking for working metafont mode""... $ac_c" 1>&6 -echo "configure:2737: checking for working metafont mode" >&5 +echo "configure:2740: checking for working metafont mode" >&5 modelist='ljfour lj4 lj3 lj2 ljet laserjet' for MFMODE in $modelist; do $METAFONT "\mode:=$MFMODE; mode_setup; end." > /dev/null 2>&1 @@ -2744,7 +2747,7 @@ echo "configure:2737: checking for working metafont mode" >&5 echo "$ac_t""$MFMODE" 1>&6 echo $ac_n "checking for mfplain.mp""... $ac_c" 1>&6 -echo "configure:2748: checking for mfplain.mp" >&5 +echo "configure:2751: checking for mfplain.mp" >&5 # # For now let people define these in their environments # @@ -2752,7 +2755,7 @@ echo "configure:2748: checking for mfplain.mp" >&5 echo "$ac_t""$MFPLAIN_MP" 1>&6 echo $ac_n "checking for inimetapost flags""... $ac_c" 1>&6 -echo "configure:2756: checking for inimetapost flags" >&5 +echo "configure:2759: checking for inimetapost flags" >&5 if test ${INIMETAPOST} = "inimp" ; then : ${INIMETAPOST_FLAGS=''} else @@ -2785,7 +2788,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2789: checking for $ac_word" >&5 +echo "configure:2792: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_KPSEWHICH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2816,7 +2819,7 @@ done test -n "$KPSEWHICH" || KPSEWHICH="no" echo $ac_n "checking for tfm path""... $ac_c" 1>&6 -echo "configure:2820: checking for tfm path" >&5 +echo "configure:2823: checking for tfm path" >&5 TFM_FONTS="cmr msam" @@ -2844,13 +2847,13 @@ echo "configure:2820: checking for tfm path" >&5 ## First, let's just see if we can find Guile at all. echo $ac_n "checking "for guile-config"""... $ac_c" 1>&6 -echo "configure:2848: checking "for guile-config"" >&5 +echo "configure:2851: checking "for guile-config"" >&5 for guile_config in guile-config $target-guile-config $build-guile-config; do echo "$ac_t"""$guile_config"" 1>&6 if ! $guile_config --version > /dev/null 2>&1 ; then echo "configure: warning: "cannot execute $guile_config"" 1>&2 echo $ac_n "checking "if we are cross compiling"""... $ac_c" 1>&6 -echo "configure:2854: checking "if we are cross compiling"" >&5 +echo "configure:2857: checking "if we are cross compiling"" >&5 guile_config=error else break @@ -2861,7 +2864,7 @@ echo "configure:2854: checking "if we are cross compiling"" >&5 exit 1 fi echo $ac_n "checking "Guile version"""... $ac_c" 1>&6 -echo "configure:2865: checking "Guile version"" >&5 +echo "configure:2868: checking "Guile version"" >&5 need_guile_version="1.3.4" need_guile_version_numeric=100304 guile_version=`$guile_config --version 2>&1 | awk '{print $NF}'` @@ -2882,7 +2885,7 @@ else {last =0}} ## The GUILE_FLAGS macro. echo $ac_n "checking for Guile""... $ac_c" 1>&6 -echo "configure:2886: checking for Guile" >&5 +echo "configure:2889: checking for Guile" >&5 if ! $guile_config link > /dev/null ; then echo "$ac_t"""cannot execute $guile_config"" 1>&6 { echo "configure: error: "cannot find guile-config; is Guile installed?"" 1>&2; exit 1; } @@ -2897,7 +2900,7 @@ echo "configure:2886: checking for Guile" >&5 # Extract the first word of "guile", so it can be a program name with args. set dummy guile; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2901: checking for $ac_word" >&5 +echo "configure:2904: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GUILE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2958,17 +2961,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2962: checking for $ac_hdr" >&5 +echo "configure:2965: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2995,7 +2998,7 @@ fi done echo $ac_n "checking for kpse_find_file in -lkpathsea""... $ac_c" 1>&6 -echo "configure:2999: checking for kpse_find_file in -lkpathsea" >&5 +echo "configure:3002: checking for kpse_find_file in -lkpathsea" >&5 ac_lib_var=`echo kpathsea'_'kpse_find_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3003,7 +3006,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lkpathsea $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3047,12 +3050,12 @@ fi for ac_func in kpse_find_file do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3051: checking for $ac_func" >&5 +echo "configure:3054: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3105,7 +3108,7 @@ done fi echo $ac_n "checking whether to use kpathsea""... $ac_c" 1>&6 -echo "configure:3109: checking whether to use kpathsea" >&5 +echo "configure:3112: checking whether to use kpathsea" >&5 if test "$kpathsea_b" != no; then echo "$ac_t""yes" 1>&6 KPATHSEA=1 @@ -3126,7 +3129,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3130: checking for $ac_word" >&5 +echo "configure:3133: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_BIBTEX2HTML'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3166,8 +3169,18 @@ test -n "$BIBTEX2HTML" || BIBTEX2HTML="error" +if test "$optimise_b" = yes; then + DEFINES="$DEFINES -DSTRING_UTILS_INLINED" + cat >> confdefs.h <<\EOF +#define STRINGS_UTILS_INLINED 1 +EOF + +fi + + + echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:3171: checking for 8-bit clean memcmp" >&5 +echo "configure:3184: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3175,7 +3188,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -3206,12 +3219,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:3210: checking for vprintf" >&5 +echo "configure:3223: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -3261,12 +3274,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:3265: checking for _doprnt" >&5 +echo "configure:3278: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -3319,12 +3332,12 @@ fi for ac_func in memmem snprintf vsnprintf gettext isinf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3323: checking for $ac_func" >&5 +echo "configure:3336: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3390,7 +3403,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3394: checking for $ac_word" >&5 +echo "configure:3407: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3422,7 +3435,7 @@ test -n "$MAKEINFO" || MAKEINFO="error" if test "$MAKEINFO" != "error"; then echo $ac_n "checking whether makeinfo can split html by @node""... $ac_c" 1>&6 -echo "configure:3426: checking whether makeinfo can split html by @node" >&5 +echo "configure:3439: checking whether makeinfo can split html by @node" >&5 mkdir -p out makeinfo --html --output=out/split <&6 -echo "configure:3454: checking for $ac_word" >&5 +echo "configure:3467: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3488,17 +3501,17 @@ for ac_hdr in python2.0/Python.h python2/Python.h python/Python.h python1.5/Pyth do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3492: checking for $ac_hdr" >&5 +echo "configure:3505: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* diff --git a/lily/beam.cc b/lily/beam.cc index 9e433827b6..f744b4fff6 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -14,7 +14,9 @@ -* shorter! (now +- 1000 lines) -* less hairy code - + + -* Remove #'direction from beam. The beam has no direction per se. + It may only set directions for stems. */ diff --git a/lily/folded-repeat-iterator.cc b/lily/folded-repeat-iterator.cc index 18cfe09204..58b1decf54 100644 --- a/lily/folded-repeat-iterator.cc +++ b/lily/folded-repeat-iterator.cc @@ -118,8 +118,8 @@ Folded_repeat_iterator::enter_alternative () { Simultaneous_music_iterator * s = new Simultaneous_music_iterator; s->separate_contexts_b_ = true; - s->init_translator (mus->alternatives (), report_to_l ()); - + s->init_translator (mus, report_to_l ()); + alternative_iter_p_ = s; alternative_iter_p_->construct_children (); } diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index 30c154cac5..7cc9232bf2 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -75,6 +75,8 @@ SCM ly_last (SCM list); SCM ly_str02scm (char const*c); SCM ly_write2scm (SCM s); SCM ly_deep_copy (SCM); +SCM ly_truncate_list (int k, SCM l ); + #define CACHE_SYMBOLS #ifdef CACHE_SYMBOLS diff --git a/lily/include/music-sequence.hh b/lily/include/music-sequence.hh index b22d029582..699098fab4 100644 --- a/lily/include/music-sequence.hh +++ b/lily/include/music-sequence.hh @@ -25,19 +25,18 @@ public: VIRTUAL_COPY_CONS (Music); Pitch do_relative_octave (Pitch p, bool b); + static void transpose_list (SCM , Pitch); + static void compress_list (SCM, Moment); + virtual void transpose (Pitch ); - void truncate (int k); virtual void compress (Moment); - int length_i () const; - Moment cumulative_length () const; - Moment maximum_length () const; - Moment first_start () const; - Moment minimum_start () const; + static Moment cumulative_length (SCM) ; + static Moment maximum_length (SCM) ; + static Moment first_start (SCM list) ; + static Moment minimum_start (SCM list); protected: virtual Pitch to_relative_octave (Pitch); - - }; #endif diff --git a/lily/include/repeated-music.hh b/lily/include/repeated-music.hh index 61c9661823..4b84bb140e 100644 --- a/lily/include/repeated-music.hh +++ b/lily/include/repeated-music.hh @@ -50,7 +50,7 @@ class Repeated_music : public Music { public: Music * body () const; - Music_sequence * alternatives () const; + SCM alternatives () const; /// how often do we repeat? int repeat_count ( ) const; diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index e613c2041c..77c3ce5506 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -11,8 +11,8 @@ #include #include -#include // isinf - +#include /* isinf */ +#include /* strdup, strchr */ #include "libc-extension.hh" #include "lily-guile.hh" #include "main.hh" @@ -391,7 +391,7 @@ ly_number2string (SCM s) char str[400]; // ugh. - if (scm_integer_p (s) == SCM_BOOL_F) + if (scm_exact_p (s) == SCM_BOOL_F) { Real r (gh_scm2double (s)); @@ -519,3 +519,26 @@ parse_symbol_list (const char * list) free (orig); return create_list; } + + +SCM +ly_truncate_list (int k, SCM l ) +{ + if (k == 0) + { + l = SCM_EOL; + } + else + { + SCM s = l; + k--; + for (; gh_pair_p (s) && k--; s = ly_cdr (s)) + ; + + if (gh_pair_p (s)) + { + gh_set_cdr_x (s, SCM_EOL); + } + } + return l; +} diff --git a/lily/music-sequence.cc b/lily/music-sequence.cc index 2079133314..5ea3514611 100644 --- a/lily/music-sequence.cc +++ b/lily/music-sequence.cc @@ -11,29 +11,6 @@ #include "pitch.hh" -void -Music_sequence::truncate (int k) -{ - SCM l = get_mus_property ("elements"); - if (k == 0) - { - l = SCM_EOL; - } - else - { - SCM s = l; - k--; - for (; gh_pair_p (s) && k--; s = ly_cdr (s)) - ; - - if (gh_pair_p (s)) - { - gh_set_cdr_x (s, SCM_EOL); - } - } - set_mus_property ("elements", l); -} - SCM Music_sequence::music_list ()const { @@ -59,20 +36,23 @@ Music_sequence::Music_sequence (SCM l) void Music_sequence::transpose (Pitch rq) { - for (SCM s = music_list (); gh_pair_p (s); s = ly_cdr (s)) - unsmob_music (ly_car (s))->transpose (rq); + transpose_list (music_list (), rq); } - - +void +Music_sequence::transpose_list (SCM l, Pitch rq) +{ + for (SCM s = l; gh_pair_p (s); s = ly_cdr (s)) + unsmob_music (ly_car (s))->transpose (rq); +} Moment -Music_sequence::cumulative_length () const +Music_sequence::cumulative_length (SCM l) { Moment cumulative; - - Moment last_len ; - for (SCM s = music_list (); gh_pair_p (s); s = ly_cdr (s)) + Moment last_len; + + for (SCM s = l; gh_pair_p (s); s = ly_cdr (s)) { Moment l = unsmob_music (ly_car (s))->length_mom (); if (last_len.grace_part_ && l.main_part_) @@ -97,10 +77,10 @@ Music_sequence::to_relative_octave (Pitch p) Moment -Music_sequence::maximum_length () const +Music_sequence::maximum_length (SCM l) { Moment dur = 0; - for (SCM s = music_list (); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = l; gh_pair_p (s); s = ly_cdr (s)) { Music * m = unsmob_music (ly_car (s)); Moment l = m->length_mom (); @@ -109,11 +89,7 @@ Music_sequence::maximum_length () const return dur; } -int -Music_sequence::length_i () const -{ - return scm_ilength (music_list ()); -} + Pitch Music_sequence::do_relative_octave (Pitch p, bool ret_first) @@ -138,7 +114,13 @@ Music_sequence::do_relative_octave (Pitch p, bool ret_first) void Music_sequence::compress (Moment m) { - for (SCM s = music_list (); gh_pair_p (s); s = ly_cdr (s)) + compress_list (music_list (), m); +} + +void +Music_sequence::compress_list (SCM l, Moment m) +{ + for (SCM s = l; gh_pair_p (s); s = ly_cdr (s)) unsmob_music (ly_car (s))->compress (m); } @@ -151,11 +133,11 @@ Music_sequence::Music_sequence () } Moment -Music_sequence::minimum_start () const +Music_sequence::minimum_start (SCM l) { Moment m; - for (SCM s = music_list (); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = l; gh_pair_p (s); s = ly_cdr (s)) { m = m start_mom (); } @@ -163,11 +145,11 @@ Music_sequence::minimum_start () const } Moment -Music_sequence::first_start () const +Music_sequence::first_start (SCM l) { Moment m; - for (SCM s = music_list (); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = l; gh_pair_p (s); s = ly_cdr (s)) { Music * mus = unsmob_music (ly_car (s)); Moment l = mus->length_mom (); diff --git a/lily/parser.yy b/lily/parser.yy index 7bdcee9d0d..85278a58f7 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -275,7 +275,8 @@ yylex (YYSTYPE *s, void * v_l) %type request_with_dir request_that_take_dir verbose_request %type sub_quotes sup_quotes %type simple_element request_chord command_element Simple_music Composite_music -%type Alternative_music Repeated_music +%type Repeated_music +%type Alternative_music %type tremolo_type %type bare_int bare_unsigned %type script_dir @@ -296,7 +297,7 @@ yylex (YYSTYPE *s, void * v_l) %type duration_length fraction %type embedded_scm scalar -%type Music Sequential_music Simultaneous_music Music_sequence +%type Music Sequential_music Simultaneous_music %type relative_music re_rhythmed_music part_combined_music %type property_def translator_change %type Music_list @@ -663,6 +664,13 @@ tempo_request: } ; +/* +The representation of a list is the + + (LIST . LAST-CONS) + + to have efficient append. +*/ Music_list: /* empty */ { $$ = gh_cons (SCM_EOL, SCM_EOL); } @@ -688,41 +696,35 @@ Music: Alternative_music: /* empty */ { - $$ = 0; + $$ = SCM_EOL; } - | ALTERNATIVE Music_sequence { - $$ = $2; - $2->set_spot (THIS->here_input ()); + | ALTERNATIVE '{' Music_list '}' { + $$ = $3; } ; - - - Repeated_music: REPEAT string bare_unsigned Music Alternative_music { - Music_sequence* alts = dynamic_cast ($5); - if (alts && $3 < alts->length_i ()) - $5->origin ()->warning (_ ("More alternatives than repeats. Junking excess alternatives.")); Music *beg = $4; int times = $3; + SCM alts = gh_pair_p ($5) ? gh_car ($5) : SCM_EOL; + if (times < scm_ilength (alts)) { + unsmob_music (gh_car (alts)) + ->origin ()->warning ( + _("More alternatives than repeats. Junking excess alternatives.")); + alts = ly_truncate_list (times, alts); + } Repeated_music * r = new Repeated_music (SCM_EOL); - if (beg) { - r-> set_mus_property ("body", beg->self_scm ()); + r-> set_mus_property ("element", beg->self_scm ()); scm_gc_unprotect_object (beg->self_scm ()); } r->set_mus_property ("repeat-count", gh_int2scm (times >? 1)); - if (alts) - { - alts->truncate (times); - r-> set_mus_property ("alternatives", alts->self_scm ()); - scm_gc_unprotect_object (alts->self_scm ()); - } + r-> set_mus_property ("elements",alts); SCM func = scm_primitive_eval (ly_symbol2scm ("repeat-name-to-ctor")); SCM result = gh_call1 (func, $2); @@ -733,12 +735,6 @@ Repeated_music: } ; -Music_sequence: '{' Music_list '}' { - $$ = new Music_sequence (SCM_EOL); - $$->set_mus_property ("elements", ly_car ($2)); - } - ; - Sequential_music: SEQUENTIAL '{' Music_list '}' { $$ = new Sequential_music (SCM_EOL); @@ -852,8 +848,6 @@ Composite_music: $$->set_mus_property ("element", $2->self_scm ()); scm_gc_unprotect_object ($2->self_scm ()); #endif - - } | CONTEXT string '=' string Music { Context_specced_music *csm = new Context_specced_music (SCM_EOL); @@ -971,8 +965,7 @@ relative_music: re_rhythmed_music: ADDLYRICS Music Music { Lyric_combine_music * l = new Lyric_combine_music (SCM_EOL); - l->set_mus_property ("music", $2->self_scm ()); - l->set_mus_property ("lyrics", $3->self_scm ()); + l->set_mus_property ("elements", gh_list ($2->self_scm (), $3->self_scm (), SCM_UNDEFINED)); scm_gc_unprotect_object ($3->self_scm ()); scm_gc_unprotect_object ($2->self_scm ()); $$ = l; @@ -984,13 +977,11 @@ part_combined_music: Part_combine_music * p = new Part_combine_music (SCM_EOL); p->set_mus_property ("what", $2); - p->set_mus_property ("one", $3->self_scm ()); - p->set_mus_property ("two", $4->self_scm ()); + p->set_mus_property ("elements", gh_list ($3->self_scm (),$4->self_scm (), SCM_UNDEFINED)); scm_gc_unprotect_object ($3->self_scm ()); scm_gc_unprotect_object ($4->self_scm ()); - $$ = p; } ; diff --git a/lily/repeated-music.cc b/lily/repeated-music.cc index 13471ed256..550424c5d0 100644 --- a/lily/repeated-music.cc +++ b/lily/repeated-music.cc @@ -15,13 +15,13 @@ Music * Repeated_music::body ()const { - return unsmob_music (get_mus_property ("body")); + return unsmob_music (get_mus_property ("element")); } -Music_sequence* +SCM Repeated_music::alternatives ()const { - return dynamic_cast (unsmob_music (get_mus_property ("alternatives"))); + return get_mus_property ("elements"); } @@ -40,7 +40,7 @@ Repeated_music::to_relative_octave (Pitch p) Pitch last = p ; if (alternatives ()) - for (SCM s = alternatives ()->music_list (); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = alternatives (); gh_pair_p (s); s = ly_cdr (s)) unsmob_music (ly_car (s))->to_relative_octave (p); @@ -53,8 +53,7 @@ Repeated_music::transpose (Pitch p) if (body ()) body ()->transpose (p); - if (alternatives ()) - alternatives ()->transpose (p); + Music_sequence::transpose_list (get_mus_property ("elements"), p); } void @@ -63,8 +62,7 @@ Repeated_music::compress (Moment p) if (body ()) body ()->compress (p); - if (alternatives ()) - alternatives ()->compress (p); + Music_sequence::compress_list (alternatives (), p); } Moment @@ -74,17 +72,17 @@ Repeated_music::alternatives_length_mom (bool fold) const return 0; if (fold) - return alternatives ()->maximum_length (); + return Music_sequence::maximum_length (alternatives ()); Moment m =0; int done =0; - SCM p = alternatives ()->music_list (); + SCM p = alternatives (); while (gh_pair_p (p) && done < repeat_count ()) { m = m + unsmob_music (ly_car (p))->length_mom (); done ++; - if (repeat_count () - done < alternatives ()->length_i ()) + if (repeat_count () - done < scm_ilength (alternatives ())) p = ly_cdr (p); } return m; @@ -101,7 +99,7 @@ Repeated_music::alternatives_volta_length_mom () const return 0; Moment m; - SCM p = alternatives ()->music_list (); + SCM p = alternatives (); while (gh_pair_p (p)) { m = m + unsmob_music (ly_car (p))->length_mom (); diff --git a/lily/sequential-music.cc b/lily/sequential-music.cc index 8e38c38c8e..0933d28e53 100644 --- a/lily/sequential-music.cc +++ b/lily/sequential-music.cc @@ -19,12 +19,12 @@ Sequential_music::Sequential_music () Moment Sequential_music::length_mom () const { - return cumulative_length (); + return Music_sequence::cumulative_length (get_mus_property ("elements")); } ADD_MUSIC (Sequential_music); Moment Sequential_music::start_mom () const { - return first_start (); + return Music_sequence::first_start (get_mus_property ("elements")); } diff --git a/lily/simultaneous-music-iterator.cc b/lily/simultaneous-music-iterator.cc index 390849e226..ca309ecff8 100644 --- a/lily/simultaneous-music-iterator.cc +++ b/lily/simultaneous-music-iterator.cc @@ -49,9 +49,8 @@ void Simultaneous_music_iterator::construct_children () { int j = 0; - Music_sequence const *sim = dynamic_cast (music_l ()); - SCM i = sim->music_list (); + SCM i = music_l ()->get_mus_property ("elements"); for (; gh_pair_p (i); i = ly_cdr (i), j++) { Music *mus = unsmob_music (ly_car (i)); diff --git a/lily/simultaneous-music.cc b/lily/simultaneous-music.cc index 51bc213974..85a3b8136f 100644 --- a/lily/simultaneous-music.cc +++ b/lily/simultaneous-music.cc @@ -7,17 +7,15 @@ Moment Simultaneous_music::length_mom () const { - return maximum_length (); + return Music_sequence::maximum_length (get_mus_property ("elements")); } Moment Simultaneous_music::start_mom () const { - return minimum_start (); + return Music_sequence::minimum_start (get_mus_property ("elements")); } - - Simultaneous_music::Simultaneous_music (SCM head) : Music_sequence (head) { diff --git a/lily/unfolded-repeat-iterator.cc b/lily/unfolded-repeat-iterator.cc index 46ad0a4be9..315149a478 100644 --- a/lily/unfolded-repeat-iterator.cc +++ b/lily/unfolded-repeat-iterator.cc @@ -259,7 +259,7 @@ Unfolded_repeat_iterator::construct_children () Repeated_music * mus =dynamic_cast (music_l ()); alternative_cons_ = (mus->alternatives ()) - ? mus->alternatives ()->music_list () + ? mus->alternatives () : SCM_EOL; for (SCM p = alternative_cons_; gh_pair_p (p); p = ly_cdr (p)) diff --git a/scm/music-property-description.scm b/scm/music-property-description.scm index bcc035a1c4..39957ee441 100644 --- a/scm/music-property-description.scm +++ b/scm/music-property-description.scm @@ -25,7 +25,6 @@ (music-property-description 'duration duration? "Duration of this note/lyric.") (music-property-description 'metronome-count number? "How many beats in a minute?") (music-property-description 'span-type symbol? "What kind of spanner should be created?") -(music-property-description 'alternatives music? "Music_sequence of alternatives for repeated music.") (music-property-description 'articulation-type symbol? "key for scriptDefinitions alist") (music-property-description 'bass boolean? "Set if this note is a bass note in a chord") (music-property-description 'body music? "The body of a repeat ") @@ -37,18 +36,16 @@ (music-property-description 'denominator integer? "denominator in a time signature") (music-property-description 'direction dir? "Print this up or down?") (music-property-description 'text-type symbol? "Particular type of text script (eg. finger, dynamic).") -(music-property-description 'element music? "The single child of a Music_wrapper music object.") +(music-property-description 'element music? "The single child of a Music_wrapper music object, or the body of a repeat.") +(music-property-description 'elements list? "A list of elements for sequential of simultaneous music, or the alternatives of repeated music. ") +(music-property-description 'force-accidental boolean? "If set, a cautionary accidental should always be printed on this note") (music-property-description 'grob-property symbol? "The symbol of the grob property to set. ") (music-property-description 'grob-value scheme? "The value of the grob property to set") -(music-property-description 'elements list? "A list of elements for sequential of simultaneous music") -(music-property-description 'force-accidental boolean? "If set, a cautionary accidental should always be printed on this note") (music-property-description 'inversion boolean? "If set, this chord note is inverted.") (music-property-description 'label string? "label of a mark.") (music-property-description 'last-pitch pitch? "The last pitch after relativization.") (music-property-description 'length procedure? "How to compute the duration of this music") -(music-property-description 'lyrics music? "second argument of a addlyrics") (music-property-description 'numerator integer? "numerator of a time signature") -(music-property-description 'one music? "first argument of partcombine."); part-combine, fixme, naming. (music-property-description 'origin ly-input-location? "where was this piece of music defined?") (music-property-description 'penalty number? "Penalty for break hint.") (music-property-description 'pitch pitch? "the pitch of this note") @@ -60,6 +57,5 @@ (music-property-description 'symbols list? "List of Grob names (symbols) to perform an override/revert on.") (music-property-description 'text string? "markup expression to be printed");; markup? (music-property-description 'tremolo-type integer? "") -(music-property-description 'two music? "2nd argument of a part-combine"); part-combine, fixme, naming. (music-property-description 'what string? "What to change for auto-change. FIXME, naming") -- 2.39.5