base progress

This commit is contained in:
ed
2025-02-01 21:36:44 -05:00
parent 73fe526501
commit b414214aa4
21 changed files with 1091 additions and 904 deletions
+11 -40
View File
@@ -3,38 +3,6 @@
#include "platform.h"
#endif
#ifndef MD_API
#if MD_COMPILER_MSVC
# ifdef MD_DYN_LINK
# ifdef MD_DYN_EXPORT
# define MD_API __declspec(dllexport)
# else
# define MD_API __declspec(dllimport)
# endif
# else
# define MD_API // Empty for static builds
# endif
#else
# ifdef MD_DYN_LINK
# define MD_API __attribute__((visibility("default")))
# else
# define MD_API // Empty for static builds
# endif
#endif
#endif // GEN_API
#ifndef global // Global variables
# ifdef MD_DYN_EXPORT
# define global
# else
# define global static
# endif
#endif
#ifndef internal
#define internal static
#endif
#ifndef local_persist
#define local_persist static
#endif
@@ -57,6 +25,9 @@
#define likely(expr) expect(expr,1)
#define unlikely(expr) expect(expr,0)
////////////////////////////////
//~ erg: type casting
#if MD_COMPILER_CPP
# ifndef ccast
# define ccast( type, value ) ( const_cast< type >( (value) ) )
@@ -134,12 +105,12 @@
#endif
#if MD_COMPILER_C
#ifndef static_assert
#undef static_assert
#if MD_COMPILER_C && __STDC_VERSION__ >= 201112L
#define static_assert(condition, message) _Static_assert(condition, message)
#else
#define static_assert(condition, message) typedef char static_assertion_##__LINE__[(condition)?1:-1]
#endif
#endif
# ifndef static_assert
# undef static_assert
# if MD_COMPILER_C && __STDC_VERSION__ >= 201112L
# define static_assert(condition, message) _Static_assert(condition, message)
# else
# define static_assert(condition, message) typedef char static_assertion_##__LINE__[(condition)?1:-1]
# endif
# endif
#endif