summaryrefslogtreecommitdiffstats
path: root/Settings.h
diff options
context:
space:
mode:
authorZev Weiss <zev@bewilderbeest.net>2019-12-19 16:30:45 -0600
committerZev Weiss <zev@bewilderbeest.net>2020-09-15 03:25:08 -0500
commit2899ed4cb00f4d887ee92c91e274ef098fd14f2b (patch)
treef03e627afc21aeacaf294eaac0e7d005fcd98eaf /Settings.h
parenta2fef38be74d4022ef4510e749e4b136d4ac2c33 (diff)
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.
Diffstat (limited to 'Settings.h')
-rw-r--r--Settings.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Settings.h b/Settings.h
index e1518eca..e40682a3 100644
--- a/Settings.h
+++ b/Settings.h
@@ -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);

© 2014-2024 Faster IT GmbH | imprint | privacy policy