Category : BBS Programs+Doors
Archive   : TONSMOD.ZIP
Filename : CNVTARC1.MOD
Sun Oct 07 23:28:15 1990
A Transfer Directory Archive Converter Mod (CNVTARC.MOD)
by The Black Dragon #1 @2380
Conversion to v4.12/Update by East Bay Ray #1 @9964
The following subroutine allows the sysop (or user) to convert an archive
from one type to another while the file is on-line. It will update the
file size and extended description headers. Any file pattern may be given
and the routine will process all files matching. The default file pattern
is "*.*" and the routine will ignore all files with the extension of the
archive type being converted.
The archive type converted to will be whatever is the first archive type
listed in INIT.EXE, under option #6 (external programs).
It shall be left to the sysop to determine how the 'convert_file()' routine
will be called (i.e. what command name), but I do suggest "//CONVERT" from
the transfer directory menu.
================================( XFEROVL.C )==========================
/*********************************************************************/
char *upstr(char *w) /* If you don't already have a */
{ /* subroutine like this, add this one */
char *q, s[81]; /* Converts a string to upper case */
/**************************************/
q=&s[0];
while (*q++=toupper(*w++));
return(s);
}
/*********************************************************************/
void convert_file()
{
char s[81],s0[81],s1[81],s2[81],s3[81],*ss,ch;
int count,i,f;
uploadsrec u;
remove_from_temp("*.*",0);
file_mask(&s0);
dliscan();
count=0;
i=recno(s0);
while ((i>0) && !hangup) {
SETREC(i);
read(dlf,(void *)&u,sizeof(uploadsrec));
if (!strcmp(&u.filename[9],syscfg.arcs[ARC_NUMBER].extension)) {
i=nrecno(s0,i);
continue;
}
strcpy(s3,stripfn(u.filename));
if ((ss=strchr(s3,'.'))==NULL)
ss=&s3[strlen(s3)];
*ss='.';
strcpy(++ss, syscfg.arcs[ARC_NUMBER].extension);
printfileinfo(&u,0);
nl();
prt(5,"Change archive type (Y/N/Q)? ");
if ((ch=onek("QYN"))=='Q')
break;
if (ch=='N') {
i=nrecno(s0,i);
continue;
}
sprintf(s1,"%s%s",directories[udir[curdir].subnum].path,
stripfn(u.filename));
sprintf(s2,"%s%s",directories[udir[curdir].subnum].path,s3);
if (exist(s2))
pl("Filename already in use - not converted.");
else {
get_arc_cmd(s,s1,1,"*.*");
if (s[0] && exist(s1)) {
cd_to(syscfg.tempdir);
do_external(s,0);
get_arc_cmd(s,s2,2,"*.*");
if (!s[0]) {
i=nrecno(s0,i);
continue;
}
cd_to(syscfg.tempdir);
do_external(s,0);
remove_from_temp("*.*",0);
if (ss=read_extended_description(u.filename)) {
delete_extended_description(u.filename);
add_extended_description(s3,ss);
farfree(ss);
}
align(s3);
strcpy(u.filename,upstr(s3));
f=open(s2,O_RDONLY|O_BINARY,S_IREAD);
u.numbytes=filelength(f);
close(f);
unlink(s1);
}
}
SETREC(i);
write(dlf,(void *)&u,sizeof(uploadsrec));
i=nrecno(s0,i);
count++;
}
if (count) {
sprintf(s,"%d file(s) converted.",count);
pl(s);
} else
pl("No files converted.");
closedl();
}
=========================( End of Modification )=====================
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/