summaryrefslogtreecommitdiffstats
path: root/htop.c
Commit message (Collapse)AuthorAgeFilesLines
* Update license headers to explicitly say GPLv2+Daniel Lange2021-09-221-1/+1
|
* Abstract htop main function to allow for a platform binaryNathan Scott2021-03-251-356/+2
| | | | | | | | | | | | | | One review request relating to the PCP platform is to have a clearly separate binary from the regular htop so that we have no confusion as to what is being requested to run, to aid debugging, and a bunch of other good reasons. This commit renames htop.c to CommandLine.c and provides a minimal htop main function for 'native' platforms to use. The PCP version of this will setup libpcp.so and then call the same CommandLine_run function as regular htop. Related to https://github.com/htop-dev/htop/pull/536
* Use a platform-specific routine for long option usageNathan Scott2021-03-221-5/+4
| | | | Related to https://github.com/htop-dev/htop/pull/564
* Each platform defines its own long opt macro, prefer printfNathan Scott2021-03-221-10/+2
| | | | | | | Follow up on the two items of feedback from cgzones review, and resolve a build failure picked up by CI on Mac OS X. Related to https://github.com/htop-dev/htop/pull/564
* Move libcap use to (Linux) platform-specific codeNathan Scott2021-03-221-149/+23
| | | | | | | | | | | | The libcap code is Linux-specific so move it all below the linux/ platform subdirectory. As this feature has custom command-line long options I provide a mechanism whereby each platform can add custom long options that augment the main htop options. We'll make use this of this with the pcp/ platform in due course to implement the --host and --archive options there. Related to https://github.com/htop-dev/htop/pull/536
* Settings: check if writing configuration file was successfulChristian Göttsche2021-03-121-2/+7
| | | | | | Writing to the file stream might fail due to a immutable file or a filesystem error. Check the error indicator for the stream and for fclose() failures.
* Option and key ("*") to collapse / expand all branches under PID 1Daniel Lange2021-02-131-0/+3
| | | | | | | (and PID 2 if kernel threads are shown) Based on hishamhm/htop#510 by Krishna Chaitanya, B Closes #68
* Use MainPanel type in State structChristian Göttsche2021-02-051-3/+2
| | | | | | | | The State struct holds a pointer to the main process panel. Use the distinct MainPanel type, to improve maintainability regrading its usage. This avoids usages of down-casts from Panel to MainPanel, only up-casts from MainPanel to Panel are now required.
* Make descriptions to -shelp available so people find threadsDaniel Lange2021-02-021-1/+2
| | | | Fixes #511
* Pass Settings to CRT_initChristian Göttsche2021-01-271-1/+1
| | | | Resolve todo
* Do not try to set not owned capabilitiesChristian Göttsche2021-01-131-8/+35
| | | | | If the process has already less capabilities than we are trying to keep, do not try to set them.
* Mark several non-modified pointer variables constChristian Göttsche2021-01-111-1/+1
|
* Add option to drop Linux capabilitiesChristian Göttsche2021-01-111-0/+114
| | | | Conflicts with setuid support, but that is commonly not enabled.
* Add wrapper function for free and strdupChristian Göttsche2021-01-111-3/+1
| | | | Reduces code in callers and helps avoiding memory leaks.
* Refactor setting filter and use safe strncpyChristian Göttsche2021-01-111-6/+1
|
* Convert unnecessary static variablesChristian Göttsche2021-01-091-1/+1
| | | | | They are not used in any other function and are not used maybe uninitialized.
* Update help and man page for improved -t / -s optionsDaniel Lange2021-01-081-2/+2
|
* Free memory on multiple filter command line argumentsChristian Göttsche2021-01-081-0/+1
|
* Restore highlighted header of current sorted process columnChristian Göttsche2020-12-231-2/+0
|
* Rework enum ProcessFieldChristian Göttsche2020-12-191-2/+2
| | | | | | Use only one enum instead of a global and a platform specific one. Drop Platform_numberOfFields global variable. Set known size of Process_fields array
* Separate tree and list sort ordersHisham Muhammad2020-12-191-3/+6
| | | | | | | | | | | | 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. :)
* Set locale only once and do not override it laterChristian Göttsche2020-12-021-4/+3
|
* Hide process selection on ESCChristian Göttsche2020-11-281-0/+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-1/+1
| | | | | | | | | | 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.
* Add support to change numeric options in settings screenChristian Göttsche2020-11-251-1/+1
| | | | Like delay or highlightDelaySecs
* Move treeView setting to make status bar item correct when using --sort-key, ↵Daniel Lange2020-11-241-5/+5
| | | | | | patch from @cgzones Closes #340
* Merge branch 'cleanup-init-done' into masterNathan Scott2020-11-231-44/+19
|\
| * Minor cleanups to platform-specific init and doneNathan Scott2020-11-191-44/+19
| | | | | | | | | | | | | | Move platform-specific code out of the htop.c main function and into the platform sub-directories - primarily this is the Linux procfs path check and sensors setup/teardown; not needed on any other platforms. No functional changes here.
* | IWYU update (Linux)Christian Göttsche2020-11-191-1/+0
|/
* Align command line argument descriptions in help outputChristian Göttsche2020-11-181-11/+10
| | | | Also drop #link comment
* Use 0 as no-match value for sortkeyChristian Göttsche2020-11-171-2/+2
| | | | | Field numbers start at 1, and using -1 as no-match special value triggers static analyzers using a potential negative array access.
* Show CPU temperature in CPU meterChristian Göttsche2020-11-161-0/+12
| | | | | Show the CPU temperature in the CPU meter, like CPU frequency, instead of using an extra Meter.
* Merge branch 'hili-new-old' of adsr/htop into highlight-new-old-processesDaniel Lange2020-11-161-10/+40
|\
| * Address items from reviewAdam Saponara2020-10-311-3/+4
| |
| * Highlight new and old processes (#74)Adam Saponara2020-10-301-24/+51
| |
* | Embracing branchesBenny Baumann2020-11-021-7/+12
| |
* | Spacing around operatorsBenny Baumann2020-11-021-5/+5
| |
* | Spacing after keywords (if)Benny Baumann2020-11-021-3/+3
| |
* | Spacing after keywords (while)Benny Baumann2020-11-021-2/+2
| |
* | Fix segmentation fault when column name is NULL.Erdem Ersoy2020-10-311-1/+9
|/ | | | So, some columns (ex: SECATTR) can be sortable now.
* Merge branch 'Xalloc_Cleanup' of cgzones/htopDaniel Lange2020-10-201-1/+1
|\
| * XUtils string related updatesChristian Göttsche2020-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | - allow count out-parameter of String_split() to be NULL - introduce xStrndup() - do not allow NULL pointers passed to String_eq() it is not used in any code - implement String_startsWith(), String_contains_i() and String_eq() as inline header functions - adjust several conversion issues
* | Continue to update generic data in paused modeChristian Göttsche2020-10-191-2/+2
|/ | | | | | | | | Generic data, as CPU and memory usage, are used by Meters. In paused mode they would stop receiving updates and especially Graph Meters would stop showing continuous data. Improves: #214 Closes: #253
* Make all required includes explicitBenny Baumann2020-10-181-11/+19
| | | | Information as seen by IWYU 0.12 + clang 9 on Linux
* Rename StringUtils.[ch] to XUtils.[ch]Benny Baumann2020-10-161-1/+1
|
* Move xAsprintf, xSnprintf and xStrdup to StringUtils.hBenny Baumann2020-10-161-0/+1
|
* Misc conversion fixesChristian Göttsche2020-10-161-1/+1
|
* Add key to pause process list updatesChristian Göttsche2020-10-121-1/+2
|
* Option to set initial filterlaydervus2020-10-071-1/+32
| | | | Closes #219
* Add Copyright statement to --help (needed as it has the license info)Daniel Lange2020-10-051-0/+1
|

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