/[tar]/tar/src/common.h
ViewVC logotype

Diff of /tar/src/common.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20 by gray, Thu Oct 2 10:28:30 2003 UTC revision 1.21 by gray, Sat Oct 4 13:49:25 2003 UTC
# Line 176  GLOBAL const char *info_script_option; Line 176  GLOBAL const char *info_script_option;
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 */
# Line 295  struct name Line 298  struct name
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 */
# Line 560  void name_close (void); Line 565  void name_close (void);
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 *);
# Line 569  void blank_name_list (void); Line 573  void blank_name_list (void);
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    
# Line 577  bool is_avoided_name (char const *); Line 582  bool is_avoided_name (char const *);
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    

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26