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

 
Output of file : FILEBOX.MOD contained in archive : TONSMOD.ZIP
Benny Hill #1 @7400
Wed Jul 25 13:49:18 1990
Welcome to BENNY3.MOD! This is the File listing in a Box modification.

by: Benny Hill
(Joseph Rybaczek)

v1.0 released
v1.1 - Minor bug fix, Find Description Function did not complete
box when switching dirs.


NOTICE: If you already have this mod installed, and just wish to upgrade
to the fixed version, then skip down to the portion marked
"-UPGRADE-"


I got this idea a long time ago, when The White Star Line BBS
was up some time ago, The Captain had a filelisting that was in a nice
box, that I thought was good. Unfortunately, I couldn't figure out how
to do it, as I was new to WWIV Source, and "c" in general.

Quite recently, someone released a modification that did a
listing that was almost similar, but was not exactly what I wanted, so,
I toyed around with the code, kept working on it, did some graphing,
and started doing it. After about 4 hours of coding, I finally got it
completely working! The Results were great, as far as I was concerned!

Now, I have my file listings in a box, in such a way where
NON-ANSI users get a listing somewhat like:

Area: Miscellaneous - 1

+---------------------------------------------------------------------------+
: Filename.Ext : Size : Description Total Files: 3 :
+--------------+-------+----------------------------------------------------+
: AFILE .ZIP : 20k : This file is a neat little file :
: BOARDLST.ZIP : 3k : This file is an even neater little file :
: CALLTHIS.ZIP : 15k : This file is a complete listing of all BBS's in :
: Tim-Buk-tu, the BBSing capital of the world as we :
: know it today! a great listing! :
: DUMBFILE.ZIP : 148k : A Dumb file that is here, etc.... :
+--------------+-------+----------------------------------------------------+

Ansi users get color (if extended colors on) and EXTENDED Ansi
Characters as the box... It looks real nice! It is a nice addition
to your transfer area!


DISCLAIMER: Use of this modification is at your own risk. I
only offer my personal affirmation that this modification works on my
system with no problems. So, If this modification destroys your BBS,
Crashes your computer, kills your Grandma, the dog, makes your car break
down, etc, don't come complaining here.... if you find a bug, let me
know about it, though!!!

Anyway, the installation....

Load up XFER.C, remove or comment out the routine void print_extended
and replace it with this routine....


