]> granicus.if.org Git - procps-ng/commitdiff
top: accumulated miscellaneous code and comment tweaks
authorJim Warner <james.warner@comcast.net>
Wed, 2 Jan 2013 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@enc.com.au>
Wed, 23 Jan 2013 10:23:36 +0000 (21:23 +1100)
This commit just addresses the following minor issues:

. restored both lost end-of-job reporting capabilities
. added missing initializers to the DEF_RCFILE #define
. added 'nls_maybe' eye-catcher to the 'Scaled_sfxtab'
. removed a now superfluous 'READMINSZ' assertion test
. man document references to 'top' are more consistent

(everything is perfectly justified plus right margins)
(are completely filled, but of course it must be luck)

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.1
top/top.c
top/top.h
top/top_nls.c

index a590216df0850da6facee484d218217fa85472d5..6620d63249afa66ef90f54c0eb6d51cf31d7a13c 100644 (file)
--- a/top/top.1
+++ b/top/top.1
@@ -1087,7 +1087,7 @@ To narrow them you must specify a smaller number or restore the defaults.
 After issuing the 'Y' \*(CI, you will be prompted for a target PID.
 Typing a value or accepting the default results in a separate screen.
 That screen can be used to view a variety of files or piped command output
-while the normal top iterative display is paused.
+while the normal \*(We iterative display is paused.
 
 \*(NT This \*(CI is only fully realized when supporting entries have been
 manually added to the end of the \*(We \*(CF.
@@ -1695,7 +1695,7 @@ Here is an example of the contents of\fI /etc/toprc\fR:
 .\" ......................................................................
 .SS 6b. PERSONAL Configuration File
 .\" ----------------------------------------------------------------------
-This file is written as '$HOME/.your-name-4-top' + 'rc'.
+This file is written as '$HOME/.your\-name\-4\-\*(We' + 'rc'.
 Use the 'W' \*(CI to create it or update it.
 
 Here is the general layout:
@@ -1723,7 +1723,7 @@ Such entries simply reflect a file to be read or command/pipeline to be
 executed whose results will then be displayed in a separate scrollable,
 searchable window.
 
-If you don't know the location or name of your top rcfile, use the 'W'
+If you don't know the location or name of your \*(We rcfile, use the 'W'
 \*(CI to rewrite it and note those details.
 
 Inspect entries can be added with a redirected echo or by editing the \*(CF.
@@ -1826,7 +1826,7 @@ there is an easy solution hinted at below.
   Options:  help  1  2  3  4  5  6  7  8  9  10  11 ...
 .Ed
 
-The entries in the top rcfile would have a number for the '.name' element and
+The entries in the \*(We rcfile would have a number for the '.name' element and
 the 'help' entry would identify a shell script you've written explaining what
 those numbered selections actually mean.
 In that way, many more choices can be made visible.
@@ -1858,7 +1858,7 @@ For this experiment, under x-windows open an xterm and maximize it.
 Then do the following:
 .Bd -literal -compact
   . provide a scheduling boost and tiny delay via:
-      nice -n -10 top -d.09
+      nice -n -10 \*(We -d.09
   . keep sorted column highlighting \*F so as to
     minimize path length
   . turn \*O reverse row highlighting for emphasis
@@ -1965,7 +1965,7 @@ To report bugs, follow the instructions at:
 .\" ----------------------------------------------------------------------
 .SH 9. HISTORY Former top
 .\" ----------------------------------------------------------------------
-The original top was written by Roger Binns,
+The original \*(We was written by Roger Binns,
 based on Branko Lankester's <lankeste@fwi.uva.nl> ps program.
 
 Robert Nation <nation@rocket.sanders.lockheed.com>
index d1b08f3f364b95d106e1b94d3098db6bc4016b97..1257f4de5962f3d54048ec2e24bb78ded47f676d 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -200,9 +200,9 @@ static int Autox_array [P_MAXPFLGS],
 #define AUTOX_MODE   (0 > Rc.fixed_widest)
 
         /* Support for scale_mem and scale_num (to avoid duplication. */
-#ifdef CASEUP_SUFIX
+#ifdef CASEUP_SUFIX                                                // nls_maybe
    static char Scaled_sfxtab[] =  { 'K', 'M', 'G', 'T', 'P', 'E', 0 };
-#else
+#else                                                              // nls_maybe
    static char Scaled_sfxtab[] =  { 'k', 'm', 'g', 't', 'p', 'e', 0 };
 #endif
 \f
@@ -345,7 +345,7 @@ static void bye_bye (const char *str) {
    at_eoj();                 // restore tty in preparation for exit
 #ifdef ATEOJ_RPTSTD
 {  proc_t *p;
-   if (!str && Ttychanged) { fprintf(stderr,
+   if (!str) { fprintf(stderr,
       "\n%s's Summary report:"
       "\n\tProgram"
       "\n\t   Linux version = %u.%u.%u, %s"
@@ -415,7 +415,7 @@ static void bye_bye (const char *str) {
 
 #ifndef OFF_HST_HASH
 #ifdef ATEOJ_RPTHSH
-   if (!str && Ttychanged) {
+   if (!str) {
       int i, j, pop, total_occupied, maxdepth, maxdepth_sav, numdepth
          , cross_foot, sz = HHASH_SIZ * (unsigned)sizeof(int);
       int depths[HHASH_SIZ];
index 2ae8fa50a48b1620235ebb8600176ccfcb37b763..4ef4efc50f2ef5dd3910a1218fbc7121a0c15039 100644 (file)
--- a/top/top.h
+++ b/top/top.h
@@ -573,7 +573,7 @@ typedef struct WIN_t {
    { P_UEN, DEF_WINFLGS, 0, \
       COLOR_YELLOW, COLOR_YELLOW, COLOR_GREEN, COLOR_YELLOW, \
       "Usr", USR_FIELDS } \
-   }, 0 }
+   }, 0, SK_Kb, SK_Kb, 0 }
 
         /* Summary Lines specially formatted string(s) --
            see 'show_special' for syntax details + other cautions. */
index 2b2b63bf92d0b3321c47bd8fe370ed6a15ae991d..a2a44cfb817456ec8410fd5025aed686d5b3a0a1 100644 (file)
@@ -668,16 +668,6 @@ void initialize_nls (void) {
          fprintf(stderr, nls_err, "Uniq", i);
          exit(1);
       }
- #ifndef INSP_OFFDEMO
-   if (READMINSZ < strlen(N_txt(YINSP_dstory_txt)) +1) {
-      fprintf(stderr
-         , "\nAssertion Failed in %s (%s):\n"
-            "\t'READMINSZ < strlen(N_txt(YINSP_dstory_txt)) + 1'\n"
-            "READMINSZ must be at least %u !\n\n"
-         , __FILE__,  __func__, (unsigned)strlen(N_txt(YINSP_dstory_txt)) + 1);
-         exit(1);
-   }
- #endif
 #else
    setlocale (LC_ALL, "");
    bindtextdomain(PACKAGE, LOCALEDIR);