Category : C Source Code
Archive   : JAZ_CLIB.ZIP
Filename : RSPLIST.C
#include
THEAD *rsplist(fname)
char *fname;
{
TNAME *p;
THEAD *whead,*readlist();
whead = (THEAD *) malloc(sizeof(THEAD));
whead->listlen = 0;
whead->first = whead->last = 0;
whead = readlist(fname,whead);
}
THEAD *readlist(fname,fhead)
char *fname;
THEAD *fhead;
{
FILE *fd;
int num;
char wbuf[256],*ch;
TNAME *wnew;
if ( !(fd = fopen(fname ,"r"))) return(0);
while ( (ch = fgets(wbuf,num,fd)) ) {
wbuf[strlen(wbuf)-1] = 0; /* get rid of newline char */
wnew = (TNAME *) malloc(sizeof(TNAME));
wnew->filename = (char *) malloc(strlen(wbuf)+1);
if (fhead->first)
fhead->last->next = wnew;
else
fhead->first = wnew;
wnew->next = 0;
fhead->last = wnew;
fhead->listlen ++;
strcpy(wnew->filename,wbuf);
}
fclose(fd);
return(fhead);
}
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/