Fast and reasonably complete (framebuffer) terminal emulator (Zig fork)

Merge pull request 'Added MSVC support' (#23) from ViktorPopp/flanterm:trunk into trunk

Reviewed-on: https://codeberg.org/mintsuki/flanterm/pulls/23

Mintsuki bdecdcb1 9d0f67b8

Changed files
+9 -1
backends
+9 -1
backends/fb.c
···
#error "Flanterm must be compiled as C99 or newer."
#endif
+
#if defined(_MSC_VER)
+
#define ALWAYS_INLINE __forceinline
+
#elif defined(__GNUC__) || defined(__clang__)
+
#define ALWAYS_INLINE __attribute__((always_inline)) inline
+
#else
+
#define ALWAYS_INLINE inline
+
#endif
+
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
···
0x00, 0x00, 0x00, 0x00
};
-
static inline __attribute__((always_inline)) uint32_t convert_colour(struct flanterm_context *_ctx, uint32_t colour) {
+
static ALWAYS_INLINE uint32_t convert_colour(struct flanterm_context *_ctx, uint32_t colour) {
struct flanterm_fb_context *ctx = (void *)_ctx;
uint32_t r = (colour >> 16) & 0xff;
uint32_t g = (colour >> 8) & 0xff;