Cthulhu  0.2.10
Cthulhu compiler collection
macros.h File Reference
#include "core/compiler.h"
Include dependency graph for macros.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CT_STATIC_ASSERT(expr, msg)   _Static_assert(expr, msg)
 
#define CT_DEPRECATED(msg)
 mark a function as deprecated More...
 
#define CT_MAX(L, R)   ((L) > (R) ? (L) : (R))
 
#define CT_MIN(L, R)   ((L) < (R) ? (L) : (R))
 
#define CT_ALIGN_POW2(X, ALIGN)   (((X) + (ALIGN)-1) & ~((ALIGN)-1))
 
#define CT_UNUSED(x)   ((void)(x))
 mark a variable as unused More...
 
#define CT_INNER_STR(x)   #x
 
#define CT_STR(x)   CT_INNER_STR(x)
 converts a macro to a string More...
 
#define CT_CONCAT(a, b)   a##b
 concatenates two macros More...
 
#define CT_VERSION_STR   CT_STR(CTU_VERSION_MAJOR) "." CT_STR(CTU_VERSION_MINOR) "." CT_STR(CTU_VERSION_PATCH)
 the version of the project as a string More...
 
#define CT_ARRAY_LEN(arr)   (sizeof(arr) / sizeof(*arr))
 returns the length of an array More...
 
#define CT_ANSI_RED   "\x1B[1;31m"
 ANSI red. More...
 
#define CT_ANSI_GREEN   "\x1B[1;32m"
 ANSI green. More...
 
#define CT_ANSI_YELLOW   "\x1B[1;33m"
 ANSI yellow. More...
 
#define CT_ANSI_BLUE   "\x1B[1;34m"
 ANSI blue. More...
 
#define CT_ANSI_MAGENTA   "\x1B[1;35m"
 ANSI magenta. More...
 
#define CT_ANSI_CYAN   "\x1B[1;36m"
 ANSI cyan. More...
 
#define CT_ANSI_WHITE   "\x1B[1;37m"
 ANSI white. More...
 
#define CT_ANSI_RESET   "\x1B[0m"
 ANSI reset. More...
 
#define CT_EXIT_OK   0
 no user errors or internal errors More...
 
#define CT_EXIT_ERROR   1
 the user has made an error More...
 
#define CT_EXIT_SHOULD_EXIT   2
 the user has requested to exit the program More...
 
#define CT_EXIT_INTERNAL   99
 internal compiler errors have occurred More...