#include "system.hh"
#include "warn.hh"
-using std::pair;
-using std::vector;
-
/* for each forbidden page break, merge the systems around it into one
system. */
static vector<Line_details>
paper_height_ = robust_scm2double (pb->paper_->c_variable ("paper-height"), 1.0);
ragged_ = to_boolean (pb->paper_->c_variable ("ragged-bottom"));
ragged_last_ = to_boolean (pb->paper_->c_variable ("ragged-last-bottom"));
- systems_per_page_ = std::max (0, robust_scm2int (pb->paper_->c_variable ("systems-per-page"), 0));
- max_systems_per_page_ = std::max (0, robust_scm2int (pb->paper_->c_variable ("max-systems-per-page"), 0));
- min_systems_per_page_ = std::max (0, robust_scm2int (pb->paper_->c_variable ("min-systems-per-page"), 0));
+ systems_per_page_ = max (0, robust_scm2int (pb->paper_->c_variable ("systems-per-page"), 0));
+ max_systems_per_page_ = max (0, robust_scm2int (pb->paper_->c_variable ("max-systems-per-page"), 0));
+ min_systems_per_page_ = max (0, robust_scm2int (pb->paper_->c_variable ("min-systems-per-page"), 0));
orphan_penalty_ = robust_scm2int (pb->paper_->c_variable ("orphan-penalty"), 100000);
Stencil footnote_separator = Page_layout_problem::get_footnote_separator_stencil (pb->paper_);
SCM lines = scm_caar (s);
SCM config = scm_cdar (s);
- bool bookpart_last_page = (s == systems_configs_fncounts);
+ bool bookpart_last_page = scm_is_eq (s, systems_configs_fncounts);
SCM page = draw_page (lines, config, page_num, bookpart_last_page);
/* collect labels */
SCM page_num_scm = scm_from_int (page_num);
bool last = (j == cols.size () - 1);
bool break_point = is_break && is_break (cols[j]);
- bool chunk_end = cols[j]->get_property ("page-break-permission") == force_sym;
+ bool chunk_end = scm_is_eq (cols[j]->get_property ("page-break-permission"), force_sym);
Break_position cur_pos = Break_position (i,
line_breaker_columns.size (),
cols[j],
dems_and_indices.push_back (pair<Real, vsize> (dem, i));
}
- vector_sort (dems_and_indices, std::less<pair<Real, vsize> > ());
+ vector_sort (dems_and_indices, less<pair<Real, vsize> > ());
vector<Line_division> best_5_configurations;
for (vsize i = 0; i < 5; i++)
others_min += min_sys[i];
others_max += max_sys[i];
}
- others_max = std::min (others_max, (int) system_count);
- int real_min = std::max ((int) min_sys[my_index], (int) system_count - others_max);
- int real_max = std::min ((int) max_sys[my_index], (int) system_count - others_min);
+ others_max = min (others_max, (int) system_count);
+ int real_min = max ((int) min_sys[my_index], (int) system_count - others_max);
+ int real_max = min ((int) max_sys[my_index], (int) system_count - others_min);
if (real_min > real_max || real_min < 0)
{
Real a = shape.begin_[UP];
Real b = shape.rest_[UP];
bool title = cur.title_;
- Real refpoint_hanging = std::max (prev_hanging_begin + a, prev_hanging_rest + b);
+ Real refpoint_hanging = max (prev_hanging_begin + a, prev_hanging_rest + b);
if (i > 0)
{
Real min_dist = title
? prev.title_min_distance_
: prev.min_distance_;
- refpoint_hanging = std::max (refpoint_hanging + padding,
+ refpoint_hanging = max (refpoint_hanging + padding,
prev_refpoint_hanging - prev.refpoint_extent_[DOWN]
+ cur.refpoint_extent_[UP] + min_dist);
}
Real hanging_begin = refpoint_hanging - shape.begin_[DOWN];
Real hanging_rest = refpoint_hanging - shape.rest_[DOWN];
- Real hanging = std::max (hanging_begin, hanging_rest);
+ Real hanging = max (hanging_begin, hanging_rest);
cur.tallness_ = hanging - prev_hanging;
prev_hanging = hanging;
prev_hanging_begin = hanging_begin;
{
Real f = res.force_[i];
- page_demerits += std::min (f * f, BAD_SPACING_PENALTY);
+ page_demerits += min (f * f, BAD_SPACING_PENALTY);
}
/* for a while we tried averaging page and line forces across pages instead
}
ret.systems_per_page_.push_back (lines.size ());
- ret.force_.push_back (ragged ? std::min (space.force_, 0.0) : space.force_);
+ ret.force_.push_back (ragged ? min (space.force_, 0.0) : space.force_);
ret.penalty_ = line_count_penalty (line_count) + lines.back ().page_penalty_ + lines.back ().turn_penalty_;
ret.system_count_status_ |= line_count_status (line_count);
ly_symbol2scm ("padding"));
// FIXME: take into account the height of the header
- Real translate = std::max (line.shape_.begin_[UP], line.shape_.rest_[UP]);
- return std::max (0.0, std::max (padding, min_distance - translate));
+ Real translate = max (line.shape_.begin_[UP], line.shape_.rest_[UP]);
+ return max (0.0, max (padding, min_distance - translate));
}
Real
ly_symbol2scm ("padding"));
// FIXME: take into account the height of the footer
- Real translate = std::min (line.shape_.begin_[DOWN], line.shape_.rest_[DOWN]);
- return std::max (0.0, std::max (padding, min_distance + translate));
+ Real translate = min (line.shape_.begin_[DOWN], line.shape_.rest_[DOWN]);
+ return max (0.0, max (padding, min_distance + translate));
}
int