}
/*Regex code needs to parse -i file*/
- if ( isSet(ACL_F_REGEX_CASE))
+ if ( isSet(ACL_F_REGEX_CASE)) {
ConfigParser::TokenPutBack("-i");
+ makeUnSet('i');
+ }
}
const char *
ACLFlags() : flags_(0) {}
bool supported(const ACLFlag f) const; ///< True if the given flag supported
void makeSet(const ACLFlag f) { flags_ |= flagToInt(f); } ///< Set the given flag
+ void makeUnSet(const ACLFlag f) { flags_ &= ~flagToInt(f); } ///< Unset the given flag
/// Return true if the given flag is set
bool isSet(const ACLFlag f) const { return flags_ & flagToInt(f);}
/// Parse optional flags given in the form -[A..Z|a..z]
{
SBufList sl;
+ if (flags.required) {
+ sl.push_back(SBuf("REQUIRED"));
+ return sl;
+ }
+
if (flags.case_insensitive)
sl.push_back(SBuf("-i"));
* a SBufList this way costs Sum(1,N) iterations. For instance
* a 1000-elements list will be filled in 499500 iterations.
*/
- if (flags.required) {
- sl.push_back(SBuf("REQUIRED"));
- } else if (names) {
+ if (names) {
UserDataAclDumpVisitor visitor;
names->visit(visitor);
sl.splice(sl.end(),visitor.contents);