diff options
author | Stephen Dolan <mu@netsoc.tcd.ie> | 2012-09-18 17:44:43 +0100 |
---|---|---|
committer | Stephen Dolan <mu@netsoc.tcd.ie> | 2012-09-18 17:44:43 +0100 |
commit | a4eea165bbab6d13f89b59707e835d58b7014a66 (patch) | |
tree | b99ee5dde8540f8dbe5de3d87b99e04ac4dd2673 /jv_dtoa.h | |
parent | 25cbab056b1f73e96b636c88779a92400d92dc15 (diff) |
Move everything around - delete old Haskell code, clean up build.
Diffstat (limited to 'jv_dtoa.h')
-rw-r--r-- | jv_dtoa.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/jv_dtoa.h b/jv_dtoa.h new file mode 100644 index 00000000..3bafcf47 --- /dev/null +++ b/jv_dtoa.h @@ -0,0 +1,22 @@ +#ifndef JV_DTOA_H +#define JV_DTOA_H +#define Kmax 7 + +struct Bigint; +struct dtoa_context { + struct Bigint *freelist[Kmax+1]; + struct Bigint *p5s; +}; + +void jvp_dtoa_context_init(struct dtoa_context* ctx); +void jvp_dtoa_context_free(struct dtoa_context* ctx); + +double jvp_strtod(struct dtoa_context* C, const char* s, char** se); + + +char* jvp_dtoa(struct dtoa_context* C, double dd, int mode, int ndigits, int *decpt, int *sign, char **rve); +void jvp_freedtoa(struct dtoa_context* C, char *s); + +#define JVP_DTOA_FMT_MAX_LEN 32 +char* jvp_dtoa_fmt(struct dtoa_context* C, register char *b, double x); +#endif |