Xen Test Framework
Macros | Functions
libc.h File Reference
#include <xtf/types.h>
#include <xtf/compiler.h>
+ Include dependency graph for libc.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define strlen(s)   __builtin_strlen(s)
 
#define strcpy(d, s)   __builtin_strcpy(d, s)
 
#define strncpy(d, s, n)   __builtin_strncpy(d, s, n)
 
#define strcmp(s1, s2)   __builtin_strcmp(s1, s2)
 
#define strncmp(s1, s2, n)   __builtin_strncmp(s1, s2, n)
 
#define memset(d, c, n)   __builtin_memset(d, c, n)
 
#define memcpy(d, s, n)   __builtin_memcpy(d, s, n)
 
#define memcmp(s1, s2, n)   __builtin_memcmp(s1, s2, n)
 
#define LF_TO_CRLF   (1u << 7)
 

Functions

size_t strlen (const char *str)
 
char * strcpy (char *dst, const char *src)
 
char * strncpy (char *dst, const char *src, size_t n)
 
int strcmp (const char *s1, const char *s2)
 
int strncmp (const char *s1, const char *s2, size_t n)
 
void * memset (void *s, int c, size_t n)
 
void * memcpy (void *dst, const void *src, size_t n)
 
int memcmp (const void *s1, const void *s2, size_t n)
 
size_t strnlen (const char *str, size_t max)
 
int vsnprintf_internal (char *buf, size_t size, const char *fmt, va_list args, unsigned int flags)
 
static int vsnprintf (char *buf, size_t size, const char *fmt, va_list args)
 
int snprintf (char *buf, size_t size, 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)
 
bool arch_fmt_pointer (char **str, char *end, const char **fmt_ptr, const void *arg, int width, int precision, unsigned int flags)
 

Macro Definition Documentation

◆ strlen

#define strlen (   s)    __builtin_strlen(s)

Definition at line 18 of file libc.h.

◆ strcpy

#define strcpy (   d,
 
)    __builtin_strcpy(d, s)

Definition at line 21 of file libc.h.

◆ strncpy

#define strncpy (   d,
  s,
 
)    __builtin_strncpy(d, s, n)

Definition at line 24 of file libc.h.

◆ strcmp

#define strcmp (   s1,
  s2 
)    __builtin_strcmp(s1, s2)

Definition at line 27 of file libc.h.

◆ strncmp

#define strncmp (   s1,
  s2,
 
)    __builtin_strncmp(s1, s2, n)

Definition at line 30 of file libc.h.

◆ memset

#define memset (   d,
  c,
 
)    __builtin_memset(d, c, n)

Definition at line 33 of file libc.h.

◆ memcpy

#define memcpy (   d,
  s,
 
)    __builtin_memcpy(d, s, n)

Definition at line 36 of file libc.h.

◆ memcmp

#define memcmp (   s1,
  s2,
 
)    __builtin_memcmp(s1, s2, n)

Definition at line 39 of file libc.h.

◆ LF_TO_CRLF

#define LF_TO_CRLF   (1u << 7)

Definition at line 48 of file libc.h.

Function Documentation

◆ strlen()

size_t strlen ( const char *  str)

Definition at line 3 of file string.c.

+ Here is the call graph for this function:

◆ strcpy()

char* strcpy ( char *  dst,
const char *  src 
)

Definition at line 23 of file string.c.

◆ strncpy()

char* strncpy ( char *  dst,
const char *  src,
size_t  n 
)

Definition at line 33 of file string.c.

◆ strcmp()

int strcmp ( const char *  s1,
const char *  s2 
)

Definition at line 47 of file string.c.

◆ strncmp()

int strncmp ( const char *  s1,
const char *  s2,
size_t  n 
)

Definition at line 59 of file string.c.

◆ memset()

void* memset ( void *  s,
int  c,
size_t  n 
)

Definition at line 68 of file string.c.

◆ memcpy()

void* memcpy ( void *  dst,
const void *  src,
size_t  n 
)

Definition at line 78 of file string.c.

◆ memcmp()

int memcmp ( const void *  s1,
const void *  s2,
size_t  n 
)

Definition at line 89 of file string.c.

◆ strnlen()

size_t strnlen ( const char *  str,
size_t  max 
)

Definition at line 13 of file string.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  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:

◆ vsnprintf()

static int vsnprintf ( char *  buf,
size_t  size,
const char *  fmt,
va_list  args 
)
inlinestatic

Definition at line 54 of file libc.h.

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

◆ snprintf()

int snprintf ( char *  buf,
size_t  size,
const char *  fmt,
  ... 
)

Definition at line 3 of file stdio.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:

◆ arch_fmt_pointer()

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

Definition at line 91 of file decode.c.

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