Category : C Source Code
Archive   : JAZ_CLIB.ZIP
Filename : JZGETCLS.C

 
Output of file : JZGETCLS.C contained in archive : JAZ_CLIB.ZIP
/*
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³jzgetcls.c ³
³Return a cluster given a two byte cluster word from a lookup ³
³into the file allocation table. ³
³ ³
³See jzgetfat.dmo for examples ³
³ ³
³ (C) JazSoft Software by Jack A. Zucker (301) 794-5950 ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
*/

jzgetcls(ffat , fcluster , fbigfat)
char *ffat;
int fcluster;
int fbigfat; /* true on 20mg or > disks */
{
int wcluster,woddeven;

if (fbigfat) {
memcpy(&wcluster , ffat + (fcluster << 1),2); /* get cluster */
return(wcluster);
}

woddeven = 3 * fcluster;

memcpy(&wcluster , ffat + (woddeven >> 1),2); /* get cluster */

if (woddeven & 1)
return(wcluster >> 4); /* get rid of low nibble */
else
return(wcluster & 0xFFF); /* get rid of high nibble */
}


  3 Responses to “Category : C Source Code
Archive   : JAZ_CLIB.ZIP
Filename : JZGETCLS.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: http://www.os2museum.com/wp/mtswslnk/