23#define reset_color "\033[37m"
24#define red_color "\x1b[91m"
25#define yellow_color "\x1b[93m"
26#define blue_color "\x1b[36m"
27#define green_color "\x1b[32m"
28#define orange_color "\x1b[38;5;208m"
38extern string last_filename;
39extern string last_filename;
40extern string last_print_file;
41extern string last_print_func;
42extern int32 last_print_line;
43extern bool enable_logging;
45#define printf(fmt, ...) \
46 printf_internal(__FILE__, __func__, __LINE__, fmt, ##__VA_ARGS__)
48#define printfnoln(fmt, ...) \
49 printfnoln_internal(__FILE__, __func__, __LINE__, fmt, ##__VA_ARGS__)
51#define eprintf(fmt, ...) \
52 eprintf_internal(__FILE__, __func__, __LINE__, fmt, ##__VA_ARGS__)
63void warn(cstring message, cstring file);
73void error(cstring message, cstring file);
83void info(cstring message, cstring file);
93void done(cstring message, cstring file);
167void vprintf_internal(stream_t stream, cstring file, cstring func, int64 line,
bool newline, cstring format, va_list argp);
178int vsnprintf(
char *buf,
size_t size,
const char *fmt, va_list args);
188int snprintf(
char *buf,
size_t size,
const char *fmt, ...);
214void print_bitmap(
int x,
int y,
int w,
int h,
bool* pixels, int32 color);
This is a basic header files with FrostWing specific short forms and basically a good for life header...
void vprintf_internal(stream_t stream, cstring file, cstring func, int64 line, bool newline, cstring format, va_list argp)
Core printf implementation used internally by both printf_internal and printfnoln_internal.
void printf_internal(cstring file, cstring func, int64 line, cstring format,...)
Prints with formatting supported.
void error(cstring message, cstring file)
Display an error message.
void print_bitmap(int x, int y, int w, int h, bool *pixels, int32 color)
void kprint(cstring msg)
RAW kernel print function for plain strings. (No Formatter & No Streams).
void print(cstring s)
Plain print function, goes through the stream.
void printfnoln_internal(cstring file, cstring func, int64 line, cstring format,...)
Prints with formatting supported (does not add an new line).
void printbin(uint8_t value)
Prints a value in binary format.
int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
Formats a string into a buffer using a va_list.
void putc(char c)
Prints a char, using vput(char c); Replaces '' with "\b \b".
void done(cstring message, cstring file)
Display a success message.
void warn(cstring message, cstring file)
Display a warning message.
void vputc(char c)
Prints a char though the standard streams.
int snprintf(char *buf, size_t size, const char *fmt,...)
Formats a string into a fixed-size buffer.
void info(cstring message, cstring file)
Display an informational message.
Unix like standard streams.
The header file for strings.c.