1
0
Fork 0

Adding upstream version 0.21.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-17 21:15:58 +01:00
parent 7bf1f2e322
commit cc1b855cb3
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
27 changed files with 961 additions and 324 deletions

View file

@ -18,19 +18,13 @@
#define _FILE_OFFSET_BITS 64
#include <cerrno>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <string>
#include <vector>
#include <pthread.h> // for tarlz.h
#include <stdint.h>
#include <sys/stat.h>
#include "arg_parser.h"
#include "tarlz.h"
#include "arg_parser.h"
namespace {
@ -146,7 +140,7 @@ bool format_member_name( const Extended & extended, const Tar_header header,
else
offset += snprintf( rbuf() + offset, rbuf.size() - offset, " %9llu",
extended.file_size() );
for( int i = 0; i < 2; ++i )
for( int i = 0; i < 2; ++i ) // resize rbuf if not large enough
{
const int len = snprintf( rbuf() + offset, rbuf.size() - offset,
" %4d-%02u-%02u %02u:%02u %s%s%s\n",
@ -186,7 +180,7 @@ bool check_skip_filename( const Cl_options & cl_opts,
const char * const filename )
{
if( Exclude::excluded( filename ) ) return true; // skip excluded files
bool skip = cl_opts.filenames > 0;
bool skip = cl_opts.num_files > 0;
if( skip )
for( int i = 0; i < cl_opts.parser.arguments(); ++i )
if( nonempty_arg( cl_opts.parser, i ) )