libgpac
Documentation of the core library of GPAC
Loading...
Searching...
No Matches
dtoa.h File Reference
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  JSDTOATempMem
 
struct  JSATODTempMem
 

Macros

#define JS_DTOA_MAX_DIGITS   101
 
#define JS_DTOA_FORMAT_FREE   (0 << 0)
 
#define JS_DTOA_FORMAT_FIXED   (1 << 0)
 
#define JS_DTOA_FORMAT_FRAC   (2 << 0)
 
#define JS_DTOA_FORMAT_MASK   (3 << 0)
 
#define JS_DTOA_EXP_AUTO   (0 << 2)
 
#define JS_DTOA_EXP_ENABLED   (1 << 2)
 
#define JS_DTOA_EXP_DISABLED   (2 << 2)
 
#define JS_DTOA_EXP_MASK   (3 << 2)
 
#define JS_DTOA_MINUS_ZERO   (1 << 4) /* show the minus sign for -0 */
 
#define JS_ATOD_INT_ONLY   (1 << 0)
 
#define JS_ATOD_ACCEPT_BIN_OCT   (1 << 1)
 
#define JS_ATOD_ACCEPT_LEGACY_OCTAL   (1 << 2)
 
#define JS_ATOD_ACCEPT_UNDERSCORES   (1 << 3)
 

Functions

int js_dtoa_max_len (double d, int radix, int n_digits, int flags)
 
int js_dtoa (char *buf, double d, int radix, int n_digits, int flags, JSDTOATempMem *tmp_mem)
 
double js_atod (const char *str, const char **pnext, int radix, int flags, JSATODTempMem *tmp_mem)
 
size_t u32toa (char *buf, uint32_t n)
 
size_t i32toa (char *buf, int32_t n)
 
size_t u64toa (char *buf, uint64_t n)
 
size_t i64toa (char *buf, int64_t n)
 
size_t u64toa_radix (char *buf, uint64_t n, unsigned int radix)
 
size_t i64toa_radix (char *buf, int64_t n, unsigned int radix)
 

Data Structure Documentation

◆ JSDTOATempMem

struct JSDTOATempMem
Data Fields
uint64_t mem[37]

◆ JSATODTempMem

struct JSATODTempMem
Data Fields
uint64_t mem[27]

Macro Definition Documentation

◆ JS_DTOA_MAX_DIGITS

#define JS_DTOA_MAX_DIGITS   101

◆ JS_DTOA_FORMAT_FREE

#define JS_DTOA_FORMAT_FREE   (0 << 0)

◆ JS_DTOA_FORMAT_FIXED

#define JS_DTOA_FORMAT_FIXED   (1 << 0)

◆ JS_DTOA_FORMAT_FRAC

#define JS_DTOA_FORMAT_FRAC   (2 << 0)

◆ JS_DTOA_FORMAT_MASK

#define JS_DTOA_FORMAT_MASK   (3 << 0)

◆ JS_DTOA_EXP_AUTO

#define JS_DTOA_EXP_AUTO   (0 << 2)

◆ JS_DTOA_EXP_ENABLED

#define JS_DTOA_EXP_ENABLED   (1 << 2)

◆ JS_DTOA_EXP_DISABLED

#define JS_DTOA_EXP_DISABLED   (2 << 2)

◆ JS_DTOA_EXP_MASK

#define JS_DTOA_EXP_MASK   (3 << 2)

◆ JS_DTOA_MINUS_ZERO

#define JS_DTOA_MINUS_ZERO   (1 << 4) /* show the minus sign for -0 */

◆ JS_ATOD_INT_ONLY

#define JS_ATOD_INT_ONLY   (1 << 0)

◆ JS_ATOD_ACCEPT_BIN_OCT

#define JS_ATOD_ACCEPT_BIN_OCT   (1 << 1)

◆ JS_ATOD_ACCEPT_LEGACY_OCTAL

#define JS_ATOD_ACCEPT_LEGACY_OCTAL   (1 << 2)

◆ JS_ATOD_ACCEPT_UNDERSCORES

#define JS_ATOD_ACCEPT_UNDERSCORES   (1 << 3)

Function Documentation

◆ js_dtoa_max_len()

int js_dtoa_max_len ( double  d,
int  radix,
int  n_digits,
int  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ js_dtoa()

int js_dtoa ( char *  buf,
double  d,
int  radix,
int  n_digits,
int  flags,
JSDTOATempMem tmp_mem 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ js_atod()

double js_atod ( const char *  str,
const char **  pnext,
int  radix,
int  flags,
JSATODTempMem tmp_mem 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ u32toa()

size_t u32toa ( char *  buf,
uint32_t  n 
)
+ Here is the caller graph for this function:

◆ i32toa()

size_t i32toa ( char *  buf,
int32_t  n 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ u64toa()

size_t u64toa ( char *  buf,
uint64_t  n 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ i64toa()

size_t i64toa ( char *  buf,
int64_t  n 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ u64toa_radix()

size_t u64toa_radix ( char *  buf,
uint64_t  n,
unsigned int  radix 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ i64toa_radix()

size_t i64toa_radix ( char *  buf,
int64_t  n,
unsigned int  radix 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function: