Moving basically everything to 4coder base types

master
Allen Webster 2019-02-26 15:30:08 -08:00
parent 76f57e2a79
commit e4b007319a
12 changed files with 197 additions and 248 deletions

View File

@ -6,7 +6,7 @@ moving the cursor, which work even without the default 4coder framework.
// TOP
static void
write_character_parameter(Application_Links *app, uint8_t *character, u32 length){
write_character_parameter(Application_Links *app, u8 *character, u32 length){
if (length != 0){
View_Summary view = get_active_view(app, AccessOpen);
if_view_has_highlighted_range_delete_range(app, view.view_id);
@ -68,7 +68,7 @@ CUSTOM_COMMAND_SIG(write_character)
CUSTOM_DOC("Inserts whatever character was used to trigger this command.")
{
User_Input in = get_command_input(app);
uint8_t character[4];
u8 character[4];
u32 length = to_writable_character(in, character);
write_character_parameter(app, character, length);
}
@ -76,7 +76,7 @@ CUSTOM_DOC("Inserts whatever character was used to trigger this command.")
CUSTOM_COMMAND_SIG(write_underscore)
CUSTOM_DOC("Inserts an underscore.")
{
uint8_t character = '_';
u8 character = '_';
write_character_parameter(app, &character, 1);
}
@ -762,7 +762,7 @@ isearch(Application_Links *app, b32 start_reversed, String query_init, b32 on_th
in = get_user_input(app, EventOnAnyKey, EventOnEsc);
if (in.abort) break;
uint8_t character[4];
u8 character[4];
u32 length = to_writable_character(in, character);
b32 made_change = false;

View File

@ -64,6 +64,188 @@ typedef double f64;
#define HasFlag(field,flag) ((field)&(flag))
#define ArrayCount(a) ((sizeof(a))/(sizeof(*a)))
#define ExpandArray(a) (a), (ArrayCount(a))
#define AllowLocal(c) (void)(c)
#if !defined(Member)
# define Member(S,m) (((S*)0)->m)
#endif
#define PtrDif(a,b) ((u8*)(a) - (u8*)(b))
#define PtrAsInt(a) PtrDif(a,0)
#define HandleAsU64(a) (uint64_t)(PtrAsInt(a))
#define OffsetOfMember(S,m) PtrAsInt(&Member(S,m))
#define CastFromMember(S,m,ptr) (S*)( (u8*)(ptr) - OffsetOfMember(S,m) )
#define IntAsPtr(a) (void*)(((u8*)0) + a)
#define Stmnt(s) do{ s }while(0)
#define STR__(s) #s
#define STR_(s) STR__(s)
#define LINE_STR STR_(__LINE__)
#define FNLN __FILE__ ":" LINE_STR ":"
#if defined(Assert)
# undef Assert
#endif
#define Assert(c) do { if (!(c)) *((i32*)0) = 0xA11E; } while(0)
#define TentativeAssert(c) Assert(c)
#define InvalidCodePath Assert(!"Invalid Code Path!")
#define NotImplemented Assert(!"Not Implemented!")
#define AssertImplies(a,b) Assert(!(a) || (b))
#define require(c) Stmnt( if (!(c)){ return(0); } )
#define Bytes(x) ((umem)x)
#define KB(x) (((umem)x) << 10)
#define MB(x) (((umem)x) << 20)
#define GB(x) (((umem)x) << 30)
#define TB(x) (((umem)x) << 40)
#define max_i8 ((i8)0x7F)
#define max_i16 ((i16)0x7FFF)
#define max_i32 ((i32)0x7FFFFFFF)
#define max_i64 ((i64)0x7FFFFFFFFFFFFFFF)
#define min_i8 ((i8)0x80)
#define min_i16 ((i16)0x8000)
#define min_i32 ((i32)0x80000000)
#define min_i64 ((i64)0x8000000000000000)
#define max_u8 ((u8)0xFF)
#define max_u16 ((u16)0xFFFF)
#define max_u32 ((u32)0xFFFFFFFF)
#define max_u64 ((u64)0xFFFFFFFFFFFFFFFF)
#define min_u8 ((u8)0)
#define min_u16 ((u16)0)
#define min_u32 ((u32)0)
#define min_u64 ((u64)0)
static f32
max_f32_proc(void){
union{
u32 x;
f32 f;
} c;
c.x = 0x7f800000;
return(c.f);
}
////////////////////////////////
static const u32 bit_0 = (((u32)1) << 0);
static const u32 bit_1 = (((u32)1) << 1);
static const u32 bit_2 = (((u32)1) << 2);
static const u32 bit_3 = (((u32)1) << 3);
static const u32 bit_4 = (((u32)1) << 4);
static const u32 bit_5 = (((u32)1) << 5);
static const u32 bit_6 = (((u32)1) << 6);
static const u32 bit_7 = (((u32)1) << 7);
static const u32 bit_8 = (((u32)1) << 8);
static const u32 bit_9 = (((u32)1) << 9);
static const u32 bit_10 = (((u32)1) << 10);
static const u32 bit_11 = (((u32)1) << 11);
static const u32 bit_12 = (((u32)1) << 12);
static const u32 bit_13 = (((u32)1) << 13);
static const u32 bit_14 = (((u32)1) << 14);
static const u32 bit_15 = (((u32)1) << 15);
static const u32 bit_16 = (((u32)1) << 16);
static const u32 bit_17 = (((u32)1) << 17);
static const u32 bit_18 = (((u32)1) << 18);
static const u32 bit_19 = (((u32)1) << 19);
static const u32 bit_20 = (((u32)1) << 20);
static const u32 bit_21 = (((u32)1) << 21);
static const u32 bit_22 = (((u32)1) << 22);
static const u32 bit_23 = (((u32)1) << 23);
static const u32 bit_24 = (((u32)1) << 24);
static const u32 bit_25 = (((u32)1) << 25);
static const u32 bit_26 = (((u32)1) << 26);
static const u32 bit_27 = (((u32)1) << 27);
static const u32 bit_28 = (((u32)1) << 28);
static const u32 bit_29 = (((u32)1) << 29);
static const u32 bit_30 = (((u32)1) << 30);
static const u32 bit_31 = (((u32)1) << 31);
static const u64 bit_32 = (((u64)1) << (0 + 32));
static const u64 bit_33 = (((u64)1) << (1 + 32));
static const u64 bit_34 = (((u64)1) << (2 + 32));
static const u64 bit_35 = (((u64)1) << (3 + 32));
static const u64 bit_36 = (((u64)1) << (4 + 32));
static const u64 bit_37 = (((u64)1) << (5 + 32));
static const u64 bit_38 = (((u64)1) << (6 + 32));
static const u64 bit_39 = (((u64)1) << (7 + 32));
static const u64 bit_40 = (((u64)1) << (8 + 32));
static const u64 bit_41 = (((u64)1) << (9 + 32));
static const u64 bit_42 = (((u64)1) << (10 + 32));
static const u64 bit_43 = (((u64)1) << (11 + 32));
static const u64 bit_44 = (((u64)1) << (12 + 32));
static const u64 bit_45 = (((u64)1) << (13 + 32));
static const u64 bit_46 = (((u64)1) << (14 + 32));
static const u64 bit_47 = (((u64)1) << (15 + 32));
static const u64 bit_48 = (((u64)1) << (16 + 32));
static const u64 bit_49 = (((u64)1) << (17 + 32));
static const u64 bit_50 = (((u64)1) << (18 + 32));
static const u64 bit_51 = (((u64)1) << (19 + 32));
static const u64 bit_52 = (((u64)1) << (20 + 32));
static const u64 bit_53 = (((u64)1) << (21 + 32));
static const u64 bit_54 = (((u64)1) << (22 + 32));
static const u64 bit_55 = (((u64)1) << (23 + 32));
static const u64 bit_56 = (((u64)1) << (24 + 32));
static const u64 bit_57 = (((u64)1) << (25 + 32));
static const u64 bit_58 = (((u64)1) << (26 + 32));
static const u64 bit_59 = (((u64)1) << (27 + 32));
static const u64 bit_60 = (((u64)1) << (28 + 32));
static const u64 bit_61 = (((u64)1) << (29 + 32));
static const u64 bit_62 = (((u64)1) << (30 + 32));
static const u64 bit_63 = (((u64)1) << (31 + 32));
////////////////////////////////
#define dll_init_sentinel(s) (s)->next=(s),(s)->prev=(s)
#define dll_insert(p,n) (n)->next=(p)->next,(n)->prev=(p),(p)->next=(n),(n)->next->prev=(n)
#define dll_insert_back(p,n) (n)->prev=(p)->prev,(n)->next=(p),(p)->prev=(n),(n)->prev->next=(n)
#define dll_remove(n) (n)->next->prev=(n)->prev,(n)->prev->next=(n)->next,(n)->next=(n)->prev=0
#define zdll_push_back_(f,l,n) if(f==0){n->next=n->prev=0;f=l=n;}else{n->prev=l;n->next=0;l->next=n;l=n;}
#define zdll_push_back(f,l,n) Stmnt( zdll_push_back_((f),(l),(n)) )
#define zdll_push_front_(f,l,n) if(f==0){n->prev=n->next=0;f=l=n;}else{n->next=l;n->prev=0;l->prev=n;l=n;}
#define zdll_push_front(f,l,n) Stmnt( zdll_push_front_((f),(l),(n)) )
#define zdll_remove_front_(f,l,n) if(f==l){f=l=0;}else{f=f->next;f->prev=0;}
#define zdll_remove_back_(f,l,n) if(f==l){f=l=0;}else{l=l->prev;l->next=0;}
#define zdll_remove_(f,l,n) if(f==n){zdll_remove_front_(f,l,n);}else if(l==n){zdll_remove_back_(f,l,n);}else{dll_remove(n);}
#define zdll_remove(f,l,n) Stmnt( zdll_remove_((f),(l),(n)) )
#define sll_clear(f,l) (f)=(l)=0
#define sll_push(f,l,n) Stmnt( if((f)==0&&(l)==0){(f)=(l)=(n);}else{(l)->next=(n);(l)=(n);}(l)->next=0; )
#define sll_pop(f,l) Stmnt( if((f)!=(l)){(f)=(f)->next;}else{(f)=(l)=0;} )
#define sll_init_sentinel(s) Stmnt( (s)->next=(s); )
#define sll_insert(p,v) Stmnt( (v)->next=(p)->next; (p)->next = (v); )
#define sll_remove(p,v) Stmnt( Assert((p)->next == (v)); (p)->next = (v)->next; )
#if 0
#define dll_remove(n) (n)->next->prev=(n)->prev,(n)->prev->next=(n)->next
#define zdll_push_back_(f,l,n) if(f==0){n->next=n->prev=0;f=l=n;}else{n->prev=l;n->next=0;l->next=n;l=n;}
#define zdll_push_back(f,l,n) do{ zdll_push_back_((f),(l),(n)) }while(0)
#define zdll_remove_front_(f,l,n) if(f==l){f=l=0;}else{f=f->next;f->prev=0;}
#define zdll_remove_back_(f,l,n) if(f==l){f=l=0;}else{l=l->prev;l->next=0;}
#define zdll_remove_(f,l,n) if(f==n){zdll_remove_front_(f,l,n);}else if(l==n){zdll_remove_back_(f,l,n);}else{dll_remove(n);}
#define zdll_remove(f,l,n) do{ zdll_remove_((f),(l),(n)) }while(0)
#endif
struct Node{
Node *next;
Node *prev;
};
////////////////////////////////
struct Vec2_f32{

View File

@ -30,51 +30,6 @@ struct Bind_Buffer{
////////////////////////////////
#define dll_remove(n) (n)->next->prev=(n)->prev,(n)->prev->next=(n)->next
#define zdll_push_back_(f,l,n) if(f==0){n->next=n->prev=0;f=l=n;}else{n->prev=l;n->next=0;l->next=n;l=n;}
#define zdll_push_back(f,l,n) do{ zdll_push_back_((f),(l),(n)) }while(0)
#define zdll_remove_front_(f,l,n) if(f==l){f=l=0;}else{f=f->next;f->prev=0;}
#define zdll_remove_back_(f,l,n) if(f==l){f=l=0;}else{l=l->prev;l->next=0;}
#define zdll_remove_(f,l,n) if(f==n){zdll_remove_front_(f,l,n);}else if(l==n){zdll_remove_back_(f,l,n);}else{dll_remove(n);}
#define zdll_remove(f,l,n) do{ zdll_remove_((f),(l),(n)) }while(0)
#if !defined(Member)
# define Member(S,m) (((S*)0)->m)
#endif
#define PtrDif(a,b) ((uint8_t*)(a) - (uint8_t*)(b))
#define PtrAsInt(a) PtrDif(a,0)
#define HandleAsU64(a) (uint64_t)(PtrAsInt(a))
#define OffsetOfMember(S,m) PtrAsInt(&Member(S,m))
#define CastFromMember(S,m,ptr) (S*)( (uint8_t*)(ptr) - OffsetOfMember(S,m) )
#define IntAsPtr(a) (void*)(((uint8_t*)0) + a)
#if !defined(max_f32)
static f32
max_f32_proc(void){
union{
u32 x;
f32 f;
} c;
c.x = 0x7f800000;
return(c.f);
}
#define max_f32 max_f32_proc()
#endif
#if !defined(ArrayCount)
# define ArrayCount(a) (sizeof(a)/sizeof(a[0]))
#endif
#ifndef Swap
# define Swap(T,a,b) do{ T t = a; a = b; b = t; } while(0)
#endif
#define require(c) if (!(c)){ return(0); }
////////////////////////////////
struct File_Handle_Path{
FILE *file;
String path;

View File

@ -12,7 +12,7 @@ static Marker_List_Node *marker_list_last = 0;
static u32
binary_search(u32 *array, i32 stride, i32 count, u32 x){
uint8_t *raw = (uint8_t*)array;
u8 *raw = (u8*)array;
u32 i = 0;
u32 first = 0;
u32 last = count;

View File

@ -130,7 +130,7 @@ CUSTOM_DOC("A lister mode command that inserts a new character to the text field
Lister_State *state = view_get_lister_state(&view);
if (state->initialized){
User_Input in = get_command_input(app);
uint8_t character[4];
u8 character[4];
u32 length = to_writable_character(in, character);
if (length > 0){
append(&state->lister.data.text_field, make_string(character, length));
@ -197,7 +197,7 @@ CUSTOM_DOC("A lister mode command that inserts a character into the text field o
Lister_State *state = view_get_lister_state(&view);
if (state->initialized){
User_Input in = get_command_input(app);
uint8_t character[4];
u8 character[4];
u32 length = to_writable_character(in, character);
if (length > 0){
append(&state->lister.data.text_field, make_string(character, length));
@ -258,7 +258,7 @@ CUSTOM_DOC("A lister mode command that handles input for the fixed sure to kill
Lister_State *state = view_get_lister_state(&view);
if (state->initialized){
User_Input in = get_command_input(app);
uint8_t character[4];
u8 character[4];
u32 length = to_writable_character(in, character);
if (length > 0){
void *user_data = 0;

View File

@ -205,7 +205,7 @@ buffer_seek_alpha_numeric_end(Application_Links *app, Buffer_Summary *buffer, in
int32_t still_looping = true;
do{
for (; pos < chunk.end; ++pos){
uint8_t at_pos = (uint8_t)chunk.data[pos];
u8 at_pos = (u8)chunk.data[pos];
if (!char_is_alpha_numeric_utf8(at_pos)) goto double_break;
}
still_looping = forward_stream_chunk(&chunk);

View File

@ -438,7 +438,7 @@ buffer_seek_range_camel_right(Application_Links *app, Buffer_Summary *buffer, i3
stream.max_end = an_pos;
if (init_stream_chunk(&stream, app, buffer, pos, data_chunk, sizeof(data_chunk))){
uint8_t c = 0, pc = stream.data[pos];
u8 c = 0, pc = stream.data[pos];
++pos;
b32 still_looping = false;

View File

@ -12,52 +12,6 @@
#if !defined(FTECH_DEFINES)
#define FTECH_DEFINES
#include "4coder_os_comp_cracking.h"
#if defined(IS_CL)
#if (_MSC_VER == 1500)
#define JUST_GUESS_INTS
#endif
#endif
#if defined(JUST_GUESS_INTS)
typedef signed char i8;
typedef signed short i16;
typedef signed int i32;
typedef signed long long i64;
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
typedef unsigned long long u64;
#else
#include <stdint.h>
typedef int8_t i8;
typedef int16_t i16;
typedef int32_t i32;
typedef int64_t i64;
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;
#endif
typedef i8 b8;
typedef i32 b32;
#if defined(FTECH_32_BIT)
typedef u32 umem;
typedef i32 imem;
#else
typedef u64 umem;
typedef i64 imem;
#endif
typedef float f32;
typedef double f64;
#define internal static
#define local_persist static
#define global static
@ -65,158 +19,12 @@ typedef double f64;
#define global_const static const
#define external extern "C"
#define ArrayCount(a) ((sizeof(a))/(sizeof(*a)))
#define ExpandArray(a) (a), (ArrayCount(a))
#define AllowLocal(c) (void)(c)
#if !defined(Member)
# define Member(T, m) (((T*)0)->m)
#endif
#define PtrDif(a,b) ((uint8_t*)(a) - (uint8_t*)(b))
#define PtrAsInt(a) PtrDif(a,0)
#define OffsetOfMember(S,m) PtrAsInt(&Member(S,m))
#define CastFromMember(S,m,ptr) (S*)( (uint8_t*)(ptr) - OffsetOfMember(S,m) )
#define IntAsPtr(a) (void*)(((uint8_t*)0) + a)
#define Stmnt(s) do{ s }while(0)
#define STR__(s) #s
#define STR_(s) STR__(s)
#define LINE_STR STR_(__LINE__)
#define FNLN __FILE__ ":" LINE_STR ":"
#if defined(Assert)
# undef Assert
#endif
#define Assert(c) do { if (!(c)) *((i32*)0) = 0xA11E; } while(0)
#define TentativeAssert(c) Assert(c)
#define InvalidCodePath Assert(!"Invalid Code Path!")
#define NotImplemented Assert(!"Not Implemented!")
#define AssertImplies(a,b) Assert(!(a) || (b))
#define Swap(t,a,b) do { t x = a; a = b; b = x; } while(0)
#define Max(a,b) (((a)>(b))?(a):(b))
#define Min(a,b) (((a)<(b))?(a):(b))
#define FixSize(s) struct{ u8 __size_fixer__[s]; }
#define DrCase(PC) case PC: goto resumespot_##PC
#define DrYield(PC, n) { *S_ptr = S; S_ptr->__pc__ = PC; return(n); resumespot_##PC:; }
#define DrReturn(n) { *S_ptr = S; S_ptr->__pc__ = -1; return(n); }
#define Bytes(x) ((umem)x)
#define KB(x) (((umem)x) << 10)
#define MB(x) (((umem)x) << 20)
#define GB(x) (((umem)x) << 30)
#define TB(x) (((umem)x) << 40)
#define max_i8 ((i8)0x7F)
#define max_i16 ((i16)0x7FFF)
#define max_i32 ((i32)0x7FFFFFFF)
#define max_i64 ((i64)0x7FFFFFFFFFFFFFFF)
#define min_i8 ((i8)0x80)
#define min_i16 ((i16)0x8000)
#define min_i32 ((i32)0x80000000)
#define min_i64 ((i64)0x8000000000000000)
#define max_u8 ((u8)0xFF)
#define max_u16 ((u16)0xFFFF)
#define max_u32 ((u32)0xFFFFFFFF)
#define max_u64 ((u64)0xFFFFFFFFFFFFFFFF)
#define min_u8 ((u8)0)
#define min_u16 ((u16)0)
#define min_u32 ((u32)0)
#define min_u64 ((u64)0)
#if !defined(max_f32)
internal f32
max_f32_proc(void){
union{
u32 x;
f32 f;
} c;
c.x = 0x7f800000;
return(c.f);
}
#define max_f32 max_f32_proc()
#endif
global_const u32 bit_0 = (((u32)1) << 0);
global_const u32 bit_1 = (((u32)1) << 1);
global_const u32 bit_2 = (((u32)1) << 2);
global_const u32 bit_3 = (((u32)1) << 3);
global_const u32 bit_4 = (((u32)1) << 4);
global_const u32 bit_5 = (((u32)1) << 5);
global_const u32 bit_6 = (((u32)1) << 6);
global_const u32 bit_7 = (((u32)1) << 7);
global_const u32 bit_8 = (((u32)1) << 8);
global_const u32 bit_9 = (((u32)1) << 9);
global_const u32 bit_10 = (((u32)1) << 10);
global_const u32 bit_11 = (((u32)1) << 11);
global_const u32 bit_12 = (((u32)1) << 12);
global_const u32 bit_13 = (((u32)1) << 13);
global_const u32 bit_14 = (((u32)1) << 14);
global_const u32 bit_15 = (((u32)1) << 15);
global_const u32 bit_16 = (((u32)1) << 16);
global_const u32 bit_17 = (((u32)1) << 17);
global_const u32 bit_18 = (((u32)1) << 18);
global_const u32 bit_19 = (((u32)1) << 19);
global_const u32 bit_20 = (((u32)1) << 20);
global_const u32 bit_21 = (((u32)1) << 21);
global_const u32 bit_22 = (((u32)1) << 22);
global_const u32 bit_23 = (((u32)1) << 23);
global_const u32 bit_24 = (((u32)1) << 24);
global_const u32 bit_25 = (((u32)1) << 25);
global_const u32 bit_26 = (((u32)1) << 26);
global_const u32 bit_27 = (((u32)1) << 27);
global_const u32 bit_28 = (((u32)1) << 28);
global_const u32 bit_29 = (((u32)1) << 29);
global_const u32 bit_30 = (((u32)1) << 30);
global_const u32 bit_31 = (((u32)1) << 31);
global_const u64 bit_32 = (((u64)1) << (0 + 32));
global_const u64 bit_33 = (((u64)1) << (1 + 32));
global_const u64 bit_34 = (((u64)1) << (2 + 32));
global_const u64 bit_35 = (((u64)1) << (3 + 32));
global_const u64 bit_36 = (((u64)1) << (4 + 32));
global_const u64 bit_37 = (((u64)1) << (5 + 32));
global_const u64 bit_38 = (((u64)1) << (6 + 32));
global_const u64 bit_39 = (((u64)1) << (7 + 32));
global_const u64 bit_40 = (((u64)1) << (8 + 32));
global_const u64 bit_41 = (((u64)1) << (9 + 32));
global_const u64 bit_42 = (((u64)1) << (10 + 32));
global_const u64 bit_43 = (((u64)1) << (11 + 32));
global_const u64 bit_44 = (((u64)1) << (12 + 32));
global_const u64 bit_45 = (((u64)1) << (13 + 32));
global_const u64 bit_46 = (((u64)1) << (14 + 32));
global_const u64 bit_47 = (((u64)1) << (15 + 32));
global_const u64 bit_48 = (((u64)1) << (16 + 32));
global_const u64 bit_49 = (((u64)1) << (17 + 32));
global_const u64 bit_50 = (((u64)1) << (18 + 32));
global_const u64 bit_51 = (((u64)1) << (19 + 32));
global_const u64 bit_52 = (((u64)1) << (20 + 32));
global_const u64 bit_53 = (((u64)1) << (21 + 32));
global_const u64 bit_54 = (((u64)1) << (22 + 32));
global_const u64 bit_55 = (((u64)1) << (23 + 32));
global_const u64 bit_56 = (((u64)1) << (24 + 32));
global_const u64 bit_57 = (((u64)1) << (25 + 32));
global_const u64 bit_58 = (((u64)1) << (26 + 32));
global_const u64 bit_59 = (((u64)1) << (27 + 32));
global_const u64 bit_60 = (((u64)1) << (28 + 32));
global_const u64 bit_61 = (((u64)1) << (29 + 32));
global_const u64 bit_62 = (((u64)1) << (30 + 32));
global_const u64 bit_63 = (((u64)1) << (31 + 32));
#endif
// BOTTOM

View File

@ -12,6 +12,7 @@
#if !defined(FRED_LINKED_NODE_MACROS_H)
#define FRED_LINKED_NODE_MACROS_H
#if 0
#define dll_init_sentinel(s) (s)->next=(s),(s)->prev=(s)
#define dll_insert(p,n) (n)->next=(p)->next,(n)->prev=(p),(p)->next=(n),(n)->next->prev=(n)
#define dll_insert_back(p,n) (n)->prev=(p)->prev,(n)->next=(p),(p)->prev=(n),(n)->prev->next=(n)
@ -38,6 +39,7 @@ struct Node{
Node *next;
Node *prev;
};
#endif
#endif

View File

@ -12,6 +12,7 @@
//#define FM_PRINT_COMMANDS
#include "../4ed_defines.h"
#include "../4coder_base_types.h"
# include "../4coder_lib/4coder_arena.h"
# include "../4coder_lib/4coder_arena.cpp"
# define FSTRING_IMPLEMENTATION

View File

@ -13,6 +13,7 @@
#define REMAPPING_FILE "4coder_generated/remapping.h"
#include "4ed_defines.h"
#include "4coder_base_types.h"
#include "4ed_meta_defines.h"
#include "4coder_API/4coder_version.h"
#include "4coder_API/4coder_keycodes.h"

View File

@ -2004,7 +2004,7 @@ DOC(This call tries to see if str matches any of the strings in str_set. If the
DOC_SEE(match) */{
b32_4tech result = 0;
i32_4tech i = 0;
uint8_t *ptr = (uint8_t*)str_set;
u8_4tech *ptr = (u8_4tech*)str_set;
for (; i < count; ++i, ptr += item_size){
if (match_ss(*(String*)ptr, str)){
*match_index = i;