Xen Test Framework
Macros | Functions
vsnprintf.c File Reference
#include <arch/div.h>
#include <xtf/libc.h>
#include <xtf/compiler.h>
+ Include dependency graph for vsnprintf.c:

Go to the source code of this file.

Macros

#define LEFT   (1u << 0)
 
#define PLUS   (1u << 1)
 
#define SPACE   (1u << 2)
 
#define ALTERNATE   (1u << 3)
 
#define ZERO   (1u << 4)
 
#define UPPER   (1u << 5)
 
#define SIGNED   (1u << 6)
 
#define PUT(c)
 

Functions

static int isdigit (int c)
 
static int fmt_int (const char **fmt)
 
char * fmt_number (char *str, char *end, long long val, unsigned int base, int width, int precision, unsigned int flags)
 
char * fmt_string (char *str, char *end, const char *val, int width, int precision, unsigned int flags)
 
static char * pointer (char *str, char *end, const char **fmt_ptr, const void *arg, int width, int precision, unsigned int flags)
 
int vsnprintf_internal (char *buf, size_t size, const char *fmt, va_list args, unsigned int caller_flags)
 

Macro Definition Documentation

◆ LEFT

#define LEFT   (1u << 0)

Definition at line 42 of file vsnprintf.c.

◆ PLUS

#define PLUS   (1u << 1)

Definition at line 43 of file vsnprintf.c.

◆ SPACE

#define SPACE   (1u << 2)

Definition at line 44 of file vsnprintf.c.

◆ ALTERNATE

#define ALTERNATE   (1u << 3)

Definition at line 45 of file vsnprintf.c.

◆ ZERO

#define ZERO   (1u << 4)

Definition at line 46 of file vsnprintf.c.

◆ UPPER

#define UPPER   (1u << 5)

Definition at line 48 of file vsnprintf.c.

◆ SIGNED

#define SIGNED   (1u << 6)

Definition at line 49 of file vsnprintf.c.

◆ PUT

#define PUT (   c)
Value:
({ if ( str < end ) \
*str = (c); \
++str; \
})
static unsigned int str(void)
Definition: lib.h:366

Definition at line 53 of file vsnprintf.c.

Function Documentation

◆ isdigit()

static int isdigit ( int  c)
static

Definition at line 7 of file vsnprintf.c.

+ Here is the caller graph for this function:

◆ fmt_int()

static int fmt_int ( const char **  fmt)
static

Definition at line 59 of file vsnprintf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fmt_number()

char * fmt_number ( char *  str,
char *  end,
long long  val,
unsigned int  base,
int  width,
int  precision,
unsigned int  flags 
)

Definition at line 73 of file vsnprintf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fmt_string()

char * fmt_string ( char *  str,
char *  end,
const char *  val,
int  width,
int  precision,
unsigned int  flags 
)

Definition at line 171 of file vsnprintf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pointer()

static char * pointer ( char *  str,
char *  end,
const char **  fmt_ptr,
const void *  arg,
int  width,
int  precision,
unsigned int  flags 
)
static

Definition at line 201 of file vsnprintf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vsnprintf_internal()

int vsnprintf_internal ( char *  buf,
size_t  size,
const char *  fmt,
va_list  args,
unsigned int  caller_flags 
)

Definition at line 276 of file vsnprintf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: