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
32877267
Commit
32877267
authored
Dec 16, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ls: removed isValidRemoteUtf8Url()
The function didn't do anything useful, it was just several lines obfuscating that it was only forwarding isRemoteUrl()'s return value.
parent
3d4fb9a9
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
46 deletions
+4
-46
ls.c
src/ls.c
+0
-40
ls.h
src/ls.h
+0
-2
playlist.c
src/playlist.c
+1
-1
playlist_save.c
src/playlist_save.c
+1
-1
stored_playlist.c
src/stored_playlist.c
+2
-2
No files found.
src/ls.c
View file @
32877267
...
...
@@ -44,46 +44,6 @@ int printRemoteUrlHandlers(struct client *client)
return
0
;
}
int
isValidRemoteUtf8Url
(
const
char
*
utf8url
)
{
int
ret
=
0
;
const
char
*
temp
;
switch
(
isRemoteUrl
(
utf8url
))
{
case
1
:
ret
=
1
;
temp
=
utf8url
;
while
(
*
temp
)
{
if
((
*
temp
>=
'a'
&&
*
temp
<=
'z'
)
||
(
*
temp
>=
'A'
&&
*
temp
<=
'Z'
)
||
(
*
temp
>=
'0'
&&
*
temp
<=
'9'
)
||
*
temp
==
'$'
||
*
temp
==
'-'
||
*
temp
==
'.'
||
*
temp
==
'+'
||
*
temp
==
'!'
||
*
temp
==
'*'
||
*
temp
==
'\''
||
*
temp
==
'('
||
*
temp
==
')'
||
*
temp
==
','
||
*
temp
==
'%'
||
*
temp
==
'/'
||
*
temp
==
':'
||
*
temp
==
'?'
||
*
temp
==
';'
||
*
temp
==
'&'
||
*
temp
==
'='
)
{
}
else
{
ret
=
1
;
break
;
}
temp
++
;
}
break
;
}
return
ret
;
}
int
isRemoteUrl
(
const
char
*
url
)
{
int
count
=
0
;
...
...
src/ls.h
View file @
32877267
...
...
@@ -26,8 +26,6 @@ struct client;
const
char
*
getSuffix
(
const
char
*
utf8file
);
int
isValidRemoteUtf8Url
(
const
char
*
utf8url
);
int
isRemoteUrl
(
const
char
*
url
);
const
struct
decoder_plugin
*
...
...
src/playlist.c
View file @
32877267
...
...
@@ -537,7 +537,7 @@ song_by_url(const char *url)
if
(
song
!=
NULL
)
return
song
;
if
(
is
ValidRemoteUtf8
Url
(
url
))
if
(
is
Remote
Url
(
url
))
return
song_remote_new
(
url
);
return
NULL
;
...
...
src/playlist_save.c
View file @
32877267
...
...
@@ -46,7 +46,7 @@ playlist_print_uri(FILE *file, const char *uri)
char
tmp
[
MPD_PATH_MAX
];
const
char
*
s
;
if
(
playlist_saveAbsolutePaths
&&
!
is
ValidRemoteUtf8
Url
(
uri
)
&&
if
(
playlist_saveAbsolutePaths
&&
!
is
Remote
Url
(
uri
)
&&
uri
[
0
]
!=
'/'
)
s
=
map_directory_child_fs
(
db_get_root
(),
uri
,
tmp
);
else
...
...
src/stored_playlist.c
View file @
32877267
...
...
@@ -156,7 +156,7 @@ spl_load(const char *utf8path)
if
(
*
s
==
PLAYLIST_COMMENT
)
continue
;
if
(
!
is
ValidRemoteUtf8
Url
(
s
))
{
if
(
!
is
Remote
Url
(
s
))
{
struct
song
*
song
;
path_utf8
=
map_fs_to_utf8
(
s
,
path_max_tmp
);
...
...
@@ -360,7 +360,7 @@ spl_append_uri(const char *url, const char *utf8file)
if
(
song
)
return
spl_append_song
(
utf8file
,
song
);
if
(
!
is
ValidRemoteUtf8
Url
(
url
))
if
(
!
is
Remote
Url
(
url
))
return
PLAYLIST_RESULT_NO_SUCH_SONG
;
song
=
song_remote_new
(
url
);
...
...
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