summaryrefslogtreecommitdiffstats
path: root/libass/ass_utils.h
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2010-01-03 14:54:02 +0100
committerGrigori Goronzy <greg@blackbox>2010-01-05 23:52:02 +0100
commit9826dd0f7cc53881de23fac317a7190e47f78401 (patch)
treec97999e1eafe6fdbc7747921ffc1c77d28561ab6 /libass/ass_utils.h
parent4f791cc8c8e2f0a5ab8bd8fbd1c85d007a17830e (diff)
downloadlibass-9826dd0f7cc53881de23fac317a7190e47f78401.tar.bz2
libass-9826dd0f7cc53881de23fac317a7190e47f78401.tar.xz
Replace strtod with locale-independent strtod
strtod respects the locale and in some locales, the decimal separator is not a point, leading to parsing errors in tags like \pos(23.4,5), which are perfectly valid. As there isn't a really portable way to use a particular locale just for one call to strtod, reimplement it. The implementation was taken from the 1.8 branch of Ruby.
Diffstat (limited to 'libass/ass_utils.h')
-rw-r--r--libass/ass_utils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libass/ass_utils.h b/libass/ass_utils.h
index bade5780..f5c68e96 100644
--- a/libass/ass_utils.h
+++ b/libass/ass_utils.h
@@ -59,6 +59,9 @@ void *ass_guess_buffer_cp(ASS_Library *library, unsigned char *buffer,
char *fallback);
#endif
+/* defined in ass_strtod.c */
+double ass_strtod(const char *string, char **endPtr);
+
static inline int d6_to_int(int x)
{
return (x + 32) >> 6;