+void draw_scroll_hint (struct Win * win, uint16_t y, uint32_t more_lines, char dir) {
+// Draw scroll hint line in win at row y, announce more_lines more lines in direction dir.
+ uint16_t x, offset;
+ char phrase[] = "more lines";
+ char * scrolldesc = malloc((3 * sizeof(char)) + strlen(phrase) + 10); // 10 = max chars for uint32_t string
+ sprintf(scrolldesc, " %d %s ", more_lines, phrase);
+ offset = 1;
+ if (win->width > (strlen(scrolldesc) + 1))
+ offset = (win->width - strlen(scrolldesc)) / 2;
+ for (x = 0; x < win->width; x++)
+ if (x >= offset && x < strlen(scrolldesc) + offset)
+ mvwaddch(win->curses, y, x, scrolldesc[x - offset] | A_REVERSE);
+ else
+ mvwaddch(win->curses, y, x, dir | A_REVERSE);
+ free(scrolldesc); }
+