Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
71587594
Commit
71587594
authored
Apr 14, 2009
by
Cyril Mathé
Committed by
Rémi Denis-Courmont
Apr 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a us_strtof function to prevent some problem
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
d385b8dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
0 deletions
+22
-0
include/vlc_charset.h
include/vlc_charset.h
+1
-0
src/libvlccore.sym
src/libvlccore.sym
+1
-0
src/text/charset.c
src/text/charset.c
+20
-0
No files found.
include/vlc_charset.h
View file @
71587594
...
...
@@ -111,6 +111,7 @@ static inline char *FromLatin1 (const char *latin)
VLC_EXPORT
(
const
char
*
,
GetFallbackEncoding
,
(
void
)
LIBVLC_USED
);
VLC_EXPORT
(
double
,
us_strtod
,
(
const
char
*
,
char
**
)
LIBVLC_USED
);
VLC_EXPORT
(
float
,
us_strtof
,
(
const
char
*
,
char
**
)
LIBVLC_USED
);
VLC_EXPORT
(
double
,
us_atof
,
(
const
char
*
)
LIBVLC_USED
);
VLC_EXPORT
(
int
,
us_asprintf
,
(
char
**
,
const
char
*
,
...
)
LIBVLC_USED
);
...
...
src/libvlccore.sym
View file @
71587594
...
...
@@ -385,6 +385,7 @@ update_WaitDownload
us_asprintf
us_atof
us_strtod
us_strtof
utf8_fopen
utf8_fprintf
utf8_loaddir
...
...
src/text/charset.c
View file @
71587594
...
...
@@ -91,6 +91,26 @@ double us_strtod( const char *str, char **end )
return
res
;
}
/**
* us_strtof() has the same prototype as ANSI C strtof() but it uses the
* POSIX/C decimal format, regardless of the current numeric locale.
*/
float
us_strtof
(
const
char
*
str
,
char
**
end
)
{
locale_t
loc
=
newlocale
(
LC_NUMERIC_MASK
,
"C"
,
NULL
);
locale_t
oldloc
=
uselocale
(
loc
);
float
res
=
strtof
(
str
,
end
);
if
(
loc
!=
(
locale_t
)
0
)
{
uselocale
(
oldloc
);
freelocale
(
loc
);
}
return
res
;
}
/**
* us_atof() has the same prototype as ANSI C atof() but it expects a dot
* as decimal separator, regardless of the system locale.
...
...
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