void print_extended(char *fn, int *abort, unsigned char numlist, int indent)
{
char *ss;
int next=0;
unsigned char numl=0;
int cpos=0;
char ch,s[81];
int i,fc;

fc=thisuser.sysstatus & sysstatus_funky_colors;

ss=read_extended_description(fn);
if (ss) {
ch=10;
while ((ss[cpos]) && (!(*abort)) && (numl if ((ch==10) && (indent)) {
if (okansi()) {
if (fc)
sprintf(s,"3³\x1b[%dC1",INDENTION);
else
sprintf(s,"³\x1b[%dC",INDENTION);
} else {
outstr(":");
for (i=0; i s[i]=32;
s[INDENTION]=0;
}
osan(s,abort,&next);
}
ch=ss[cpos++];
if ((ch==13) && (indent)) {
while (!(wherex()>=77))
outstr(" ");
if (okansi()) {
if (fc)
outstr("3³");
else
outstr("³");
} else
outstr(":");
}
outchr(ch);
checka(abort,&next);
if (ch==10)
++numl;
else {
if ((ch!=13) && (wherex()>=77)) {
while (!(wherex()>=77))
outstr(" ");
if (fc)
ansic(3);
if (okansi())
outstr("³");
else
outstr(":");
osan("\r\n",abort,&next);
ch=10;
}
}
}
if (wherex())
nl();
}
farfree(ss);
}

Next, remove or comment out void printinfo and void printtitle, and
replace them with my routines....


void printinfo(uploadsrec *u, int *abort)
{
char s[85],s1[40],s2[81];
int i,next,fc;

fc=thisuser.sysstatus & sysstatus_funky_colors;

if (fc)
ansic(3);
if (okansi())
strcpy(s,"³ ");
else
strcpy(s,": ");
osan(s,abort,&next);
strncpy(s,u->filename,8);
s[8]=0;
if (fc)
ansic(2);
osan(s,abort,&next);
strncpy(s,&((u->filename)[8]),4);
s[4]=0;
if (fc)
ansic(2);
osan(s,abort,&next);
if (fc)
ansic(3);
if (okansi())
osan(" ³ ",abort,&next);
else
osan(" : ",abort,&next);

ltoa((((u->numbytes)+1023)/1024),s1,10);
strcat(s1,"k");

#ifdef CHECK_FOR_EXISTANCE
strcpy(s2,directories[udir[curdir].subnum].path);
strcat(s2,u->filename);
if (!exist(s2))
strcpy(s1,"-*-");
#endif

for (i=0; i<5-strlen(s1); i++)
s[i]=32;
s[i]=0;
strcat(s,s1);
if (fc)
ansic(5);
osan(s,abort,&next);

if (fc)
ansic(3);
if (okansi())
osan(" ³ ",abort,&next);
else
osan(" : ",abort,&next);
if (fc)
ansic(1);
if (okansi())
if (fc)
sprintf(s,"%-51.51s 3³",u->description);
else
sprintf(s,"%-51.51s ³",u->description);
else
sprintf(s,"%-51.51s :",u->description);
pla(s,abort);
if ((!*abort) && (thisuser.num_extended) && (u->mask & mask_extended))
print_extended(u->filename,abort,thisuser.num_extended,1);
if (!(*abort))
++num_listed;
}


void printtitle(int *abort)
{
char s[81],s1[20],s2[101];
int i,i1,fc;

fc=thisuser.sysstatus & sysstatus_funky_colors;

nl();
nl();
print("7Area:1 ",directories[udir[curdir].subnum].name," - ",udir[curdir].keys,"");
nl();
if (okansi()) {
if (fc)
ansic(3);
pla("ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿",abort);
if (fc)
sprintf(s2,"3³ 2Filename.Ext 3³ 5Size 3 ³ 1Description Total Files: %3d 3³",numf);
else
sprintf(s2,"³ Filename.Ext ³ Size ³ Description Total Files: %3d ³",numf);
pla(s2,abort);
if (fc)
ansic(3);
pla("ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´",abort);
} else {
pla("+--------------+-------+-----------------------------------------------------+",abort);
sprintf(s2,": Filename.Ext : Size : Description Total Files: %3d :",numf);
pla(s2,abort);
pla("+--------------+-------+-----------------------------------------------------+",abort);
}
}

Now, search for void listfiles() and void nscandir(.... Remove or
comment them out, and replace with my routines.


void listfiles()
{
char s[81];
int i,abort,fc;
uploadsrec u;

fc=thisuser.sysstatus & sysstatus_funky_colors;
dliscan();
file_mask(s);
abort=0;
num_listed=0;
printtitle(&abort);
for (i=1; (i<=numf) && (!abort) && (!hangup); i++) {
SETREC(i);
read(dlf,(void *)&u,sizeof(uploadsrec));
if (compare(s,u.filename))
printinfo(&u,&abort);
}
closedl();
if (!abort) {
if (fc)
ansic(3);
if (okansi())
pla("ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ",&abort);
else
pla("+--------------+-------+-----------------------------------------------------+",&abort);
nl();

sprintf(s,"3[ 2Files listed:1 %d",num_listed);
outstr(s);
pl(" 3]");
nl();
}
}



void nscandir(int d, int *abort,int title)
{
int i,od,dt,fc,pc;
uploadsrec u;
char s[81];

fc=thisuser.sysstatus & sysstatus_funky_colors;
od=curdir;
curdir=d;
dt=title;
pc=0;
dliscan();
for (i=1; (i<=numf) && (!(*abort)) && (!hangup); i++) {
SETREC(i);
read(dlf,(void *)&u,sizeof(uploadsrec));
if (u.daten>=nscandate) {
if (dt) {
printtitle(abort);
dt=0;
pc=1;
}
printinfo(&u,abort);
}
}
if ((pc) && (!(*abort))) {
if (fc)
ansic(3);
if (okansi())
pl("ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ");
else
pl("+--------------+-------+-----------------------------------------------------+");
nl();
pc=0;
}
closedl();
curdir=od;
}


Next, find, comment out or replace void searchall() with this
routine....

void searchall()
{
int i,i1,pts,abort,pty,ocd,pc,fc;
char s[81],s1[81];
uploadsrec u;

fc=thisuser.sysstatus & sysstatus_funky_colors;
abort=0;
ocd=curdir;
pc=0;
nl();
nl();
pl("Search all directories.");
file_mask(s);
num_listed=0;
for (i=0; (i<64) && (!abort) && (!hangup) && (udir[i].subnum!=-1); i++) {
i1=udir[i].subnum;
pts=0;
if (i1>=32) {
if (thisuser.nscn2 & (1L << (i1-32)))
pts=1;
} else {
if (thisuser.nscn1 & (1L << i1))
pts=1;
}
pts=1;
/* remove pts=1 to search only marked directories */
if (pts) {
curdir=i;
dliscan();
pty=1;
for (i1=1; (i1<=numf) && (!abort) && (!hangup); i1++) {
SETREC(i1);
read(dlf,(void *)&u,sizeof(uploadsrec));
if (compare(s,u.filename)) {
if (pty) {
printtitle(&abort);
pty=0;
pc=1;
}
printinfo(&u,&abort);
}
}
if (pc) {
if (fc)
ansic(3);
if (okansi())
pla("ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ",&abort);
else
pla("+--------------+-------+-----------------------------------------------------+",&abort);
nl();
pc=0;
}
closedl();
}
}
curdir=ocd;
if ((num_listed) && (!abort)) {
nl();
nl();
sprintf(s,"Files listed: %d",num_listed);
pl(s);
nl();
}
}

Ok, we are almost finished. Here are some small changes you need to
make. First, go to the begining of the XFER C, and do a SEARCH for
all instances of the number 58. Change them to number 51. You can
do this in the TC Editor by hitting Control-Q Control-A, it will
ask for Search string, say 58 and hit return, replace string will be
51. Options to use: ugn it will do all the changes for ya.

Now, save XFER.C, and load up BBS.C, search for case 'N' in void
dlmainmenu()... look for:

nscandir(curdir,&abort,0);

make it say

nscandir(curdir,&abort,1);



-UPGRADE-

If you already had the above installed, just replace void
finddescription in Xfer.C with mine, and that is it....


void finddescription()
{
uploadsrec u;
int i,i1,i2,abort,pty,d,ocd,pts,pc,fc;
char s[81],s1[81];

fc=thisuser.sysstatus & sysstatus_funky_colors;

nl();
nl();
pl("Find description -");
nl();
pl("Enter string to search for in file description:");
outstr(":");
input(s1,51);
if (s1[0]==0)
return;

ocd=curdir;
abort=0;
num_listed=0;
for (i=0; (i<64) && (!abort) && (!hangup) && (udir[i].subnum!=-1); i++) {
i1=udir[i].subnum;
pts=0;
if (i1>=32) {
if (thisuser.nscn2 & (1L << (i1-32)))
pts=1;
} else {
if (thisuser.nscn1 & (1L << i1))
pts=1;
}
pts=1;
/* remove pts=1 to search only marked directories */
if (pts) {
curdir=i;
dliscan();
pty=1;
pc=0;
for (i1=1; (i1<=numf) && (!abort) && (!hangup); i1++) {
SETREC(i1);
read(dlf,(void *)&u,sizeof(uploadsrec));
strcpy(s,u.description);
for (i2=0; i2 s[i2]=upcase(s[i2]);
if (strstr(s,s1)!=NULL) {
if (pty) {
printtitle(&abort);
pty=0;
pc=1;
}
printinfo(&u,&abort);
}
}
if ((pc) && (!abort)) {
if (fc)
ansic(3);
if (okansi())
pla("ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ",&abort);
else
pla("+--------------+-------+-----------------------------------------------------+",&abort);
nl();
pc=0;
}
closedl();
}
}
curdir=ocd;
if ((num_listed) && (!abort)) {
nl();
nl();
sprintf(s,"Files listed: %d",num_listed);
pl(s);
nl();
}

}



Save that, Hit "F9" to compile your BBS code, and you are all set up
with File Listings Boxed!!

For All your WWIV File Needs, call



ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º The Funny Farm (East) º
º º
º Head Psychiatrist: Benny Hill º
º Intern Psycho: Gelatinous Citizen º
º Intern Psycho: Kahuna Bambu º
º º
º WWIVnet @7400 WWIVLink @17400 º
º FIDOnet 1:379/15 º
º Official WWIV Support Bulletin Board º
º Charlotte, North Carolina º
º (704)554-1496 300/1200/2400 º
º º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ


  3 Responses to “Category : BBS Programs+Doors
Archive   : TONSMOD.ZIP
Filename : FILEBOX.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/