nfs-ganesha 1.4
Functions

parse_type.c File Reference

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

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <math.h>
#include "parse_type.h"

Go to the source code of this file.

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.c: 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.c.


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.