mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-13 20:44:35 +03:00
Number CPUs from zero by default.
Numbering from one is idiosyncratic and inconsistent with basically everything else in the world; it doesn't make much sense as default behavior. All naming is updated to reflect that numbering from one is a non-default, opt-in option. The old label of the flag saved in htoprc ("cpu_count_from_zero") is still supported for backwards compatibility with existing configs, however.
This commit is contained in:
@ -31,7 +31,7 @@ typedef struct Settings_ {
|
||||
int direction;
|
||||
ProcessField sortKey;
|
||||
|
||||
bool countCPUsFromZero;
|
||||
bool countCPUsFromOne;
|
||||
bool detailedCPUTime;
|
||||
bool showCPUUsage;
|
||||
bool showCPUFrequency;
|
||||
@ -56,7 +56,7 @@ typedef struct Settings_ {
|
||||
bool changed;
|
||||
} Settings;
|
||||
|
||||
#define Settings_cpuId(settings, cpu) ((settings)->countCPUsFromZero ? (cpu) : (cpu)+1)
|
||||
#define Settings_cpuId(settings, cpu) ((settings)->countCPUsFromOne ? (cpu)+1 : (cpu))
|
||||
|
||||
void Settings_delete(Settings* this);
|
||||
|
||||
|
Reference in New Issue
Block a user