Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
0b00646d
Commit
0b00646d
authored
May 21, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
us_strtod: do not make any kludgy assumptions about number formats
parent
a2c338bb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
src/text/charset.c
src/text/charset.c
+11
-14
No files found.
src/text/charset.c
View file @
0b00646d
...
@@ -378,24 +378,21 @@ char *vlc_fix_readdir( const char *psz_string )
...
@@ -378,24 +378,21 @@ char *vlc_fix_readdir( const char *psz_string )
/**
/**
* us_strtod() has the same prototype as ANSI C strtod() but it
expects
* us_strtod() has the same prototype as ANSI C strtod() but it
uses the
*
a dot as decimal separator regardless of the system
locale.
*
POSIX/C decimal format, regardless of the current numeric
locale.
*/
*/
double
us_strtod
(
const
char
*
str
,
char
**
end
)
double
us_strtod
(
const
char
*
str
,
char
**
end
)
{
{
char
dup
[
strlen
(
str
)
+
1
],
*
ptr
;
locale_t
loc
=
newlocale
(
LC_NUMERIC_MASK
,
"C"
,
NULL
)
;
double
d
;
locale_t
oldloc
=
uselocale
(
loc
)
;
strcpy
(
dup
,
str
);
double
res
=
strtod
(
str
,
end
);
ptr
=
strchr
(
dup
,
','
);
if
(
loc
!=
(
locale_t
)
0
)
if
(
ptr
!=
NULL
)
{
*
ptr
=
'\0'
;
uselocale
(
oldloc
);
freelocale
(
loc
);
d
=
strtod
(
dup
,
&
ptr
);
}
if
(
end
!=
NULL
)
return
res
;
*
end
=
(
char
*
)
&
str
[
ptr
-
dup
];
return
d
;
}
}
/**
/**
...
...
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