- avoid UBSAN conversions
- print N/A on no data (i.e. as unprivileged user)
- fix rate calculation to show bytes (instead of a thousandth)
- print bytes as human number (i.e. 8MB) instead of 8388608
- stabilize sorting by adjusting NAN values to very tiny negative number
- sort cases by identifier
- use check snprintf
- color nice value of 0 as gray
- color cpu and memory percentages of 0.0 as gray
- color number of threads of 1 as gray
- color idle and sleeping state as gray
- color tgid matching pid (indicating main thread) as gray
If no terminal name can be found, fall back to generic display method
with major and minor device numbers.
Print special value '(none)' in case both are zero.
Using the same function for the same library causes AC_CHECK_LIB to use
cached results.
Since we change the detection method via different or no
ncurses(5|6)-config invocation, avoid such caching by using different
functions.
- require autoconf version 2.69
was released in 2012 and one still can configure and build on older
systems (just not generate the configure script)
- use modern C99 compiler check
- drop obsolete checks: AC_C_CONST, AC_FUNC_CLOSEDIR_VOID, AC_FUNC_STAT
- drop AC_HEADER_STDBOOL in favor of C99 compatibility
On some AMD and Intel CPUs read()ing scaling_cur_freq is quite slow
(> 1ms). This delay accumulates for every core.
If the read on CPU 0 takes longer than 500us bail out and fall back to
reading the frequencies from /proc/cpuinfo.
Once the condition has been met, bail out early for the next couple of
scans.
Closes: #471
Print wide characters, like degree sign, properly via mvadd_wch().
Ignore attributes when returning value from RichString_getCharVal() in
non-wide ncurses mode to test against raw characters.
strcasestr(3) is a GNU extension and when compiling freebsd/Platform.c
on kfreebsd for Debian <string.h> is included before we define
_GNU_SOURCE, so the function is not available.
In file included from ./Object.h:16,
from ./ListItem.h:12,
from ./Meter.h:16,
from ./Header.h:10,
from ./Action.h:15,
from freebsd/Platform.h:13,
from freebsd/Platform.c:8:
./XUtils.h: In function ‘String_contains_i’:
./XUtils.h:43:11: warning: implicit declaration of function ‘strcasestr’; did you mean ‘strcasecmp’? [-Wimplicit-function-declaration]
43 | return strcasestr(s1, s2) != NULL;
| ^~~~~~~~~~
| strcasecmp
./XUtils.h:43:30: warning: comparison between pointer and integer
43 | return strcasestr(s1, s2) != NULL;
| ^~
In file included from ./Object.h:16,
from ./ProcessList.h:16,
from freebsd/FreeBSDProcessList.h:15,
from freebsd/FreeBSDProcessList.c:8:
./XUtils.h: In function ‘String_contains_i’:
./XUtils.h:43:11: warning: implicit declaration of function ‘strcasestr’; did you mean ‘strcasecmp’? [-Wimplicit-function-declaration]
43 | return strcasestr(s1, s2) != NULL;
| ^~~~~~~~~~
| strcasecmp
./XUtils.h:43:30: warning: comparison between pointer and integer
43 | return strcasestr(s1, s2) != NULL;
| ^~
strcasestr(3) is a GNU extension and when compiling freebsd/Platform.c
on kfreebsd for Debian <string.h> is included before we define
_GNU_SOURCE, so the function is not available.
In file included from ./Object.h:16,
from ./ListItem.h:12,
from ./Meter.h:16,
from ./Header.h:10,
from ./Action.h:15,
from freebsd/Platform.h:13,
from freebsd/Platform.c:8:
./XUtils.h: In function ‘String_contains_i’:
./XUtils.h:43:11: warning: implicit declaration of function ‘strcasestr’; did you mean ‘strcasecmp’? [-Wimplicit-function-declaration]
43 | return strcasestr(s1, s2) != NULL;
| ^~~~~~~~~~
| strcasecmp
./XUtils.h:43:30: warning: comparison between pointer and integer
43 | return strcasestr(s1, s2) != NULL;
| ^~
In file included from ./Object.h:16,
from ./ProcessList.h:16,
from freebsd/FreeBSDProcessList.h:15,
from freebsd/FreeBSDProcessList.c:8:
./XUtils.h: In function ‘String_contains_i’:
./XUtils.h:43:11: warning: implicit declaration of function ‘strcasestr’; did you mean ‘strcasecmp’? [-Wimplicit-function-declaration]
43 | return strcasestr(s1, s2) != NULL;
| ^~~~~~~~~~
| strcasecmp
./XUtils.h:43:30: warning: comparison between pointer and integer
43 | return strcasestr(s1, s2) != NULL;
| ^~