summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2020-12-03Fix sensors configure argumentChristian Göttsche
2020-12-03ci: use clang-11Christian Göttsche
2020-12-03ci: use correct configure flags for sensorsChristian Göttsche
2020-12-03Linux: avoid float division by 0 after system sleepChristian Göttsche
linux/LinuxProcessList.c:1403:63: runtime error: division by zero SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior linux/LinuxProcessList.c:1403:63 in
2020-12-03Silence possible NULL dereferenceChristian Göttsche
Found by compiling with LTO ProcessList.c: In function ‘ProcessList_updateTreeSetLayer’: ProcessList.c:195:15: error: potential null pointer dereference [-Werror=null-dereference] 195 | if (proc->tree_depth == deep && proc->tree_left > left && proc->tree_right < right) { | ^ ProcessList.c:195:15: error: potential null pointer dereference [-Werror=null-dereference] ProcessList.c:195:15: error: potential null pointer dereference [-Werror=null-dereference]
2020-12-03Add Linux cwd process columnChristian Göttsche
2020-12-02Minor code streamliningBenny Baumann
2020-12-02Some minor spelling issuesBenny Baumann
2020-12-02Avoid expensive build of tree when not using itBenny Baumann
2020-12-02Avoid useless search for pid 0Benny Baumann
2020-12-02Reorder field initialization to group fields by taskBenny Baumann
2020-12-02Code style cleanup and documentation/commentsBenny Baumann
2020-12-02Use common values for initial size estimates for HashtablesBenny Baumann
2020-12-02Fix issue with inconsistent displayTreeSetMaxim Zhiburt
2020-12-02Implement sorting in tree modeMaxim Zhiburt
2020-12-02Set locale only once and do not override it laterChristian Göttsche
2020-12-02Dynamically load libsensors at runtimeChristian Göttsche
2020-12-02Add xReadfile wrapper for reading small to medium size filesChristian Göttsche
Inspired by proposed Linux syscall Avoid file descriptor leaks like 4af8c63f
2020-12-02PressureStallMeter: improve display stringsChristian Göttsche
- Shorten name for header setup menu - Improve caption in bar mode
2020-12-02Meter: document MeterClass string fieldsChristian Göttsche
2020-12-02Use String_eq for readability and consistencyChristian Göttsche
2020-12-02Add cast to unsigned char to avoid signed char misuseChristian Göttsche
2020-12-02Merge identical conditional branchesChristian Göttsche
2020-12-02Drop redundant return statementsChristian Göttsche
2020-12-02Compare indices not index with pairChristian Göttsche
Fixes always true condition. Found by LGTM.com
2020-12-02Use enum element name instead of magic numberChristian Göttsche
2020-12-01Fix a little typo (spelling) in the styleguideNathan Scott
2020-12-01Merge branch 'styleguide-tweak' of https://github.com/natoscott/htop into ↵Nathan Scott
natoscott-styleguide-tweak
2020-12-01Update docs/styleguide.mdNathan Scott
Co-authored-by: BenBE <BenBE@geshi.org>
2020-11-29Print G in gigabyte colorChristian Göttsche
When printing a size like 27.2G print the G like the 27 in the gigabyte color.
2020-11-29Implement Hashtable_clear to empty an existing HashtableBenny Baumann
2020-11-29Linux: fix process parsing for hidden pid directoriesChristian Göttsche
2020-11-28Tweak style guide wording around single code statementsNathan Scott
There was wording about brace-enclosing single code statements being 'strongly encouraged' - this isn't consistently used and IMO it introduces unnecessary noise in otherwise neat, concise code. I've reworded (dropped) this section and also fixed a handful of minor typos while reading this doc a little more carefully.
2020-11-28TypoChristian Göttsche
2020-11-28Typo fix in docsBenny Baumann
2020-11-28Include documentation for COMM and EXEBenny Baumann
2020-11-28Hide process selection on ESCChristian Göttsche
Do not highlight the current process line after pressing ESC in the main screen. Restore after pressing any key.
2020-11-28Update even more snprintfsChristian Göttsche
Use size of actual buffers instead of magic numbers
2020-11-28Replace more snprintfs, reduce buffer sizes to what is printedDaniel Lange
2020-11-28Use 'N/A' instead of 'no perm' for more consistencyBenny Baumann
2020-11-28Fix reading of device nodes > 2 chars from memory mapsDaniel Lange
2020-11-28configure: do not check functions we are using unconditionallyChristian Göttsche
2020-11-28Add compat mode for systems without openat(2)Christian Göttsche
2020-11-28LinuxProcessList: use openat instead of building path stringsChristian Göttsche
openat() is available since Linux 2.6.16
2020-11-27Drop unused global ProcessList memory fieldsNathan Scott
The global ProcessList structure contains a couple of unused fields. 'sharedMem' has never been used by any Meter, since its not been anything other than zero in Linux /proc/meminfo for many, many years. The freeMem field is only used in the usedMem calculation, so it can reside on the stack like some other memory variables used within-calculations-only and not exposed to the user via a Meter.
2020-11-26Drop unneeded parameters to the ScreenManager constructorNathan Scott
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.
2020-11-26Make casing of N/A consistent (majority was N/A)Benny Baumann
2020-11-26Randomly refresh M_LRS calculation, but latest after 2sBenny Baumann
2020-11-26Distinguish display of no permissions for reading M_LRSBenny Baumann
2020-11-26Roll our own strtoull implementation specialized to handle the parsing ↵Benny Baumann
requirements