int instead of being "promoted" to an unsigned int, so that "COLS -
strlen(buf) > 0" is actually a meaningful test. Noticed by Irix n32
cc. Fixes a bug which has presumably been in the moira client display
code ever since it was written.
We hates the Kernighan. We hates him forever.
/****************************************************/
void title(char *buff)
{
- move(0, MAX(0, (COLS - strlen(buff)) >> 1));
+ move(0, MAX(0, (COLS - (int)strlen(buff)) >> 1));
standout();
addstr(buff);
refresh();
/****************************************************/
void center_text(int row, char *buff)
{
- move(row, MAX(0, (COLS - strlen(buff)) >> 1));
+ move(row, MAX(0, (COLS - (int)strlen(buff)) >> 1));
addstr(buff);
refresh();
}
/* Now print the title and the menu */
wclear(my_ms->ms_screen);
wrefresh(my_ms->ms_screen);
- wmove(my_ms->ms_title, 0, MAX(0, (COLS - strlen(m->m_title)) >> 1));
+ wmove(my_ms->ms_title, 0, MAX(0, (COLS - (int)strlen(m->m_title)) >> 1));
wstandout(my_ms->ms_title);
waddstr(my_ms->ms_title, m->m_title);
wstandend(my_ms->ms_title);