Move the details of the Remote page, the terminal types and the menus
of the Windows app to docs/features.md, and the build steps for each
system to docs/building.md. The line about the Windows app on Linux and
macOS does not change, so that PR #19 merges without a conflict.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSvurgAXJHmd8Fs4ud
The menu repository is renamed D-Modem/login, and its program modemmenu
is now dmodem-login (with an LDAP provider). The links, names and
sample paths follow (/usr/local/bin/dmodem-login,
/etc/asterisk/dmodem-login.conf, /run/dmodem-login/dmodem-login.sock).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTD8BSptdpaUWGcs65
nightly.yml takes the artifacts of the newest complete run of build.yml
on main and replaces the "nightly" pre-release with them. It stops
when main has no new commits. build.yml now packs each artifact as a
.tar.gz or .zip (an artifact does not keep the executable bit), and the
Linux (GTK 4) job uploads its app too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRR6tKgobV4RbMTv4eL
HyperTerminal's Call menu for the Windows app: Call (sessions with a
name and a number, kept in [sessions]), Wait for a Call (ATS0=1, sent
again when the modem opens), Disconnect, and Send Break.
Line Settings gets the COM port settings: bits per second, data bits,
parity, stop bits and flow control (none, Xon/Xoff, hardware).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRekyRUhR43KbmGNXK
HyperTerminal's Terminal Settings for each terminal of the Windows app
([terminal], [remote_terminal]): Backspace (Ctrl+H, Del, or Ctrl+H Space
Ctrl+H), terminal or Windows keys, backscroll lines, font, cursor, the
Telnet terminal ID, and exit upon disconnecting.
The status bar shows the connect timer during a call. Send Break (Modem
menu, Ctrl+Break) sends a break on a COM port or as Telnet's IAC BRK.
Core: dmc_vt_set_scrollback and dmc_net_break, with tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRekyRUhR43KbmGNXK
The HyperTerminal ASCII Setup dialog (Modem menu), kept in [ascii]:
- Sending: Enter as CR LF, local echo, line and character delays.
- Receiving: an LF after each CR, 7-bit ASCII, wrap of long lines.
The receive items are in the core terminal (dmc_vt_set_ascii), with
tests. The settings apply to the modem and Remote terminals.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRekyRUhR43KbmGNXK
ZMODEM with zstd as docs/zmodem-zstd.md of D-Modem specifies, on top of
the crash recovery of #22:
- core/src/zstd_codec.c: a Zstandard (RFC 8878) encoder and decoder for
whole frames, and XXH64, in plain C (a port of the app's Zstd.kt; no
libzstd).
- xfer_z.c: CANZSTD in ZRINIT ZF1, ZTZSTD in ZFILE ZF2. Each chunk of the
file goes as one frame (64 KB, halved after a ZRPOS to 1 KB, doubled
after an ACK); the receiver writes only whole frames, so positions stay
file offsets and ZRPOS and crash recovery work as before. Files of 0
bytes, with a compressed extension, or whose first 64 KB don't get 5%
smaller go as they are. A ZTZSTD file is skipped when we did not set
CANZSTD.
- dmc_xfer_options.no_zstd stops it, and dmc_xfer_zstd() tells if the file
now goes with zstd (the status struct is not changed).
- Windows: Transfer > ZMODEM Compression (zstd), on by default, and
"(zstd)" after the file name in the progress dialog.
- Tests: the specification's vector, XXH64, round trips, against the
reference zstd CLI when installed; ZMODEM with zstd in memory (smaller
on the line, a noisy line, off on either side, a .zip, resume).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRR1WNeCEtXUcjE8RgY
The transfer items of HyperTerminal that the GUI did not have:
- YMODEM-G (DMC_XFER_YMODEM_G): streamed blocks with no ACKs; an error
ends the transfer. A sender asked with C does plain YMODEM, and the
receiver takes the end of lrzsz's sb, which sends no empty block 0.
- ZMODEM crash recovery (dmc_xfer_options.resume, and the sender's
ZCRECOV): a part of a file in the folder is continued with a ZRPOS
from its length, a whole one is skipped, and a part is kept when the
transfer stops. The dialogs list "ZMODEM with Crash Recovery".
- Skip file (dmc_xfer_skip): ZSKIP for ZMODEM, X in the ACK for Kermit.
The progress dialog has a Skip file button.
- Plain text line and character delays (dmc_xfer_options), read from
dmodem.ini [ascii] until the ASCII Setup dialog comes.
Also: a ZSKIP while the sender waits for a ZCRCQ's ACK now ends the
file; before, the sender failed with "no answer".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRekyRUhR43KbmGNXK
The terminal control keeps a selection: drag with the left button,
double-click a word, Shift with the mouse when the remote takes it.
Copy (Ctrl+Insert), Paste to Host (Shift+Insert) and Select All are in
a new Edit menu and on the right button's menu, as HyperTerminal has
them.
capture.cpp adds Capture Text (the line's bytes to a file), Capture to
Printer (its text printed when you stop), each with Pause, and
Modem > Print (the screen or the selection). What the remote sends to
its printer port (CSI 5 i) now goes to the printer; before, the app
discarded it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRekyRUhR43KbmGNXK
Port the file transfer protocols of the D-Modem app to libdmodemctl:
ZMODEM (with automatic receive for sz, rz and kermit -s), YMODEM,
XMODEM, XMODEM-1K, Kermit, Intel HEX, Motorola S-records and plain
text. Each transfer runs on its thread, with two queues to the app.
The Windows app gets a Transfer menu, Send File and Receive File
dialogs, a progress dialog, and Send and Receive buttons on the
Terminal page. A transfer uses the modem line or the Remote login.
Also:
- link_pump takes only as much session output as the port can hold.
Before, a large output was cut.
- The winport shims for serial, pipes, the environment and Beep are
guarded, because the latest clang-retro MFC layer has them.
- core/test/xfer_test tests each protocol on a clean and a noisy
line, and against lrzsz and C-Kermit when they are installed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRekyRUhR43KbmGNXK
First pass: TCP and SSH. With -DDMODEM_GUI_WINPORT=ON and CLANG_RETRO_MFC
set to a clang-retro MFC checkout, winport/ builds libwinport.a with the
MFC Makefile, converts app.rc with res2cpp.py, and links the same Win32
sources (now listed once, in windows/sources.cmake) as dmodem-win32.
The layer does not have serial ports, pipes or audio yet: winport/include
and winport/src/stubs.cpp supply stand-ins that fail, to remove when the
layer gets these functions. DMODEM_WINPORT blocks in the app: the settings
in ~/.config/D-Modem, TCP as the default line, ~/.ssh and '/' for SSH,
Unicode marks in the path view (no Wingdings), and group boxes put under
the other controls (the layer's hit test stops at HTTRANSPARENT).
CI builds it on Linux and macOS, and on Linux starts it in Xvfb against
a test modem on the TCP port (winport/test/smoke.sh).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRhKGCaYUyYtH7Boap
The win32-picolibc build (Windows 95, 98, ME, NT 4.0 and later) now has
libssh and mbedTLS, as the other builds do. DMODEM_GUI_SSH is ON for
every build.
- mbedTLS: CryptGenRandom of CryptoAPI, found at run time, in place of
BCryptGenRandom (Vista) before Vista; picolibc's gmtime_r and the
Windows zeroize in place of gmtime_s and memset_s.
- libssh: SHGetSpecialFolderPathA (IE4 shell), if_nametoindex (Vista) and
WSAStringToAddressA (Winsock 2) found at run time before Vista, with
USERPROFILE and inet_addr in their place; picolibc build flags and a
<direct.h>.
- gai_strerrorA with FormatMessageA (mingw-w64's calls FormatMessageW).
- agent.c: strcasecmp for _stricmp on picolibc.
The app still imports only DLLs that every Windows 95 has; the 9x and
NT 4.0 import checks pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRhKGCaYUyYtH7Boap
Replace Open Watcom (windows/build-watcom.sh) and MSVC in CI with
clang-retro: cmake/clang-retro.cmake, a CMake toolchain file that takes
the clang-dos toolchain package (CLANG_DOS) and a --config target
(CLANG_RETRO_CONFIG).
- Windows 95 and later: win32-picolibc (static C library, no msvcrt.dll),
no SSH. CI checks its imports for 9x and NT 4.0.
- Windows 7 and later: win7, with libssh and mbedTLS built for it.
- CI runs the tests of both builds in Wine.
- picolibc names for _snprintf, _stricmp and _strnicmp; a main for
picolibc's start-up code; DMODEM_GUI_SSH to turn the SSH build off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRhKGCaYUyYtH7Boap
- libdmodemctl: a command's response in pages (ATI11 on the Agere
modems, the MultiTech MT9234 among them) stops at "Press any key".
The session now sends a space at that prompt, for 8 pages at most,
and keeps the prompt out of the response. So the Call Stats page
gets the full report instead of a timeout. Text typed in the
terminal is left to the user. A test covers it.
- Linux: usbmodem.c finds an MT9234MU or MT9234ZBA-USB in sysfs. The
line settings show its ttyUSB with a "Use" button, or say that it
needs mts_mt9234mu.fw (or the ti_usb_3410_5052 driver). Its port
opens with RTS/CTS (the modem's &K3).
- docs/design.md: hardware modems on each system, the firmware file
and the country setting (AT%T19).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTNWiwCE3duMg28226
The Windows app runs libdmodemssh on a thread that posts its events to
the main window, with a login dialog that fits its questions; the
Windows 95 build keeps Windows' ssh.exe in a pseudo console. The macOS
app's SSHConnection polls it on a thread for the main queue, with
SwiftUI alerts for a new host, a password or the server's questions;
PtySpawn goes. libssh and mbedTLS are built universal for macOS by the
repository's CMake. Linux CI logs in to a real sshd; docs follow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSV65geuGd6zMt2V6r
The library now reads WAV of 8 to 32-bit PCM, floats, A-law, mu-law,
IMA and Microsoft ADPCM, AIFF and AIFF-C, and Sun/NeXT .au, at any rate
and channel count (dmc_audio_decode; dmc_wav_decode stays as its old
name). Each app hands the rest to the system's decoders:
- Linux: libsndfile when built with it (MP3, FLAC, Ogg Vorbis, Opus)
- Windows: the ACM codecs (MP3 and compressed WAVs), Windows 95 and up
- macOS: AVAudioFile (MP3, AAC/M4A, FLAC, ALAC, CAF)
The decoders were checked against ffmpeg's for each format, and fuzzed
under ASan and UBSan; the Windows path was run under Wine.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTvbHMpudRfQWK4c4H
libdmodemctl now drives dmodemd's V.253 voice mode: placing and
answering voice calls, the DLE stream and its events, G.711 mu-law,
DTMF, and an answering machine (greeting, beep, recording) that takes
messages as WAV files. It is off until the user turns it on.
Each app gains a Phone page: Linux (PulseAudio), Windows (waveOut and
waveIn, Windows 95 and later) and macOS (AVAudioEngine).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTvbHMpudRfQWK4c4H
The suite's licence, as D-Modem, bbs, menu and brand: the AGPL-3.0-only
by default, and a commercial licence from the D-Modem Authors for uses
that can't meet its terms (COMMERCIAL-LICENSE.md). The contributor
agreement grants the licence for both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSQaj3bYPQDZU4qf9U
Each contribution comes with the suite's contributor agreement (the one
bbs, menu and brand already use): the contributor keeps the copyright
and licenses it to the D-Modem Authors under the repository's licence
and any other terms, commercial ones included. Each commit's
Signed-off-by line says they agree. The new workflow checks for that
line on every commit of a pull request, except pull requests from the
owner, the organization's members and bots.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSQaj3bYPQDZU4qf9U