summaryrefslogtreecommitdiffstats
path: root/tarlz.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-27 19:14:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-27 19:14:36 +0000
commit0733fb1a9e3c0c586f9a958aa7f26fcfa7292b78 (patch)
tree52531825e3cbefa80bad43b2635fa77a3ec5a366 /tarlz.h
parentAdding upstream version 0.12. (diff)
downloadtarlz-0733fb1a9e3c0c586f9a958aa7f26fcfa7292b78.tar.xz
tarlz-0733fb1a9e3c0c586f9a958aa7f26fcfa7292b78.zip
Adding upstream version 0.13.upstream/0.13
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tarlz.h')
-rw-r--r--tarlz.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/tarlz.h b/tarlz.h
index 18a078d..10a2dd5 100644
--- a/tarlz.h
+++ b/tarlz.h
@@ -62,6 +62,14 @@ inline unsigned long long round_up( const unsigned long long size )
}
+inline bool dotdot_at_i( const char * const filename, const int i )
+ {
+ return ( filename[i] == '.' && filename[i+1] == '.' &&
+ ( i == 0 || filename[i-1] == '/' ) &&
+ ( filename[i+2] == 0 || filename[i+2] == '/' ) );
+ }
+
+
enum { initial_line_length = 1000 }; // must be >= 87 for format_member_name
class Resizable_buffer
@@ -141,6 +149,7 @@ public:
long long format_block( Resizable_buffer & rbuf ) const;
bool parse( const char * const buf, const unsigned long long edsize,
const bool permissive );
+ void fill_from_ustar( const Tar_header header );
};
@@ -300,6 +309,8 @@ extern int cl_owner;
extern int cl_group;
extern int cl_data_size;
extern Solidity solidity;
+bool writeblock_wrapper( const int outfd, const uint8_t * const buffer,
+ const int size );
const char * remove_leading_dotslash( const char * const filename,
const bool dotdot = false );
bool fill_headers( const char * const filename, Extended & extended,
@@ -320,9 +331,9 @@ int encode( const std::string & archive_name, const Arg_parser & parser,
const int debug_level, const bool append );
// defined in create_lz.cc
-int encode_lz( const char * const archive_name, const Arg_parser & parser,
- const int dictionary_size, const int match_len_limit,
- const int num_workers, const int outfd, const int debug_level );
+int encode_lz( const Arg_parser & parser, const int dictionary_size,
+ const int match_len_limit, const int num_workers,
+ const int outfd, const int debug_level );
// defined in extract.cc
enum Program_mode { m_none, m_append, m_concatenate, m_create, m_diff,
@@ -351,6 +362,9 @@ void xunlock( pthread_mutex_t * const mutex );
void xwait( pthread_cond_t * const cond, pthread_mutex_t * const mutex );
void xsignal( pthread_cond_t * const cond );
void xbroadcast( pthread_cond_t * const cond );
+bool check_skip_filename( const Arg_parser & parser,
+ std::vector< char > & name_pending,
+ const char * const filename, const int filenames );
class Lzip_index;
int list_lz( const Arg_parser & parser, std::vector< char > & name_pending,
const Lzip_index & lzip_index, const int filenames,