X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fcommon.h;h=f288068cd0000a8b1eb35aacec8a5cd02b9df348;hb=f6458a827ae7a2c41616490f653714068072b257;hp=be7f35d15dbfa7f52c584c2eae362a1f7855fc20;hpb=2f800ce3fb9c38360e1b6dac70ee0d8ceae72c6a;p=chaz%2Ftar diff --git a/src/common.h b/src/common.h index be7f35d..f288068 100644 --- a/src/common.h +++ b/src/common.h @@ -189,7 +189,11 @@ GLOBAL struct timespec newer_mtime_option; /* Return true if the struct stat ST's M time is less than newer_mtime_option. */ #define OLDER_STAT_TIME(st, m) \ - (timespec_cmp (get_stat_##m##time (&st), newer_mtime_option) < 0) + (timespec_cmp (get_stat_##m##time (&(st)), newer_mtime_option) < 0) + +/* Likewise, for struct tar_stat_info ST. */ +#define OLDER_TAR_STAT_TIME(st, m) \ + (timespec_cmp ((st).m##time, newer_mtime_option) < 0) /* Zero if there is no recursion, otherwise FNM_LEADING_DIR. */ GLOBAL int recursion_option; @@ -309,6 +313,12 @@ GLOBAL dev_t root_device; /* Unquote filenames */ GLOBAL bool unquote_option; + +GLOBAL bool test_label_option; /* Test archive volume label and exit */ + +GLOBAL bool show_stored_names_option; /* When creating archive in verbose mode, + list member names as stored in the archive */ + /* Declarations for each module. */ @@ -420,6 +430,10 @@ void read_directory_file (void); void write_directory_file (void); void purge_directory (char const *); void list_dumpdir (char *buffer, size_t size); +void update_parent_directory (const char *name); + +size_t dumpdir_size (const char *p); +void get_gnu_dumpdir (void); /* Module list.c. */ @@ -490,6 +504,10 @@ char *quote_copy_string (const char *); int unquote_string (char *); void code_ns_fraction (int, char *); +char const *code_timespec (struct timespec, char *); +enum { BILLION = 1000000000, LOG10_BILLION = 9 }; +enum { TIMESPEC_STRSIZE_BOUND = + UINTMAX_STRSIZE_BOUND + LOG10_BILLION + sizeof "-." - 1 }; size_t dot_dot_prefix_len (char const *); @@ -604,6 +622,10 @@ char *xheader_ghdr_name (void); void xheader_write (char, char *, struct xheader *); void xheader_write_global (void); void xheader_set_option (char *string); +void xheader_string_begin (void); +void xheader_string_add (char const *s); +void xheader_string_end (char const *keyword); +bool xheader_keyword_deleted_p (const char *kw); /* Module system.c */