mirror of
https://github.com/ksherlock/profuse.git
synced 2025-01-02 16:29:57 +00:00
git-svn-id: https://profuse.googlecode.com/svn/branches/v2@137 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
parent
99321a3f93
commit
f469d4e4d4
@ -191,13 +191,25 @@ int FileEntry::read(uint8_t *buffer, unsigned size, unsigned offset)
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
unsigned File::fileSize() {
|
||||
return (_lastBlock - _firstBlock - 1) * 512 + _lastByte;
|
||||
unsigned FileEntry::dataFileSize()
|
||||
{
|
||||
return blocks() * 512 - 512 + _lastByte;
|
||||
}
|
||||
|
||||
int File::read(uint8_t *buffer, unsigned size, unsigned offset)
|
||||
unsigned FileEntry::textFileSize()
|
||||
{
|
||||
if (!_pageLength()) textInit();
|
||||
return _fileSize;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
|
||||
|
||||
|
||||
int FileEntry::dataRead(uint8_t *buffer, unsigned size, unsigned offset)
|
||||
{
|
||||
uint8_t tmp[512];
|
||||
|
||||
|
@ -115,13 +115,13 @@ class FileEntry : public Entry {
|
||||
int dataRead(uint8_t *buffer, unsigned size, unsigned offset);
|
||||
|
||||
// for text files.
|
||||
void textInit();
|
||||
unsigned textFileSize();
|
||||
int textRead(uint8_t *buffer, unsigned size, unsigned offset);
|
||||
|
||||
unsigned textReadPage(unsigned block, uint8_t *in);
|
||||
unsigned textDecodePage(unsigned block, uint8_t *out);
|
||||
|
||||
|
||||
std::vector<unsigned> *_pageLength;
|
||||
unsigned _fileSize;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user