mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-15 21:44:36 +03:00
Portability: make list of default screens per-platform
This commit is contained in:
@ -12,5 +12,4 @@ in the source distribution for its full text.
|
||||
|
||||
void Battery_getData(double* level, ACPresence* isOnAC);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user