- if (value != NULL) {
- if (type < TK_M_MAX) {
- /* check if we need to split or call fnmatch() while matching rules */
- int has_split;
- int has_glob;
-
- has_split = (strchr(value, '|') != NULL);
- has_glob = (strchr(value, '*') != NULL || strchr(value, '?') != NULL ||
- strchr(value, '[') != NULL || strchr(value, ']') != NULL);
- if (has_split && has_glob) {
- glob = GL_SPLIT_GLOB;
- } else if (has_split) {
- glob = GL_SPLIT;
- } else if (has_glob) {
- if (strcmp(value, "?*") == 0)
- glob = GL_SOMETHING;
- else
- glob = GL_GLOB;
- }
- } else {
- /* check if we need to substitute format strings for matching rules */
- if (strchr(value, '%') != NULL || strchr(value, '$') != NULL)
- glob = GL_FORMAT;
+ if (value != NULL && type < TK_M_MAX) {
+ /* check if we need to split or call fnmatch() while matching rules */
+ int has_split;
+ int has_glob;
+
+ has_split = (strchr(value, '|') != NULL);
+ has_glob = (strchr(value, '*') != NULL || strchr(value, '?') != NULL ||
+ strchr(value, '[') != NULL || strchr(value, ']') != NULL);
+ if (has_split && has_glob) {
+ glob = GL_SPLIT_GLOB;
+ } else if (has_split) {
+ glob = GL_SPLIT;
+ } else if (has_glob) {
+ if (strcmp(value, "?*") == 0)
+ glob = GL_SOMETHING;
+ else
+ glob = GL_GLOB;