Category : Communication (modem) tools and utilities
Archive   : JMD4TLX.ZIP
Filename : JSIZE.C

Output of file : JSIZE.C contained in archive : JMD4TLX.ZIP
** Syntax: JSIZE
** Returns: Writes a temporary file named "JSIZE.$$$" containing the
** integer size in bytes of the passed filename.
** Notes: This kludge is necessary because TELIX does not allow you to
** determine the size of a file by using the filesize() function
** if you are between calls to filefind() without destroying the
** buffer used in subsequent calls. I wanted to do just that in
** order to be able to log performance characteristics for each
** JMODEM transfer. Since I also allow the user to pass wildcards
** and multiple filenames, here it is. See the JLOG.SLT source
** file for details regarding its use. This file was compiled
** using Microsoft C 5.10.
** Limits: This will only work if the filesize is <= 9,999,999 bytes.
** This should not present a problem. If it does, you may have
** take out a loan just to pay your phone bill!
** Author: Michael K. Bozovich
** Date: 3-20-89


FILE *stream;
unsigned long bytes;

main(argc, argv)

int argc;
char *argv[];

stream = fopen(argv[1], "r"); /* Open the file for reading */
bytes = filelength(fileno(stream)); /* Determine its size */
fclose(stream); /* Close it */

stream = fopen("jsize.$$$", "w+"); /* Open temporary file - it */
/* is destroyed if it already */
/* exists! */
fprintf(stream, "%7lu", bytes); /* Write the file size info */
fclose(stream); /* Close it and return */

/* eof jsize.c */

  3 Responses to “Category : Communication (modem) tools and utilities
Archive   : JMD4TLX.ZIP
Filename : JSIZE.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: