top: miscellaneous accumulated changes to program code
This commit just tweaks top in the following respects: . for alphabetic integrity, change 'INSP_hdr...' names . eliminate the -Wsometimes-uninitialized warning that was found under OSX Yosemite (llvm 6.0/clang-600.0.56) . update program 'comments' reflecting copyright dates Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
8bcdd2145d
commit
e107f5d63b
@ -1,6 +1,6 @@
|
||||
/* top.c - Source file: show Linux processes */
|
||||
/*
|
||||
* Copyright (c) 2002-2014, by: James C. Warner
|
||||
* Copyright (c) 2002-2015, by: James C. Warner
|
||||
* All rights reserved. 8921 Hilloway Road
|
||||
* Eden Prairie, Minnesota 55347 USA
|
||||
*
|
||||
@ -3111,7 +3111,7 @@ signify_that:
|
||||
makFS(buf)
|
||||
makHD(pid,cmd,usr)
|
||||
putp(Cap_home);
|
||||
show_special(1, fmtmk(N_unq(INSP_hdrview_fmt)
|
||||
show_special(1, fmtmk(N_unq(YINSP_hdview_fmt)
|
||||
, pid, cmd, usr, (Insp_sel->fstr[0]) ? buf : " N/A ")); // nls_maybe
|
||||
insp_show_pgs(curcol, curlin, maxLN);
|
||||
fflush(stdout);
|
||||
@ -3221,7 +3221,7 @@ signify_that:
|
||||
do {
|
||||
mkSEL(sels);
|
||||
putp(Cap_home);
|
||||
show_special(1, fmtmk(N_unq(INSP_hdrsels_fmt)
|
||||
show_special(1, fmtmk(N_unq(YINSP_hdsels_fmt)
|
||||
, pid, p->cmd, p->euser, sels));
|
||||
INSP_MKSL(0, " ");
|
||||
|
||||
@ -3767,7 +3767,7 @@ static void parse_args (char **args) {
|
||||
case 'w':
|
||||
{ const char *pn = NULL;
|
||||
int ai = 0, ci = 0;
|
||||
Width_mode = -1;
|
||||
tmp = -1;
|
||||
if (cp[1]) pn = &cp[1];
|
||||
else if (*args) { pn = *args; ai = 1; }
|
||||
if (pn && !(ci = strspn(pn, numbs_str))) { ai = 0; pn = NULL; }
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* top.h - Header file: show Linux processes */
|
||||
/*
|
||||
* Copyright (c) 2002-2014, by: James C. Warner
|
||||
* Copyright (c) 2002-2015, by: James C. Warner
|
||||
* All rights reserved. 8921 Hilloway Road
|
||||
* Eden Prairie, Minnesota 55347 USA
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* top_nls.c - provide the basis for future nls translations */
|
||||
/*
|
||||
* Copyright (c) 2011-2014, by: James C. Warner
|
||||
* Copyright (c) 2011-2015, by: James C. Warner
|
||||
* All rights reserved. 8921 Hilloway Road
|
||||
* Eden Prairie, Minnesota 55347 USA
|
||||
*
|
||||
@ -640,12 +640,12 @@ static void build_uniq_nlstab (void) {
|
||||
"%s %s:~3 %9.9s~2total,~3 %9.9s~2free,~3 %9.9s~2used,~3 %9.9s~2buff/cache~3\n"
|
||||
"%s %s:~3 %9.9s~2total,~3 %9.9s~2free,~3 %9.9s~2used.~3 %9.9s~2avail %s~3\n");
|
||||
|
||||
Uniq_nlstab[INSP_hdrsels_fmt] = _(""
|
||||
Uniq_nlstab[YINSP_hdsels_fmt] = _(""
|
||||
"Inspection~2 Pause at: pid ~1%d~6 running ~1%s~6 as user ~1%s~6\n"
|
||||
"Use~2: left/right then <Enter> to ~1select~5 an option; 'q' or <Esc> to ~1end~5 !\n"
|
||||
"Options~2: ~1%s\n");
|
||||
|
||||
Uniq_nlstab[INSP_hdrview_fmt] = _(""
|
||||
Uniq_nlstab[YINSP_hdview_fmt] = _(""
|
||||
"Inspection~2 View at: ~1%s~3, ~1%s~3, ~1%s~3. Locating: ~1%s~6\n"
|
||||
"Use~2: left/right/up/down/etc to ~1navigate~5 the output; 'L'/'&' to ~1locate~5/~1next~5.\n"
|
||||
"Or~2: <Enter> to ~1select another~5; 'q' or <Esc> to ~1end~5 !\n");
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* top_nls.h - provide the basis for future nls translations */
|
||||
/*
|
||||
* Copyright (c) 2011-2014, by: James C. Warner
|
||||
* Copyright (c) 2011-2015, by: James C. Warner
|
||||
* All rights reserved. 8921 Hilloway Road
|
||||
* Eden Prairie, Minnesota 55347 USA
|
||||
*
|
||||
@ -97,8 +97,8 @@ enum norm_nls {
|
||||
enum uniq_nls {
|
||||
KEYS_helpbas_fmt, KEYS_helpext_fmt, WINDOWS_help_fmt, COLOR_custom_fmt,
|
||||
FIELD_header_fmt, MEMORY_lines_fmt, STATE_line_1_fmt, STATE_lin2x4_fmt,
|
||||
STATE_lin2x5_fmt, STATE_lin2x6_fmt, STATE_lin2x7_fmt, INSP_hdrsels_fmt,
|
||||
INSP_hdrview_fmt,
|
||||
STATE_lin2x5_fmt, STATE_lin2x6_fmt, STATE_lin2x7_fmt, YINSP_hdsels_fmt,
|
||||
YINSP_hdview_fmt,
|
||||
uniq_MAX
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user