#pragma once #include #include /// Get the last error. const char* get_error(void); extern xlstring gfx_error; /// Set the last error. #define set_error(...) \ gfx_error.length = snprintf(gfx_error.str, xlstring_size, __VA_ARGS__) /// Prepend an error to the last error. #define prepend_error(...) \ { \ xlstring head; \ head.length = snprintf(head.str, xlstring_size, __VA_ARGS__); \ xlstring_append(&head, xlstring_make(": ")); \ gfx_error = xlstring_concat(head, gfx_error); \ }