PatchworkOS  19e446b
A non-POSIX operating system.
Loading...
Searching...
No Matches
vsnprintf.c File Reference
#include <stdio.h>
#include "common/print.h"
Include dependency graph for vsnprintf.c:

Go to the source code of this file.

Macros

#define _PRINT_WRITE(ctx, buffer, count)
 
#define _PRINT_FILL(ctx, c, count)
 

Functions

int vsnprintf (char *_RESTRICT s, size_t n, const char *_RESTRICT format, va_list arg)
 

Macro Definition Documentation

◆ _PRINT_WRITE

#define _PRINT_WRITE (   ctx,
  buffer,
  count 
)
Value:
({ \
char* str = (char*)(ctx)->data; \
size_t i; \
for (i = 0; i < (size_t)(count); i++) \
{ \
str[i] = (buffer)[i]; \
} \
str += i; \
(ctx)->data = str; \
(int)i; \
})
EFI_PHYSICAL_ADDRESS buffer
Definition main.c:237
static fd_t data
Definition dwm.c:21
static atomic_long count
Definition main.c:11
__SIZE_TYPE__ size_t
Definition size_t.h:4

Definition at line 3 of file vsnprintf.c.

◆ _PRINT_FILL

#define _PRINT_FILL (   ctx,
  c,
  count 
)
Value:
({ \
char* str = (char*)(ctx)->data; \
size_t i; \
for (i = 0; i < (size_t)(count); i++) \
{ \
str[i] = (c); \
} \
str += i; \
(ctx)->data = str; \
(int)i; \
})

Definition at line 16 of file vsnprintf.c.

Function Documentation

◆ vsnprintf()

int vsnprintf ( char *_RESTRICT  s,
size_t  n,
const char *_RESTRICT  format,
va_list  arg 
)

Definition at line 31 of file vsnprintf.c.

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