]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.5.2
authorfred <fred>
Wed, 27 Mar 2002 01:20:29 +0000 (01:20 +0000)
committerfred <fred>
Wed, 27 Mar 2002 01:20:29 +0000 (01:20 +0000)
59 files changed:
Documentation/user/lilypond-book.itely
Documentation/user/ly2dvi.itexi
Documentation/user/refman.itely
Documentation/windows/compiling.texi
Documentation/windows/cygwin-installer.patch
aclocal.m4
config.hh.in
lily/all-font-metrics.cc
lily/auto-beam-engraver.cc
lily/break-align-item.cc
lily/cxx-function-smob.cc
lily/duration.cc
lily/font-interface.cc
lily/font-metric.cc
lily/grob.cc
lily/include/grob.hh
lily/include/lily-guile.hh
lily/include/ly-smobs.icc
lily/include/scm-hash.hh
lily/include/smobs.hh
lily/input-smob.cc
lily/item.cc
lily/key-performer.cc
lily/lily-guile.cc
lily/line-of-score.cc
lily/midi-item.cc
lily/molecule.cc
lily/moment.cc
lily/music-output-def.cc
lily/music-sequence.cc
lily/music.cc
lily/my-lily-lexer.cc
lily/note-head.cc
lily/paper-def.cc
lily/paper-outputter.cc
lily/part-combine-music-iterator.cc
lily/pitch.cc
lily/property-engraver.cc
lily/protected-scm.cc
lily/scm-option.cc
lily/score.cc
lily/scores.cc
lily/slur.cc
lily/spanner.cc
lily/staff-performer.cc
lily/stem.cc
lily/translator-def.cc
lily/translator-group.cc
ly/params-init.ly
mf/feta-params.mf
scm/ascii-script.scm
scm/drums.scm
scm/interface-description.scm
scm/lily.scm
scm/pdf.scm
scm/pdftex.scm
scm/ps.scm
scm/tex.scm
stepmake/aclocal.m4

index bc6970952489d95c87cc287175da54155589ad9b..0250be706627023ea9241deaf9802bde2cd11a1a 100644 (file)
@@ -223,6 +223,11 @@ of the code is used.
 @item printfilename
     Prints the file name before the music example. Useful in conjunction
 with @code{\lilypondfile}.
+@item relative, relative @var{N}
+    Use relative octave mode. By default, notes are specified relative 
+    central C. The optional integer argument specifies how many octaves 
+    higher (positive number) or lower (negative number) to place the 
+    starting note.
 @end table
 
 @section Invocation
index 5e4f97c6c2c74e8fee6012a663495c8555e36086..9f91398699d67268ca0331aa64c94bf854cf3b70 100644 (file)
@@ -138,6 +138,9 @@ block.
 @item papersize
    The paper size (as a name, e.g. @code{a4}). It is normally read from
 the @code{\paper} block.
+
+@item pagenumber
+   If set to @code{no}, no page numbers will be printed.
 @end table
 
 @unnumberedsubsec Environment variables
index 7a4bc4379b6da4f9e9d9350ada2a29eff7b62774..7ca511494d236711cdac3e7ec09aaf4de4a48a05 100644 (file)
@@ -395,7 +395,7 @@ should last.  With this, you can make lots of tuplets while typing
 
 @lilypond[fragment,  relative, singleline, verbatim]
 \property Voice.tupletSpannerDuration = #(make-moment 1 4)
