else
retval = !regexec(&tradre, s, 0, NULL, 0);
- } else
- retval = !regexec(&classicalre, s, 0, NULL, 0);
+ } else {
+ if (!regexec(&classicalre, s, 0, NULL, 0)) {
+ retval = regexec(&excsre, s, 0, NULL, 0);
+ }
+ }
return retval;
}
REG_EXTENDED | REG_NOSUB)) != 0)
pt_regex = &hierre;
- else if ( (err = regcomp(&excsre, "^[a-z0-9-].*dpkg-(old|dist|new|tmp)$",
+ else if ( (err = regcomp(&excsre, "^[a-z0-9-].*(\.rpm(save|new|orig)|~|,v)$",
REG_EXTENDED | REG_NOSUB)) != 0)
pt_regex = &excsre;
!= 0)
pt_regex = &tradre;
- } else if ( (err = regcomp(&classicalre, "^[a-zA-Z0-9_-]+$",
+ } else if ( (err = regcomp(&classicalre, "^.+$",
+ REG_EXTENDED | REG_NOSUB)) != 0)
+ pt_regex = &classicalre;
+ else if ( (err = regcomp(&excsre, "^[.]|(\.rpm(save|new|orig)|~|,v)$",
REG_EXTENDED | REG_NOSUB)) != 0)
- pt_regex = &classicalre;
+ pt_regex = &excsre;
if (err != 0) {
fprintf(stderr, "Unable to build regexp: %s", \
regfree(&excsre);
regfree(&tradre);
- } else
+ } else {
regfree(&classicalre);
+ regfree(&excsre);
+ }
}