| ci: Bump FreeBSD to 15.0. | 10 months ago |
| Simplify PerformanceStatistics property code | 9 months ago |
| Typographical Fixes | 9 months ago |
| Typographical Fixes | 9 months ago |
| Typographical Fixes | 9 months ago |
| Improve Generic_unameRelease() related code Replace the "No OS Release" message that's too verbose. If the distro information (from 'Platform_FetchReleaseFunction') cannot be fetched, just use empty string as distro name. However if neither uname nor distro information is available, show "No information" (in SysArchMeter) as a placeholder. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 11 months ago |
| Update list of special header mappings for IWYU | 2 years ago |
| Fix whitespace in a LinuxProcess code comment | 9 months ago |
| build: Update ax_check_compile_flag module The AX_CHECK_COMPILE_FLAG macro included in htop's configure was serial 6 (introduced in commit 2cde4a7f8eef5f4b4701128b272d529c74f5cfc1). Update to the latest upstream version (serial 11). Also import the macro as a separate file rather than copy-and-paste to configure.ac. This makes the macro not subject to htop's coding style and it also makes future update easier. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Improve the page size retrieval code via sysconf(3) Machine code that retrieves the page size through sysconf(_SC_PAGESIZE) now behaves consistently across platforms. The return values of 0 and negative are now treated as invalid. The pageSize members for these Machine objects are now all size_t type (the return value type of sysconf() is long). Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 11 months ago |
| Transition readfile/readfileat routines into Compat Move the readfile and readfileat routines into Compat.[ch] so that they can be moved to a platform-specific location. | 10 months ago |
| Merge pull request #1846 from Explorer09/pcp-dynamic-code-improve PCPDynamicMeter & PCPDynamicScreen parser code shrink | 10 months ago |
| Suppress reporting memory leaks originating from libdevstat Based on https://cgit.freebsd.org/src/tree/lib/libdevstat/devstat.c the following four functions call memory allocation functions: - devstat_getdevs() - devstat_selectdevs() - devstat_buildmatch() - get_devstat_kvm() | 4 years ago |
| solaris: Fix typo in code comments "cruses" -> "curses" | 9 months ago |
| Simplify Platform_getRelease() API No changes to the compiled code when the Platform_getRelease() functions are inlined during optimization. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 11 months ago |
| Introduce isPercentChart member in MeterClass This property distinguishes meters that have a (relatively) fixed "total" value and meters that do not have a definite maximum value. The former meters would be drawn as a "100% stacked bar" or "graph", and the latter could have their "total" values updated automatically in bar meter mode. This commit is a prerequisite for the feature "Graph meter dynamic scaling and percent graph drawing". Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Add trim_trailing_whitespace to editorconfig | 6 years ago |
| Ignore clangd cache [ci skip] | 3 years ago |
| travis-ci: update Drop explicit CFLAGS specification as -Wno-c11-extensions is enabled on FreeBSD by the configure script. Run and check make install and make installcheck. | 5 years ago |
| Update AUTHORS file with htop-dev team | 5 years ago |
| Use strnlen() for some string width calculations Specifically in these functions: Action_setScreenTab(), TextMeterMode_draw(), LEDMeterMode_draw() RowField_keyAt() and drawTab() The strnlen() function does not calculate true display widths of the Unicode strings, but at least it works with ASCII strings. The function that can calculate display widths of Unicode strings is yet to be implemented. The goal of this commit is to prevent potential arithmetic overflows when calculating string widths and to allow a safe downcast from 'size_t' to 'int' type. This fixes some of the '-Wshorten-64-to-32' warnings produced by Clang (see issue #1673) as a result. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Display a platform-specific failed state message Further discussion around earlier PR #1745 (relating to improved handling of PCP pmcd connection loss) centered on more descriptive function names and diagnostics. In this commit the boolean logic in Platform_getValidState has been reversed to *FailedState, and we also overload the diagnostic message pointer such that NULL indicates a successful update (no error to report). | 1 year ago |
| Update includes based on IWYU | 2 years ago |
| Relocate include of config.h from header to source modeule | 2 years ago |
| Hard-code Vector default size; avoid using -1 flag Rename the DEFAULT_SIZE macro to VECTOR_DEFAULT_SIZE and hard-code the size value (10) in the macro rather than use a (-1) flag. This makes room for the 'Vector.size' member to migrate to an unsigned type. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Introduce Machine class for host-specific info (split from ProcessList) First stage in sanitizing the process list structure so that htop can support other types of lists too (cgroups, filesystems, ...), in the not-too-distant future. This introduces struct Machine for system-wide information while keeping process-list information in ProcessList (now much less). Next step is to propogate this separation into each platform, to match these core changes. | 3 years ago |
| Avoid casts for &this->super access in Panel classes | 1 year ago |
| Update includes based on IWYU | 2 years ago |
| Avoid casts for &this->super access in Panel classes | 1 year ago |
| Introduce Machine class for host-specific info (split from ProcessList) First stage in sanitizing the process list structure so that htop can support other types of lists too (cgroups, filesystems, ...), in the not-too-distant future. This introduces struct Machine for system-wide information while keeping process-list information in ProcessList (now much less). Next step is to propogate this separation into each platform, to match these core changes. | 3 years ago |
| Introduce isPercentChart member in MeterClass This property distinguishes meters that have a (relatively) fixed "total" value and meters that do not have a definite maximum value. The former meters would be drawn as a "100% stacked bar" or "graph", and the latter could have their "total" values updated automatically in bar meter mode. This commit is a prerequisite for the feature "Graph meter dynamic scaling and percent graph drawing". Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Update license headers to explicitly say GPLv2+ | 5 years ago |
| Add a section on the use of AI tools to the contributors guide | 11 months ago |
| Rearrange sections in CONTRIBUTORS.md to assist new contributors | 11 months ago |
| Remove license excemption for PLPA and update GPL-2 license text The Portable Linux Processor Affinity (PLPA) project has been depreciated in favour of the Portable Hardware Locality (hwloc) project. So the license exception present in previous versions of htop is obsolete and thus removed. The text of COPYING has been updated to the latest upstream license text of GPL-2 from the Free Software Foundation, Inc. (FSF). There are only editorial changes like line wrapping, removing page breaks, updating the "19yy" to "<year>" and changing the FSF address. | 5 years ago |
| Avoid double assignment in code style Based on a patch in https://github.com/htop-dev/htop/pull/1763#issuecomment-3478089439 Co-authored-by: Kang-Che Sung <explorer09@gmail.com> | 11 months ago |
| Update license headers to explicitly say GPLv2+ | 5 years ago |
| Fix missing include in CRT.c (sys/stat.h) Include <sys/stat.h> for the umask(2) call. This used to be included indirectly through Compat.h until the commit 3956cff00e89e169e21e733ec1ed01d08d44f5bf that refactored Compat.h. Build error is reproducible in macOS Tahoe 26.1. | 10 months ago |
| Correct CRT_degreeSign buffer size & reduce code size Make "CRT_degreeSign" a writable buffer that will be updated after the initDegreeSign() function. This avoids needing a static buffer in the function. The appropriate buffer size for "CRT_degreeSign" is (MB_LEN_MAX * 2), not 4. One side effect of this change is that "CRT_degreeSign" will lose the const qualifier in the header (CRT.h). Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Avoid casts for &this->super access in Panel classes | 1 year ago |
| Introduce Machine class for host-specific info (split from ProcessList) First stage in sanitizing the process list structure so that htop can support other types of lists too (cgroups, filesystems, ...), in the not-too-distant future. This introduces struct Machine for system-wide information while keeping process-list information in ProcessList (now much less). Next step is to propogate this separation into each platform, to match these core changes. | 3 years ago |
| Updated changelog for next stable release | 1 year ago |
| Restrict time-related meters to textual display (Text+LED mode) This disables graphing and bar mode display for: * ClockMeter * DateMeter * DateTimeMeter * UptimeMeter Co-authored-by: Benny Baumann <BenBE@geshi.org> Co-authored-by: Kang-Che Sung <explorer09@gmail.com> | 2 years ago |
| Update license headers to explicitly say GPLv2+ | 5 years ago |
| Add COLORSCHEME_NORD: Nordic inspired theme | 1 year ago |
| Update license headers to explicitly say GPLv2+ | 5 years ago |
| darwin: Del key should remove meters (Mac keyboard) Closes #1624 Closes #1601 | 1 year ago |
| Update includes based on IWYU | 2 years ago |
| Typographical Fixes | 9 months ago |
| Refactor to use a program name pointer instead of PACKAGE macro During SEGV handling under pcp-htop several incorrect strings were observed - in particular reporting htop as the binary name instead of pcp-htop. This is something we want to be crystal clear on when we request user stack traces etc, so make sure this cannot be done incorrectly. | 3 years ago |
| Rewrite the line splitting logic to avoid stack buffers The new logic reads the source buffer exactly once and moves the accumulated buffer in the dedicated buffer. This implementation avoids VLAs and instead uses a dedicated buffer allocated with xCalloc. The buffer is guaranteed to be at least 40 characters wide, meaning on narrow displays horizontal scrolling will be necessary. Doing so ensures a half-decent chance for arguments to fit fully in one line. | 1 year ago |
| Add missing copyright/file headers | 3 years ago |
| Restrict time-related meters to textual display (Text+LED mode) This disables graphing and bar mode display for: * ClockMeter * DateMeter * DateTimeMeter * UptimeMeter Co-authored-by: Benny Baumann <BenBE@geshi.org> Co-authored-by: Kang-Che Sung <explorer09@gmail.com> | 2 years ago |
| Update remaining license headers to explicitly say GPLv2+ Also change ReadMe badge. | 5 years ago |
| Restrict time-related meters to textual display (Text+LED mode) This disables graphing and bar mode display for: * ClockMeter * DateMeter * DateTimeMeter * UptimeMeter Co-authored-by: Benny Baumann <BenBE@geshi.org> Co-authored-by: Kang-Che Sung <explorer09@gmail.com> | 2 years ago |
| Update remaining license headers to explicitly say GPLv2+ Also change ReadMe badge. | 5 years ago |
| Refactor Compat.h into two parts - filesystem and assert Move the static_assert definition into a new Debug.h header so that the remaining filesystem-related parts can be moved somewhere platform-specific. | 10 months ago |
| Rework DiskIOMeter into a combined display of 2 sub-meters The new meter is a combined display of DiskIORate and DiskIOTime. The combination works similarly to MemorySwapMeter. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 11 months ago |
| Introduce DiskIORateMeter and DiskIOTimeMeter The two meters are split from DiskIOMeter and they allow separate display of disk read & write rates and the busy time percentage, including drawing the data as separate bars and graphs. The old DiskIOMeter is kept for backward compatibility. It will be reworked in the next commit. Note that DiskIORateMeter and DiskIOTimeMeter have different 'isPercentChart' values. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 11 months ago |
| Merge pull request #1733 from Explorer09/display-options-dec-inc Use default key list for DisplayOptions "Dec/Inc" function bar | 1 year ago |
| DisplayOptions: "Dec"/"Inc" operations in the function bar For numeric entries in Display Options, this gives users a hint of which keys operate on the value, and allows the value to be decreasable/increasable using the mouse as well. | 1 year ago |
| Update includes based on IWYU | 2 years ago |
| Rename ProcessList to ProcessTable throughout Following up with some discusson from a few months back, where it was proposed that ProcessTable is a better name. This data structure is definitely not a list ... if it was one-dimensional it'd be a set, but in practice it has much more in common with a two-dimensional table. The Process table is a familiar operating system concept for many people too so it resonates a little in that way as well. | 3 years ago |
| Align structures 8 byte for 64-bit platforms references: - https://hpc.rz.rptu.de/Tutorials/AVX/alignment.shtml - https://wr.informatik.uni-hamburg.de/_media/teaching/wintersemester_2013_2014/epc-14-haase-svenhendrik-alignmentinc-presentation.pdf - https://en.wikipedia.org/wiki/Data_structure_alignment - https://stackoverflow.com/a/20882083 - https://zijishi.xyz/post/optimization-technique/learning-to-use-data-alignment/ affected structs: - ScreenManager 72 to 64 bytes - Screen/DynamicIterator 24 to 16 bytes - Meter/DynamicIterator 24 to 16 bytes - IncMode 152 to 144 bytes - TraceScreen 64 to 56 bytes - LinuxProcessTable 120 to 112 bytes - FunctionBar 40 to 32 bytes Co-authored-by: BenBE <BenBE@geshi.org> | 1 year ago |
| Use correct hashtable key type (ht_key_t) in Dynamic screen/meter code No-op change in terms of generated code, but better to be consistent - thanks to BenBE for noticing this. Relates to #1702 | 1 year ago |
| Align structures 8 byte for 64-bit platforms references: - https://hpc.rz.rptu.de/Tutorials/AVX/alignment.shtml - https://wr.informatik.uni-hamburg.de/_media/teaching/wintersemester_2013_2014/epc-14-haase-svenhendrik-alignmentinc-presentation.pdf - https://en.wikipedia.org/wiki/Data_structure_alignment - https://stackoverflow.com/a/20882083 - https://zijishi.xyz/post/optimization-technique/learning-to-use-data-alignment/ affected structs: - ScreenManager 72 to 64 bytes - Screen/DynamicIterator 24 to 16 bytes - Meter/DynamicIterator 24 to 16 bytes - IncMode 152 to 144 bytes - TraceScreen 64 to 56 bytes - LinuxProcessTable 120 to 112 bytes - FunctionBar 40 to 32 bytes Co-authored-by: BenBE <BenBE@geshi.org> | 1 year ago |
| Align parameter names in declarations with definitions | 2 years ago |
| Merge branch 'style-header-consistency' of https://github.com/BenBE/htop into BenBE-style-header-consistency | 3 years ago |
| Add missing copyright/file headers | 3 years ago |
| Introduce isPercentChart member in MeterClass This property distinguishes meters that have a (relatively) fixed "total" value and meters that do not have a definite maximum value. The former meters would be drawn as a "100% stacked bar" or "graph", and the latter could have their "total" values updated automatically in bar meter mode. This commit is a prerequisite for the feature "Graph meter dynamic scaling and percent graph drawing". Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Create new File Descriptor meter | 3 years ago |
| Improve FunctionBar code regarding size handling * Use 'size_t' for loop iterators (array indices) in all FunctionBar methods. (This change will depend on compiler optimization to keep the same code size. In particular the recognition that a smaller iterator (32-bit) can be used when the limit is constrained to 32-bit integers.) * Add an assertion that 'FunctionBar.size' would never be greater than FUNCTIONBAR_MAXEVENTS (== 15). * Add explicit downcast when assigning 'FunctionBar.size' to prevent a Clang '-Wshorten-64-to-32' warning. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Reorder 'FunctionBar' struct members To prevent future problem with structure field alignment, move the non-pointer members ('size' and 'staticData') to the end of the FunctionBar structure. | 1 year ago |
| Adjust GPUMeter text display * Character width for percentage numbers changed from 4 to 5 (same as CPUMeter percentage formatting) * Percent signs "%" are now in the same color as the numbers preceding them (for a better look) * No more "%" suffix if the number will display as "N/A" Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 11 months ago |
| Move linux/GPUMeter.* to GPUMeter.* The GPUMeter code is now platform independent. Co-authored-by: Matteo Nicoli <matteo.nicoli001@gmail.com> Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Use designated initializer more Designated initializers are supported in C99 and simplify struct initializations. All members not explicitly mentioned are default initialized to 0, and also modern compilers can warn on of those missing ones. | 2 years ago |
| Update license headers to explicitly say GPLv2+ | 5 years ago |
| Hard-code Vector default size; avoid using -1 flag Rename the DEFAULT_SIZE macro to VECTOR_DEFAULT_SIZE and hard-code the size value (10) in the macro rather than use a (-1) flag. This makes room for the 'Vector.size' member to migrate to an unsigned type. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Transition several more byte length or offsets to size_t for macOS CI | 1 year ago |
| Add HeaderLayout format for one single 100%-width column | 2 years ago |
| Avoid casts for &this->super access in Panel classes | 1 year ago |
| Update license headers to explicitly say GPLv2+ | 5 years ago |
| Restrict supported modes for text-only meters Limit display to Text mode only for: * BlankMeter * HostnameMeter * SELinuxMeter (Linux) * SysArchMeter * SystemdMeter (Linux) Co-authored-by: Benny Baumann <BenBE@geshi.org> Co-authored-by: Kang-Che Sung <explorer09@gmail.com> | 2 years ago |
| Update license headers to explicitly say GPLv2+ | 5 years ago |
| Make Ctrl-U clear the current Filter or Search string while editing it Closes #1694 | 1 year ago |
| Transition several more byte length or offsets to size_t for macOS CI | 1 year ago |
| Hard-code Vector default size; avoid using -1 flag Rename the DEFAULT_SIZE macro to VECTOR_DEFAULT_SIZE and hard-code the size value (10) in the macro rather than use a (-1) flag. This makes room for the 'Vector.size' member to migrate to an unsigned type. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Add missing copyright/file headers | 3 years ago |
| Introduce screen tabs This is a forward port (by nathans) of Hisham's original code. | 4 years ago |
| Update includes based on IWYU | 2 years ago |
| Adjust LoadAverageMeter "total" assignment The meter now has a dynamic scale, and so the "total" value can be updated automatically by the bar meter drawing code. The initial "total" value for LoadAverageMeter is now always the number of active CPUs (processor threads). Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Update license headers to explicitly say GPLv2+ | 5 years ago |
| Avoid double assignment in code style Based on a patch in https://github.com/htop-dev/htop/pull/1763#issuecomment-3478089439 Co-authored-by: Kang-Che Sung <explorer09@gmail.com> | 11 months ago |
| Fix typo in comment. Thanks to @a17sol for noticing | 1 year ago |
| Introduce ATTR_RETNONNULL to indicate functions that will never return NULL | 2 years ago |
| Display a platform-specific failed state message Further discussion around earlier PR #1745 (relating to improved handling of PCP pmcd connection loss) centered on more descriptive function names and diagnostics. In this commit the boolean logic in Platform_getValidState has been reversed to *FailedState, and we also overload the diagnostic message pointer such that NULL indicates a successful update (no error to report). | 1 year ago |
| Relocate include of config.h from header to source modeule | 2 years ago |
| Move the filesystem API backwards-compatibility code Transition Compat.[ch] into the Linux platform directory. Linux is the only platform using this code after several years now so best if its not compiled into all the other platforms htop binary. However, this change is primarily intended to assist with the iOS port. Related: #1828 | 10 months ago |
| Refactor Compat.h into two parts - filesystem and assert Move the static_assert definition into a new Debug.h header so that the remaining filesystem-related parts can be moved somewhere platform-specific. | 10 months ago |
| Move shared memory next to used memory Shared memory is less available than buffers, so move it left next to used memory. This is in preparation for including shared memory in the basic "in use" for the bar text. It would not make sense to sum a discontiguous region. | 2 years ago |
| Avoid double assignment in code style Based on a patch in https://github.com/htop-dev/htop/pull/1763#issuecomment-3478089439 Co-authored-by: Kang-Che Sung <explorer09@gmail.com> | 11 months ago |
| Update license headers to explicitly say GPLv2+ | 5 years ago |
| Graph meter dynamic scaling and percent graph drawing Implement dynamic scaling for Graph meter mode, and separate it from "100% graph" drawing. This is controlled by the "isPercentChart" property of a MeterClass. If "isPercentChart" is true, the meter would be drawn as a "100% graph". Graph meters now expect the "total" value may change, and the newly changed "total" value no longer affects the percent graph drawings of earlier meter values. If "isPercentChart" is false, the meter would be drawn with a dynamic scale. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| fix: correct typos in docs and build comment - Meter.h: spell “represents” correctly in the percent chart description so the comment matches the intended meaning. - configure.ac: fix “implementation” spelling in the libunwind macro note for clearer build guidance. No functional changes, documentation only. Author: rezky_nightky <with.rezky@gmail.com> Timestamp: 2025-12-01T18:29:47Z Repository: htop Branch: main Signing: GPG (989AF9F0) Performance: 2 files, +3/-3 lines | 10 months ago |
| Introduce supportedModes bit mask for meters This allows meters to limit the available display modes/styles based on a bit mask for each meter class. Doing so allows to disable display modes that make little or no sense for a specific meter. Co-authored-by: Benny Baumann <BenBE@geshi.org> Co-authored-by: Kang-Che Sung <explorer09@gmail.com> | 2 years ago |
| darwin: Del key should remove meters (Mac keyboard) Closes #1624 Closes #1601 | 1 year ago |
| Update license headers to explicitly say GPLv2+ | 5 years ago |
| Remove trailing whitespaces | 6 years ago |
| Add NetworkIOMeter description This saves user time from looking up what "rx", "tx" and "pps" stand for. :) Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 11 months ago |
| Update includes based on IWYU | 2 years ago |
| Relocate include of config.h from header to source modeule | 2 years ago |
| Relocate include of config.h from header to source modeule | 2 years ago |
| Use 'sb' name for local 'struct stat' buffers Deprecate the use of 'st' and other names. The 'sb' name is often seen in example codes in Linux man pages. (The 'statbuf' name is sometimes also used but I choose 'sb' name because it's shorter.) No code changes. | 2 years ago |
| Update license headers to explicitly say GPLv2+ | 5 years ago |
| Add includes for config.h as per the discussion in PR #1337 Many thanks to @Explorer09 Kang-Che Sung (宋岡哲). Also add a #error stanza to XUtils.h in case somebody forgets the beautiful mess GNU forces on us. | 2 years ago |
| Add some headers in the Setup -> Display options panel | 4 years ago |
| Hard-code Vector default size; avoid using -1 flag Rename the DEFAULT_SIZE macro to VECTOR_DEFAULT_SIZE and hard-code the size value (10) in the macro rather than use a (-1) flag. This makes room for the 'Vector.size' member to migrate to an unsigned type. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Transition several more byte length or offsets to size_t for macOS CI | 1 year ago |
| Shadow path prefixes that used by NixOS In NixOS or Linux/MacOS installed with nix, all executable binary is located under /nix/store instead of paths like /usr/bin that used by distros compliant with FHS: https://old.reddit.com/r/NixOS/comments/190v0n7/ive_been_told_that_nix_isnt_fhs_compliant_what/ And /run/current-system is a symlink to an dir in /nix/store that represents the current generation: https://xn--w5d.cc/2020/08/31/current-system-nixos.html Co-authored-by: BenBE <BenBE@geshi.org> | 1 year ago |
| Process: Use size_t for "cmdline" and "procExe" offsets Convert the members "cmdlineBasenameStart", "cmdlineBasenameEnd" and "procExeBasenameOffset" in "Process" to size_t type. Also upgrade many routines that search for "basenames", COMM, and PROC_EXE string to use size_t for iterators. The "cmdlineBasenameEnd" value is no longer allowed to negative. It is now set to 0 during Process_init(). Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Introduce Row and Table classes for screens beyond top-processes This commit refactors the Process and ProcessList structures such they each have a new parent - Row and Table, respectively. These new classes handle screen updates relating to anything that could be represented in tabular format, e.g. cgroups, filesystems, etc, without us having to reimplement the display logic repeatedly for each new entity. | 3 years ago |
| Use a 0x{devnum} format for devices in lock screen, like files screen Also reflow it to not be absolutely bonkers | 3 years ago |
| Rework Vector_softRemove() and compact() operations Remove the 'dirty_index' and 'dirty_count' members of Vector object. Instead, let the callers of the Vector_softRemove() operation track the 'dirtyIndex' and pass it to Vector_compact() when needed. (The new 'dirtyIndex' local variables are safe to migrate from 'int' to 'size_t' because no negative value is used.) 'dirty_index' is supposed to have shorter lifespan than a Vector instance, and by removing the member we can reduce object size. 'dirty_count' is redundant and thus removed as well. A boolean 'isDirty' member is added to a Vector object for ease of debugging. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Relocate include of config.h from header to source modeule | 2 years ago |
| build: Add a test for whether curses.h works. The main thing I intended to test is "stdscr", but it is also useful to test ncurses functions that might be implemented as macros, such as refresh() and mvadd_wchnstr(). Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Fix typo in file name comment in Provide*.h | 3 years ago |
| README: swap regular file and symlink This allows the markdown formatted page to be rendered correctly in other web frontends, like cgit. https://git.zx2c4.com/cgit/about/ | 2 years ago |
| README: clarification on kernel requirements for I/O | 2 years ago |
| Transition several more byte length or offsets to size_t for macOS CI | 1 year ago |
| Transition several more byte length or offsets to size_t for macOS CI | 1 year ago |
| Use strnlen() for some string width calculations Specifically in these functions: Action_setScreenTab(), TextMeterMode_draw(), LEDMeterMode_draw() RowField_keyAt() and drawTab() The strnlen() function does not calculate true display widths of the Unicode strings, but at least it works with ASCII strings. The function that can calculate display widths of Unicode strings is yet to be implemented. The goal of this commit is to prevent potential arithmetic overflows when calculating string widths and to allow a safe downcast from 'size_t' to 'int' type. This fixes some of the '-Wshorten-64-to-32' warnings produced by Clang (see issue #1673) as a result. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Remove duplicate function declaration in Row.h | 2 years ago |
| Introduce Row and Table classes for screens beyond top-processes This commit refactors the Process and ProcessList structures such they each have a new parent - Row and Table, respectively. These new classes handle screen updates relating to anything that could be represented in tabular format, e.g. cgroups, filesystems, etc, without us having to reimplement the display logic repeatedly for each new entity. | 3 years ago |
| Fix warnings for FreeBSD / OpenBSD. | 11 months ago |
| Relocate include of config.h from header to source modeule | 2 years ago |
| Hard-code Vector default size; avoid using -1 flag Rename the DEFAULT_SIZE macro to VECTOR_DEFAULT_SIZE and hard-code the size value (10) in the macro rather than use a (-1) flag. This makes room for the 'Vector.size' member to migrate to an unsigned type. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Align structures 8 byte for 64-bit platforms references: - https://hpc.rz.rptu.de/Tutorials/AVX/alignment.shtml - https://wr.informatik.uni-hamburg.de/_media/teaching/wintersemester_2013_2014/epc-14-haase-svenhendrik-alignmentinc-presentation.pdf - https://en.wikipedia.org/wiki/Data_structure_alignment - https://stackoverflow.com/a/20882083 - https://zijishi.xyz/post/optimization-technique/learning-to-use-data-alignment/ affected structs: - ScreenManager 72 to 64 bytes - Screen/DynamicIterator 24 to 16 bytes - Meter/DynamicIterator 24 to 16 bytes - IncMode 152 to 144 bytes - TraceScreen 64 to 56 bytes - LinuxProcessTable 120 to 112 bytes - FunctionBar 40 to 32 bytes Co-authored-by: BenBE <BenBE@geshi.org> | 1 year ago |
| Avoid casts for &this->super access in Panel classes | 1 year ago |
| Transition several more byte length or offsets to size_t for macOS CI | 1 year ago |
| Avoid casts for &this->super access in Panel classes | 1 year ago |
| Transition several more byte length or offsets to size_t for macOS CI | 1 year ago |
| Fix a small file descriptor leak in Settings_write() | 9 months ago |
| Add option to show or hide Cache and Buffers from Graph | 1 year ago |
| Add includes for config.h as per the discussion in PR #1337 Many thanks to @Explorer09 Kang-Che Sung (宋岡哲). Also add a #error stanza to XUtils.h in case somebody forgets the beautiful mess GNU forces on us. | 2 years ago |
| Relocate include of config.h from header to source modeule | 2 years ago |
| Introduce isPercentChart member in MeterClass This property distinguishes meters that have a (relatively) fixed "total" value and meters that do not have a definite maximum value. The former meters would be drawn as a "100% stacked bar" or "graph", and the latter could have their "total" values updated automatically in bar meter mode. This commit is a prerequisite for the feature "Graph meter dynamic scaling and percent graph drawing". Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| {Memory,Swap}Meter: add "compressed memory" metrics For now, the semantics are mostly fit for Linux zswap subsystem. For instance, we add the third swap usage metric that indicates the amount of memory that is accounted to swap but in fact stored elsewhere. This exactly matches the definition of frontswap/zswap, and is probably of little use to all other platforms. | 3 years ago |
| SysArchMeter: Remove cached string pointer All Platform_getRelease() code can locally cache the string, thus it's useless to keep a static pointer in the SysArchMeter code. Removing it also means one less potentially dangling pointer. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 11 months ago |
| Update license headers to explicitly say GPLv2+ | 5 years ago |
| Rename ProcessList to ProcessTable throughout Following up with some discusson from a few months back, where it was proposed that ProcessTable is a better name. This data structure is definitely not a list ... if it was one-dimensional it'd be a set, but in practice it has much more in common with a two-dimensional table. The Process table is a familiar operating system concept for many people too so it resonates a little in that way as well. | 3 years ago |
| Avoid binary search arithmetic overflow in Table.c | 9 months ago |
| Rework Vector_softRemove() and compact() operations Remove the 'dirty_index' and 'dirty_count' members of Vector object. Instead, let the callers of the Vector_softRemove() operation track the 'dirtyIndex' and pass it to Vector_compact() when needed. (The new 'dirtyIndex' local variables are safe to migrate from 'int' to 'size_t' because no negative value is used.) 'dirty_index' is supposed to have shorter lifespan than a Vector instance, and by removing the member we can reduce object size. 'dirty_count' is redundant and thus removed as well. A boolean 'isDirty' member is added to a Vector object for ease of debugging. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| TasksMeter: remove code for auto-updating "total" The bar meter drawing code can now update the "total" value automatically. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Update license headers to explicitly say GPLv2+ | 5 years ago |
| Fixed the issue that the process traced by strace ends and causes the CPU to be fully loaded. | 2 years ago |
| Align structures 8 byte for 64-bit platforms references: - https://hpc.rz.rptu.de/Tutorials/AVX/alignment.shtml - https://wr.informatik.uni-hamburg.de/_media/teaching/wintersemester_2013_2014/epc-14-haase-svenhendrik-alignmentinc-presentation.pdf - https://en.wikipedia.org/wiki/Data_structure_alignment - https://stackoverflow.com/a/20882083 - https://zijishi.xyz/post/optimization-technique/learning-to-use-data-alignment/ affected structs: - ScreenManager 72 to 64 bytes - Screen/DynamicIterator 24 to 16 bytes - Meter/DynamicIterator 24 to 16 bytes - IncMode 152 to 144 bytes - TraceScreen 64 to 56 bytes - LinuxProcessTable 120 to 112 bytes - FunctionBar 40 to 32 bytes Co-authored-by: BenBE <BenBE@geshi.org> | 1 year ago |
| Restrict time-related meters to textual display (Text+LED mode) This disables graphing and bar mode display for: * ClockMeter * DateMeter * DateTimeMeter * UptimeMeter Co-authored-by: Benny Baumann <BenBE@geshi.org> Co-authored-by: Kang-Che Sung <explorer09@gmail.com> | 2 years ago |
| Update license headers to explicitly say GPLv2+ | 5 years ago |
| Please Clang 15 CRT.c:1015:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] void CRT_done() { ^ void | 4 years ago |
| Update license headers to explicitly say GPLv2+ | 5 years ago |
| Avoid pivotIndex overflow in (Vector) quickSort | 1 year ago |
| Rework Vector_softRemove() and compact() operations Remove the 'dirty_index' and 'dirty_count' members of Vector object. Instead, let the callers of the Vector_softRemove() operation track the 'dirtyIndex' and pass it to Vector_compact() when needed. (The new 'dirtyIndex' local variables are safe to migrate from 'int' to 'size_t' because no negative value is used.) 'dirty_index' is supposed to have shorter lifespan than a Vector instance, and by removing the member we can reduce object size. 'dirty_count' is redundant and thus removed as well. A boolean 'isDirty' member is added to a Vector object for ease of debugging. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> | 1 year ago |
| Transition readfile/readfileat routines into Compat Move the readfile and readfileat routines into Compat.[ch] so that they can be moved to a platform-specific location. | 10 months ago |
| Transition readfile/readfileat routines into Compat Move the readfile and readfileat routines into Compat.[ch] so that they can be moved to a platform-specific location. | 10 months ago |
| autotools: enable warnings and cleanup - enable warnings in autogen script - drop unused m4/ directory usage - drop AC_TYPE_SIGNAL: C99 guarantees the signal return type to be void - drop AC_CHECK_FILE of procdir: most of the time compilation is done on a different system than htop is run and there is a runtime check in place - improve linux_affinity corss compile logic: use fourth argument instead of pre-test | 6 years ago |
| Check attributes color, type, and width for valid values | 2 years ago |
| Typographical error fixes in configure.ac "can not" -> "cannot" | 9 months ago |
| Updates for 2026. Happy New Year! | 9 months ago |
| Refactor to use a program name pointer instead of PACKAGE macro During SEGV handling under pcp-htop several incorrect strings were observed - in particular reporting htop as the binary name instead of pcp-htop. This is something we want to be crystal clear on when we request user stack traces etc, so make sure this cannot be done incorrectly. | 3 years ago |
| Add Japanese support for htop.desktop | 1 year ago |
| Optimize images to reduce filesize Amended to use ECT / DeflOpt compressed images contributed by @Explorer09 | 4 years ago |
| Update htop logo, provide .svg file as well | 5 years ago |
| Updates for 2026. Happy New Year! | 9 months ago |
| Refactor to use a program name pointer instead of PACKAGE macro During SEGV handling under pcp-htop several incorrect strings were observed - in particular reporting htop as the binary name instead of pcp-htop. This is something we want to be crystal clear on when we request user stack traces etc, so make sure this cannot be done incorrectly. | 3 years ago |
| Remove trailing whitespaces | 6 years ago |