__                 _ _                _
  / _| ___   ___   __| | |__   __ _ _ __| | __
 | |_ / _ \ / _ \ / _` | '_ \ / _` | '__| |/ /
 |  _| (_) | (_) | (_| | |_) | (_| | |  |   <
 |_|  \___/ \___/ \__,_|_.__/ \__,_|_|  |_|\_\

A personal BBS  ·  Missoula, Montana  ·  formerly NaClCON BBS

Connect from your terminal: telnet naclconbbs.net 23  |  ssh naclconbbs.net -p 2222

  • src/conio/retro.c

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Tue Sep 8 21:25:38 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/4d6dbfa2ad4ea3c65e270dab
    Modified Files:
    src/conio/retro.c
    Log Message:
    conio/retro.c: fix zero-length array and implicit bsearch declaration

    rid[] was declared with an empty initializer, giving it zero elements.
    GCC rejects that outright ("zero or negative size array 'rid'"), so the
    file has never compiled with WITH_RETRO under GCC; MSVC accepts it in the
    front end and then dies with an internal compiler error in its /Od
    back-end pass (C1001 in p2\main.cpp). Give the array the terminating
    element libretro expects.

    retro_keyboard() called bsearch() without including <stdlib.h>, so it was implicitly declared as returning int and its result truncated to 32 bits
    before being stored in a pointer. Include the header, and qualify the
    result const to match the table it points into.

    retro_kbhit() returned a size_t as int; the value is bounded by
    KEYBUFSIZE, so make the narrowing explicit.

    rid[] and the bsearch call arrived in 9df61ba29f (2025-01-28),
    retro_kbhit() in ba963b522c (2025-01-27).

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

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