On HP-UX, it seems that "lines" and "label_width" are defined as
object-like macros in <term.h> which causes dumb build failures
since this code is using those identifiers as variables.
Not too much hassle to just use a different name instead.
}
/* Thin wrapper around wresize which returns ERR if support is unavailable. */
}
/* Thin wrapper around wresize which returns ERR if support is unavailable. */
-static int do_wresize(WINDOW *window, int lines, int columns)
+static int do_wresize(WINDOW *window, int h, int w)
{
#if HAVE_CURSES_WRESIZE
{
#if HAVE_CURSES_WRESIZE
- return wresize(window, lines, columns);
+ return wresize(window, h, w);
/*
* Return the width of the toolbar and the target width of toolbar labels.
*/
/*
* Return the width of the toolbar and the target width of toolbar labels.
*/
-static int toolbar_width(WINDOW *toolbar, int *label_width)
+static int toolbar_width(WINDOW *toolbar, int *item_width)
{
int w, h;
getmaxyx(toolbar, h, w);
{
int w, h;
getmaxyx(toolbar, h, w);
- *label_width = MAX(6, w/10);
+ *item_width = MAX(6, w/10);
* The minimum size of a label is 6 characters (2 of which are used for the
* number indicator)
*/
* The minimum size of a label is 6 characters (2 of which are used for the
* number indicator)
*/
-static int toolbar_xpos(int i, int total_width, int label_width)
+static int toolbar_xpos(int i, int total_width, int item_width)
- int rem = total_width - 10*label_width;
- int pos = (i-1)*label_width;
+ int rem = total_width - 10*item_width;
+ int pos = (i-1)*item_width;
switch (rem) {
case 9: pos += i > 6;
switch (rem) {
case 9: pos += i > 6;