cleansubboards.doc NAME cleansubboards - Kill unused subboard entries from a CNet/3 "subboards3" file. VERSION V0.5b - 17-Jan-97 SYNOPSIS cleansubboards BoardsFile/A,V=Verbose/S REQUIREMENTS - AmigaOS 2.0 (V37) or higher - CNet version 3.x (I haven't tested CNet/4 yet but I doubt it would work) - a little over twice as much memory as your subboards3 file is long OPTIONS BoardsFile/A: the file containing the subboard descriptions, usually CNet:sysdata/subboards3 Verbose/S: turn on debugging output (lots!) DESCRIPTION "cleansubboards" was born out of the necessity to save memory on my CNet system. I once had huge loads of Usenet groups on the BBS (over 300 subboards) but deleted them because few people preferred online reading over a real newsreader with UUCP. The problem is that CNet only marks these subboards as "killed", but the subboards3 file doesn't shrink a byte. The unused entries can't be simply deleted because CNet depends on the physical subboard number to build the tree of subboards. So the boards have to be renumbered and re-chained, that's everything "cleansubboards" does. Call it with your subboards3-file as a parameter, it won't overwrite it but write to a file with ".new" appended to that name. After the file is read, cleansubboards makes two conversion passes: one to make a new array of all active subboards and a table of information on which subboard number in the old file corresponds with which in the new one. The second pass does the rechaining and replaces the "Child", "Parent" and "Next"-Fields of the subboard structures according to the renumbering table. BUGS None known. HISTORY V0.1-V0.4 : First testversions, none actually functional V0.5b (17-Jan-97): Decided to release it because it seems there's no such tool available yet. Well, it's really basic but does the job... TODO - maybe a repair-function that can "guess" damaged links? AUTHOR Matthias Bethke Giessener Strasse 31 35457 Lollar Germany AmigaNet : Matthias Bethke@39:176/208.0 Usenet : sysop@sweetdreams.lahn.de COPYRIGHT No! Do with this piece of code whatever you like. Would be nice if you sent me an email if you use it though! BTW, I didn't include the source (SAS/C) because it's not very nice :-) Just ask if you want to hack away at it yourself.