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
0cbc4012
Commit
0cbc4012
authored
Jun 19, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: added "used" flag to struct block_param
parent
8074b826
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
conf.c
src/conf.c
+4
-1
conf.h
src/conf.h
+12
-0
No files found.
src/conf.c
View file @
0cbc4012
...
...
@@ -139,6 +139,7 @@ config_new_param(const char *value, int line)
ret
->
num_block_params
=
0
;
ret
->
block_params
=
NULL
;
ret
->
used
=
false
;
return
ret
;
}
...
...
@@ -210,6 +211,7 @@ config_add_block_param(struct config_param * param, const char *name,
bp
->
name
=
g_strdup
(
name
);
bp
->
value
=
g_strdup
(
value
);
bp
->
line
=
line
;
bp
->
used
=
false
;
}
static
struct
config_param
*
...
...
@@ -356,7 +358,7 @@ config_get_next_param(const char *name, const struct config_param * last)
return
NULL
;
param
=
node
->
data
;
param
->
used
=
true
;
return
param
;
}
...
...
@@ -418,6 +420,7 @@ config_get_block_param(const struct config_param * param, const char *name)
for
(
unsigned
i
=
0
;
i
<
param
->
num_block_params
;
i
++
)
{
if
(
0
==
strcmp
(
name
,
param
->
block_params
[
i
].
name
))
{
struct
block_param
*
bp
=
&
param
->
block_params
[
i
];
bp
->
used
=
true
;
return
bp
;
}
}
...
...
src/conf.h
View file @
0cbc4012
...
...
@@ -75,6 +75,12 @@ struct block_param {
char
*
name
;
char
*
value
;
int
line
;
/**
* This flag is false when nobody has queried the value of
* this option yet.
*/
bool
used
;
};
struct
config_param
{
...
...
@@ -83,6 +89,12 @@ struct config_param {
struct
block_param
*
block_params
;
unsigned
num_block_params
;
/**
* This flag is false when nobody has queried the value of
* this option yet.
*/
bool
used
;
};
void
config_global_init
(
void
);
...
...
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