Ken Johnson 5777c449bd Trim wc_sdk/ to only what ma.fmt.wildcat needs (123 → 28 files)
Deletes 95 vendored SDK files that were never referenced by the
Wildcat backend's transitive call graph: all browser UIs (low/med/hi/
tv/fvc/op/wbrowser), Netware (nw*, netbios, netexamp), DOS/DPMI/EMS
helpers (dpmi, dossupp, emsheap, emssupp), Turbo Vision UI, BTrieve
maintenance tools (rebuild, reorg, restruct, reindex, vrebuild,
vreorg), sort/IO (msort, msortp, bufrecio), build/import (bld*,
dbimpexp, convert, carrconv), example apps (example, sample,
msgcheck, msgimprt, listfile, search), TP runtime helpers (tpalloc,
tpcmd, tpdefine.inc), the file/page/transaction DBs (wcfiledb,
wcpagedb, wctrandb, wcmsgex, billglo), unused QX index (qxindex,
qxstub, numkey32, vrcompat, iscompat, fixtovar, share, fvcreg,
oopsema), browser includes (browser.inc, brlisam.inc, brdefopt.inc,
opdefine.inc), and all binary/foreign-language reference files
(.C/.H/.CPP/.ASM/.OBJ/.MAK/.PRO/.PKG/.ICD/.R16/.R32/.RC/.IN1/.IN2/
.TPU/.DSK/.TP).

Kept (28 files): the WC database layer (wctype, wcglobal, wcmisc,
wcdb, wcmsgdb, wcuserdb), the ISAM/Filer layer (filer, isamtool,
vrec) and BT layer (btbase, btisbase, btfileio) plus their includes
(btdefine.inc, btlckmgr.inc, filer.inc, isambase.inc, isamlow.inc,
isamnwrk.inc, isamwork.inc, isnetsup.inc, FILER.CFG), the small
helpers ma.fmt.wildcat actually pulls in (desq, numkeys, basesupp),
and four reference docs for any future clean reimplementation
(WC40REC.DOC, WCMSGDB.DOC, WCUSERDB.DOC, README.1ST).

Verified: test_wildcat builds and walks all 7 vendored conferences
with 7/7 passing.
2026-04-17 13:10:06 -07:00

fpc-msgbase

A unified Free Pascal library for reading and writing classic BBS message bases.

Implements every supported format from the FTSC specifications and the original format authors' published documentation, behind one polymorphic API (TMessageBase). BBS software, mail tossers, message editors, and utilities can target a single interface regardless of the underlying format on disk.

Supported formats

Format Files Backend unit
Hudson MSGINFO/IDX/HDR/TXT/TOIDX.BBS ma.fmt.hudson.pas
JAM *.JHR *.JDT *.JDX *.JLR ma.fmt.jam.pas
Squish *.SQD *.SQI *.SQL ma.fmt.squish.pas
FTS-1 MSG numbered *.MSG per directory ma.fmt.msg.pas
FTN PKT *.pkt (Type-2 / 2+ / 2.2) ma.fmt.pkt.pas
PCBoard *.MSG + *.IDX ma.fmt.pcboard.pas
EzyCom MH#####.BBS / MT#####.BBS ma.fmt.ezycom.pas
GoldBase MSGINFO/IDX/HDR/TXT/TOIDX.DAT ma.fmt.goldbase.pas
Wildcat 4 WC SDK databases ma.fmt.wildcat.pas

Features

  • One TMessageBase abstract class — read, write, pack, reindex through the same methods regardless of format.
  • Layered locking: in-process TRTLCriticalSection + cross-process advisory lock (fpflock on Unix, LockFileEx on Windows, .LCK sentinel fallback)
    • the existing fmShareDenyWrite / fmShareDenyNone share modes.
  • Event hooks for logging, progress, and status reporting.
  • TPacketBatch worker pool for tossers that need to process many .pkt files concurrently while serialising writes per destination base.
  • Path / filename auto-derivation per format from a base directory plus optional area tag.

Building

Native Linux:

fpc -Fusrc -Fusrc/formats examples/example_read.pas

Lazarus package:

lazbuild fpc-msgbase.lpk

The repo includes a fpc.cfg template covering the multi-target build (i386-go32v2, i386-win32, i386-linux, i386-os2).

Layout

src/                ma.api, ma.types, ma.events, ma.lock, ma.paths, ma.batch
src/formats/        ma.fmt.<format>.pas — one per supported format
docs/               architecture, locking semantics, format notes
tests/              FPCUnit tests, sample data
examples/           small CLI programs that double as smoke tests

Unit-name convention follows the Fimail style: ma.<category>.<name>.pas (ma. is the library's namespace prefix; the project was originally named message_api, hence ma). All units use {$mode objfpc}{$H+}.

Documentation

Status

Early development. APIs may move until 1.0. Format backends are spec-driven implementations validated against real-world sample bases.

Description
Unified Free Pascal library for reading/writing classic BBS message bases: Hudson, JAM, Squish, FTS-1 *.MSG, PCBoard, EzyCom, GoldBase, Wildcat 4.
Readme 1.2 MiB
Languages
Pascal 99.5%
Shell 0.5%