src/common/apacheconfig.cc
static bool IsFnmatchPattern(const char* pattern) {
  bool nesting = false;
  for (; *pattern != '\0'; ++pattern) {
    switch (*pattern) {
      // *, ? glob
      case '?':
      case '*':
        return true;

      // [] glob
      case '[':
        nesting = true;
        break;
      case ']':
        if (nesting) return true;
        break;

      // escape chars
      case '\\':
        ++pattern;
        if (*pattern == '\0') {
          return false;
        }
        break;
    }
  }

  return false;
}
// Whether the pattern contains glob definition according to POSIX fnmatch
// method.
Whether the pattern contains glob definition according to POSIX fnmatch
method.
Whether the pattern contains glob definition according to POSIX fnmatch method .
static bool IsFnmatchPattern(const char* pattern) {
  bool nesting = false;
  for (; *pattern != '\0'; ++pattern) {
    switch (*pattern) {
      case '?':
      case '*':
        return true;
      case '[':
        nesting = true;
        break;
      case ']':
        if (nesting) return true;
        break;
      case '\\':
        ++pattern;
        if (*pattern == '\0') {
          return false;
        }
        break;
    }
  }
  return false;
}
static bool IsFnmatchPattern ( const char * pattern ) { bool nesting = false ; for ( ; * pattern != ' \0 ' ; ++ pattern ) { switch ( * pattern ) { case ' ' : case ' ' : return true ; case ' ' : nesting = true ; break ; case ' ' : if ( nesting ) return true ; break ; case ' \\ ' : ++ pattern ; if ( * pattern == ' \0 ' ) { return false ; } break ; } } return false ; }
Whether the pattern contains glob definition according to POSIX fnmatch
method.
Whether the pattern contains glob definition according to POSIX fnmatch method .
// *, ? glob // [] glob // escape chars