summaryrefslogtreecommitdiffstats
path: root/openbsd
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2018-04-06 12:41:36 -0300
committerHisham Muhammad <hisham@gobolinux.org>2018-04-06 12:41:36 -0300
commit6fe06fb7e55831ab81594bbac35c200136746830 (patch)
treedd4f71a2b02da7c92c1bd195566c2d0d71dc2095 /openbsd
parent657836a2ae4c250416a258534b3f383d57f61d4c (diff)
Portability: make list of default screens per-platform
Diffstat (limited to 'openbsd')
-rw-r--r--openbsd/Battery.h1
-rw-r--r--openbsd/Platform.c10
-rw-r--r--openbsd/Platform.h4
3 files changed, 12 insertions, 3 deletions
diff --git a/openbsd/Battery.h b/openbsd/Battery.h
index b1a4982e..0f05af3a 100644
--- a/openbsd/Battery.h
+++ b/openbsd/Battery.h
@@ -12,5 +12,4 @@ in the source distribution for its full text.
void Battery_getData(double* level, ACPresence* isOnAC);
-
#endif
diff --git a/openbsd/Platform.c b/openbsd/Platform.c
index 01b6c478..a49bf60b 100644
--- a/openbsd/Platform.c
+++ b/openbsd/Platform.c
@@ -92,7 +92,15 @@ static int percentages(int cnt, int64_t *out, int64_t *new, int64_t *old, int64_
return (total_change);
}
-ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_SIZE, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
+ScreenDefaults Platform_defaultScreens[] = {
+ {
+ .name = "Default",
+ .columns = "PID USER PRIORITY NICE M_SIZE M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME Command",
+ .sortKey = "PERCENT_CPU",
+ },
+};
+
+const unsigned int Platform_numberOfDefaultScreens = sizeof(Platform_defaultScreens)/sizeof(ScreenDefaults);
int Platform_numberOfFields = LAST_PROCESSFIELD;
diff --git a/openbsd/Platform.h b/openbsd/Platform.h
index e0da7b9f..34974048 100644
--- a/openbsd/Platform.h
+++ b/openbsd/Platform.h
@@ -32,7 +32,9 @@ extern ProcessFieldData Process_fields[];
* The routine assumes modulo arithmetic. This function is especially
* useful on BSD machines for calculating cpu state percentages.
*/
-extern ProcessField Platform_defaultFields[];
+extern ScreenDefaults Platform_defaultScreens[];
+
+extern const unsigned int Platform_numberOfDefaultScreens;
extern int Platform_numberOfFields;

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