mirror of
https://github.com/Ed94/metadesk.git
synced 2026-06-27 06:01:48 -07:00
initial pass done for os
This commit is contained in:
@@ -13,6 +13,53 @@
|
||||
# define BUILD_SUPPLEMENTARY_UNIT 0
|
||||
#endif
|
||||
|
||||
#if !defined(BUILD_ENTRY_DEFINING_UNIT)
|
||||
# define BUILD_ENTRY_DEFINING_UNIT 0
|
||||
#endif
|
||||
|
||||
#if !defined(BUILD_CONSOLE_INTERFACE)
|
||||
# define BUILD_CONSOLE_INTERFACE 0
|
||||
#endif
|
||||
|
||||
#if !defined(BUILD_VERSION_MAJOR)
|
||||
# define BUILD_VERSION_MAJOR 0
|
||||
#endif
|
||||
|
||||
#if !defined(BUILD_VERSION_MINOR)
|
||||
# define BUILD_VERSION_MINOR 1
|
||||
#endif
|
||||
|
||||
#if !defined(BUILD_VERSION_PATCH)
|
||||
# define BUILD_VERSION_PATCH 0
|
||||
#endif
|
||||
|
||||
#define BUILD_VERSION_STRING_LITERAL stringify(BUILD_VERSION_MAJOR) "." stringify(BUILD_VERSION_MINOR) "." stringify(BUILD_VERSION_PATCH)
|
||||
|
||||
#if BUILD_DEBUG
|
||||
# define BUILD_MODE_STRING_LITERAL_APPEND " [Debug]"
|
||||
#else
|
||||
# define BUILD_MODE_STRING_LITERAL_APPEND ""
|
||||
#endif
|
||||
#if defined(BUILD_GIT_HASH)
|
||||
# define BUILD_GIT_HASH_STRING_LITERAL_APPEND " [" BUILD_GIT_HASH "]"
|
||||
#else
|
||||
# define BUILD_GIT_HASH_STRING_LITERAL_APPEND ""
|
||||
#endif
|
||||
|
||||
#if !defined(BUILD_TITLE)
|
||||
# define BUILD_TITLE "Untitled"
|
||||
#endif
|
||||
|
||||
#if !defined(BUILD_RELEASE_PHASE_STRING_LITERAL)
|
||||
# define BUILD_RELEASE_PHASE_STRING_LITERAL "ALPHA"
|
||||
#endif
|
||||
|
||||
#if !defined(BUILD_ISSUES_LINK_STRING_LITERAL)
|
||||
# define BUILD_ISSUES_LINK_STRING_LITERAL "ADD_BUILD_ISSUES_LINK"
|
||||
#endif
|
||||
|
||||
#define BUILD_TITLE_STRING_LITERAL BUILD_TITLE " (" BUILD_VERSION_STRING_LITERAL " " BUILD_RELEASE_PHASE_STRING_LITERAL ") - " __DATE__ "" BUILD_GIT_HASH_STRING_LITERAL_APPEND BUILD_MODE_STRING_LITERAL_APPEND
|
||||
|
||||
#pragma region Compiler Vendor
|
||||
|
||||
#if defined( _MSC_VER )
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
{ \
|
||||
if ( ! ( cond ) ) \
|
||||
{ \
|
||||
assert_handler( #cond, __FILE__, __func__, scast( s64, __LINE__ ), msg, ##__VA_ARGS__ ); \
|
||||
assert_handler( #cond, __FILE__, __func__, scast( S64, __LINE__ ), msg, ##__VA_ARGS__ ); \
|
||||
GEN_DEBUG_TRAP(); \
|
||||
} \
|
||||
} while ( 0 )
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
# include <intrin.h>
|
||||
# include <tmmintrin.h>
|
||||
# include <wmmintrin.h>
|
||||
|
||||
#endif
|
||||
|
||||
#if LANG_C
|
||||
|
||||
@@ -287,6 +287,18 @@ str8_is_integer(String8 string, U32 radix){
|
||||
return(result);
|
||||
}
|
||||
|
||||
U64
|
||||
u64_from_str8(String8 string, U32 radix) {
|
||||
U64 x = 0;
|
||||
if (1 < radix && radix <= 16) {
|
||||
for (U64 i = 0; i < string.size; i += 1) {
|
||||
x *= radix;
|
||||
x += integer_symbol_reverse[string.str[i]&0x7F];
|
||||
}
|
||||
}
|
||||
return(x);
|
||||
}
|
||||
|
||||
B32
|
||||
try_u64_from_str8_c_rules(String8 string, U64 *x)
|
||||
{
|
||||
|
||||
@@ -349,18 +349,6 @@ MD_API String8 str8_from_allocator_size(AllocatorInfo ainfo, U64 z);
|
||||
MD_API String8 str8_from_allocator_u64 (AllocatorInfo ainfo, U64 u64, U32 radix, U8 min_digits, U8 digit_group_separator);
|
||||
MD_API String8 str8_from_alloctor_s64 (AllocatorInfo ainfo, S64 u64, U32 radix, U8 min_digits, U8 digit_group_separator);
|
||||
|
||||
inline U64
|
||||
u64_from_str8(String8 string, U32 radix) {
|
||||
U64 x = 0;
|
||||
if (1 < radix && radix <= 16) {
|
||||
for (U64 i = 0; i < string.size; i += 1) {
|
||||
x *= radix;
|
||||
x += integer_symbol_reverse[string.str[i]&0x7F];
|
||||
}
|
||||
}
|
||||
return(x);
|
||||
}
|
||||
|
||||
inline S64
|
||||
s64_from_str8(String8 string, U32 radix) {
|
||||
S64 sign = sign_from_str8(string, &string);
|
||||
|
||||
Reference in New Issue
Block a user