Commit Graph

16 Commits

Author SHA1 Message Date
Daniel Lange 94ad111391 Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
Scott Olson d45b4f4a43 Use PATH lookup for systemctl in systemd meter
Before this change, the systemd meter was broken on distros like NixOS,
which have systemctl in PATH, but not at /bin/systemctl. After the
change, it works on all my NixOS machines.
2021-07-15 10:21:12 +02:00
mayurdahibhate 3f86a011e6 platform-dependent files included relative to main source directory 2021-05-10 18:40:53 +02:00
mayurdahibhate 1b74dfe187 cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
Christian Göttsche 436808ff99 Use RichString_appendnAscii where possible
`RichString_appendnAscii()` avoids a `strlen(3)` call over
` RichString_appendAscii()`.
Use the former where the length is available from a previous checked
`snprintf(3)` call.

Keep `RichString_appendAscii()` when passing a string literal and
rely on compilers to optimize the `strlen(3)` call away.
2021-04-26 17:51:45 +02:00
Christian Göttsche 36880cd61c Add read-only option
Add command line option to disable all system and process changing
features.
2021-04-14 17:21:43 +02:00
Christian Göttsche 2d1042adb3 Save text buffer in Meter 2021-03-04 23:57:45 +01:00
Christian Göttsche 69efa94f9f Use String_eq wrapper instead of raw strcmp 2021-01-30 14:21:26 +01:00
Christian Göttsche 575edffb4b Add configure option to create static htop binary 2021-01-25 18:01:39 +01:00
Christian Göttsche 70f48f1f44 Add wrapper function for free and strdup
Reduces code in callers and helps avoiding memory leaks.
2021-01-11 20:12:34 +01:00
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 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 bc16fa037f
Convert personal copyright authorship to team 2020-12-04 13:55:55 +01:00
Christian Göttsche 7cf5277594 IWYU update (Linux) 2020-11-19 23:51:50 +01:00
Christian Göttsche f38af725c2 Silence theoretical memory leak
In practice systemctl should never return multiple SystemState= lines.
2020-11-17 13:06:31 +01:00
Christian Göttsche 2a9e8ca074 Add SystemdMeter 2020-10-31 19:51:42 +01:00