]> granicus.if.org Git - procps-ng/commitdiff
UGH_ITS_4_RH, //atic stuff, man page codes
authoralbert <>
Sat, 12 Oct 2002 19:15:53 +0000 (19:15 +0000)
committeralbert <>
Sat, 12 Oct 2002 19:15:53 +0000 (19:15 +0000)
top.1
top.c
top.h

diff --git a/top.1 b/top.1
index 9973a008c5c0ba253e7797c6803899a341efaf98..e372f5040549c60040f3105d1ca9685672052f5a 100644 (file)
--- 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 17c52813c7cab7e0a83bb0599db9d6e20ef6e2ac..8734e5beba21510067235349857aaef88027d562 100644 (file)
--- 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 8a1e90cdaaac74b738f4c9c4613a87fc007e27d1..8b307d0b0053edb1bc8a18842e721acf1f0a7b5b 100644 (file)
--- 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);