From 02754e5a38b346230fd8158fbc11e7a97501faa9 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 22:46:34 +0000 Subject: [PATCH] lilypond-1.3.30 --- lily/atom.cc | 54 -------------------------------------- lily/crescendo.cc | 2 +- lily/include/atom.hh | 3 +-- lily/include/lily-guile.hh | 1 + lily/include/molecule.hh | 3 +++ lily/lily-guile.cc | 28 ++++++++++++++++++++ lily/lookup.cc | 2 +- lily/paper-outputter.cc | 2 +- lily/tuplet-spanner.cc | 2 +- lily/volta-spanner.cc | 2 +- 10 files changed, 38 insertions(+), 61 deletions(-) diff --git a/lily/atom.cc b/lily/atom.cc index f44d4d2c4e..8b13789179 100644 --- a/lily/atom.cc +++ b/lily/atom.cc @@ -1,55 +1 @@ -/* - atom.cc -- implement Atom - source file of the GNU LilyPond music typesetter - - (c) 1997--2000 Han-Wen Nienhuys -*/ - -#include - -#include "atom.hh" -#include "lookup.hh" -#include "global-ctor.hh" -#include "font-metric.hh" - - -#if 0 -SCM translate_sym; - -static void init() -{ - translate_sym = sly_symbol2scm ("translate-atom"); -} - -ADD_SCM_INIT_FUNC(atom, init); -#endif - -SCM -translate_atom (Offset o, SCM func) -{ - return gh_list (ly_symbol2scm ("translate-atom"), - ly_quote_scm (to_scm (o)), - func, - SCM_UNDEFINED); -} - -SCM -translate_atom_axis (Real r, Axis a, SCM func) -{ - // off_[a] += r; - Offset o ; - o[a] = r; - return gh_list (ly_symbol2scm ("translate-atom"), - ly_quote_scm (to_scm (o)), - func, - SCM_UNDEFINED); -} - - -SCM -fontify_atom(Font_metric * met, SCM f) -{ - return gh_list (ly_symbol2scm ("fontify"), - ly_quote_scm (met->description ()), f, SCM_UNDEFINED); -} diff --git a/lily/crescendo.cc b/lily/crescendo.cc index 3f0f16b637..bdf26864df 100644 --- a/lily/crescendo.cc +++ b/lily/crescendo.cc @@ -13,7 +13,7 @@ #include "paper-def.hh" #include "debug.hh" #include "paper-column.hh" -#include "atom.hh" + Crescendo::Crescendo () { diff --git a/lily/include/atom.hh b/lily/include/atom.hh index c2fb413312..576dc45e1a 100644 --- a/lily/include/atom.hh +++ b/lily/include/atom.hh @@ -10,9 +10,8 @@ #define ATOM_HH #include "lily-proto.hh" -#include "box.hh" + #include "lily-guile.hh" -SCM fontify_atom (Font_metric*, SCM atom); #endif diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index b79ffbf895..8a8f4c2d02 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -19,6 +19,7 @@ SCM ly_str02scm (char const*c); SCM ly_eval_str (String s); SCM ly_symbol2scm (char const *); String ly_symbol2string (SCM); +SCM ly_type (SCM); SCM ly_eval (SCM a); SCM ly_parse_scm (char const* s, int* n); diff --git a/lily/include/molecule.hh b/lily/include/molecule.hh index 7342d0d406..6992a2fa42 100644 --- a/lily/include/molecule.hh +++ b/lily/include/molecule.hh @@ -75,4 +75,7 @@ public: bool empty_b() const; void print ()const; }; + +SCM fontify_atom (Font_metric*, SCM atom); + #endif diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index ccca3060e9..09eca147be 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -339,3 +339,31 @@ scm_to (SCM s, Offset*) return Offset (gh_scm2double (gh_car (s)), gh_scm2double (gh_cdr (s))); } + +SCM +ly_type (SCM exp) +{ + char const * cp = "unknown"; + if (gh_number_p (exp)) + { + cp = "number"; + } + else if (gh_string_p (exp)) + { + cp = "string"; + } + else if (gh_procedure_p (exp)) + { + cp = "procedure"; + } + else if (gh_boolean_p (exp)) + { + cp = "boolean"; + } + else if (gh_pair_p (exp)) + { + cp = "list"; + } + + return ly_str02scm (cp); +} diff --git a/lily/lookup.cc b/lily/lookup.cc index f1d1189b24..88bd9a753b 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -26,7 +26,7 @@ #include "afm.hh" #include "scope.hh" #include "molecule.hh" -#include "atom.hh" + #include "lily-guile.hh" diff --git a/lily/paper-outputter.cc b/lily/paper-outputter.cc index fc5630d9ac..b624b8ea8f 100644 --- a/lily/paper-outputter.cc +++ b/lily/paper-outputter.cc @@ -26,7 +26,7 @@ #include "scope.hh" #include "identifier.hh" #include "lily-version.hh" -#include "atom.hh" + Paper_outputter::Paper_outputter () { diff --git a/lily/tuplet-spanner.cc b/lily/tuplet-spanner.cc index 36782cb6fc..5447595709 100644 --- a/lily/tuplet-spanner.cc +++ b/lily/tuplet-spanner.cc @@ -6,7 +6,7 @@ (c) 1997--2000 Jan Nieuwenhuizen */ -#include "atom.hh" + #include "beam.hh" #include "box.hh" #include "debug.hh" diff --git a/lily/volta-spanner.cc b/lily/volta-spanner.cc index 0fac7a6c23..9f5427a244 100644 --- a/lily/volta-spanner.cc +++ b/lily/volta-spanner.cc @@ -19,7 +19,7 @@ #include "stem.hh" #include "dimension-cache.hh" #include "group-interface.hh" -#include "atom.hh" + Volta_spanner::Volta_spanner () -- 2.39.5