| 1234567891011121314151617181920212223242526 |
- #ifndef BASIC_UTILS_H
- #define BASIC_UTILS_H
- #include "Types.h"
- #define CLEAN_LIST(var, Type, field) \
- do { \
- Type* v = var->field; \
- while(v != nullptr) { \
- Type* next = v->next; \
- memoryFree(v); \
- v = next; \
- } \
- var->field = nullptr; \
- } while(false)
- typedef struct {
- i8 data[4];
- u32 length;
- } UTF8;
- UTF8 convertUnicodeToUTF8(i32 c);
- i32 convertUTF8toUnicode(UTF8 c);
- bool isUTF8Remainder(i8 c);
- #endif
|