• src/syncterm/term.c wren_

    From Deuc¿@VERT to Git commit to main/sbbs/m on Monday, April 27, 2026 16:09:00
    https://gitlab.synchro.net/main/sbbs/-/commit/9fa67ef0a2121ea31c1e37da
    Modified Files:
    src/syncterm/term.c wren_host.c wren_host.h
    Log Message:
    SyncTERM: tint Wren log indicator by entry kind (red=error, yellow=print)

    struct wren_log gains an error_total counter (incremented in
    log_append when source != WREN_LOG_PRINT) and the seen-snapshot
    records both totals, so wren_host_log_unread_error() can answer "is
    the unread set tainted by an error?" without walking the ring.

    The status-bar bug glyph at col 27 now paints bright red  when at
    least one unread entry is a compile/runtime/stack-frame error, bright
    yellow  when only print output is unread, blank when caught up.
    A new redraw bit (0x400) tracks the error-vs-not transition so the
    tint changes are picked up.

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Thursday, May 07, 2026 19:02:00
    https://gitlab.synchro.net/main/sbbs/-/commit/90d5e11dafd04aa34b6a8eb7
    Modified Files:
    src/syncterm/term.c wren_bind_xfer.c wren_bind_xfer.h src/xptls/CMakeLists.txt
    Log Message:
    Wren transfer mailbox: portable threading + xptls Mac/Linux fixes

    Replace POSIX-only primitives in wren_bind_xfer.c with the
    threadwrap.h + eventwrap.h abstractions that the rest of SyncTERM
    already uses:

    - pthread_create/pthread_join -> _beginthread + xpevent_t worker_done
    - pthread_cond_t -> xpevent_t dlg.evt (worker drops mutex,
    WaitForEvent(100ms), reacquires; main SetEvent under lock)
    - PTHREAD_*_INITIALIZER -> one-time runtime init via pthread_once
    (Win32 mutex is CRITICAL_SECTION; no static init available)
    - syslog.h -> xp_syslog.h for the LOG_* severity constants we use
    as in-app LogView color tags (no actual syslog calls)
    - worker fn signature changed to void(void *) for _beginthread

    C11 atomics (atomic_bool / atomic_uint) kept Ä MSVC supports them.

    xptls/CMakeLists.txt: mirror xpdev's platform compile_definitions
    (__unix__ / __DARWIN__ on Mac, _GNU_SOURCE etc. on Linux, _WIN32
    versions on Win32). xptls is structured to be standalone Ä it
    borrows xpdev's headers without linking the target Ä so it didn't
    inherit xpdev's PUBLIC defines, which broke macOS builds where
    sockwrap.h gates its socket headers on __unix__.

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Wednesday, May 27, 2026 21:34:00
    https://gitlab.synchro.net/main/sbbs/-/commit/69ba956de457fc6dc51c1159
    Modified Files:
    src/syncterm/term.c wren_bind.c wren_host.c wren_host_internal.h
    Log Message:
    Use fast millisecond timer for Wren scheduling

    Use xp_fast_timer64_ms() for the Wren transfer pump throttle and for
    the internal Wren timer queues. These call sites only need millisecond granularity, but they can be reached very frequently from the terminal
    receive path when Wren is active.

    Keep the existing semantic gates in inline_transfer_pump_wren_() before
    the timer read, so inactive Wren sessions and transfer worker paths
    still avoid the scheduling work entirely.

    Store Timer.trigger() and Hook.every() deadlines as millisecond ticks
    instead of long double seconds. This avoids repeated xp_timer() calls in
    the dispatch/sweep path while preserving the existing catch-up behavior
    for stalled recurring timers.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net