MicrOS
kernel_vfprintf.c File Reference
#include <stdarg.h>
#include "stdlib.h"
#include "string.h"
#include "math.h"
#include "stdio.h"
#include "stdbool.h"
#include "stdint.h"
#include "../../../memory/heap/heap.h"

Macros

#define FLAGS_ZEROPAD   (1U << 0U)
 
#define FLAGS_LEFT   (1U << 1U)
 
#define FLAGS_PLUS   (1U << 2U)
 
#define FLAGS_SPACE   (1U << 3U)
 
#define FLAGS_HASH   (1U << 4U)
 
#define FLAGS_UPPERCASE   (1U << 5U)
 
#define FLAGS_CHAR   (1U << 6U)
 
#define FLAGS_SHORT   (1U << 7U)
 
#define FLAGS_LONG   (1U << 8U)
 
#define FLAGS_LONG_LONG   (1U << 9U)
 
#define FLAGS_PRECISION   (1U << 10U)
 
#define FLAGS_LONG_DOUBLE   (1U << 11U)
 

Typedefs

typedef long long int i64
 
typedef unsigned long long int u64
 

Functions

bool _kernel_is_digit (char c)
 
int _kernel_max (int a, int b)
 
unsigned int _kernel_unsigned_number_len (u64 n, int base)
 
unsigned int _kernel_fnumber_len (long double n)
 
char * _kernel_itoa (u64 number, char *buffer, int base, bool uppercase, int size)
 
char * _kernel_ftoa (long double number, char *buffer, unsigned short flags, int precision)
 
void _kernel_put_unsigned_integer (FILE *stream, unsigned int *put_idx, u64 number, unsigned short flags, int base, int width, int precision)
 
void _kernel_put_signed_integer (FILE *stream, unsigned int *put_idx, i64 number, unsigned short flags, int base, int width, int precision)
 
void _kernel_put_float (FILE *stream, unsigned int *put_idx, long double number, unsigned short flags, int width, int precision)
 
void _kernel_put_scientific_notation (FILE *stream, unsigned int *put_idx, long double number, unsigned short flags, int width, int precision)
 
unsigned int _kernel_parse_number_field (const char **str)
 
int kernel_vfprintf (FILE *stream, const char *format, va_list arg)
 

Macro Definition Documentation

◆ FLAGS_CHAR

#define FLAGS_CHAR   (1U << 6U)

◆ FLAGS_HASH

#define FLAGS_HASH   (1U << 4U)

◆ FLAGS_LEFT

#define FLAGS_LEFT   (1U << 1U)

◆ FLAGS_LONG

#define FLAGS_LONG   (1U << 8U)

◆ FLAGS_LONG_DOUBLE

#define FLAGS_LONG_DOUBLE   (1U << 11U)

◆ FLAGS_LONG_LONG

#define FLAGS_LONG_LONG   (1U << 9U)

◆ FLAGS_PLUS

#define FLAGS_PLUS   (1U << 2U)

◆ FLAGS_PRECISION

#define FLAGS_PRECISION   (1U << 10U)

◆ FLAGS_SHORT

#define FLAGS_SHORT   (1U << 7U)

◆ FLAGS_SPACE

#define FLAGS_SPACE   (1U << 3U)

◆ FLAGS_UPPERCASE

#define FLAGS_UPPERCASE   (1U << 5U)

◆ FLAGS_ZEROPAD

#define FLAGS_ZEROPAD   (1U << 0U)

Typedef Documentation

◆ i64

typedef long long int i64

◆ u64

typedef unsigned long long int u64

Function Documentation

◆ _kernel_fnumber_len()

unsigned int _kernel_fnumber_len ( long double  n)

◆ _kernel_ftoa()

char* _kernel_ftoa ( long double  number,
char *  buffer,
unsigned short  flags,
int  precision 
)

◆ _kernel_is_digit()

bool _kernel_is_digit ( char  c)

◆ _kernel_itoa()

char* _kernel_itoa ( u64  number,
char *  buffer,
int  base,
bool  uppercase,
int  size 
)

◆ _kernel_max()

int _kernel_max ( int  a,
int  b 
)

◆ _kernel_parse_number_field()

unsigned int _kernel_parse_number_field ( const char **  str)

◆ _kernel_put_float()

void _kernel_put_float ( FILE stream,
unsigned int *  put_idx,
long double  number,
unsigned short  flags,
int  width,
int  precision 
)

◆ _kernel_put_scientific_notation()

void _kernel_put_scientific_notation ( FILE stream,
unsigned int *  put_idx,
long double  number,
unsigned short  flags,
int  width,
int  precision 
)

◆ _kernel_put_signed_integer()

void _kernel_put_signed_integer ( FILE stream,
unsigned int *  put_idx,
i64  number,
unsigned short  flags,
int  base,
int  width,
int  precision 
)

◆ _kernel_put_unsigned_integer()

void _kernel_put_unsigned_integer ( FILE stream,
unsigned int *  put_idx,
u64  number,
unsigned short  flags,
int  base,
int  width,
int  precision 
)

◆ _kernel_unsigned_number_len()

unsigned int _kernel_unsigned_number_len ( u64  n,
int  base 
)

◆ kernel_vfprintf()

int kernel_vfprintf ( FILE stream,
const char *  format,
va_list  arg 
)