FD.io VPP  v18.10-34-gcce845e
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 const u8do_percent (u8 **_s, const 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,...)
 
void fformat_append_cr (FILE *ofp, const 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 552 of file format.c.

Function Documentation

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

Definition at line 681 of file format.c.

+ Here is the caller graph for this function:

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

Definition at line 155 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 587 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 563 of file format.c.

+ Here is the caller graph for this function:

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

Definition at line 478 of file format.c.

+ Here is the call graph for this function:

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

Definition at line 453 of file format.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fformat_append_cr ( FILE *  ofp,
const char *  fmt,
  ... 
)

Definition at line 467 of file format.c.

+ Here is the call graph for this function:

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

Definition at line 419 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 694 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 496 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 104 of file format.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 637 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 610 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 429 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 387 of file format.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: