version 1.32, 2007/11/22 11:01:04 |
version 1.33, 2007/11/30 10:39:01 |
|
|
extern int ncpu; |
extern int ncpu; |
int Header_lines; |
int Header_lines; |
|
|
static enum { |
int header_status = Yes; |
OFF, ON, ERASE |
|
} header_status = ON; |
|
|
|
static int |
static int |
empty(void) |
empty(void) |
|
|
} |
} |
} |
} |
|
|
static int header_length; |
|
|
|
/* |
/* |
* *_header(text) - print the header for the process area |
* *_header(text) - print the header for the process area |
*/ |
*/ |
|
|
void |
void |
i_header(char *text) |
i_header(char *text) |
{ |
{ |
header_length = strlen(text); |
if (header_status == Yes && (screen_length > y_header |
if (header_status == ON && (screen_length > y_header |
|
|| !smart_terminal)) { |
|| !smart_terminal)) { |
if (!smart_terminal) { |
if (!smart_terminal) { |
putn(); |
putn(); |
|
|
clrtoeol(); |
clrtoeol(); |
addstrp(text); |
addstrp(text); |
} |
} |
} else if (header_status == ERASE) { |
|
header_status = OFF; |
|
} |
} |
} |
} |
|
|
|
|
} |
} |
|
|
void |
void |
display_header(int t) |
display_header(int status) |
{ |
{ |
if (t) { |
header_status = status; |
header_status = ON; |
|
} else if (header_status == ON) { |
|
header_status = ERASE; |
|
} |
|
} |
} |
|
|
void |
void |