/// Calculate the Size \\\
root[file_no].size =(long unsigned int)(0xff & buf[31+i])*16*16*16*16*16*16*16*16;
root[file_no].size+=(long unsigned int)(0xff & buf[30+i])*16*16*16*16;
root[file_no].size+=(long unsigned int)(0xff & buf[29+i])*16*16;
root[file_no].size+=(long unsigned int)(0xff & buf[28+i]);
if((root[file_no].start == 0) ||
(root[file_no].attribute == 15))
continue;
else
{
gotoxy(8,i/32+4);
cprintf("%2u",file_no); /* Display File Number */
for(j=0;j<8;j++)
{
gotoxy(14+j,i/32+4);
cprintf("%c",root[file_no].name[j]); /* Display File Name */
}
for(j=0;j<3;j++)
{
gotoxy(26+j,i/32+4);
cprintf("%c",root[file_no].ext[j]); /* Display Extension */
}
gotoxy(30,i/32+4);
cprintf("%u",root[file_no].attribute); /* Display Attribute */
if(root[file_no].attribute==16)
{
gotoxy(33,i/32+4);
cprintf("<DIR>"); /* Display if Directory Attribute */
}
else
{
gotoxy(33,i/32+4);
cprintf("<FILE>"); /* The Entry is of a file */
}
gotoxy(44,i/32+4);
cprintf("%-5u", root[file_no].start); /* Display Starting Cluster */
gotoxy(58,i/32+4);
cprintf("%-10lu", root[file_no].size); /* size of the File */
}
file_no++;
}
gotoxy(10,21);
cprintf("Press 'M' : To see list of more files ");
gotoxy(10,22);
cprintf("Press 'R' :To recover a file from the above list");
ch=getch();
|