version 1.59, 2019/07/03 03:24:02 |
version 1.60, 2019/10/08 07:26:59 |
|
|
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
#include <unistd.h> |
#include <unistd.h> |
|
#include <stdbool.h> |
|
|
#include "screen.h" /* interface to screen package */ |
#include "screen.h" /* interface to screen package */ |
#include "layout.h" /* defines for screen position layout */ |
#include "layout.h" /* defines for screen position layout */ |
#include "display.h" |
#include "display.h" |
#include "top.h" |
#include "top.h" |
#include "boolean.h" |
|
#include "machine.h" /* we should eliminate this!!! */ |
#include "machine.h" /* we should eliminate this!!! */ |
#include "utils.h" |
#include "utils.h" |
|
|
|
|
extern int combine_cpus; |
extern int combine_cpus; |
extern struct process_select ps; |
extern struct process_select ps; |
|
|
int header_status = Yes; |
int header_status = true; |
|
|
static int |
static int |
empty(void) |
empty(void) |
|
|
move(1, 0); |
move(1, 0); |
clrtoeol(); |
clrtoeol(); |
/* write current number of procs and remember the value */ |
/* write current number of procs and remember the value */ |
if (threads == Yes) |
printwp("%d %s: ", total, threads ? "threads" : "processes"); |
printwp("%d threads: ", total); |
|
else |
|
printwp("%d processes: ", total); |
|
|
|
/* format and print the process state summary */ |
/* format and print the process state summary */ |
summary_format(procstates_buffer, sizeof(procstates_buffer), |
summary_format(procstates_buffer, sizeof(procstates_buffer), |
|
|
void |
void |
i_header(char *text) |
i_header(char *text) |
{ |
{ |
if (header_status == Yes && (screen_length > y_header |
if (header_status && (screen_length > y_header |
|| !smart_terminal)) { |
|| !smart_terminal)) { |
if (!smart_terminal) { |
if (!smart_terminal) { |
putn(); |
putn(); |