static long min_pages_to_free(struct quicklist *q, unsigned long min_pages, long max_free) { long pages_to_free; pages_to_free = q->nr_pages - max_pages(min_pages); return min(pages_to_free, max_free); }
void scroll_box::display_controls() { if (w) { // page count // gui << black_on_white() << at(h0, w0); //gui << "page " << page_number << "/" << max_pages(); w->set_text_colors(0,0,0,255,255,255,255,255); w->set_text_origin(_h0, _w0); ostringstream o(""); o << "page " << page_number << "/" << max_pages(); w->add_text(new string(o.str())); } }