Use only one enum instead of a global and a platform specific one.
Drop Platform_numberOfFields global variable.
Set known size of Process_fields array
Implements the suggestion from https://github.com/htop-dev/htop/issues/399#issuecomment-747861013
Thanks to the refactors from 0bd5c8fb5da and 6393baa74e5, this was really easy
and clean to do.
It maintains the "Tree view always by PID" option in the Settings, which
results in some specific behaviors such as "clicking on the column header to
exit tree view" and "picking a new sort order to exit tree view", for the sake
of the muscle memory of long time htop users. :)
All calls to ScreenManager_new always pass the same first
five values, the orientation is always HORIZONTAL and the
y1 parameter is always the height of the passed-in header
struct pointer. I think its safe to assert at this point
that no VERTICAL orientation will arrive (if it does, its
no harm in re-adding this then) - so we can remove unused
conditionals (and TODOs) based on orientation too.
Move platform-specific code out of the htop.c main function
and into the platform sub-directories - primarily this is
the Linux procfs path check and sensors setup/teardown; not
needed on any other platforms. No functional changes here.
- allow count out-parameter of String_split() to be NULL
- introduce xStrndup()
- do not allow NULL pointers passed to String_eq()
it is not used in any code
- implement String_startsWith(), String_contains_i() and String_eq()
as inline header functions
- adjust several conversion issues
Generic data, as CPU and memory usage, are used by Meters.
In paused mode they would stop receiving updates and especially Graph
Meters would stop showing continuous data.
Improves: #214Closes: #253
htop.c:112:13: warning: 'break' will never be executed [-Wunreachable-code-break]
break;
^~~~~
htop.c:109:13: warning: 'break' will never be executed [-Wunreachable-code-break]
break;
^~~~~
`-m` was added as short option for `--no-mouse`, this is inconsistence
to the rest of the cli since otherwise the short options to disable a
feature are capital letters. Therefore this commit renames the option to
`-M`.
This commit also documents the option in the man page.