nfs-ganesha 1.4
Defines | Functions

parse_type.h File Reference

parse_type.h: transform number to string This file provide function to transform real and bigint to a string and conversely. More...

Go to the source code of this file.

Defines

#define PRINT_LEN   20

Functions

int real2str (char *str, double num)
int str2real (double *pnum, char *str)
int big2str (char *str, int64_t num)
int str2big (int64_t *pnum, char *str)

Detailed Description

parse_type.h: transform number to string This file provide function to transform real and bigint to a string and conversely.

Author:
Cédric CABESSA

Definition in file parse_type.h.


Define Documentation

#define PRINT_LEN   20

max length of the output string

Definition at line 14 of file parse_type.h.


Function Documentation

int big2str ( char *  str,
int64_t  num 
)

Definition at line 47 of file parse_type.c.

int real2str ( char *  str,
double  num 
)

Convert a number to string

Parameters:
strpointer on the output string.
numinput number.
Returns:
0 on success.

Definition at line 25 of file parse_type.c.

int str2big ( int64_t pnum,
char *  str 
)

Definition at line 54 of file parse_type.c.

int str2real ( double *  pnum,
char *  str 
)

Convert a string to a number

Parameters:
pnumpointer on the output number.
strinput string.
Returns:
0 on success.

Definition at line 40 of file parse_type.c.