top: miscellaneous minor tweaks (mostly spelling)
This commit represents mostly spelling corrections in comments. It also includes a few very minor logic changes/relocations. Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
6940430c55
commit
06e92e93b8
@ -27,7 +27,7 @@
|
|||||||
.
|
.
|
||||||
.ll +(\n[half_xtra] + \n[half_xtra])
|
.ll +(\n[half_xtra] + \n[half_xtra])
|
||||||
.
|
.
|
||||||
\# ** we use single quote char (') alot, so change the no-break ctrl char
|
\# ** we use single quote char (') a lot, so change the no-break ctrl char
|
||||||
.c2 `
|
.c2 `
|
||||||
.
|
.
|
||||||
\# Our own Bullet style(s) --------------------------
|
\# Our own Bullet style(s) --------------------------
|
||||||
@ -39,7 +39,7 @@
|
|||||||
\# - our em-dashes
|
\# - our em-dashes
|
||||||
.ds Em \fR\ \--\ \fR
|
.ds Em \fR\ \--\ \fR
|
||||||
.ds EM \fB\ \--\ \fR
|
.ds EM \fB\ \--\ \fR
|
||||||
\# - our program name (makes great grammer)
|
\# - our program name (makes great grammar)
|
||||||
.ds We top
|
.ds We top
|
||||||
.ds WE \fBtop\fR
|
.ds WE \fBtop\fR
|
||||||
\# - other misc strs for consistent usage
|
\# - other misc strs for consistent usage
|
||||||
@ -473,7 +473,7 @@ a \*(CO and an \*(CI.
|
|||||||
When you've chosen to display command lines, processes without a command
|
When you've chosen to display command lines, processes without a command
|
||||||
line (like kernel threads) will be shown with only the program name in
|
line (like kernel threads) will be shown with only the program name in
|
||||||
brackets, as in this example:
|
brackets, as in this example:
|
||||||
\fR[ mdrecoveryd ]
|
\fR[kthreadd]
|
||||||
|
|
||||||
This field may also be impacted by the 'forest view' display mode.
|
This field may also be impacted by the 'forest view' display mode.
|
||||||
\*(XC 'V' \*(CI for additional information regarding that mode.
|
\*(XC 'V' \*(CI for additional information regarding that mode.
|
||||||
|
42
top/top.c
42
top/top.c
@ -201,7 +201,7 @@ static int *PHash_sav = HHash_one, // alternating 'old/new' hash tables
|
|||||||
* routine may serve more than one column.
|
* routine may serve more than one column.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SCB_STRV(CGR, 1, cgroup, cgroup[0])
|
SCB_STRS(CGR, cgroup[0])
|
||||||
SCB_STRV(CMD, Frame_cmdlin, cmdline, cmd)
|
SCB_STRV(CMD, Frame_cmdlin, cmdline, cmd)
|
||||||
SCB_NUM1(COD, trs)
|
SCB_NUM1(COD, trs)
|
||||||
SCB_NUMx(CPN, processor)
|
SCB_NUMx(CPN, processor)
|
||||||
@ -320,7 +320,7 @@ static void bye_bye (const char *str) {
|
|||||||
|
|
||||||
#ifdef ATEOJ_RPTSTD
|
#ifdef ATEOJ_RPTSTD
|
||||||
{ proc_t *p;
|
{ proc_t *p;
|
||||||
if (!str) { fprintf(stderr,
|
if (!str && Ttychanged) { fprintf(stderr,
|
||||||
"\n%s's Summary report:"
|
"\n%s's Summary report:"
|
||||||
"\n\tProgram"
|
"\n\tProgram"
|
||||||
"\n\t Linux version = %u.%u.%u, %s"
|
"\n\t Linux version = %u.%u.%u, %s"
|
||||||
@ -390,7 +390,7 @@ static void bye_bye (const char *str) {
|
|||||||
|
|
||||||
#ifndef OFF_HST_HASH
|
#ifndef OFF_HST_HASH
|
||||||
#ifdef ATEOJ_RPTHSH
|
#ifdef ATEOJ_RPTHSH
|
||||||
if (!str) {
|
if (!str && Ttychanged) {
|
||||||
int i, j, pop, total_occupied, maxdepth, maxdepth_sav, numdepth
|
int i, j, pop, total_occupied, maxdepth, maxdepth_sav, numdepth
|
||||||
, cross_foot, sz = HHASH_SIZ * (unsigned)sizeof(int);
|
, cross_foot, sz = HHASH_SIZ * (unsigned)sizeof(int);
|
||||||
int depths[HHASH_SIZ];
|
int depths[HHASH_SIZ];
|
||||||
@ -1234,12 +1234,12 @@ static FLD_t Fieldstab[] = {
|
|||||||
// a temporary macro, soon to be undef'd...
|
// a temporary macro, soon to be undef'd...
|
||||||
#define SF(f) (QFP_t)SCB_NAME(f)
|
#define SF(f) (QFP_t)SCB_NAME(f)
|
||||||
|
|
||||||
/* .head + .fmts anomolies:
|
/* .head + .fmts anomalies:
|
||||||
entries shown with NULL are either valued at runtime (see zap_fieldstab)
|
entries shown with NULL are either valued at runtime (see zap_fieldstab)
|
||||||
or, in the case of .fmts, may represent variable width fields
|
or, in the case of .fmts, may represent variable width fields
|
||||||
.desc anomolies:
|
.desc anomalies:
|
||||||
the .desc field is always null initially, under nls support
|
the .desc field is always null initially, under nls support
|
||||||
.lflg anomolies:
|
.lflg anomalies:
|
||||||
P_UED, L_NONE - natural outgrowth of 'stat()' in readproc (euid)
|
P_UED, L_NONE - natural outgrowth of 'stat()' in readproc (euid)
|
||||||
P_CPU, L_stat - never filled by libproc, but requires times (pcpu)
|
P_CPU, L_stat - never filled by libproc, but requires times (pcpu)
|
||||||
P_CMD, L_stat - may yet require L_CMDLINE in calibrate_fields (cmd/cmdline)
|
P_CMD, L_stat - may yet require L_CMDLINE in calibrate_fields (cmd/cmdline)
|
||||||
@ -1474,7 +1474,7 @@ static void build_headers (void) {
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This guy coordinates the activities surrounding the maintainence
|
* This guy coordinates the activities surrounding the maintenance
|
||||||
* of each visible window's columns headers and the library flags
|
* of each visible window's columns headers and the library flags
|
||||||
* required for the openproc interface. */
|
* required for the openproc interface. */
|
||||||
static void calibrate_fields (void) {
|
static void calibrate_fields (void) {
|
||||||
@ -1590,16 +1590,16 @@ static void calibrate_fields (void) {
|
|||||||
* xPRFX ----------______________________ xSUFX
|
* xPRFX ----------______________________ xSUFX
|
||||||
* ( xPRFX has pos 2 & 10 for 'extending' when at minimums )
|
* ( xPRFX has pos 2 & 10 for 'extending' when at minimums )
|
||||||
*
|
*
|
||||||
* The first 4 screen rows are reserved for explanatory text.
|
* The first 4 screen rows are reserved for explanatory text, the
|
||||||
* Thus, with our current 39 fields, a maximum of 6 columns and
|
* maximum number of columns is currently 6 and a space is needed
|
||||||
* 1 space between columns, a tty will still remain useable under
|
* between columns. Thus, for example, with 40 fields a tty will
|
||||||
* these extremes:
|
* still remain useable under these extremes:
|
||||||
* rows cols displayed
|
* rows cols displayed
|
||||||
* ---- ---- ------------------
|
* ---- ---- ------------------
|
||||||
* 11 66 xPRFX only (w/ room for +3)
|
* 24 22 xPRFX only
|
||||||
* 11 198 full xPRFX + xSUFX (w/ room for +3)
|
* 24 66 full xPRFX + xSUFX
|
||||||
* 24 22 xPRFX only (w/ room for +1)
|
* 11 66 xPRFX only ( w/ room for +2 )
|
||||||
* 24 66 full xPRFX + xSUFX (w/ room for +1)
|
* 11 198 full xPRFX + xSUFX ( w/ room for +2 )
|
||||||
* ( if not, the user deserves our most cryptic messages )
|
* ( if not, the user deserves our most cryptic messages )
|
||||||
*/
|
*/
|
||||||
static void display_fields (int focus, int extend) {
|
static void display_fields (int focus, int extend) {
|
||||||
@ -1726,8 +1726,7 @@ static void fields_utility (void) {
|
|||||||
case 'w':
|
case 'w':
|
||||||
Curwin = w = ('a' == key) ? w->next : w->prev;
|
Curwin = w = ('a' == key) ? w->next : w->prev;
|
||||||
spewFI
|
spewFI
|
||||||
p = NULL;
|
h = p = NULL;
|
||||||
h = NULL;
|
|
||||||
break;
|
break;
|
||||||
default: // keep gcc happy
|
default: // keep gcc happy
|
||||||
break;
|
break;
|
||||||
@ -2127,10 +2126,12 @@ static void sysinfo_refresh (int forced) {
|
|||||||
* No matter what *they* say, we handle the really really BIG and
|
* No matter what *they* say, we handle the really really BIG and
|
||||||
* IMPORTANT stuff upon which all those lessor functions depend! */
|
* IMPORTANT stuff upon which all those lessor functions depend! */
|
||||||
static void before (char *me) {
|
static void before (char *me) {
|
||||||
static proc_t p;
|
|
||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
|
proc_t p;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
atexit(close_stdout);
|
||||||
|
|
||||||
// is /proc mounted?
|
// is /proc mounted?
|
||||||
look_up_our_self(&p);
|
look_up_our_self(&p);
|
||||||
|
|
||||||
@ -3998,7 +3999,6 @@ static void frame_make (void) {
|
|||||||
* duh... */
|
* duh... */
|
||||||
int main (int dont_care_argc, char **argv) {
|
int main (int dont_care_argc, char **argv) {
|
||||||
(void)dont_care_argc;
|
(void)dont_care_argc;
|
||||||
atexit(close_stdout);
|
|
||||||
before(*argv);
|
before(*argv);
|
||||||
// +-------------+
|
// +-------------+
|
||||||
wins_stage_1(); // top (sic) slice
|
wins_stage_1(); // top (sic) slice
|
||||||
|
@ -116,7 +116,7 @@ char *strcasestr(const char *haystack, const char *needle);
|
|||||||
#define LRGBUFSIZ 512
|
#define LRGBUFSIZ 512
|
||||||
#define OURPATHSZ 1024
|
#define OURPATHSZ 1024
|
||||||
#define BIGBUFSIZ 2048
|
#define BIGBUFSIZ 2048
|
||||||
/* in addition to the actual display data, our row might have to accomodate
|
/* in addition to the actual display data, our row might have to accommodate
|
||||||
many termcap/color transitions - these definitions ensure we have room */
|
many termcap/color transitions - these definitions ensure we have room */
|
||||||
#define ROWMINSIZ ( SCREENMAX + 4 * (CAPBUFSIZ + CLRBUFSIZ) )
|
#define ROWMINSIZ ( SCREENMAX + 4 * (CAPBUFSIZ + CLRBUFSIZ) )
|
||||||
#define ROWMAXSIZ ( SCREENMAX + 16 * (CAPBUFSIZ + CLRBUFSIZ) )
|
#define ROWMAXSIZ ( SCREENMAX + 16 * (CAPBUFSIZ + CLRBUFSIZ) )
|
||||||
@ -319,7 +319,7 @@ typedef struct RCF_t {
|
|||||||
|
|
||||||
/* This structure stores configurable information for each window.
|
/* This structure stores configurable information for each window.
|
||||||
By expending a little effort in its creation and user requested
|
By expending a little effort in its creation and user requested
|
||||||
maintainence, the only real additional per frame cost of having
|
maintenance, the only real additional per frame cost of having
|
||||||
windows is an extra sort -- but that's just on pointers! */
|
windows is an extra sort -- but that's just on pointers! */
|
||||||
typedef struct WIN_t {
|
typedef struct WIN_t {
|
||||||
FLG_t pflgsall [PFLAGSSIZ], // all 'active/on' fieldscur, as enum
|
FLG_t pflgsall [PFLAGSSIZ], // all 'active/on' fieldscur, as enum
|
||||||
|
Loading…
Reference in New Issue
Block a user