Category : C Source Code
Archive   : XINU.ZIP
Filename : IBLFREE.C
# include
# include
# include
# include
# include
# include
/*-----------------------------------------------------------------------------
* iblfree -- free a list of iblocks given the number of the first
*-----------------------------------------------------------------------------
*/
iblfree(diskdev, iblist)
int diskdev;
IBADDR iblist;
{
IBADDR ilast;
struct iblk iblock;
struct dir *dirptr;
int sem;
DBADDR dba;
int j;
if (iblist == IBNULL)
return(OK);
dirptr = dsdirec(diskdev);
ibget(diskdev, iblist, &iblock);
for (ilast=iblist ; iblock.ib_next!=IBNULL ; ) {
for (j=0 ; j
lfsdfree(diskdev, dba);
ilast = iblock.ib_next;
ibget(diskdev, ilast, &iblock);
}
for (j=0 ; j
lfsdfree(diskdev, dba);
sem = ((struct dsblk *)devtab[diskdev].dvioblk)->dflsem;
wait(sem);
iblock.ib_next = dirptr->d_filst;
dirptr->d_filst = iblist;
ibput(diskdev, ilast, &iblock);
write(diskdev, dskbcpy(dirptr), DIRBLK);
signal(sem);
return(OK);
}
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/