Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
6d85ab85
Commit
6d85ab85
authored
May 21, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Parse vlcrc following American standards for numbers
parent
8d961ec7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
src/config/file.c
src/config/file.c
+10
-1
No files found.
src/config/file.c
View file @
6d85ab85
...
@@ -182,6 +182,10 @@ int __config_LoadConfigFile( vlc_object_t *p_this, const char *psz_module_name )
...
@@ -182,6 +182,10 @@ int __config_LoadConfigFile( vlc_object_t *p_this, const char *psz_module_name )
char
line
[
1024
],
section
[
1022
];
char
line
[
1024
],
section
[
1022
];
section
[
0
]
=
'\0'
;
section
[
0
]
=
'\0'
;
/* Ensure consistent number formatting... */
locale_t
loc
=
newlocale
(
LC_NUMERIC_MASK
,
"C"
,
NULL
);
locale_t
baseloc
=
uselocale
(
loc
);
while
(
fgets
(
line
,
1024
,
file
)
!=
NULL
)
while
(
fgets
(
line
,
1024
,
file
)
!=
NULL
)
{
{
/* Ignore comments and empty lines */
/* Ignore comments and empty lines */
...
@@ -273,7 +277,7 @@ int __config_LoadConfigFile( vlc_object_t *p_this, const char *psz_module_name )
...
@@ -273,7 +277,7 @@ int __config_LoadConfigFile( vlc_object_t *p_this, const char *psz_module_name )
case
CONFIG_ITEM_FLOAT
:
case
CONFIG_ITEM_FLOAT
:
if
(
!*
psz_option_value
)
if
(
!*
psz_option_value
)
break
;
/* ignore empty option */
break
;
/* ignore empty option */
p_item
->
value
.
f
=
(
float
)
i18n_atof
(
psz_option_value
);
p_item
->
value
.
f
=
(
float
)
atof
(
psz_option_value
);
p_item
->
saved
.
f
=
p_item
->
value
.
f
;
p_item
->
saved
.
f
=
p_item
->
value
.
f
;
break
;
break
;
...
@@ -310,6 +314,11 @@ int __config_LoadConfigFile( vlc_object_t *p_this, const char *psz_module_name )
...
@@ -310,6 +314,11 @@ int __config_LoadConfigFile( vlc_object_t *p_this, const char *psz_module_name )
fclose
(
file
);
fclose
(
file
);
vlc_list_release
(
p_list
);
vlc_list_release
(
p_list
);
if
(
loc
!=
(
locale_t
)
0
)
{
uselocale
(
baseloc
);
freelocale
(
loc
);
}
vlc_mutex_unlock
(
&
priv
->
config_lock
);
vlc_mutex_unlock
(
&
priv
->
config_lock
);
return
0
;
return
0
;
...
...
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