Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
This removes the call-sites of the removed setuid feature
|
|
|
|
|
|
|
|
|
|
Draw the FunctionBar within Panel_draw instead of manually throughout
the code.
Add an optional PanelClass function drawFunctionBar, to allow specific
panels to override the default FunctionBar_draw call.
Rework the code on color change, to really change all colors (selection
markers and panel headers).
Closes: #402
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Information as seen by IWYU 0.12 + clang 9 on Linux
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
I was occasionally passing negative values to size_t.
Plus, this better reflects the intent of the variant argument.
Reported by Coverity:
https://scan8.coverity.com/reports.htm#v13253/p10402/fileInstanceId=22093891&defectInstanceId=7543346&mergedDefectId=174179&fileStart=251&fileEnd=500
|
|
Calls marked with xSnprintf shouldn't fail.
Abort program cleanly if any of them does.
|
|
|
|
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.
|
|
Several string pointer arrays pointed to const strings
but were not const themselves.
A few various structures and arrays were also marked const.
|
|
sys/time.h for struct timeval
|
|
In all the cases where sprintf was being used within htop, snprintf
could have been used. This patch replaces all uses of sprintf with
snprintf which makes sure that if a buffer is too small to hold the
resulting string, the string is simply cut short instead of causing
a buffer overflow which leads to undefined behaviour.
`sizeof(variable)` was used in these cases, as opposed to `sizeof
variable` which is my personal preference because `sizeof(variable)`
was already used in one way or another in other parts of the code.
|
|
Closes #483.
|
|
|
|
|
|
on Darwin, htop needs to run with root privileges to display information
about other users processes. This commit makes running htop SUID root a
bit more safe.
|
|
fix some style
|
|
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
|
|
gcc gives warnings like this:
warning: ignoring return value of ‘fscanf’, declared with attribute
warn_unused_result
Assign value to a variable, cast to (void) to discard it.
|
|
|
|
|
|
|
|
UTF-8 display of big numbers.
|
|
|
|
(thanks to Trond Endestrol)
|
|
|
|
|