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
d0024c07
Commit
d0024c07
authored
Dec 16, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ls: use bool
Use the C99 "bool" data type instead of "int".
parent
1d82edc6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
ls.c
src/ls.c
+4
-5
ls.h
src/ls.h
+3
-1
No files found.
src/ls.c
View file @
d0024c07
...
@@ -42,19 +42,18 @@ void printRemoteUrlHandlers(struct client *client)
...
@@ -42,19 +42,18 @@ void printRemoteUrlHandlers(struct client *client)
}
}
}
}
int
isRemoteUrl
(
const
char
*
url
)
bool
isRemoteUrl
(
const
char
*
url
)
{
{
int
count
=
0
;
const
char
**
urlPrefixes
=
remoteUrlPrefixes
;
const
char
**
urlPrefixes
=
remoteUrlPrefixes
;
while
(
*
urlPrefixes
)
{
while
(
*
urlPrefixes
)
{
count
++
;
if
(
g_str_has_prefix
(
url
,
*
urlPrefixes
))
if
(
g_str_has_prefix
(
url
,
*
urlPrefixes
))
return
count
;
return
true
;
urlPrefixes
++
;
urlPrefixes
++
;
}
}
return
0
;
return
false
;
}
}
/* suffixes should be ascii only characters */
/* suffixes should be ascii only characters */
...
...
src/ls.h
View file @
d0024c07
...
@@ -21,12 +21,14 @@
...
@@ -21,12 +21,14 @@
#include "decoder_list.h"
#include "decoder_list.h"
#include <stdbool.h>
struct
stat
;
struct
stat
;
struct
client
;
struct
client
;
const
char
*
getSuffix
(
const
char
*
utf8file
);
const
char
*
getSuffix
(
const
char
*
utf8file
);
int
isRemoteUrl
(
const
char
*
url
);
bool
isRemoteUrl
(
const
char
*
url
);
const
struct
decoder_plugin
*
const
struct
decoder_plugin
*
hasMusicSuffix
(
const
char
*
utf8file
,
unsigned
int
next
);
hasMusicSuffix
(
const
char
*
utf8file
,
unsigned
int
next
);
...
...
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