Skip to content

Commit dddf6aa

Browse files
move color macros to private
1 parent 8b54a17 commit dddf6aa

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

code/logic/fossil/io/output.h

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,37 +17,6 @@
1717
#include <stdarg.h>
1818
#include "stream.h"
1919

20-
// Define color codes for output
21-
#define FOSSIL_IO_COLOR_RESET "\033[0m"
22-
#define FOSSIL_IO_COLOR_RED "\033[31m"
23-
#define FOSSIL_IO_COLOR_GREEN "\033[32m"
24-
#define FOSSIL_IO_COLOR_YELLOW "\033[33m"
25-
#define FOSSIL_IO_COLOR_BLUE "\033[34m"
26-
#define FOSSIL_IO_COLOR_MAGENTA "\033[35m"
27-
#define FOSSIL_IO_COLOR_CYAN "\033[36m"
28-
#define FOSSIL_IO_COLOR_WHITE "\033[37m"
29-
30-
// Bright colors
31-
#define FOSSIL_IO_COLOR_BRIGHT_RED "\033[91m"
32-
#define FOSSIL_IO_COLOR_BRIGHT_GREEN "\033[92m"
33-
#define FOSSIL_IO_COLOR_BRIGHT_YELLOW "\033[93m"
34-
#define FOSSIL_IO_COLOR_BRIGHT_BLUE "\033[94m"
35-
#define FOSSIL_IO_COLOR_BRIGHT_MAGENTA "\033[95m"
36-
#define FOSSIL_IO_COLOR_BRIGHT_CYAN "\033[96m"
37-
#define FOSSIL_IO_COLOR_BRIGHT_WHITE "\033[97m"
38-
39-
// Define text attributes
40-
#define FOSSIL_IO_ATTR_BOLD "\033[1m"
41-
#define FOSSIL_IO_ATTR_UNDERLINE "\033[4m"
42-
#define FOSSIL_IO_ATTR_REVERSED "\033[7m"
43-
#define FOSSIL_IO_ATTR_BLINK "\033[5m"
44-
#define FOSSIL_IO_ATTR_HIDDEN "\033[8m"
45-
#define FOSSIL_IO_ATTR_NORMAL "\033[22m" // For reverting to normal text
46-
47-
// Additional attributes
48-
#define FOSSIL_IO_ATTR_ITALIC "\033[3m"
49-
#define FOSSIL_IO_ATTR_STRIKETHROUGH "\033[9m"
50-
5120
#ifdef __cplusplus
5221
extern "C" {
5322
#endif

code/logic/output.c

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,37 @@
1818
#include <string.h>
1919
#include <stdio.h>
2020

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+
2152
#define FOSSIL_IO_BUFFER_SIZE 1000
2253

2354
// Function to apply color

0 commit comments

Comments
 (0)