Category : BBS Programs+Doors
Archive   : TONSMOD.ZIP
Filename : DUPFILE.C

 
Output of file : DUPFILE.C contained in archive : TONSMOD.ZIP
void upload(int dn)
{
directoryrec d;
uploadsrec u,u1;
int ocd,i,i1,i2,ok,xfer,f;
char s[81],s1[81],s2[81];
long l;
double ti;

helpl=17;
dliscan1(dn);
d=directories[dn];
if (numf>=d.maxfiles) {
nl();
nl();
pl("This directory is currently full.");
nl();
closedl();
return;
}
nl();
ti=freek1((d.path));
ltoa((long) (ti),s1,10);
strcpy(s,"Upload - ");
strcat(s,s1);
strcat(s,"k free.");
pl(s);
nl();
if (ti<100.0) {
pl("Not enough disk space to upload here.");
nl();
closedl();
return;
}
prt(5,"Enter Name of File (4 chars min.)");
prt(2,"Filename: ");
input(s,12);
if (!okfn(s))
s[0]=0;
ok=0;
xfer=1;
if (strlen(s)>4) {
align(s);
ocd=curdir;
ok=1;
nl();
pl("Standby....Checking for duplicate files....");
nl();
for (i=0; (i<64) && (!hangup) && (udir[i].subnum!=-1); i++) {
i1=udir[i].subnum;
curdir=i;
dliscan();
for (i1=1; (i1<=numf) && (!hangup); i1++) {
SETREC(i1);
read(dlf,(void *)&u,sizeof(uploadsrec));
if (compare(s,u.filename)) {
prt(2,"That file already exists on this system.");
nl();
ok=0;
}
}
closedl();
}
curdir=ocd;
dliscan1(dn);
d=directories[dn];
strcpy(u.filename,s);
u.ownerusr=usernum;
u.ownersys=0;
u.numdloads=0;
u.filetype=0;
u.mask=0;
strcpy(u.upby,nam1(&thisuser,usernum,syscfg.systemnumber));
strcpy(u.date,date());
}
if (ok) { /* from here on can remain intact */
strcpy(s1,"Upload '");
strcat(s1,s);
strcat(s1,"' ? ");
if (strcmp(s," . "))
prt(5,s1);
else
ok=0;}


  3 Responses to “Category : BBS Programs+Doors
Archive   : TONSMOD.ZIP
Filename : DUPFILE.C

  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/