BBS:      TELESC.NET.BR
Assunto:  src/sbbs3/xmodem.c xmodem.h src/syncterm/term.c term.h
De:       Deuc¨
Data:     Thu, 23 Apr 2026 22:56:59 -0700
-----------------------------------------------------------
https://gitlab.synchro.net/main/sbbs/-/commit/e14c0e14d471c7b7597756d5
Modified Files:
	src/sbbs3/xmodem.c xmodem.h src/syncterm/term.c term.h
Log Message:
SyncTERM: batch uploads for YMODEM and ZMODEM (feature request 28)

Adds "ZMODEM Batch" and "YMODEM Batch" entries to the upload protocol
menu. Batch selections use filepick_multi() to tag any number of files
and transmit them in a single session using the protocol's native batch
framing  ZRQINIT/ZFILEN/ZFIN for ZMODEM, block-0 headers plus a
zero-filename terminator for YMODEM.

begin_upload() now shows the protocol menu before the file picker so
batch choices can route to filepick_multi() while single-file choices
stay on filepick() (which still allows typing a path). The existing
zmodem_upload() / xmodem_upload() single-file signatures are unchanged,
so ripper.c's seven call sites keep working.

The new zmodem_batch_upload() and xmodem_batch_upload() helpers mirror
sexyz.c:send_files(): pre-scan the file list for totals, loop over each
path, and fire the trailing ZFIN / YMODEM zero-filename block once at
the end. ZRQINIT is sent only for the first file of the session.

xmodem_t gains current_file_num and current_file_name fields, populated
by xmodem_send_file() (name) and by the batch / single-file / download
drivers (num / totals). xmodem_progress() gains a "File (n of N): name"
line gated on YMODEM mode, matching the one in zmodem_progress().

Adding that line exposed a latent scroll bug in xmodem_progress(): the
progress bar draws tww-4 characters in a tww-4 wide window, and writing
the final character advances the cursor past the last column. With
_wscroll = 1 (the default) and the new line pushing the bar into the
last row of the 5-row progress area, the wrap-advance scrolled the
window up and chewed off the File line. Now set _wscroll = 0 for the
redraw, matching zmodem_progress().

Co-Authored-By: Claude Opus 4.7 (1M context) 
n
---
  mSynchronetn  hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net

-----------------------------------------------------------
[Voltar]