File: jv_dtoa.h

package info (click to toggle)
jq 1.4-2.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 1,216 kB
  • sloc: ansic: 9,370; yacc: 588; lex: 175; makefile: 95; sh: 56; python: 21
file content (22 lines) | stat: -rw-r--r-- 603 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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 64
char* jvp_dtoa_fmt(struct dtoa_context* C, register char *b, double x);
#endif