• exec/load/cterm_lib.js

    From Deucе@1:103/705 to Git commit to main/sbbs/master on Wed Oct 22 23:50:06 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/d1a26bd059b629de0c9a76b9
    Modified Files:
    exec/load/cterm_lib.js
    Log Message:
    Add query_graphicsdim() and supports_jpegxl()
    --- SBBSecho 3.30-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Thu Oct 23 01:14:50 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/0ffc594bb658c7fd7258680f
    Modified Files:
    exec/load/cterm_lib.js
    Log Message:
    Fix query_graphicsdim() and add query_fontdims()

    The existing query_fontdim() discards the font width.
    --- SBBSecho 3.30-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Sun Jun 7 18:41:22 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/1382b7287eae1528f5afe35b
    Modified Files:
    exec/load/cterm_lib.js
    Log Message:
    cterm_lib: add cterm_screen_geometry() resolver

    Wraps query_fontdims()/query_graphicsdim()/charheight() into one call
    returning { cols, rows, cellW, cellH, pxW, pxH } with fallbacks, for pixel-addressed protocols (Z-machine v6 door). Reusable by any door.

    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Mon Jul 6 00:00:16 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/c5ff74079092d6470409fbdd
    Modified Files:
    exec/load/cterm_lib.js
    Log Message:
    cterm_lib.js: SyncTERM audio APC helpers

    Add a general, capability-gated audio API (per cterm.adoc "Audio APCs") so any JS can play sound effects and music on SyncTERM. Capability: query_audio / supports_audio / supports_audio_files. Low-level emitters (one per verb): audio_store/load/queue/volume/volume_lr/synth/flush. Convenience layer: play_sound / play_tone / play_music over an upload-once cache + rotating-channel
    allocator (music reserved on channel 2). Files are whatever the client's libsndfile decodes (WAV/VOC/OGG/FLAC everywhere; MP3 only on libsndfile >= 1.1.0).
    SM1.8.5-compatible; matches the file's existing Allman style.

    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Mon Jul 6 20:44:06 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/9ac7162c62da107a8bfbcada
    Modified Files:
    exec/load/cterm_lib.js
    Log Message:
    cterm_lib.js: determine capabilities via CTDA, not just the CTerm version

    SyncTERM can be built without graphics or audio support and can run in
    video output modes (e.g. Win32 Console, curses) that support neither
    pixel operations nor loadable fonts nor palette redefinition, so the
    CTerm version number alone cannot establish what the terminal can
    actually do right now. The CTerm Device Attributes query (CSI < c),
    introduced in cterm.c rev 1.207 (6b0845deda, yoga-3-mold), reports the capabilities of the current output mode, but this library only
    consulted it for sixel support.

    - query_ctda() now caches its result in console.cterm_da (persistent
    among contexts, like cterm_version; a failure is cached too, so an
    unanswered query can time out at most once per session) and is gated
    on the new cterm_version_supports_ctda (1207), so pre-CTDA and
    non-CTerm terminals are never sent the query at all.
    - supports_fonts(): a prior font operation result still short-circuits
    (0 = true, error = false), but the initial 99 sentinel
    (CTERM_NO_SETFONT_REQUESTED) says nothing about the output mode and
    was misread as "supported"; it now falls through to the CTDA
    loadable-fonts and font-select attributes, or returns undefined
    (unsure) for CTerm versions too old to answer.
    - supports_palettes(): was a pure version check (its comment admitted
    it could be wrong in some video modes); now answered from the CTDA
    palette attribute, or undefined for pre-CTDA CTerm versions.
    - bright_background(): skips the (i)CE color sequences only when the
    terminal positively reports (via CTDA) that the current mode lacks
    bright-background support; non-CTerm terminals (termsetup.js and
    logon.js call this for any ANSI terminal) still receive the
    sequences unconditionally.

    Callers already treat undefined as "unsure" (fonts.js and xbimage.js
    test != false / === false), so best-effort behavior is preserved for
    terminals that cannot be queried.

    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)