summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2021-01-15RichString: refactor writing limited amount of columnsChristian Göttsche
Closes: #468
2021-01-13Do not try to set not owned capabilitiesChristian Göttsche
If the process has already less capabilities than we are trying to keep, do not try to set them.
2021-01-13RichString_appendChr: add parameter to set attributesChristian Göttsche
Allows to set attributes when padding process fields in non-wide ncurses mode. Closes: #475
2021-01-12kfreeBSD: include config.h for _GNU_SOURCE (part 2)Christian Göttsche
strcasestr(3) is a GNU extension and when compiling freebsd/Platform.c on kfreebsd for Debian <string.h> is included before we define _GNU_SOURCE, so the function is not available. In file included from ./Object.h:16, from ./ListItem.h:12, from ./Meter.h:16, from ./Header.h:10, from ./Action.h:15, from freebsd/Platform.h:13, from freebsd/Platform.c:8: ./XUtils.h: In function ‘String_contains_i’: ./XUtils.h:43:11: warning: implicit declaration of function ‘strcasestr’; did you mean ‘strcasecmp’? [-Wimplicit-function-declaration] 43 | return strcasestr(s1, s2) != NULL; | ^~~~~~~~~~ | strcasecmp ./XUtils.h:43:30: warning: comparison between pointer and integer 43 | return strcasestr(s1, s2) != NULL; | ^~ In file included from ./Object.h:16, from ./ProcessList.h:16, from freebsd/FreeBSDProcessList.h:15, from freebsd/FreeBSDProcessList.c:8: ./XUtils.h: In function ‘String_contains_i’: ./XUtils.h:43:11: warning: implicit declaration of function ‘strcasestr’; did you mean ‘strcasecmp’? [-Wimplicit-function-declaration] 43 | return strcasestr(s1, s2) != NULL; | ^~~~~~~~~~ | strcasecmp ./XUtils.h:43:30: warning: comparison between pointer and integer 43 | return strcasestr(s1, s2) != NULL; | ^~
2021-01-12kfreeBSD: include config.h for _GNU_SOURCEChristian Göttsche
strcasestr(3) is a GNU extension and when compiling freebsd/Platform.c on kfreebsd for Debian <string.h> is included before we define _GNU_SOURCE, so the function is not available. In file included from ./Object.h:16, from ./ListItem.h:12, from ./Meter.h:16, from ./Header.h:10, from ./Action.h:15, from freebsd/Platform.h:13, from freebsd/Platform.c:8: ./XUtils.h: In function ‘String_contains_i’: ./XUtils.h:43:11: warning: implicit declaration of function ‘strcasestr’; did you mean ‘strcasecmp’? [-Wimplicit-function-declaration] 43 | return strcasestr(s1, s2) != NULL; | ^~~~~~~~~~ | strcasecmp ./XUtils.h:43:30: warning: comparison between pointer and integer 43 | return strcasestr(s1, s2) != NULL; | ^~ In file included from ./Object.h:16, from ./ProcessList.h:16, from freebsd/FreeBSDProcessList.h:15, from freebsd/FreeBSDProcessList.c:8: ./XUtils.h: In function ‘String_contains_i’: ./XUtils.h:43:11: warning: implicit declaration of function ‘strcasestr’; did you mean ‘strcasecmp’? [-Wimplicit-function-declaration] 43 | return strcasestr(s1, s2) != NULL; | ^~~~~~~~~~ | strcasecmp ./XUtils.h:43:30: warning: comparison between pointer and integer 43 | return strcasestr(s1, s2) != NULL; | ^~
2021-01-12Hashtable: use appropriate return type for nextPrimeChristian Göttsche
The return value is guaranteed to be smaller than SIZE_MAX, so return size_t (matters on 32 bit architectures).
2021-01-11Mark several non-modified pointer variables constChristian Göttsche
2021-01-11SELinuxMeter: hardcode SELINUX_MAGIC valueChristian Göttsche
Avoid <linux/magic.h> include, not found by musl-gcc. The value of SELINUX_MAGIC should really never change.
2021-01-11Add compiler hints on memory allocating utility functionsChristian Göttsche
2021-01-11Linux: Add SwapCached to the swap meterDavid Zarzycki
According to the Linux kernel documentation, "SwapCached" tracks "memory that once was swapped out, is swapped back in but still also is in the swapfile (if memory is needed it doesn't need to be swapped out AGAIN because it is already in the swapfile. This saves I/O)."
2021-01-11Add option to drop Linux capabilitiesChristian Göttsche
Conflicts with setuid support, but that is commonly not enabled.
2021-01-11Mark several non-modified pointer variables constChristian Göttsche
2021-01-11Remove dead codeChristian Göttsche
2021-01-11Process: drop commLenChristian Göttsche
It is only used on Linux to optimize memory handling in case the command changes to a smaller-or-equal string. This "optimization" however causes more code bloat and maintenance cost on string handling issues than it gains.
2021-01-11Add wrapper function for free and strdupChristian Göttsche
Reduces code in callers and helps avoiding memory leaks.
2021-01-11Refactor setting filter and use safe strncpyChristian Göttsche
2021-01-11XUtils: add safe strncpy implementationChristian Göttsche
The standard strncpy fails to null-terminate the destination in case the source is longer than the passed size.
2021-01-11Drop always false conditionChristian Göttsche
The previous if conditional branch would have been taken in case this condition would be true,
2021-01-11Fix git log remainder in ChangeLogDaniel Lange
2021-01-11Update version number to 3.0.6-dev to identify git repo buildsDaniel Lange
2021-01-11Release 3.0.53.0.5Daniel Lange
2021-01-11Merge branch 'fix-palette2' of deviant/htopDaniel Lange
2021-01-11Clarify that only the main screen function bar is optionally hiddenDaniel Lange
2021-01-11Fix clearing the last line in setup on function bar change (thanks cgzones)Daniel Lange
2021-01-11Fix white text in the Light Terminal colour schemeV
2021-01-11Make Infoscreens the correct heightDaniel Lange
2021-01-11Merge branch 'wide_proc_comm' of cgzones/htopDaniel Lange
2021-01-11Linux: use correct column alignment for wide fieldsChristian Göttsche
This affects: - PROC_COMM, PROC_EXE and CWD on Linux - JAIL on FreeBSD and DragonFlyBSD - ZONE on Solaris
2021-01-11Merge branch 'RichString_attrn' of cgzones/htopDaniel Lange
2021-01-11Merge branch 'following_exit' of cgzones/htopDaniel Lange
2021-01-10RichString_setAttrn: refactor to take a length instead of a stop indexChristian Göttsche
Fixes: #459
2021-01-10Exit follow mode cleanly after followed process diesChristian Göttsche
2021-01-09Solaris: make Process callbacks staticChristian Göttsche
Fixes prototype of SolarisProcess_compareByKey since 90ea3ac3
2021-01-09Convert unnecessary static variablesChristian Göttsche
They are not used in any other function and are not used maybe uninitialized.
2021-01-08Update help and man page for improved -t / -s optionsDaniel Lange
2021-01-08Free memory on multiple filter command line argumentsChristian Göttsche
2021-01-08Merge branch 'err_h' of cgzones/htopDaniel Lange
2021-01-08Merge branch 'light_color' of cgzones/htopDaniel Lange
2021-01-08Merge branch 'ncurses_format' of cgzones/htopDaniel Lange
2021-01-08Refactor crash handler message to avoid embedded directiveChristian Göttsche
CRT.c:821:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive] #ifdef HAVE_EXECINFO_H ^ CRT.c:823:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive] #endif ^ CRT.c:858:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive] #ifdef HTOP_DARWIN ^ CRT.c:862:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive] #endif ^ CRT.c:864:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive] #ifdef HTOP_DARWIN ^ CRT.c:868:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive] #endif ^
2021-01-08ci: enable format attributes in ncurses headersChristian Göttsche
Avoid format string issues like bfcb8ca0 by helping compilers spot such bogus usages. Also use LTO and O3 in the full-featured gcc job, which might trigger additional warnings on advanced inlining, like 3695cbd5d8dda27f99383437035450814463b633 and ad3acfc847e9d54f07a0684c19181d5f4c28fee4
2021-01-08Revert color change on LightTerminalChristian Göttsche
Partially revert 4b14ab9789eee004daab8594ac00a113c18af060 ColorPair(Black,Black) is not actually black on black, but due to adjustments in CRT_setColors() black on default-background-color. Thanks to V for reporting.
2021-01-08InfoScreen: fix uncontrolled format stringV
mvwprintw takes a format string as its fourth argument, and title is user-controlled. This results in e.g. crashing when trying to trace a process with a format specifier in its command line.
2021-01-07Drop usage of formatted error messages from <err.h>Christian Göttsche
They do not clean up the ncurses environment, leaving the terminal in a broken state. Also drop bare usage of exit(3).
2021-01-07Show arrow indicating order of sorted process columnChristian Göttsche
2021-01-06Unify prototype of Vector_getChristian Göttsche
Vector_get() currently takes a `const Vector*` in debug mode and a `Vector*` else.
2021-01-06Hashtable: fail hard on too big size requestChristian Göttsche
2021-01-06Hashtable: widen size from int to size_tChristian Göttsche
2021-01-06Hashtable: hide implementation of Hashtable and HashtableItemChristian Göttsche
2021-01-06Hashtable: use more distinct typename for key typeChristian Göttsche