X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fcommon.h;h=e7911f4bab9ee9e781b8c11d4a1e8e42984e59d2;hb=HEAD;hp=4d2c3994181051b6bfa95b537ee3219dfb80e2fe;hpb=29a6964af3e1baabe978ce608e0466e1250d08ab;p=chaz%2Ftar diff --git a/src/common.h b/src/common.h index 4d2c399..e7911f4 100644 --- a/src/common.h +++ b/src/common.h @@ -1,6 +1,6 @@ /* Common declarations for the tar program. - Copyright 1988, 1992-1994, 1996-1997, 1999-2010, 2012-2014 Free + Copyright 1988, 1992-1994, 1996-1997, 1999-2010, 2012-2015 Free Software Foundation, Inc. This file is part of GNU tar. @@ -386,6 +386,9 @@ GLOBAL dev_t root_device; /* Unquote filenames */ GLOBAL bool unquote_option; +/* Treat file names read from -T input verbatim */ +GLOBAL bool verbatim_files_from_option; + GLOBAL int savedir_sort_order; /* Show file or archive names after transformation. @@ -523,6 +526,8 @@ void extract_archive (void); void extract_finish (void); bool rename_directory (char *src, char *dst); +void remove_delayed_set_stat (const char *fname); + /* Module delete.c. */ void delete_archive_members (void); @@ -725,7 +730,8 @@ int uname_to_uid (char const *uname, uid_t *puid); void name_init (void); void name_add_name (const char *name, int matching_flags); void name_add_dir (const char *name); -void name_add_file (const char *name, int term); +void name_add_file (const char *name, int term, bool verbatim, + int matching_flags); void name_term (void); const char *name_next (int change_dirs); void name_gather (void); @@ -743,17 +749,17 @@ char *new_name (const char *dir_name, const char *name); size_t stripped_prefix_len (char const *file_name, size_t num); bool all_names_found (struct tar_stat_info *st); -bool excluded_name (char const *name); - void add_avoided_name (char const *name); bool is_avoided_name (char const *name); bool contains_dot_dot (char const *name); -#define ISFOUND(c) ((occurrence_option == 0) ? (c)->found_count : \ - (c)->found_count == occurrence_option) -#define WASFOUND(c) ((occurrence_option == 0) ? (c)->found_count : \ - (c)->found_count >= occurrence_option) +#define ISFOUND(c) (occurrence_option == 0 \ + ? (c)->found_count != 0 \ + : (c)->found_count == occurrence_option) +#define WASFOUND(c) (occurrence_option == 0 \ + ? (c)->found_count != 0 \ + : (c)->found_count >= occurrence_option) /* Module tar.c. */ @@ -921,4 +927,16 @@ void finish_deferred_unlinks (void); /* Module exit.c */ extern void (*fatal_exit_hook) (void); +/* Module exclist.c */ +#define EXCL_DEFAULT 0x00 +#define EXCL_RECURSIVE 0x01 +#define EXCL_NON_RECURSIVE 0x02 + +void excfile_add (const char *name, int flags); +void info_attach_exclist (struct tar_stat_info *dir); +void info_cleanup_exclist (struct tar_stat_info *dir); +void info_free_exclist (struct tar_stat_info *dir); +bool excluded_name (char const *name, struct tar_stat_info *st); +void exclude_vcs_ignores (void); + _GL_INLINE_HEADER_END