#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <unistd.h>
#include "../../include/utils/colors.h"
Go to the source code of this file.
|
char * | get_ansi_color_scheme (COLORS color) |
| returns an ansi color string to be used with printf More...
|
|
char * | format_colored (COLORS color, char *message) |
| returns a char * with the message formatted with ansi colors More...
|
|
void | print_colored (COLORS color, char *message) |
| prints message to stdout with the given color More...
|
|
int | write_colored (COLORS color, int file_descriptor, char *message) |
| writes a message to fh with the given color For "sync writes" and to always flush logs to disk immediately set do_flush to true returns 0 if no error, returns 1 if error More...
|
|
◆ format_colored()
char* format_colored |
( |
COLORS |
color, |
|
|
char * |
message |
|
) |
| |
returns a char *
with the message formatted with ansi colors
Definition at line 31 of file colors.c.
◆ get_ansi_color_scheme()
char* get_ansi_color_scheme |
( |
COLORS |
color | ) |
|
returns an ansi color string to be used with printf
Definition at line 8 of file colors.c.
◆ print_colored()
void print_colored |
( |
COLORS |
color, |
|
|
char * |
message |
|
) |
| |
prints message to stdout with the given color
Definition at line 43 of file colors.c.
◆ write_colored()
int write_colored |
( |
COLORS |
color, |
|
|
int |
file_descriptor, |
|
|
char * |
message |
|
) |
| |
writes a message to fh with the given color For "sync writes" and to always flush logs to disk immediately set do_flush to true returns 0 if no error, returns 1 if error
Definition at line 47 of file colors.c.