Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
b49518c6
Commit
b49518c6
authored
Mar 01, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tag: no CamelCase
Renamed functions and variables.
parent
ae87abae
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
tag.c
src/tag.c
+8
-8
tag.h
src/tag.h
+5
-5
tag_internal.h
src/tag_internal.h
+1
-1
tag_print.c
src/tag_print.c
+1
-1
No files found.
src/tag.c
View file @
b49518c6
...
...
@@ -62,7 +62,7 @@ const char *tag_item_names[TAG_NUM_OF_ITEM_TYPES] = {
[
TAG_MUSICBRAINZ_TRACKID
]
=
"MUSICBRAINZ_TRACKID"
,
};
int8_t
ignore
TagI
tems
[
TAG_NUM_OF_ITEM_TYPES
];
int8_t
ignore
_tag_i
tems
[
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
TagI
tems
,
0
,
TAG_NUM_OF_ITEM_TYPES
);
ignore
TagI
tems
[
TAG_ITEM_COMMENT
]
=
1
;
/* ignore comments by default */
memset
(
ignore
_tag_i
tems
,
0
,
TAG_NUM_OF_ITEM_TYPES
);
ignore
_tag_i
tems
[
TAG_ITEM_COMMENT
]
=
1
;
/* ignore comments by default */
value
=
config_get_string
(
CONF_METADATA_TO_USE
,
NULL
);
if
(
value
==
NULL
)
return
;
memset
(
ignore
TagI
tems
,
1
,
TAG_NUM_OF_ITEM_TYPES
);
memset
(
ignore
_tag_i
tems
,
1
,
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
TagI
tems
[
i
]
=
0
;
ignore
_tag_i
tems
[
i
]
=
0
;
break
;
}
}
...
...
@@ -453,15 +453,15 @@ tag_add_item_internal(struct tag *tag, enum tag_type type,
g_free
(
p
);
}
void
tag_add_item_n
(
struct
tag
*
tag
,
enum
tag_type
itemT
ype
,
void
tag_add_item_n
(
struct
tag
*
tag
,
enum
tag_type
t
ype
,
const
char
*
value
,
size_t
len
)
{
if
(
ignore
TagItems
[
itemT
ype
])
if
(
ignore
_tag_items
[
t
ype
])
{
return
;
}
if
(
!
value
||
!
len
)
return
;
tag_add_item_internal
(
tag
,
itemT
ype
,
value
,
len
);
tag_add_item_internal
(
tag
,
t
ype
,
value
,
len
);
}
src/tag.h
View file @
b49518c6
...
...
@@ -65,7 +65,7 @@ struct tag *tag_new(void);
void
tag_lib_init
(
void
);
void
tag_clear_items_by_type
(
struct
tag
*
tag
,
enum
tag_type
itemT
ype
);
void
tag_clear_items_by_type
(
struct
tag
*
tag
,
enum
tag_type
t
ype
);
void
tag_free
(
struct
tag
*
tag
);
...
...
@@ -83,13 +83,13 @@ void tag_begin_add(struct tag *tag);
*/
void
tag_end_add
(
struct
tag
*
tag
);
void
tag_add_item_n
(
struct
tag
*
tag
,
enum
tag_type
itemT
ype
,
void
tag_add_item_n
(
struct
tag
*
tag
,
enum
tag_type
t
ype
,
const
char
*
value
,
size_t
len
);
static
inline
void
tag_add_item
(
struct
tag
*
tag
,
enum
tag_type
itemType
,
const
char
*
value
)
static
inline
void
tag_add_item
(
struct
tag
*
tag
,
enum
tag_type
type
,
const
char
*
value
)
{
tag_add_item_n
(
tag
,
itemT
ype
,
value
,
strlen
(
value
));
tag_add_item_n
(
tag
,
t
ype
,
value
,
strlen
(
value
));
}
struct
tag
*
tag_dup
(
const
struct
tag
*
tag
);
...
...
src/tag_internal.h
View file @
b49518c6
...
...
@@ -21,6 +21,6 @@
#include <stdint.h>
extern
int8_t
ignore
TagI
tems
[
TAG_NUM_OF_ITEM_TYPES
];
extern
int8_t
ignore
_tag_i
tems
[
TAG_NUM_OF_ITEM_TYPES
];
#endif
src/tag_print.c
View file @
b49518c6
...
...
@@ -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
TagI
tems
[
i
]
==
0
)
if
(
ignore
_tag_i
tems
[
i
]
==
0
)
client_printf
(
client
,
"tagtype: %s
\n
"
,
tag_item_names
[
i
]);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment