-
-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve make dist
to warn on building inside a git repository
#1458
Commits on Apr 17, 2024
-
Improve
make dist
to warn on building inside a git repositoryDaniel Lange authored and Daniel Lange committedApr 17, 2024 Configuration menu - View commit details
-
Copy full SHA for 50ad97c - Browse repository at this point
Copy the full SHA 50ad97cView commit details
Commits on May 17, 2024
-
Use 'fp' name for local 'FILE*' variables.
It is inappropriate to use the 'fd' name for 'FILE*' variables. POSIX file descriptiors are of type 'int' and are distinguished from ISO C stream pointers (type 'FILE*'). Rename these variables to 'fp', which is a preferred naming in POSIX. (Note that ISO C preferred the 'stream' name for the variables.) No code changes.
Configuration menu - View commit details
-
Copy full SHA for 64a7a6a - Browse repository at this point
Copy the full SHA 64a7a6aView commit details -
Use 'sb' name for local 'struct stat' buffers
Deprecate the use of 'st' and other names. The 'sb' name is often seen in example codes in Linux man pages. (The 'statbuf' name is sometimes also used but I choose 'sb' name because it's shorter.) No code changes.
Configuration menu - View commit details
-
Copy full SHA for 56c276f - Browse repository at this point
Copy the full SHA 56c276fView commit details -
Configuration menu - View commit details
-
Copy full SHA for ebefd73 - Browse repository at this point
Copy the full SHA ebefd73View commit details -
Reserve full function array to make the GCC14 static code analyzer happy
Only happens with LTO, -fanalyzer, and -fsanitize=address,leak
Configuration menu - View commit details
-
Copy full SHA for 86f187e - Browse repository at this point
Copy the full SHA 86f187eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 42b2012 - Browse repository at this point
Copy the full SHA 42b2012View commit details -
Obsolete the CUSTOM_METERMODE use in default mode
The use of CUSTOM_METERMODE value in meter default mode was a bad design. There are no meter that really has a "custom" mode to work with and currently that value serves as a useless placeholder that hides the real default mode for a meter. Replace CUSTOM_METERMODE in `defaultMode` of all meters with the real intended default modes. Currently only CPU meters and MemorySwapMeter used this, and their real defaults are BAR_METERMODE. In Meter_setMode(), remove the special treatment of `defaultMode == CUSTOM_METERMODE`, Meter_setMode() still calls the `updateMode` function for custom treatment when it's present for a meter class. As CUSTOM_METERMODE is obsolete from `defaultMode`, the init functions of CPU meters and MemorySwapMeter need to be adjusted to avoid incomplete initialization (Meter.draw function bring NULL). Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 50365a0 - Browse repository at this point
Copy the full SHA 50365a0View commit details -
Don't initialize meter mode in custom meter init functions
Let the respective `MeterClass.updateMode` functions initialize the meter mode instead. The `updateMode` function is always called after the `MeterClass.init` function by `Meter_new()`. This not only simplifies the init functions of meter subclasses, but avoids the use of the global `Meter_modes` array when it's unnecessary. Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 1671879 - Browse repository at this point
Copy the full SHA 1671879View commit details -
Remove CUSTOM_METERMODE MeterModeId
Meter mode ID 0 will now be reserved.
Configuration menu - View commit details
-
Copy full SHA for dda6ae8 - Browse repository at this point
Copy the full SHA dda6ae8View commit details -
CPUMeter: Read height from sub-meter objects
The Meter objects have their own 'h' properties. Avoid access to the `Meter_modes` array. Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9089607 - Browse repository at this point
Copy the full SHA 9089607View commit details -
MemorySwapMeter: Read height from sub-meter objects
The Meter objects have their own 'h' properties. Avoid access to the `Meter_modes` array. Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 3d790e2 - Browse repository at this point
Copy the full SHA 3d790e2View commit details -
Reorder Meter.c sections. No code changes.
This section reordering is a prerequisite to privatizing the `Meter_modes` array.
Configuration menu - View commit details
-
Copy full SHA for 7289abf - Browse repository at this point
Copy the full SHA 7289abfView commit details -
Make 'Meter_modes' private and simplify its structure
All client codes that access this global `Meter_modes` array have been replaced in previous commits, thus it's no longer necessary to keep this internal information (draw functions, default heights, etc.) public. It was also a bad idea when the client codes need to avoid accessing `Meter_modes[0]` (which is reserved and contains null information) by themselves. Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 417f73c - Browse repository at this point
Copy the full SHA 417f73cView commit details -
New header "MeterMode.h" for MeterModeId definitions
This is a prerequisite to using MeterModeId type in more headers, to avoid header dependency hell.
Configuration menu - View commit details
-
Copy full SHA for 9f5e4fe - Browse repository at this point
Copy the full SHA 9f5e4feView commit details -
Define MeterModeId to unsigned int and use it throughout
All uses of meter drawing "mode" numbers now have the type `MeterModeId`, including the uses in structures and arrays. `MeterModeId` is defined as `unsigned int`, as (currently) it doesn't save any code size by defining it to any smaller type. Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9e28da5 - Browse repository at this point
Copy the full SHA 9e28da5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7fd551b - Browse repository at this point
Copy the full SHA 7fd551bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 439d54d - Browse repository at this point
Copy the full SHA 439d54dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ae2175 - Browse repository at this point
Copy the full SHA 1ae2175View commit details -
Configuration menu - View commit details
-
Copy full SHA for 42a6667 - Browse repository at this point
Copy the full SHA 42a6667View commit details -
darwin: scan thread information
Inspired by: hishamhm/htop#848 Closes: htop-dev#542
Configuration menu - View commit details
-
Copy full SHA for de40e65 - Browse repository at this point
Copy the full SHA de40e65View commit details -
Update '__STDC_VERSION__' check with C23
`__STDC_VERSION__` will be defined as 202311L for C23.
Configuration menu - View commit details
-
Copy full SHA for 33094bb - Browse repository at this point
Copy the full SHA 33094bbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9659d60 - Browse repository at this point
Copy the full SHA 9659d60View commit details -
Linux: Permit non-ASCII for CGROUP, CONTAINER & SECATTR fields
Assume the CGROUP, CCGROUP, CONTAINER and SECATTR field value may contain non-ASCII characters and use RichString_appendWide() to convert the strings. Patch suggested by Christian Göttsche (@cgzones) Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for cdb7b0e - Browse repository at this point
Copy the full SHA cdb7b0eView commit details -
Fix GCC build warning in NetBSD 10
The warning message is "array subscript has type 'char' [-Wchar-subscripts]" Fix this by casting to 'unsigned char' before passing any character to a `<ctype.h>` function. Also add an assertion to RichString_writeFromAscii() to ensure the characters in the string are all in ASCII range. Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 8f7dbd4 - Browse repository at this point
Copy the full SHA 8f7dbd4View commit details -
Configuration menu - View commit details
-
Copy full SHA for b449b68 - Browse repository at this point
Copy the full SHA b449b68View commit details -
Linux: show newlines in commands as ? instead of space
Since \n is used internally by htop to split command lines, replace \n with \r in command lines to not display them as space. Merging the command string will not work, but newlines in commands should be rather the exception.
Configuration menu - View commit details
-
Copy full SHA for 8f88fdf - Browse repository at this point
Copy the full SHA 8f88fdfView commit details -
Annotate mbstowcs_nonfatal() with restrict
The arguments to our mbrtowc(3) wrapper should not alias, since they also must not for mbrtowc(3). Might help some compilers optimizing the code.
Configuration menu - View commit details
-
Copy full SHA for ce733a3 - Browse repository at this point
Copy the full SHA ce733a3View commit details -
Linux: reorder /proc/<pid>/status parsing
When parsing an essential pid entry file like 'status' fails, we treat the process as a short-lived one and skip adding it into the process table. This should be done before the process is added, as the goto label used for error handling can free the process structure, thus causing an use-after-free scenario. Fixes: 22d25db ("Linux: detect container process by different PID namespace") Closes: htop-dev#1455
Configuration menu - View commit details
-
Copy full SHA for f16719b - Browse repository at this point
Copy the full SHA f16719bView commit details