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_t * | group_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. |
Data storage for ignore patterns.
Definition at line 86 of file global.h.
union { ... } |
char ignore_t::compare |
Definition at line 131 of file global.h.
Referenced by ign___init_pattern_into(), and ign__is_ignore().
char* ignore_t::compare_string |
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* ignore_t::compiled |
PCRE main data storage.
Definition at line 119 of file global.h.
Referenced by ign__compile_pattern(), and ign__is_ignore().
dev_t ignore_t::dev |
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().
struct grouping_t* ignore_t::group_def [read] |
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 |
The group this belongs to, as string.
Definition at line 91 of file global.h.
Referenced by ign___init_pattern_into(), ign___load_group(), ign___new_group(), ign___test_all_patterns(), ign__print_group_stats(), ops__apply_group(), and st__print_status().
char ignore_t::has_minor |
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().
ino_t ignore_t::inode |
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().
int ignore_t::major |
The major number.
Definition at line 127 of file global.h.
Referenced by ign___compare_dev(), and ign___init_pattern_into().
int ignore_t::minor |
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().
char* ignore_t::pattern |
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().
unsigned ignore_t::stats_matches |
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
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().
unsigned ignore_t::stats_tested |
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().