Files
fpc-msgbase/docs/format-notes/dependencies.md
Ken Johnson d43f996604 Wildcat: full SDK init (InitWCglobal + LoadMakeWild + BTInitIsam); test across 7 conferences
The TWildcatBase.OpenConference was creating a TMsgDatabase without
populating the SDK globals, causing access violations on MwConfig.
Now calls the full Register sequence: InitWCglobal, LoadMakeWild,
BTInitIsam before opening; BTExitIsam + DisposeWCglobal on close.

test_wildcat reads conferences 0..6 from vendored testdata (copied
to /tmp/ma_wildcat so the source tree stays read-only).
2026-04-15 08:41:02 -07:00

84 lines
3.4 KiB
Markdown

# External dependencies in copied format units
## Sample data
Real message bases for testing live at `~/fidonet/msg/` and for
WildCat! at `~/allfix_dev/f_drive/tpfiles/allfix/wc_dev/testdata/`:
- `hudson/` — Hudson MSGINFO/IDX/HDR/TXT/TOIDX.BBS set
- `jam/` — many JAM echo areas (e.g. `10thamd.jhr/jdt/jdx/jlr`)
- `echomail.jam/` — extra JAM samples
- `netmail/` — FTS-1 *.MSG numbered files (mixed upper/lower case on disk)
- `squish/` — Squish bases (currently empty but layout reserved)
- `local/jam/`, `lowerit/`, `passthru/` — additional collections
- WildCat 4 testdata:
- `CONFDESC.DAT/IX/UX` — conference descriptors (7 conferences)
- `MSG/MSG0..MSG6.DAT + .IX` — per-conference message databases
- `DATA/ALLUSERS.DAT + USERCONF.DAT` — users + per-user conference membership
Tests should open these read-only and verify message counts, first/last
messages, and specific known attributes. Do NOT write to these paths
from tests — copy them into a scratch dir first. The Wildcat SDK
mutates the message database during Open (btis locks, modcounters) so
even "read" paths must go through a scratch copy.
## Authoritative specs
The FTSC document collection at `/home/ken/Source Code/ftsc/docs/` is the
source of truth when validating attribute bits, packet header layouts,
date strings, and kludge syntax. Key documents we cross-check against:
- `fts-0001.016` — FTS-1 packet & message format (PKT, *.MSG, attributes,
date string, kludges)
- `fsc-0039.001` / `fsc-0039.004` — Type-2+ packet header
- `fsc-0045.001` — Type-2.2 packet header
- `fsc-0048.002` — AuxNet Type-2 variant
- `fsc-0009`, `fsc-0035` etc. — kludges and control lines
When in doubt about an encoding or bit position, reference the spec
before changing the conversion tables in `ma.types.pas`.
These references were inherited from the Allfix tree and need to be resolved
during the format-by-format refactor pass.
## ma.fmt.pkt.pas
Currently uses: `msgunit`, `netaddrs`, `aftypes`.
Needs from `msgunit`:
- `PktHeader` — 58-byte FTN packet header record
- `PktRecord` — per-message header record inside a packet
- `PacketRecord` — high-level parsed message with kludges, address parts,
flavours, etc.
- `FlavourType`, `FlavourTypeSet`, `DateTimeArray`
Plan:
- Move `PktHeader` + `PktRecord` into `ma.fmt.pkt.pas` itself (packet-only).
- Move `PacketRecord`, `FlavourType`, `FlavourTypeSet`, `DateTimeArray`
into `ma.types.pas` so other backends can use them where needed.
- Drop the `msgunit` / `netaddrs` / `aftypes` `uses` clauses.
## ma.fmt.wildcat.pas + ma.fmt.wcutil.pas
Use the WildCat 4 SDK. The SDK source has been copied verbatim into
`src/wc_sdk/` (formerly `wc_dev/` in Allfix) so this repo can build the
Wildcat backend without external paths.
The SDK pulls in OS/2-era helpers (`Os2Comp`, `DosUtil`, `p_System`,
`btisbase`, `isamtool`, …). Keeping it on its own search-path entry
(`-Fusrc/wc_sdk`) means callers that don't need Wildcat can omit the
backend without forcing the SDK onto the build line.
## include.inc
Allfix sources start with `{$I include.inc}`. Our copied units no longer
have that on the search path (we deliberately want the new lib to be
self-contained). Plan during refactor:
- Replace each `{$I include.inc}` with explicit `{$mode objfpc}{$H+}` plus
any other compiler switches the unit actually needs (most don't need
more than mode + `$H+`).
- Drop `WILDCAT4`, `EXECSWAP`, `UNI` and other Allfix-specific defines.