summaryrefslogtreecommitdiffstats
path: root/file_index.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--file_index.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/file_index.h b/file_index.h
index 2b127c3..71e9852 100644
--- a/file_index.h
+++ b/file_index.h
@@ -1,5 +1,5 @@
/* Lziprecover - Data recovery tool for the lzip format
- Copyright (C) 2009-2016 Antonio Diaz Diaz.
+ Copyright (C) 2009-2017 Antonio Diaz Diaz.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -36,12 +36,14 @@ class File_index
int retval_;
void set_errno_error( const char * const msg );
- void set_num_error( const char * const msg1, unsigned long long num,
- const char * const msg2 = "" );
+ void set_num_error( const char * const msg, unsigned long long num );
+ bool skip_trailing_data( const int fd, const bool ignore_bad_ds,
+ long long & pos );
public:
File_index() : error_( "No index" ), isize( 0 ), retval_( 2 ) {}
- explicit File_index( const int infd );
+ File_index( const int infd, const bool ignore_bad_ds,
+ const bool ignore_trailing );
File_index( const std::vector< int > & infd_vector, const long long fsize );
long members() const { return member_vector.size(); }
@@ -58,13 +60,13 @@ public:
}
bool operator!=( const File_index & fi ) const { return !( *this == fi ); }
- long long data_end() const
- { if( member_vector.size() ) return member_vector.back().dblock.end();
- else return 0; }
+ long long udata_size() const
+ { if( member_vector.empty() ) return 0;
+ return member_vector.back().dblock.end(); }
- long long file_end() const
- { if( member_vector.size() ) return member_vector.back().mblock.end();
- else return 0; }
+ long long cdata_size() const
+ { if( member_vector.empty() ) return 0;
+ return member_vector.back().mblock.end(); }
// total size including trailing data (if any)
long long file_size() const