Commit Graph

2141 Commits

Author SHA1 Message Date
Christian Göttsche 157086e750 Split RichString_(append|appendn|write) into wide and ascii
RichString_writeFrom takes a top spot during performance analysis due to the
calls to mbstowcs() and iswprint().

Most of the time we know in advance that we are only going to print regular
ASCII characters.
2020-12-08 20:58:40 +01:00
Christian Göttsche 5506925b34 Use sizeof buffer instead of magic number 2020-12-08 16:36:00 +01:00
Christian Göttsche c6d9fa279b travis CI: drop macOS and Linux builds
They are covered by GitHub CI
Also testing on s390x does not serve much
2020-12-08 16:07:45 +01:00
Christian Göttsche dcf7ad386c GitHub CI: add macOS build 2020-12-08 16:07:45 +01:00
Daniel Lange 30bf212185 Merge branch 'gentoo' of cgzones/htop 2020-12-07 16:29:52 +01:00
Christian Göttsche 05969998c1 SELinuxMeter: silence comparison warning on 32-bit
linux/SELinuxMeter.c: In function ‘hasSELinuxMount’:
linux/SELinuxMeter.c:38:21: warning: comparison of integer expressions of different signedness: ‘__fsword_t’ {aka ‘int’} and ‘unsigned int’ [-Wsign-compare]
   38 |    if (sfbuf.f_type != SELINUX_MAGIC) {
      |                     ^~

Origin: 7df27b78e9/libselinux/src/init.c (L40)
2020-12-07 16:05:12 +01:00
Christian Göttsche ead978bce6 configure: check for additional linker flags for keypad(3)
Gentoo requires an explicit addition of -ltinfo

Resolves: https://bugs.gentoo.org/show_bug.cgi?id=690840
2020-12-07 15:33:16 +01:00
Nathan Scott 4f88d38256 Correct the version of htop development repo 2020-12-07 19:57:44 +11:00
Nathan Scott f03f48a0fb Change version string to note development repo build 2020-12-07 12:16:06 +11:00
Nathan Scott ad8aa2ce77 Bump version number for 3.0.3 release 2020-12-07 11:49:14 +11:00
Nathan Scott b92cfa7d7a Merge branch 'conversion' of https://github.com/cgzones/htop into cgzones-conversion 2020-12-07 11:41:22 +11:00
Christian Göttsche 57d9ecc551 OpenBSD update
- compilation failures like `return &this->this;` -> `return &this->super;`
- iwyu update
- misc cleanup
2020-12-06 16:20:55 +01:00
Christian Göttsche ad764ff972 Introduce METER_BUFFER_CHECK and METER_BUFFER_APPEND_CHR to cleanup writing to bar buffers
Closes: #294
2020-12-06 16:03:44 +01:00
Christian Göttsche 77ec86aff4 Use size_t as type for buffer length in Process 2020-12-06 16:03:44 +01:00
Christian Göttsche e1ce141bc3 Use size_t as len type for Meter_UpdateValues
Most of the time the parameter is passed to snprintf type functions
2020-12-06 16:03:44 +01:00
Christian Göttsche d9224c66a4 Use size_t as len type for xSnprintf
Like the C snprintf function
2020-12-06 16:03:44 +01:00
Christian Göttsche 3d15ba5197 Remove unused function Header_readMeterName 2020-12-06 16:03:25 +01:00
Christian Göttsche 7ba25aa3c4 IWYU update 2020-12-06 15:32:16 +01:00
Benny Baumann 22f8f8000c Initialize buffer for retrieved path
This avoids a warning on GCC 11.

Fixes #369
2020-12-06 11:51:03 +01:00
Christian Göttsche 4c4ba9d949 DragonFlyBSDProcessList: fix missing type 2020-12-06 00:43:41 +01:00
Christian Goettsche 8d1595a20e FreeBSD: fix crash on empty environment
e.g. on kernel threads
2020-12-05 20:34:23 +01:00
Christian Göttsche 876194492f LinuxProcessList: add underscore suffix for raw struct name
Fit the general coding style
2020-12-05 20:25:54 +01:00
Christian Göttsche 5f528b7455 Meter: fix bar coloring without wide ncurses support
attrset() seems to not work with mvaddchnstr()
2020-12-05 20:01:10 +01:00
Christian Göttsche 641fd2c4ad RichString: avoid signed integer misuse 2020-12-05 20:01:10 +01:00
Christian Göttsche f913680020 Hide degree character without wide ncurses support 2020-12-05 20:01:10 +01:00
Christian Göttsche f0a9dfc37e Resolve conversion from int to char 2020-12-05 19:58:32 +01:00
Christian Göttsche 1e9b184367 Resolve conversion from int to unsigned and back 2020-12-05 19:58:32 +01:00
Christian Göttsche ba1549f99b Resolve conversion from int to short 2020-12-05 19:58:32 +01:00
Christian Göttsche f61e74a4af Resolve conversion from ssize_t to int for readlink return value 2020-12-05 19:58:32 +01:00
Daniel Lange 8029e9af04 Update htop logo, provide .svg file as well 2020-12-05 13:46:34 +01:00
Daniel Lange ef0fc7129e Update AUTHORS file with htop-dev team 2020-12-05 11:07:32 +01:00
Christian Göttsche bc16fa037f
Convert personal copyright authorship to team 2020-12-04 13:55:55 +01:00
Benny Baumann cc7f16bb8f Some minor additions to the changelog 2020-12-04 07:51:33 +01:00
Nathan Scott 1f9e2ded9e Update changelog for upcoming 3.0.3 release, annotate rc1 2020-12-04 14:05:27 +11:00
Benny Baumann bd6237eb31 Document implicit incremental search 2020-12-03 22:41:31 +01:00
Benny Baumann bc91a382f6 Allow to pass '/' for item search 2020-12-03 22:41:31 +01:00
Benny Baumann bda07fa42b Handle 'q' as quit if first character 2020-12-03 22:41:31 +01:00
Benny Baumann 9adb94a379 Some visual code cleanup 2020-12-03 22:41:31 +01:00
Benny Baumann 5fe2a88c08 Use common handling for scrolling 2020-12-03 22:41:31 +01:00
Benny Baumann a7955c4966 Reduce code duplication 2020-12-03 22:41:31 +01:00
Benny Baumann c49ca61dd9 Common order for ESC/q/F10 2020-12-03 22:41:31 +01:00
Christian Göttsche 4f08d2d5ad Fix sensors configure argument 2020-12-03 16:42:38 +01:00
Christian Göttsche 64230ee5cd ci: use clang-11 2020-12-03 16:28:14 +01:00
Christian Göttsche 2ec940e0d2 ci: use correct configure flags for sensors 2020-12-03 16:28:14 +01:00
Christian Göttsche d1db9da936 Linux: avoid float division by 0 after system sleep
linux/LinuxProcessList.c:1403:63: runtime error: division by zero
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior linux/LinuxProcessList.c:1403:63 in
2020-12-03 13:25:17 +01:00
Christian Göttsche 3695cbd5d8 Silence possible NULL dereference
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-03 12:32:54 +01:00
Christian Göttsche fe84840314 Add Linux cwd process column 2020-12-03 09:21:28 +01:00
Benny Baumann c6b66a75ea Minor code streamlining 2020-12-02 23:50:05 +01:00
Benny Baumann 709821ff55 Some minor spelling issues 2020-12-02 23:50:05 +01:00
Benny Baumann 2d874177bc Avoid expensive build of tree when not using it 2020-12-02 23:50:05 +01:00