diff options
Diffstat (limited to 'src/fnettrace/fnettrace.h')
-rw-r--r-- | src/fnettrace/fnettrace.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/fnettrace/fnettrace.h b/src/fnettrace/fnettrace.h index b4a8f26c7..9b4973235 100644 --- a/src/fnettrace/fnettrace.h +++ b/src/fnettrace/fnettrace.h | |||
@@ -53,6 +53,27 @@ static inline void ansi_clrscr(void) { | |||
53 | fflush(0); | 53 | fflush(0); |
54 | } | 54 | } |
55 | 55 | ||
56 | static inline void ansi_bold(const char *str) { | ||
57 | char str1[] = {0x1b, '[', '1', 'm', '\0'}; | ||
58 | char str2[] = {0x1b, '[', '0', 'm', '\0'}; | ||
59 | printf("%s%s%s", str1, str, str2); | ||
60 | fflush(0); | ||
61 | } | ||
62 | |||
63 | static inline void ansi_faint(const char *str) { | ||
64 | char str1[] = {0x1b, '[', '2', 'm', '\0'}; | ||
65 | char str2[] = {0x1b, '[', '0', 'm', '\0'}; | ||
66 | printf("%s%s%s", str1, str, str2); | ||
67 | fflush(0); | ||
68 | } | ||
69 | |||
70 | static inline void ansi_red(const char *str) { | ||
71 | char str1[] = {0x1b, '[', '9', '1', 'm', '\0'}; | ||
72 | char str2[] = {0x1b, '[', '0', 'm', '\0'}; | ||
73 | printf("%s%s%s", str1, str, str2); | ||
74 | fflush(0); | ||
75 | } | ||
76 | |||
56 | static inline uint8_t hash(uint32_t ip) { | 77 | static inline uint8_t hash(uint32_t ip) { |
57 | uint8_t *ptr = (uint8_t *) &ip; | 78 | uint8_t *ptr = (uint8_t *) &ip; |
58 | // simple byte xor | 79 | // simple byte xor |
@@ -78,4 +99,11 @@ void terminal_restore(void); | |||
78 | // runprog.c | 99 | // runprog.c |
79 | int runprog(const char *program); | 100 | int runprog(const char *program); |
80 | 101 | ||
102 | // event.c | ||
103 | extern int ev_cnt; | ||
104 | void ev_clear(void); | ||
105 | void ev_add(char *record); | ||
106 | void ev_print(FILE *fp); | ||
107 | |||
108 | |||
81 | #endif | 109 | #endif |