ignore_t Struct Reference

Data storage for ignore patterns. More...

#include <global.h>


Data Fields

char * pattern
 The pattern string as given by the user, including flags.
const char * group_name
 The group this belongs to, as string.
struct grouping_tgroup_def
 The group definition.
char * compare_string
 The calculated pattern string.
unsigned stats_tested
 How many times this pattern was visited.
unsigned stats_matches
 How many times this pattern matched.
union {
   struct {
      pcre *   compiled
 PCRE main data storage.
      pcre_extra *   extra
 PCRE extra data storage.
   } 
   struct {
      int   major
 The major number.
      int   minor
 The minor number.
      char   compare
      char   has_minor
 Flag saying whether a minor number was given, or if only the major number was told.
   } 
 For device compares.
   struct {
      ino_t   inode
 Inode number.
      dev_t   dev
 Device.
   } 
 Inode compares are easy: just an inode number and a device.
}; 
unsigned short mode_match_and
 AND-value for mode matching, or 0 for not chosen.
unsigned short mode_match_cmp
 CMP-value for mode matching.
unsigned int dir_only:1
 Should this match only directories?
unsigned int is_icase:1
 Ignore case for comparing?
unsigned int is_user_pat:1
 Is it an internally generated pattern (for the WAA area)? Internal patterns are not saved and not printed.
unsigned int type:3
 Which type is this pattern? See PatTypes.


Detailed Description

Data storage for ignore patterns.

Definition at line 86 of file global.h.


Field Documentation

union { ... }

See also:
PatDevComp

Definition at line 131 of file global.h.

Referenced by ign___init_pattern_into(), and ign__is_ignore().

The calculated pattern string.

Does no longer include the flags (like take), and shell syntax is converted to PCRE.

Definition at line 98 of file global.h.

Referenced by ign___init_pattern_into(), and ign__compile_pattern().

PCRE main data storage.

Definition at line 119 of file global.h.

Referenced by ign__compile_pattern(), and ign__is_ignore().

Device.

Definition at line 142 of file global.h.

Referenced by ign___init_pattern_into(), and ign__is_ignore().

unsigned int ignore_t::dir_only

Should this match only directories?

Definition at line 152 of file global.h.

Referenced by ign___init_pattern_into(), and ign__is_ignore().

pcre_extra* ignore_t::extra

PCRE extra data storage.

Currently nearly unused.

Definition at line 121 of file global.h.

Referenced by ign__compile_pattern(), and ign__is_ignore().

The group definition.

Definition at line 93 of file global.h.

Referenced by ign___load_group(), ign___new_group(), ign__is_ignore(), ign__work(), and ops__apply_group().

const char* ignore_t::group_name

Flag saying whether a minor number was given, or if only the major number was told.

Definition at line 134 of file global.h.

Referenced by ign___compare_dev(), and ign___init_pattern_into().

Inode number.

Definition at line 140 of file global.h.

Referenced by ign___init_pattern_into(), and ign__is_ignore().

unsigned int ignore_t::is_icase

Ignore case for comparing?

Definition at line 154 of file global.h.

Referenced by ign___init_pattern_into(), and ign__compile_pattern().

unsigned int ignore_t::is_user_pat

Is it an internally generated pattern (for the WAA area)? Internal patterns are not saved and not printed.

Definition at line 157 of file global.h.

Referenced by ign__new_pattern(), ign__print_group_stats(), and ign__save_ignorelist().

The major number.

Definition at line 127 of file global.h.

Referenced by ign___compare_dev(), and ign___init_pattern_into().

The minor number.

Definition at line 129 of file global.h.

Referenced by ign___compare_dev(), and ign___init_pattern_into().

unsigned short ignore_t::mode_match_and

AND-value for mode matching, or 0 for not chosen.

Definition at line 147 of file global.h.

Referenced by ign___init_pattern_into(), and ign__is_ignore().

unsigned short ignore_t::mode_match_cmp

CMP-value for mode matching.

Definition at line 149 of file global.h.

Referenced by ign___init_pattern_into(), and ign__is_ignore().

The pattern string as given by the user, including flags.

Definition at line 88 of file global.h.

Referenced by ign___init_pattern_into(), ign___load_group(), ign___test_all_patterns(), ign__compile_pattern(), ign__is_ignore(), ign__print_group_stats(), and ign__save_ignorelist().

How many times this pattern matched.

Both are not strictly needed; we could simply do a difference between this and the next value, but that wouldn't work for the last entry (we'd have to store the tests done globally, and store how many matches at each level), isn't so easy to check for bugs ;-), and it wouldn't work anyway as soon as groups could accumulate in some way.

So, for simplicities' sake, we just store both values.

Definition at line 113 of file global.h.

Referenced by ign__is_ignore(), and ign__print_group_stats().

How many times this pattern was visited.

Definition at line 101 of file global.h.

Referenced by ign__is_ignore(), and ign__print_group_stats().

unsigned int ignore_t::type

Which type is this pattern? See PatTypes.

Definition at line 161 of file global.h.

Referenced by ign___init_pattern_into(), ign__compile_pattern(), and ign__is_ignore().


The documentation for this struct was generated from the following file:

Generated for fsvs by  doxygen 1.5.9