-\times 2/3 { c''8 c c c c c }
+\times 2/3 { c'8 c c c c c }
 @end lilypond
 
 The format of the number is determined by the property
@@ -975,7 +975,7 @@ after the last note:
 
 @lilypond[fragment,relative,verbatim]
   \context Staff {
-    r4 [r8 g'' a r8] r8 [g | a] r8
+    r4 [r8 g' a r8] r8 [g | a] r8
   }
 @end lilypond
 Whenever an manual beam is busy, the automatic beamer will not produce
@@ -991,7 +991,7 @@ property, it's value will be used only once, and then it is erased.
 
 @lilypond[fragment,relative,verbatim]
   \context Staff {
-    [f'8 r16 f g a]
+    [f8 r16 f g a]
     [f8 r16 \property Voice.stemLeftBeamCount = #1 f g a]
   }
 @end lilypond
@@ -1009,7 +1009,7 @@ Set @code{height} to zero, to get horizontal beams:
 @lilypond[fragment,relative,verbatim]
   \property Voice.Beam \set #'direction = #1
   \property Voice.Beam \set #'height = #0
-  [a''8 e' d c]
+  [a'8 e' d c]
 @end lilypond
 
 Here's how you'd specify a weird looking beam that instead of being
@@ -1018,7 +1018,7 @@ horizontal, falls two staff spaces:
 @lilypond[fragment,relative,verbatim]
   \property Voice.Beam \set #'staff-position = #4
   \property Voice.Beam \set #'height = #-4
-  [c'8 c] 
+  [c8 c] 
 @end lilypond
 @cindex @code{default-neutral-direction}
 
@@ -1055,7 +1055,7 @@ pair of symbols, specifying the attachment type of the left and right end points
 @lilypond[fragment,relative,verbatim]
   \property Voice.Slur \set #'direction = #1
   \property Voice.Stem \set #'length = #5.5
-  g''8(g)g4
+  g'8(g)g4
   \property Voice.Slur \set #'attachment = #'(stem . stem)
   g8(g)g4
 @end lilypond
@@ -1067,7 +1067,7 @@ stems might look better:
 @lilypond[fragment,relative,verbatim]
   \property Voice.Stem \set #'direction = #1
   \property Voice.Slur \set #'direction = #1
-  d'32( d'4 )d8..
+  d32( d'4 )d8..
   \property Voice.Slur \set #'attachment = #'(stem . stem)
   d,32( d'4 )d8..
 @end lilypond
@@ -1085,7 +1085,7 @@ indicate this preference by increasing the @code{beautiful} value:
 @lilypond[verbatim,singleline,relative]
   \property Voice.Beam \override #'direction = #-1
   \property Voice.Slur \override #'direction = #1
-  c'16( a' f' a a f a, )c,
+  c16( a' f' a a f a, )c,
   c( a' f' a a f d, )c
   \property Voice.Slur \override #'beautiful = #5.0
   c( a' f' a a f d, )c
@@ -1109,7 +1109,7 @@ indicate a musical sentence. It is started using @code{\(} and @code{\)}
 respectively.
 
 @lilypond[fragment,verbatim,center,relative]
-  \time 6/4 c'' \( ( d ) e f ( e ) \) d
+  \time 6/4 c' \( ( d ) e f ( e ) \) d
 @end lilypond
 
 Typographically, the phrasing slur behaves almost exactly like a normal
@@ -1398,7 +1398,7 @@ A glissando line (grob @code{Voice.Glissando}) can be requested by attaching a
 @code{\glissando} to a note:
 
 @lilypond[fragment,relative,verbatim]
-  c''-\glissando c'
+  c'-\glissando c'
 @end lilypond
 
 @refbugs
@@ -1440,7 +1440,7 @@ note: @code{c4-\ff}.  The available dynamic marks are: @code{\ppp},
 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}.
 
 @lilypond[verbatim,singleline,fragment,relative]
-  c''\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
+  c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
   c2\sf c\rfz
 @end lilypond
 
@@ -1478,7 +1478,7 @@ is an example how to do it:
   \context Voice {
     \property Voice.crescendoText = "cresc."
     \property Voice.crescendoSpanner = #'dashed-line
-    a''2\mf\< a a \!a 
+    a'2\mf\< a a \!a 
   }
 @end lilypond
 
@@ -1858,7 +1858,7 @@ You can specify an arpeggio sign on a chord by attaching an
 
 
 @lilypond[fragment,relative,verbatim]
-  \context Voice <c'\arpeggio e g c>
+  \context Voice <c\arpeggio e g c>
 @end lilypond
 
 When an arpeggio crosses staffs in piano music, you attach an arpeggio
@@ -1868,7 +1868,7 @@ to the chords in both staffs, and set
 @lilypond[fragment,relative,verbatim]
   \context PianoStaff <
     \property PianoStaff.connectArpeggios = ##t
-    \context Voice = one  { <c''\arpeggio e g c> }
+    \context Voice = one  { <c'\arpeggio e g c> }
     \context Voice = other { \clef bass  <c,,\arpeggio e g>}
   >  
 @end lilypond
@@ -1900,7 +1900,7 @@ can be printed automatically. This is enabled if the property
   \context PianoStaff <
     \property PianoStaff.followVoice = ##t
     \context Staff \context Voice {
-      c'1
+      c1
       \translator Staff=two
       b2 a
     }
@@ -3247,7 +3247,7 @@ commands won't work with direct PostScript output (see @ref{PostScript
 output}).
 
 @lilypond[fragment,relative,verbatim]
-  a''^"3 $\\times$ \\`a deux"
+  a'^"3 $\\times$ \\`a deux"
 @end lilypond
 
 You can also use raw PostScript commands embedded in text scripts.  This
index dc2b06439d9ff8913eefe56b5e0cf41acab13caa..8332a24e1de7cef3a539766543ef49011d27b2fb 100644 (file)
@@ -40,14 +40,14 @@ needs a number of extra tricks.  All code for these tricks can be found
 in the source package directory @file{Documentation/windows}.
 
 @table @asis
-@item @var{guile-1.4-gnu-windows.patch}
+@item @file{guile-1.4-gnu-windows.patch}
 You may (Cygwin gets better every day) need this patch to compile GUILE.
-@item @var{cygwin-installer.patch}
+@item @file{cygwin-installer.patch}
 Apply this patch to the @file{cinstall} directory of
 @file{winsup-src/cinstall}, to get the LilyPond installer.
 
 Compiling @file{setup.exe} has been complicated a bit with the
-introduction of the non-feature bzip2.  Here's how I did it:
+introduction of the bzip2 feature:
 @quotation
 @example
     tar xjf cygwin-src-20010531.tar.bz2 
@@ -55,16 +55,17 @@ introduction of the non-feature bzip2.  Here's how I did it:
     tar xzf mingw-20010424-1.tar.gz
     cd winsup/cinstall
     patch < ../../cygwin-installer.patch
-    cp /home/cygwin/cygwin-1.3.2/usr/lib/mingw/crt2.o .
-    cd ../bzip
+    cd ../bz2lib
     MINGW32=yes CFLAGS='-mno-cygwin' ./configure
     make
     cd -
+    MINGW32=yes CFLAGS='-mno-cygwin' ./configure
+    cp /home/cygwin/cygwin-1.3.2/usr/lib/mingw/crt2.o .
     make w32api_lib=/home/cygwin/cygwin-1.3.2/usr/lib/w32api \
         CXX='g++ -L/home/cygwin/cygwin-1.3.2/usr/lib/mingw'
 @end example
 @end quotation
-@item @var{--prefix=/usr/lilypond-x.y.x}
+@item @file{--prefix=/usr/lilypond-x.y.x}
 The standard binary installation installs LilyPond into its own prefix.
 We think it's silly, but do this is on special request of Windows users.
 @item @file{fix-suffixes.sh}
index 11bac9d2699c91abb90314a0272204de2a7212c0..91fd1871fcd91ecdf0aaaee479c18b8447f9930c 100644 (file)
@@ -40,7 +40,7 @@ diff -urN ../cinstall/desktop.cc ./desktop.cc
  static void
 +make_lily_bat ()
 +{
-+  batname = backslash (concat (root_dir, "/lilypond.bat", 0));
++  batname = backslash (concat (get_root_dir (), "/lilypond.bat", 0));
 +
 +  /* if the batch file exists, don't overwrite it */
 +  if (_access (batname, 0) == 0)
@@ -52,8 +52,8 @@ diff -urN ../cinstall/desktop.cc ./desktop.cc
 +
 +  fprintf (bat, "@echo off\n\n");
 +
-+  fprintf (bat, "%.2s\n", root_dir);
-+  fprintf (bat, "chdir %s\n\n", backslash (concat (root_dir+2, "/bin", 0)));
++  fprintf (bat, "%.2s\n", get_root_dir ());
++  fprintf (bat, "chdir %s\n\n", backslash (concat (get_root_dir ()+2, "/bin", 0)));
 +
 +  /* fprintf (bat, "bash --rcfile /bin/lilypond-profile\n"); */
 +  fprintf (bat, "bash --login -i\n");
@@ -64,7 +64,7 @@ diff -urN ../cinstall/desktop.cc ./desktop.cc
 +static void
  make_etc_profile ()
  {
-   char *fname = concat (root_dir, "/etc/profile", 0);
+   char *fname = concat (get_root_dir (), "/etc/profile", 0);
 @@ -299,11 +321,11 @@
  }
  
@@ -72,8 +72,8 @@ diff -urN ../cinstall/desktop.cc ./desktop.cc
 -save_icon ()
 +save_icon (char* iconfile, char* iconres)
  {
--  iconname = backslash (concat (root_dir, "/cygwin.ico", 0));
-+  iconname = backslash (concat (root_dir, iconfile, 0));
+-  iconname = backslash (concat (get_root_dir (), "/cygwin.ico", 0));
++  iconname = backslash (concat (get_root_dir (), iconfile, 0));
  
 -  HRSRC rsrc = FindResource (NULL, "CYGWIN.ICON", "FILE");
 +  HRSRC rsrc = FindResource (NULL, iconres, "FILE");
index a7d59a36f0b9945b71d00fa272ed3aceff9cee94..720f2db6296b7a59fe15bcdc0c6cadad6898c54f 100644 (file)
@@ -203,9 +203,15 @@ else {last =0}}
     then
         AC_STEPMAKE_WARN("Guile version "$need_guile_version" or newer is needed")
     fi
+    changequote(<<, >>)dnl
+    GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'`
+    GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'`
+    changequote([, ])dnl
     GUILE_FLAGS
     AC_PATH_PROG(GUILE, guile, error)
     AC_SUBST(GUILE)
+    AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, $GUILE_MAJOR_VERSION)
+    AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, $GUILE_MINOR_VERSION)
 ])
 
 AC_DEFUN(AC_STEPMAKE_INIT, [
index e6a8195c5da57eb4dd22d35a4824e0c3b4b3824e..04d22f741f250f8c4770d6e877b429633d6c7edb 100644 (file)
@@ -56,3 +56,9 @@
 
 /* define if you have sys/stat.h */
 #define STAT_MACROS_BROKEN 0
+
+/* define GUILE major version */
+#define GUILE_MAJOR_VERSION 0
+
+/* define GUILE minor version */
+#define GUILE_MINOR_VERSION 0
index 6d728efd0a2dcc90084c6551bdecc75cbf8366b9..61a66c33bcb78407ca4673cb9b95699b7c3e48ed 100644 (file)
@@ -30,8 +30,8 @@ All_font_metrics::All_font_metrics (String path)
 
 All_font_metrics::~All_font_metrics ()
 {
-  scm_unprotect_object (afm_p_dict_->self_scm ());
-  scm_unprotect_object (tfm_p_dict_->self_scm ());
+  scm_gc_unprotect_object (afm_p_dict_->self_scm ());
+  scm_gc_unprotect_object (tfm_p_dict_->self_scm ());
 }
 
 Adobe_font_metric *
@@ -72,7 +72,7 @@ All_font_metrics::find_afm (String name)
 
       afm_p_dict_->set (sname,val);
 
-      scm_unprotect_object (val);
+      scm_gc_unprotect_object (val);
 
 
       Adobe_font_metric *afm
@@ -145,7 +145,7 @@ All_font_metrics::find_tfm (String name)
       unsmob_metrics (val)->description_ = gh_cons (name_str, gh_double2scm (1.0));
       tfm_p_dict_->set (sname, val);
 
-      scm_unprotect_object (val);
+      scm_gc_unprotect_object (val);
     }
 
   return
index 31e26d349c4d7eec324dbf32c5fff42c1dd84a7f..58f289b822f0dcb231a1d5cd396acd5f764f9bff 100644 (file)
@@ -231,7 +231,7 @@ Auto_beam_engraver::create_beam_p ()
        */
       if (Stem::beam_l ((*stem_l_arr_p_)[i]))
        {
-         scm_unprotect_object (beam_p->self_scm ());
+         scm_gc_unprotect_object (beam_p->self_scm ());
          return 0;
        }
       Beam::add_stem (beam_p, (*stem_l_arr_p_)[i]);
index 8bad438909f989ab913608e8ea407274a2d71880..28b93b81848a9ff53da0784c53ca99255bd021ec 100644 (file)
@@ -122,7 +122,7 @@ Break_align_interface::do_alignment (Grob *me)
        next_origin = ly_symbol2scm ("begin-of-note");
 
       SCM alist = me->get_grob_property ("space-alist");
-      SCM e = scm_assoc (scm_listify (current_origin,
+      SCM e = scm_assoc (scm_list_n (current_origin,
                                      next_origin,
                                      SCM_UNDEFINED), alist);
           
@@ -136,7 +136,7 @@ Break_align_interface::do_alignment (Grob *me)
          warning (_f ("unknown spacing pair `%s', `%s'",
                       ly_symbol2string (current_origin),
                       ly_symbol2string (next_origin)));
-         extra_space = scm_listify (ly_symbol2scm ("minimum-space"), gh_double2scm (0.0), SCM_UNDEFINED);
+         extra_space = scm_list_n (ly_symbol2scm ("minimum-space"), gh_double2scm (0.0), SCM_UNDEFINED);
        }
 
       SCM symbol = gh_car (extra_space);
index f0d5beec1f952d6b087d1b9d5ffeb82bcf95b839..b17c4cb38aa2fa67b6589ee28e430c30c6b57894 100644 (file)
@@ -10,7 +10,7 @@
 #include "cxx-function-smob.hh"
 #include "ly-smobs.icc"
 
-static long callback_tag;
+static scm_t_bits callback_tag;
 
 static
 SCM mark_smob (SCM)
@@ -25,8 +25,8 @@ print_smob (SCM, SCM port, scm_print_state *)
   return 1;
 }
 
-static
-scm_sizet free_smob (SCM)
+static size_t
+free_smob (SCM)
 {
   return 0;
 }
@@ -35,16 +35,19 @@ scm_sizet free_smob (SCM)
 SCM
 cxx_function_type_p (SCM x)
 {
-  return (SCM_CELL_TYPE (x) == callback_tag) ? SCM_BOOL_T : SCM_BOOL_F; 
+  return (SCM_CELL_TYPE (x)) == callback_tag ? SCM_BOOL_T : SCM_BOOL_F; 
 }
 
 void init_cxx_function_smobs ()
 {
-  callback_tag = scm_make_smob_type_mfpe ("callback", 0,
-                                         mark_smob, free_smob,
-                                         print_smob, 0);
+  callback_tag = scm_make_smob_type ("callback", 0);
+  scm_set_smob_mark (callback_tag, mark_smob);
+  scm_set_smob_free (callback_tag, free_smob);
+  scm_set_smob_print (callback_tag, print_smob);
+  scm_set_smob_equalp (callback_tag, 0);
 
-  scm_make_gsubr ("c++-function?", 1, 0, 0, (Scheme_function_unknown) cxx_function_type_p);
+  scm_c_define_gsubr ("c++-function?", 1, 0, 0,
+                     (Scheme_function_unknown) cxx_function_type_p);
 }
 
 SCM
index c0a97084bf4befa0eb6bc69ff2c4aa466f47c82b..38cb80f6ca1ae2ba244239255d77e3b803c190e6 100644 (file)
@@ -139,7 +139,8 @@ make_duration (SCM l, SCM d)
 static void
 add_funcs ()
 {
-  scm_make_gsubr ("make-duration", 2, 0, 0, (Scheme_function_unknown)make_duration);
+  scm_c_define_gsubr ("make-duration", 2, 0, 0,
+                     (Scheme_function_unknown)make_duration);
 }
 
 ADD_SCM_INIT_FUNC (duration, add_funcs);
index f801cefa01f59c23eebaa86d21a7bbb9bfca512e..0ea3bf7675d25375b7fff9a8e0c4b39ba7fef038 100644 (file)
@@ -144,7 +144,8 @@ init_syms ()
   design_sz_sym = scm_permanent_object (ly_symbol2scm ("font-design-size"));
   wild_sym = scm_permanent_object (ly_symbol2scm ("*"));
 
-  scm_make_gsubr ("ly-get-default-font", 1 , 0, 0, (Scheme_function_unknown) ly_font_interface_get_default_font);
+  scm_c_define_gsubr ("ly-get-default-font", 1 , 0, 0,
+                     (Scheme_function_unknown) ly_font_interface_get_default_font);
 }
 
 
index 930d5f3b2ce3795a574e3b967d7b650409659c10..4f5ba93be862b6027f7352e5c7d024beec5132f5 100644 (file)
@@ -151,7 +151,8 @@ ly_find_glyph_by_name (SCM font, SCM name)
 static void
 font_metric_init ()
 {
-   scm_make_gsubr ("ly-find-glyph-by-name", 2 , 0, 0, (Scheme_function_unknown) ly_find_glyph_by_name);
+   scm_c_define_gsubr ("ly-find-glyph-by-name", 2 , 0, 0,
+                      (Scheme_function_unknown) ly_find_glyph_by_name);
 }
 
 ADD_SCM_INIT_FUNC (font_metric_init, font_metric_init);
index f6c84bc079e0df7650fc0a1d45e2e76f282e1aff..abbe22874bd2ba68630cda5af3e2117c1dbccf2c 100644 (file)
@@ -49,7 +49,7 @@ Grob::Grob (SCM basicprops)
    */
 
   pscore_l_=0;
-  status_i_ = 0;
+  status_c_ = 0;
   original_l_ = 0;
   immutable_property_alist_ =  basicprops;
   mutable_property_alist_ = SCM_EOL;
@@ -97,7 +97,7 @@ Grob::Grob (Grob const&s)
   immutable_property_alist_ = s.immutable_property_alist_;
   mutable_property_alist_ = SCM_EOL;
   
-  status_i_ = s.status_i_;
+  status_c_ = s.status_c_;
   pscore_l_ = s.pscore_l_;
 
   smobify_self ();
@@ -222,18 +222,16 @@ Grob::paper_l ()  const
 void
 Grob::calculate_dependencies (int final, int busy, SCM funcname)
 {
-  assert (status_i_ >=0);
-
-  if (status_i_ >= final)
+  if (status_c_ >= final)
     return;
 
-  if (status_i_== busy)
+  if (status_c_== busy)
     {
       programming_error ("Element is busy, come back later");
       return;
     }
   
-  status_i_= busy;
+  status_c_= busy;
 
   for (SCM d=  get_grob_property ("dependencies"); gh_pair_p (d); d = gh_cdr (d))
     {
@@ -247,7 +245,7 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname)
   if (gh_procedure_p (proc))
     gh_call1 (proc, this->self_scm ());
   
-  status_i_= final;
+  status_c_= final;
 
 }
 
@@ -866,9 +864,12 @@ init_functions ()
 {
   interfaces_sym = scm_permanent_object (ly_symbol2scm ("interfaces"));
 
-  scm_make_gsubr ("ly-get-grob-property", 2, 0, 0, (Scheme_function_unknown)ly_get_grob_property);
-  scm_make_gsubr ("ly-set-grob-property", 3, 0, 0, (Scheme_function_unknown)ly_set_grob_property);
-  scm_make_gsubr ("ly-get-spanner-bound", 2 , 0, 0, (Scheme_function_unknown) spanner_get_bound);
+  scm_c_define_gsubr ("ly-get-grob-property", 2, 0, 0,
+                     (Scheme_function_unknown)ly_get_grob_property);
+  scm_c_define_gsubr ("ly-set-grob-property", 3, 0, 0,
+                     (Scheme_function_unknown)ly_set_grob_property);
+  scm_c_define_gsubr ("ly-get-spanner-bound", 2 , 0, 0,
+                     (Scheme_function_unknown) spanner_get_bound);
 }
 
 bool
index 2de2b88fc2e11e073f8cb9bac96d50e3c5262e59..e1820f9d07985580014ece3c681ed4edc651eefe 100644 (file)
@@ -46,7 +46,7 @@ public:
 
     0 means ORPHAN,
    */
-  char status_i_;
+  char status_c_;
   String name () const;
 
   /*
@@ -89,7 +89,7 @@ public:
  
   /**
      Recursively track all dependencies of this Grob.  The
-     status_i_ field is used as a mark-field.  It is marked with
+     status_c_ field is used as a mark-field.  It is marked with
      #busy# during execution of this function, and marked with #final#
      when finished.
 
index fecff2483d6336cc66539bf7a06fbb4eddae999e..0dc9e3406e67787caa3a25a9ddf04c42b73d3fde 100644 (file)
 
 #include <guile/gh.h>
 #include <libguile.h>
+#include "config.h"
 
+/* Guile 1.3.4 compatibility */
+#if GUILE_MINOR_VERSION < 4
 #define fix_guile_1_3_4_scm_puts(scm_data, port) scm_puts ((char*)scm_data, port)
 #define scm_puts(scm_data, port) fix_guile_1_3_4_scm_puts (scm_data, port)
+#endif
+
+/* Guile 1.4.x compatibility */
+#if GUILE_MINOR_VERSION < 5
+
+#define scm_t_bits scm_bits_t
+
+#define fix_guile_1_4_gh_scm2newstr(str, lenp) gh_scm2newstr (str, (int*)lenp)
+#define gh_scm2newstr(str, lenp) fix_guile_1_4_gh_scm2newstr (str, lenp)
+
+#define fix_guile_1_4_scm_primitive_eval(form) scm_eval_3 (form, 1, SCM_EOL)
+#define scm_primitive_eval(form) fix_guile_1_4_scm_primitive_eval (form)
+
+#define scm_c_define_gsubr scm_make_gsubr
+#define scm_c_memq scm_sloppy_memq
+#define scm_gc_protect_object scm_protect_object
+#define scm_gc_unprotect_object scm_unprotect_object
+#define scm_list_n scm_listify
+#define SCM_STRING_CHARS SCM_CHARS
+#define SCM_STRING_LENGTH SCM_LENGTH
+#endif
+
+
 
 #include "direction.hh"
 #include "flower-proto.hh"
index 0405b9c5066a77bc3a518759223e7f46cd2ce583..69c7d2ecfe633c5da76a089fe6cff73b838d1594 100644 (file)
@@ -23,7 +23,7 @@ return  CL::unsmob (s);                               \
 #define IMPLEMENT_TYPE_P(CL, FUNCNAME)\
 void init_type_p_ ## CL ()\
 {\
-  scm_make_gsubr (FUNCNAME, 1, 0, 0, (Scheme_function_unknown) CL::smob_p);\
+  scm_c_define_gsubr (FUNCNAME, 1, 0, 0, (Scheme_function_unknown) CL::smob_p);\
 }\
 ADD_SCM_INIT_FUNC (init_type_p_ ## CL, init_type_p_ ## CL)
 
@@ -37,7 +37,7 @@ ADD_SCM_INIT_FUNC (init_type_p_ ## CL, init_type_p_ ## CL)
 
 
 #define IMPLEMENT_SIMPLE_SMOBS(CL)                             \
-long CL::smob_tag_;                                            \
+scm_t_bits CL::smob_tag_;                                       \
 SCM                                                            \
 CL::smob_p (SCM s)                                             \
 {                                                              \
@@ -50,15 +50,17 @@ CL::smob_p (SCM s)                                          \
 void                                                           \
 CL::init_smobs ()                                              \
 {                                                              \
-  smob_tag_ = scm_make_smob_type_mfpe (                                \
-     #CL, 0, CL::mark_smob, CL::free_smob, CL::print_smob,     \
-     CL::equal_p);                                              \
+  smob_tag_ = scm_make_smob_type (#CL, 0);                      \
+  scm_set_smob_mark (smob_tag_, CL::mark_smob);                 \
+  scm_set_smob_free (smob_tag_, CL::free_smob);                 \
+  scm_set_smob_print (smob_tag_, CL::print_smob);               \
+  scm_set_smob_equalp (smob_tag_, CL::equal_p);                 \
 }                                                              \
 SCM CL::smobbed_self () const                                  \
 {                                                              \
   SCM s;                                                       \
   s = gh_cons (SCM_PACK (CL::smob_tag_), SCM_PACK (this));     \
-  scm_done_malloc (sizeof (CL));                                       \
+  scm_done_malloc (sizeof (CL));                               \
                                                                \
   return s;                                                    \
 }                                                              \
@@ -70,7 +72,7 @@ CL::unsmob (SCM s)                                            \
   else                                                         \
     return 0;                                                  \
 }                                                              \
-scm_sizet                                                      \
+size_t                                                         \
 CL::free_smob (SCM ses)                                                \
 {                                                              \
   CL * s = (CL*) SCM_CDR (ses);                                        \
@@ -85,7 +87,7 @@ SCM                                                                           \
 CL::smobify_self ()                                                            \
 {                                                                              \
   SCM s =   unprotected_smobify_self ();\
-  scm_protect_object (s);\
+  scm_gc_protect_object (s);\
   return s;\
 }\
 SCM                                                                            \
index c2169f3fdb739d726f830038011be658ddb05c07..5b50c22c0179833f3bb5250f2d09e67a5c3b97a4 100644 (file)
@@ -45,7 +45,7 @@ typedef std::map<SCM,SCM, SCM_less> Scm_stl_map;
 
    2. UPON DESTRUCTION, DO
 
-   scm_unprotect_object (tab->self_scm_);
+   scm_gc_unprotect_object (tab->self_scm_);
 
 
 
index 45be2c08ae65cdb4fbbd377ea74ee2f03de654a7..a29547361678655216db03a42f27097a860682de 100644 (file)
@@ -75,7 +75,7 @@
 
    class Bla {
    Csmob *ptr;
-   ~Bla () {  scm_unprotect_object (ptr->self_scm_); }
+   ~Bla () {  scm_gc_unprotect_object (ptr->self_scm_); }
    
    };
 
@@ -104,9 +104,9 @@ protected: \
        friend class Non_existant_class ; \
        SCM smobbed_self () const; \
 private:\
-       static long smob_tag_;                                  \
+       static scm_t_bits smob_tag_;                            \
        static SCM mark_smob (SCM);                             \
-       static scm_sizet free_smob (SCM s);                     \
+       static size_t free_smob (SCM s);                        \
        static int print_smob (SCM s, SCM p, scm_print_state*); \
 public: \
        static SCM equal_p (SCM a, SCM b);\
index 5b6ad8b779604e1ccf5b0f4bd51441ef20f2c648..bd7061a3d08405ad0c43e5988ad77a1eaaa204ee 100644 (file)
@@ -28,8 +28,8 @@ print_smob (SCM s, SCM port, scm_print_state *)
   return 1;
 }
 
-static
-scm_sizet free_smob (SCM s)
+static size_t
+free_smob (SCM s)
 {
   delete unsmob_input (s);
   return 0;
@@ -44,13 +44,15 @@ ly_input_p (SCM x)
 static
 void start_input_smobs ()
 {
-  input_tag
-    = scm_make_smob_type_mfpe ("input", 0,
-                              mark_smob, free_smob,
-                              print_smob, 0);
-  scm_make_gsubr ("ly-input-location?", 1, 0, 0, (Scheme_function_unknown)ly_input_p);
-}
+  input_tag = scm_make_smob_type ("input", 0);
+  scm_set_smob_mark (input_tag, mark_smob);
+  scm_set_smob_free (input_tag, free_smob);
+  scm_set_smob_print (input_tag, print_smob);
+  scm_set_smob_equalp (input_tag, 0);
+
+  scm_c_define_gsubr ("ly-input-location?", 1, 0, 0,
+                     (Scheme_function_unknown)ly_input_p);
+ }
 
 SCM
 make_input (Input ip)
@@ -70,7 +72,7 @@ unsmob_input (SCM s)
 {
   if (SCM_IMP (s))
     return 0;
-  if ((long)SCM_CAR (s) == input_tag) // ugh.
+  if (SCM_CAR (s) == (SCM)input_tag) // ugh.
     return (Input*) SCM_CDR (s);
   else                                         
     return 0;                                  
index 52f647f732f1bf40f7cda60fe34187193d4cf9ef..eeed9d86ccaddd7a928a78a13eaacc76a39bc48c 100644 (file)
@@ -160,7 +160,7 @@ Item::handle_prebroken_dependencies ()
   SCM vis = get_grob_property ("visibility-lambda");
   if (gh_procedure_p (vis))
     {
-      SCM args = scm_listify (gh_int2scm (break_status_dir ()), SCM_UNDEFINED);
+      SCM args = scm_list_n (gh_int2scm (break_status_dir ()), SCM_UNDEFINED);
       SCM result = gh_apply (vis, args);
       bool trans = gh_scm2bool (gh_car (result));
       bool empty = gh_scm2bool (gh_cdr (result));
index 74f702c6afaabb9e55dedd7f83bdf6f5688d8ee3..e9454129248d817795e5f4f70be81748c3609f21 100644 (file)
@@ -47,9 +47,9 @@ Key_performer::create_audio_elements ()
   if (key_req_l_) 
     {
       SCM pitchlist = key_req_l_->get_mus_property ("pitch-alist");
-      SCM proc = scm_eval2 (ly_symbol2scm ("accidentals-in-key"), SCM_EOL); 
+      SCM proc = scm_primitive_eval (ly_symbol2scm ("accidentals-in-key")); 
       SCM acc = gh_call1 (proc, pitchlist);
-      proc = scm_eval2 (ly_symbol2scm ("major-key"), SCM_EOL);
+      proc = scm_primitive_eval (ly_symbol2scm ("major-key"));
       SCM major = gh_call1 (proc, pitchlist);
       audio_p_ = new Audio_key (gh_scm2int (acc), major == SCM_BOOL_T); 
       Audio_element_info info (audio_p_, key_req_l_);
index 30ac299bf827fcffe1844d8739539b8019f02400..b474ab2849bddd315deb2cdff25b8c684abeb081 100644 (file)
@@ -45,7 +45,7 @@ ly_write2scm (SCM s)
                            SCM_OPN | SCM_WRTNG,
                            "ly_write2string");
   //  SCM write = scm_eval_3 (ly_symbol2scm ("write"), s, SCM_EOL);
-  SCM write = scm_eval2 (ly_symbol2scm ("write"), SCM_EOL);
+  SCM write = scm_primitive_eval (ly_symbol2scm ("write"));
   
   // scm_apply (write, port, SCM_EOL);
   gh_call2 (write, s, port);
@@ -74,8 +74,8 @@ ly_parse_scm (char const* s, int* n)
 
   /* Read expression from port */
   if (!SCM_EOF_OBJECT_P (form = scm_read (port)))
-    answer = scm_eval_3 (form, 1, SCM_EOL); // guh?
-
+    answer = scm_primitive_eval (form);
   /*
    After parsing
 
@@ -126,7 +126,7 @@ String
 ly_symbol2string (SCM s)
 {
   assert (gh_symbol_p (s));
-  return String ((Byte*)SCM_CHARS (s), (int) SCM_LENGTH (s));
+  return String ((Byte*)SCM_STRING_CHARS (s), (int) SCM_STRING_LENGTH (s));
 }
 
 
@@ -183,8 +183,9 @@ String
 ly_scm2string (SCM s)
 {
   assert (gh_string_p (s));
-  int len; 
-  char * p = gh_scm2newstr (s , &len);
+
+  size_t len; 
+  char *p = gh_scm2newstr (s , &len);
   
   String r (p);
 
@@ -452,12 +453,15 @@ ly_version ()
 static void
 init_functions ()
 {
-  scm_make_gsubr ("ly-warn", 1, 0, 0, (Scheme_function_unknown)ly_warning);
-  scm_make_gsubr ("ly-version", 0, 0, 0, (Scheme_function_unknown)ly_version);  
-  scm_make_gsubr ("ly-gulp-file", 1,0, 0, (Scheme_function_unknown)ly_gulp_file);
-  scm_make_gsubr ("dir?", 1,0, 0, (Scheme_function_unknown)ly_isdir_p);
-
-  scm_make_gsubr ("ly-number->string", 1, 0,0, (Scheme_function_unknown) ly_number2string);
+  scm_c_define_gsubr ("ly-warn", 1, 0, 0,
+                     (Scheme_function_unknown)ly_warning);
+  scm_c_define_gsubr ("ly-version", 0, 0, 0,
+                     (Scheme_function_unknown)ly_version);  
+  scm_c_define_gsubr ("ly-gulp-file", 1,0, 0,
+                     (Scheme_function_unknown)ly_gulp_file);
+  scm_c_define_gsubr ("dir?", 1,0, 0, (Scheme_function_unknown)ly_isdir_p);
+  scm_c_define_gsubr ("ly-number->string", 1, 0,0,
+                     (Scheme_function_unknown) ly_number2string);
 
 
 #ifdef TEST_GC 
index b788a54857e95a58be8a8df3d54dad992ff60098..9c70f62adb98d0e8ee5c2200826270b801a93927 100644 (file)
@@ -52,7 +52,7 @@ Line_of_score::typeset_grob (Grob * elem_p)
 {
   elem_p->pscore_l_ = pscore_l_;
   Pointer_group_interface::add_element (this, "all-elements",elem_p);
-  scm_unprotect_object (elem_p->self_scm ());
+  scm_gc_unprotect_object (elem_p->self_scm ());
 }
 
 void
index e095fbc1252a4ef571cb4da958f0110a346ba1b7..2e9d260163360664da8f1a388ce59d348e471272 100644 (file)
@@ -135,7 +135,7 @@ Midi_instrument::str() const
 {
   Byte program_byte = 0;
   bool found = false;
-  SCM proc = scm_eval2 (ly_symbol2scm ("midi-program"), SCM_EOL); 
+  SCM proc = scm_primitive_eval (ly_symbol2scm ("midi-program")); 
   SCM program = gh_call1 (proc, ly_symbol2scm (audio_l_->str_.ch_C()));
   found = (program != SCM_BOOL_F);
   if (found)
index e577691f8f7e04329923560689faaac9554076c0..b226c741e7fbf5f251535afd3e89abd294bdf5c3 100644 (file)
@@ -202,10 +202,10 @@ make_molecule (SCM expr, SCM xext, SCM yext)
 static void
 molecule_init ()
 {
-  scm_make_gsubr ("ly-make-molecule", 3, 0, 0, (Scheme_function_unknown) make_molecule);
-  scm_make_gsubr ("ly-combine-molecule-at-edge", 5 , 0, 0, (Scheme_function_unknown) Molecule::ly_molecule_combined_at_edge);
-  scm_make_gsubr ("ly-set-molecule-extent!", 3 , 0, 0, (Scheme_function_unknown) Molecule::ly_set_molecule_extent_x);
-  scm_make_gsubr ("ly-get-molecule-extent", 2 , 0, 0, (Scheme_function_unknown) Molecule::ly_get_molecule_extent);
+  scm_c_define_gsubr ("ly-make-molecule", 3, 0, 0, (Scheme_function_unknown) make_molecule);
+  scm_c_define_gsubr ("ly-combine-molecule-at-edge", 5 , 0, 0, (Scheme_function_unknown) Molecule::ly_molecule_combined_at_edge);
+  scm_c_define_gsubr ("ly-set-molecule-extent!", 3 , 0, 0, (Scheme_function_unknown) Molecule::ly_set_molecule_extent_x);
+  scm_c_define_gsubr ("ly-get-molecule-extent", 2 , 0, 0, (Scheme_function_unknown) Molecule::ly_get_molecule_extent);
 }
 ADD_SCM_INIT_FUNC (molecule,molecule_init);
 
index 8653e38514f2f3e761df2edb97038358288cfb34..ca6188f94489417296959dc4b287ebd75cfdaf85 100644 (file)
@@ -69,7 +69,7 @@ make_rational (SCM n, SCM d)
 void
 init_moments ()
 {
-  scm_make_gsubr ("make-moment", 2 , 0, 0, (Scheme_function_unknown) make_rational);
+  scm_c_define_gsubr ("make-moment", 2 , 0, 0, (Scheme_function_unknown) make_rational);
 }
 
 ADD_SCM_INIT_FUNC (moms,init_moments);
index d3b6d7c7f6f063792ea50d9215bf7c30fd97853d..c37cf1178b9dee97f18c8c024bc1564df7d87cf7 100644 (file)
@@ -37,8 +37,8 @@ Music_output_def::Music_output_def ()
   translator_p_dict_p_ = new Scope (translator_tab_);
 
   smobify_self ();
-  scm_unprotect_object (variable_tab_->self_scm ());
-  scm_unprotect_object (translator_tab_->self_scm ());  
+  scm_gc_unprotect_object (variable_tab_->self_scm ());
+  scm_gc_unprotect_object (translator_tab_->self_scm ());  
 }
 
 Music_output_def::~Music_output_def ()
@@ -53,8 +53,8 @@ Music_output_def::Music_output_def (Music_output_def const &s)
   style_sheet_ = SCM_EOL;
   scaled_fonts_ = SCM_EOL;
   smobify_self ();
-  scm_unprotect_object (variable_tab_->self_scm ());
-  scm_unprotect_object (translator_tab_->self_scm ());  
+  scm_gc_unprotect_object (variable_tab_->self_scm ());
+  scm_gc_unprotect_object (translator_tab_->self_scm ());  
 
   
   scope_p_ = new Scope (variable_tab_);
index 35c8bb16b3174c6e515058c38615a6dff005151f..47927f6cb90244c8851144d09f79e1454573b28c 100644 (file)
@@ -48,7 +48,7 @@ Music_sequence::append_music (Music *m)
 {
   set_mus_property ("elements",
                    gh_append2 (music_list (), gh_cons (m->self_scm (), SCM_EOL)));
-  scm_unprotect_object (m->self_scm ());
+  scm_gc_unprotect_object (m->self_scm ());
 }
 
 Music_sequence::Music_sequence (SCM l)
index 1da9e5329f022b25d59a73d44f26b1efd5576c46..edb75a4899ab030f60a4ae6bbbf59e84bb16bb19 100644 (file)
@@ -19,7 +19,7 @@ ly_deep_mus_copy (SCM m)
   if (unsmob_music (m))
     {
       SCM ss =  unsmob_music (m)->clone ()->self_scm ();
-      scm_unprotect_object (ss);
+      scm_gc_unprotect_object (ss);
       return ss;
     }
   else if (gh_pair_p (m))
@@ -284,7 +284,7 @@ ly_make_music (SCM type)
   else
     {
       SCM s =       get_music (ly_scm2string (type))->self_scm ();
-      scm_unprotect_object (s);
+      scm_gc_unprotect_object (s);
       return s;
     }
 }
@@ -307,10 +307,10 @@ ly_music_name (SCM mus)
 static void
 init_functions ()
 {
-  scm_make_gsubr ("ly-get-mus-property", 2, 0, 0, (Scheme_function_unknown)ly_get_mus_property);
-  scm_make_gsubr ("ly-set-mus-property", 3, 0, 0, (Scheme_function_unknown)ly_set_mus_property);
-  scm_make_gsubr ("ly-make-music", 1, 0, 0, (Scheme_function_unknown)ly_make_music);
-  scm_make_gsubr ("ly-music-name", 1, 0, 0, (Scheme_function_unknown)ly_music_name);    
+  scm_c_define_gsubr ("ly-get-mus-property", 2, 0, 0, (Scheme_function_unknown)ly_get_mus_property);
+  scm_c_define_gsubr ("ly-set-mus-property", 3, 0, 0, (Scheme_function_unknown)ly_set_mus_property);
+  scm_c_define_gsubr ("ly-make-music", 1, 0, 0, (Scheme_function_unknown)ly_make_music);
+  scm_c_define_gsubr ("ly-music-name", 1, 0, 0, (Scheme_function_unknown)ly_music_name);    
 }
 ADD_SCM_INIT_FUNC (musicscm,init_functions);
 ADD_MUSIC(Music);
index c27bf01d0dad0c5464d853e402fd80bf91d35326..9c07514277d086f51970fbc136023dbfc25d241b 100644 (file)
@@ -146,7 +146,7 @@ My_lily_lexer::set_identifier (String name_str, SCM s)
 My_lily_lexer::~My_lily_lexer ()
 {
   delete keytable_p_;
-  scm_unprotect_object (toplevel_variable_tab_->self_scm ());
+  scm_gc_unprotect_object (toplevel_variable_tab_->self_scm ());
   delete scope_p_ ;
 }
 
index f7ef57ecc94a74e3b710b821e012447c0e4e2ad0..2a1c813a847f15ec2025031efe61e6e787a84032 100644 (file)
@@ -99,11 +99,10 @@ Note_head::brew_molecule (SCM smob)
     UGH: use grob-property.
   */
   Molecule out = Font_interface::get_default_font (me)->find_by_name (String ("noteheads-") + 
-               ly_scm2string (scm_eval2 (gh_list (ly_symbol2scm ("find-notehead-symbol"),
+               ly_scm2string (scm_primitive_eval (gh_list (ly_symbol2scm ("find-notehead-symbol"),
                                                  me->get_grob_property ("duration-log"),
                                                  ly_quote_scm (style),
-                                                 SCM_UNDEFINED),
-                                         SCM_EOL)));
+                                                           SCM_UNDEFINED))));
 
   if (streepjes_i) 
     {
index 10e56f0883cdd261840c920e37bacb903294790b..0fcdd18fc7dae0d25dd8026b896b3f4f1bdb76dd 100644 (file)
@@ -140,7 +140,7 @@ Paper_def::find_font (SCM fn, Real m)
   SCM val = Scaled_font_metric::make_scaled_font_metric (f, m);
   scaled_fonts_ = scm_acons (key, val, scaled_fonts_);
 
-  scm_unprotect_object (val);
+  scm_gc_unprotect_object (val);
 
   return dynamic_cast<Scaled_font_metric*> (unsmob_metrics (val));
 }
index c146d194a3edbc5ecbbe3761e9808dc176184ebb..59d4fb4ba5b3044f5b22b7799743286495645c39 100644 (file)
@@ -77,8 +77,8 @@ Paper_outputter::output_header ()
   SCM exp = gh_list (ly_symbol2scm ((output_format_global + "-scm").ch_C ()),
                     ly_quote_scm (ly_symbol2scm ("all-definitions")),
                     SCM_UNDEFINED);
-  exp = scm_eval2 (exp, SCM_EOL);
-  scm_eval2 (exp, SCM_EOL);
+  exp = scm_primitive_eval (exp);
+  scm_primitive_eval (exp);
   
   String creator = gnu_lilypond_version_str ();
   
@@ -139,7 +139,7 @@ Paper_outputter::dump_scheme (SCM s)
     }
   else
     {
-      SCM result = scm_eval2 (s, SCM_EOL);
+      SCM result = scm_primitive_eval (s);
       char *c=gh_scm2newstr (result, NULL);
   
       *stream_p_ << c;
index 68d0516ff515527eecd06b299881d9438d45f9a3..65596d0ad3be73518c432e0e0bc371fbfa816341 100644 (file)
@@ -202,11 +202,10 @@ Part_combine_music_iterator::get_state (Moment)
          if (first_pitches != SCM_EOL && second_pitches != SCM_EOL)
            {
              scm_sort_list_x (first_pitches,
-                              scm_eval2 (ly_str02scm ("Pitch::less_p"),
-                                         SCM_EOL));
+                              scm_primitive_eval (ly_str02scm ("Pitch::less_p")));
              scm_sort_list_x (second_pitches,
-                              scm_eval2 (ly_str02scm ("Pitch::less_p"),
-                                         SCM_EOL));
+                              scm_primitive_eval (ly_str02scm ("Pitch::less_p")));
+
              interval = gh_int2scm (unsmob_pitch (gh_car (first_pitches))->steps ()
                                     - unsmob_pitch (gh_car (scm_last_pair (second_pitches)))->steps ());
            }
@@ -214,16 +213,14 @@ Part_combine_music_iterator::get_state (Moment)
          if (first_durations != SCM_EOL)
            {
              scm_sort_list_x (first_durations,
-                              scm_eval2 (ly_str02scm ("Duration::less_p"),
-                                         SCM_EOL));
+                              scm_primitive_eval (ly_str02scm ("Duration::less_p")));
              first_mom += unsmob_duration (gh_car (first_durations))->length_mom ();
            }
          
          if (second_durations != SCM_EOL)
            {
              scm_sort_list_x (second_durations,
-                              scm_eval2 (ly_str02scm ("Duration::less_p"),
-                                         SCM_EOL));
+                              scm_primitive_eval (ly_str02scm ("Duration::less_p")));
              second_mom += unsmob_duration (gh_car (second_durations))->length_mom ();
            }
          
index f4052b28c9d24d06f109a5e9c709226af3d450e0..aa7774debce072ce1de914f0da4af462446dfc61 100644 (file)
@@ -355,13 +355,13 @@ static void
 add_funcs ()
 {
   // should take list?: (make-pitch ' (octave name accidental))
-  scm_make_gsubr ("make-pitch", 3, 0, 0, (Scheme_function_unknown)make_pitch);
+  scm_c_define_gsubr ("make-pitch", 3, 0, 0, (Scheme_function_unknown)make_pitch);
 
-  scm_make_gsubr ("pitch-octave", 1, 0, 0, (Scheme_function_unknown)pitch_octave);
-  scm_make_gsubr ("pitch-notename", 1, 0, 0, (Scheme_function_unknown)pitch_notename);
-  scm_make_gsubr ("pitch-alteration", 1, 0, 0, (Scheme_function_unknown)pitch_alteration);
-  scm_make_gsubr ("pitch-semitones", 1, 0, 0, (Scheme_function_unknown)pitch_semitones);
-  scm_make_gsubr ("Pitch::transpose", 2, 0, 0, (Scheme_function_unknown) pitch_transpose);
+  scm_c_define_gsubr ("pitch-octave", 1, 0, 0, (Scheme_function_unknown)pitch_octave);
+  scm_c_define_gsubr ("pitch-notename", 1, 0, 0, (Scheme_function_unknown)pitch_notename);
+  scm_c_define_gsubr ("pitch-alteration", 1, 0, 0, (Scheme_function_unknown)pitch_alteration);
+  scm_c_define_gsubr ("pitch-semitones", 1, 0, 0, (Scheme_function_unknown)pitch_semitones);
+  scm_c_define_gsubr ("Pitch::transpose", 2, 0, 0, (Scheme_function_unknown) pitch_transpose);
 }
 
 ADD_SCM_INIT_FUNC (pitch, add_funcs);
index 57a6e04e9a0fae2f7106adc7ba4a18411b21b3ac..62096373140702908231a55dcbfb55a3010d22a0 100644 (file)
@@ -51,7 +51,7 @@ Property_engraver::finalize ()
 Property_engraver::~Property_engraver ()
 {
   if (prop_dict_)
-    scm_unprotect_object (prop_dict_->self_scm ());
+    scm_gc_unprotect_object (prop_dict_->self_scm ());
 }
 
 void
@@ -111,7 +111,7 @@ Property_engraver::apply_properties (SCM p, Grob *e, Translator_group*origin)
 
       if (val == SCM_EOL)
        ;                       // Not defined in context.
-      else if (gh_apply (type_p, scm_listify (val, SCM_UNDEFINED))
+      else if (gh_apply (type_p, scm_list_n (val, SCM_UNDEFINED))
               == SCM_BOOL_T)   // defined and  right type: do it
        {
          e->set_grob_property (elt_prop_sym, val);
@@ -140,7 +140,7 @@ Property_engraver::apply_properties (SCM p, Grob *e, Translator_group*origin)
        if (val != SCM_EOL)
          {                     // not the right type: error message.
            SCM errport = scm_current_error_port ();
-           SCM typefunc = scm_eval2 (ly_symbol2scm ("type-name"), SCM_EOL);
+           SCM typefunc = scm_primitive_eval (ly_symbol2scm ("type-name"));
            SCM type_name = gh_call1 (typefunc, type_p);
            warning (_f ("Wrong type for property: %s, type: %s, value found: %s, type: %s",
                         ly_symbol2string (prop_sym).ch_C (),
index 3c4bcfabf69c4920892d67efa481f1a0c04c0fb9..7e22baa5506c14c5a27b48785f9f4a355f9bd672 100644 (file)
@@ -17,12 +17,12 @@ Protected_scm::Protected_scm ()
 
 Protected_scm::Protected_scm (SCM s)
 {
-  object_ = SCM_NIMP (s)  ? scm_protect_object (s): s;
+  object_ = SCM_NIMP (s)  ? scm_gc_protect_object (s): s;
 }
 
 Protected_scm::Protected_scm (Protected_scm const &s)
 {
-  object_ = SCM_NIMP (s.object_) ? scm_protect_object (s.object_) : s.object_;
+  object_ = SCM_NIMP (s.object_) ? scm_gc_protect_object (s.object_) : s.object_;
 }
 
 Protected_scm & 
@@ -32,9 +32,9 @@ Protected_scm::operator = (SCM s)
     return *this;
   
   if (SCM_NIMP (object_))
-    scm_unprotect_object (object_);
+    scm_gc_unprotect_object (object_);
 
-  object_ =  SCM_NIMP (s) ? scm_protect_object (s): s;
+  object_ =  SCM_NIMP (s) ? scm_gc_protect_object (s): s;
   return *this;
 }
 
@@ -49,7 +49,7 @@ Protected_scm::~Protected_scm ()
 {
   if (SCM_NIMP (object_))
     {
-      scm_unprotect_object (object_);
+      scm_gc_unprotect_object (object_);
     }
 }
 
index b98327d1a37cc797a7c8f6176833b238cdc3c4ea..525c2e54f3212b376497c4b9bbeb0b9950ad838b 100644 (file)
@@ -101,7 +101,7 @@ set_lily_option (SCM var, SCM val)
 static void
 init_functions ()
 {
-  scm_make_gsubr ("set-lily-option", 2, 0, 0, (Scheme_function_unknown)set_lily_option);
+  scm_c_define_gsubr ("set-lily-option", 2, 0, 0, (Scheme_function_unknown)set_lily_option);
 }
 
 
index 962f820257c3402e4dfc6557450cebc35579283e..ae6cf4173db1bfed7ef604a0dd868fb0ae33dcb7 100644 (file)
@@ -44,7 +44,7 @@ Score::Score (Score const &s)
   
   Music * m =unsmob_music (s.music_);
   music_ =  m?m->clone ()->self_scm () : SCM_EOL;
-  scm_unprotect_object (music_);
+  scm_gc_unprotect_object (music_);
   
   for (int i=0; i < s.def_p_arr_.size (); i++)
     def_p_arr_.push (s.def_p_arr_[i]->clone ());
@@ -53,7 +53,7 @@ Score::Score (Score const &s)
        {
          header_p_ = (s.header_p_) ? new Scheme_hash_table (*s.header_p_): 0;
 
-         scm_unprotect_object (header_p_->self_scm ());
+         scm_gc_unprotect_object (header_p_->self_scm ());
        }
  
 }
@@ -106,7 +106,7 @@ Score::run_translator (Music_output_def *odef_l)
     }
 
   Music_output * output = trans_p->get_output_p ();
-  scm_unprotect_object (trans_p->self_scm ());
+  scm_gc_unprotect_object (trans_p->self_scm ());
   
   if (verbose_global_b)
     progress_indication (_f ("elapsed time: %.2f seconds",  timer.read ()));
index c711d24a2bf2f7ba1e110015c1e639477cf93063..06a65014a9419f735257d1dd2028b2d59d94bee6 100644 (file)
@@ -118,12 +118,12 @@ void
 clear_scores ()
 {
   for (int i=0; i < score_global_array.size (); i++)
-    scm_unprotect_object (score_global_array[i]->self_scm ());
+    scm_gc_unprotect_object (score_global_array[i]->self_scm ());
   score_global_array.clear ();
   
   inclusion_global_array.clear ();
   if (global_header_p)
-    scm_unprotect_object (global_header_p ->self_scm ());
+    scm_gc_unprotect_object (global_header_p ->self_scm ());
   global_header_p =0; 
 }
 
index 33d0ce5757d8af39370401d8b831bb1e586e43ed..d48c91d7b64b8cc4f1a54eaa044548e1e88b28d6 100644 (file)
@@ -336,7 +336,7 @@ Slur::get_attachment (Grob *me, Direction dir,
   int stemdir = stem ? Stem::get_direction (stem) : 1;
   int slurdir = gh_scm2int (me->get_grob_property ("direction"));
   SCM l = scm_assoc
-    (scm_listify (a,
+    (scm_list_n (a,
                  gh_int2scm (stemdir * dir),
                  gh_int2scm (slurdir * dir),
                   SCM_UNDEFINED), alist);
index 0fba92f847c3f3d753d63f1e7cfa8a46bba0934d..15f0ad8a8c8ab2fbef65b774a76bbbd570c205f5 100644 (file)
@@ -287,7 +287,7 @@ Spanner::do_derived_mark ()
 {
   /*
     We'd be fucked if this is called before spanned_drul_[] is inited.  */
-  if (status_i_ == ORPHAN)
+  if (status_c_ == ORPHAN)
     return SCM_EOL;
   
   Direction d = LEFT;
index f79bf760f28a37576cd4dec5b9c6a9e31040dbef..aee7edc6a0e05c96651110648e90880c3b4c6468 100644 (file)
@@ -91,7 +91,7 @@ Staff_performer::create_audio_elements ()
 void
 Staff_performer::stop_translation_timestep ()
 {
-  SCM proc = scm_eval2 (ly_symbol2scm ("percussion-p"), SCM_EOL); 
+  SCM proc = scm_primitive_eval (ly_symbol2scm ("percussion-p")); 
   SCM drums_p = gh_call1 (proc, ly_symbol2scm (instrument_str_.ch_C()));
   audio_staff_p_->channel_i_ = (drums_p == SCM_BOOL_T ? 9 : -1 );
   if (name_p_)
index aca140aaf755545963d80bdf519985a22db24e29..1e229e1f0f8c3415191cf0c3d666ac025a95a249 100644 (file)
@@ -450,7 +450,7 @@ Stem::set_spacing_hints (Grob*me)
       Item* item = dynamic_cast<Item*> (me);
       Item * col =  item->column_l ();
       SCM dirlist =col->get_grob_property ("dir-list");
-      if (scm_sloppy_memq (scmdir, dirlist) == SCM_BOOL_F)
+      if (scm_c_memq (scmdir, dirlist) == SCM_BOOL_F)
        {
          dirlist = gh_cons (scmdir, dirlist);
          col->set_grob_property ("dir-list", dirlist);
index aa33ce33fa5ed53e18d043bd5b4138ad904c2374..aaec32d796b4551eb28ea7ae2744d0bba7138837 100644 (file)
@@ -231,7 +231,7 @@ trans_list (SCM namelist, Translator_group*tg)
          tr->daddy_trans_l_ = tg;
          tr->output_def_l_  = tg->output_def_l_;
 
-         scm_unprotect_object (str);
+         scm_gc_unprotect_object (str);
        }
     }
   return l; 
index 2643670a0acfb661d02c4b2ed04737361087f2bb..b91088d5a0989babd468bb83472e1868445121de 100644 (file)
@@ -21,7 +21,7 @@ Translator_group::Translator_group (Translator_group const&s)
   
   Scheme_hash_table * tab =  new Scheme_hash_table (*s.properties_dict ());
   properties_scm_ = tab->self_scm ();
-  scm_unprotect_object (tab->self_scm ());
+  scm_gc_unprotect_object (tab->self_scm ());
 }
 
 Scheme_hash_table*
@@ -43,7 +43,7 @@ Translator_group::Translator_group ()
   Scheme_hash_table *tab = new Scheme_hash_table ;
   properties_scm_ = tab->self_scm ();
 
-  scm_unprotect_object (tab->self_scm ());
+  scm_gc_unprotect_object (tab->self_scm ());
 }
 
 void
@@ -421,7 +421,7 @@ type_check_assignment (SCM val, SCM sym,  SCM type_symbol)
        {
          SCM errport = scm_current_error_port ();
          ok = false;
-         SCM typefunc = scm_eval2 (ly_symbol2scm ("type-name"), SCM_EOL);
+         SCM typefunc = scm_primitive_eval (ly_symbol2scm ("type-name"));
          SCM type_name = gh_call1 (typefunc, type_p);
 
          scm_puts (_f ("Type check for `%s' failed; value `%s' must be of type `%s'",
@@ -468,8 +468,8 @@ ly_set_trans_property (SCM context, SCM name, SCM val)
 void
 add_trans_scm_funcs ()
 {
-  scm_make_gsubr ("ly-get-trans-property", 2, 0, 0, (Scheme_function_unknown)ly_get_trans_property);
-  scm_make_gsubr ("ly-set-trans-property", 3, 0, 0, (Scheme_function_unknown)ly_set_trans_property);
+  scm_c_define_gsubr ("ly-get-trans-property", 2, 0, 0, (Scheme_function_unknown)ly_get_trans_property);
+  scm_c_define_gsubr ("ly-set-trans-property", 3, 0, 0, (Scheme_function_unknown)ly_set_trans_property);
 }
 
 ADD_SCM_INIT_FUNC (trans_scm, add_trans_scm_funcs);
index 64fe88deee89605bde5e3865b0b2eccb52c6882b..39574c1b40e1a8f8e6fc91be3ffe1c310e61a07d 100644 (file)
@@ -22,6 +22,8 @@ staffspace = \staffheight / 4.0
 stafflinethickness = \staffspace / 10.0
 outputscale = \staffheight / 4.0
 
+blotdiameter = 0.4 / \outputscale
+
 \translator { \NoteNamesContext }
 \translator { \ScoreContext }
 \translator { \ChoirStaffContext}
index 702604002ac6788fdc2aedc31968270b15da30d5..34c91ff0c2a4e3409d7d2a15303b566151edb067 100644 (file)
@@ -7,10 +7,10 @@ staff_space#:=staffsize#/(stafflines-1);
 %font_x_height  staff_space# ;
 
 %
-%  [D.K.Roush & J.S.Gourlay] say this should be 0.072
+% [D.K.Roush & J.S.Gourlay] say this should be 0.072
 % We know better
-% generally, the "blackness" of most chars depends on this.
-%
+% FIXME: generally, the "blackness" of most chars depends on this.
+%        these dimensions should be independent.
 stafflinethickness#:=0.1 staff_space#;
 
 stemthickness# := stafflinethickness#;
@@ -35,8 +35,8 @@ overdone_heads = 0.0;
 %
 % this is not a meta variable: it is related to absolute sizes.
 %
-% According to [Wanske], only outside corners should be round
-%
+% FIXME: According to [Wanske], only outside corners should be round
+%        I don't think we do this anywhere -- jcn
 numeric blot_diameter;
 blot_diameter# = .4pt#;
 if (blot_diameter# * hppp) < 1:
index ddbeacd7c1001a7142467759a7d227cc29e78628..b8990920884a6d7b296027ceaff155b0fd25b20f 100644 (file)
   )
 
 (define (scm-as-output)
-  (ly-eval (as-scm 'all-definitions)))
+  (primitive-eval (as-scm 'all-definitions)))
index 187844cd5db595ff1fdcc1adedcc2312342b8817..683f0d29b49d281a8831f9459876752806011b47 100644 (file)
@@ -1,7 +1,7 @@
 ;;;; drum-"hack". See input/tricks/drums.ly and ly/drumpitch.ly
 ;;;; 2001/03/25 Rune Zedeler <rune@zedeler.dk>
 
-;;;; changed eval to ly-eval for guile 1.4/1.4.1 compatibility --jcn
+;;;; changed eval to primitive-eval for guile 1.4/1.4.1 compatibility --jcn
 
 (define (seq-music-list elts)
    (let* ( (ml (ly-make-music "Sequential_music")) )
              (begin
               (display p) ;; UGH. FIXME. pitch->string ???
               (ly-warn " unknown drumpitch.")
-              (cdar (ly-eval kit))
+              (cdar (primitive-eval kit))
           ))
          ((eq? p (caddr (car pitches))) ((name->paper kit) (caar pitches)) )
         (else                          (p2p (cdr pitches) ) )
    )
  )
 (define ((name->paper kit) n)
-   (let n2p ((pitches (ly-eval kit)))
+   (let n2p ((pitches (primitive-eval kit)))
      (cond ((eq? pitches '())
              (begin
               (ly-warn (string-append "Kit `" (symbol->string kit) "' doesn't contain drum `" n
                                       "'\nSee lily/drumpitch.ly for supported drums."))
-              (cdar (ly-eval kit))
+              (cdar (primitive-eval kit))
             ))
            ((eq? n (caar pitches))  (cdar pitches) )
           (else                    (n2p (cdr pitches) ) )
index 2328a217ccd336aedf71fdf3deae9a06a2036a73..99cf6c7128ea8e73a9be11a7af7ea54d0aaf6027 100644 (file)
@@ -773,7 +773,7 @@ direction = Forced direction for all ties"
    ))
 
 
-(ly-eval (cons
+(primitive-eval (cons
          'begin
          (map (lambda (x) (list 'define (car x) (list 'quote (cdr x))))
               all-interfaces)))
index a0bfc1dec21bc0188e950e0ab7b5e4657c34790c..b8f28858fe2bb9342ede77af788c90aabf788858 100644 (file)
@@ -54,7 +54,9 @@
 ;;; Un-assorted stuff
 
 ;; URG guile-1.4/1.4.x compatibility
-(define (ly-eval x) (eval2 x #f))
+(if (not (defined? 'primitive-eval))
+    (define (primitive-eval form)
+      (eval2 form #f)))
 
 (define (sign x)
   (if (= x 0)
index b5a3cb635295a4542230708249246aab011148fb..50c674e88f6e5d516a17bc04a0821dbc86a01aa2 100644 (file)
   )
 
 (define (scm-pdf-output)
-  (ly-eval (pdf-scm 'all-definitions)))
+  (primitive-eval (pdf-scm 'all-definitions)))
 
 ; Local Variables:
 ; scheme-program-name: "guile"
index 01d16ec1459a02b93ad624be0a4f59b4658badfd..736cf9bcbfe36b6fdc61fe6bd04e9a23b5221061 100644 (file)
   )
 
 (define (scm-pdftex-output)
-  (ly-eval (pdftex-scm 'all-definitions)))
+  (primitive-eval (pdftex-scm 'all-definitions)))
index 8e4dc95ecf0c0ca408d9755387887914f23dc98d..9875dd3904cf10c589fae470aa647546359957c2 100644 (file)
@@ -258,4 +258,4 @@ lilypondpaperoutputscale lilypondpaperoutputscale scale
   )
 
 (define (scm-ps-output)
-  (ly-eval (ps-scm 'all-definitions)))
+  (primitive-eval (ps-scm 'all-definitions)))
index fb5b8df7dbbebd5e092382bc3a4c267f5d3fc80c..794dbc80b13ebab786b565c5aaea30d9f51cdecd 100644 (file)
   )
 
 (define (scm-tex-output)
-  (ly-eval (tex-scm 'all-definitions)))
+  (primitive-eval (tex-scm 'all-definitions)))
index a7d59a36f0b9945b71d00fa272ed3aceff9cee94..720f2db6296b7a59fe15bcdc0c6cadad6898c54f 100644 (file)
@@ -203,9 +203,15 @@ else {last =0}}
     then
         AC_STEPMAKE_WARN("Guile version "$need_guile_version" or newer is needed")
     fi
+    changequote(<<, >>)dnl
+    GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'`
+    GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'`
+    changequote([, ])dnl
     GUILE_FLAGS
     AC_PATH_PROG(GUILE, guile, error)
     AC_SUBST(GUILE)
+    AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, $GUILE_MAJOR_VERSION)
+    AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, $GUILE_MINOR_VERSION)
 ])
 
 AC_DEFUN(AC_STEPMAKE_INIT, [