From c49e5b15e0f86080d7d33e4e31aecfb701f8f96f Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Mon, 13 Apr 2026 14:05:03 +0200 Subject: Some minor polish from tourist branch (#949) - Replace per-type fmt::formatter specializations (StringBuilderBase, NiceBase) with a single generic formatter using a HasStringViewConversion concept - Add ThousandsNum for comma-separated integer formatting (e.g. "1,234,567") - Thread naming now accepts a sort hint for trace ordering - Fix main thread trace registration to use actual thread ID and sort first - Add ExpandEnvironmentVariables() for expanding %VAR% references in strings, with tests - Add ParseHexBytes() overload with expected byte count validation - Add Flag_BelowNormalPriority to CreateProcOptions (BELOW_NORMAL_PRIORITY_CLASS on Windows, setpriority on POSIX) - Add PrettyScroll progress bar mode that pins the status line to the bottom of the terminal using scroll regions, with signal handler cleanup for Ctrl+C/SIGTERM --- src/zencore/trace.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/zencore/trace.cpp') diff --git a/src/zencore/trace.cpp b/src/zencore/trace.cpp index 7c195e69f..d7084bbd1 100644 --- a/src/zencore/trace.cpp +++ b/src/zencore/trace.cpp @@ -6,6 +6,7 @@ # include # include # include +# include # include # define TRACE_IMPLEMENT 1 @@ -121,7 +122,7 @@ TraceInit(std::string_view ProgramName) const char* CommandLineString = ""; # endif - trace::ThreadRegister("main", /* system id */ 0, /* sort id */ 0); + trace::ThreadRegister("main", /* system id */ GetCurrentThreadId(), /* sort id */ -1); trace::DescribeSession(ProgramName, # if ZEN_BUILD_DEBUG trace::Build::Debug, -- cgit v1.2.3