package = @package@
PACKAGE_NAME = @PACKAGE_NAME@
stepmake = @stepmake@
-state-vector = @STATE_VECTOR@
CONFIGSUFFIX = @CONFIGSUFFIX@
MAKEINFO = @MAKEINFO@
ICFLAGS = @ICFLAGS@
TFM_PATH = @TFM_PATH@
RANLIB = @RANLIB@
DEFS = @DEFS@
-#SET_MAKE = @SET_MAKE@
DEFINES = @DEFS@ @DEFINES@
COMPILEINFO = @COMPILEINFO@
DOTEXE = @DOTEXE@
AC_HAVE_HEADERS(assert.h sys/stat.h)
AC_HEADER_STAT
-printing_b=no
-AC_ARG_ENABLE(printing,
- [ enable-printing turn on debug printing. Default: off],
- [printing_b=$enableval])
-
if test "$optimise_b" = yes; then
DEFINES="$DEFINES -DSTRING_UTILS_INLINED"
AC_DEFINE(STRINGS_UTILS_INLINED)
fi
-if test "$printing_b" = no; then
- # ugh
- AC_DEFINE(NPRINT)
- DEFINES="$DEFINES -DNPRINT"
-fi
AC_STEPMAKE_CXX
AC_STEPMAKE_GXX
All_font_metrics::find_afm (String name)
{
SCM sname = ly_symbol2scm (name.ch_C ());
- if (!afm_p_dict_->elem_b (sname))
+
+ SCM val;
+
+ if (!afm_p_dict_->try_retrieve (sname, &val))
{
String path;
if (verbose_global_b)
progress_indication ("[" + path);
- SCM afm = read_afm_file (path);
+ val = read_afm_file (path);
- unsmob_metrics (afm)->name_ = sname;
+ unsmob_metrics (val)->name_ = sname;
if (verbose_global_b)
progress_indication ("]");
- afm_p_dict_->set (sname,afm);
+ afm_p_dict_->set (sname,val);
+
+
}
- return dynamic_cast<Adobe_font_metric*> (unsmob_metrics (afm_p_dict_->get (sname)));
+ return dynamic_cast<Adobe_font_metric*> (unsmob_metrics (val));
}
Scaled_font_metric *
String index = nm + "@" + to_str (m);
SCM sname = ly_symbol2scm (index.ch_C ());
- Font_metric *fm =0;
- if (!scaled_p_dict_->elem_b (sname))
+ SCM val;
+
+ if (!scaled_p_dict_->try_retrieve (sname, &val))
{
Font_metric *f = find_font (nm);
- SCM s = Scaled_font_metric::make_scaled_font_metric (f, m);
- scaled_p_dict_->set (sname, s);
- fm = unsmob_metrics (s);
+ val = Scaled_font_metric::make_scaled_font_metric (f, m);
+ scaled_p_dict_->set (sname, val);
}
- else
- fm = unsmob_metrics (scaled_p_dict_->get (sname));
+
- return dynamic_cast<Scaled_font_metric*> (fm);
+ return dynamic_cast<Scaled_font_metric*> (unsmob_metrics (val));
}
Tex_font_metric *
All_font_metrics::find_tfm (String name)
{
- SCM sname = ly_symbol2scm (name.ch_C ());
- if (!tfm_p_dict_->elem_b (sname))
+ SCM sname = ly_symbol2scm (name.ch_C ());
+
+ SCM val;
+ if (!tfm_p_dict_->try_retrieve (sname, &val))
{
String path;
if (verbose_global_b)
progress_indication ("[" + path);
- SCM tfm = Tex_font_metric::make_tfm (path);
+ val = Tex_font_metric::make_tfm (path);
if (verbose_global_b)
progress_indication ("]");
- Font_metric *fm = unsmob_metrics (tfm);
- fm->name_ = sname;
- tfm_p_dict_->set (sname, tfm);
+ unsmob_metrics (val)->name_ = sname;
+ tfm_p_dict_->set (sname, val);
}
return
- dynamic_cast<Tex_font_metric*> (unsmob_metrics (tfm_p_dict_->get(sname)));
+ dynamic_cast<Tex_font_metric*> (unsmob_metrics (val));
}
return at_mom_;
}
-void
-Audio_column::print() const
-{
-#ifndef NPRINT
- DEBUG_OUT << "Audio_column {";
- DEBUG_OUT << "at: " << at_mom_ << ". Contains:";
- for (int i =0; i < audio_item_l_arr_.size (); i++)
- DEBUG_OUT << classname (audio_item_l_arr_[i]) << ", ";
- DEBUG_OUT << "\n}\n";
-#endif
-}
{
}
-void
-Audio_element::print () const
-{
-#ifndef NPRINT
- DEBUG_OUT << classname (this) << "{ ";
- do_print ();
- DEBUG_OUT << "}";
-#endif
-}
-void
-Audio_element::do_print ()const
-{
-}
// add_dependency (head_l);
}
-void
-Audio_item::do_print () const
-{
-#ifndef NPRINT
- if (audio_column_l_)
- {
- DEBUG_OUT << "at: "<< audio_column_l_->at_mom ();
- }
-#endif
-}
+
-void
-Change_translator::do_print () const
-{
- DEBUG_OUT << "change " << change_to_type_str_ << " to " << change_to_id_str_ ;
-}
-
return b;
}
-void
-Clef_change_req::do_print () const
-{
-#ifndef NPRINT
- DEBUG_OUT << clef_str_ ;
-#endif
-}
Clef_change_req::Clef_change_req (String s)
{
}
-void
-Time_signature_change_req::do_print () const
-{
-#ifndef NPRINT
- DEBUG_OUT << beats_i_ << "/" << one_beat_i_;
-#endif
-}
-
bool
Time_signature_change_req::do_equal_b (Request const *r) const
{
dur_. durlog_i_ = 2;
}
-void
-Tempo_req::do_print () const
-{
- DEBUG_OUT << dur_.str () << " = " << metronome_i_;
-}
bool
{
w = iter->pending_moment();
- DEBUG_OUT << "proccing: " << w << '\n';
}
w = sneaky_insert_extra_moment (w);
return "";
}
-void
-Identifier::print () const
-{
- DEBUG_OUT << "identifier ";
- do_print ();
-}
-void
-Identifier::do_print () const
-{
-}
-
-/* ugh. */
-#define DEFAULT_PRINT(Class) \
-void \
-Class ## _identifier::do_print () const { \
- Class *cl = ((Class ## _identifier *)this)->access_content_ ## Class(false);\
- cl->print (); \
-}
-
-
-DEFAULT_PRINT(Score);
-DEFAULT_PRINT(Music_output_def);
/* ugh. */
#define DUMMY_STR(Class) \
DUMMY_STR(Music_output_def);
DUMMY_STR(Duration);
-#define STRING_PRINT(Class) \
-void \
-Class ## _identifier::do_print () const\
-{\
- DEBUG_OUT << do_str () << '\n';\
-}\
-
-
-STRING_PRINT(Duration);
#define DEFAULT_STR(Class) \
String \
Audio_element ();
virtual ~Audio_element ();
- void print () const;
+
// should we use a scm list?
bool grace_b_;
protected:
- virtual void do_print () const;
};
#endif // AUDIO_ELEMENT_HH
Audio_column* audio_column_l_;
-protected:
- virtual void do_print () const;
private:
Audio_item (Audio_item const&);
protected:
VIRTUAL_COPY_CONS(Music);
- void do_print () const;
};
Tempo_req();
protected:
- virtual void do_print () const;
+
VIRTUAL_COPY_CONS(Music);
bool do_equal_b (Request const *) const;
};
Time_signature_change_req();
protected:
- virtual void do_print () const;
+
bool do_equal_b (Request const *) const;
VIRTUAL_COPY_CONS(Music);
};
String clef_str_;
Clef_change_req (String);
protected:
- virtual void do_print () const;
+
VIRTUAL_COPY_CONS(Music);
};
{
protected:
Array<Score_element_info> announce_info_arr_;
+
+
+
public:
VIRTUAL_COPY_CONS(Translator);
DECLARE_SMOBS(Identifier, foo);
protected:
- virtual void do_print () const;
+
virtual String do_str () const;
};
VIRTUAL_COPY_CONS(Identifier);\
virtual Class* access_content_ ## Class (bool copy_b) const;\
~Class ## _identifier();\
- virtual void do_print () const; \
+ \
virtual String do_str () const; \
}\
Lyric_combine_music (Music*, Music*);
virtual void transpose (Musical_pitch);
- virtual void do_print () const;
+
VIRTUAL_COPY_CONS(Music);
virtual Moment length_mom () const;
virtual Musical_pitch to_relative_octave (Musical_pitch);
Lyric_performer ();
protected:
- void do_print() const;
+
virtual bool do_try_music (Music* req_l);
virtual void do_process_music();
virtual void do_pre_move_processing ();
Music_output_def ();
virtual ~Music_output_def ();
virtual int get_next_default_count () const;
- virtual void print () const;
+
Global_translator *get_global_translator_p ();
Translator_group *get_group_translator_p (String type) const;
protected:
virtual Musical_pitch to_relative_octave (Musical_pitch);
- virtual void do_print() const;
+
};
#endif
Music_wrapper (Music*);
Music * element () const;
virtual void transpose (Musical_pitch);
- virtual void do_print () const;
+
VIRTUAL_COPY_CONS(Music);
virtual Moment length_mom () const;
Music (Music const &m);
Music();
protected:
- virtual void do_print() const;
+
DECLARE_SMOBS(Music,);
SCM immutable_property_alist_;
SCM mutable_property_alist_;
void up_to (int);
void down_to (int);
String str () const;
- void print () const;
+
SCM to_scm () const;
};
class Rhythmic_req : public virtual Request {
public:
Duration duration_;
- virtual void do_print () const;
+
bool do_equal_b (Request const*) const;
void compress (Moment);
VIRTUAL_COPY_CONS (Music);
Tremolo_req ();
int type_i_;
- virtual void do_print () const;
+
};
*/
class Lyric_req : public Rhythmic_req {
public:
- virtual void do_print () const;
+
String text_str_;
VIRTUAL_COPY_CONS(Music);
};
String articulation_str_;
protected:
virtual bool do_equal_b (Request const*) const;
- virtual void do_print () const;
+
VIRTUAL_COPY_CONS(Music);
};
protected:
VIRTUAL_COPY_CONS(Music);
virtual bool do_equal_b (Request const*)const;
- virtual void do_print () const;
+
};
/// transpose. #delta# is relative to central c.
virtual void transpose (Musical_pitch delta);
virtual bool do_equal_b (Request const*) const;
- virtual void do_print () const;
+
VIRTUAL_COPY_CONS(Music);
};
bool cautionary_b_;
Note_req();
protected:
- virtual void do_print () const;
+
bool do_equal_b (Request const*) const;
VIRTUAL_COPY_CONS(Music);
};
protected:
virtual void do_process_music ();
virtual bool do_try_music (Music *req_l) ;
- virtual void do_print () const;
+
virtual void do_pre_move_processing ();
virtual void process_acknowledged ();
Global_translator* global_translator_l ();
Paper_def (Paper_def const&);
Interval line_dimensions_int (int) const;
- void print () const;
+
Lookup const * lookup_l (int sz) const; // TODO naming
virtual int get_next_default_count () const;
static void reset_default_count();
Music * second_l () const;
virtual void transpose (Musical_pitch);
- virtual void do_print () const;
+
virtual Moment length_mom () const;
virtual Musical_pitch to_relative_octave (Musical_pitch);
virtual void compress (Moment);
public:
Musical_pitch last_pitch_;
- void do_print () const;
+
Relative_octave_music (Music*, Musical_pitch);
VIRTUAL_COPY_CONS(Music);
bool equal_b (Request const*) const;
protected:
virtual bool do_equal_b (Request const*) const;
- virtual void do_print() const;
+
};
Span_req();
protected:
virtual bool do_equal_b (Request const*) const;
- virtual void do_print() const;
+
VIRTUAL_COPY_CONS(Music);
};
SCM to_alist () const;
bool elem_b (String ) const;
bool elem_b (SCM s) const;
+
+ bool try_retrieve (SCM key, SCM *val) const;
+
Identifier *elem (String) const;
Identifier *elem (SCM) const;
void process();
void add_output (Music_output_def *def_p);
- void print() const;
private:
void run_translator (Music_output_def*);
};
--- /dev/null
+/*
+ symbol-cache.hh -- declare Symbol cacher.
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef SYMBOL_CACHE_HH
+#define SYMBOL_CACHE_HH
+
+#if 1
+
+/*
+ A per file cache: for each compilation unit, there is a separate
+ cache that maps the address of a string directly to a SCM value
+
+ */
+struct Symbol_cache_pair{
+ const char * key;
+ SCM val ;
+};
+
+static Symbol_cache_pair *private_symbol_cache;
+static Symbol_cache_pair *private_symbol_cache_end;
+
+static SCM
+symbol (const char *ch) __attribute__ ((unused));
+
+ SCM
+symbol (const char *ch)
+{
+ Symbol_cache_pair * lo = private_symbol_cache;
+ Symbol_cache_pair * hi = private_symbol_cache_end -1;
+
+ if (lo)
+ {
+ do
+ {
+ Symbol_cache_pair * mid = lo + (hi - lo) / 2 ;
+ if (mid->key > ch)
+ hi = mid;
+ else
+ lo = mid;
+ }
+ while ((hi - lo) > 1);
+ if (lo->key== ch)
+ return lo->val;
+ }
+
+
+ Symbol_cache_pair * p = private_symbol_cache;
+ for (; p < private_symbol_cache_end
+ && p->key < ch ; p++)
+ ;
+
+ int idx = p - private_symbol_cache;
+
+ SCM sym = gh_symbol2scm ((char*) ch);
+ scm_permanent_object (sym);
+
+ int sz = private_symbol_cache_end - private_symbol_cache;
+ sz ++ ;
+ private_symbol_cache
+ = (Symbol_cache_pair*) realloc (private_symbol_cache,
+ sizeof (Symbol_cache_pair)* sz);
+ private_symbol_cache_end = private_symbol_cache + sz;
+ for (p = private_symbol_cache_end -1;
+ p != private_symbol_cache + idx; p --)
+ *p = *(p - 1);
+
+ p->key = ch;
+ p->val = sym;
+
+ return sym;
+}
+#endif /* SYMBOL_CACHE_HH */
+#endif
~Tempo_performer();
protected:
- void do_print() const;
+
virtual bool do_try_music (Music* req_l);
virtual void do_process_music();
virtual void do_pre_move_processing ();
~Time_signature_performer();
protected:
- void do_print() const;
+
virtual bool do_try_music (Music* req_l);
virtual void do_process_music();
virtual void do_pre_move_processing ();
protected:
bool try_music_on_nongroup_children (Music *m);
- virtual void do_print () const;
+
virtual void do_process_music ();
virtual void do_add_processing ();
virtual bool do_try_music (Music* req_l);
Translator_group * daddy_trans_l_ ;
- void print () const;
+
/**
try to fit the request in this engraver
*/
virtual void do_add_processing ();
virtual bool do_try_music (Music *req_l);
- virtual void do_print () const;
+
virtual void do_pre_move_processing();
virtual void do_post_move_processing();
virtual void do_process_music () ;
public:
Musical_pitch transpose_to_pitch_;
- void do_print () const;
+
Transposed_music (Music*, Musical_pitch);
VIRTUAL_COPY_CONS(Music);
Score_element * it
= unsmob_element (get_property (ly_symbol2scm ("currentCommandColumn")));
-
staffline_p_->set_bound(RIGHT,it);
Engraver_group_engraver::typeset_element (staffline_p_);
staffline_p_ = 0;
lyrics_l () ->transpose (p);
}
-void
-Lyric_combine_music::do_print () const
-{
- music_l ()->print();
- lyrics_l () ->print ();
-}
Moment
Lyric_combine_music::length_mom () const
audio_p_ = 0;
}
-void
-Lyric_performer::do_print () const
-{
-#ifndef NPRINT
- if (lreq_arr_.size ())
- lreq_arr_[0]->print ();
-#endif
-}
void
Lyric_performer::do_process_music ()
void
init_moments ()
{
- scm_make_gsubr ("make-moment", 2 , 0, 0, (SCM(*)()) make_rational);
+ scm_make_gsubr ("make-moment", 2 , 0, 0, (Scheme_function_unknown) make_rational);
}
ADD_SCM_INIT_FUNC(moms,init_moments);
Music_output_def::find_translator_l (SCM name) const
{
String s = ly_scm2string (name);
+
+ SCM val =SCM_EOL;
if (translator_p_dict_p_->elem_b (s))
return translator_p_dict_p_->scm_elem (s);
-
- return SCM_EOL;
+ return val;
}
return dynamic_cast <Global_translator *> (tg);
}
-void
-Music_output_def::print () const
-{
-}
+
String
Music_output_def::get_default_output () const
unsmob_music (gh_car (s))->transpose (rq);
}
-void
-Music_sequence::do_print() const
-{
-#ifndef NPRINT
- for (SCM s = music_list (); gh_pair_p (s); s = gh_cdr (s))
- unsmob_music (gh_car (s))->print();
-#endif
-}
#include "music-wrapper.hh"
-void
-Music_wrapper::do_print () const
-{
- element ()->print ();
-}
+
void
Music_wrapper::transpose (Musical_pitch p)
{
}
-void
-Music::do_print() const
-{
-}
+
Moment
Music::length_mom () const
}
-void
-Music::print ()const
-{
-}
octave_i_ = o;
}
-void
-Musical_pitch::print () const
-{
-#ifndef NPRINT
- DEBUG_OUT << str ();
-#endif
-}
int
Musical_pitch::compare (Musical_pitch const &m1, Musical_pitch const &m2)
#include "debug.hh"
#include "music-list.hh"
-void
-Span_req::do_print () const
-{
-#ifndef NPRINT
- DEBUG_OUT << span_dir_;
-#endif
-}
Tremolo_req::Tremolo_req ()
{
type_i_ = 0;
}
-void
-Tremolo_req::do_print () const
-{
-#ifndef NPRINT
- DEBUG_OUT << "type " << type_i_ << '\n';
-#endif
-}
void
Melodic_req::transpose (Musical_pitch delta)
return Musical_pitch::compare (m1.pitch_, m2.pitch_);
}
-void
-Melodic_req::do_print () const
-{
- pitch_.print ();
-}
return rh && !compare (*this, *rh);
}
-void
-Rhythmic_req::do_print () const
-{
-#ifndef NPRINT
- DEBUG_OUT << "duration { " <<duration_.str () << "}";
-#endif
-}
Moment
duration_.compress (m);
}
-void
-Lyric_req::do_print () const
-{
-#ifndef NPRINT
- Rhythmic_req::do_print ();
- DEBUG_OUT << "text = " << text_str_;
-#endif
-}
bool
-void
-Note_req::do_print () const
-{
-#ifndef NPRINT
- Melodic_req::do_print ();
- if (cautionary_b_)
- {
- DEBUG_OUT << " force cautionary accidental\n";
- }
- else if (forceacc_b_)
- {
- DEBUG_OUT << " force accidental\n";
- }
- Rhythmic_req::do_print ();
-#endif
-}
bool
span_dir_ = CENTER;
}
-void
-Text_script_req::do_print () const
-{
- DEBUG_OUT << "text" << text_str_
- << ", style = " << style_str_;
-}
bool
Text_script_req::do_equal_b (Request const* r) const
return t && t->text_str_ == text_str_ && t->style_str_ == style_str_;
}
-void
-Articulation_req::do_print () const
-{
- DEBUG_OUT << articulation_str_;
-}
bool
Articulation_req::do_equal_b (Request const* r) const
SCM sym = ly_symbol2scm (s.ch_C());
for (int i = scope_l_arr_.size (); i--; )
- if (scope_l_arr_[i]->elem_b (sym))
- return scope_l_arr_[i]->scm_elem(sym);
+ {
+ SCM val = SCM_UNSPECIFIED;
+ if (scope_l_arr_[i]->try_retrieve (sym, &val))
+ return val;
+ }
return SCM_UNSPECIFIED;
}
{
}
-void
-Note_performer::do_print () const
-{
-#ifndef NPRINT
- if (note_req_l_arr_.size()>0)
- for(int i=0;i<note_req_l_arr_.size();i++)
- note_req_l_arr_[i]->print ();
-#endif
-}
+
void
Note_performer::do_process_music ()
Real
Paper_def::get_realvar (SCM s) const
{
- if (!scope_p_->elem_b (s))
+ SCM val ;
+ if (!scope_p_->try_retrieve (s, &val))
{
programming_error ("unknown paper variable: " + ly_symbol2string (s));
return 0.0;
}
- SCM val = scope_p_->scm_elem (s);
+
if (gh_number_p (val))
{
return gh_scm2double (val);
lookup_alist_ = scm_assq_set_x(lookup_alist_, gh_int2scm (i), l);
}
-
-
-void
-Paper_def::print () const
-{
-#ifndef NPRINT
- Music_output_def::print ();
- if (flower_dstream)
- gh_display (lookup_alist_);
-#endif
-}
-
Lookup const *
Paper_def::lookup_l (int i) const
{
second_l () ->transpose (p);
}
-void
-Part_combine_music::do_print () const
-{
- first_l ()->print();
- second_l () ->print ();
-}
+
Moment
Part_combine_music::length_mom () const
audio_elem_p_list_ = new Killing_cons<Audio_element> (p, audio_elem_p_list_);
}
-void
-Performance::print() const
-{
-#ifndef NPRINT
- DEBUG_OUT << "Performance { ";
- DEBUG_OUT << "Items: ";
- for (Cons<Audio_element>* i =audio_elem_p_list_; i; i = i->next_)
- i->car_->print ();
- DEBUG_OUT << "}";
-#endif
-}
void
Performance::process()
{
- print ();
-
String out = midi_l_->get_default_output ();
if (out.empty_b ())
{
#include "dictionary.hh"
#include "score-element.hh"
#include "scm-hash.hh"
+#include "translator-group.hh"
/*
JUNKME: should use pushproperty everywhere.
UGH. Junk Dictionary
*/
Scheme_hash_table *prop_dict_; // junkme
- void apply_properties (SCM, Score_element*);
+ void apply_properties (SCM, Score_element*, Translator_group *origin);
protected:
virtual void acknowledge_element (Score_element_info ei);
{
prop_dict_ = new Scheme_hash_table;
- SCM plist = get_property ("Generic_property_list");
+ SCM plist = get_property (ly_symbol2scm ("Generic_property_list"));
for (; gh_pair_p (plist); plist = gh_cdr (plist))
{
SCM elt_props = gh_car (plist);
{
if (prop_dict_->try_retrieve (gh_car (ifs), &props))
{
- apply_properties (props,i.elem_l_);
+ apply_properties (props,i.elem_l_, i.origin_trans_l_->daddy_trans_l_);
}
}
if (prop_dict_->try_retrieve (ly_symbol2scm ("all"), &props))
{
- apply_properties (props, i.elem_l_);
+ apply_properties (props, i.elem_l_, i.origin_trans_l_->daddy_trans_l_);
}
}
void
-Property_engraver::apply_properties (SCM p, Score_element *e)
+Property_engraver::apply_properties (SCM p, Score_element *e, Translator_group*origin)
{
for (; gh_pair_p (p); p = gh_cdr (p))
{
; // Not defined in context.
else if (gh_apply (type_p, scm_listify (val, SCM_UNDEFINED))
== SCM_BOOL_T) // defined and right type: do it
- e->set_elt_property (elt_prop_sym, val);
+ {
+ e->set_elt_property (elt_prop_sym, val);
+
+ String msg = "Property_engraver is deprecated. Use\n \\property "
+ + origin->type_str_
+ + ".basicXXXXProperties"
+ + " \\push #'"
+ + ly_symbol2string (elt_prop_sym)
+ + " = #";
+ warning (msg);
+ scm_display (val, scm_current_error_port ());
+ }
else
/*
last_pitch_ = element ()->to_relative_octave (def);
}
-void
-Relative_octave_music::do_print () const
-{
- Music_wrapper::do_print ();
- DEBUG_OUT << "default pitch: " << last_pitch_.str ();
-}
#include "request.hh"
#include "debug.hh"
-void
-Request::do_print() const
-{
-}
+
bool
Request::equal_b (Request const* r) const
{
return id_dict_->to_alist ();
}
+
+bool
+Scope::try_retrieve (SCM k , SCM *v)const
+{
+ return id_dict_->try_retrieve (k, v);
+}
static SCM interfaces_sym;
-#define UNDEFINED_ARG
static void
init_functions ()
{
interfaces_sym = scm_permanent_object (ly_symbol2scm ("interfaces"));
- scm_make_gsubr ("ly-get-elt-property", 2, 0, 0, (SCM(*)(UNDEFINED_ARG))ly_get_elt_property);
- scm_make_gsubr ("ly-set-elt-property", 3, 0, 0, (SCM(*)(UNDEFINED_ARG))ly_set_elt_property);
- scm_make_gsubr ("ly-get-spanner-bound", 2 , 0, 0, (SCM(*)(UNDEFINED_ARG)) spanner_get_bound);
+ scm_make_gsubr ("ly-get-elt-property", 2, 0, 0, (Scheme_function_unknown)ly_get_elt_property);
+ scm_make_gsubr ("ly-set-elt-property", 3, 0, 0, (Scheme_function_unknown)ly_set_elt_property);
+ scm_make_gsubr ("ly-get-spanner-bound", 2 , 0, 0, (Scheme_function_unknown) spanner_get_bound);
}
bool
pscore_p_ = new Paper_score;
pscore_p_->paper_l_ = dynamic_cast<Paper_def*>(output_def_l_);
- SCM props = get_property(ly_symbol2scm ("basicLineOfScoreProperties"));
+ SCM props = get_property (ly_symbol2scm ("basicLineOfScoreProperties"));
pscore_p_->typeset_line (new Line_of_score (props));
}
if (!unsmob_music (music_))
return;
- print();
+
for (int i=0; i < def_p_arr_.size (); i++)
{
if (no_paper_global_b
-void
-Score::print() const
-{
-#ifndef NPRINT
- DEBUG_OUT << "score {\n";
- // music_p_ -> print ();
- for (int i=0; i < def_p_arr_.size (); i++)
- def_p_arr_[i]->print();
- DEBUG_OUT << "}\n";
-#endif
-}
void
Score::add_output (Music_output_def *pap_p)
}
else
{
- if (flower_dstream && !flower_dstream->silent_b ("do_scores"))
- is_p->print ();
is_p->process();
}
}
Real length = curve_.control_[3][X_AXIS];
Real beautiful = beauty * length * slur_height (length, h_inf_, r_0_);
- DEBUG_OUT << to_str ("Beautiful: %f\n", beautiful);
- DEBUG_OUT << to_str ("Length: %f\n", length);
- // DEBUG_OUT << to_str ("D-height: %f\n", default_height);
- DEBUG_OUT << to_str ("FitFac: %f\n", fit_factor ());
if (fit_factor () > 1.0)
blow_fit ();
<? abs ((curve_.control_[3][X_AXIS]
- curve_.control_[2][X_AXIS]) / da[1]));
- DEBUG_OUT << to_str ("pct: %f\n", pct);
- DEBUG_OUT << to_str ("u: %f\n", u);
-
- DEBUG_OUT << to_str ("da: (%f, %f)\n", da[0], da[1]);
- DEBUG_OUT << to_str ("da*u: (%f, %f)\n", da[0]*u*pct, da[1]*u*pct);
- DEBUG_OUT << to_str ("cx: (%f, %f)\n", curve_.control_[1][X_AXIS],
- curve_.control_[2][X_AXIS]);
-
curve_.control_[1][X_AXIS] -= da[0] * u * pct;
curve_.control_[2][X_AXIS] -= da[1] * u * pct;
}
Real area = enclosed_area_f ();
- DEBUG_OUT << to_str ("Exarea: %f\n", area);
}
if (gh_string_p (s))
{
-// if (i.elem_l_->has_interface (ly_symbol2scm ("lyric-syllable-interface")))
+// if (i.elem_l_->has_interface (symbol ("lyric-syllable-interface")))
// Tried catching lyric items to generate stanza numbers, but it spoils lyric spacing.
if (Bar::has_interface (i.elem_l_) || now_mom() == Moment(0))
// Works, but requires bar_engraver in LyricVoice context apart from at beginning.
// Is there any score element we can catch that will do the trick?
-// if (! i.elem_l_->has_interface (ly_symbol2scm ("lyric-syllable-interface")) ||
+// if (! i.elem_l_->has_interface (symbol ("lyric-syllable-interface")) ||
// now_mom() == Moment(0))
// What happens if we try anything at all EXCEPT a lyric? Is there anything else?
// Not sure what it's catching, but it still mucks up lyrics.
--- /dev/null
+/*
+ symbol-cache.cc -- implement a cache for literal symbols, eg
+ symbol("foo-bar")
+
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#include <map>
+#include "lily-guile.hh"
+
+#if 0
+
+typedef map<const char*, SCM> Literal_symbol_map;
+Literal_symbol_map literal_map;
+
+
+SCM
+symbol (const char*s)
+{
+ Literal_symbol_map::const_iterator i = literal_map.find (s);
+ if (i != literal_map.end())
+ return (*i).second;
+
+ SCM sym = gh_symbol2scm ((char*)s);
+ scm_permanent_object (sym);
+ literal_map[s] = sym;
+ return sym;
+}
+
+
+/*
+ This is a gory trick to cache the value gh_symbol2scm (), without
+ cluttering up the C code with snarf macros.
+
+ You should *ONLY* use symbol() for arguments that are literal
+ strings!
+
+ without (wtk1-fugue2)
+
+ real 0m20.157s
+ user 0m19.800s
+ sys 0m0.140s
+
+ with: (per file.)
+
+ real 0m19.284s
+ user 0m18.630s
+ sys 0m0.190s
+
+
+ global with STL map
+
+ real 0m20.616s
+ user 0m19.360s
+ sys 0m0.080s
+
+ global with binsearch.
+
+
+ real 0m19.352s
+ user 0m18.710s
+ sys 0m0.230s
+ local binsearch
+
+ user 18.8
+
+ local with binsearch, and other optimizations.
+
+ 17.7
+*/
+#endif
+
+
{
}
-void
-Tempo_performer::do_print () const
-{
-#ifndef NPRINT
- if (tempo_req_l_)
- tempo_req_l_->print ();
-#endif
-}
void
Tempo_performer::do_process_music ()
info_.coding_scheme = header_length > 2
? get_bcpl_str () : "unspecified";
- DEBUG_OUT << format_str ("TFM checksum = %u, design_size = %fpt, coding scheme = `%s'.\n",
- info_.checksum,
- info_.design_size,
- info_.coding_scheme.ch_C ());
}
/* Although TFM files are only usable by TeX if they have at least seven
for (Char_code i = 2; i <= header_.param_word_count; i++)
info_.parameters[i - 1] = get_U32_fix_scaled_f ();
-#ifdef PRINT
- for (Char_code i = 1; i <= header_.param_word_count; i++)
- DEBUG_OUT << format_str ("TFM parameter %d: %.3f", i, info_.parameters[i - 1]);
-#endif
}
/* Read every character in the TFM file, storing the result in the
`char_info_word'). */
tfm_char.exists_b_ = width_index != 0;
-#ifdef PRINT
- DEBUG_OUT << format_str (" width = %f, height = %f, ",
- tfm_char.width_, tfm_char.height_);
- DEBUG_OUT << format_str ("depth = %f, ic = %f.\n",
- tfm_char.depth, tfm_char.italic_correction);
-#endif
-
if (tag == 1)
{
input_.seek_ch_C (header_.lig_kern_pos + remainder * 4);
bool kern_step_b = input_.get_U8 () >= KERN_FLAG;
U8 remainder = input_.get_U8 ();
-#ifdef PRINT
- DEBUG_OUT << format_str (" if next = %u (%c), ", next_char, next_char);
-#endif
if (kern_step_b)
{
kern_arr_p->push (kern_element);
-#ifdef PRINT
- DEBUG_OUT << format_str ("kern %f.\n", kern_element.kern);
-#endif
}
else
{
ligature_element.ligature = remainder;
ligature_arr_p->push (ligature_element);
-#ifdef PRINT
- DEBUG_OUT format_str ("ligature %d (hex %x).\n",
- ligature_element.ligature,
- ligature_element.ligature);
-#endif
}
} while (!end_b);
}
{
}
-void
-Time_signature_performer::do_print () const
-{
-#ifndef NPRINT
- if (time_signature_req_l_)
- time_signature_req_l_->print ();
-#endif
-}
void
Time_signature_performer::do_process_music ()
static_each (trans_group_list_, method);
}
-void
-Translator_group::do_print() const
-{
-#ifndef NPRINT
-#endif
-}
+
void
Translator_group::do_add_processing ()
SCM
Translator_group::get_property (SCM sym) const
{
- if (properties_dict ()->elem_b (sym))
- {
- return properties_dict ()->get (sym);
- }
+ SCM val =SCM_UNDEFINED;
+ if (properties_dict ()->try_retrieve (sym, &val))
+ return val;
if (daddy_trans_l_)
return daddy_trans_l_->get_property (sym);
- return SCM_UNDEFINED;
+ return val;
}
void
{
}
-void
-Translator::print () const
-{
-#ifndef NPRINT
- DEBUG_OUT << classname (this) << " {";
- if (classname (this) != type_str_)
- DEBUG_OUT << "type = " << type_str_;
- do_print ();
- DEBUG_OUT << "}\n";
-#endif
-}
-
-void
-Translator::do_print () const
-{
-}
p->transpose (pit);
}
-void
-Transposed_music::do_print () const
-{
- Music_wrapper::do_print ();
- DEBUG_OUT << "transposition pitch: " << transpose_to_pitch_.str ();
-}
Musical_pitch
Transposed_music::to_relative_octave (Musical_pitch p)
volta_span_p_ = 0;
}
- volta_span_p_ = new Spanner (get_property ("basicVoltaSpannerProperties"));
+ volta_span_p_ = new Spanner (get_property ("basicVoltaBracketProperties"));
Volta_spanner::set_interface (volta_span_p_);
announce_element (volta_span_p_,0);
volta_span_p_->set_elt_property ("text", str);
README_FILES = DEDICATION COPYING NEWS CHANGES ROADMAP
README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt
IN_FILES := $(wildcard *.in)
-EXTRA_DIST_FILES = dstreamrc lilypond-mode.el vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES)
+EXTRA_DIST_FILES = lilypond-mode.el vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES)
NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
# bootstrap stepmake:
AUTOGENERATE="This file was automatically generated by configure"
AC_SUBST(AUTOGENERATE)
- STATE_VECTOR=`ls make/STATE-VECTOR 2>/dev/null`
- if test "x$STATE_VECTOR" != "x"; then
- STATE_VECTOR="\$(depth)/$STATE_VECTOR"
- fi
- AC_SUBST(STATE_VECTOR)
-
CONFIGSUFFIX=
AC_ARG_ENABLE(config,
[ enable-config=FILE put configure settings in config-FILE.make],