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
71f0e10d
Commit
71f0e10d
authored
May 21, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused i18n_atof
parent
bb1fb263
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
47 deletions
+1
-47
include/vlc_charset.h
include/vlc_charset.h
+0
-1
src/test/i18n_atof.c
src/test/i18n_atof.c
+1
-11
src/text/charset.c
src/text/charset.c
+0
-35
No files found.
include/vlc_charset.h
View file @
71f0e10d
...
@@ -81,7 +81,6 @@ VLC_INTERNAL( bool, vlc_current_charset, ( char ** ) );
...
@@ -81,7 +81,6 @@ VLC_INTERNAL( bool, vlc_current_charset, ( char ** ) );
VLC_EXPORT
(
const
char
*
,
GetFallbackEncoding
,
(
void
)
);
VLC_EXPORT
(
const
char
*
,
GetFallbackEncoding
,
(
void
)
);
VLC_INTERNAL
(
double
,
i18n_atof
,
(
const
char
*
)
);
VLC_EXPORT
(
double
,
us_strtod
,
(
const
char
*
,
char
**
)
);
VLC_EXPORT
(
double
,
us_strtod
,
(
const
char
*
,
char
**
)
);
VLC_EXPORT
(
double
,
us_atof
,
(
const
char
*
)
);
VLC_EXPORT
(
double
,
us_atof
,
(
const
char
*
)
);
...
...
src/test/i18n_atof.c
View file @
71f0e10d
/*****************************************************************************
/*****************************************************************************
* i18n_atof.c: Test for
i18n
_atof
* i18n_atof.c: Test for
us
_atof
*****************************************************************************
*****************************************************************************
* Copyright (C) 2006 Rémi Denis-Courmont
* Copyright (C) 2006 Rémi Denis-Courmont
* $Id$
* $Id$
...
@@ -36,16 +36,6 @@ int main (void)
...
@@ -36,16 +36,6 @@ int main (void)
const
char
sharp9
[]
=
"999999#999999"
;
const
char
sharp9
[]
=
"999999#999999"
;
char
*
end
;
char
*
end
;
assert
(
i18n_atof
(
"0"
)
==
0
.);
assert
(
i18n_atof
(
"1"
)
==
1
.);
assert
(
i18n_atof
(
"1."
)
==
1
.);
assert
(
i18n_atof
(
"1,"
)
==
1
.);
assert
(
i18n_atof
(
"1#"
)
==
1
.);
assert
(
i18n_atof
(
dot9
)
==
999999
.
999999
);
assert
(
i18n_atof
(
comma9
)
==
999999
.
999999
);
assert
(
i18n_atof
(
sharp9
)
==
999999
.);
assert
(
i18n_atof
(
"invalid"
)
==
0
.);
assert
(
us_atof
(
"0"
)
==
0
.);
assert
(
us_atof
(
"0"
)
==
0
.);
assert
(
us_atof
(
"1"
)
==
1
.);
assert
(
us_atof
(
"1"
)
==
1
.);
assert
(
us_atof
(
"1."
)
==
1
.);
assert
(
us_atof
(
"1."
)
==
1
.);
...
...
src/text/charset.c
View file @
71f0e10d
...
@@ -377,41 +377,6 @@ char *vlc_fix_readdir( const char *psz_string )
...
@@ -377,41 +377,6 @@ char *vlc_fix_readdir( const char *psz_string )
}
}
static
double
i18n_strtod
(
const
char
*
str
,
char
**
end
)
{
char
*
end_buf
,
e
;
double
d
;
if
(
end
==
NULL
)
end
=
&
end_buf
;
d
=
strtod
(
str
,
end
);
e
=
**
end
;
if
((
e
==
','
)
||
(
e
==
'.'
))
{
char
dup
[
strlen
(
str
)
+
1
];
strcpy
(
dup
,
str
);
if
(
dup
==
NULL
)
return
d
;
dup
[
*
end
-
str
]
=
(
e
==
','
)
?
'.'
:
','
;
d
=
strtod
(
dup
,
end
);
}
return
d
;
}
/**
* i18n_atof() has the same prototype as ANSI C atof() but it accepts
* either decimal separator when deserializing the string to a float number,
* independant of the local computer setting.
*/
double
i18n_atof
(
const
char
*
str
)
{
return
i18n_strtod
(
str
,
NULL
);
}
/**
/**
* 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 expects
* a dot as decimal separator regardless of the system locale.
* 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