Category : BBS Programs+Doors
Archive   : TONSMOD.ZIP
Filename : DIRLIST.MOD

 
Output of file : DIRLIST.MOD contained in archive : TONSMOD.ZIP
TFC010.MOD - Enhanced File Directory Listing
Author: The Flying Chicken 1@12456 (WWIVLink)
Source: WWIV 4.20
Version: 1.03


This mod is just like my Subs Listing, but for the file
directories. It shows the directory number, name, whether
or not the directory is in your New scan, and the number
of new files as well as the total number of files. A sample
listing is shown below, of course, the colors have been
removed.

If you're upgrading the mod, just replace your dirlist() with
the one below.


Dir New Total
# Scn? Directory Name Files Files
ÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄÄÄ
99 ³ XXX ³ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ³ 9999 ³ 9999
99 ³ XXX ³ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ³ 9999 ³ 9999
99 ³ XXX ³ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ³ 9999 ³ 9999
99 ³ XXX ³ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ³ 9999 ³ 9999
99 ³ XXX ³ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ³ 9999 ³ 9999
99 ³ XXX ³ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ³ 9999 ³ 9999


v1.03 Bug Fixes - Don't scan directory if user doesn't have access
to it (DSL or DAR restrictions), add titles.
v1.02 Bug Fixes - Still had one more bug, and the directory list
now aborts quickly.
v1.01 Bug Fixes - wasn't closing all the files properly, missed
a color code, removed get_string() calls.
v1.00 Original Release


Before using this or any mod, back up your source !!!!!

PKZIP source *.c *.h *.mak

If you mess something up later and want to unstall the mod,
just type:

PKUNZIP source -o


First and most important, I removed the color codes to make this
mod readable by all users. If you use colors, search THIS FILE,
replacing ^C by a Ctrl-C. To create Ctrl-C (which is a heart on
your screen), using the Turbo C editor, type Ctrl-P, Ctrl-C. This
also works in most editors. If you can't use colors, remove the
^C and the number immediately after it.

1. Load up BBS.C. Remove the entire void dirlist(). You
will be moving it to XFER.C, which is where I think it
should be anyway. This won't work if you don't do this
step.

2. Load up XFER.C. Add the entire void dirlist() below
at the end of the file.

void dirlist() /* ADD ENTIRE VOID */
{
int i,abort,i1,sam,tally;
char s[80],s1[6];
uploadsrec u;

abort=0;
nl();
pla("^C2Available file directories: ",&abort);
nl();
prt(2,"Dir New Total");
nl();
prt(2," # Scn? Directory Name Files Files");
nl();
ansic(7);
for (i1=0;i1<68;i1++)
if (okansi())
outchr(196);
else
outchr(45);
nl();

i=0;
while ((i if (udir[i].subnum<32) {
if ((1L << (udir[i].subnum)) & thisuser.nscn1)
strcpy(s1," * ");
else
strcpy(s1," ");
} else {
if ((1L << (udir[i].subnum-32)) & thisuser.nscn2)
strcpy(s1," * ");
else
strcpy(s1," ");
}
dliscan1(udir[i].subnum);
if (dlf<0) {
npr("Error reading data file!\r\n");
closedl();
return;
}
sam=1;
for (i1=1; i1<=numf; i1++) {
SETREC(i1);
read(dlf,(void *)&u,sizeof(uploadsrec));
if (u.daten>=nscandate)
sam++;
}
sam-=1;
if (okansi())
sprintf(s," ^C2%2s ^C7³ ^C6%3s ^C7³ ^C1%-40.40s ^C7³ ^C3%4d ^C7³
^C2%4d",
udir[i].keys, s1, directories[udir[i].subnum].name,sam,numf);
else
sprintf(s," ^C2%2s ^C7| ^C6%3s ^C7| ^C1%-40.40s ^C7| ^C3%4d ^C7|
^C2%4d",
udir[i].keys, s1, directories[udir[i].subnum].name,sam,numf);
pla(s,&abort);
i++;
closedl();
}
if (i==0)
pla("None.",&abort);
nl();
}


3. Save XFER.C and load up FCNS.H. Search for /*File: bbs.c*/
and remove the line below. If you can MAKE FCNS, you
are done, just type MAKE FCNS before you compile.

void dirlist();


4. Search for /*File: xfer.c*/ and add the line at the end.
Again, if you can MAKE FCNS, skip this step.


void dirlist();


As usual, I don't make any claims with this mod, I am simply
releasing it to help you out. If you use it, you take full
responsibility for any result that comes of it, bad or good.

If the mod does NOT work for you, e-mail 1@12456 (WWIVLink)
or 1@2456 (WWIVNet) immediately, and tell me EXACTLY what
you did, what the screen said, and what you did to try to
fix it. I can't help you if you don't go into enough detail, so
save yourself some time and be thourough. If you have compiler
errors, and can't figure them out, send me A BLOCK of your
code in question. I don't want the whole *.C file unless I ask
for it.

PLEASE REPORT ANY BUGS TO 1@12456 (LINK) OR 1@2456 (NET) !!!!!!!!
Any other comments, suggestions, hints, things I missed, requests
for new mods, and general "Thank you!"s are all VERY welcomed, so
drop me a line.

The Flying Chicken
1@12456 (WWIVLink) - 1@2456 (WWIVNet)

THE INSANE ASYLUM BBS

Running WWIV 4.20e++ (Reg #21620)
SysOp: The Flying Chicken - CoSysOp: Dragon Slayer
Snarfable - WOMRable - NET-REQable
Auto-SysOp Validation
Callback Validation (Local calls only)
(214) 570-5950 - USR Dual Std (v32/HST)


--- END OF LINE ---




  3 Responses to “Category : BBS Programs+Doors
Archive   : TONSMOD.ZIP
Filename : DIRLIST.MOD

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. 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/