]> granicus.if.org Git - procps-ng/commitdiff
top: miscellaneous accumulated changes to program code
authorJim Warner <james.warner@comcast.net>
Sun, 1 Feb 2015 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@enc.com.au>
Tue, 7 Apr 2015 10:46:15 +0000 (20:46 +1000)
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>
top/top.c
top/top.h
top/top_nls.c
top/top_nls.h

index ce6350815f25ad8fb3334bcb3d1f0def28bc2a54..b0e23bac95e444f9547e3eef4306591799b8c56c 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -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; }
index 1b1b1a18ae34d0084d982efe1dd6de13fc660eea..6b13e54bbaeeae3fb1242ab62857589743e2b75f 100644 (file)
--- a/top/top.h
+++ b/top/top.h
@@ -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
  *
index 8edc5b0b5b41f1fd21f7312e0e071d7a823b27fe..5c73e4c29ad6e8e562f7fdde191466f092f13b9b 100644 (file)
@@ -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");
index 1564ac823b4021163b29c3717e9049dec047d89c..896ed9217ce24bb7e1fcd403105193492e6218a1 100644 (file)
@@ -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
 };