summaryrefslogtreecommitdiffstats
path: root/Action.c
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Merge branch 'ci-hwloc-job' of https://github.com/bertwesarg/htop into ↵Nathan Scott2020-08-261-2/+3
| | | | bertwesarg-ci-hwloc-job
* Avoid shadowing warningsChristian Göttsche2020-08-251-7/+7
|
* Remove trailing whitespacesChristian Göttsche2020-08-211-1/+0
|
* Merge branch 'hishamhm-pull-960'Nathan Scott2020-08-201-2/+2
|\
| * Clean up existing whitespaceDaniel Flanagan2019-10-311-2/+2
| |
* | Merge branch 'hishamhm-pull-914'Nathan Scott2020-08-201-2/+2
|\ \
| * | CPU_KERNEL redefinedsenjan2019-05-261-2/+2
| |/
* | Merge branch 'hishamhm-pull-857'Nathan Scott2020-08-201-11/+16
|\ \
| * | Don't follow process when selecting non-process-specific optionswangqr2019-02-121-11/+16
| |/ | | | | | | | | | | | | | | Disable the follow process logic in Action_pickFromVector(), when selecting sort order or user filter, since they don't apply on specific process. Fix #856
* / added MainPanel actions n and N for find next and find prev. closes #601syrrim2018-11-031-0/+13
|/
* Fix virtualization color in help screenHisham Muhammad2018-06-131-1/+1
| | | | Closes #785.
* Collapse current subtree pressing BackspaceHisham Muhammad2018-04-051-0/+24
|
* Replace size_t with int/void* unionHisham Muhammad2018-02-181-3/+3
| | | | | | | | I was occasionally passing negative values to size_t. Plus, this better reflects the intent of the variant argument. Reported by Coverity: https://scan8.coverity.com/reports.htm#v13253/p10402/fileInstanceId=22093891&defectInstanceId=7543346&mergedDefectId=174179&fileStart=251&fileEnd=500
* call clear() function when SIGWINCH is received. (#660)guoci2018-02-171-0/+1
|
* Make 'c' key work with threads as well.Hisham Muhammad2017-09-141-1/+1
|
* Mark some things as constRichard2017-07-221-2/+2
| | | | | | | Several string pointer arrays pointed to const strings but were not const themselves. A few various structures and arrays were also marked const.

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