Category : C Source Code
Archive   : C-TOOLBX.ZIP
Filename : FD.C
#include "stdio.h"
#include "cminor.h"
#include "viewcmds.h"
#include "fdparm.h"
char filename[65] = "" ;
main(argc,argv)
int argc ;
char *argv[] ;
{
int cmd ; /* holds current command */
if( argc >= 2 ) /* get file name from command */
strcpy(filename,argv[1] ) ; /* line ( if present ) */
get_filename(filename) ; /* get filename and open file */
set_filesize(BIN_MODE) ; /* set up filesize variable */
cmd = FIRSTPAGE ; /* force display to first page */
while( cmd != EXITPGM ) /* repeat until told to exit */
{ exec_cmd( cmd ) ; /* execute the current command */
cmd = get_cmd() ; /* get the next command */
}
close_file() ;
}
int get_filename(fn) /* get name of file and open it */
char fn[] ; /* file name string */
{ /* filled out by caller */
if ( strlen(fn) == 0 )
{ printf("file name:") ;
scanf("%s",fn) ;
}
while( open_file(fn) == FAILURE ) /* open the file (verify name) */
{ printf("\n file - %s can not be opened \n") ;
printf("file name:") ; /* try again */
scanf("%s",fn) ;
}
}
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/