Commit Graph

3767 Commits

Author SHA1 Message Date
Jim Warner
5b2cfd607b top: modify 'Ctrl' bottom window 'str' use with 'strv' <=== port of newlib 73b4f113
______________________________ original newlib message

After satisfying increased buffer size in the previous
patch, I decided to improve the highlight accuracy for
both the command lines plus the environment variables.

Since they both may contain elements which themselves
include embedded spaces, to accomplish this goal, one
must trade vanilla strings for string vectors instead.

[ at last such library items have now been justified ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
203d75e323 top: needed 'Ctrl' bottom window fixes were discovered <=== port of newlib da36ff2b
______________________________ original newlib message

As it turns out, some of the 'environ' strings are big
enough to overrun the initial buffer sizes. And, while
no real harm was done (other than to silently truncate
the output), this patch will increase the buffer size.

While we're at it. we will normalize a few more buffer
declarations along with correcting a couple typos too.

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
dbe1f42e3b doc: man page adjusted for response to keyboard inputs <=== port of newlib b8f79a7b
______________________________ original newlib message
----------------------------------- ( minus git hash )

[ and along the way, those 2 newest namespace fields ]
[ are now mentioned under that same 'X' command part ] <=== hey, we don't got them here!
[ this commit already changed for improved response. ]

[ they should have been included in the patch below. ]

Reference(s):
commit ........................................

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
cc3c2b773d top: program is now more responsive to keyboard inputs <=== port of newlib 3ea1bc77
______________________________ original newlib message
--------------------------------------------- ( none )

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
27c8671ba3 doc: detail 'Ctrl' bottom window namespaces plus focus <=== port of newlib 381af1af
______________________________ original newlib message

[ along the way we will restore '^R' to keys summary ]
[ plus correct a leftover reference to 'Ctrl-V' too. ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
a103b364f3 top: extend 'Ctrl' bottom window for 'memu' selections <=== port od newlib 659590b0
______________________________ original newlib message

This commit adds a prototype for a potential extension
of that tabbed bottom window capability. It introduces
a 'menu' which then provides for users' selections. It
does not actually do anything meaningful and will only
be enabled with the new #define called 'BOT_PICK_YES'.

[ since it's just a proof of concept, no attempt has ]
[ been made to add the usual NLS translation support ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
04d05b9f04 top: extend 'Ctrl' bottom window for focus via tab key <=== port of newlib de22afc4
______________________________ original newlib message

This commit introduces the 'tab' key which can be used
to highlight individual elements in that bottom 'Ctrl'
window. This can really help when reviewing such data.

[ note, normal ongoing monitoring continues unabated ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
2f683d3bcf top: expand 'Ctrl' bottom window to display other data <=== port of newlib c46a60d9
______________________________ original newlib message

This commit adds support for displaying the namespaces
in top's separate bottom 'Ctrl' window. Along the way,
the plumbing is now in place to extend this capability
to other data (if we don't run out of '^' keystrokes).

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
df36fe4d54 top: rename 'Ctrl' bottom window routines and relocate <=== port of newlib ad17ffe6
______________________________ original newlib message

This patch will just set the stage for the next commit
where we'll be adding the capability to display things
that sometimes may necessitate multiple library items.

In that effort we will be adding several new routines.

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
ccc6abbf46 top: turn off the 'Ctrl' bottom window with 1 more key <=== port of newlib 3f068a66
______________________________ original newlib message
--------------------------------------------- ( none )

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
ee0169fd02 top: fix a bug from when 'Ctrl' window was made sticky <=== port of newlib 793f3e85
______________________________ original commit message
----------------------------------- ( minus git hash )

In the patch referenced below the bottom 'Ctrl' window
was made to remain until it was dismissed by the user.

As such, it required abandoning a 'Cap_nl_clreos' used
when all the terminal rows had not been drawn. Instead
each line had to be cleared individually until the row
reserved for that 'Ctrl' window area had been reached.

Unfortunately, while a 'Cap_nl_clreos' didn't create a
problem for 'batch' mode, a 'Cap_clr_eol' used instead
yielded an unending loop if those rows were limitless.

So, now we will only clear that area when top isn't in
'batch' mode (which should have always been the case).

Reference(s):
. May, 2022 - bottom window made sticky
commit ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
8c336e07c6 top: avoid library shame with refactored 'Ctrl' window <=== port of newlib bc4b499e
[ sorry, but under this master branch ]
       [ the whole next narrative is frankly ]
       [ mostly pure unadulterated bullshit. ]

______________________________ original newlib message

Well darn it, whoever wrote that new library caught me
with my pants down (again?). Shoot, they were not just
down but somehow missing altogether. Here's the story.

Any item from that library supported by dynamic memory
can only be represented in user's stacks exactly once.

Should any string based enumerator be duplicated among
the items array, for any instance beyond the first the
library will return '[ duplicate ENUM ]' for a result.

That's where I lost my pants. While command lines were
given special handling (and never duplicated) I failed
to turn on CGROUPS, SUPGRPS & ENVIRON when testing the
Ctrl-G, Ctrl-U & Ctrl-N keys. If any of those 3 are on
that's when a Ctrl window sees a 'duplicate' notation.

[ and who runs top with such fields displayed anyway ]

In responding to this oops, the internals were changed
quite dramatically & vastly simplified in the process.

More importantly, the 'duplicate' results are no more.

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
f45992086c top: turn off the 'Ctrl' bottom window after some keys <=== port of newlib d66c1f39
______________________________ original newlib message

To complete the implementation of this new feature, we
must address the problem created by any commands which
offer their own full replacement displays. Should that
'Ctrl' bottom window be active, a return from any such
command leaves that lower portion of a terminal blank.

While we could issue a 'TAGGED_TOSS' macro right after
invoking any of those 4 (currently) affected commands,
it is wrong to make them aware of this 'tagged' stuff.

So, I'll opt for a more generalized solution whereby a
notice regarding a corrupted screen is broadcast. Then
the logic already aware of 'tagging' can deal with it.

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
619d4936ee top: allow sticky 'Ctrl' bottom window code by #define <=== port of newlib 16e202d2
______________________________ original newlib message

After making that new bottom window more persistent, I
decided to offer a build choice for somebody who might
prefer to have the rug pulled out from under him while
reviewing window contents should some target task end.

If 'TAGGED_BRIEF' is defined old behavior is restored.

[ it should be noted, however, that when this define ]
[ is active we'll lose any benefit of onetime update ]
[ for the bottom window. just like with the original ]
[ behavior, it is repainted with every update cycle. ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
c9266f367b doc: adapt to the 'Ctrl' bottom window one changed key <=== port of newlib 54b949a1
______________________________ original newlib message
--------------------------------------------- ( none )

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
9bd04df662 top: trade just 1 'Ctrl' bottom window key association <=== port of newlib 9ff5a4ff
______________________________ original newlib message

I grew tired of inadvertently causing a premature exit
from top when all I wanted was to review some process'
environment variables. That 'V' key was just too close
to the 'C' key so the '^V' attempt became one of '^C'.

Well, not any more. Should a user wish to see a task's
environment, it will now require the '^N' combination.

[ it also now places G/U & N/K on a similar diagonal ]

Along the way, lower case Ctrl key combinations on the
help screen were all changed into upper case versions.

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
d7c3d35cdb doc: adapt to the 'Ctrl' bottom window sticky behavior <=== port of newlib ef27aea6
______________________________ original newlib message
--------------------------------------------- ( none )

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
8d8eadef04 top: make the new 'Ctrl' bottom window behavior sticky <=== port of newlib 0f2a755b
______________________________ original newlib message

After using this new feature for awhile, I encountered
numerous times when that 'Ctrl' window would disappear
as I was studying the contents. This was caused by the
death of the target task but it made me think that the
window could/should persist until dismissed by a user.

Well, now it will persist until that same Ctrl key has
been struck a 2nd time or a different Ctrl key used to
target another process after positioning it on row #1.

So now, instead of that former 'moving target' type of
approach, this window is more of a 'snapshot' in time.

[ even more significant, perhaps, is the fact that a ]
[ Ctrl window will now be drawn exactly 1 time only, ]
[ instead of being repainted after each delay cycle. ]

[ this will remain true no matter how many intervals ]
[ might elapse while its contents were under review. ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
60bf133184 top: add a program name to 'Ctrl' bottom window header <=== port of newlib bad7f2a2
______________________________ original newlib message

This minor addition to that new 'Ctrl' feature is more
important than it seems. It's responsible for alerting
yours truly to the 'LIBPROC_HIDE_KERNEL' bug addressed
in the very next commit. All this while, program names <=== not in this branch, cookie
for some tasks would be mysteriously replaced with the
kernel 'kworker' names. However, customary clutter for
the top process display tended to obscure such a fact.

[ and, of course, to notice the problem in the first ]
[ place required one to have the command line toggle ]
[ 'off' or perhaps to toggle its state 'on' & 'off'. ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
261ed4e716 doc: add variable width data display without scrolling <=== port of newlib 6b24d11b
______________________________ original newlib message
--------------------------------------------- ( none )

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
49bb9f9ae4 top: add variable width data display without scrolling <=== port of newlib fb32021e
______________________________ original newlib message

There are times when one might want to see some task's
particular variable width data. However, prior to this
commit, the only way was to first turn on a field then
scroll through it via repeated right arrow keystrokes.

[ this also required that field to be displayed last ]

Needless to say, given the potential length of some of
that variable data this could be extremely cumbersome.

Now with this patch, a Ctrl keystroke combination will
create a separate window at the bottom of the terminal
screen where such variable width data is seen in full.

[ the targeted task is the 1st task displayed, which ]
[ is a convention employed in some existing commands ]

[ the targeted data was determined by these Ctrl key ]
[ combinations: CtrlG = ctrl group; CtrlK = cmdline; ]
[ CtrlU = supplementary groups; plus CtrlV = environ ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
673fe994f9 top: eliminate the 'keys_global' redundant definitions <=== port of newlib 27f5904e
[ can't implement Ctrl-R with AGNI, it ain't present ]

______________________________ original newlib message
--------------------------------------------- ( none )

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
84a1bc779a ps: that restored aix behavior gets its ultimate tweak <=== port of newlib 5edeabbd
______________________________ original newlib message

Now that this 'c' variable initial assignment has been
moved outside the looping code, there is no longer any
need to specifically check for space/comma when 'c' is
not '%'. So, let us eliminate those two lines of code.

[ i promise not to change this algorithm ever again! ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
d091a67854 top: remove those winflags which restricted 'x' toggle <=== port of newlib ef8d1cb6
______________________________ original newlib message

On occasion, even as the top author, I wonder why that
'x' toggle has stopped working. Of course, it actually
was working but a locate request ('L') or other filter
('O') operation was active and thus temporarily turned
if off. Such behavior is documented in top's man page.

Well, with this patch that 'x' suppression is no more.

[ the original justification, however, remains true. ]

[ but there's really only one character which causes ]
[ any potential trouble & i'm gonna' keep it secret. ]

[ besides, if a display is corrupted, there's always ]
[ that '=' key which restores things back to normal. ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
0ce9962269 top: raise %CPU maximum if large numbers of processors <=== port of newlib 7279cd8e
______________________________ original newlib message

It would appear that openSUSE was the first to release
procps-ng version 4.0.0 (in the tumbleweed distro). As
a result I checked their source rpm and found a couple
of patches I'm porting to newlib for the next release.

This particulate patch, with some changes, is openSUSE
patch 'procps-ng-3.3.10-large_pcpu.patch'. The changes
were strictly cosmetic. They involved whitespace only.

[ it should be noted that the net effect for raising ]
[ the maximum is to produce a '?' in the %CPU field. ]
[ that's because its width is fixed at five columns. ]
[ but at least the '?' won't distort actual results. ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
40e9d0f299 top: ignore the SIGHUP signal if running in batch mode <=== port of newlib 6aec3ec9
______________________________ original newlib message

It would appear that openSUSE was the first to release
procps-ng version 4.0.0 (in the tumbleweed distro). As
a result I checked their source rpm and found a couple
of patches I'm porting to newlib for the next release.

This particulate commit was a refactor of the openSUSE
patch 'procps-ng-3.3.8-bnc634840.patch'. Unfortunately
their original patch did not have the intended effect.

That was because the amended signal handling logic was
performed well before the command line parameters were
parsed. So the global 'Batch' flag was in its 0 state.

. what follows is the original openSUSE commit message
------------------------------------------------------
Do not setup SIGHUP signal handler if we are in the batch mode

Top enables a signal handler for the SIGHUP signal (loss of terminal).  While
this makes sense for top's default interactive mode, it doesn't make any sense
for batch mode. If you run top in nohup just to collect data over time and
disconnect top finishes which is not what one would expect.
------------------------------------------------------

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-19 20:58:51 +10:00
Jim Warner
2282c74c33 NEWS: acknowledge that utf8 multi-byte character input
Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-14 21:52:14 +10:00
Jim Warner
c20fef1d7d top: enable processing utf8 multi-byte character input
This program was well equipped to properly handle utf8
multi-byte characters - except for one important area!

If users typed any unicode character (shift+ctrl+u) or
pasted a utf-8 multi-byte string as a response to some
input prompt, those characters would simply be ignored
since they would not pass the internal 'isprint' test.

Well, now we can handle such data while preserving all
line editing provisions such as insertions, deletions,
destructive backspace, prior line recall (up/down) and
those all important cursor left plus right arrow keys.

[ we even support overtype mode for multi-byte stuff ]
[ even though our gui emulator will not let us alter ]
[ the cursor as confirmation (as we do at a console) ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-14 21:52:13 +10:00
Jim Warner
970a3dc990 top: provide for visual hint when overtype mode active
Given that we won't always be able to alter the cursor
shapes (from underscore to block) if in input overtype
mode, this commit will at least provide a visual clue.

[ while this libvte quirk will impact gnome-terminal ]
[ and likely others, we're able to change the cursor ]
[ shape from underscore to block at a linux console. ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-14 21:52:13 +10:00
Jim Warner
f40fc402d4 top: avoid premature forced loss of that bottom window
In the commit shown below the bottom window was forced
off if a full screen replacement function was invoked.
It did so by setting Frames_signal after calling those
routines from the keys_global function. However, there
was sometimes a possibility such action was premature.

At least two of those full screen replacement routines
may issue an error message & return without corrupting
the screen. As such, forcing off that bottom window is
totally unnecessary. It therefore should be preserved.

So this commit just moves the setting of Frames_signal
to the full screen replacement routines when possible.

Reference(s):
. May, 2022 - bottom window forced off for some
commit d66c1f39b5

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-14 21:52:13 +10:00
Jim Warner
60bac2b544 doc: acknowledge the top 'message log' display ability
[ along the way, we'll fix-up the section 4 commands ]
[ summary which has gotten a little outdated lately. ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-05 21:11:38 +10:00
Jim Warner
3901dcb9c9 top: provides a new user 'message log' display ability
Messages issued by top will be displayed for only 1.25
seconds. And while this length of time would appear to
be acceptable (given the absence of complaints), there
will be times when a specific message might be missed.

So, this commit offers users the opportunity to recall
up to 10 of the most recent messages that were issued.

[ we'll just exploit top's new bottom window feature ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-05 21:11:38 +10:00
Jim Warner
15a6203b00 library: at unref, close these cached file descriptors
Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-06-05 21:11:38 +10:00
Craig Small
f8f3ea2527 library: Close filehandle for procps_loadavg
Previous commit didn't close the filehandle after making the
open non-persistent.

References:
 commit 8fcd14de18
2022-06-02 16:36:40 +10:00
Craig Small
ce0286daca library: clear rc in procps_loadavg again
During the changes to procps_loadavg I didn't set the initial
value for retval, meaning it was a random number.
It is now correctly intialised to zero.

References:
  commit 8fcd14de18
2022-05-31 22:03:22 +10:00
Craig Small
3111334ddd tload: Report on lack of /proc/loadavg
Now that the library correctly returns an error if loadavg
is not available, tload can tell the user the bad news.

References:
 procps-ng/procps#227
 commit 8fcd14de18

Signed-off-by: Craig Small <csmall@dropbear.xyz>
2022-05-31 21:35:40 +10:00
Craig Small
8fcd14de18 library: Return -errno not print messages
A library should generally return an error value, rather than
printing to stderr a message. procps_loadavg() had a few things
to change:

It had a global buffer, but we don't call this function over and
over except in tload. It also did had two macros where a plain
fopen() would do the job nicely.

This removed the macro FILE_TO_BUF which was used everywhere in oldlib
but only for loadavg in newlib.

This library change will set us up to fix tload.
2022-05-31 21:32:03 +10:00
Craig Small
0ab507fdb1 free: better error message if meminfo not available
When /proc is mounted with subset=pid free just gives the
standard cannot create meminfo structure without any hint why.
free now checks the return value and if it is -ENOENT then it
gives more information about the problem.

References:
 procps-ng/procps#227

Signed-off-by: Craig Small <csmall@dropbear.xyz>
2022-05-31 21:10:18 +10:00
Craig Small
4a183003a0 library: Cygwin doesnt have /proc/vmstat
Make the vmstat_read_failed() return non-error for Cygwin as
it always will error because /proc/vmstat doesn't exist.

Patch from Achim of the Cygwin project.

Signed-off-by: Craig Small <csmall@dropbear.xyz>
2022-05-31 20:41:30 +10:00
Jim Warner
20859f6fa6 top: the bottom 'window' headings are now translatable
Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-05-31 20:35:44 +10:00
Jim Warner
dedcfa7619 top: remove the 'BOT_MENU_YES' prototype demonstration
Now that a potential use of that bottom 'window' for a
menu has been demonstrated, we'll remove such clutter.

[ after all, the prior commit cautioned against text ]
[ made conditional which might also be translatable. ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-05-31 20:35:44 +10:00
Jim Warner
b587d946bf top: don't make translatable text subject to a #define
While it is acceptable to make text usage conditional,
one must never make the text itself conditional. After
all, the translators must be presented with all of the
text so the opportunity to translate it is never lost.

[ one wonders who the idiot was that did this anyway ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-05-31 20:35:44 +10:00
Jim Warner
daedcb974e top: cleanup of miscellaneous stuff from prior commits
Fix some errors introduced in the commits shown below.

Reference(s):
. Apr, 2022 - 'keys_global' missed redundancy
commit 27f5904edd
. Apr, 2022 - added extraneous comma in help text
commit fb32021eeb

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-05-31 20:35:44 +10:00
Craig Small
e47af25534 library: Cygwin only has 4 cpu numbers
Old library never checked how many matches there were meaning that
both 8-number and 4-number cpu lines would work.
2022-05-26 17:53:43 +10:00
Jim Warner
723b418cd4 top: enable bottom 'window' multi-byte char capability
If the special bottom 'window' routines remain unaware
of potential multi-byte characters, that heading could
be truncated prematurely and unnecessary blank line(s)
added to the reserved rows at the bottom of a display.

So, in both cases, this patch will now account for any
difference between string lengths and display columns.

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-05-26 17:36:29 +10:00
Jim Warner
ef1d82cf18 top: rework bottom 'window' logic to reduce redundancy
This patch attempts to reduce the proliferation of the
bottom window support routines by combining the 'misc'
with 'item' functions. Along the way we can now rename
those two 'pick' functions 'menu' while keeping proper
alphabetic order among all the bottom window routines.

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-05-26 17:36:29 +10:00
Craig Small
6e661d2724 build-sys: Give sensible errors if missing pkg-config
pkg-config is used to find various libraries used by procps.
Unfortunately it, or rather automake, give terrible misleading
error messages if pkg-config is not installed.

At ./configure time you get this:
configure: error: ncurses support missing/incomplete (for partial
build use --without-ncurses)

At automake time you get this:
configure.ac:33: error: possibly undefined macro: AC_MSG_ERROR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:48: error: possibly undefined macro: AS_IF
configure.ac:113: error: possibly undefined macro: AC_DEFINE

The internet is filled with such wonderful other examples.

This commit does two things:
 At autoconf time, check PKG_PREREQ macro is defined which is found in
pkg.m4 and tells us pkg-config has its macros available.
 At configure time, check the result of the pkg-config test and error
 if it didn't find it.

Now it actually says its missing pkg-config. To be fair, the autoconf
check is "documented" and recommended in pkg.m4 file.

Signed-off-by: Craig Small <csmall@dropbear.xyz>
2022-05-25 21:08:50 +10:00
Craig Small
8128641814 build-sys: Use ncursesw by default
The existing build system would only require wide ncurses for
a wide watch and even if the library was there would not link
anything else to it.

The first issue which #123 made me think of, is if ncursesw
was there and ncurses is not, why not use ncursesw?

A more major issue is if programs such as slabtop are linked
to ncurses, then certain languages will display their text
wrong, as found in #237.

The days of assuming ASCII only is ok are over the build system
now does the following:
 1. If ncursesw is available use this for all relevant programs
 2. If ncursesw is not but ncurses is, use this instead
 3. If you enable 8bit watch and either disable ncurses or
    we cannot find ncursesw error at configure time.

In related news, I hate M4sh.

References:
 procps-ng/procps#123
 procps-ng/procps#237

Signed-off-by: Craig Small <csmall@dropbear.xyz>
2022-05-21 11:06:57 +10:00
Jim Warner
f080820931 library: silence the clang warning for 'uptime' module
Reference(s):
proc/uptime.c:191:9: warning: variable 'uphours' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-05-20 16:23:20 +10:00
Jim Warner
e99c5abbf3 top: extend shift+tab (back_tab) navigation to console
Really, extend shift+tab navigation to only some linux
consoles (or maybe most consoles). However, there were
some consoles where shift+tab always yields just '\t'.

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-05-20 16:23:20 +10:00