From bcca1c4333a03518e5a5054558e380289a14c1f3 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 20:10:27 +0000 Subject: [PATCH] lilypond-0.1.57 --- aclocal.m4 | 40 ++++++++++++++++++++++---- flower/axis.cc | 39 ++++++++++++++++++++++++++ flower/include/axes.hh | 36 ++++++++++++++++++++++++ flower/include/matrix-storage.hh | 2 ++ init/engraver.ly | 48 +++++++++++++++----------------- input/slur-bug.ly | 9 ++++++ lily/bow.cc | 12 ++++---- lily/include/bow.hh | 3 +- lily/include/curve.hh | 38 +++++++++++++++++++++++++ lily/include/lookup.hh | 2 ++ lily/include/slur-grav.hh | 2 +- lily/include/slur.hh | 6 ++++ 12 files changed, 199 insertions(+), 38 deletions(-) create mode 100644 flower/axis.cc create mode 100644 flower/include/axes.hh create mode 100644 input/slur-bug.ly create mode 100644 lily/include/curve.hh diff --git a/aclocal.m4 b/aclocal.m4 index de8271571a..a459924cb2 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,14 @@ -dnl aclocal.m4 generated automatically by aclocal 1.2 +dnl aclocal.m4 generated automatically by aclocal 1.3 + +dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +dnl This Makefile.in is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without +dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A +dnl PARTICULAR PURPOSE. AC_DEFUN(AC_JUNK_ARGS, [ @@ -109,8 +119,8 @@ fi ifelse([$3],, AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") AC_DEFINE_UNQUOTED(VERSION, "$VERSION")) -AM_SANITY_CHECK -AC_ARG_PROGRAM +AC_REQUIRE([AM_SANITY_CHECK]) +AC_REQUIRE([AC_ARG_PROGRAM]) dnl FIXME This is truly gross. missing_dir=`cd $ac_aux_dir && pwd` AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) @@ -118,7 +128,7 @@ AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) -AC_PROG_MAKE_SET]) +AC_REQUIRE([AC_PROG_MAKE_SET])]) # serial 1 @@ -145,10 +155,21 @@ echo timestamp > conftestfile # directory). if ( set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` - if test "$@" = "X"; then + if test "[$]*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftestfile` fi + if test "[$]*" != "X $srcdir/configure conftestfile" \ + && test "[$]*" != "X conftestfile $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + test "[$]2" = conftestfile ) then @@ -415,6 +436,15 @@ AC_MSG_RESULT([$NM]) AC_SUBST(NM) ]) + +dnl AM_PROG_LEX +dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT +AC_DEFUN(AM_PROG_LEX, +[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1) +AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex") +AC_PROG_LEX +AC_DECL_YYTEXT]) + # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN(AM_CONFIG_HEADER, diff --git a/flower/axis.cc b/flower/axis.cc new file mode 100644 index 0000000000..ff8566988d --- /dev/null +++ b/flower/axis.cc @@ -0,0 +1,39 @@ +/* + axis.cc -- implement Axis + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + +#include + +#include "axes.hh" +#include "string.hh" + +String +axis_name_str (Axis a) +{ + return String (char(a + 'x')); +} + +/* + TODO inline these. + */ +Axis +post_incr(Axis &a) +{ + assert(a < NO_AXES); + Axis b= a; + a = Axis(int(a) + 1); + return b; +} + +Axis +incr(Axis &a) +{ + assert(a < NO_AXES); + a = Axis(int(a) + 1); + return a; +} + diff --git a/flower/include/axes.hh b/flower/include/axes.hh new file mode 100644 index 0000000000..82e561eb9f --- /dev/null +++ b/flower/include/axes.hh @@ -0,0 +1,36 @@ +/* + axes.hh -- declare Axis + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + + +#ifndef AXES_HH +#define AXES_HH + +enum Axis { + X_AXIS =0, + Y_AXIS =1, + NO_AXES=2, +}; + +#ifndef STANDALONE + +#include "string.hh" // ugh + +String axis_name_str (Axis); + +#endif // STANDALONE + +/** + the operator ++ for Axis. + */ +Axis post_incr(Axis &); +Axis incr(Axis &); +//Axis operator++(Axis); + + + +#endif // AXES_HH diff --git a/flower/include/matrix-storage.hh b/flower/include/matrix-storage.hh index 5027b6f555..a48f87050c 100644 --- a/flower/include/matrix-storage.hh +++ b/flower/include/matrix-storage.hh @@ -12,6 +12,8 @@ #include "varray.hh" #include "real.hh" + +// oo, noo! #include "virtual-methods.hh" /** diff --git a/init/engraver.ly b/init/engraver.ly index 427fb4c410..401b4d59ce 100644 --- a/init/engraver.ly +++ b/init/engraver.ly @@ -3,39 +3,37 @@ % Staff = \translator { - \type "Engraver_group_engraver"; + \type "Engraver_group_engraver"; defaultclef = violin; - \consists "Bar_engraver"; - \consists "Clef_engraver"; - \consists "Key_engraver"; - \consists "Meter_engraver"; - \consists "Local_key_engraver"; - \consists "Staff_sym_engraver"; - \consists "Collision_engraver"; - \consists "Rest_collision_engraver"; - + \consists "Bar_engraver"; + \consists "Clef_engraver"; + \consists "Key_engraver"; + \consists "Meter_engraver"; + \consists "Local_key_engraver"; + \consists "Staff_sym_engraver"; + \consists "Collision_engraver"; + \consists "Rest_collision_engraver"; %{ - Uncomment to get bar numbers on single staff systems: - - The Bar_number_engraver puts a number over a staff created - at the same level of hierarchy. This why you have to add it - here separately if you want to have numbers on single staff - systems: The Bar_number_engraver in Score_engraver will only - put numbers on bars that are Score ("system") wide. Such - bars are only created when the toplevel system has multiple - children-staffs. + Uncomment to get bar numbers on single staff systems: + + The Bar_number_engraver puts a number over a staff created + at the same level of hierarchy. This why you have to add it + here separately if you want to have numbers on single staff + systems: The Bar_number_engraver in Score_engraver will only + put numbers on bars that are Score ("system") wide. Such + bars are only created when the toplevel system has multiple + children-staffs. %} - %{ - +%{ \consists "Bar_column_engraver"; \consists "Bar_number_engraver"; %} - \consists "Separating_line_group_engraver"; - \consists "Line_group_engraver"; + \consists "Separating_line_group_engraver"; + \consists "Line_group_engraver"; - \accepts "Voice"; + \accepts "Voice"; } Rhythmic_staff = \translator @@ -117,7 +115,7 @@ Score = \translator { \type Score_engraver; \consists "Timing_engraver"; - % uncomment to bar numbers on a whoole system. + % uncomment to bar numbers on a whole system. %{ \consists "Bar_column_engraver"; \consists "Bar_number_engraver"; diff --git a/input/slur-bug.ly b/input/slur-bug.ly new file mode 100644 index 0000000000..6de3788161 --- /dev/null +++ b/input/slur-bug.ly @@ -0,0 +1,9 @@ +% bug +% excentric slur can't handle this ... +\score{ + \melodic{ + \octave c; + \stemdown; + \[4/5c8( c ''f c c\]1/1 c c c )c | + } +} diff --git a/lily/bow.cc b/lily/bow.cc index 7f73df520c..9433f69a18 100644 --- a/lily/bow.cc +++ b/lily/bow.cc @@ -30,12 +30,6 @@ Bow::center () const return Offset (w/2,dy ); } -Real -Bow::height_f () const -{ - return 0; -} - Molecule* Bow::brew_molecule_p () const { @@ -59,3 +53,9 @@ Bow::brew_molecule_p () const return output; } +Real +Bow::height_f () const +{ + return 0; +} + diff --git a/lily/include/bow.hh b/lily/include/bow.hh index c2908836d5..88f96bc429 100644 --- a/lily/include/bow.hh +++ b/lily/include/bow.hh @@ -20,8 +20,9 @@ protected: Drul_array dy_f_drul_; Drul_array dx_f_drul_; - virtual Real height_f () const; virtual Molecule* brew_molecule_p () const; + virtual Real height_f () const; + public: Bow(); DECLARE_MY_RUNTIME_TYPEINFO; diff --git a/lily/include/curve.hh b/lily/include/curve.hh new file mode 100644 index 0000000000..a37be5c669 --- /dev/null +++ b/lily/include/curve.hh @@ -0,0 +1,38 @@ +/* + curve.hh -- declare point and curve + + (c) 1998 Jan Nieuwenhuizen +*/ + +#ifndef CURVE_HH +#define CURVE_HH + +#ifndef STANDALONE +#include "lily-proto.hh" +#endif + +#include "real.hh" + +#include "offset.hh" +#include "varray.hh" + +class Curve : public Array +{ +public: + void flipy (); + int largest_disturbing (); + void rotate (Real phi); + void translate (Offset o); + + void operator = (Array const & src) + { + Array::operator =(src); + } + void operator = (Curve const & src) + { + Array::operator =((Array)src); + } +}; + +#endif // CURVE_HH + diff --git a/lily/include/lookup.hh b/lily/include/lookup.hh index 9f7bb3f023..523a00b865 100644 --- a/lily/include/lookup.hh +++ b/lily/include/lookup.hh @@ -13,6 +13,7 @@ #include "fproto.hh" #include "scalar.hh" #include "direction.hh" +#include "curve.hh" /** handy interface to symbol table */ @@ -52,6 +53,7 @@ struct Lookup { Atom dots () const; Atom slur (Real &dy, Real &dx, Real ht, Direction dir) const; + Atom control_slur (Array controls, Real dx, Real dy) const; Atom plet (Real &dy, Real &dx, Direction dir) const; Atom tex_slur (int dy, Real &dx, Direction dir) const; Atom ps_slur (Real dy, Real dx, Real ht, Real dir) const; diff --git a/lily/include/slur-grav.hh b/lily/include/slur-grav.hh index 3eb6e182dc..a27e051895 100644 --- a/lily/include/slur-grav.hh +++ b/lily/include/slur-grav.hh @@ -18,13 +18,13 @@ class Slur_engraver :public Engraver { Direction dir_; protected: - virtual bool do_try_request (Request*); virtual void do_process_requests(); virtual void acknowledge_element (Score_elem_info); virtual void do_pre_move_processing(); virtual void do_post_move_processing(); virtual void do_removal_processing (); + public: TRANSLATOR_CLONE(Slur_engraver); Slur_engraver(); diff --git a/lily/include/slur.hh b/lily/include/slur.hh index 8d2212b294..e3df46d0ae 100644 --- a/lily/include/slur.hh +++ b/lily/include/slur.hh @@ -11,6 +11,7 @@ #include "lily-proto.hh" #include "parray.hh" #include "bow.hh" +#include "curve.hh" /** A #Bow# which tries to drape itself around the stems too. @@ -19,7 +20,12 @@ class Slur : public Bow { public: Link_array encompass_arr_; void add (Note_column*); + protected: + virtual Molecule* brew_molecule_p () const; + Array get_notes () const; + Array get_controls () const; + virtual void set_default_dir(); virtual void do_post_processing(); virtual void do_add_processing (); -- 2.39.5