Merge branch 'number-cpus-from-zero' of zevweiss/htop

* This changes the default to count CPUs from zero (instead of starting at one)
* Settings logic is inverted, backwards compatibility is preserved
This commit is contained in:
Daniel Lange
2020-10-20 10:06:15 +02:00
3 changed files with 9 additions and 6 deletions

View File

@ -34,7 +34,7 @@ typedef struct Settings_ {
int direction;
ProcessField sortKey;
bool countCPUsFromZero;
bool countCPUsFromOne;
bool detailedCPUTime;
bool showCPUUsage;
bool showCPUFrequency;
@ -59,7 +59,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);