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
e19f6905
Commit
e19f6905
authored
Oct 07, 2008
by
Eric Wong
Committed by
Max Kellermann
Oct 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
song: replace printSong* with song_print_*
This make argument order more consistent for iterators. Additionally, these now return ssize_t results for error checking.
parent
0d34815f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
+14
-14
dbUtils.c
src/dbUtils.c
+6
-6
playlist.c
src/playlist.c
+2
-2
song_print.c
src/song_print.c
+4
-4
song_print.h
src/song_print.h
+2
-2
No files found.
src/dbUtils.c
View file @
e19f6905
...
...
@@ -68,7 +68,7 @@ static int printDirectoryInDirectory(Directory * directory, void *data)
static
int
printSongInDirectory
(
Song
*
song
,
mpd_unused
void
*
data
)
{
struct
client
*
client
=
data
;
printSongU
rl
(
client
,
song
);
song_print_u
rl
(
client
,
song
);
return
0
;
}
...
...
@@ -83,7 +83,7 @@ static int searchInDirectory(Song * song, void *_data)
LocateTagItemArray
*
array
=
&
data
->
array
;
if
(
strstrSearchTags
(
song
,
array
->
numItems
,
array
->
items
))
printSongI
nfo
(
data
->
client
,
song
);
song_print_i
nfo
(
data
->
client
,
song
);
return
0
;
}
...
...
@@ -124,7 +124,7 @@ static int findInDirectory(Song * song, void *_data)
LocateTagItemArray
*
array
=
&
data
->
array
;
if
(
tagItemsFoundAndMatches
(
song
,
array
->
numItems
,
array
->
items
))
printSongI
nfo
(
data
->
client
,
song
);
song_print_i
nfo
(
data
->
client
,
song
);
return
0
;
}
...
...
@@ -221,8 +221,8 @@ int addAllInToStoredPlaylist(const char *name, const char *utf8file)
static
int
directoryPrintSongInfo
(
Song
*
song
,
void
*
data
)
{
struct
client
*
client
=
data
;
return
printSongInfo
(
client
,
song
)
;
song_print_info
(
client
,
song
);
return
0
;
}
static
int
sumSongTime
(
Song
*
song
,
void
*
data
)
...
...
@@ -285,7 +285,7 @@ static void visitTag(struct client *client, struct strset *set,
struct
tag
*
tag
=
song
->
tag
;
if
(
tagType
==
LOCATE_TAG_FILE_TYPE
)
{
printSongU
rl
(
client
,
song
);
song_print_u
rl
(
client
,
song
);
return
;
}
...
...
src/playlist.c
View file @
e19f6905
...
...
@@ -365,7 +365,7 @@ void readPlaylistState(FILE *fp)
static
void
printPlaylistSongInfo
(
struct
client
*
client
,
int
song
)
{
printSongI
nfo
(
client
,
playlist
.
songs
[
song
]);
song_print_i
nfo
(
client
,
playlist
.
songs
[
song
]);
client_printf
(
client
,
"Pos: %i
\n
Id: %i
\n
"
,
song
,
playlist
.
positionToId
[
song
]);
}
...
...
@@ -1360,7 +1360,7 @@ int PlaylistInfo(struct client *client, const char *utf8file, int detail)
if
(
detail
)
{
Song
*
song
=
getSongFromDB
(
temp
);
if
(
song
)
{
printSongI
nfo
(
client
,
song
);
song_print_i
nfo
(
client
,
song
);
wrote
=
1
;
}
}
...
...
src/song_print.c
View file @
e19f6905
...
...
@@ -22,7 +22,7 @@
#include "tag_print.h"
#include "client.h"
void
printSongU
rl
(
struct
client
*
client
,
Song
*
song
)
void
song_print_u
rl
(
struct
client
*
client
,
Song
*
song
)
{
if
(
song
->
parentDir
&&
song
->
parentDir
->
path
)
{
client_printf
(
client
,
"%s%s/%s
\n
"
,
SONG_FILE
,
...
...
@@ -32,9 +32,9 @@ void printSongUrl(struct client *client, Song * song)
}
}
int
printSongI
nfo
(
struct
client
*
client
,
Song
*
song
)
int
song_print_i
nfo
(
struct
client
*
client
,
Song
*
song
)
{
printSongU
rl
(
client
,
song
);
song_print_u
rl
(
client
,
song
);
if
(
song
->
tag
)
tag_print
(
client
,
song
->
tag
);
...
...
@@ -48,7 +48,7 @@ int songvec_print(struct client *client, const struct songvec *sv)
Song
**
sp
=
sv
->
base
;
for
(
i
=
sv
->
nr
;
--
i
>=
0
;)
if
(
printSongI
nfo
(
client
,
*
sp
++
)
<
0
)
if
(
song_print_i
nfo
(
client
,
*
sp
++
)
<
0
)
return
-
1
;
return
0
;
...
...
src/song_print.h
View file @
e19f6905
...
...
@@ -23,10 +23,10 @@
struct
songvec
;
int
printSongI
nfo
(
struct
client
*
client
,
Song
*
song
);
int
song_print_i
nfo
(
struct
client
*
client
,
Song
*
song
);
int
songvec_print
(
struct
client
*
client
,
const
struct
songvec
*
sv
);
void
printSongU
rl
(
struct
client
*
client
,
Song
*
song
);
void
song_print_u
rl
(
struct
client
*
client
,
Song
*
song
);
#endif
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