This documents serious bugs
+Send bug reports to bug-gnu-music@gnu.org. For help and questions use
+help-gnu-music@gnu.org and gnu-music-discuss@gnu.org. Please consult
+the faq before mailing your problems.
+
********
[LinuxPPC-R5, egcs-1.1.2-12c]
*dest++ = *src++;
-Bug report filed, fixed in egcs-1.1.2-12f.
+Bug report filed, fixed in egcs-1.1.2-12f or gcc-2.95-0a.
Although we've currently got a workaround in place, the compiler
is buggy; you should upgrade:
Separate instructions on building for W32 are avaible
url(in the file README-W32.yo)(../../DOEXPAND(outdir)/README-W32.html).
+sect(BUGS)
+
+Send bug reports to bug-gnu-music@gnu.org. For help and questions use
+help-gnu-music@gnu.org and gnu-music-discuss@gnu.org. Please consult
+the faq before mailing your problems.
+
sect(AUTHORS)
nemail(Han-Wen Nienhuys)(hanwen@cs.uu.nl)
a script to do this for you is in file(buildscripts/clean-fonts.sh)
+sect(BUGS)
+
+Send bug reports to bug-gnu-music@gnu.org. For help and questions use
+help-gnu-music@gnu.org and gnu-music-discuss@gnu.org. Please consult
+the faq before mailing your problems.
+
+
sect(CDROM DISTRIBUTIONS)
If you have received LilyPond on a cdrom, chances are that development
-
-WHAT'S NEW?
-
-* Large cleanups, enhanced design and GUILE integration for smaller
- memory footprint and more flexible code.
-
-* Direct output to PostScript (optional), PDFTeX or as GUILE script
- (default output still to plain TeX).
-
-* Convertors for ABC and MUP formats.
-
-* Font: now available as scalable PostScript. New glyphs: time
- signature, more note heads.
-
-* Enhanced input: semi-automatic beaming, (nested) tuplets, (nested)
- repeats, chordnames, automatic Lyrics
- durations.
-
-* Grace notes, volta brackets, multiple styles for note heads and
- time signatures, breathing signs, lyric extenders, cross staff
- beaming and slurring.
-
-* --safe option for the paranoid.
-
-* More elegant spacing. Text is spaced exactly.
-
-* Lots of bugfixes.
-
-
+pl 0.jcn1
+ - gcc-2.95 nitpicks
+ - added pointers to mailing lists in toplevel docs
MAJOR_VERSION=1
MINOR_VERSION=2
PATCH_LEVEL=0
-MY_PATCH_LEVEL=jbr1
+MY_PATCH_LEVEL=jcn1
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
template<class V>
-class Dictionary_iter<V> : public Hash_table_iter<String,V>
+class Dictionary_iter : public Hash_table_iter<String,V>
{
public:
Dictionary_iter (Dictionary<V> const &d)
template<class T>
class Link_array : private Array<void *>
{
- static default_compare (T *const& p1, T *const&p2) {
+ static int default_compare (T *const& p1, T *const&p2) {
/* can't do p1 -p2, since T might be an incomplete type */
if (p1 < p2)
return -1 ;
Text_record() { } // needed because of other ctor
/// report an error in this line.
- message (String s) {
+ void message (String s) {
cerr << '\n'<< filename << ": "<< line_no << s << "\n";
}
String operator[](int j) {
}
char peek() {
if (eof_b ())
- return -1;
+ return (char)-1;
char c = get();
unget (c);
return c;
};
*/
-#define VIRTUAL_COPY_CONS(base) virtual base *clone () const { return new typeof(*this) (*this); }
+// fix constness: gcc-2.95 is correct in defining
+// typeof (*this)
+// in a const member function to be const
+
+#if 0
+#define VIRTUAL_COPY_CONS(base) \
+ virtual base *clone () const \
+ { \
+ return new typeof(*this) (*this); \
+ }
+#else
+#define VIRTUAL_COPY_CONS(base) \
+ virtual base* clone_const_helper () \
+ { \
+ return new typeof (*this) (*this); \
+ } \
+ virtual base* clone () const \
+ { \
+ base* urg = (base*)this; \
+ return urg->clone_const_helper (); \
+ }
#endif
+
+#endif /* VIRTUAL_METHODS_HH */
char * found= (char*) memchr (me_l, set[i], n );
if (found)
{
- return found - me_l;
+ return found - (char const*)me_l;
}
}
return -1;
Axis_group_element::extra_extent (Axis a )const
{
Interval g;
- purge_extra (); // Yeah yeah, const correctness.
+ Axis_group_element* urg = (Axis_group_element*)this;
+ urg->purge_extra (); // Yeah yeah, const correctness.
for (int i=0; i < extra_elems_.size (); i++)
{
Interval ge = extra_elems_[i]->extent (a);
axis_ = Y_AXIS;
type_ = "barNumber";
visibility_lambda_
- = gh_eval_str ("postbreak_only_visibility");
+ = ly_ch_C_eval_scm ("postbreak_only_visibility");
}
void
text_p_ =0;
hang_on_clef_b_ = false;
visibility_lambda_
- = gh_eval_str ("non_postbreak_visibility");
+ = ly_ch_C_eval_scm ("non_postbreak_visibility");
}
void
String visnam = String(name()) + "_visibility";
spanbar_p_->set_elt_property (visibility_lambda_scm_sym,
- gh_eval_str (visnam.ch_C()));
+ ly_ch_C_eval_scm (visnam.ch_C()));
if (use_priority_b_)
{
*/
Direction beam_dir;
- Direction neutral_dir = (int)paper_l ()->get_var ("stem_default_neutral_direction");
+ Direction neutral_dir = (Direction)(int)paper_l ()->get_var ("stem_default_neutral_direction");
Dir_algorithm a = (Dir_algorithm)rint(paper_l ()->get_var ("beam_dir_algorithm"));
switch (a)
SCM symbol_list = SCM_EOL;
Array<Real> dists;
- SCM current_origin = gh_str02scm ("");
+ SCM current_origin = ly_ch_C_to_scm ("");
for (int i=0; i <= elems.size (); i++)
{
Score_element *next_elt = i < elems.size ()
next_origin = next_elt->get_elt_property (origin_scm_sym);
next_origin =
(next_origin == SCM_BOOL_F)
- ? gh_str02scm ("")
+ ? ly_ch_C_to_scm ("")
: SCM_CDR (next_origin);
}
else
- next_origin = gh_str02scm ("begin-of-note");
+ next_origin = ly_ch_C_to_scm ("begin-of-note");
SCM extra_space
= scm_eval (scm_listify (ly_symbol ("break-align-spacer"),
warning bells about missing Y refpoints go off later on.
*/
hg->dim_cache_[Y_AXIS]->parent_l_ = dim_cache_[Y_AXIS];
- hg->set_elt_property (ly_symbol("origin"), gh_str02scm (it->name()));
+ hg->set_elt_property (ly_symbol ("origin"), ly_ch_C_to_scm (it->name ()));
pscore_l_->typeset_element (hg);
add_element_priority (hg, priority);
set_elt_property (breakable_scm_sym, SCM_BOOL_T);
set_elt_property (break_priority_scm_sym, gh_int2scm (-4));
set_elt_property (visibility_lambda_scm_sym,
- gh_eval_str ("non_postbreak_visibility"));
+ ly_ch_C_eval_scm ("non_postbreak_visibility"));
}
void
}
void
-Chord::find_additions_and_subtractions(Array<Musical_pitch>* add_arr_p, Array<Musical_pitch>* sub_arr_p)
+Chord::find_additions_and_subtractions(Array<Musical_pitch>* add_arr_p, Array<Musical_pitch>* sub_arr_p) const
{
Musical_pitch tonic = pitch_arr_[0];
/*
create_clef();
if(def)
clef_p_->set_elt_property(visibility_lambda_scm_sym,
- gh_eval_str ("postbreak_only_visibility"));
+ ly_ch_C_eval_scm ("postbreak_only_visibility"));
}
/* ugh; should make Clef_referenced baseclass */
String clefstyle = get_property ("clefStyle", 0);
if (clefstyle.length_i ())
c->set_elt_property (style_scm_sym,
- gh_str02scm (clefstyle.ch_C()));
+ ly_ch_C_to_scm (clefstyle.ch_C()));
announce_element (Score_element_info (c, clef_req_l_));
clef_p_ = c;
Dimension_cache *
Dimension_cache::common_group (Dimension_cache const* s) const
{
- Link_array<Dimension_cache const> my_groups;
- for (Dimension_cache const *c = this;
- c ; c = c->parent_l_)
- my_groups.push (c);
-
+ Link_array<Dimension_cache> my_groups;
+ for (Dimension_cache const *c = this; c ; c = c->parent_l_)
+ my_groups.push ((Dimension_cache*)c);
Dimension_cache const *common=0;
- for (Dimension_cache const * d = s;
- !common && d;
- d = d->parent_l_)
- common = my_groups.find_l (d);
+ for (Dimension_cache const * d = s; !common && d; d = d->parent_l_)
+ common = (Dimension_cache const*)my_groups.find_l (d);
return (Dimension_cache*)common;
}
*/
#include "debug.hh"
#include "crescendo.hh"
-#include "dynamic-engraver.hh"
#include "musical-request.hh"
#include "lookup.hh"
#include "paper-def.hh"
Graphical_axis_group at one time. */
Graphical_axis_group::Graphical_axis_group(Graphical_axis_group const&s)
{
+#if 0
+ /*
+ gcc-2.95: huh? why can't i assign a const value to a var?
+ graphical-axis-group.cc:20: incompatible types in assignment of `const Axis[2]' to `Axis[2]'
+ */
axes_ = s.axes_;
+#else
+ axes_[0] = s.axes_[0];
+ axes_[1] = s.axes_[1];
+#endif
ordered_b_ = s.ordered_b_;
}
}
char const*
-Includable_lexer::here_ch_C ()
+Includable_lexer::here_ch_C () const
{
if (include_stack_.empty ())
return 0;
-/*
- bar-align-engraver.hh -- declare
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef BAR_ALIGN_GRAV_HH
-#define BAR_ALIGN_GRAV_HH
-
-#endif // BAR_ALIGN_GRAV_HH
*/
class Bar_script_engraver : public Engraver
{
+public:
+ VIRTUAL_COPY_CONS(Translator);
protected:
Staff_side_item* staff_side_p_;
Text_item* text_p_;
-/*
- beam-swallow-trans.hh -- declare
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#ifndef BEAM_SWALLOW_TRANS_HH
-#define BEAM_SWALLOW_TRANS_HH
-
-
-#endif /* BEAM_SWALLOW_TRANS_HH */
-
int find_tonic_i () const;
int find_pitch_i (Musical_pitch p) const;
int find_notename_i (Musical_pitch p) const;
- void find_additions_and_subtractions(Array<Musical_pitch>* add_arr_p, Array<Musical_pitch>* sub_arr_p);
+ void find_additions_and_subtractions(Array<Musical_pitch>* add_arr_p, Array<Musical_pitch>* sub_arr_p) const;
Array<Musical_pitch> pitch_arr_;
};
-/*
- dynamic-engraver.hh -- declare Dynamic_engraver
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef DYNAMIC_GRAV_HH
-#define DYNAMIC_GRAV_HH
-
-#endif // DYNAMIC_GRAV_HH
void new_input (String name, String data, Sources*);
void add_lexed_char (int);
- char const * here_ch_C ();
+ char const * here_ch_C () const;
};
#include <libguile.h>
#include "direction.hh"
+SCM ly_ch_C_to_scm (char const*c);
+SCM ly_ch_C_eval_scm (char const*c);
SCM ly_symbol (String name);
String symbol_to_string (SCM);
SCM ly_set_scm (String name , SCM val);
Duration duration_;
virtual void do_print () const;
- bool do_equal_b (Request*) const;
+ bool do_equal_b (Request const*) const;
void compress (Moment);
virtual Moment length_mom () const;
static int compare (Rhythmic_req const&,Rhythmic_req const&);
public:
String articulation_str_;
protected:
- virtual bool do_equal_b (Request*) const;
+ virtual bool do_equal_b (Request const*) const;
virtual void do_print () const;
VIRTUAL_COPY_CONS(Music);
};
String style_str_;
protected:
VIRTUAL_COPY_CONS(Music);
- virtual bool do_equal_b (Request*)const;
+ virtual bool do_equal_b (Request const*)const;
virtual void do_print () const;
};
protected:
/// transpose. #delta# is relative to central c.
virtual void transpose (Musical_pitch delta);
- virtual bool do_equal_b (Request*) const;
+ virtual bool do_equal_b (Request const*) const;
virtual void do_print () const;
VIRTUAL_COPY_CONS(Music);
};
Note_req();
protected:
virtual void do_print () const;
- bool do_equal_b (Request*) const;
+ bool do_equal_b (Request const*) const;
VIRTUAL_COPY_CONS(Music);
};
public:
virtual ~Request(){}
VIRTUAL_COPY_CONS(Music);
- bool equal_b (Request*) const;
+ bool equal_b (Request const*) const;
protected:
- virtual bool do_equal_b (Request*) const;
+ virtual bool do_equal_b (Request const*) const;
virtual void do_print() const;
};
Span_req();
protected:
- virtual bool do_equal_b (Request*) const;
+ virtual bool do_equal_b (Request const*) const;
virtual void do_print() const;
VIRTUAL_COPY_CONS(Music);
};
-/*
- type-swallow-engraver.hh -- declare Type_swallow_translator
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef TYPESWALLOW_GRAV_HH
-#define TYPESWALLOW_GRAV_HH
-
-#include "translator.hh"
-
-/** eat a certain type of request.
- (Duh, it's good for your skin)
- */
-class Type_swallow_translator : public virtual Translator
-{
-protected:
- String swallow_str_;
- bool do_try_music (Music*);
-public:
- VIRTUAL_COPY_CONS(Translator);
-};
-
-#define DECLARE_REQUEST_SWALLOWER(TYPE) \
-struct TYPE ## _swallow_translator : public Type_swallow_translator {\
- TYPE ## _swallow_translator() { \
- swallow_str_ = #TYPE;\
- }\
- \
- VIRTUAL_COPY_CONS(Translator);\
-};\
-ADD_THIS_TRANSLATOR(TYPE ## _swallow_translator);\
-
-#endif // TYPESWALLOW_GRAV_HH
-
--- /dev/null
+/*
+ type-swallow-engraver.hh -- declare Type_swallow_translator
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef TYPESWALLOW_GRAV_HH
+#define TYPESWALLOW_GRAV_HH
+
+#include "translator.hh"
+
+/** eat a certain type of request.
+ (Duh, it's good for your skin)
+ */
+class Type_swallow_translator : public virtual Translator
+{
+protected:
+ String swallow_str_;
+ bool do_try_music (Music*);
+public:
+ VIRTUAL_COPY_CONS(Translator);
+};
+
+#define DECLARE_REQUEST_SWALLOWER(TYPE) \
+struct TYPE ## _swallow_translator : public Type_swallow_translator {\
+ TYPE ## _swallow_translator() { \
+ swallow_str_ = #TYPE;\
+ }\
+ \
+ VIRTUAL_COPY_CONS(Translator);\
+};\
+ADD_THIS_TRANSLATOR(TYPE ## _swallow_translator);\
+
+#endif // TYPESWALLOW_GRAV_HH
+
if (def)
{
item_p_->set_elt_property (visibility_lambda_scm_sym,
- gh_eval_str ("postbreak_only_visibility"));
+ ly_ch_C_eval_scm ("postbreak_only_visibility"));
}
}
#include "file-path.hh"
#include "debug.hh"
+SCM
+ly_ch_C_to_scm (char const*c)
+{
+ // this all really sucks, guile should take char const* arguments!
+ return gh_str02scm ((char*)c);
+}
+
+SCM
+ly_ch_C_eval_scm (char const*c)
+{
+ // this all really sucks, guile should take char const* arguments!
+ return gh_eval_str ((char*)c);
+}
+
/*
scm_m_quote doesn't use any env, but needs one for a good signature in GUILE.
SCM
ly_symbol (String name)
{
- return gh_car (scm_intern (name.ch_C(), name.length_i()));
+ return gh_car (scm_intern ((char*)name.ch_C(), name.length_i()));
}
String
SCM
ly_set_scm (String name, SCM val)
{
- return scm_sysintern (name.ch_C(), val);
+ return scm_sysintern ((char*)name.ch_C(), val);
}
Simple_file_storage f(s);
- gh_eval_str ((char *) f.ch_C());
+ ly_ch_C_eval_scm ((char *) f.ch_C());
*mlog << ']' << flush;
}
Simple_file_storage f(s);
- return gh_str02scm (f.ch_C());
+ return ly_ch_C_to_scm (f.ch_C());
}
void
void
init_functions ()
{
- scm_make_gsubr ("ly-warn", 1, 0, 0, ly_warning);
- scm_make_gsubr ("ly-gulp-file", 1,0, 0, ly_gulp_file);
+ scm_make_gsubr ("ly-warn", 1, 0, 0, (SCM(*)(...))ly_warning);
+ scm_make_gsubr ("ly-gulp-file", 1,0, 0, (SCM(*)(...))ly_gulp_file);
}
extern void init_symbols ();
/*
UGH.
*/
- SCM l = gh_eval_str (("(style-to-cmr \"" + style + "\")").ch_C());
+ SCM l = ly_ch_C_eval_scm (("(style-to-cmr \"" + style + "\")").ch_C());
if (l != SCM_BOOL_F)
{
style = ly_scm2string (SCM_CDR(l)) +to_str ((int)font_h);
brace_count ++;
else if (text[i] == '}')
brace_count --;
- Character_metric *c = afm_l->get_char ((unsigned char)text[i],false);
+ Character_metric *c = (Character_metric*)afm_l->get_char ((unsigned char)text[i],false);
w += c->dimensions()[X_AXIS].length ();
ydims.unite (c->dimensions()[Y_AXIS]);
Atom at (gh_list (text_scm_sym,
- gh_str02scm (text.ch_C()),
+ ly_ch_C_to_scm (text.ch_C()),
SCM_UNDEFINED));
at.font_ = ly_symbol (style);
at.magn_ = gh_int2scm (font_mag);
void
-main_prog (int argc, char **argv)
+main_prog (int, char**)
{
/*
need to do this first. Engravers use lily.scm contents.
#ifdef WINNT
gh_enter (argc, argv, main_prog);
#else
- gh_enter (argc, argv, (void(*)())main_prog);
+ gh_enter (argc, argv, (void(*)(...))main_prog);
#endif
return 0; // unreachable
mark_req_l_ = 0;
axis_ = Y_AXIS;
type_ = "mark";
- visibility_lambda_ = gh_eval_str ("mark-visibility");
+ visibility_lambda_ = ly_ch_C_eval_scm ("mark-visibility");
}
void
mmrest_p_ = new Multi_measure_rest;
if(dynamic_cast<Repetitions_req *> (multi_measure_req_l_))
mmrest_p_->set_elt_property (alt_symbol_scm_sym,
- gh_str02scm("scripts-repeatsign"));
+ ly_ch_C_to_scm ("scripts-repeatsign"));
announce_element (Score_element_info (mmrest_p_, multi_measure_req_l_));
start_measure_i_ = time->bars_i_;
}
bool
-Melodic_req::do_equal_b (Request*r) const
+Melodic_req::do_equal_b (Request const* r) const
{
- Melodic_req* m= dynamic_cast <Melodic_req *> (r);
+ Melodic_req const* m= dynamic_cast <Melodic_req const*> (r);
return m&& !compare (*m, *this);
}
}
bool
-Rhythmic_req::do_equal_b (Request*r) const
+Rhythmic_req::do_equal_b (Request const* r) const
{
- Rhythmic_req* rh = dynamic_cast <Rhythmic_req *> (r);
+ Rhythmic_req const* rh = dynamic_cast <Rhythmic_req const*> (r);
return rh && !compare (*this, *rh);
}
bool
-Note_req::do_equal_b (Request*r) const
+Note_req::do_equal_b (Request const* r) const
{
- Note_req *n = dynamic_cast<Note_req*> (r);
+ Note_req const* n = dynamic_cast<Note_req const*> (r);
return n&& Rhythmic_req::do_equal_b (n) && Melodic_req::do_equal_b (n);
}
bool
-Span_req::do_equal_b (Request*r) const
+Span_req::do_equal_b (Request const*r) const
{
- Span_req * s = dynamic_cast <Span_req *> (r);
+ Span_req const* s = dynamic_cast <Span_req const*> (r);
return s && span_dir_ == s->span_dir_;
}
}
bool
-Text_script_req::do_equal_b (Request *r) const
+Text_script_req::do_equal_b (Request const* r) const
{
- Text_script_req * t = dynamic_cast<Text_script_req*>(r);
+ Text_script_req const* t = dynamic_cast<Text_script_req const*> (r);
return t && t->text_str_ == text_str_ && t->style_str_ == style_str_;
}
}
bool
-Articulation_req::do_equal_b (Request*r) const
+Articulation_req::do_equal_b (Request const* r) const
{
- Articulation_req * a = dynamic_cast<Articulation_req*>(r);
+ Articulation_req const* a = dynamic_cast<Articulation_req const*> (r);
return a && articulation_str_ == a->articulation_str_;
}
Input
My_lily_lexer::here_input () const
{
- Source_file * f_l= source_file_l();
- return Input (f_l, here_ch_C());
+ Source_file * f_l= source_file_l ();
+ return Input (f_l, (char*)here_ch_C ());
}
if (stem_l_)
return stem_l_->dir_;
else if (head_l_arr_.size ())
- return sign (head_positions_interval().center ());
+ return (Direction)sign (head_positions_interval().center ());
programming_error ("Note column without heads and stem!");
return CENTER;
if (streepjes_i)
{
- Direction dir = sign (position_i_);
+ Direction dir = (Direction)sign (position_i_);
Interval hd = out->dim_[X_AXIS];
Real hw = hd.length ()/4;
Scalar dir = get_property ("verticalDirection",0);
if (dir.isdir_b())
{
- d->resolve_dir_ = int (dir);
+ d->resolve_dir_ = (Direction)(int)dir;
}
announce_element (Score_element_info (d,0));
note_p->set_elt_property (transparent_scm_sym, SCM_BOOL_T);
else
note_p->set_elt_property (style_scm_sym,
- gh_str02scm (noteheadstyle.ch_C()));
+ ly_ch_C_to_scm (noteheadstyle.ch_C()));
Score_element_info itinf (note_p,note_req_l);
if (safe_global_b)
{
ly_set_scm ("security-paranoia", SCM_BOOL_T);
- // gh_eval_str ("(set! security-paranoia #t)");
+ // ly_ch_C_eval_scm ("(set! security-paranoia #t)");
}
String s = String ("(eval (") + output_global_ch + "-scm 'all-definitions))";
- gh_eval_str (s.ch_C ());
+ ly_ch_C_eval_scm (s.ch_C ());
String creator;
if (no_timestamps_global_b)
}
SCM args_scm =
- gh_list (gh_str02scm (creator.ch_l ()),
- gh_str02scm (generate.ch_l ()), SCM_UNDEFINED);
+ gh_list (ly_ch_C_to_scm (creator.ch_l ()),
+ ly_ch_C_to_scm (generate.ch_l ()), SCM_UNDEFINED);
#ifndef NPRINT
DOUT << "output_header\n";
if (i->font_)
{
output_scheme (gh_list (ly_symbol ("select-font"),
- gh_str02scm (symbol_to_string (i->font_).ch_C()),
+ ly_ch_C_to_scm (symbol_to_string (i->font_).ch_C()),
SCM (i->magn_),
SCM_UNDEFINED));
}
{
SCM scm = gh_list (ly_symbol ("font-def"),
gh_int2scm (i),
- gh_str02scm (str.ch_l ()),
+ ly_ch_C_to_scm (str.ch_l ()),
SCM_UNDEFINED);
output_scheme (scm);
{
SCM scm = gh_list (ly_symbol ("lily-def"),
- gh_str02scm (k.ch_l ()),
- gh_str02scm (to_str(v).ch_l ()),
+ ly_ch_C_to_scm (k.ch_l ()),
+ ly_ch_C_to_scm (to_str(v).ch_l ()),
SCM_UNDEFINED);
output_scheme (scm);
{
SCM scm = gh_list (ly_symbol ("lily-def"),
- gh_str02scm (k.ch_l ()),
- gh_str02scm (v.ch_l ()),
+ ly_ch_C_to_scm (k.ch_l ()),
+ ly_ch_C_to_scm (v.ch_l ()),
SCM_UNDEFINED);
output_scheme (scm);
- gh_define (k.ch_l (), gh_str02scm (v.ch_l ()));
+ gh_define (k.ch_l (), ly_ch_C_to_scm (v.ch_l ()));
}
void
Paper_outputter::output_int_def (String k, int v)
{
SCM scm = gh_list (ly_symbol ("lily-def"),
- gh_str02scm (k.ch_l ()),
- gh_str02scm (to_str (v).ch_l ()),
+ ly_ch_C_to_scm (k.ch_l ()),
+ ly_ch_C_to_scm (to_str (v).ch_l ()),
SCM_UNDEFINED);
output_scheme (scm);
translator_spec_body:
TRANS_IDENTIFIER {
$$ = $1->access_content_Translator (true);
+ Translator_group * tg = dynamic_cast<Translator_group*> ($$);
+ if (!tg)
+ THIS->parser_error (_("Need a translator group for a context"));
$$-> set_spot (THIS->here_input ());
}
| TYPE STRING semicolon {
delete $4;
/* ugh*/
- Translator_group * tr = dynamic_cast<Translator_group*>($$);
- tr->set_property (*$2, str);
+ Translator_group* tg = dynamic_cast<Translator_group*> ($$);
+ if (!tg)
+ THIS->parser_error (_("Need a translator group for a context"));
+ tg->set_property (*$2, str);
}
| translator_spec_body NAME STRING semicolon {
$$->type_str_ = *$3;
}
bool
-Request::equal_b (Request *r) const
+Request::equal_b (Request const* r) const
{
return r->do_equal_b (this) || this->do_equal_b (r) ;
}
bool
-Request::do_equal_b (Request*) const
+Request::do_equal_b (Request const*) const
{
return true;
}
String reststyle = get_property ("restStyle", 0);
if (reststyle.length_i ())
rest_p_->set_elt_property (style_scm_sym,
- gh_str02scm (reststyle.ch_C()));
+ ly_ch_C_to_scm (reststyle.ch_C()));
}
announce_element (Score_element_info (rest_p_, rest_req_l_));
}
{
if (!lookup_l_)
{
- Score_element * me = (Score_element*)this;
- SCM sz = me->remove_elt_property (fontsize_scm_sym);
+ Score_element * urg = (Score_element*)this;
+ SCM sz = urg->remove_elt_property (fontsize_scm_sym);
int i = (sz != SCM_BOOL_F)
? gh_scm2int (SCM_CDR (sz))
: 0;
- me->lookup_l_ = pscore_l_->paper_l_->lookup_l (i);
+ urg->lookup_l_ = (Lookup*)pscore_l_->paper_l_->lookup_l (i);
}
return lookup_l_;
}
Articulation_req* l=script_req_l_arr_[i];
- SCM list = gh_eval_str (("(articulation-to-scriptdef \"" + l->articulation_str_ + "\")").ch_C());
+ SCM list = ly_ch_C_eval_scm (("(articulation-to-scriptdef \"" + l->articulation_str_ + "\")").ch_C());
if (list == SCM_BOOL_F)
{
SCM priority = SCM_CAR(list);
if (relative_stem_dir)
- ss->relative_dir_ = relative_stem_dir;
+ ss->relative_dir_ = (Direction)relative_stem_dir;
else
- ss->dir_ = force_dir;
+ ss->dir_ = (Direction)force_dir;
Scalar dir_prop (get_property ("articulationScriptVerticalDirection", 0));
if (dir_prop.isnum_b () && (int) dir_prop != CENTER)
- ss->dir_ = (int) dir_prop;
+ ss->dir_ = (Direction)(int)dir_prop;
if (l->dir_)
ss->dir_ = l->dir_;
{
axis_ = X_AXIS;
type_ = "margin";
- visibility_lambda_
- = gh_eval_str ("postbreak_only_visibility");
+ visibility_lambda_ = ly_ch_C_eval_scm ("postbreak_only_visibility");
}
stem_p_->set_elt_property (dir_forced_scm_sym, SCM_BOOL_T);
}
- Translator_group const *which;
+ Translator_group* which;
prop = get_property ("stemLeftBeamCount", &which);
if (prop.isnum_b ())
{
prop = get_property ("stemStyle", 0);
if (prop.to_bool ())
{
- stem_p_->set_elt_property (style_scm_sym, gh_str02scm (prop.ch_C()));
+ stem_p_->set_elt_property (style_scm_sym, ly_ch_C_to_scm (prop.ch_C()));
}
typeset_element(stem_p_);
Direction
Stem_staff_side_item::get_default_direction () const
{
- return relative_dir_ * stem_l_->dir_;
+ return (Direction)(relative_dir_ * stem_l_->dir_);
}
void
If dir is not determined: inverse of stem: down
(see stem::get_default_dir ())
*/
- Direction neutral_dir = (int)paper_l ()->get_var ("stem_default_neutral_direction");
+ Direction neutral_dir = (Direction)(int)paper_l ()->get_var ("stem_default_neutral_direction");
return (m == 0) ? other_dir (neutral_dir) : (m < 0) ? DOWN : UP;
}
-/*
- type-swallow-trans.cc -- implement Type_swallow_translator
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "type-swallow-trans.hh"
-#include "musical-request.hh"
-
-
-bool
-Type_swallow_translator::do_try_music (Music*r)
-{
- if (classname (r) == swallow_str_)
- return true;
- return false;
-}
-
-
-
-DECLARE_REQUEST_SWALLOWER(Skip_req);
--- /dev/null
+/*
+ type-swallow-translator.cc -- implement Type_swallow_translator
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "type-swallow-translator.hh"
+#include "musical-request.hh"
+
+
+bool
+Type_swallow_translator::do_try_music (Music*r)
+{
+ if (classname (r) == swallow_str_)
+ return true;
+ return false;
+}
+
+
+
+DECLARE_REQUEST_SWALLOWER(Skip_req);
dist = get_property ("alignmentReference",0);
if (dist.length_i () && dist.isnum_b ())
{
- valign_p_->align_dir_ = int (dist);
+ valign_p_->align_dir_ = (Direction)(int)dist;
}
valign_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ());
typeset_element (valign_p_);
bool
Vertical_align_engraver::qualifies_b (Score_element_info i) const
{
+#if 0
Translator * t = i.origin_trans_l_arr_[0];
+#endif
int sz = i.origin_trans_l_arr_.size() ;
#if 0
bool no_vertical_start = false;
bool no_vertical_end = last_b_;
Spanner *orig_span = dynamic_cast<Spanner*> (original_l_);
- if (orig_span && orig_span->broken_into_l_arr_[0] != this)
+ if (orig_span && (orig_span->broken_into_l_arr_[0] != (Spanner*)this))
no_vertical_start = true;
- if (orig_span && orig_span->broken_into_l_arr_.top () != this)
+ if (orig_span && (orig_span->broken_into_l_arr_.top () != (Spanner*)this))
no_vertical_end = true;
if (bar_arr_.top ()->type_str_.length_i () > 1)
no_vertical_end = false;