diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2017-05-07 15:53:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2017-05-07 15:53:12 +0000 |
commit | 217f007824bd69712dada24a431c0f703d515fa3 (patch) | |
tree | f9e719e5800eda365dae0baf81f11a20467ac07f /file_index.h | |
parent | Releasing debian version 1.18-5. (diff) | |
download | lziprecover-217f007824bd69712dada24a431c0f703d515fa3.tar.xz lziprecover-217f007824bd69712dada24a431c0f703d515fa3.zip |
Merging upstream version 1.19.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'file_index.h')
-rw-r--r-- | file_index.h | 22 |
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 |