Age | Commit message (Collapse) | Author |
|
|
|
Draw the FunctionBar within Panel_draw instead of manually throughout
the code.
Add an optional PanelClass function drawFunctionBar, to allow specific
panels to override the default FunctionBar_draw call.
Rework the code on color change, to really change all colors (selection
markers and panel headers).
Closes: #402
|
|
|
|
|
|
|
|
So, some columns (ex: SECATTR) can be sortable now.
|
|
Information as seen by IWYU 0.12 + clang 9 on Linux
|
|
|
|
|
|
Found by compiling with LTO:
ColumnsPanel.c: In function ‘ColumnsPanel_eventHandler’:
ColumnsPanel.c:46:59: error: potential null pointer dereference [-Werror=null-dereference]
46 | ((ListItem*)Panel_getSelected(super))->moving = this->moving;
| ^
AvailableColumnsPanel.c: In function ‘AvailableColumnsPanel_eventHandler’:
AvailableColumnsPanel.c:31:8: error: potential null pointer dereference [-Werror=null-dereference]
31 | int key = ((ListItem*) Panel_getSelected(super))->key;
| ^
AvailableMetersPanel.c: In function ‘AvailableMetersPanel_eventHandler’:
AvailableMetersPanel.c:40:24: error: potential null pointer dereference [-Werror=null-dereference]
40 | int param = selected->key & 0xff;
| ^
linux/IOPriorityPanel.c: In function ‘IOPriorityPanel_getIOPriority’:
linux/IOPriorityPanel.c:37:11: error: potential null pointer dereference [-Werror=null-dereference]
37 | return (IOPriority) ( ((ListItem*) Panel_getSelected(this))->key );
| ^
|
|
|
|
See https://wiki.sei.cmu.edu/confluence/display/c/STR37-C.+Arguments+to+character-handling+functions+must+be+representable+as+an+unsigned+char
|
|
Reasoning:
- implementation was unsound -- broke down when I added a fairly
basic macro definition expanding to a struct initializer in a *.c
file.
- made it way too easy (e.g. via otherwise totally innocuous git
commands) to end up with timestamps such that it always ran
MakeHeader.py but never used its output, leading to overbuild noise
when running what should be a null 'make'.
- but mostly: it's just an awkward way of dealing with C code.
|
|
|
|
|
|
GCC 7.x does some extended checks on fallthough for switch/case
statement. The warning looks like this:
warning: this statement may fall through [-Wimplicit-fallthrough=]
It can be told about implicit fallthough, however it does not
recognize comments within blocks, so move the comments outside.
|
|
Several string pointer arrays pointed to const strings
but were not const themselves.
A few various structures and arrays were also marked const.
|
|
|
|
|
|
|
|
Fixes building on case-insensitive filesystems where String.h gets confused with <string.h>.
From d734dacea0a10d0465dad4e95b3421511e7da112 Mon Sep 17 00:00:00 2001
From: David Hunt <dhunt@iolanthe.attlocal.net>
Date: Sat, 11 Jul 2015 20:56:31 -0500
Subject: [PATCH 1/8] Rename String to StringUtils
|
|
Fixes #174.
Conflicts:
Panel.c
|
|
|
|
|
|
|
|
|
|
This is a work-in-progress, code is currently broken.
(Some actions, and notably, the header, are missing.)
|
|
selected fields.
On my machine, this gives a ~20% improvement in htop process time use with the default config.
|
|
UTF-8 display of big numbers.
|
|
|
|
|
|
|
|
* Performance improvements
* Support for splitting CPU meters into two or four columns
(thanks to Wim Heirman)
* Switch from PLPA, which is now deprecated, to HWLOC.
* Bring back support for native Linux sched_setaffinity,
so we don't have to use HWLOC where we don't need to.
* Support for typing in user names and column fields in selection panels.
|
|
|
|
Reduces resulting code size.
|
|
saved setting in .htoprc for the session.
(thanks to Rodolfo Borges)
|
|
|