working chat app example with some rough edges
This commit is contained in:
11
core.h
11
core.h
@@ -181,8 +181,8 @@ DefineList(string, String);
|
||||
|
||||
#define ListRemove(list, index)\
|
||||
if ((index) >= 0 && (index) < (list)->length) {\
|
||||
memcpy((list)->data + (index), (list)->data + (index) + 1, (parentNode->children.length - (i + 1))*sizeof(*((list)->data)));\
|
||||
parentNode->children.length -= 1;\
|
||||
memcpy((list)->data + (index), (list)->data + (index) + 1, ((list)->length - (i + 1))*sizeof(*((list)->data)));\
|
||||
(list)->length -= 1;\
|
||||
}
|
||||
|
||||
// ### Strings ###
|
||||
@@ -255,9 +255,10 @@ typedef enum {
|
||||
StdStream_stderr,
|
||||
} StdStream;
|
||||
|
||||
#define ANSI_INSTRUCTION_FROM_ENUM(ansiCodeEnum) ANSI_INSTRUCTION(ansiCodeEnum)
|
||||
#define ANSI_INSTRUCTION(ansiCode) "\x1b[" #ansiCode "m"
|
||||
#define ANSI_INSTRUCTION_STR(ansiCodeStr) "\x1b[" ansiCodeStr "m"
|
||||
#define ANSI_INSTRUCTION(ansiCode) "\x1b[" #ansiCode
|
||||
#define ANSI_INSTRUCTION_STR(ansiCodeStr) "\x1b[" ansiCodeStr
|
||||
#define ANSI_GRAPHIC_INSTRUCTION(ansiCode) "\x1b[" #ansiCode "m"
|
||||
#define ANSI_GRAPHIC_INSTRUCTION_STR(ansiCodeStr) "\x1b[" ansiCodeStr "m"
|
||||
#define ANSI_RESET ANSI_INSTRUCTION(0)
|
||||
|
||||
#define ANSI_fg_black 30
|
||||
|
||||
Reference in New Issue
Block a user