From d60fb126171d397f46466f216dffc08de86e739d Mon Sep 17 00:00:00 2001
From: fred <fred>
Date: Tue, 26 Mar 2002 21:47:00 +0000
Subject: [PATCH] lilypond-1.1.30

---
 input/test/slur-follow-music.sly | 15 +++++++++++++++
 lily/include/direction.hh        | 13 +++++++++++++
 lily/main.cc                     | 17 ++++++++++-------
 ly/GNUmakefile                   |  2 +-
 ly/init.sly                      | 16 ++++++++++++++++
 ly/params.ly                     |  3 +++
 make/mutopia-vars.make           |  9 ++++++---
 7 files changed, 64 insertions(+), 11 deletions(-)
 create mode 100644 input/test/slur-follow-music.sly
 create mode 100644 ly/init.sly

diff --git a/input/test/slur-follow-music.sly b/input/test/slur-follow-music.sly
new file mode 100644
index 0000000000..bc28469520
--- /dev/null
+++ b/input/test/slur-follow-music.sly
@@ -0,0 +1,15 @@
+% CASE 3
+d''4 ( ) b a ( ) e' \break
+g,( \stemdown ) b \stemboth c ( ) f, \break
+
+% no adjusting...
+\stemup [d'8 ( b a] \stemboth ) e' \break
+\stemup [g,8 ( b d] \stemboth ) c \break
+
+% still ugly
+g4 ( b d ) c \break
+
+%TIES
+d ~ b a ~ e' \break
+g, ~ \stemdown b \stemboth c ~ f, \break
+
diff --git a/lily/include/direction.hh b/lily/include/direction.hh
index 8a59ac52f7..3b2029d3c8 100644
--- a/lily/include/direction.hh
+++ b/lily/include/direction.hh
@@ -27,6 +27,19 @@ enum Direction
   STOP = 1
 };
 
+inline Direction
+other_dir (Direction const d)
+{
+  return (Direction)(-d);
+}
+
+inline Direction
+operator - (Direction const d)
+{
+  return other_dir (d);
+}
+
+// huh?
 inline Direction
 flip (Direction *i) {
   if (*i == (Direction)1)
diff --git a/lily/main.cc b/lily/main.cc
index e8e55b5baf..9de98a4bc2 100644
--- a/lily/main.cc
+++ b/lily/main.cc
@@ -164,7 +164,7 @@ about ()
   cout << _ ("GNU LilyPond is Free software, see --warranty");
   cout << '\n';
   cout << '\n';
-  cout << _f ("Copyright (c) %s by", "1996, 1997, 1998");
+  cout << _f ("Copyright (c) %s by", "1996--1999");
   cout << '\n';
   cout << "  " + _ ("Han-Wen Nienhuys <hanwen@cs.uu.nl>") + "\n";
   cout << "  " + _ ("Jan Nieuwenhuizen <janneke@gnu.org>") + "\n";
@@ -177,7 +177,7 @@ notice ()
   cout << '\n';
   cout << _ ("GNU LilyPond -- The GNU Project music typesetter");
   cout << '\n';
-  cout << _f ("Copyright (c) %s by", "1996, 1997, 1998");
+  cout << _f ("Copyright (c) %s by", "1996--1999");
   cout << '\n';
   cout << "  " + _ ("Han-Wen Nienhuys <hanwen@cs.uu.nl>") + "\n";
   cout << "  " + _ ("Jan Nieuwenhuizen <janneke@gnu.org>") + "\n";
@@ -401,12 +401,15 @@ distill_inname_str (String name_str, String& ext_r)
 	  split_path (str,a,b,c,ext_r);
 
 	  // add extension if not present.
-	  // UGH. Should parametrise in list of default extensions.
-	  if (ext_r.empty_b ())
+	  char const* extensions[] = {"", "", ".ly", ".fly", ".sly", 0};
+	  extensions[0] = ext_r.ch_C ();
+	  for (int i = 0; extensions[i]; i++)
 	    {
-	      ext_r = ".fly";
-	      if (global_path.find (a+b+c+ext_r).empty_b ())
-		ext_r = ".ly";
+	      if (!global_path.find (a+b+c+extensions[i]).empty_b ())
+		{
+		  ext_r = extensions[i];
+		  break;
+		}
 	    }
 	  str = a+b+c+ext_r;
 	}
diff --git a/ly/GNUmakefile b/ly/GNUmakefile
index 6513297576..dda5863d26 100644
--- a/ly/GNUmakefile
+++ b/ly/GNUmakefile
@@ -2,7 +2,7 @@
 
 depth = ..
 
-INI_FILES = $(FLY_FILES) $(LY_FILES)
+INI_FILES = $(FLY_FILES) $(SLY_FILES) $(LY_FILES)
 EXTRA_DIST_FILES = $(SCM_FILES)
 
 INSTALLATION_DIR=$(datadir)/ly/
diff --git a/ly/init.sly b/ly/init.sly
new file mode 100644
index 0000000000..e2ebe1905d
--- /dev/null
+++ b/ly/init.sly
@@ -0,0 +1,16 @@
+% Toplevel initialisation file. 
+	
+\version "1.0.14";
+
+
+\include "declarations.ly"
+
+\score { 
+  \notes\relative c {
+    \maininput
+  }
+  \paper {
+    linewidth=-1.0;
+  }  
+  \midi{ }
+}
diff --git a/ly/params.ly b/ly/params.ly
index f434d57cf4..8be7f2a9b2 100644
--- a/ly/params.ly
+++ b/ly/params.ly
@@ -70,6 +70,9 @@ slur_x_minimum = 3.0 * \interline;
 % slope damping: keep dy/dx < slur_slope_damping
 slur_slope_damping = 0.6;
 
+% dy_slur := dy_music * factor
+slur_slope_follow_music_factor = 0.8;
+
 tie_x_minimum = \slur_x_minimum;
 tie_x_gap = \slur_x_gap;
 tie_slope_damping = 0.8;
diff --git a/make/mutopia-vars.make b/make/mutopia-vars.make
index d140f286cf..154917110b 100644
--- a/make/mutopia-vars.make
+++ b/make/mutopia-vars.make
@@ -2,18 +2,21 @@
 # UGH UGH
 include $(make-dir)/lilypond-vars.make
 
-FLY_FILES = $(wildcard *.fly)
 LY_FILES = $(wildcard *.ly)
+FLY_FILES = $(wildcard *.fly)
+SLY_FILES = $(wildcard *.sly)
+
 M4_FILES = $(wildcard *.m4)
 LYM4_FILES = $(wildcard *.lym4)
-EXTRA_DIST_FILES += $(FLY_FILES) $(LY_FILES) $(M4_FILES) $(LYM4_FILES)
+EXTRA_DIST_FILES += $(FLY_FILES) $(SLY_FILES) $(LY_FILES) $(M4_FILES) $(LYM4_FILES)
 
 # WWW.make
 
 ly_examples=$(addprefix $(outdir)/, $(addsuffix .ly.txt, $(examples)))
 fly_examples=$(addprefix $(outdir)/, $(addsuffix .fly.txt, $(flexamples)))
+sly_examples=$(addprefix $(outdir)/, $(addsuffix .sly.txt, $(slexamples)))
 
-all_examples=$(flexamples) $(examples)
+all_examples=$(flexamples) $(slexamples) $(examples)
 
 ps_examples=$(addprefix $(outdir)/, $(addsuffix .ps.gz, $(all_examples)))
 gif_examples=$(addprefix $(outdir)/, $(addsuffix .gif, $(all_examples)))
-- 
2.39.5