Category : BBS Programs+Doors
Archive   : TONSMOD.ZIP
Filename : DIRPACK.MOD
Monday, November 19, 1990 6:48 pm
Directory Pack Mod (DIRPACK.MOD)
by Goose, 1@7312 (WWIVnet)
This is another simple but useful mod - two lines that can save you quite a
bit of disk space. This is an idea I got from Lord Elric's BASEPACK mod,
which removes the dead space from the message base files. This mod does
basically the same thing for the directory files, with the exception that
it is done automatically when a file is removed from a directory (the
directories were a bit easier to do, since all the dead space is at the end
of the file).
OK, for the mod. Note, like usual, + indicates new or modified code and -
indicates existing code. First, load XFER.C and find void removefile, then
search down and add the line shown for the chsize command:
- }
- --i;
- --numf;
- u.numbytes=numf;
- SETREC(0);
+ chsize(dlf,(long)(numf+1)*(long)sizeof(uploadsrec)); /* mod - add */
- write(dlf,(void *)&u,sizeof(uploadsrec));
- }
- }
- i=nrecno(s,i);
- }
- closedl();
The other place that needs changed is in void move_file().. in WWIV 4.12,
this is located in XFEROVL.C, in 4.11, I believe it is also in XFER.C. Make
a similar change as shown:
- u1.numbytes=numf;
- SETREC(0);
+ chsize(dlf,(long)(numf+1)*(long)sizeof(uploadsrec)); /* mod - add */
- write(dlf,(void *)&u1,sizeof(uploadsrec));
- ss=read_extended_description(u.filename);
- if (ss)
- delete_extended_description(u.filename);
- closedl();
-
- strcpy(s2,directories[d1].path);
- strcat(s2,u.filename);
- dliscan1(d1);
That's it. To get the directories shrunk the first time, the easiest way is
to move one file out of then back into each directory in turn. After this,
any time a file is removed from the directory, or moved to another directory,
the size will automatically be changed. If you have any comments about this
mod, I can be reached at 1@7312 (WWIVnet) or the Twilight Zone BBS at
703-369-5225.
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/