diff options
Diffstat (limited to 'tarlz.h')
-rw-r--r-- | tarlz.h | 20 |
1 files changed, 17 insertions, 3 deletions
@@ -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, |