|
18 | 18 | #include <string.h>
|
19 | 19 | #include <stdio.h>
|
20 | 20 |
|
| 21 | +// Define color codes for output |
| 22 | +#define FOSSIL_IO_COLOR_RESET "\033[0m" |
| 23 | +#define FOSSIL_IO_COLOR_RED "\033[31m" |
| 24 | +#define FOSSIL_IO_COLOR_GREEN "\033[32m" |
| 25 | +#define FOSSIL_IO_COLOR_YELLOW "\033[33m" |
| 26 | +#define FOSSIL_IO_COLOR_BLUE "\033[34m" |
| 27 | +#define FOSSIL_IO_COLOR_MAGENTA "\033[35m" |
| 28 | +#define FOSSIL_IO_COLOR_CYAN "\033[36m" |
| 29 | +#define FOSSIL_IO_COLOR_WHITE "\033[37m" |
| 30 | + |
| 31 | +// Bright colors |
| 32 | +#define FOSSIL_IO_COLOR_BRIGHT_RED "\033[91m" |
| 33 | +#define FOSSIL_IO_COLOR_BRIGHT_GREEN "\033[92m" |
| 34 | +#define FOSSIL_IO_COLOR_BRIGHT_YELLOW "\033[93m" |
| 35 | +#define FOSSIL_IO_COLOR_BRIGHT_BLUE "\033[94m" |
| 36 | +#define FOSSIL_IO_COLOR_BRIGHT_MAGENTA "\033[95m" |
| 37 | +#define FOSSIL_IO_COLOR_BRIGHT_CYAN "\033[96m" |
| 38 | +#define FOSSIL_IO_COLOR_BRIGHT_WHITE "\033[97m" |
| 39 | + |
| 40 | +// Define text attributes |
| 41 | +#define FOSSIL_IO_ATTR_BOLD "\033[1m" |
| 42 | +#define FOSSIL_IO_ATTR_UNDERLINE "\033[4m" |
| 43 | +#define FOSSIL_IO_ATTR_REVERSED "\033[7m" |
| 44 | +#define FOSSIL_IO_ATTR_BLINK "\033[5m" |
| 45 | +#define FOSSIL_IO_ATTR_HIDDEN "\033[8m" |
| 46 | +#define FOSSIL_IO_ATTR_NORMAL "\033[22m" // For reverting to normal text |
| 47 | + |
| 48 | +// Additional attributes |
| 49 | +#define FOSSIL_IO_ATTR_ITALIC "\033[3m" |
| 50 | +#define FOSSIL_IO_ATTR_STRIKETHROUGH "\033[9m" |
| 51 | + |
21 | 52 | #define FOSSIL_IO_BUFFER_SIZE 1000
|
22 | 53 |
|
23 | 54 | // Function to apply color
|
|
0 commit comments