* argument depends on the mood method this function is used for. It usually is
* the argument given at the end of a mood line.
*
* argument depends on the mood method this function is used for. It usually is
* the argument given at the end of a mood line.
*
* Boolean score functions should always return either -100 or +100.
*
* \sa struct mood_method, mood_parser.
* Boolean score functions should always return either -100 or +100.
*
* \sa struct mood_method, mood_parser.
*
* The mood_parser of a mood_method is called once at mood open time for each
* line of the current mood definition that contains the mood_method's name as
*
* The mood_parser of a mood_method is called once at mood open time for each
* line of the current mood definition that contains the mood_method's name as
* mood_parser must determine whether the line is syntactically correct and
* return a positive value if so and a negative value otherwise.
*
* mood_parser must determine whether the line is syntactically correct and
* return a positive value if so and a negative value otherwise.
*
* structure which depends of the particular mood_method and which is used
* later in the mood_score_function of the mood_method. The mood_parser may
* store a pointer to its structure via the second argument.
* structure which depends of the particular mood_method and which is used
* later in the mood_score_function of the mood_method. The mood_parser may
* store a pointer to its structure via the second argument.
*
* When a mood is opened, each line of its definition is investigated, and a
* corresponding mood item is produced. Each mood line starts with \p accept,
*
* When a mood is opened, each line of its definition is investigated, and a
* corresponding mood item is produced. Each mood line starts with \p accept,
* such type a linked list is maintained whose entries are the mood items.
*
* \sa mood_item, mood_open().
* such type a linked list is maintained whose entries are the mood items.
*
* \sa mood_item, mood_open().
- ret = regexec((regex_t *)preg, path, 42, NULL, 0);
- return (ret == REG_NOMATCH)? -100 : 100;
+ ret = fnmatch(data, path, 0);
+ return ret? -100 : 100;
list_for_each_entry(item, &m->accept_list, mood_item_node)
if (add_item_score(aft_row, item, &score, &score_arg_sum) > 0)
match = 1;
list_for_each_entry(item, &m->accept_list, mood_item_node)
if (add_item_score(aft_row, item, &score, &score_arg_sum) > 0)
match = 1;
/* reject if there is no matching entry in the accept list */
if (!match && !list_empty(&m->accept_list))
return -E_NOT_ADMISSIBLE;
/* reject if there is no matching entry in the accept list */
if (!match && !list_empty(&m->accept_list))
return -E_NOT_ADMISSIBLE;