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
Nathan Scott
c9ecd0fa74
Revert the vim_mode setting for now, needs a rethink
...
There have been too many bugs reported in vim_mode, and
the proposed fixes are increasingly fragile - hence we
have decided to back it out for now. For reference:
https://github.com/htop-dev/htop/issues/69
https://github.com/htop-dev/htop/pull/37
https://github.com/htop-dev/htop/pull/106
The whitespace changes also arrived in commit 12805f61d
not sure what that was about, but backed out as well.
2020-09-15 09:33:58 +10: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
Nathan Scott
5c5a599a2a
Merge branch 'hishamhm-pull-959'
2020-08-20 14:57:30 +10:00
Daniel Flanagan
12805f61d8
Add simple vim mode
...
This commit adds a "vim_mode" setting (false/`0` by default) that causes
keys to be remapped in the following way by the `ScreenManager`:
+ h -> LEFT
+ j -> DOWN
+ k -> UP
+ l -> RIGHT
+ LEFT -> h (toggle help)
+ DOWN -> j (noop)
+ UP -> k (open kill menu)
+ RIGHT -> l (lsof current process)
+ K (Shift+K) -> k (open kill menu)
+ J (Shift+J) -> K (toggle show/hide kernel threads)
+ L (Shift+L) -> l (lsof current process)
I couldn't figure out where the manpage documentation is in the repo,
though I admittedly did not look particularly hard.
I believe this change would be a welcome option for heavy vim users like myself
who would like a familiar way to get around in htop.
2019-10-31 11:20:55 -05:00
MartinJM
b0e24cd5a5
Added an option to disable the mouse.
2019-07-12 21:41:09 +02:00
Alan Barr
79c939eb84
Remove duplicated if condition
...
The for loop already handles i being < nPanels
Raised by cppcheck
2019-02-10 14:16:46 +01:00
Hisham
0128d222b9
Added Ctrl+A and Ctrl+E to go to beginning and end of line.
...
(Also, '^' and '$')
Closes #508 .
2016-06-15 12:45:23 -03:00
Hisham
645057d81a
Use set_escdelay() to avoid problems with ESCDELAY as a macro.
2016-05-19 16:09:47 -03:00
Hisham
c23d4f12d1
Fix behavior of ESC key, getting rid of the annoying delay.
...
Thank you @Explorer09 for the push!
Closes #417 .
2016-02-19 13:38:02 -02:00
Hisham
b54d2dde40
Check for failure in allocations.
2016-02-02 15:53:02 +01:00
Michael Klein
99b947058f
vi keys: translate ALT-h/j/k/l to arrow keys
2016-01-12 21:15:04 +01:00
Hisham Muhammad
78be8201dc
Add expand/collapse on additional clicks!
2015-08-19 19:09:54 -03:00
Hisham Muhammad
b003636958
Support for NCurses 6.0 and mouse wheel
2015-08-19 18:55:24 -03:00
Hisham Muhammad
a93db5234c
handle clicks on panel header line
2015-03-24 23:12:43 -03:00
Hisham Muhammad
ade7993fcb
incremental search and filter reintegrated!
2015-03-23 17:04:53 -03:00
Hisham Muhammad
d0c72c3fb2
Move FunctionBar inside Panel
2015-03-23 15:26:56 -03:00
Hisham Muhammad
1084a3ff8f
Working on integration of IncSet in new branch.
2015-03-22 22:39:33 -03:00
Hisham Muhammad
09c7152990
Refactor state control variables.
2015-03-22 02:50:40 -03:00
Hisham Muhammad
6f868b00c0
Fix allocation of processes. Closes #166 .
2015-02-20 14:52:10 -02:00
Hisham Muhammad
d7c843c23b
Complete cursor-based movement of headers.
2015-02-03 22:32:07 +01:00
Hisham Muhammad
c2108e5a48
Another mega-patch for the refactoring process.
...
Kinda runs, but functionality from the original main loop
is still missing. Patience.
2015-01-23 03:08:21 -02: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
9faf4938b8
Refactored key handlers.
...
Made the logic more modular, hopefully easier to follow,
and removed repeated code.
Plus, some optimization in RichString code.
2014-11-19 23:17:52 -02:00
Hisham Muhammad
ee5dc46fee
Don't end up killing init if process selected to be killed terminates before the user selects a signal. Closes #3606072 .
2013-02-26 20:24:27 +00: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
2a73405cd0
search and filter for the strace and lsof screens!
2012-11-10 00:31:37 +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
bfd86a60cc
Keep panel structure up-to-date as process list changes when headers are updated during the screen manager. Hopefully closes #3444533 .
2011-12-01 12:31:57 +00:00
Hisham Muhammad
300caa076e
Tempus fugit.
2011-05-26 16:35:07 +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
b4a63409f5
* Add Bash/emacs style navigation keys
...
(thanks to Daniel Schuler)
2010-03-03 21:13:33 +00:00
Hisham Muhammad
a600d5a6e9
Tempus fugit.
2010-02-25 02:08:18 +00:00
Hisham Muhammad
02a30bfecd
warning fixes
2010-02-25 01:43:18 +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
5d48ab8c28
Performance improvement hackathon: improve process comparison routines,
...
disable useless code in release builds such as runtime type-checking on
dynamic data structures and process fields that are not being computed,
faster(?) method for verifying the process owner (still need to ensure
correctness), don't destroy and create process objects for hidden kernel
threads over and over. Phew. I shouldn't be doing all this today, but I
could not resist.
2006-07-11 06:13:32 +00:00
Hisham Muhammad
ea855aef73
Remove references to ListBox
2006-05-30 14:00:18 +00:00
Hisham Muhammad
c2cdcd0c1d
Rename ListBox to Panel, matching dit.
2006-05-30 13:47:28 +00:00
Hisham Muhammad
a853faaa2d
Rename TypedVector to Vector, matching dit.
2006-05-30 13:45:40 +00:00
Hisham Muhammad
d6231bab89
Initial import.
2006-03-04 18:16:49 +00:00