#endif
SCM meta = get_property ("meta");
- if (gh_pair_p (meta))
+ if (ly_pair_p (meta))
{
SCM ifs = scm_assoc (ly_symbol2scm ("interfaces"), meta);
*/
bool itc = internal_type_checking_global_b;
internal_type_checking_global_b = false;
- internal_set_property (ly_symbol2scm ("interfaces"), gh_cdr (ifs));
+ internal_set_property (ly_symbol2scm ("interfaces"), ly_cdr (ifs));
internal_type_checking_global_b = itc;
}
if (is_number_pair (xt))
cb = xt;
else if (cb != SCM_BOOL_F
- && !gh_procedure_p (cb) && !gh_pair_p (cb)
- && gh_procedure_p (get_property ("print-function")))
+ && !ly_procedure_p (cb) && !ly_pair_p (cb)
+ && ly_procedure_p (get_property ("print-function")))
cb = stencil_extent_proc;
dim_cache_[a].dimension_ = cb;
Grob::stencil_extent (SCM element_smob, SCM scm_axis)
{
Grob *s = unsmob_grob (element_smob);
- Axis a = (Axis) gh_scm2int (scm_axis);
+ Axis a = (Axis) ly_scm2int (scm_axis);
Stencil *m = s->get_stencil ();
Interval e ;
status_= busy;
- for (SCM d = get_property ("dependencies"); gh_pair_p (d);
+ for (SCM d = get_property ("dependencies"); ly_pair_p (d);
d = ly_cdr (d))
{
unsmob_grob (ly_car (d))
SCM proc = internal_get_property (funcname);
- if (gh_procedure_p (proc))
- gh_call1 (proc, this->self_scm ());
+ if (ly_procedure_p (proc))
+ scm_call_1 (proc, this->self_scm ());
status_= final;
}
SCM proc = get_property ("print-function");
SCM mol = SCM_EOL;
- if (gh_procedure_p (proc))
- mol = gh_apply (proc, scm_list_n (this->self_scm (), SCM_UNDEFINED));
+ if (ly_procedure_p (proc))
+ mol = scm_apply_0 (proc, scm_list_n (this->self_scm (), SCM_UNDEFINED));
Stencil *m = unsmob_stencil (mol);
because some Spanners have enormously long lists in their
properties.
*/
- for (SCM s = mutable_property_alist_; gh_pair_p (s);
- s = gh_cdr (s))
+ for (SCM s = mutable_property_alist_; ly_pair_p (s);
+ s = ly_cdr (s))
{
- sp->substitute_one_mutable_property (gh_caar (s),
- gh_cdar (s));
+ sp->substitute_one_mutable_property (ly_caar (s),
+ ly_cdar (s));
}
}
if (original_)
{
Item * it = dynamic_cast<Item*> (this);
- substitute_mutable_properties (gh_int2scm (it->break_status_dir ()),
+ substitute_mutable_properties (scm_int2num (it->break_status_dir ()),
original_->mutable_property_alist_);
}
}
while (dim_cache_[a].offsets_left_)
{
int l = --me->dim_cache_[a].offsets_left_;
- SCM cb = scm_list_ref (dim_cache_[a].offset_callbacks_, gh_int2scm (l));
- SCM retval = gh_call2 (cb, self_scm (), gh_int2scm (a));
+ SCM cb = scm_list_ref (dim_cache_[a].offset_callbacks_, scm_int2num (l));
+ SCM retval = scm_call_2 (cb, self_scm (), scm_int2num (a));
- Real r = gh_scm2double (retval);
+ Real r = ly_scm2double (retval);
if (isinf (r) || isnan (r))
{
programming_error (INFINITY_MSG);
bool
Grob::is_empty (Axis a)const
{
- return ! (gh_pair_p (dim_cache_[a].dimension_) ||
- gh_procedure_p (dim_cache_[a].dimension_));
+ return ! (ly_pair_p (dim_cache_[a].dimension_) ||
+ ly_procedure_p (dim_cache_[a].dimension_));
}
Interval
Dimension_cache * d = (Dimension_cache *)&dim_cache_[a];
Interval ext ;
- if (gh_pair_p (d->dimension_))
+ if (ly_pair_p (d->dimension_))
;
- else if (gh_procedure_p (d->dimension_))
+ else if (ly_procedure_p (d->dimension_))
{
/*
FIXME: add doco on types, and should typecheck maybe?
*/
- d->dimension_= gh_call2 (d->dimension_, self_scm (), gh_int2scm (a));
+ d->dimension_= scm_call_2 (d->dimension_, self_scm (), scm_int2num (a));
}
else
return ext;
- if (!gh_pair_p (d->dimension_))
+ if (!ly_pair_p (d->dimension_))
return ext;
ext = ly_scm2interval (d->dimension_);
/*
signs ?
*/
- if (gh_pair_p (extra))
+ if (ly_pair_p (extra))
{
- ext[BIGGER] += gh_scm2double (ly_cdr (extra));
- ext[SMALLER] += gh_scm2double (ly_car (extra));
+ ext[BIGGER] += ly_scm2double (ly_cdr (extra));
+ ext[SMALLER] += ly_scm2double (ly_car (extra));
}
extra = get_property (a == X_AXIS
? "minimum-X-extent"
: "minimum-Y-extent");
- if (gh_pair_p (extra))
+ if (ly_pair_p (extra))
{
- ext.unite (Interval (gh_scm2double (ly_car (extra)),
- gh_scm2double (ly_cdr (extra))));
+ ext.unite (Interval (ly_scm2double (ly_car (extra)),
+ ly_scm2double (ly_cdr (extra))));
}
ext.translate (x);
Grob *
common_refpoint_of_list (SCM elist, Grob *common, Axis a)
{
- for (; gh_pair_p (elist); elist = ly_cdr (elist))
+ for (; ly_pair_p (elist); elist = ly_cdr (elist))
{
Grob * s = unsmob_grob (ly_car (elist));
if (!s)
{
SCM meta = get_property ("meta");
SCM nm = scm_assoc (ly_symbol2scm ("name"), meta);
- nm = (gh_pair_p (nm)) ? ly_cdr (nm) : SCM_EOL;
- return gh_symbol_p (nm) ? ly_symbol2string (nm) : classname (this);
+ nm = (ly_pair_p (nm)) ? ly_cdr (nm) : SCM_EOL;
+ return ly_symbol_p (nm) ? ly_symbol2string (nm) : classname (this);
}
void
{
if (!has_offset_callback (cb, a))
{
- dim_cache_[a].offset_callbacks_ = gh_cons (cb, dim_cache_[a].offset_callbacks_);
+ dim_cache_[a].offset_callbacks_ = scm_cons (cb, dim_cache_[a].offset_callbacks_);
dim_cache_[a].offsets_left_ ++;
}
}
{
Link_array<Grob> arr;
- for (SCM s = l; gh_pair_p (s); s = gh_cdr (s))
+ for (SCM s = l; ly_pair_p (s); s = ly_cdr (s))
{
- SCM e = gh_car (s);
+ SCM e = ly_car (s);
arr.push (unsmob_grob (e));
}
{
SCM s = SCM_EOL;
for (int i = a.size (); i; i--)
- s = gh_cons (a[i-1]->self_scm (), s);
+ s = scm_cons (a[i-1]->self_scm (), s);
return s;
}