i need a nudge in the right direction for grappling with reading/writing type-2
messages... maybe sample code for a stand-alone util that just reads
from one
sub, or posts to a sub.
I can't find anything I wrote up about it unfortunately, but the basics of the gat stuff is the message text file (.dat) is a repeating series of:
header (aka gat)
text blocks
The text blocks are a linked list of the next block or -1 for the last block, it's much like the FAT filesystem.
msg.stored_as is the way to find that first block. You need to jump to the section and then offset. To find the section, it's basically
sectiuon = msg.stored_as / GAT_NUMBER_ELEMENTS (which is 2048)
offset = msg.stored_as % GAT_NUMBER_ELEMENTS
So you seek to the gat section + (512 /* block size */ * offset)
The start of the gat section is: section * GATSECLEN + GAT_SECTION_SIZE
(all of these constants are in
https://github.com/wwivbbs/wwiv/blob/main/sdk/msg api/type2_text.h).
Let me know if this high level info is helpful.
rushfan
--- WWIVToss v.1.52
* Origin:
http://www.weather-station.org * Bel Air, MD -USA (11:1/101.0)