"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/drvrcpm.c" between
libdsk-1.5.15.tar.gz and libdsk-1.5.17.tar.gz

About: LIBDSK is a library for accessing discs and disc image files. Development version.

drvrcpm.c  (libdsk-1.5.15):drvrcpm.c  (libdsk-1.5.17)
skipping to change at line 1146 skipping to change at line 1146
/* Generate sizes for this extent */ /* Generate sizes for this extent */
extsize = rcpmfs_extent_size(self); extsize = rcpmfs_extent_size(self);
if (extsize > filesize) extsize = filesize; if (extsize > filesize) extsize = filesize;
cpm_dirent[DIR_EX] = (extent * (exm+1)) & 0x1F; cpm_dirent[DIR_EX] = (extent * (exm+1)) & 0x1F;
cpm_dirent[DIR_EX] |= ((extsize + 127) / 16384) & exm; cpm_dirent[DIR_EX] |= ((extsize + 127) / 16384) & exm;
if (self->rc_fsversion == FSVERSION_ISX) if (self->rc_fsversion == FSVERSION_ISX)
cpm_dirent[DIR_S1] = (unsigned char)(128 - (filesize & 0x7F)) & 0x7F; cpm_dirent[DIR_S1] = (unsigned char)(128 - (filesize & 0x7F)) & 0x7F;
else cpm_dirent[DIR_S1] = (unsigned char)(fil esize & 0x7F); else cpm_dirent[DIR_S1] = (unsigned char)(fil esize & 0x7F);
cpm_dirent[DIR_S2] = (extent * (exm+1)) / 32; cpm_dirent[DIR_S2] = (extent * (exm+1)) / 32;
cpm_dirent[DIR_RC] = (unsigned char)((extsize + 127) / 128); cpm_dirent[DIR_RC] = (unsigned char)((extsize + 127) / 128);
/* Record counts > 0x80 imply a full extent of 0x80 records. So limit to 7
* bits if the extent is not actually full. */
if (cpm_dirent[DIR_RC] > 0x80)
{
cpm_dirent[DIR_RC] &= 0x7F;
}
filesize -= extsize; filesize -= extsize;
++extent; ++extent;
/* Add extent to the directory */ /* Add extent to the directory */
err = rcpmfs_add_dirent(self, cpm_dirent, found, &st); err = rcpmfs_add_dirent(self, cpm_dirent, found, &st);
if (err == DSK_ERR_OVERRUN) if (err == DSK_ERR_OVERRUN)
{ {
err = DSK_ERR_OK; err = DSK_ERR_OK;
break; break;
} }
if (err) return err; if (err) return err;
 End of changes. 1 change blocks. 
0 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)