summaryrefslogtreecommitdiffstats
path: root/Settings.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * Highlight new and old processes (#74)Adam Saponara2020-10-301-0/+7
| |
* | Drop hideThreads SettingChristian Göttsche2020-11-151-4/+0
| | | | | | | | | | It is only used to read process directories on RedHat beginning with a dot. Unconditionally accept directories with a starting dot.
* | Embracing branchesBenny Baumann2020-11-021-5/+11
| |
* | Spacing around operatorsBenny Baumann2020-11-021-3/+3
| |
* | Whitespace and indentation issuesBenny Baumann2020-11-021-2/+3
|/
* Merge branch 'Xalloc_Cleanup' of cgzones/htopDaniel Lange2020-10-201-7/+4
|\
| * XUtils string related updatesChristian Göttsche2020-10-191-7/+4
| | | | | | | | | | | | | | | | | | | | - 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
* | Merge branch 'number-cpus-from-zero' of zevweiss/htopDaniel Lange2020-10-201-3/+6
|\ \ | |/ |/| | | | | * This changes the default to count CPUs from zero (instead of starting at one) * Settings logic is inverted, backwards compatibility is preserved
| * Number CPUs from zero by default.Zev Weiss2020-09-151-3/+6
| | | | | | | | | | | | | | | | | | | | | | Numbering from one is idiosyncratic and inconsistent with basically everything else in the world; it doesn't make much sense as default behavior. All naming is updated to reflect that numbering from one is a non-default, opt-in option. The old label of the flag saved in htoprc ("cpu_count_from_zero") is still supported for backwards compatibility with existing configs, however.
* | Make all required includes explicitBenny Baumann2020-10-181-5/+7
| | | | | | | | Information as seen by IWYU 0.12 + clang 9 on Linux
* | Rename StringUtils.[ch] to XUtils.[ch]Benny Baumann2020-10-161-3/+3
| |
* | Settings: do not save initial cpu countChristian Göttsche2020-10-121-12/+11
| | | | | | | | Not needed and confusing with ProcessList.cpuCount
* | Update License consistently to GPLv2 as per COPYING fileDaniel Lange2020-10-051-1/+1
| |
* | Introduce ARRAYSIZEChristian Göttsche2020-10-031-1/+1
| |
* | Reorder check to avoid crash on invalid process field settingChristian Göttsche2020-09-171-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If using a setting from a different development version with an unsupported process field, first dereferencing Process_fields[id] yields to a crash: ================================================================= ==19530==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000000612800 at pc 0x000000521d1a bp 0x7ffec47a5ff0 sp 0x7ffec47a5fe8 READ of size 8 at 0x000000612800 thread T0 #0 0x521d19 in readFields .htop/Settings.c:107:40 #1 0x51d117 in Settings_read .htop/Settings.c:141:10 #2 0x51c0c4 in Settings_new .htop/Settings.c:382:12 #3 0x4eafe2 in main .htop/htop.c:220:25 #4 0x7fa450570cc9 in __libc_start_main csu/../csu/libc-start.c:308:16 #5 0x427a59 in _start (.htop/htop+0x427a59) 0x000000612800 is located 0 bytes to the right of global variable 'Process_fields' defined in 'linux/LinuxProcess.c:24:18' (0x6118a0) of size 3936 SUMMARY: AddressSanitizer: global-buffer-overflow .htop/Settings.c:107:40 in readFields Shadow bytes around the buggy address: 0x0000800ba4b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0000800ba4c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0000800ba4d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0000800ba4e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0000800ba4f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0000800ba500:[f9]f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x0000800ba510: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x0000800ba520: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x0000800ba530: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x0000800ba540: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x0000800ba550: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==19530==ABORTING
* Revert the vim_mode setting for now, needs a rethinkNathan Scott2020-09-151-10/+0
| | | | | | | | | | | | | There have been too many bugs reported in vim_mode, and the proposed fixes are increasingly fragile - hence we have decided to back it out for now. For reference: https://github.com/htop-dev/htop/issues/69 https://github.com/htop-dev/htop/pull/37 https://github.com/htop-dev/htop/pull/106 The whitespace changes also arrived in commit 12805f61d not sure what that was about, but backed out as well.
* Clean up some code duplication in the header filesHugo Musso Gualandi2020-09-121-2/+0
| | | | | | | | | | | | | PR htop-dev/htop#70 got rid of the infrastructure for generating header files, but it left behind some code duplication. Some of cases are things that belong in the header file and don't need to be repeated in the C file. Other cases are things that belong in the C file and don't need to be in the header file. In this commit I tried to fix all of these that I could find. When given a choice I preferred keeping things out of the header file, unless they were being used by someone else.
* Axe automated header generation.Zev Weiss2020-09-031-56/+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.
* Merge branch 'ci-hwloc-job' of https://github.com/bertwesarg/htop into ↵Nathan Scott2020-08-261-0/+13
| | | | bertwesarg-ci-hwloc-job
* Merge branch 'hishamhm-pull-959'Nathan Scott2020-08-201-0/+4
|\
| * Fix whitespaceDaniel Flanagan2019-10-311-8/+8
| |
| * Add simple vim modeDaniel Flanagan2019-10-311-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a "vim_mode" setting (false/`0` by default) that causes keys to be remapped in the following way by the `ScreenManager`: + h -> LEFT + j -> DOWN + k -> UP + l -> RIGHT + LEFT -> h (toggle help) + DOWN -> j (noop) + UP -> k (open kill menu) + RIGHT -> l (lsof current process) + K (Shift+K) -> k (open kill menu) + J (Shift+J) -> K (toggle show/hide kernel threads) + L (Shift+L) -> l (lsof current process) I couldn't figure out where the manpage documentation is in the repo, though I admittedly did not look particularly hard. I believe this change would be a welcome option for heavy vim users like myself who would like a familiar way to get around in htop.
* | Merge branch 'hishamhm-pull-932'Nathan Scott2020-08-201-0/+10
|\ \
| * | Add a display option to hide CPU usage number from CPU meter.Arnavion2019-08-101-0/+5
| | |
| * | Add new display option to also show CPU frequency in CPU meters.Arnavion2019-08-091-0/+5
| |/ | | | | | | | | | | | | | | The option is only implemented on Linux. On other platforms, and on Linuxes that do not expose the relevant sysfs file, the frequency will be 0. The "CPU average" meter does not show a frequency, only the individual per-CPU meters.
* / Added an option to disable the mouse.MartinJM2019-07-121-8/+13
|/
* Make settings file finding sequence more straightforwardHisham Muhammad2018-02-181-16/+19
| | | | Avoid unnecessary access() call and make code read more linearly.
* Only consider a read successful when the file seems validHisham Muhammad2018-02-181-7/+9
| | | | | Require at least the `fields` entry to be present, so we can have a decent guess that it was indeed a settings file.
* Merge branch 'master' of https://github.com/hishamhm/htopHisham Muhammad2017-07-261-3/+9
|\
| * Settings: do not emit trailing whitespaceWael M. Nasreddine2017-07-241-3/+9
| |
* | Security review: make privilege dropping-restoring optional.Hisham Muhammad2017-07-261-10/+9
|/ | | | | | | This is/was necessary only on macOS, because you needed root in order to read the process list. This was never necessary on Linux, and it also raises security concerns, so now it needs to be enabled explicitly at build time.
* Dynamically adjust the size of line readsHisham Muhammad2016-06-191-4/+7
| | | | | | | * Dynamically adjust the size of line reads. * Remove some more uses of fgets with arbitrary sizes. * Fix reading of lines and width of n column. Fixes #514.
* Silence cast warning.Hisham2016-05-301-1/+1
|
* Silence warnings about seteuid return value.Hisham2016-05-251-6/+6
| | | | Closes #483.
* Initialize default meter modes properly.Hisham2016-02-021-5/+15
|
* Merge branch 'xalloc'Hisham2016-02-021-17/+17
|\
| * Check for failure in allocations.Hisham2016-02-021-17/+17
| |
* | Differentiate threads by default.Hisham2016-01-311-1/+2
|/
* Fix fopen mode in Settings_read()Michael Klein2015-12-091-1/+1
|
* drop privileges during Settings_read()/Settings_write()Michael Klein2015-12-021-1/+13
|
* Rename String to StringUtils.David Hunt2015-08-191-1/+1
| | | | | | | | | Fixes building on case-insensitive filesystems where String.h gets confused with <string.h>. From d734dacea0a10d0465dad4e95b3421511e7da112 Mon Sep 17 00:00:00 2001 From: David Hunt <dhunt@iolanthe.attlocal.net> Date: Sat, 11 Jul 2015 20:56:31 -0500 Subject: [PATCH 1/8] Rename String to StringUtils
* Ensure default matches classic htop behavior.Hisham Muhammad2015-08-121-0/+1
|
* Merge pull request #148 from nckx/display-basenameHisham Muhammad2015-08-121-0/+4
|\ | | | | [PATCH] New setting: "Show program path"
| * New setting: "Show program path"Tobias Geerinckx-Rice2015-08-071-0/+4
| | | | | | | | | | | | | | | | | | Add a setting to hide all but the last component from the programme path, leaving only the "basename". Makes htop more usable on smaller screens, or systems with longer than average paths. Off by default. "Highlight program basename" will still be respected, to further visually separate process names from their arguments.
* | store cpuCount in an attributeHisham Muhammad2015-05-131-9/+11
|/
* Reset to the default scheme, not the last one.Hisham Muhammad2015-04-091-2/+1
|
* Fix saving new color scheme.Hisham Muhammad2015-04-091-1/+2
|
* Fix NULL-termination of array for later use by String_freeArray.Hisham Muhammad2015-03-251-1/+1
|
* Fix saving of header states, motion in Setup screen.Hisham Muhammad2015-03-161-0/+2
|
* Get FreeBSD tree to compile again with latest changes.Hisham Muhammad2015-03-161-1/+1
|

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