| 176 |
|
|
| 177 |
GLOBAL bool interactive_option; |
GLOBAL bool interactive_option; |
| 178 |
|
|
| 179 |
|
/* If nonzero, extract only Nth occurrence of each named file */ |
| 180 |
|
GLOBAL uintmax_t occurrence_option; |
| 181 |
|
|
| 182 |
enum old_files |
enum old_files |
| 183 |
{ |
{ |
| 184 |
DEFAULT_OLD_FILES, /* default */ |
DEFAULT_OLD_FILES, /* default */ |
| 298 |
{ |
{ |
| 299 |
struct name *next; |
struct name *next; |
| 300 |
size_t length; /* cached strlen(name) */ |
size_t length; /* cached strlen(name) */ |
| 301 |
char found; /* a matching file has been found */ |
uintmax_t found_count; /* number of times a matching file has |
| 302 |
|
been found */ |
| 303 |
|
int isdir; |
| 304 |
char firstch; /* first char is literally matched */ |
char firstch; /* first char is literally matched */ |
| 305 |
char regexp; /* this name is a regexp, not literal */ |
char regexp; /* this name is a regexp, not literal */ |
| 306 |
int change_dir; /* set with the -C option */ |
int change_dir; /* set with the -C option */ |
| 565 |
void name_gather (void); |
void name_gather (void); |
| 566 |
struct name *addname (char const *, int); |
struct name *addname (char const *, int); |
| 567 |
int name_match (const char *); |
int name_match (const char *); |
|
bool names_done (void); |
|
| 568 |
void names_notfound (void); |
void names_notfound (void); |
| 569 |
void collect_and_sort_names (void); |
void collect_and_sort_names (void); |
| 570 |
struct name *name_scan (const char *); |
struct name *name_scan (const char *); |
| 573 |
char *new_name (const char *, const char *); |
char *new_name (const char *, const char *); |
| 574 |
char *safer_name_suffix (char const *, bool); |
char *safer_name_suffix (char const *, bool); |
| 575 |
size_t stripped_path_len (char const *file_name, size_t num); |
size_t stripped_path_len (char const *file_name, size_t num); |
| 576 |
|
bool all_names_found (struct tar_stat_info *); |
| 577 |
|
|
| 578 |
bool excluded_name (char const *); |
bool excluded_name (char const *); |
| 579 |
|
|
| 582 |
|
|
| 583 |
bool contains_dot_dot (char const *); |
bool contains_dot_dot (char const *); |
| 584 |
|
|
| 585 |
|
#define ISFOUND(c) ((occurrence_option == 0) ? (c)->found_count : \ |
| 586 |
|
(c)->found_count == occurrence_option) |
| 587 |
|
#define WASFOUND(c) ((occurrence_option == 0) ? (c)->found_count : \ |
| 588 |
|
(c)->found_count >= occurrence_option) |
| 589 |
|
|
| 590 |
/* Module tar.c. */ |
/* Module tar.c. */ |
| 591 |
|
|
| 592 |
int confirm (const char *, const char *); |
int confirm (const char *, const char *); |
| 593 |
void request_stdin (const char *); |
void request_stdin (const char *); |
| 594 |
void destroy_stat (struct tar_stat_info *); |
void destroy_stat (struct tar_stat_info *); |
|
bool all_names_found (void); |
|
| 595 |
|
|
| 596 |
/* Module update.c. */ |
/* Module update.c. */ |
| 597 |
|
|