X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fcommon.h;h=04466ae2e9a44f71b0edb66c71b02eadae50a171;hb=1689ed43885c8418c29d1365ae3a06450a460830;hp=c2cad549c3ee3b4a82ba62aed9d4c53e44af8988;hpb=f7077dd38b018f19d3a5c7df6accc6b07b8a2356;p=chaz%2Ftar diff --git a/src/common.h b/src/common.h index c2cad54..04466ae 100644 --- a/src/common.h +++ b/src/common.h @@ -235,6 +235,10 @@ GLOBAL bool numeric_owner_option; GLOBAL bool one_file_system_option; +/* Create a top-level directory for extracting based on the archive name. */ +GLOBAL bool one_top_level_option; +GLOBAL char *one_top_level_dir; + /* Specified value to be put into tar file in place of stat () results, or just null and -1 if such an override should not take place. */ GLOBAL char const *owner_name_option; @@ -427,7 +431,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); @@ -444,6 +448,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); @@ -596,7 +606,7 @@ 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); @@ -609,7 +619,6 @@ 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_getcwd (void); const char *tar_dirname (void); /* Represent N using a signed integer I such that (uintmax_t) I == N. @@ -851,11 +860,14 @@ bool transform_program_p (void); /* Module suffix.c */ void set_compression_program_by_suffix (const char *name, const char *defprog); +char *strip_compression_suffix (const char *name); /* Module checkpoint.c */ void checkpoint_compile_action (const char *str); void checkpoint_finish_compile (void); void checkpoint_run (bool do_write); +void checkpoint_finish (void); +void checkpoint_flush_actions (void); /* Module warning.c */ #define WARN_ALONE_ZERO_BLOCK 0x00000001