1
0
Fork 0

Merging upstream version 0.23.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-17 21:17:43 +01:00
parent 513c27836a
commit 9745297ffe
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
39 changed files with 2213 additions and 1444 deletions

View file

@ -33,15 +33,12 @@ std::vector< std::string > patterns; // list of patterns
void Exclude::add_pattern( const std::string & arg )
{ patterns.push_back( arg ); }
void Exclude::clear() { patterns.clear(); }
bool Exclude::excluded( const char * const filename )
{
if( patterns.empty() ) return false;
const char * p = filename;
while( *p )
{
do {
for( unsigned i = 0; i < patterns.size(); ++i )
// ignore a trailing sequence starting with '/' in filename
#ifdef FNM_LEADING_DIR
@ -52,6 +49,6 @@ bool Exclude::excluded( const char * const filename )
#endif
while( *p && *p != '/' ) ++p; // skip component
while( *p == '/' ) ++p; // skip slashes
}
} while( *p );
return false;
}