Benny Baumann
c6f04a9c5d
Move xAsprintf, xSnprintf and xStrdup to StringUtils.h
2020-10-16 20:29:45 +02:00
Christian Göttsche
7af06659e2
Mark remaining classes const
2020-10-13 14:56:01 +02:00
Christian Göttsche
b47bc667a2
Add key to pause process list updates
2020-10-12 13:04:00 +02:00
Christian Göttsche
79ad39c718
Mark Object pointer to _display function const
2020-10-10 11:25:19 +02:00
Christian Göttsche
ba282cfe19
Mark Object instances const
2020-10-07 13:01:53 +02:00
Daniel Lange
079c2abf8e
Update License consistently to GPLv2 as per COPYING file
2020-10-05 10:13:12 +02:00
Christian Göttsche
b82a13c6ba
Add clang analyzer CI job
2020-10-03 19:04:27 +02:00
Christian Göttsche
18b1e9fba9
Do not drop qualifier in cast
...
ListItem.c:73:33: warning: cast from 'const void *' to 'struct ListItem_ *' drops const qualifier [-Wcast-qual]
ListItem* obj1 = (ListItem*) cast1;
^
ListItem.c:74:33: warning: cast from 'const void *' to 'struct ListItem_ *' drops const qualifier [-Wcast-qual]
ListItem* obj2 = (ListItem*) cast2;
^
Process.c:434:28: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual]
Process* p1 = (Process*)v1;
^
Process.c:435:28: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual]
Process* p2 = (Process*)v2;
^
Process.c:441:36: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual]
Settings *settings = ((Process*)v1)->settings;
^
Process.c:443:22: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual]
p1 = (Process*)v1;
^
Process.c:444:22: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual]
p2 = (Process*)v2;
^
Process.c:446:22: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual]
p2 = (Process*)v1;
^
Process.c:447:22: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual]
p1 = (Process*)v2;
^
AffinityPanel.c:37:16: warning: cast from 'const char *' to 'void *' drops const qualifier [-Wcast-qual]
free((void*)this->text);
^
AffinityPanel.c:39:19: warning: cast from 'const char *' to 'void *' drops const qualifier [-Wcast-qual]
free((void*)this->indent);
^
linux/LinuxProcess.c:294:36: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual]
Settings *settings = ((Process*)v1)->settings;
^
linux/LinuxProcess.c:296:27: warning: cast from 'const void *' to 'struct LinuxProcess_ *' drops const qualifier [-Wcast-qual]
p1 = (LinuxProcess*)v1;
^
linux/LinuxProcess.c:297:27: warning: cast from 'const void *' to 'struct LinuxProcess_ *' drops const qualifier [-Wcast-qual]
p2 = (LinuxProcess*)v2;
^
linux/LinuxProcess.c:299:27: warning: cast from 'const void *' to 'struct LinuxProcess_ *' drops const qualifier [-Wcast-qual]
p2 = (LinuxProcess*)v1;
^
linux/LinuxProcess.c:300:27: warning: cast from 'const void *' to 'struct LinuxProcess_ *' drops const qualifier [-Wcast-qual]
p1 = (LinuxProcess*)v2;
^
linux/LinuxProcessList.c:62:32: warning: cast from 'const void *' to 'struct TtyDriver_ *' drops const qualifier [-Wcast-qual]
TtyDriver* a = (TtyDriver*) va;
^
linux/LinuxProcessList.c:63:32: warning: cast from 'const void *' to 'struct TtyDriver_ *' drops const qualifier [-Wcast-qual]
TtyDriver* b = (TtyDriver*) vb;
^
linux/Battery.c:130:21: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual]
free((char *) isOnline);
^
linux/Battery.c:197:26: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual]
xSnprintf((char *) filePath, sizeof filePath, SYS_POWERSUPPLY_DIR "/%s/type", entryName);
^
linux/Battery.c:209:29: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual]
xSnprintf((char *) filePath, sizeof filePath, SYS_POWERSUPPLY_DIR "/%s/uevent", entryName);
^
linux/Battery.c:262:29: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual]
xSnprintf((char *) filePath, sizeof filePath, SYS_POWERSUPPLY_DIR "/%s/online", entryName);
^
2020-09-24 20:14:17 +02:00
Christian Göttsche
4a1f3fca96
Drop unnecessary usage of comma operator
2020-09-24 20:14:17 +02:00
Christian Göttsche
6b11738744
Avoid arithmetic on booleans
2020-09-23 19:09:11 +02:00
Nathan Scott
35c3a95ff9
Merge branch 'avoid-shadowing' of https://github.com/BenBE/htop into BenBE-avoid-shadowing
2020-09-09 19:40:50 +10:00
Benny Baumann
13b1e96b12
Avoid shadowing of variables
2020-09-07 17:36:01 +02:00
Zev Weiss
a1a027b9bd
Axe automated header generation.
...
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.
2020-09-03 11:58:58 -05:00
Bert Wesarg
19359cec5a
affinity panel: use the tree collapsing as in the process list
...
With one exception, the root node does also have a `-`/`+` as a prefix.
2020-08-31 22:22:22 +02:00
Bert Wesarg
b0f1336f79
affinity panel: show CPUs in the topology tree as `CPU x`
...
As it is in the non-topology list.
2020-08-31 22:18:18 +02:00
Bert Wesarg
f861a2c616
Revert "Use UTF-8 for check buttons and tree open/closed"
...
This reverts commit 5d5913d355b3a9f03da589b3542b8f55467b4ed6.
2020-08-31 22:12:46 +02:00
Bert Wesarg
94b8c2e714
fix width of `AffinitPanel`
...
The panel size of 15 includes the gap to the next panel, thus use 14 as
the minimum size and let the caller of `AffinityPanel_new` handle the
gap.
2020-08-26 22:03:11 +02:00
Nathan Scott
728b04bbb5
Merge branch 'ci-hwloc-job' of https://github.com/bertwesarg/htop into bertwesarg-ci-hwloc-job
2020-08-26 10:39:43 +10:00
Hisham Muhammad
09e241fb12
Security review: check results of snprintf.
...
Calls marked with xSnprintf shouldn't fail.
Abort program cleanly if any of them does.
2017-07-27 16:07:50 -03:00
Hisham
b54d2dde40
Check for failure in allocations.
2016-02-02 15:53:02 +01:00
Hisham Muhammad
f6c31eeaf5
Handle KEY_RECLICK events generated by ScreenManager
2015-08-27 18:43:22 -03:00
Hisham Muhammad
0ebe688d24
Avoid future confusions with how default values are set.
2015-08-12 17:29:32 -03:00
Hisham Muhammad
7cb8cb05fb
Simplify constructors.
2015-03-23 19:24:34 -03:00
Hisham Muhammad
d0c72c3fb2
Move FunctionBar inside Panel
2015-03-23 15:26:56 -03:00
Hisham Muhammad
3383d8e556
Sorry about the mega-patch.
...
This is a work-in-progress, code is currently broken.
(Some actions, and notably, the header, are missing.)
2015-01-21 23:27:31 -02:00
Hisham Muhammad
00b324bfc1
Changes in object model: separate class objects to store vtable. Also, nicer UTF-8 display of big numbers.
2012-12-05 15:12:20 +00:00
Hisham Muhammad
47e881f460
Add IO priority support ('i' key)
2012-10-04 23:59:45 +00:00
Hisham Muhammad
45f7a4fc8d
Remove old memory debugging routines. We have Valgrind nowadays.
2011-12-26 22:04:29 +00:00
Hisham Muhammad
84281bdc44
major header cleanup
2011-12-26 21:35:57 +00:00
Hisham Muhammad
81e44312b4
Use strdup explicitly
2011-12-25 20:23:53 +00:00
Hisham Muhammad
539b32dc31
simplify code
2011-11-05 04:42:15 +00:00
Hisham Muhammad
ec17b7029a
Convert affinity control from the deprecated PLPA to HWLOC
2011-09-24 00:30:47 +00:00
Hisham Muhammad
f7fe4b4722
Fix off-by-one error in PROCESSOR display
2011-09-08 02:48:53 +00:00
Hisham Muhammad
a9c0ea3753
* Option for counting CPUs from zero
...
(thanks to Sean Noonan)
* Meters update in every screen (no longer halting while on Setup, etc.)
2011-03-22 20:37:08 +00:00
Hisham Muhammad
6330ff3a0a
changes for htop 0.8.2
2009-06-02 04:51:23 +00:00
Hisham Muhammad
15ab0ad706
Let mouseclicks tick/untick checkboxes
2008-05-07 23:01:45 +00:00
Hisham Muhammad
da23c8c5a1
Clean up headers by using 'static' whenever possible.
...
Reduces resulting code size.
2008-03-09 08:58:38 +00:00
Hisham Muhammad
a839c3f2ca
Adding affinity panel
2007-12-17 05:50:00 +00:00