X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fcommon.h;h=81e21fa8cb1726c29751b5ef690e673ad92a32e0;hb=717a07e208ced8ab10c59e70eada67c1a2e8afa2;hp=723ad9028748506468e4dd57c8036e89509a155b;hpb=751b61ab25ddc03510a695d55a916943aea2f6f0;p=chaz%2Ftar diff --git a/src/common.h b/src/common.h index 723ad90..81e21fa 100644 --- a/src/common.h +++ b/src/common.h @@ -190,6 +190,8 @@ enum old_files }; GLOBAL enum old_files old_files_option; +GLOBAL bool keep_directory_symlink_option; + /* Specified file name for incremental list. */ GLOBAL const char *listed_incremental_option; /* Incremental dump level */ @@ -425,7 +427,7 @@ size_t available_space_after (union block *pointer); off_t current_block_ordinal (void); void close_archive (void); void closeout_volume_number (void); -void compute_duration (void); +double compute_duration (void); union block *find_next_block (void); void flush_read (void); void flush_write (void); @@ -442,6 +444,12 @@ void archive_read_error (void); off_t seek_archive (off_t size); void set_start_time (void); +#define TF_READ 0 +#define TF_WRITE 1 +#define TF_DELETED 2 +int format_total_stats (FILE *fp, const char **formats, int eor, int eol); +void print_total_stats (void); + void mv_begin_write (const char *file_name, off_t totsize, off_t sizeleft); void mv_begin_read (struct tar_stat_info *st); @@ -594,7 +602,8 @@ void skip_member (void); void assign_string (char **dest, const char *src); int unquote_string (char *str); char *zap_slashes (char *name); -char *normalize_filename (const char *name); +char *normalize_filename (int cdidx, const char *name); +void normalize_filename_x (char *name); void replace_prefix (char **pname, const char *samp, size_t slen, const char *repl, size_t rlen); char *tar_savedir (const char *name, int must_exist); @@ -603,6 +612,10 @@ typedef struct namebuf *namebuf_t; namebuf_t namebuf_create (const char *dir); void namebuf_free (namebuf_t buf); char *namebuf_name (namebuf_t buf, const char *name); +void namebuf_add_dir (namebuf_t buf, const char *name); +char *namebuf_finish (namebuf_t buf); + +const char *tar_dirname (void); /* Represent N using a signed integer I such that (uintmax_t) I == N. With a good optimizing compiler, this is equivalent to (intmax_t) i @@ -848,6 +861,7 @@ void set_compression_program_by_suffix (const char *name, const char *defprog); void checkpoint_compile_action (const char *str); void checkpoint_finish_compile (void); void checkpoint_run (bool do_write); +void checkpoint_finish (void); /* Module warning.c */ #define WARN_ALONE_ZERO_BLOCK 0x00000001 @@ -872,11 +886,12 @@ void checkpoint_run (bool do_write); #define WARN_DECOMPRESS_PROGRAM 0x00080000 #define WARN_EXISTING_FILE 0x00100000 #define WARN_XATTR_WRITE 0x00200000 +#define WARN_RECORD_SIZE 0x00400000 -/* The warnings composing WARN_VERBOSE_WARNINGS are enabled by default - in verbose mode */ +/* These warnings are enabled by default in verbose mode: */ #define WARN_VERBOSE_WARNINGS (WARN_RENAME_DIRECTORY|WARN_NEW_DIRECTORY|\ - WARN_DECOMPRESS_PROGRAM|WARN_EXISTING_FILE) + WARN_DECOMPRESS_PROGRAM|WARN_EXISTING_FILE|\ + WARN_RECORD_SIZE) #define WARN_ALL (~WARN_VERBOSE_WARNINGS) void set_warning_option (const char *arg);