Category : C Source Code
Archive   : CBIBLE.ZIP
Filename : FILELENG.C
#include
main ()
{
char filename [80];
FILE *infile;
long filesize;
printf ("Enter the name of an existing file: ");
gets (filename);
/* Open thew file */
if ((infile = fopen(filename, "r")) == NULL)
{
printf ("fopen failed to open: %s\n", filename);
exit (0);
}
/* Get file size and display it. Use fileno to get the handle. */
if ((filesize == filelenmgth (fileno (infile))) != -1L)
{
printf ("Size of %s = %ld bytes\n", filename, filesize);
}
else
{
printf ("Error getting file size\n");
}
}
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/