summaryrefslogtreecommitdiffstats
path: root/Action.c
Commit message (Collapse)AuthorAgeFilesLines
* Hashtable: use more distinct typename for key typeChristian Göttsche2021-01-061-1/+1
|
* Panel_new: reorder argumentsChristian Göttsche2021-01-041-2/+2
| | | | Reorder owner and type so they match the order of Panel_init
* Add option to hide the Function BarChristian Göttsche2021-01-041-1/+1
| | | | | | | | | | Support three settings: - Always show Function Bar - Always hide the Function Bar, except in Infoscreens (Env/Locks...) and when editing the search and filter mode - Hide the Function Bar on ESC until the next user input Closes: #439
* Action: drop resize callbackChristian Göttsche2021-01-041-7/+0
| | | | The supervising ScreenManager will resize all Panels
* Action: remove trivial wrapper functionChristian Göttsche2021-01-011-7/+3
|
* Added keybind 'N' for sorting by PIDJake Mannens2020-12-231-1/+6
|
* Position help labels one step to the rightJake Mannens2020-12-231-6/+6
|
* Remove 'n' and 'N' search inc/dec keybindsJake Mannens2020-12-241-12/+0
|
* Merge branch 'resize_bar' of https://github.com/cgzones/htop into ↵Nathan Scott2020-12-221-2/+2
|\ | | | | | | cgzones-resize_bar
| * Rework drawing of FunctionBarChristian Göttsche2020-12-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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
* | De-lazy @cgzones :)Daniel Lange2020-12-211-2/+2
| |
* | Action: sort key binding assignmentsChristian Göttsche2020-12-211-47/+46
|/ | | | Avoid accidental duplicate usage.
* Separate tree and list sort ordersHisham Muhammad2020-12-191-7/+3
| | | | | | | | | | | | Implements the suggestion from https://github.com/htop-dev/htop/issues/399#issuecomment-747861013 Thanks to the refactors from 0bd5c8fb5da and 6393baa74e5, this was really easy and clean to do. It maintains the "Tree view always by PID" option in the Settings, which results in some specific behaviors such as "clicking on the column header to exit tree view" and "picking a new sort order to exit tree view", for the sake of the muscle memory of long time htop users. :)
* Add "Tree view is always sorted by PID" option to mimic htop 2 behaviorHisham Muhammad2020-12-191-0/+3
|
* Update key mapping documentation for sortingBenny Baumann2020-12-181-1/+1
|
* Sort in paused mode after inverting sort orderChristian Göttsche2020-12-091-0/+2
|
* Implement sorting in tree modeMaxim Zhiburt2020-12-021-2/+1
|
* Hide process selection on ESCChristian Göttsche2020-11-281-1/+1
| | | | | | Do not highlight the current process line after pressing ESC in the main screen. Restore after pressing any key.
* Drop unneeded parameters to the ScreenManager constructorNathan Scott2020-11-261-2/+2
| | | | | | | | | | All calls to ScreenManager_new always pass the same first five values, the orientation is always HORIZONTAL and the y1 parameter is always the height of the passed-in header struct pointer. I think its safe to assert at this point that no VERTICAL orientation will arrive (if it does, its no harm in re-adding this then) - so we can remove unused conditionals (and TODOs) based on orientation too.
* Improving Command display/sortNarendran Gopalakrishnan2020-11-241-0/+7
|
* IWYU update (FreeBSD)Christian Goettsche2020-11-191-2/+5
|
* IWYU update (Linux)Christian Göttsche2020-11-191-1/+2
|
* Hashtable updateChristian Göttsche2020-11-171-1/+1
| | | | | | - use consistent type for key by introducing a new typedef - use unsigned types for sizes - name parameters in foreach function typedef
* Drop hideThreads SettingChristian Göttsche2020-11-151-1/+0
| | | | | It is only used to read process directories on RedHat beginning with a dot. Unconditionally accept directories with a starting dot.
* Resolve merge conflicts, merge #298 "Macro cleanup" from @BenBEDaniel Lange2020-11-151-27/+66
|\
| * Wrap inline structure definitionsBenny Baumann2020-11-021-2/+8
| |
| * Embracing branchesBenny Baumann2020-11-021-18/+46
| |
| * Spacing around operatorsBenny Baumann2020-11-021-6/+6
| |
| * Convert addattrstr to static inline functionBenny Baumann2020-11-021-1/+6
| | | | | | | | NB: The macro could have been a braced while(0) loop, which without optimization produces more code
* | Split platform dependent parts for file locks screenBenny Baumann2020-11-141-10/+1
| |
* | Implement screen for active file locksFynn Wulf2020-11-091-0/+23
|/
* Avoid some unnecessary casts and mark some not changing variables constChristian Göttsche2020-10-271-6/+6
|
* IWYU updateChristian Göttsche2020-10-201-2/+2
| | | | | | | | | | | - Add Settings forward declaration in Process.h - Add assert.h include in XUitls.c - Add conditional stdbool.h include in Object.h - Drop unneeded stddef.h include in Richstring.c - Drop unneeded unistd.h include in Process.h - Drop unneeded string.h include in linux/Platform.c - Use String_eq to avoid string.h include in Action.c - Improve script to run custom iwyu version
* Merge branch 'help_lines' of https://github.com/cgzones/htopDaniel Lange2020-10-201-18/+41
|\
| * Do not hard-code line numbers in help screen building codeChristian Göttsche2020-10-141-18/+42
| |
* | Make all required includes explicitBenny Baumann2020-10-181-9/+13
| | | | | | | | Information as seen by IWYU 0.12 + clang 9 on Linux
* | Rename StringUtils.[ch] to XUtils.[ch]Benny Baumann2020-10-161-1/+1
| |
* | Misc conversion fixesChristian Göttsche2020-10-161-1/+1
|/
* Add key to pause process list updatesChristian Göttsche2020-10-121-10/+19
|
* use 'w' for command wrapping as 'M' is already usedryenus2020-10-091-2/+2
| | | | | | | | since 'M' is already used for sort-by-memory, as with: keys['M'] = actionSortByMemory; reorder help info about shortcut keys
* Update License consistently to GPLv2 as per COPYING fileDaniel Lange2020-10-051-2/+2
|
* Drop redundant casts to the same typeChristian Göttsche2020-09-291-1/+1
|
* Do not drop qualifier in castChristian Göttsche2020-09-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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); ^
* show selected command wrapped in a separate windowryenus2020-09-241-1/+13
| | | | | | | | | | | | | | | For a process with a very long command, especially with many long command line arguments, inspecting the command and its arguments could become inconvenient. Meanwhile htop supports the concept of "screen", or window, which is extended here to create a dedicated "CommandScreen", making it possible to display the command of the selected process in a separate window meanwhile being wrapped into multiple lines. Another benefit of using a command screen is, the user can navigate through the wrapped lines of the command and perform actions like searching and filtering.
* Avoid unsigned integer overflowChristian Göttsche2020-09-241-1/+1
| | | | | | | | unsigned integer overflows are well-defined, but they might point to a counting issue. Having the code free of unsigned overflows makes it easier to spot potential bugs. Action.c:332:27: runtime error: implicit conversion from type 'int' of value -1 (32-bit, signed) to type 'uid_t' (aka 'unsigned int') changed the value to 4294967295 (32-bit, unsigned) SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Action.c:332:27 in
* Avoid checking of undefined macrosChristian Göttsche2020-09-181-2/+2
| | | | | These feature macros are either define or not defined at all at the configure step.
* Use strict function prototypesChristian Göttsche2020-09-181-2/+2
| | | | int foo(); declares a function taking any number of arguments.
* Fix memory leak in actionSetAffinity()Christian Göttsche2020-09-171-1/+1
| | | | Call correct delete method for AffinityPanel
* Axe automated header generation.Zev Weiss2020-09-031-32/+0
| | | | | | | | | | | | | | 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.
* fix width of `AffinitPanel`Bert Wesarg2020-08-261-0/+1
| | | | | | 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.

© 2014-2024 Faster IT GmbH | imprint | privacy policy