Rename mood_method "name_like" to "path_matches".
authorAndre Noll <maan@systemlinux.org>
Sat, 24 Nov 2007 13:31:21 +0000 (14:31 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 24 Nov 2007 13:31:21 +0000 (14:31 +0100)
README.afs
mood.c

index e627ca76b9ea7c6d748f38fe633c698e5b100241..e5c23a58cbc39787565cccd3f5084a1ac84daf76 100644 (file)
@@ -160,7 +160,7 @@ times this audio file was selected is below the average.
 
 Takes the name of an attribute and matches iff that attribute is set.
 
-       name_like(pattern)
+       path_matches(pattern)
 
 Takes a filename pattern and matches iff the path of the audio file
 matches the pattern.
diff --git a/mood.c b/mood.c
index 4988c685490a32a61fcb1077a090388a1bed0ac3..9ddfc58853574a09d4d0073b052df14bced7054a 100644 (file)
--- a/mood.c
+++ b/mood.c
@@ -203,7 +203,7 @@ static int mm_played_rarely_parser(const char *arg, __a_unused void **ignored)
        return 1;
 }
 
-static int mm_name_like_score_function(const char *path,
+static int mm_path_matches_score_function(const char *path,
                __a_unused const struct afs_info *afsi,
                __a_unused const struct afh_info *afhi,
                const void *data)
@@ -213,13 +213,13 @@ static int mm_name_like_score_function(const char *path,
        return 100;
 }
 
-static int mm_name_like_parser(const char *arg, void **data)
+static int mm_path_matches_parser(const char *arg, void **data)
 {
        *data = para_strdup(arg);
        return 1;
 }
 
-static void mm_name_like_cleanup(void *data)
+static void mm_path_matches_cleanup(void *data)
 {
        free(data);
 }
@@ -320,7 +320,7 @@ static const struct mood_method mood_methods[] = {
        {DEFINE_MOOD_METHOD(no_attributes_set)},
        {DEFINE_MOOD_METHOD(played_rarely)},
        {DEFINE_MOOD_METHOD(is_set)},
-       {DEFINE_MOOD_METHOD_WITH_CLEANUP(name_like)},
+       {DEFINE_MOOD_METHOD_WITH_CLEANUP(path_matches)},
        {.parser = NULL}
 };