• src/syncterm/scripts/auto/connected/transfer_pick.wrensrc/syncterm/scr

    From Deucе@VERT to Git commit to main/sbbs/master on Fri May 8 21:16:54 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/4bff151e82908c31a779210b
    Added Files:
    src/syncterm/scripts/auto/connected/transfer_pick.wren
    Modified Files:
    src/syncterm/scripts/auto/connected/keys_default.wren online_menu.wren src/syncterm/scripts/syncterm.wren src/syncterm/term.c term.h wren_bind.c wren_bind_conn.c wren_bind_conn.h wren_bind_xfer.c wren_bind_xfer.h
    Log Message:
    SyncTERM: move begin_upload / begin_download to Wren

    Replace the C-side begin_upload() and begin_download() uifc dialogs
    with Wren UploadApp / DownloadApp classes — protocol picker uses
    ListView, file selection goes through Host.pickFile / pickFiles
    (uifc filepick wrapper), XMODEM filename via Prompt.

    Three new Transfer foreigns dispatch into the existing protocol
    entry points: Transfer.upload(kind, path, lastCh),
    Transfer.uploadBatch, Transfer.download. Kinds are stringly-typed
    ("zmodem", "ymodem-g", "xmodem-1k", "cet", ...) so the C side can
    fan out to the right xmodem_*/zmodem_*/cet_telesoftware_download
    call without exposing mode flag bits to Wren.

    The foreigns can't run wren_run_transfer directly — wrenCall is
    forbidden from inside a foreign method (wren.md §7). They record
    the user's choice in a single-slot xfer_pending struct and return
    immediately; xfer_drain_pending(), called from doterm() at C
    top-level, runs the actual dispatch. Auto-Z drains right after wren_run_upload_app() returns; Alt-D / Alt-U are picked up at the
    next outer-loop iteration.

    Hook.onKey for Alt-D / Alt-U lives in keys_default.wren (matches
    the Alt-B / Alt-C / Alt-X migration pattern). Conn.upload() and Conn.download() Wren foreigns are gone — online_menu now calls
    UploadApp.run / DownloadApp.run directly.

    Deletes ~210 lines of C: begin_upload, begin_download, the Alt-D /
    Alt-U switch cases in doterm(), fn_Conn_upload / fn_Conn_download.

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

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