diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2014-09-01 17:05:20 +0200 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2014-09-02 10:16:36 +0100 |
commit | dcac166e4a6af00ae18852a1cca002ae0b5dd818 (patch) | |
tree | cb414c380d2ed5823c14e9bb4a9d6059a32120c8 /include | |
parent | 84c616094639d38d076aba71bf8283b532f434f6 (diff) | |
download | mupdf-dcac166e4a6af00ae18852a1cca002ae0b5dd818.tar.xz |
Add locale-independent number formatting and parsing functions.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/fitz/string.h | 13 | ||||
-rw-r--r-- | include/mupdf/fitz/system.h | 1 |
2 files changed, 13 insertions, 1 deletions
diff --git a/include/mupdf/fitz/string.h b/include/mupdf/fitz/string.h index 12a189dd..ee5f85a7 100644 --- a/include/mupdf/fitz/string.h +++ b/include/mupdf/fitz/string.h @@ -84,4 +84,17 @@ int fz_runetochar(char *str, int rune); */ int fz_runelen(int rune); +/* + fz_strtod: Locale-independent implementation of strtod(). +*/ +double fz_strtod(const char *s, char **es); + +/* + fz_dtoa: Compute decimal integer m, exp such that: + f = m * 10^exp + m is as short as possible without losing exactness + Assumes special cases (NaN, +Inf, -Inf) have been handled. +*/ +void fz_dtoa(double f, char *s, int *exp, int *neg, int *ns); + #endif diff --git a/include/mupdf/fitz/system.h b/include/mupdf/fitz/system.h index bf339eb4..5df0c506 100644 --- a/include/mupdf/fitz/system.h +++ b/include/mupdf/fitz/system.h @@ -67,7 +67,6 @@ #if _MSC_VER < 1800 #define va_copy(a, oa) do { a=oa; } while (0) #define va_copy_end(a) do {} while(0) -#define strtof(a,b) ((float)strtod((a),(b))) #else #define va_copy_end(a) va_end(a) #endif |