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
b892028b
Commit
b892028b
authored
Jul 21, 2006
by
J. Alexander Treuman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a getBoolConfigParam function
git-svn-id:
https://svn.musicpd.org/mpd/trunk@4417
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
74c4f536
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
conf.c
src/conf.c
+13
-0
conf.h
src/conf.h
+2
-0
No files found.
src/conf.c
View file @
b892028b
...
@@ -362,6 +362,19 @@ char *getConfigParamValue(char *name)
...
@@ -362,6 +362,19 @@ char *getConfigParamValue(char *name)
return
param
->
value
;
return
param
->
value
;
}
}
int
getBoolConfigParam
(
char
*
name
)
{
ConfigParam
*
param
;
param
=
getConfigParam
(
name
);
if
(
!
param
)
return
-
1
;
if
(
strcmp
(
"yes"
,
param
->
value
)
==
0
)
return
1
;
else
if
(
strcmp
(
"no"
,
param
->
value
)
==
0
)
return
0
;
return
-
1
;
}
BlockParam
*
getBlockParam
(
ConfigParam
*
param
,
char
*
name
)
BlockParam
*
getBlockParam
(
ConfigParam
*
param
,
char
*
name
)
{
{
BlockParam
*
ret
=
NULL
;
BlockParam
*
ret
=
NULL
;
...
...
src/conf.h
View file @
b892028b
...
@@ -85,6 +85,8 @@ ConfigParam *getNextConfigParam(char *name, ConfigParam * last);
...
@@ -85,6 +85,8 @@ ConfigParam *getNextConfigParam(char *name, ConfigParam * last);
char
*
getConfigParamValue
(
char
*
name
);
char
*
getConfigParamValue
(
char
*
name
);
int
getBoolConfigParam
(
char
*
name
);
BlockParam
*
getBlockParam
(
ConfigParam
*
param
,
char
*
name
);
BlockParam
*
getBlockParam
(
ConfigParam
*
param
,
char
*
name
);
ConfigParam
*
parseConfigFilePath
(
char
*
name
,
int
force
);
ConfigParam
*
parseConfigFilePath
(
char
*
name
,
int
force
);
...
...
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