FD.io VPP  v17.01.1-3-gc6833f8
Vector Packet Processing
format.c File Reference
+ Include dependency graph for format.c:

Go to the source code of this file.

Data Structures

struct  format_integer_options_t
 
struct  format_info_t
 

Macros

#define f64_down(f, sign, expon, fraction)
 

Functions

static u8format_integer (u8 *s, u64 number, format_integer_options_t *options)
 
static u8format_float (u8 *s, f64 x, uword n_digits_to_print, uword output_style)
 
static u8justify (u8 *s, format_info_t *fi, uword s_len_orig)
 
static u8do_percent (u8 **_s, u8 *fmt, va_list *va)
 
u8va_format (u8 *s, const char *fmt, va_list *va)
 
u8format (u8 *s, const char *fmt,...)
 
word va_fformat (FILE *f, char *fmt, va_list *va)
 
word fformat (FILE *f, char *fmt,...)
 
word fdformat (int fd, char *fmt,...)
 
static f64 f64_up (uword sign, word expon, u64 fraction)
 
static f64 f64_precision (int base2_expon)
 
static f64 times_power_of_ten (f64 x, int n)
 
static f64 normalize (f64 x, word *expon_return, f64 *prec_return)
 
static u8add_some_zeros (u8 *s, uword n_zeros)
 

Macro Definition Documentation

#define f64_down (   f,
  sign,
  expon,
  fraction 
)
Value:
do { \
union { u64 u; f64 f; } _f64_down_tmp; \
_f64_down_tmp.f = (f); \
(sign) = (_f64_down_tmp.u >> 63); \
(expon) = ((_f64_down_tmp.u >> 52) & 0x7ff) - 1023; \
(fraction) = ((_f64_down_tmp.u << 12) >> 12) | ((u64) 1 << 52); \
} while (0)
unsigned long u64
Definition: types.h:89
double f64
Definition: types.h:142

Definition at line 540 of file format.c.

Function Documentation

static u8* add_some_zeros ( u8 s,
uword  n_zeros 
)
static

Definition at line 669 of file format.c.

+ Here is the caller graph for this function:

static u8* do_percent ( u8 **  _s,
u8 fmt,
va_list *  va 
)
static

Definition at line 154 of file format.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static f64 f64_precision ( int  base2_expon)
static

Definition at line 575 of file format.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static f64 f64_up ( uword  sign,
word  expon,
u64  fraction 
)
static

Definition at line 551 of file format.c.

+ Here is the caller graph for this function:

word fdformat ( int  fd,
char *  fmt,
  ... 
)

Definition at line 466 of file format.c.

+ Here is the call graph for this function:

word fformat ( FILE *  f,
char *  fmt,
  ... 
)

Definition at line 452 of file format.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format ( u8 s,
const char *  fmt,
  ... 
)

Definition at line 418 of file format.c.

+ Here is the call graph for this function:

static u8 * format_float ( u8 s,
f64  x,
uword  n_digits_to_print,
uword  output_style 
)
static

Definition at line 682 of file format.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8 * format_integer ( u8 s,
u64  number,
format_integer_options_t options 
)
static

Definition at line 484 of file format.c.

+ Here is the caller graph for this function:

static u8* justify ( u8 s,
format_info_t fi,
uword  s_len_orig 
)
static

Definition at line 103 of file format.c.

+ Here is the caller graph for this function:

static f64 normalize ( f64  x,
word expon_return,
f64 prec_return 
)
static

Definition at line 625 of file format.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static f64 times_power_of_ten ( f64  x,
int  n 
)
static

Definition at line 598 of file format.c.

+ Here is the caller graph for this function:

word va_fformat ( FILE *  f,
char *  fmt,
va_list *  va 
)

Definition at line 428 of file format.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* va_format ( u8 s,
const char *  fmt,
va_list *  va 
)

Definition at line 386 of file format.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: