Category : C Source Code
Archive   : BTREE2.ZIP
Filename : TREEINIT.C
Output of file : TREEINIT.C contained in archive : BTREE2.ZIP
#include "btree.h"
/* This program initializes a file as a valid key file. This
* program must be used to set-up key files properly.
*/
main()
{
extern char instr[];
FILE *fopen(), *fd;
char filename[20];
struct keyinfo fileinfo;
printf("\n\nName of key file to initialize: ");
gets(filename);
printf("\n\nLength of Key: ");
gets(instr);
fileinfo.keylength = atoi(instr);
if ((fd = fopen(filename, "w")) != NULL) {
fprintf(fd,"%c%2d%5ld%5ld%5ld%c",
'~',fileinfo.keylength,1L,0L,0L,'~');
fclose(fd);
}
else {
BELL
printf("\nCan't open file %s\n", filename);
}
exit(0);
}
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/