diff --git a/top.1 b/top.1 index 9973a008..e372f504 100644 --- a/top.1 +++ b/top.1 @@ -20,7 +20,7 @@ . [ can be made printable by disabling the .ig directive! ] . .igEND -. + .\" Setup //////////////////////////////////////////////////////////////// \# ** Comment out '.nr' or set to 0 to eliminate WIDTH fiddlin' ! .nr half_xtra 4 diff --git a/top.c b/top.c index 17c52813..8734e5be 100644 --- a/top.c +++ b/top.c @@ -861,9 +861,11 @@ static proc_t **refreshprocs (proc_t **tbl) { #define PTRsz sizeof(proc_t *) /* eyeball candy */ #define ENTsz sizeof(proc_t) - static int flags = PROC_FILLMEM | PROC_FILLCOM | PROC_FILLUSR -#ifndef UGH_ITS_4_RH - | PROC_FILLGRP + static int flags = PROC_FILLMEM | PROC_FILLUSR +#ifdef UGH_ITS_4_RH + | PROC_FILLCMD +#else + | PROC_FILLGRP | PROC_FILLCOM #endif | PROC_FILLSTATUS | PROC_FILLSTAT; static unsigned savmax = 0; /* first time, Bypass: (i) */ @@ -930,8 +932,12 @@ static void before (char *me) /* establish cpu particulars -- even bigger! */ #ifdef PRETEND4CPUS Cpu_tot = 4; +#else +#ifdef UGH_ITS_4_RH + Cpu_tot = sysconf(_SC_NPROCESSORS_ONLN); #else Cpu_tot = smp_num_cpus; +#endif #endif Cpu_map = alloc_r(NULL, sizeof(int) * Cpu_tot); for (i = 0; i < Cpu_tot; i++) diff --git a/top.h b/top.h index 8a1e90cd..8b307d0b 100644 --- a/top.h +++ b/top.h @@ -503,7 +503,7 @@ typedef struct win { //atic int chin (int ech, char *buf, unsigned cnt); //atic const char *fmtmk (const char *fmts, ...); //atic char *strim (int sp, char *str); -//atic char *tg2 (int x, int y); +//atic const char *tg2 (int x, int y); /*------ Exit/Interrput routines ---------------------------------------*/ //atic void bye_bye (int eno, const char *str); //atic void stop (int dont_care_sig); @@ -519,8 +519,8 @@ typedef struct win { //atic char *ask4str (const char *prompt); //atic float get_float (const char *prompt); //atic int get_int (const char *prompt); -//atic char *scale_num (unsigned num, const int width, const unsigned type); -//atic char *scale_tics (TICS_t tics, const int width); +//atic const char *scale_num (unsigned num, const int width, const unsigned type); +//atic const char *scale_tics (TICS_t tics, const int width); //atic void time_elapsed (void); /*------ Library Alternatives ------------------------------------------*/ //atic void *alloc_c (unsigned numb);