李通洲
0fe3db419e
Separator: honors FQDN settings in Title module
2025-08-14 13:30:02 +08:00
李通洲
61f2823903
Global: fixes -ffast-math compatibility
...
Unifies unset double handling using `-DBL_MAX` sentinel
Fixes #1894
2025-08-14 10:01:34 +08:00
李通洲
146981009b
CommandLine: add --gen-config-full
2025-08-11 14:49:22 +08:00
李通洲
3345c1e9dd
Percent: fix a copy-paste error
2025-08-11 14:18:41 +08:00
李通洲
329cb229f8
Chore: remove unused functions
2025-08-10 23:15:13 +08:00
李通洲
bedb5eb6c5
Netif (SunOS): work around a bug that fails to detect default route for IPv4
2025-08-10 21:42:01 +08:00
李通洲
4588644d39
Networking (SunOS): fix compiler warnings
2025-08-09 18:35:53 +08:00
李通洲
ed94b4c46c
Netif (SunOS): fix compiler warnings
2025-08-09 18:34:25 +08:00
李通洲
8cfee9d693
Netif: unifies BSD netif handling
2025-08-08 11:03:04 +08:00
Carter Li
64568b31d1
Netif (Haiku): add preferred source addr
2025-08-08 10:03:43 +08:00
李通洲
be11013ae2
LocalIP (BSD): fix building
2025-08-07 23:28:54 +08:00
Carter Li
a84c4dc1f4
Netif: refactor API for dual-stack route detection
...
Unifies IPv4 and IPv6 default route queries under a shared result structure and per-family functions. Improves clarity and extensibility by centralizing route logic, streamlining detection of preferred interfaces, and updating all consumers to use the new API.
Prepares for more robust multi-protocol network information handling.
2025-08-07 16:35:42 +08:00
李通洲
b20aea7ab8
Netif (BSD): split different implementations
2025-08-06 13:58:41 +08:00
Jannis Pohl
5e770dc8b0
LocalIP: consider preferred source address when retrieving default route ( #1883 )
...
* LocalIP: consider preferred source address when retrieving default route
* LocalIP: fix logic error when there is no preferred source address
* LocalIP: use macros rather than manual free/close
* LocalIP(BSD): fix build error
* LocalIP: address Copilot suggestions
2025-08-05 23:30:06 +08:00
李通洲
fa4e11c73b
JsonConfig: write all flags when generating config file
2025-08-05 16:47:48 +08:00
李通洲
75d2c668d0
Modules: refactor module option handling for static allocation
...
Moves module option structs out of global config and removes dynamic allocation, using static buffers and size assertions for safer, simpler management.
Refactors module initialization and destruction to work with isolated option structs, eliminating the need for the previous modules container and related code.
Unifies module option header usage and updates detection logic to leverage statically-sized option buffers, improving encapsulation and maintainability.
Simplifies module function signatures and reduces coupling between modules and config.
Enhances future extensibility and reliability by enforcing max size constraints and removing unnecessary indirections.
2025-08-04 14:46:01 +08:00
李通洲
6f8d276545
Modules: add init and destroy option callbacks to module info
2025-08-03 18:40:53 +08:00
李通洲
094d736d38
Modules: remove all parseCommandOptions and related stuff
2025-08-03 10:22:32 +08:00
Carter Li
59289bef6c
Percent: silense compiler warnings
2025-08-02 19:03:42 +08:00
李通洲
0b02543ef2
JsonConfig: refactor JSON key handling to improve safety and consistency
...
Also make keys case-sensitive
2025-08-02 18:51:03 +08:00
李通洲
3cef51ec4a
JsonConfig: refactor string buffer JSON handling for robustness
2025-08-02 17:41:19 +08:00
李通洲
ba3e26f2b4
Option: fix a possible null reference segfault
2025-08-01 16:05:18 +08:00
李通洲
54c5bc5110
Bar: refactor config to use nested objects and deprecates old fields
2025-08-01 15:12:30 +08:00
李通洲
c6675f82f0
Bar: add customizable bar color options for percentage bars
2025-08-01 15:03:24 +08:00
李通洲
afe2c85047
Bar: add configurable elapsed bar borders for percent bars
...
Fix #1875
2025-08-01 15:03:24 +08:00
李通洲
aa0bbd5aee
Percent: add option --percent-width
2025-07-30 15:06:16 +08:00
李通洲
a0174e8666
Global: add new unit related options
...
1. `--<module>-space-before-unit`
2. `--duration-abbreviation`
3. various code refactoring and cleanups
2025-07-30 15:03:23 +08:00
李通洲
a3182c31cb
Chore: add FF_C_NONNULL
2025-07-28 15:35:02 +08:00
李通洲
02c3254961
Netif (Windows): correct default route detection (v2)
2025-07-24 19:31:41 +08:00
李通洲
ccbb9e90ea
Netif (Windows): fix default route detection when the default adapter is disabled
...
This commit addresses an issue where the default route detection on Windows incorrectly identified a disabled adapter as the default route. Previously, when a user disabled the adapter configured as the default route, the system still reported it as active due to stale routing table entries.
2025-07-21 20:24:43 +08:00
李通洲
6c56348e54
JsonConfig: add modules[n].condition to run modules conditionally on different platforms
2025-07-18 15:45:25 +08:00
李通洲
8c6dc34654
Processing (*nix): fix compiling on Android 7
2025-07-18 13:27:17 +08:00
李通洲
cf2034b93e
Processing (Windows): redirect unused std handles to NUL to avoid potential errors
2025-07-18 10:39:11 +08:00
李通洲
f7db03b8c4
Processing (*nix): use traditional fork-exec on Android and OpenBSD
...
Fix https://github.com/termux/termux-packages/issues/25369
2025-07-18 10:37:52 +08:00
Carter Li
1ac1f1f889
Chore: silense compiler warnings
2025-07-16 15:19:48 +08:00
李通洲
468d1e0903
Display: add option --fraction-ndigits
...
to control number of digits to print when formatting ordinary fraction numbers
2025-07-16 10:33:20 +08:00
李通洲
6851e7b082
Uptime / Users: add years, days-of-year and year-fraction
...
Like what `Disk` has
2025-07-16 09:53:09 +08:00
李通洲
6f3ed4a7b4
Processing (Linux): cache the index of $LANG
2025-07-15 10:22:56 +08:00
Carter Li
2eda6464ad
Processing (Linux): use posix_spawnp for better performance
2025-07-09 23:56:02 +08:00
Carter Li
2622fc12a6
Chore (Linux): silence compiler warnings
2025-07-09 20:23:28 +08:00
Dariqq
821462e152
Chore: Add a missing semicolon ( #1828 )
...
Followup to a9f021ccb9
2025-07-03 20:16:14 -05:00
李通洲
98738b6920
CPUUsage (Windows): detect perflib support dynamically based on OS version
2025-07-02 19:40:22 +08:00
李通洲
18a6929662
CPUUsage (Windows): disable ENABLE_CPUUSAGE_PERFLIB by default
...
Because Windows 7 doesn't support it
2025-07-01 22:08:08 +08:00
李通洲
40e57b7698
IO: increase PROC_FILE_BUFFSIZ to avoid possible short reads
2025-06-30 19:16:08 +08:00
Carter Li
92fe44183d
Shell (SunOS): ignore leading -
2025-06-22 12:12:49 +08:00
apocelipes
3291a9945f
Global: add missing O_CLOEXEC to open()
2025-06-19 22:40:06 +08:00
李通洲
c2ed71c4eb
Global: set SetErrorMode(SEM_FAILCRITICALERRORS) globally
...
Fix #1805
2025-06-15 00:00:22 +08:00
李通洲
9a54d92e9f
Stat: use ESC 7/8 instead of CSI s/u
...
Fix Apple Terminal compatibility #1755
2025-05-16 10:33:58 +08:00
李通洲
5c546ab8e7
Parsing: silence compiler warnings
2025-04-30 14:14:28 +08:00
李通洲
5d960ec744
Uptime: fix non-normalized time being shown
...
Fix #1720
2025-04-29 10:22:19 +08:00