mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
Split statements that should go onto multiple lines
This commit is contained in:
parent
3bc73aa088
commit
e7f8d7bcc9
6
Action.c
6
Action.c
@ -227,7 +227,8 @@ static Htop_Reaction actionToggleMergedCommand(State* st) {
|
||||
static Htop_Reaction actionToggleTreeView(State* st) {
|
||||
st->settings->treeView = !st->settings->treeView;
|
||||
|
||||
if (!st->settings->allBranchesCollapsed) ProcessList_expandTree(st->pl);
|
||||
if (!st->settings->allBranchesCollapsed)
|
||||
ProcessList_expandTree(st->pl);
|
||||
return HTOP_REFRESH | HTOP_SAVE_SETTINGS | HTOP_KEEP_FOLLOWING | HTOP_REDRAW_BAR | HTOP_UPDATE_PANELHDR;
|
||||
}
|
||||
|
||||
@ -399,7 +400,8 @@ static Htop_Reaction actionLsof(State* st) {
|
||||
|
||||
static Htop_Reaction actionShowLocks(State* st) {
|
||||
const Process* p = (Process*) Panel_getSelected((Panel*)st->mainPanel);
|
||||
if (!p) return HTOP_OK;
|
||||
if (!p)
|
||||
return HTOP_OK;
|
||||
ProcessLocksScreen* pls = ProcessLocksScreen_new(p);
|
||||
InfoScreen_run((InfoScreen*)pls);
|
||||
ProcessLocksScreen_delete((Object*)pls);
|
||||
|
@ -117,7 +117,8 @@ static void AvailableMetersPanel_addDynamicMeter(ATTR_UNUSED ht_key_t key, void*
|
||||
DynamicIterator* iter = (DynamicIterator*)data;
|
||||
unsigned int identifier = (iter->offset << 16) | iter->id;
|
||||
const char* label = meter->description ? meter->description : meter->caption;
|
||||
if (!label) label = meter->name; /* last fallback to name, guaranteed set */
|
||||
if (!label)
|
||||
label = meter->name; /* last fallback to name, guaranteed set */
|
||||
Panel_add(iter->super, (Object*) ListItem_new(label, identifier));
|
||||
iter->id++;
|
||||
}
|
||||
|
@ -124,7 +124,8 @@ static CommandLineSettings parseArguments(const char* program, int argc, char**
|
||||
int opt, opti=0;
|
||||
/* Parse arguments */
|
||||
while ((opt = getopt_long(argc, argv, "hVMCs:td:u::Up:F:H::", long_opts, &opti))) {
|
||||
if (opt == EOF) break;
|
||||
if (opt == EOF)
|
||||
break;
|
||||
switch (opt) {
|
||||
case 'h':
|
||||
printHelpFlag(program);
|
||||
|
@ -92,7 +92,9 @@ static inline void Platform_gettime_realtime(struct timeval* tv, uint64_t* msec)
|
||||
|
||||
void Platform_gettime_monotonic(uint64_t* msec);
|
||||
|
||||
static inline Hashtable* Platform_dynamicMeters(void) { return NULL; }
|
||||
static inline Hashtable* Platform_dynamicMeters(void) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void Platform_dynamicMeterInit(ATTR_UNUSED Meter* meter) { }
|
||||
|
||||
|
@ -89,7 +89,9 @@ static inline void Platform_gettime_monotonic(uint64_t* msec) {
|
||||
Generic_gettime_monotonic(msec);
|
||||
}
|
||||
|
||||
static inline Hashtable* Platform_dynamicMeters(void) { return NULL; }
|
||||
static inline Hashtable* Platform_dynamicMeters(void) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void Platform_dynamicMeterInit(ATTR_UNUSED Meter* meter) { }
|
||||
|
||||
|
@ -89,7 +89,9 @@ static inline void Platform_gettime_monotonic(uint64_t* msec) {
|
||||
Generic_gettime_monotonic(msec);
|
||||
}
|
||||
|
||||
static inline Hashtable* Platform_dynamicMeters(void) { return NULL; }
|
||||
static inline Hashtable* Platform_dynamicMeters(void) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void Platform_dynamicMeterInit(ATTR_UNUSED Meter* meter) { }
|
||||
|
||||
|
@ -217,7 +217,8 @@ static void LinuxProcess_writeField(const Process* this, RichString* str, Proces
|
||||
totalRate = lp->io_rate_write_bps;
|
||||
else
|
||||
totalRate = NAN;
|
||||
Process_printRate(str, totalRate, coloring); return;
|
||||
Process_printRate(str, totalRate, coloring);
|
||||
return;
|
||||
}
|
||||
#ifdef HAVE_OPENVZ
|
||||
case CTID: xSnprintf(buffer, n, "%-8s ", lp->ctid ? lp->ctid : ""); break;
|
||||
|
@ -105,7 +105,9 @@ static inline void Platform_gettime_monotonic(uint64_t* msec) {
|
||||
Generic_gettime_monotonic(msec);
|
||||
}
|
||||
|
||||
static inline Hashtable* Platform_dynamicMeters(void) { return NULL; }
|
||||
static inline Hashtable* Platform_dynamicMeters(void) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void Platform_dynamicMeterInit(ATTR_UNUSED Meter* meter) { }
|
||||
|
||||
|
@ -94,7 +94,9 @@ static inline void Platform_gettime_monotonic(uint64_t* msec) {
|
||||
Generic_gettime_monotonic(msec);
|
||||
}
|
||||
|
||||
static inline Hashtable* Platform_dynamicMeters(void) { return NULL; }
|
||||
static inline Hashtable* Platform_dynamicMeters(void) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void Platform_dynamicMeterInit(ATTR_UNUSED Meter* meter) { }
|
||||
|
||||
|
@ -87,7 +87,9 @@ static inline void Platform_gettime_monotonic(uint64_t* msec) {
|
||||
Generic_gettime_monotonic(msec);
|
||||
}
|
||||
|
||||
static inline Hashtable* Platform_dynamicMeters(void) { return NULL; }
|
||||
static inline Hashtable* Platform_dynamicMeters(void) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void Platform_dynamicMeterInit(ATTR_UNUSED Meter* meter) { }
|
||||
|
||||
|
@ -147,7 +147,8 @@ static void PCPProcess_writeField(const Process* this, RichString* str, ProcessF
|
||||
totalRate = pp->io_rate_write_bps;
|
||||
else
|
||||
totalRate = NAN;
|
||||
Process_printRate(str, totalRate, coloring); return;
|
||||
Process_printRate(str, totalRate, coloring);
|
||||
return;
|
||||
}
|
||||
case CGROUP: xSnprintf(buffer, n, "%-10s ", pp->cgroup ? pp->cgroup : ""); break;
|
||||
case OOM: xSnprintf(buffer, n, "%4u ", pp->oom); break;
|
||||
|
@ -128,7 +128,9 @@ IGNORE_WCASTQUAL_BEGIN
|
||||
IGNORE_WCASTQUAL_END
|
||||
}
|
||||
|
||||
static inline Hashtable* Platform_dynamicMeters(void) { return NULL; }
|
||||
static inline Hashtable* Platform_dynamicMeters(void) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void Platform_dynamicMeterInit(ATTR_UNUSED Meter* meter) { }
|
||||
|
||||
|
@ -78,7 +78,9 @@ static inline void Platform_gettime_monotonic(uint64_t* msec) {
|
||||
Generic_gettime_monotonic(msec);
|
||||
}
|
||||
|
||||
static inline Hashtable* Platform_dynamicMeters(void) { return NULL; }
|
||||
static inline Hashtable* Platform_dynamicMeters(void) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void Platform_dynamicMeterInit(ATTR_UNUSED Meter* meter) { }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user