• src/syncterm/wren_bind.c

    From Deuc¿@VERT to Git commit to main/sbbs/m on Monday, April 27, 2026 06:15:00
    https://gitlab.synchro.net/main/sbbs/-/commit/ab5117e38a0cf2cccaae008f
    Modified Files:
    src/syncterm/wren_bind.c wren_host.c wren_host_internal.h
    Log Message:
    SyncTERM: add filtered Wren hook variants (C-side match)

    Hook.onKey(key, fn), Hook.onInput(byte, fn), Hook.onMouse(event, fn)
    register a callable that fires only when the event's discriminator
    matches. The match check is in the C dispatcher: filtered entries
    whose filter != value are skipped before any Wren slot is touched, so
    the per-event hot path stays cheap.

    Filtered and unfiltered hooks share one per-event array
    (struct wren_hook_entry { fn, filter, filtered }), preserving
    registration order across both forms.

    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 Monday, April 27, 2026 16:09:00
    https://gitlab.synchro.net/main/sbbs/-/commit/c39c0dda7c0340093e2740d8
    Modified Files:
    src/syncterm/wren_bind.c wren_host.c
    Log Message:
    SyncTERM: rename Input._park to Input.park_ Ä Wren leading-underscore is a field

    Wren parses identifiers with a leading underscore as private field
    references; foreign classes can't have fields, so the embedded
    \`Input\` declaration was failing to compile with "Cannot define
    fields in a foreign class" on both the call site and the
    \`foreign static _park(fiber)\` declaration. Trailing underscore
    matches the convention already used by Input.ungetKey_ /
    Input.ungetMouse_ in the same class.

    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 Tuesday, April 28, 2026 11:14:00
    https://gitlab.synchro.net/main/sbbs/-/commit/c859df99b430a757673daae8
    Modified Files:
    src/syncterm/wren_bind.c
    Log Message:
    SyncTERM: fix MSVC build Ä drop direct S_ISDIR use in wren_bind

    MSVC's <sys/stat.h> doesn't define the POSIX S_ISDIR macro, so
    referring to it from wren_bind.c made the linker treat it as a
    function and fail with LNK2019. S_ISREG already had a local
    polyfill at the top of the file; the two S_ISDIR sites just
    predated it.

    Replace both with the xpdev wrappers Ä isdir() for the directory
    test, fexist() for "exists as a non-directory" (regular file,
    symlink, device on POSIX). Each call is one extra stat compared
    to the prior single-stat-then-check, but neither site is hot:
    dir_list_impl runs once per readdir entry on browse, and
    dir_delete_impl runs once per Directory.delete().

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

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