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
8098d8ff
Commit
8098d8ff
authored
Apr 12, 2008
by
Max Kellermann
Committed by
Eric Wong
Apr 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
whitespace cleanup
git-svn-id:
https://svn.musicpd.org/mpd/trunk@7320
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
c89b358c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
tagTracker.c
src/tagTracker.c
+14
-14
No files found.
src/tagTracker.c
View file @
8098d8ff
...
...
@@ -33,20 +33,20 @@ typedef struct tagTrackerItem {
char
*
getTagItemString
(
int
type
,
char
*
string
)
{
TreeIterator
iter
;
if
(
tagTrees
[
type
]
==
NULL
)
if
(
tagTrees
[
type
]
==
NULL
)
{
tagTrees
[
type
]
=
MakeTree
((
TreeCompareKeyFunction
)
strcmp
,
(
TreeFreeFunction
)
free
,
tagTrees
[
type
]
=
MakeTree
((
TreeCompareKeyFunction
)
strcmp
,
(
TreeFreeFunction
)
free
,
(
TreeFreeFunction
)
free
);
}
if
(
FindInTree
(
tagTrees
[
type
],
string
,
&
iter
))
if
(
FindInTree
(
tagTrees
[
type
],
string
,
&
iter
))
{
((
TagTrackerItem
*
)
GetTreeKeyData
(
&
iter
)
->
data
)
->
count
++
;
return
(
char
*
)
GetTreeKeyData
(
&
iter
)
->
key
;
}
else
}
else
{
TagTrackerItem
*
item
=
xmalloc
(
sizeof
(
TagTrackerItem
));
char
*
key
=
xstrdup
(
string
);
...
...
@@ -60,23 +60,23 @@ char *getTagItemString(int type, char *string)
void
removeTagItemString
(
int
type
,
char
*
string
)
{
TreeIterator
iter
;
assert
(
string
);
assert
(
tagTrees
[
type
]);
if
(
tagTrees
[
type
]
==
NULL
)
return
;
if
(
FindInTree
(
tagTrees
[
type
],
string
,
&
iter
))
if
(
FindInTree
(
tagTrees
[
type
],
string
,
&
iter
))
{
TagTrackerItem
*
item
=
TagTrackerItem
*
item
=
(
TagTrackerItem
*
)
GetTreeKeyData
(
&
iter
)
->
data
;
item
->
count
--
;
if
(
item
->
count
<=
0
)
RemoveFromTreeByIterator
(
tagTrees
[
type
],
&
iter
);
}
if
(
GetTreeSize
(
tagTrees
[
type
])
==
0
)
if
(
GetTreeSize
(
tagTrees
[
type
])
==
0
)
{
FreeTree
(
tagTrees
[
type
]);
tagTrees
[
type
]
=
NULL
;
...
...
@@ -133,10 +133,10 @@ void printVisitedInTagTracker(int fd, int type)
{
item
=
((
TagTrackerItem
*
)
GetTreeKeyData
(
&
iter
)
->
data
);
if
(
item
->
visited
)
if
(
item
->
visited
)
{
fdprintf
(
fd
,
"%s: %s
\n
"
,
fdprintf
(
fd
,
"%s: %s
\n
"
,
mpdTagItemKeys
[
type
],
(
char
*
)
GetTreeKeyData
(
&
iter
)
->
key
);
}
...
...
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