Age | Commit message (Collapse) | Author |
|
|
|
|
|
Closes: #484
|
|
|
|
|
|
Use size of actual buffers instead of magic numbers
|
|
|
|
|
|
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.
|
|
The MIN, MAX, CLAMP, MINIMUM, and MAXIMUM macros appear
throughout the codebase with many re-definitions. Make
a single copy of each in a common header file, and use
the BSD variants of MINIMUM/MAXIMUM due to conflicts in
the system <sys/param.h> headers.
|
|
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.
|
|
Enough memory is allocated.
Header.c: In function ‘Header_readMeterName’:
Header.c:157:4: error: ‘strncpy’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
157 | strncpy(name, Meter_name(meter), nameLen);
| ^
Header.c:154:18: note: length computed here
154 | int nameLen = strlen(Meter_name(meter));
| ^
|
|
|
|
|
|
Fix #852
|
|
Calls marked with xSnprintf shouldn't fail.
Abort program cleanly if any of them does.
|
|
The (this_) token was not expanded properly, but the bug was not caught
because all uses of this macro specifies (this_)=this .
Also parenthesize macro tokens to prevent further problems.
|
|
|
|
* size_t nmemb (number of elements) first, then size_t size
* do not assume char is size 1 but use sizeof()
* allocate for char, not pointer to char (found by Michael McConville,
fixes #261)
|
|
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
|
|
|
|
|
|
Kinda runs, but functionality from the original main loop
is still missing. Patience.
|
|
This is a work-in-progress, code is currently broken.
(Some actions, and notably, the header, are missing.)
|
|
Set up environment to move other meters.
|
|
(Yes, that's dynamic typing!)
|
|
|
|
|
|
(Patch by Dawid Gajownik)
|
|
UTF-8 display of big numbers.
|
|
|
|
|
|
* Performance improvements
* Support for splitting CPU meters into two or four columns
(thanks to Wim Heirman)
* Switch from PLPA, which is now deprecated, to HWLOC.
* Bring back support for native Linux sched_setaffinity,
so we don't have to use HWLOC where we don't need to.
* Support for typing in user names and column fields in selection panels.
|
|
|
|
|
|
(thanks to Sean Noonan)
* Meters update in every screen (no longer halting while on Setup, etc.)
|
|
|
|
|
|
disable useless code in release builds such as runtime type-checking on
dynamic data structures and process fields that are not being computed,
faster(?) method for verifying the process owner (still need to ensure
correctness), don't destroy and create process objects for hidden kernel
threads over and over. Phew. I shouldn't be doing all this today, but I
could not resist.
|
|
|
|
|
|
- add AllCPUsMeter;
- because of that, the new .htoprc is incompatible with previous released versions.
|
|
|
|
|