]> granicus.if.org Git - procps-ng/commitdiff
top: add pseudo type to the inspect demo '=' provision
authorJim Warner <james.warner@comcast.net>
Mon, 10 Dec 2012 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@enc.com.au>
Sat, 22 Dec 2012 06:07:38 +0000 (17:07 +1100)
When 'type' was added to the alternate status line for
the '=' key, the need for the demonstration 'type' was
overlooked. This commit avoids the '(null)' potential.

(now that we know a '.' + 2 spaces is squeezed to one)
(everything's perfectly justified, but it's just luck)

Reference(s);
commit 3b2b9a95e6ee628ac957851d8fa1cd343e8f0c01

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

index 082f7a51764a0615d9aaa6b0f848d22709f8af04..14a6e374a1c4679f7256840ea7fc87f07d233733 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -3109,9 +3109,10 @@ try_inspect_entries:
          Inspect.total = Inspect.demo = MAXTBL(sels);
          Inspect.tab = alloc_c(sizeof(struct I_ent) * Inspect.total);
          for (i = 0; i < Inspect.total; i++) {
+            Inspect.tab[i].type = strdup(N_txt(YINSP_deqtyp_txt));
             Inspect.tab[i].name = strdup(sels[i]);
             Inspect.tab[i].func = insp_do_demo;
-            Inspect.tab[i].fmts = strdup(N_txt(YINSP_deqkey_txt));
+            Inspect.tab[i].fmts = strdup(N_txt(YINSP_deqfmt_txt));
             Inspect.tab[i].fstr = alloc_c(FNDBUFSIZ);
          }
        #undef mkS
index 56722e2ef1dbf7e412e40147460011c7601fca23..16ce5fb81098e22217a425ae80f6c90d38e98e94 100644 (file)
@@ -373,7 +373,8 @@ static void build_norm_nlstab (void) {
    Norm_nlstab[YINSP_demo01_txt] = _("Open Files");
    Norm_nlstab[YINSP_demo02_txt] = _("NUMA Info");
    Norm_nlstab[YINSP_demo03_txt] = _("Log");
-   Norm_nlstab[YINSP_deqkey_txt] = _("the '=' key will eventually show the actual file read or command(s) excuted ...");
+   Norm_nlstab[YINSP_deqfmt_txt] = _("the '=' key will eventually show the actual file read or command(s) excuted ...");
+   Norm_nlstab[YINSP_deqtyp_txt] = _("demo");
    Norm_nlstab[YINSP_dstory_txt] = _(""
       "This is simulated output representing the contents of some file or the output\n"
       "from some command.  Exactly which commands and/or files are solely up to you.\n"
index 7f3ef727a3150281f5cbac0ed92238f09b3cd1cc..6954c08a170b353ab87e88d9b957a6f4cc7f2b68 100644 (file)
@@ -85,8 +85,8 @@ enum norm_nls {
    XTRA_warncfg_txt,
 #endif
 #ifndef INSP_OFFDEMO
-   YINSP_demo01_txt, YINSP_demo02_txt, YINSP_demo03_txt, YINSP_deqkey_txt,
-   YINSP_dstory_txt,
+   YINSP_demo01_txt, YINSP_demo02_txt, YINSP_demo03_txt, YINSP_deqfmt_txt,
+   YINSP_deqtyp_txt, YINSP_dstory_txt,
 #endif
    YINSP_failed_fmt, YINSP_noents_txt, YINSP_pidbad_fmt, YINSP_pidsee_fmt,
    YINSP_rcfile_fmt, YINSP_status_fmt, YINSP_workin_txt,