FreeBSD/contrib/top/display.c
/* Invariant: msglen is always the length of the message currently displayed
   on the screen (even when next_msg doesn't contain that message). */
msglen is always the length of the message currently displayed
on the screen (even when next_msg doesn't contain that message).
msglen is always the length of the message currently displayed on the screen ( even when next_msg doesn ' t contain that message ) .
void
i_message()
{
    while (lastline < y_message)
    {
	fputc('\n', stdout);
	lastline++;
    }
    if (next_msg[0] != '\0')
    {
	standout(next_msg);
	msglen = strlen(next_msg);
	next_msg[0] = '\0';
    }
    else if (msglen > 0)
    {
	(void) clear_eol(msglen);
	msglen = 0;
    }
}
void i_message ( ) { while ( lastline < y_message ) { fputc ( ' \n ' , stdout ) ; lastline ++ ; } if ( next_msg [ 0 ] != ' \0 ' ) { standout ( next_msg ) ; msglen = strlen ( next_msg ) ; next_msg [ 0 ] = ' \0 ' ; } else if ( msglen > 0 ) { ( void ) clear_eol ( msglen ) ; msglen = 0 ; } }
Invariant: msglen is always the length of the message currently displayed
on the screen (even when next_msg doesn't contain that message).
Invariant : msglen is always the length of the message currently displayed on the screen ( even when next_msg doesn ' t contain that message ) .