Logo Search packages:      
Sourcecode: catdoc version File versions

long int calcFileBlockOffset ( oleEntry *  e,
long int  blk 
)

Parameters:
e 
blk 
Returns:

Definition at line 354 of file ole.c.

Referenced by ole_read().

                                                        {
      long int res;
      if ( e->isBigBlock ) {
            res=(e->blocks[blk]+1)*sectorSize;
      } else {
            long int sbdPerSector=sectorSize/SBD_BLOCK_SIZE;
            long int sbdSecNum=e->blocks[blk]/sbdPerSector;
            long int sbdSecMod=e->blocks[blk]%sbdPerSector;
            res=(rootEntry->blocks[sbdSecNum]+1)*sectorSize +
                  sbdSecMod*SBD_BLOCK_SIZE;
      }
      return res;
}


Generated by  Doxygen 1.6.0   Back to index