aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-01 00:58:32 +0100
committerMax Kellermann <max@duempel.org>2009-03-01 00:58:32 +0100
commit80571d1b5a5f35579ad8000add6e3abfc6faadef (patch)
treea9f812eb239803bd64756072d5b7352becea8772 /src
parent6153c86bc3c2c10055143bd85aa3c1ea0dedd769 (diff)
downloadmpd-80571d1b5a5f35579ad8000add6e3abfc6faadef.tar.gz
mpd-80571d1b5a5f35579ad8000add6e3abfc6faadef.tar.xz
mpd-80571d1b5a5f35579ad8000add6e3abfc6faadef.zip
tag: convert ignore_tag_items to a bool array
Diffstat (limited to 'src')
-rw-r--r--src/tag.c10
-rw-r--r--src/tag_internal.h4
-rw-r--r--src/tag_print.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/src/tag.c b/src/tag.c
index bd1635310..3e95e9cca 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -62,7 +62,7 @@ const char *tag_item_names[TAG_NUM_OF_ITEM_TYPES] = {
[TAG_MUSICBRAINZ_TRACKID] = "MUSICBRAINZ_TRACKID",
};
-int8_t ignore_tag_items[TAG_NUM_OF_ITEM_TYPES];
+bool ignore_tag_items[TAG_NUM_OF_ITEM_TYPES];
static size_t items_size(const struct tag *tag)
{
@@ -80,14 +80,14 @@ void tag_lib_init(void)
/* parse the "metadata_to_use" config parameter below */
- memset(ignore_tag_items, 0, TAG_NUM_OF_ITEM_TYPES);
- ignore_tag_items[TAG_ITEM_COMMENT] = 1; /* ignore comments by default */
+ /* ignore comments by default */
+ ignore_tag_items[TAG_ITEM_COMMENT] = true;
value = config_get_string(CONF_METADATA_TO_USE, NULL);
if (value == NULL)
return;
- memset(ignore_tag_items, 1, TAG_NUM_OF_ITEM_TYPES);
+ memset(ignore_tag_items, true, TAG_NUM_OF_ITEM_TYPES);
if (0 == strcasecmp(value, "none"))
return;
@@ -100,7 +100,7 @@ void tag_lib_init(void)
*s = '\0';
for (i = 0; i < TAG_NUM_OF_ITEM_TYPES; i++) {
if (strcasecmp(c, tag_item_names[i]) == 0) {
- ignore_tag_items[i] = 0;
+ ignore_tag_items[i] = false;
break;
}
}
diff --git a/src/tag_internal.h b/src/tag_internal.h
index 2479088bc..2e8823882 100644
--- a/src/tag_internal.h
+++ b/src/tag_internal.h
@@ -19,8 +19,8 @@
#ifndef MPD_TAG_INTERNAL_H
#define MPD_TAG_INTERNAL_H
-#include <stdint.h>
+#include <stdbool.h>
-extern int8_t ignore_tag_items[TAG_NUM_OF_ITEM_TYPES];
+extern bool ignore_tag_items[TAG_NUM_OF_ITEM_TYPES];
#endif
diff --git a/src/tag_print.c b/src/tag_print.c
index 737a63f6e..7c98da3e6 100644
--- a/src/tag_print.c
+++ b/src/tag_print.c
@@ -27,7 +27,7 @@ void tag_print_types(struct client *client)
int i;
for (i = 0; i < TAG_NUM_OF_ITEM_TYPES; i++) {
- if (ignore_tag_items[i] == 0)
+ if (!ignore_tag_items[i])
client_printf(client, "tagtype: %s\n",
tag_item_names[i]);
}