Commit e1cd74ee authored by jim warner's avatar jim warner Committed by Craig Small

top: do not co-mingle strings/numbers under namespaces

Craig's recent commit under that newlib branch dealing
with namespace support has prompted me to review top's
handling of those fields. Currently, when such a field
is zero, top displays a dash ('-'). This will mean the
justification toggles ('j/J') will behave incorrectly.

This patch simply allows the potential zero to display
or be suppressed with the already existing '0' toggle.
Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
parent c7201d52
......@@ -5390,8 +5390,8 @@ static const char *task_show (const WIN_t *q, const proc_t *p) {
case EU_NS5: // USERNS
case EU_NS6: // UTSNS
{ long ino = p->ns[i - EU_NS1];
if (ino > 0) cp = make_num(ino, W, Jn, i);
else cp = make_str("-", W, Js, i);
if (Rc.zero_suppress && 0 >= ino) cp = make_str("", W, Js, i);
else cp = make_num(ino, W, Jn, i);
}
break;
#ifdef OOMEM_ENABLE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment