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
daa46477
Commit
daa46477
authored
Jan 30, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ConfigOption: rename to ConfigTemplate
parent
c67668d6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
Makefile.am
Makefile.am
+1
-0
ConfigFile.cxx
src/ConfigFile.cxx
+3
-3
ConfigTemplates.hxx
src/ConfigTemplates.hxx
+4
-4
No files found.
Makefile.am
View file @
daa46477
...
...
@@ -148,6 +148,7 @@ src_mpd_SOURCES = \
src/Idle.cxx src/Idle.hxx
\
src/CommandLine.cxx src/CommandLine.hxx
\
src/ConfigFile.cxx
\
src/ConfigTemplates.hxx
\
src/CrossFade.cxx src/CrossFade.hxx
\
src/cue/cue_parser.c src/cue/cue_parser.h
\
src/decoder_error.h
\
...
...
src/ConfigFile.cxx
View file @
daa46477
...
...
@@ -19,7 +19,7 @@
#include "config.h"
#include "conf.h"
#include "Config
Option
s.hxx"
#include "Config
Template
s.hxx"
extern
"C"
{
#include "utils.h"
...
...
@@ -46,7 +46,7 @@ extern "C" {
#define CONF_COMMENT '#'
static
GSList
*
config_params
[
G_N_ELEMENTS
(
config_
option
s
)];
static
GSList
*
config_params
[
G_N_ELEMENTS
(
config_
template
s
)];
static
bool
get_bool
(
const
char
*
value
,
bool
*
value_r
)
...
...
@@ -318,7 +318,7 @@ ReadConfigFile(const Path &path, GError **error_r)
return
false
;
}
const
Config
Option
&
option
=
config_option
s
[
i
];
const
Config
Template
&
option
=
config_template
s
[
i
];
GSList
*&
params
=
config_params
[
i
];
if
(
params
!=
NULL
&&
!
option
.
repeatable
)
{
...
...
src/Config
Option
s.hxx
→
src/Config
Template
s.hxx
View file @
daa46477
...
...
@@ -23,13 +23,13 @@
#include <string.h>
struct
Config
Option
{
struct
Config
Template
{
const
char
*
const
name
;
const
bool
repeatable
;
const
bool
block
;
};
static
constexpr
struct
Config
Option
config_option
s
[]
=
{
static
constexpr
struct
Config
Template
config_template
s
[]
=
{
{
CONF_MUSIC_DIR
,
false
,
false
},
{
CONF_PLAYLIST_DIR
,
false
,
false
},
{
CONF_FOLLOW_INSIDE_SYMLINKS
,
false
,
false
},
...
...
@@ -90,8 +90,8 @@ gcc_pure
static
int
ConfigFindByName
(
const
char
*
name
)
{
for
(
unsigned
i
=
0
;
i
<
G_N_ELEMENTS
(
config_
option
s
);
++
i
)
if
(
strcmp
(
config_
option
s
[
i
].
name
,
name
)
==
0
)
for
(
unsigned
i
=
0
;
i
<
G_N_ELEMENTS
(
config_
template
s
);
++
i
)
if
(
strcmp
(
config_
template
s
[
i
].
name
,
name
)
==
0
)
return
i
;
return
-
1
;
...
...
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