Removing all inlines

master
Allen Webster 2019-01-31 05:06:42 -08:00
parent 5d1a0a50e9
commit 93fe0e1472
31 changed files with 406 additions and 414 deletions

View File

@ -237,7 +237,7 @@ CUSTOM_DOC("Reads the scroll wheel value from the mouse state and scrolls accord
////////////////////////////////
inline void
static void
move_vertical(Application_Links *app, float line_multiplier){
uint32_t access = AccessProtected;
View_Summary view = get_active_view(app, access);

View File

@ -155,7 +155,7 @@ struct tokenizer
char *At;
};
inline bool
internal bool
IsEndOfLine(char C)
{
bool Result = ((C == '\n') ||
@ -164,7 +164,7 @@ IsEndOfLine(char C)
return(Result);
}
inline bool
internal bool
IsWhitespace(char C)
{
bool Result = ((C == ' ') ||
@ -176,7 +176,7 @@ IsWhitespace(char C)
return(Result);
}
inline bool
internal bool
IsAlpha(char C)
{
bool Result = (((C >= 'a') && (C <= 'z')) ||
@ -185,7 +185,7 @@ IsAlpha(char C)
return(Result);
}
inline bool
internal bool
IsNumeric(char C)
{
bool Result = ((C >= '0') && (C <= '9'));
@ -290,7 +290,7 @@ PeekToken(tokenizer *Tokenizer)
return(Result);
}
inline bool
internal bool
IsH(String extension)
{
bool Result = (match(extension, make_lit_string("h")) ||
@ -300,7 +300,7 @@ IsH(String extension)
return(Result);
}
inline bool
internal bool
IsCPP(String extension)
{
bool Result = (match(extension, make_lit_string("c")) ||
@ -310,7 +310,7 @@ IsCPP(String extension)
return(Result);
}
inline bool
internal bool
IsBee(String extension)
{
bool Result = (match(extension, make_lit_string("bee")) != 0);
@ -318,7 +318,7 @@ IsBee(String extension)
return(Result);
}
inline bool
internal bool
IsShader(String extension)
{
bool Result = (match(extension, make_lit_string("ps")) ||
@ -330,7 +330,7 @@ IsShader(String extension)
return(Result);
}
inline bool
internal bool
IsINL(String extension)
{
bool Result = (match(extension, make_lit_string("inl")) != 0);
@ -338,7 +338,7 @@ IsINL(String extension)
return(Result);
}
inline bool
internal bool
IsJavascript(String extension)
{
bool Result = (match(extension, make_lit_string("js")) != 0);
@ -346,7 +346,7 @@ IsJavascript(String extension)
return(Result);
}
inline bool
internal bool
IsBAT(String extension)
{
bool Result = (match(extension, make_lit_string("bat")) != 0);
@ -354,7 +354,7 @@ IsBAT(String extension)
return(Result);
}
inline bool
internal bool
IsTXT(String extension)
{
bool Result = (match(extension, make_lit_string("txt")) != 0);
@ -362,7 +362,7 @@ IsTXT(String extension)
return(Result);
}
inline bool
internal bool
IsCMirror(String extension)
{
bool Result = (match(extension, make_lit_string("cmirror")) != 0);
@ -370,7 +370,7 @@ IsCMirror(String extension)
return(Result);
}
inline bool
internal bool
IsMTD(String extension)
{
bool Result = (match(extension, make_lit_string("mtd")) != 0);
@ -378,7 +378,7 @@ IsMTD(String extension)
return(Result);
}
inline bool
internal bool
IsOutline(String extension)
{
bool Result = (match(extension, make_lit_string("tol")) != 0);
@ -386,7 +386,7 @@ IsOutline(String extension)
return(Result);
}
inline bool
internal bool
IsMollyWebMarkup(String extension)
{
bool Result = (match(extension, make_lit_string("mwm")) != 0);
@ -394,7 +394,7 @@ IsMollyWebMarkup(String extension)
return(Result);
}
inline bool
internal bool
IsCode(String extension)
{
bool Result = (IsJavascript(extension) || IsBee(extension) || IsH(extension) || IsCPP(extension) || IsINL(extension) || IsBAT(extension) || IsCMirror(extension) || IsShader(extension) || IsMTD(extension));
@ -402,7 +402,7 @@ IsCode(String extension)
return(Result);
}
inline bool
internal bool
IsDoc(String extension)
{
bool Result = (IsTXT(extension) || IsOutline(extension) || IsMollyWebMarkup(extension));
@ -545,7 +545,7 @@ struct switch_to_result
Buffer_Summary buffer;
};
inline void
internal void
SanitizeSlashes(String Value)
{
for(int At = 0;
@ -559,7 +559,7 @@ SanitizeSlashes(String Value)
}
}
inline switch_to_result
internal switch_to_result
SwitchToOrLoadFile(struct Application_Links *app, String FileName, bool CreateIfNotFound = false)
{
switch_to_result Result = {};
@ -1116,7 +1116,7 @@ OpenProject(Application_Links *app, char *Contents)
}
}
inline int
internal int
IsCodeLegal(int32_t Codepoint)
{
int Result = ((Codepoint == '\n') ||

View File

@ -647,259 +647,259 @@ app_links->draw_rectangle_ = Draw_Rectangle;\
app_links->draw_rectangle_outline_ = Draw_Rectangle_Outline;\
app_links->get_default_font_for_view_ = Get_Default_Font_For_View;} while(false)
#if defined(ALLOW_DEP_4CODER)
static inline bool32 global_set_setting(Application_Links *app, Global_Setting_ID setting, int32_t value){return(app->global_set_setting(app, setting, value));}
static inline bool32 global_set_mapping(Application_Links *app, void *data, int32_t size){return(app->global_set_mapping(app, data, size));}
static inline bool32 exec_command(Application_Links *app, Command_ID command_id){return(app->exec_command(app, command_id));}
static inline bool32 exec_system_command(Application_Links *app, View_Summary *view, Buffer_Identifier buffer_id, char *path, int32_t path_len, char *command, int32_t command_len, Command_Line_Interface_Flag flags){return(app->exec_system_command(app, view, buffer_id, path, path_len, command, command_len, flags));}
static inline void clipboard_post(Application_Links *app, int32_t clipboard_id, char *str, int32_t len){(app->clipboard_post(app, clipboard_id, str, len));}
static inline int32_t clipboard_count(Application_Links *app, int32_t clipboard_id){return(app->clipboard_count(app, clipboard_id));}
static inline int32_t clipboard_index(Application_Links *app, int32_t clipboard_id, int32_t item_index, char *out, int32_t len){return(app->clipboard_index(app, clipboard_id, item_index, out, len));}
static inline Parse_Context_ID create_parse_context(Application_Links *app, Parser_String_And_Type *kw, uint32_t kw_count, Parser_String_And_Type *pp, uint32_t pp_count){return(app->create_parse_context(app, kw, kw_count, pp, pp_count));}
static inline int32_t get_buffer_count(Application_Links *app){return(app->get_buffer_count(app));}
static inline Buffer_Summary get_buffer_first(Application_Links *app, Access_Flag access){return(app->get_buffer_first(app, access));}
static inline void get_buffer_next(Application_Links *app, Buffer_Summary *buffer, Access_Flag access){(app->get_buffer_next(app, buffer, access));}
static inline Buffer_Summary get_buffer(Application_Links *app, Buffer_ID buffer_id, Access_Flag access){return(app->get_buffer(app, buffer_id, access));}
static inline Buffer_Summary get_buffer_by_name(Application_Links *app, char *name, int32_t len, Access_Flag access){return(app->get_buffer_by_name(app, name, len, access));}
static inline Buffer_Summary get_buffer_by_file_name(Application_Links *app, char *name, int32_t len, Access_Flag access){return(app->get_buffer_by_file_name(app, name, len, access));}
static inline bool32 buffer_read_range(Application_Links *app, Buffer_Summary *buffer, int32_t start, int32_t end, char *out){return(app->buffer_read_range(app, buffer, start, end, out));}
static inline bool32 buffer_replace_range(Application_Links *app, Buffer_Summary *buffer, int32_t start, int32_t end, char *str, int32_t len){return(app->buffer_replace_range(app, buffer, start, end, str, len));}
static inline bool32 buffer_compute_cursor(Application_Links *app, Buffer_Summary *buffer, Buffer_Seek seek, Partial_Cursor *cursor_out){return(app->buffer_compute_cursor(app, buffer, seek, cursor_out));}
static inline bool32 buffer_batch_edit(Application_Links *app, Buffer_Summary *buffer, char *str, int32_t str_len, Buffer_Edit *edits, int32_t edit_count, Buffer_Batch_Edit_Type type){return(app->buffer_batch_edit(app, buffer, str, str_len, edits, edit_count, type));}
static inline bool32 buffer_get_setting(Application_Links *app, Buffer_Summary *buffer, Buffer_Setting_ID setting, int32_t *value_out){return(app->buffer_get_setting(app, buffer, setting, value_out));}
static inline bool32 buffer_set_setting(Application_Links *app, Buffer_Summary *buffer, Buffer_Setting_ID setting, int32_t value){return(app->buffer_set_setting(app, buffer, setting, value));}
static inline Managed_Scope buffer_get_managed_scope(Application_Links *app, Buffer_ID buffer_id){return(app->buffer_get_managed_scope(app, buffer_id));}
static inline int32_t buffer_token_count(Application_Links *app, Buffer_Summary *buffer){return(app->buffer_token_count(app, buffer));}
static inline bool32 buffer_read_tokens(Application_Links *app, Buffer_Summary *buffer, int32_t start_token, int32_t end_token, Cpp_Token *tokens_out){return(app->buffer_read_tokens(app, buffer, start_token, end_token, tokens_out));}
static inline bool32 buffer_get_token_index(Application_Links *app, Buffer_Summary *buffer, int32_t pos, Cpp_Get_Token_Result *get_result){return(app->buffer_get_token_index(app, buffer, pos, get_result));}
static inline bool32 buffer_send_end_signal(Application_Links *app, Buffer_Summary *buffer){return(app->buffer_send_end_signal(app, buffer));}
static inline Buffer_Summary create_buffer(Application_Links *app, char *filename, int32_t filename_len, Buffer_Create_Flag flags){return(app->create_buffer(app, filename, filename_len, flags));}
static inline bool32 save_buffer(Application_Links *app, Buffer_Summary *buffer, char *file_name, int32_t file_name_len, uint32_t flags){return(app->save_buffer(app, buffer, file_name, file_name_len, flags));}
static inline Buffer_Kill_Result kill_buffer(Application_Links *app, Buffer_Identifier buffer, Buffer_Kill_Flag flags){return(app->kill_buffer(app, buffer, flags));}
static inline Buffer_Reopen_Result reopen_buffer(Application_Links *app, Buffer_Summary *buffer, Buffer_Reopen_Flag flags){return(app->reopen_buffer(app, buffer, flags));}
static inline View_Summary get_view_first(Application_Links *app, Access_Flag access){return(app->get_view_first(app, access));}
static inline void get_view_next(Application_Links *app, View_Summary *view, Access_Flag access){(app->get_view_next(app, view, access));}
static inline View_Summary get_view(Application_Links *app, View_ID view_id, Access_Flag access){return(app->get_view(app, view_id, access));}
static inline View_Summary get_active_view(Application_Links *app, Access_Flag access){return(app->get_active_view(app, access));}
static inline View_Summary open_view(Application_Links *app, View_Summary *view_location, View_Split_Position position){return(app->open_view(app, view_location, position));}
static inline bool32 close_view(Application_Links *app, View_Summary *view){return(app->close_view(app, view));}
static inline bool32 set_active_view(Application_Links *app, View_Summary *view){return(app->set_active_view(app, view));}
static inline bool32 view_get_setting(Application_Links *app, View_Summary *view, View_Setting_ID setting, int32_t *value_out){return(app->view_get_setting(app, view, setting, value_out));}
static inline bool32 view_set_setting(Application_Links *app, View_Summary *view, View_Setting_ID setting, int32_t value){return(app->view_set_setting(app, view, setting, value));}
static inline Managed_Scope view_get_managed_scope(Application_Links *app, View_ID view_id){return(app->view_get_managed_scope(app, view_id));}
static inline bool32 view_set_split_proportion(Application_Links *app, View_Summary *view, float t){return(app->view_set_split_proportion(app, view, t));}
static inline i32_Rect view_get_enclosure_rect(Application_Links *app, View_Summary *view){return(app->view_get_enclosure_rect(app, view));}
static inline bool32 view_compute_cursor(Application_Links *app, View_Summary *view, Buffer_Seek seek, Full_Cursor *cursor_out){return(app->view_compute_cursor(app, view, seek, cursor_out));}
static inline bool32 view_set_cursor(Application_Links *app, View_Summary *view, Buffer_Seek seek, bool32 set_preferred_x){return(app->view_set_cursor(app, view, seek, set_preferred_x));}
static inline bool32 view_set_scroll(Application_Links *app, View_Summary *view, GUI_Scroll_Vars scroll){return(app->view_set_scroll(app, view, scroll));}
static inline bool32 view_set_mark(Application_Links *app, View_Summary *view, Buffer_Seek seek){return(app->view_set_mark(app, view, seek));}
static inline bool32 view_set_highlight(Application_Links *app, View_Summary *view, int32_t start, int32_t end, bool32 turn_on){return(app->view_set_highlight(app, view, start, end, turn_on));}
static inline bool32 view_set_buffer(Application_Links *app, View_Summary *view, Buffer_ID buffer_id, Set_Buffer_Flag flags){return(app->view_set_buffer(app, view, buffer_id, flags));}
static inline bool32 view_post_fade(Application_Links *app, View_Summary *view, float seconds, int32_t start, int32_t end, int_color color){return(app->view_post_fade(app, view, seconds, start, end, color));}
static inline bool32 view_begin_ui_mode(Application_Links *app, View_Summary *view){return(app->view_begin_ui_mode(app, view));}
static inline bool32 view_end_ui_mode(Application_Links *app, View_Summary *view){return(app->view_end_ui_mode(app, view));}
static inline bool32 view_set_ui(Application_Links *app, View_Summary *view, UI_Control *control, UI_Quit_Function_Type *quit_function){return(app->view_set_ui(app, view, control, quit_function));}
static inline UI_Control view_get_ui_copy(Application_Links *app, View_Summary *view, struct Partition *part){return(app->view_get_ui_copy(app, view, part));}
static inline Managed_Scope create_user_managed_scope(Application_Links *app){return(app->create_user_managed_scope(app));}
static inline bool32 destroy_user_managed_scope(Application_Links *app, Managed_Scope scope){return(app->destroy_user_managed_scope(app, scope));}
static inline Managed_Scope get_global_managed_scope(Application_Links *app){return(app->get_global_managed_scope(app));}
static inline Managed_Scope get_managed_scope_with_multiple_dependencies(Application_Links *app, Managed_Scope *scopes, int32_t count){return(app->get_managed_scope_with_multiple_dependencies(app, scopes, count));}
static inline bool32 managed_scope_clear_contents(Application_Links *app, Managed_Scope scope){return(app->managed_scope_clear_contents(app, scope));}
static inline bool32 managed_scope_clear_self_all_dependent_scopes(Application_Links *app, Managed_Scope scope){return(app->managed_scope_clear_self_all_dependent_scopes(app, scope));}
static inline Managed_Variable_ID managed_variable_create(Application_Links *app, char *null_terminated_name, uint64_t default_value){return(app->managed_variable_create(app, null_terminated_name, default_value));}
static inline Managed_Variable_ID managed_variable_get_id(Application_Links *app, char *null_terminated_name){return(app->managed_variable_get_id(app, null_terminated_name));}
static inline Managed_Variable_ID managed_variable_create_or_get_id(Application_Links *app, char *null_terminated_name, uint64_t default_value){return(app->managed_variable_create_or_get_id(app, null_terminated_name, default_value));}
static inline bool32 managed_variable_set(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t value){return(app->managed_variable_set(app, scope, id, value));}
static inline bool32 managed_variable_get(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t *value_out){return(app->managed_variable_get(app, scope, id, value_out));}
static inline Managed_Object alloc_managed_memory_in_scope(Application_Links *app, Managed_Scope scope, int32_t item_size, int32_t count){return(app->alloc_managed_memory_in_scope(app, scope, item_size, count));}
static inline Managed_Object alloc_buffer_markers_on_buffer(Application_Links *app, Buffer_ID buffer_id, int32_t count, Managed_Scope *optional_extra_scope){return(app->alloc_buffer_markers_on_buffer(app, buffer_id, count, optional_extra_scope));}
static inline Marker_Visual create_marker_visual(Application_Links *app, Managed_Object object){return(app->create_marker_visual(app, object));}
static inline bool32 marker_visual_set_effect(Application_Links *app, Marker_Visual visual, Marker_Visual_Type type, int_color color, int_color text_color, Marker_Visual_Text_Style text_style){return(app->marker_visual_set_effect(app, visual, type, color, text_color, text_style));}
static inline bool32 marker_visual_set_take_rule(Application_Links *app, Marker_Visual visual, Marker_Visual_Take_Rule take_rule){return(app->marker_visual_set_take_rule(app, visual, take_rule));}
static inline bool32 marker_visual_set_priority(Application_Links *app, Marker_Visual visual, Marker_Visual_Priority_Level priority){return(app->marker_visual_set_priority(app, visual, priority));}
static inline bool32 marker_visual_set_view_key(Application_Links *app, Marker_Visual visual, View_ID key_view_id){return(app->marker_visual_set_view_key(app, visual, key_view_id));}
static inline bool32 destroy_marker_visual(Application_Links *app, Marker_Visual visual){return(app->destroy_marker_visual(app, visual));}
static inline int32_t buffer_markers_get_attached_visual_count(Application_Links *app, Managed_Object object){return(app->buffer_markers_get_attached_visual_count(app, object));}
static inline Marker_Visual* buffer_markers_get_attached_visual(Application_Links *app, Partition *part, Managed_Object object){return(app->buffer_markers_get_attached_visual(app, part, object));}
static inline uint32_t managed_object_get_item_size(Application_Links *app, Managed_Object object){return(app->managed_object_get_item_size(app, object));}
static inline uint32_t managed_object_get_item_count(Application_Links *app, Managed_Object object){return(app->managed_object_get_item_count(app, object));}
static inline Managed_Object_Type managed_object_get_type(Application_Links *app, Managed_Object object){return(app->managed_object_get_type(app, object));}
static inline Managed_Scope managed_object_get_containing_scope(Application_Links *app, Managed_Object object){return(app->managed_object_get_containing_scope(app, object));}
static inline bool32 managed_object_free(Application_Links *app, Managed_Object object){return(app->managed_object_free(app, object));}
static inline bool32 managed_object_store_data(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem){return(app->managed_object_store_data(app, object, first_index, count, mem));}
static inline bool32 managed_object_load_data(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem_out){return(app->managed_object_load_data(app, object, first_index, count, mem_out));}
static inline User_Input get_user_input(Application_Links *app, Input_Type_Flag get_type, Input_Type_Flag abort_type){return(app->get_user_input(app, get_type, abort_type));}
static inline User_Input get_command_input(Application_Links *app){return(app->get_command_input(app));}
static inline void set_command_input(Application_Links *app, Key_Event_Data key_data){(app->set_command_input(app, key_data));}
static inline Mouse_State get_mouse_state(Application_Links *app){return(app->get_mouse_state(app));}
static inline int32_t get_active_query_bars(Application_Links *app, View_ID view_id, int32_t max_result_count, Query_Bar **result_array){return(app->get_active_query_bars(app, view_id, max_result_count, result_array));}
static inline bool32 start_query_bar(Application_Links *app, Query_Bar *bar, uint32_t flags){return(app->start_query_bar(app, bar, flags));}
static inline void end_query_bar(Application_Links *app, Query_Bar *bar, uint32_t flags){(app->end_query_bar(app, bar, flags));}
static inline void print_message(Application_Links *app, char *str, int32_t len){(app->print_message(app, str, len));}
static inline int32_t get_theme_count(Application_Links *app){return(app->get_theme_count(app));}
static inline String get_theme_name(Application_Links *app, struct Partition *arena, int32_t index){return(app->get_theme_name(app, arena, index));}
static inline void create_theme(Application_Links *app, Theme *theme, char *name, int32_t len){(app->create_theme(app, theme, name, len));}
static inline void change_theme(Application_Links *app, char *name, int32_t len){(app->change_theme(app, name, len));}
static inline bool32 change_theme_by_index(Application_Links *app, int32_t index){return(app->change_theme_by_index(app, index));}
static inline Face_ID get_largest_face_id(Application_Links *app){return(app->get_largest_face_id(app));}
static inline bool32 set_global_face(Application_Links *app, Face_ID id, bool32 apply_to_all_buffers){return(app->set_global_face(app, id, apply_to_all_buffers));}
static inline bool32 buffer_set_face(Application_Links *app, Buffer_Summary *buffer, Face_ID id){return(app->buffer_set_face(app, buffer, id));}
static inline Face_Description get_face_description(Application_Links *app, Face_ID id){return(app->get_face_description(app, id));}
static inline Face_ID get_face_id(Application_Links *app, Buffer_Summary *buffer){return(app->get_face_id(app, buffer));}
static inline Face_ID try_create_new_face(Application_Links *app, Face_Description *description){return(app->try_create_new_face(app, description));}
static inline bool32 try_modify_face(Application_Links *app, Face_ID id, Face_Description *description){return(app->try_modify_face(app, id, description));}
static inline bool32 try_release_face(Application_Links *app, Face_ID id, Face_ID replacement_id){return(app->try_release_face(app, id, replacement_id));}
static inline int32_t get_available_font_count(Application_Links *app){return(app->get_available_font_count(app));}
static inline Available_Font get_available_font(Application_Links *app, int32_t index){return(app->get_available_font(app, index));}
static inline void set_theme_colors(Application_Links *app, Theme_Color *colors, int32_t count){(app->set_theme_colors(app, colors, count));}
static inline void get_theme_colors(Application_Links *app, Theme_Color *colors, int32_t count){(app->get_theme_colors(app, colors, count));}
static inline int32_t directory_get_hot(Application_Links *app, char *out, int32_t capacity){return(app->directory_get_hot(app, out, capacity));}
static inline bool32 directory_set_hot(Application_Links *app, char *str, int32_t len){return(app->directory_set_hot(app, str, len));}
static inline File_List get_file_list(Application_Links *app, char *dir, int32_t len){return(app->get_file_list(app, dir, len));}
static inline void free_file_list(Application_Links *app, File_List list){(app->free_file_list(app, list));}
static inline void set_gui_up_down_keys(Application_Links *app, Key_Code up_key, Key_Modifier up_key_modifier, Key_Code down_key, Key_Modifier down_key_modifier){(app->set_gui_up_down_keys(app, up_key, up_key_modifier, down_key, down_key_modifier));}
static inline void* memory_allocate(Application_Links *app, int32_t size){return(app->memory_allocate(app, size));}
static inline bool32 memory_set_protection(Application_Links *app, void *ptr, int32_t size, Memory_Protect_Flags flags){return(app->memory_set_protection(app, ptr, size, flags));}
static inline void memory_free(Application_Links *app, void *ptr, int32_t size){(app->memory_free(app, ptr, size));}
static inline bool32 file_exists(Application_Links *app, char *filename, int32_t len){return(app->file_exists(app, filename, len));}
static inline bool32 directory_cd(Application_Links *app, char *dir, int32_t *len, int32_t capacity, char *rel_path, int32_t rel_len){return(app->directory_cd(app, dir, len, capacity, rel_path, rel_len));}
static inline int32_t get_4ed_path(Application_Links *app, char *out, int32_t capacity){return(app->get_4ed_path(app, out, capacity));}
static inline void show_mouse_cursor(Application_Links *app, Mouse_Cursor_Show_Type show){(app->show_mouse_cursor(app, show));}
static inline bool32 set_fullscreen(Application_Links *app, bool32 full_screen){return(app->set_fullscreen(app, full_screen));}
static inline bool32 is_fullscreen(Application_Links *app){return(app->is_fullscreen(app));}
static inline void send_exit_signal(Application_Links *app){(app->send_exit_signal(app));}
static inline void set_window_title(Application_Links *app, char *title){(app->set_window_title(app, title));}
static inline Microsecond_Time_Stamp get_microseconds_timestamp(Application_Links *app){return(app->get_microseconds_timestamp(app));}
static inline float draw_string(Application_Links *app, Face_ID font_id, String str, int32_t x, int32_t y, int_color color, uint32_t flags, float dx, float dy){return(app->draw_string(app, font_id, str, x, y, color, flags, dx, dy));}
static inline float get_string_advance(Application_Links *app, Face_ID font_id, String str){return(app->get_string_advance(app, font_id, str));}
static inline void draw_rectangle(Application_Links *app, f32_Rect rect, int_color color){(app->draw_rectangle(app, rect, color));}
static inline void draw_rectangle_outline(Application_Links *app, f32_Rect rect, int_color color){(app->draw_rectangle_outline(app, rect, color));}
static inline Face_ID get_default_font_for_view(Application_Links *app, View_ID view_id){return(app->get_default_font_for_view(app, view_id));}
static bool32 global_set_setting(Application_Links *app, Global_Setting_ID setting, int32_t value){return(app->global_set_setting(app, setting, value));}
static bool32 global_set_mapping(Application_Links *app, void *data, int32_t size){return(app->global_set_mapping(app, data, size));}
static bool32 exec_command(Application_Links *app, Command_ID command_id){return(app->exec_command(app, command_id));}
static bool32 exec_system_command(Application_Links *app, View_Summary *view, Buffer_Identifier buffer_id, char *path, int32_t path_len, char *command, int32_t command_len, Command_Line_Interface_Flag flags){return(app->exec_system_command(app, view, buffer_id, path, path_len, command, command_len, flags));}
static void clipboard_post(Application_Links *app, int32_t clipboard_id, char *str, int32_t len){(app->clipboard_post(app, clipboard_id, str, len));}
static int32_t clipboard_count(Application_Links *app, int32_t clipboard_id){return(app->clipboard_count(app, clipboard_id));}
static int32_t clipboard_index(Application_Links *app, int32_t clipboard_id, int32_t item_index, char *out, int32_t len){return(app->clipboard_index(app, clipboard_id, item_index, out, len));}
static Parse_Context_ID create_parse_context(Application_Links *app, Parser_String_And_Type *kw, uint32_t kw_count, Parser_String_And_Type *pp, uint32_t pp_count){return(app->create_parse_context(app, kw, kw_count, pp, pp_count));}
static int32_t get_buffer_count(Application_Links *app){return(app->get_buffer_count(app));}
static Buffer_Summary get_buffer_first(Application_Links *app, Access_Flag access){return(app->get_buffer_first(app, access));}
static void get_buffer_next(Application_Links *app, Buffer_Summary *buffer, Access_Flag access){(app->get_buffer_next(app, buffer, access));}
static Buffer_Summary get_buffer(Application_Links *app, Buffer_ID buffer_id, Access_Flag access){return(app->get_buffer(app, buffer_id, access));}
static Buffer_Summary get_buffer_by_name(Application_Links *app, char *name, int32_t len, Access_Flag access){return(app->get_buffer_by_name(app, name, len, access));}
static Buffer_Summary get_buffer_by_file_name(Application_Links *app, char *name, int32_t len, Access_Flag access){return(app->get_buffer_by_file_name(app, name, len, access));}
static bool32 buffer_read_range(Application_Links *app, Buffer_Summary *buffer, int32_t start, int32_t end, char *out){return(app->buffer_read_range(app, buffer, start, end, out));}
static bool32 buffer_replace_range(Application_Links *app, Buffer_Summary *buffer, int32_t start, int32_t end, char *str, int32_t len){return(app->buffer_replace_range(app, buffer, start, end, str, len));}
static bool32 buffer_compute_cursor(Application_Links *app, Buffer_Summary *buffer, Buffer_Seek seek, Partial_Cursor *cursor_out){return(app->buffer_compute_cursor(app, buffer, seek, cursor_out));}
static bool32 buffer_batch_edit(Application_Links *app, Buffer_Summary *buffer, char *str, int32_t str_len, Buffer_Edit *edits, int32_t edit_count, Buffer_Batch_Edit_Type type){return(app->buffer_batch_edit(app, buffer, str, str_len, edits, edit_count, type));}
static bool32 buffer_get_setting(Application_Links *app, Buffer_Summary *buffer, Buffer_Setting_ID setting, int32_t *value_out){return(app->buffer_get_setting(app, buffer, setting, value_out));}
static bool32 buffer_set_setting(Application_Links *app, Buffer_Summary *buffer, Buffer_Setting_ID setting, int32_t value){return(app->buffer_set_setting(app, buffer, setting, value));}
static Managed_Scope buffer_get_managed_scope(Application_Links *app, Buffer_ID buffer_id){return(app->buffer_get_managed_scope(app, buffer_id));}
static int32_t buffer_token_count(Application_Links *app, Buffer_Summary *buffer){return(app->buffer_token_count(app, buffer));}
static bool32 buffer_read_tokens(Application_Links *app, Buffer_Summary *buffer, int32_t start_token, int32_t end_token, Cpp_Token *tokens_out){return(app->buffer_read_tokens(app, buffer, start_token, end_token, tokens_out));}
static bool32 buffer_get_token_index(Application_Links *app, Buffer_Summary *buffer, int32_t pos, Cpp_Get_Token_Result *get_result){return(app->buffer_get_token_index(app, buffer, pos, get_result));}
static bool32 buffer_send_end_signal(Application_Links *app, Buffer_Summary *buffer){return(app->buffer_send_end_signal(app, buffer));}
static Buffer_Summary create_buffer(Application_Links *app, char *filename, int32_t filename_len, Buffer_Create_Flag flags){return(app->create_buffer(app, filename, filename_len, flags));}
static bool32 save_buffer(Application_Links *app, Buffer_Summary *buffer, char *file_name, int32_t file_name_len, uint32_t flags){return(app->save_buffer(app, buffer, file_name, file_name_len, flags));}
static Buffer_Kill_Result kill_buffer(Application_Links *app, Buffer_Identifier buffer, Buffer_Kill_Flag flags){return(app->kill_buffer(app, buffer, flags));}
static Buffer_Reopen_Result reopen_buffer(Application_Links *app, Buffer_Summary *buffer, Buffer_Reopen_Flag flags){return(app->reopen_buffer(app, buffer, flags));}
static View_Summary get_view_first(Application_Links *app, Access_Flag access){return(app->get_view_first(app, access));}
static void get_view_next(Application_Links *app, View_Summary *view, Access_Flag access){(app->get_view_next(app, view, access));}
static View_Summary get_view(Application_Links *app, View_ID view_id, Access_Flag access){return(app->get_view(app, view_id, access));}
static View_Summary get_active_view(Application_Links *app, Access_Flag access){return(app->get_active_view(app, access));}
static View_Summary open_view(Application_Links *app, View_Summary *view_location, View_Split_Position position){return(app->open_view(app, view_location, position));}
static bool32 close_view(Application_Links *app, View_Summary *view){return(app->close_view(app, view));}
static bool32 set_active_view(Application_Links *app, View_Summary *view){return(app->set_active_view(app, view));}
static bool32 view_get_setting(Application_Links *app, View_Summary *view, View_Setting_ID setting, int32_t *value_out){return(app->view_get_setting(app, view, setting, value_out));}
static bool32 view_set_setting(Application_Links *app, View_Summary *view, View_Setting_ID setting, int32_t value){return(app->view_set_setting(app, view, setting, value));}
static Managed_Scope view_get_managed_scope(Application_Links *app, View_ID view_id){return(app->view_get_managed_scope(app, view_id));}
static bool32 view_set_split_proportion(Application_Links *app, View_Summary *view, float t){return(app->view_set_split_proportion(app, view, t));}
static i32_Rect view_get_enclosure_rect(Application_Links *app, View_Summary *view){return(app->view_get_enclosure_rect(app, view));}
static bool32 view_compute_cursor(Application_Links *app, View_Summary *view, Buffer_Seek seek, Full_Cursor *cursor_out){return(app->view_compute_cursor(app, view, seek, cursor_out));}
static bool32 view_set_cursor(Application_Links *app, View_Summary *view, Buffer_Seek seek, bool32 set_preferred_x){return(app->view_set_cursor(app, view, seek, set_preferred_x));}
static bool32 view_set_scroll(Application_Links *app, View_Summary *view, GUI_Scroll_Vars scroll){return(app->view_set_scroll(app, view, scroll));}
static bool32 view_set_mark(Application_Links *app, View_Summary *view, Buffer_Seek seek){return(app->view_set_mark(app, view, seek));}
static bool32 view_set_highlight(Application_Links *app, View_Summary *view, int32_t start, int32_t end, bool32 turn_on){return(app->view_set_highlight(app, view, start, end, turn_on));}
static bool32 view_set_buffer(Application_Links *app, View_Summary *view, Buffer_ID buffer_id, Set_Buffer_Flag flags){return(app->view_set_buffer(app, view, buffer_id, flags));}
static bool32 view_post_fade(Application_Links *app, View_Summary *view, float seconds, int32_t start, int32_t end, int_color color){return(app->view_post_fade(app, view, seconds, start, end, color));}
static bool32 view_begin_ui_mode(Application_Links *app, View_Summary *view){return(app->view_begin_ui_mode(app, view));}
static bool32 view_end_ui_mode(Application_Links *app, View_Summary *view){return(app->view_end_ui_mode(app, view));}
static bool32 view_set_ui(Application_Links *app, View_Summary *view, UI_Control *control, UI_Quit_Function_Type *quit_function){return(app->view_set_ui(app, view, control, quit_function));}
static UI_Control view_get_ui_copy(Application_Links *app, View_Summary *view, struct Partition *part){return(app->view_get_ui_copy(app, view, part));}
static Managed_Scope create_user_managed_scope(Application_Links *app){return(app->create_user_managed_scope(app));}
static bool32 destroy_user_managed_scope(Application_Links *app, Managed_Scope scope){return(app->destroy_user_managed_scope(app, scope));}
static Managed_Scope get_global_managed_scope(Application_Links *app){return(app->get_global_managed_scope(app));}
static Managed_Scope get_managed_scope_with_multiple_dependencies(Application_Links *app, Managed_Scope *scopes, int32_t count){return(app->get_managed_scope_with_multiple_dependencies(app, scopes, count));}
static bool32 managed_scope_clear_contents(Application_Links *app, Managed_Scope scope){return(app->managed_scope_clear_contents(app, scope));}
static bool32 managed_scope_clear_self_all_dependent_scopes(Application_Links *app, Managed_Scope scope){return(app->managed_scope_clear_self_all_dependent_scopes(app, scope));}
static Managed_Variable_ID managed_variable_create(Application_Links *app, char *null_terminated_name, uint64_t default_value){return(app->managed_variable_create(app, null_terminated_name, default_value));}
static Managed_Variable_ID managed_variable_get_id(Application_Links *app, char *null_terminated_name){return(app->managed_variable_get_id(app, null_terminated_name));}
static Managed_Variable_ID managed_variable_create_or_get_id(Application_Links *app, char *null_terminated_name, uint64_t default_value){return(app->managed_variable_create_or_get_id(app, null_terminated_name, default_value));}
static bool32 managed_variable_set(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t value){return(app->managed_variable_set(app, scope, id, value));}
static bool32 managed_variable_get(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t *value_out){return(app->managed_variable_get(app, scope, id, value_out));}
static Managed_Object alloc_managed_memory_in_scope(Application_Links *app, Managed_Scope scope, int32_t item_size, int32_t count){return(app->alloc_managed_memory_in_scope(app, scope, item_size, count));}
static Managed_Object alloc_buffer_markers_on_buffer(Application_Links *app, Buffer_ID buffer_id, int32_t count, Managed_Scope *optional_extra_scope){return(app->alloc_buffer_markers_on_buffer(app, buffer_id, count, optional_extra_scope));}
static Marker_Visual create_marker_visual(Application_Links *app, Managed_Object object){return(app->create_marker_visual(app, object));}
static bool32 marker_visual_set_effect(Application_Links *app, Marker_Visual visual, Marker_Visual_Type type, int_color color, int_color text_color, Marker_Visual_Text_Style text_style){return(app->marker_visual_set_effect(app, visual, type, color, text_color, text_style));}
static bool32 marker_visual_set_take_rule(Application_Links *app, Marker_Visual visual, Marker_Visual_Take_Rule take_rule){return(app->marker_visual_set_take_rule(app, visual, take_rule));}
static bool32 marker_visual_set_priority(Application_Links *app, Marker_Visual visual, Marker_Visual_Priority_Level priority){return(app->marker_visual_set_priority(app, visual, priority));}
static bool32 marker_visual_set_view_key(Application_Links *app, Marker_Visual visual, View_ID key_view_id){return(app->marker_visual_set_view_key(app, visual, key_view_id));}
static bool32 destroy_marker_visual(Application_Links *app, Marker_Visual visual){return(app->destroy_marker_visual(app, visual));}
static int32_t buffer_markers_get_attached_visual_count(Application_Links *app, Managed_Object object){return(app->buffer_markers_get_attached_visual_count(app, object));}
static Marker_Visual* buffer_markers_get_attached_visual(Application_Links *app, Partition *part, Managed_Object object){return(app->buffer_markers_get_attached_visual(app, part, object));}
static uint32_t managed_object_get_item_size(Application_Links *app, Managed_Object object){return(app->managed_object_get_item_size(app, object));}
static uint32_t managed_object_get_item_count(Application_Links *app, Managed_Object object){return(app->managed_object_get_item_count(app, object));}
static Managed_Object_Type managed_object_get_type(Application_Links *app, Managed_Object object){return(app->managed_object_get_type(app, object));}
static Managed_Scope managed_object_get_containing_scope(Application_Links *app, Managed_Object object){return(app->managed_object_get_containing_scope(app, object));}
static bool32 managed_object_free(Application_Links *app, Managed_Object object){return(app->managed_object_free(app, object));}
static bool32 managed_object_store_data(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem){return(app->managed_object_store_data(app, object, first_index, count, mem));}
static bool32 managed_object_load_data(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem_out){return(app->managed_object_load_data(app, object, first_index, count, mem_out));}
static User_Input get_user_input(Application_Links *app, Input_Type_Flag get_type, Input_Type_Flag abort_type){return(app->get_user_input(app, get_type, abort_type));}
static User_Input get_command_input(Application_Links *app){return(app->get_command_input(app));}
static void set_command_input(Application_Links *app, Key_Event_Data key_data){(app->set_command_input(app, key_data));}
static Mouse_State get_mouse_state(Application_Links *app){return(app->get_mouse_state(app));}
static int32_t get_active_query_bars(Application_Links *app, View_ID view_id, int32_t max_result_count, Query_Bar **result_array){return(app->get_active_query_bars(app, view_id, max_result_count, result_array));}
static bool32 start_query_bar(Application_Links *app, Query_Bar *bar, uint32_t flags){return(app->start_query_bar(app, bar, flags));}
static void end_query_bar(Application_Links *app, Query_Bar *bar, uint32_t flags){(app->end_query_bar(app, bar, flags));}
static void print_message(Application_Links *app, char *str, int32_t len){(app->print_message(app, str, len));}
static int32_t get_theme_count(Application_Links *app){return(app->get_theme_count(app));}
static String get_theme_name(Application_Links *app, struct Partition *arena, int32_t index){return(app->get_theme_name(app, arena, index));}
static void create_theme(Application_Links *app, Theme *theme, char *name, int32_t len){(app->create_theme(app, theme, name, len));}
static void change_theme(Application_Links *app, char *name, int32_t len){(app->change_theme(app, name, len));}
static bool32 change_theme_by_index(Application_Links *app, int32_t index){return(app->change_theme_by_index(app, index));}
static Face_ID get_largest_face_id(Application_Links *app){return(app->get_largest_face_id(app));}
static bool32 set_global_face(Application_Links *app, Face_ID id, bool32 apply_to_all_buffers){return(app->set_global_face(app, id, apply_to_all_buffers));}
static bool32 buffer_set_face(Application_Links *app, Buffer_Summary *buffer, Face_ID id){return(app->buffer_set_face(app, buffer, id));}
static Face_Description get_face_description(Application_Links *app, Face_ID id){return(app->get_face_description(app, id));}
static Face_ID get_face_id(Application_Links *app, Buffer_Summary *buffer){return(app->get_face_id(app, buffer));}
static Face_ID try_create_new_face(Application_Links *app, Face_Description *description){return(app->try_create_new_face(app, description));}
static bool32 try_modify_face(Application_Links *app, Face_ID id, Face_Description *description){return(app->try_modify_face(app, id, description));}
static bool32 try_release_face(Application_Links *app, Face_ID id, Face_ID replacement_id){return(app->try_release_face(app, id, replacement_id));}
static int32_t get_available_font_count(Application_Links *app){return(app->get_available_font_count(app));}
static Available_Font get_available_font(Application_Links *app, int32_t index){return(app->get_available_font(app, index));}
static void set_theme_colors(Application_Links *app, Theme_Color *colors, int32_t count){(app->set_theme_colors(app, colors, count));}
static void get_theme_colors(Application_Links *app, Theme_Color *colors, int32_t count){(app->get_theme_colors(app, colors, count));}
static int32_t directory_get_hot(Application_Links *app, char *out, int32_t capacity){return(app->directory_get_hot(app, out, capacity));}
static bool32 directory_set_hot(Application_Links *app, char *str, int32_t len){return(app->directory_set_hot(app, str, len));}
static File_List get_file_list(Application_Links *app, char *dir, int32_t len){return(app->get_file_list(app, dir, len));}
static void free_file_list(Application_Links *app, File_List list){(app->free_file_list(app, list));}
static void set_gui_up_down_keys(Application_Links *app, Key_Code up_key, Key_Modifier up_key_modifier, Key_Code down_key, Key_Modifier down_key_modifier){(app->set_gui_up_down_keys(app, up_key, up_key_modifier, down_key, down_key_modifier));}
static void* memory_allocate(Application_Links *app, int32_t size){return(app->memory_allocate(app, size));}
static bool32 memory_set_protection(Application_Links *app, void *ptr, int32_t size, Memory_Protect_Flags flags){return(app->memory_set_protection(app, ptr, size, flags));}
static void memory_free(Application_Links *app, void *ptr, int32_t size){(app->memory_free(app, ptr, size));}
static bool32 file_exists(Application_Links *app, char *filename, int32_t len){return(app->file_exists(app, filename, len));}
static bool32 directory_cd(Application_Links *app, char *dir, int32_t *len, int32_t capacity, char *rel_path, int32_t rel_len){return(app->directory_cd(app, dir, len, capacity, rel_path, rel_len));}
static int32_t get_4ed_path(Application_Links *app, char *out, int32_t capacity){return(app->get_4ed_path(app, out, capacity));}
static void show_mouse_cursor(Application_Links *app, Mouse_Cursor_Show_Type show){(app->show_mouse_cursor(app, show));}
static bool32 set_fullscreen(Application_Links *app, bool32 full_screen){return(app->set_fullscreen(app, full_screen));}
static bool32 is_fullscreen(Application_Links *app){return(app->is_fullscreen(app));}
static void send_exit_signal(Application_Links *app){(app->send_exit_signal(app));}
static void set_window_title(Application_Links *app, char *title){(app->set_window_title(app, title));}
static Microsecond_Time_Stamp get_microseconds_timestamp(Application_Links *app){return(app->get_microseconds_timestamp(app));}
static float draw_string(Application_Links *app, Face_ID font_id, String str, int32_t x, int32_t y, int_color color, uint32_t flags, float dx, float dy){return(app->draw_string(app, font_id, str, x, y, color, flags, dx, dy));}
static float get_string_advance(Application_Links *app, Face_ID font_id, String str){return(app->get_string_advance(app, font_id, str));}
static void draw_rectangle(Application_Links *app, f32_Rect rect, int_color color){(app->draw_rectangle(app, rect, color));}
static void draw_rectangle_outline(Application_Links *app, f32_Rect rect, int_color color){(app->draw_rectangle_outline(app, rect, color));}
static Face_ID get_default_font_for_view(Application_Links *app, View_ID view_id){return(app->get_default_font_for_view(app, view_id));}
#else
static inline bool32 global_set_setting(Application_Links *app, Global_Setting_ID setting, int32_t value){return(app->global_set_setting_(app, setting, value));}
static inline bool32 global_set_mapping(Application_Links *app, void *data, int32_t size){return(app->global_set_mapping_(app, data, size));}
static inline bool32 exec_command(Application_Links *app, Command_ID command_id){return(app->exec_command_(app, command_id));}
static inline bool32 exec_system_command(Application_Links *app, View_Summary *view, Buffer_Identifier buffer_id, char *path, int32_t path_len, char *command, int32_t command_len, Command_Line_Interface_Flag flags){return(app->exec_system_command_(app, view, buffer_id, path, path_len, command, command_len, flags));}
static inline void clipboard_post(Application_Links *app, int32_t clipboard_id, char *str, int32_t len){(app->clipboard_post_(app, clipboard_id, str, len));}
static inline int32_t clipboard_count(Application_Links *app, int32_t clipboard_id){return(app->clipboard_count_(app, clipboard_id));}
static inline int32_t clipboard_index(Application_Links *app, int32_t clipboard_id, int32_t item_index, char *out, int32_t len){return(app->clipboard_index_(app, clipboard_id, item_index, out, len));}
static inline Parse_Context_ID create_parse_context(Application_Links *app, Parser_String_And_Type *kw, uint32_t kw_count, Parser_String_And_Type *pp, uint32_t pp_count){return(app->create_parse_context_(app, kw, kw_count, pp, pp_count));}
static inline int32_t get_buffer_count(Application_Links *app){return(app->get_buffer_count_(app));}
static inline Buffer_Summary get_buffer_first(Application_Links *app, Access_Flag access){return(app->get_buffer_first_(app, access));}
static inline void get_buffer_next(Application_Links *app, Buffer_Summary *buffer, Access_Flag access){(app->get_buffer_next_(app, buffer, access));}
static inline Buffer_Summary get_buffer(Application_Links *app, Buffer_ID buffer_id, Access_Flag access){return(app->get_buffer_(app, buffer_id, access));}
static inline Buffer_Summary get_buffer_by_name(Application_Links *app, char *name, int32_t len, Access_Flag access){return(app->get_buffer_by_name_(app, name, len, access));}
static inline Buffer_Summary get_buffer_by_file_name(Application_Links *app, char *name, int32_t len, Access_Flag access){return(app->get_buffer_by_file_name_(app, name, len, access));}
static inline bool32 buffer_read_range(Application_Links *app, Buffer_Summary *buffer, int32_t start, int32_t end, char *out){return(app->buffer_read_range_(app, buffer, start, end, out));}
static inline bool32 buffer_replace_range(Application_Links *app, Buffer_Summary *buffer, int32_t start, int32_t end, char *str, int32_t len){return(app->buffer_replace_range_(app, buffer, start, end, str, len));}
static inline bool32 buffer_compute_cursor(Application_Links *app, Buffer_Summary *buffer, Buffer_Seek seek, Partial_Cursor *cursor_out){return(app->buffer_compute_cursor_(app, buffer, seek, cursor_out));}
static inline bool32 buffer_batch_edit(Application_Links *app, Buffer_Summary *buffer, char *str, int32_t str_len, Buffer_Edit *edits, int32_t edit_count, Buffer_Batch_Edit_Type type){return(app->buffer_batch_edit_(app, buffer, str, str_len, edits, edit_count, type));}
static inline bool32 buffer_get_setting(Application_Links *app, Buffer_Summary *buffer, Buffer_Setting_ID setting, int32_t *value_out){return(app->buffer_get_setting_(app, buffer, setting, value_out));}
static inline bool32 buffer_set_setting(Application_Links *app, Buffer_Summary *buffer, Buffer_Setting_ID setting, int32_t value){return(app->buffer_set_setting_(app, buffer, setting, value));}
static inline Managed_Scope buffer_get_managed_scope(Application_Links *app, Buffer_ID buffer_id){return(app->buffer_get_managed_scope_(app, buffer_id));}
static inline int32_t buffer_token_count(Application_Links *app, Buffer_Summary *buffer){return(app->buffer_token_count_(app, buffer));}
static inline bool32 buffer_read_tokens(Application_Links *app, Buffer_Summary *buffer, int32_t start_token, int32_t end_token, Cpp_Token *tokens_out){return(app->buffer_read_tokens_(app, buffer, start_token, end_token, tokens_out));}
static inline bool32 buffer_get_token_index(Application_Links *app, Buffer_Summary *buffer, int32_t pos, Cpp_Get_Token_Result *get_result){return(app->buffer_get_token_index_(app, buffer, pos, get_result));}
static inline bool32 buffer_send_end_signal(Application_Links *app, Buffer_Summary *buffer){return(app->buffer_send_end_signal_(app, buffer));}
static inline Buffer_Summary create_buffer(Application_Links *app, char *filename, int32_t filename_len, Buffer_Create_Flag flags){return(app->create_buffer_(app, filename, filename_len, flags));}
static inline bool32 save_buffer(Application_Links *app, Buffer_Summary *buffer, char *file_name, int32_t file_name_len, uint32_t flags){return(app->save_buffer_(app, buffer, file_name, file_name_len, flags));}
static inline Buffer_Kill_Result kill_buffer(Application_Links *app, Buffer_Identifier buffer, Buffer_Kill_Flag flags){return(app->kill_buffer_(app, buffer, flags));}
static inline Buffer_Reopen_Result reopen_buffer(Application_Links *app, Buffer_Summary *buffer, Buffer_Reopen_Flag flags){return(app->reopen_buffer_(app, buffer, flags));}
static inline View_Summary get_view_first(Application_Links *app, Access_Flag access){return(app->get_view_first_(app, access));}
static inline void get_view_next(Application_Links *app, View_Summary *view, Access_Flag access){(app->get_view_next_(app, view, access));}
static inline View_Summary get_view(Application_Links *app, View_ID view_id, Access_Flag access){return(app->get_view_(app, view_id, access));}
static inline View_Summary get_active_view(Application_Links *app, Access_Flag access){return(app->get_active_view_(app, access));}
static inline View_Summary open_view(Application_Links *app, View_Summary *view_location, View_Split_Position position){return(app->open_view_(app, view_location, position));}
static inline bool32 close_view(Application_Links *app, View_Summary *view){return(app->close_view_(app, view));}
static inline bool32 set_active_view(Application_Links *app, View_Summary *view){return(app->set_active_view_(app, view));}
static inline bool32 view_get_setting(Application_Links *app, View_Summary *view, View_Setting_ID setting, int32_t *value_out){return(app->view_get_setting_(app, view, setting, value_out));}
static inline bool32 view_set_setting(Application_Links *app, View_Summary *view, View_Setting_ID setting, int32_t value){return(app->view_set_setting_(app, view, setting, value));}
static inline Managed_Scope view_get_managed_scope(Application_Links *app, View_ID view_id){return(app->view_get_managed_scope_(app, view_id));}
static inline bool32 view_set_split_proportion(Application_Links *app, View_Summary *view, float t){return(app->view_set_split_proportion_(app, view, t));}
static inline i32_Rect view_get_enclosure_rect(Application_Links *app, View_Summary *view){return(app->view_get_enclosure_rect_(app, view));}
static inline bool32 view_compute_cursor(Application_Links *app, View_Summary *view, Buffer_Seek seek, Full_Cursor *cursor_out){return(app->view_compute_cursor_(app, view, seek, cursor_out));}
static inline bool32 view_set_cursor(Application_Links *app, View_Summary *view, Buffer_Seek seek, bool32 set_preferred_x){return(app->view_set_cursor_(app, view, seek, set_preferred_x));}
static inline bool32 view_set_scroll(Application_Links *app, View_Summary *view, GUI_Scroll_Vars scroll){return(app->view_set_scroll_(app, view, scroll));}
static inline bool32 view_set_mark(Application_Links *app, View_Summary *view, Buffer_Seek seek){return(app->view_set_mark_(app, view, seek));}
static inline bool32 view_set_highlight(Application_Links *app, View_Summary *view, int32_t start, int32_t end, bool32 turn_on){return(app->view_set_highlight_(app, view, start, end, turn_on));}
static inline bool32 view_set_buffer(Application_Links *app, View_Summary *view, Buffer_ID buffer_id, Set_Buffer_Flag flags){return(app->view_set_buffer_(app, view, buffer_id, flags));}
static inline bool32 view_post_fade(Application_Links *app, View_Summary *view, float seconds, int32_t start, int32_t end, int_color color){return(app->view_post_fade_(app, view, seconds, start, end, color));}
static inline bool32 view_begin_ui_mode(Application_Links *app, View_Summary *view){return(app->view_begin_ui_mode_(app, view));}
static inline bool32 view_end_ui_mode(Application_Links *app, View_Summary *view){return(app->view_end_ui_mode_(app, view));}
static inline bool32 view_set_ui(Application_Links *app, View_Summary *view, UI_Control *control, UI_Quit_Function_Type *quit_function){return(app->view_set_ui_(app, view, control, quit_function));}
static inline UI_Control view_get_ui_copy(Application_Links *app, View_Summary *view, struct Partition *part){return(app->view_get_ui_copy_(app, view, part));}
static inline Managed_Scope create_user_managed_scope(Application_Links *app){return(app->create_user_managed_scope_(app));}
static inline bool32 destroy_user_managed_scope(Application_Links *app, Managed_Scope scope){return(app->destroy_user_managed_scope_(app, scope));}
static inline Managed_Scope get_global_managed_scope(Application_Links *app){return(app->get_global_managed_scope_(app));}
static inline Managed_Scope get_managed_scope_with_multiple_dependencies(Application_Links *app, Managed_Scope *scopes, int32_t count){return(app->get_managed_scope_with_multiple_dependencies_(app, scopes, count));}
static inline bool32 managed_scope_clear_contents(Application_Links *app, Managed_Scope scope){return(app->managed_scope_clear_contents_(app, scope));}
static inline bool32 managed_scope_clear_self_all_dependent_scopes(Application_Links *app, Managed_Scope scope){return(app->managed_scope_clear_self_all_dependent_scopes_(app, scope));}
static inline Managed_Variable_ID managed_variable_create(Application_Links *app, char *null_terminated_name, uint64_t default_value){return(app->managed_variable_create_(app, null_terminated_name, default_value));}
static inline Managed_Variable_ID managed_variable_get_id(Application_Links *app, char *null_terminated_name){return(app->managed_variable_get_id_(app, null_terminated_name));}
static inline Managed_Variable_ID managed_variable_create_or_get_id(Application_Links *app, char *null_terminated_name, uint64_t default_value){return(app->managed_variable_create_or_get_id_(app, null_terminated_name, default_value));}
static inline bool32 managed_variable_set(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t value){return(app->managed_variable_set_(app, scope, id, value));}
static inline bool32 managed_variable_get(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t *value_out){return(app->managed_variable_get_(app, scope, id, value_out));}
static inline Managed_Object alloc_managed_memory_in_scope(Application_Links *app, Managed_Scope scope, int32_t item_size, int32_t count){return(app->alloc_managed_memory_in_scope_(app, scope, item_size, count));}
static inline Managed_Object alloc_buffer_markers_on_buffer(Application_Links *app, Buffer_ID buffer_id, int32_t count, Managed_Scope *optional_extra_scope){return(app->alloc_buffer_markers_on_buffer_(app, buffer_id, count, optional_extra_scope));}
static inline Marker_Visual create_marker_visual(Application_Links *app, Managed_Object object){return(app->create_marker_visual_(app, object));}
static inline bool32 marker_visual_set_effect(Application_Links *app, Marker_Visual visual, Marker_Visual_Type type, int_color color, int_color text_color, Marker_Visual_Text_Style text_style){return(app->marker_visual_set_effect_(app, visual, type, color, text_color, text_style));}
static inline bool32 marker_visual_set_take_rule(Application_Links *app, Marker_Visual visual, Marker_Visual_Take_Rule take_rule){return(app->marker_visual_set_take_rule_(app, visual, take_rule));}
static inline bool32 marker_visual_set_priority(Application_Links *app, Marker_Visual visual, Marker_Visual_Priority_Level priority){return(app->marker_visual_set_priority_(app, visual, priority));}
static inline bool32 marker_visual_set_view_key(Application_Links *app, Marker_Visual visual, View_ID key_view_id){return(app->marker_visual_set_view_key_(app, visual, key_view_id));}
static inline bool32 destroy_marker_visual(Application_Links *app, Marker_Visual visual){return(app->destroy_marker_visual_(app, visual));}
static inline int32_t buffer_markers_get_attached_visual_count(Application_Links *app, Managed_Object object){return(app->buffer_markers_get_attached_visual_count_(app, object));}
static inline Marker_Visual* buffer_markers_get_attached_visual(Application_Links *app, Partition *part, Managed_Object object){return(app->buffer_markers_get_attached_visual_(app, part, object));}
static inline uint32_t managed_object_get_item_size(Application_Links *app, Managed_Object object){return(app->managed_object_get_item_size_(app, object));}
static inline uint32_t managed_object_get_item_count(Application_Links *app, Managed_Object object){return(app->managed_object_get_item_count_(app, object));}
static inline Managed_Object_Type managed_object_get_type(Application_Links *app, Managed_Object object){return(app->managed_object_get_type_(app, object));}
static inline Managed_Scope managed_object_get_containing_scope(Application_Links *app, Managed_Object object){return(app->managed_object_get_containing_scope_(app, object));}
static inline bool32 managed_object_free(Application_Links *app, Managed_Object object){return(app->managed_object_free_(app, object));}
static inline bool32 managed_object_store_data(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem){return(app->managed_object_store_data_(app, object, first_index, count, mem));}
static inline bool32 managed_object_load_data(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem_out){return(app->managed_object_load_data_(app, object, first_index, count, mem_out));}
static inline User_Input get_user_input(Application_Links *app, Input_Type_Flag get_type, Input_Type_Flag abort_type){return(app->get_user_input_(app, get_type, abort_type));}
static inline User_Input get_command_input(Application_Links *app){return(app->get_command_input_(app));}
static inline void set_command_input(Application_Links *app, Key_Event_Data key_data){(app->set_command_input_(app, key_data));}
static inline Mouse_State get_mouse_state(Application_Links *app){return(app->get_mouse_state_(app));}
static inline int32_t get_active_query_bars(Application_Links *app, View_ID view_id, int32_t max_result_count, Query_Bar **result_array){return(app->get_active_query_bars_(app, view_id, max_result_count, result_array));}
static inline bool32 start_query_bar(Application_Links *app, Query_Bar *bar, uint32_t flags){return(app->start_query_bar_(app, bar, flags));}
static inline void end_query_bar(Application_Links *app, Query_Bar *bar, uint32_t flags){(app->end_query_bar_(app, bar, flags));}
static inline void print_message(Application_Links *app, char *str, int32_t len){(app->print_message_(app, str, len));}
static inline int32_t get_theme_count(Application_Links *app){return(app->get_theme_count_(app));}
static inline String get_theme_name(Application_Links *app, struct Partition *arena, int32_t index){return(app->get_theme_name_(app, arena, index));}
static inline void create_theme(Application_Links *app, Theme *theme, char *name, int32_t len){(app->create_theme_(app, theme, name, len));}
static inline void change_theme(Application_Links *app, char *name, int32_t len){(app->change_theme_(app, name, len));}
static inline bool32 change_theme_by_index(Application_Links *app, int32_t index){return(app->change_theme_by_index_(app, index));}
static inline Face_ID get_largest_face_id(Application_Links *app){return(app->get_largest_face_id_(app));}
static inline bool32 set_global_face(Application_Links *app, Face_ID id, bool32 apply_to_all_buffers){return(app->set_global_face_(app, id, apply_to_all_buffers));}
static inline bool32 buffer_set_face(Application_Links *app, Buffer_Summary *buffer, Face_ID id){return(app->buffer_set_face_(app, buffer, id));}
static inline Face_Description get_face_description(Application_Links *app, Face_ID id){return(app->get_face_description_(app, id));}
static inline Face_ID get_face_id(Application_Links *app, Buffer_Summary *buffer){return(app->get_face_id_(app, buffer));}
static inline Face_ID try_create_new_face(Application_Links *app, Face_Description *description){return(app->try_create_new_face_(app, description));}
static inline bool32 try_modify_face(Application_Links *app, Face_ID id, Face_Description *description){return(app->try_modify_face_(app, id, description));}
static inline bool32 try_release_face(Application_Links *app, Face_ID id, Face_ID replacement_id){return(app->try_release_face_(app, id, replacement_id));}
static inline int32_t get_available_font_count(Application_Links *app){return(app->get_available_font_count_(app));}
static inline Available_Font get_available_font(Application_Links *app, int32_t index){return(app->get_available_font_(app, index));}
static inline void set_theme_colors(Application_Links *app, Theme_Color *colors, int32_t count){(app->set_theme_colors_(app, colors, count));}
static inline void get_theme_colors(Application_Links *app, Theme_Color *colors, int32_t count){(app->get_theme_colors_(app, colors, count));}
static inline int32_t directory_get_hot(Application_Links *app, char *out, int32_t capacity){return(app->directory_get_hot_(app, out, capacity));}
static inline bool32 directory_set_hot(Application_Links *app, char *str, int32_t len){return(app->directory_set_hot_(app, str, len));}
static inline File_List get_file_list(Application_Links *app, char *dir, int32_t len){return(app->get_file_list_(app, dir, len));}
static inline void free_file_list(Application_Links *app, File_List list){(app->free_file_list_(app, list));}
static inline void set_gui_up_down_keys(Application_Links *app, Key_Code up_key, Key_Modifier up_key_modifier, Key_Code down_key, Key_Modifier down_key_modifier){(app->set_gui_up_down_keys_(app, up_key, up_key_modifier, down_key, down_key_modifier));}
static inline void* memory_allocate(Application_Links *app, int32_t size){return(app->memory_allocate_(app, size));}
static inline bool32 memory_set_protection(Application_Links *app, void *ptr, int32_t size, Memory_Protect_Flags flags){return(app->memory_set_protection_(app, ptr, size, flags));}
static inline void memory_free(Application_Links *app, void *ptr, int32_t size){(app->memory_free_(app, ptr, size));}
static inline bool32 file_exists(Application_Links *app, char *filename, int32_t len){return(app->file_exists_(app, filename, len));}
static inline bool32 directory_cd(Application_Links *app, char *dir, int32_t *len, int32_t capacity, char *rel_path, int32_t rel_len){return(app->directory_cd_(app, dir, len, capacity, rel_path, rel_len));}
static inline int32_t get_4ed_path(Application_Links *app, char *out, int32_t capacity){return(app->get_4ed_path_(app, out, capacity));}
static inline void show_mouse_cursor(Application_Links *app, Mouse_Cursor_Show_Type show){(app->show_mouse_cursor_(app, show));}
static inline bool32 set_fullscreen(Application_Links *app, bool32 full_screen){return(app->set_fullscreen_(app, full_screen));}
static inline bool32 is_fullscreen(Application_Links *app){return(app->is_fullscreen_(app));}
static inline void send_exit_signal(Application_Links *app){(app->send_exit_signal_(app));}
static inline void set_window_title(Application_Links *app, char *title){(app->set_window_title_(app, title));}
static inline Microsecond_Time_Stamp get_microseconds_timestamp(Application_Links *app){return(app->get_microseconds_timestamp_(app));}
static inline float draw_string(Application_Links *app, Face_ID font_id, String str, int32_t x, int32_t y, int_color color, uint32_t flags, float dx, float dy){return(app->draw_string_(app, font_id, str, x, y, color, flags, dx, dy));}
static inline float get_string_advance(Application_Links *app, Face_ID font_id, String str){return(app->get_string_advance_(app, font_id, str));}
static inline void draw_rectangle(Application_Links *app, f32_Rect rect, int_color color){(app->draw_rectangle_(app, rect, color));}
static inline void draw_rectangle_outline(Application_Links *app, f32_Rect rect, int_color color){(app->draw_rectangle_outline_(app, rect, color));}
static inline Face_ID get_default_font_for_view(Application_Links *app, View_ID view_id){return(app->get_default_font_for_view_(app, view_id));}
static bool32 global_set_setting(Application_Links *app, Global_Setting_ID setting, int32_t value){return(app->global_set_setting_(app, setting, value));}
static bool32 global_set_mapping(Application_Links *app, void *data, int32_t size){return(app->global_set_mapping_(app, data, size));}
static bool32 exec_command(Application_Links *app, Command_ID command_id){return(app->exec_command_(app, command_id));}
static bool32 exec_system_command(Application_Links *app, View_Summary *view, Buffer_Identifier buffer_id, char *path, int32_t path_len, char *command, int32_t command_len, Command_Line_Interface_Flag flags){return(app->exec_system_command_(app, view, buffer_id, path, path_len, command, command_len, flags));}
static void clipboard_post(Application_Links *app, int32_t clipboard_id, char *str, int32_t len){(app->clipboard_post_(app, clipboard_id, str, len));}
static int32_t clipboard_count(Application_Links *app, int32_t clipboard_id){return(app->clipboard_count_(app, clipboard_id));}
static int32_t clipboard_index(Application_Links *app, int32_t clipboard_id, int32_t item_index, char *out, int32_t len){return(app->clipboard_index_(app, clipboard_id, item_index, out, len));}
static Parse_Context_ID create_parse_context(Application_Links *app, Parser_String_And_Type *kw, uint32_t kw_count, Parser_String_And_Type *pp, uint32_t pp_count){return(app->create_parse_context_(app, kw, kw_count, pp, pp_count));}
static int32_t get_buffer_count(Application_Links *app){return(app->get_buffer_count_(app));}
static Buffer_Summary get_buffer_first(Application_Links *app, Access_Flag access){return(app->get_buffer_first_(app, access));}
static void get_buffer_next(Application_Links *app, Buffer_Summary *buffer, Access_Flag access){(app->get_buffer_next_(app, buffer, access));}
static Buffer_Summary get_buffer(Application_Links *app, Buffer_ID buffer_id, Access_Flag access){return(app->get_buffer_(app, buffer_id, access));}
static Buffer_Summary get_buffer_by_name(Application_Links *app, char *name, int32_t len, Access_Flag access){return(app->get_buffer_by_name_(app, name, len, access));}
static Buffer_Summary get_buffer_by_file_name(Application_Links *app, char *name, int32_t len, Access_Flag access){return(app->get_buffer_by_file_name_(app, name, len, access));}
static bool32 buffer_read_range(Application_Links *app, Buffer_Summary *buffer, int32_t start, int32_t end, char *out){return(app->buffer_read_range_(app, buffer, start, end, out));}
static bool32 buffer_replace_range(Application_Links *app, Buffer_Summary *buffer, int32_t start, int32_t end, char *str, int32_t len){return(app->buffer_replace_range_(app, buffer, start, end, str, len));}
static bool32 buffer_compute_cursor(Application_Links *app, Buffer_Summary *buffer, Buffer_Seek seek, Partial_Cursor *cursor_out){return(app->buffer_compute_cursor_(app, buffer, seek, cursor_out));}
static bool32 buffer_batch_edit(Application_Links *app, Buffer_Summary *buffer, char *str, int32_t str_len, Buffer_Edit *edits, int32_t edit_count, Buffer_Batch_Edit_Type type){return(app->buffer_batch_edit_(app, buffer, str, str_len, edits, edit_count, type));}
static bool32 buffer_get_setting(Application_Links *app, Buffer_Summary *buffer, Buffer_Setting_ID setting, int32_t *value_out){return(app->buffer_get_setting_(app, buffer, setting, value_out));}
static bool32 buffer_set_setting(Application_Links *app, Buffer_Summary *buffer, Buffer_Setting_ID setting, int32_t value){return(app->buffer_set_setting_(app, buffer, setting, value));}
static Managed_Scope buffer_get_managed_scope(Application_Links *app, Buffer_ID buffer_id){return(app->buffer_get_managed_scope_(app, buffer_id));}
static int32_t buffer_token_count(Application_Links *app, Buffer_Summary *buffer){return(app->buffer_token_count_(app, buffer));}
static bool32 buffer_read_tokens(Application_Links *app, Buffer_Summary *buffer, int32_t start_token, int32_t end_token, Cpp_Token *tokens_out){return(app->buffer_read_tokens_(app, buffer, start_token, end_token, tokens_out));}
static bool32 buffer_get_token_index(Application_Links *app, Buffer_Summary *buffer, int32_t pos, Cpp_Get_Token_Result *get_result){return(app->buffer_get_token_index_(app, buffer, pos, get_result));}
static bool32 buffer_send_end_signal(Application_Links *app, Buffer_Summary *buffer){return(app->buffer_send_end_signal_(app, buffer));}
static Buffer_Summary create_buffer(Application_Links *app, char *filename, int32_t filename_len, Buffer_Create_Flag flags){return(app->create_buffer_(app, filename, filename_len, flags));}
static bool32 save_buffer(Application_Links *app, Buffer_Summary *buffer, char *file_name, int32_t file_name_len, uint32_t flags){return(app->save_buffer_(app, buffer, file_name, file_name_len, flags));}
static Buffer_Kill_Result kill_buffer(Application_Links *app, Buffer_Identifier buffer, Buffer_Kill_Flag flags){return(app->kill_buffer_(app, buffer, flags));}
static Buffer_Reopen_Result reopen_buffer(Application_Links *app, Buffer_Summary *buffer, Buffer_Reopen_Flag flags){return(app->reopen_buffer_(app, buffer, flags));}
static View_Summary get_view_first(Application_Links *app, Access_Flag access){return(app->get_view_first_(app, access));}
static void get_view_next(Application_Links *app, View_Summary *view, Access_Flag access){(app->get_view_next_(app, view, access));}
static View_Summary get_view(Application_Links *app, View_ID view_id, Access_Flag access){return(app->get_view_(app, view_id, access));}
static View_Summary get_active_view(Application_Links *app, Access_Flag access){return(app->get_active_view_(app, access));}
static View_Summary open_view(Application_Links *app, View_Summary *view_location, View_Split_Position position){return(app->open_view_(app, view_location, position));}
static bool32 close_view(Application_Links *app, View_Summary *view){return(app->close_view_(app, view));}
static bool32 set_active_view(Application_Links *app, View_Summary *view){return(app->set_active_view_(app, view));}
static bool32 view_get_setting(Application_Links *app, View_Summary *view, View_Setting_ID setting, int32_t *value_out){return(app->view_get_setting_(app, view, setting, value_out));}
static bool32 view_set_setting(Application_Links *app, View_Summary *view, View_Setting_ID setting, int32_t value){return(app->view_set_setting_(app, view, setting, value));}
static Managed_Scope view_get_managed_scope(Application_Links *app, View_ID view_id){return(app->view_get_managed_scope_(app, view_id));}
static bool32 view_set_split_proportion(Application_Links *app, View_Summary *view, float t){return(app->view_set_split_proportion_(app, view, t));}
static i32_Rect view_get_enclosure_rect(Application_Links *app, View_Summary *view){return(app->view_get_enclosure_rect_(app, view));}
static bool32 view_compute_cursor(Application_Links *app, View_Summary *view, Buffer_Seek seek, Full_Cursor *cursor_out){return(app->view_compute_cursor_(app, view, seek, cursor_out));}
static bool32 view_set_cursor(Application_Links *app, View_Summary *view, Buffer_Seek seek, bool32 set_preferred_x){return(app->view_set_cursor_(app, view, seek, set_preferred_x));}
static bool32 view_set_scroll(Application_Links *app, View_Summary *view, GUI_Scroll_Vars scroll){return(app->view_set_scroll_(app, view, scroll));}
static bool32 view_set_mark(Application_Links *app, View_Summary *view, Buffer_Seek seek){return(app->view_set_mark_(app, view, seek));}
static bool32 view_set_highlight(Application_Links *app, View_Summary *view, int32_t start, int32_t end, bool32 turn_on){return(app->view_set_highlight_(app, view, start, end, turn_on));}
static bool32 view_set_buffer(Application_Links *app, View_Summary *view, Buffer_ID buffer_id, Set_Buffer_Flag flags){return(app->view_set_buffer_(app, view, buffer_id, flags));}
static bool32 view_post_fade(Application_Links *app, View_Summary *view, float seconds, int32_t start, int32_t end, int_color color){return(app->view_post_fade_(app, view, seconds, start, end, color));}
static bool32 view_begin_ui_mode(Application_Links *app, View_Summary *view){return(app->view_begin_ui_mode_(app, view));}
static bool32 view_end_ui_mode(Application_Links *app, View_Summary *view){return(app->view_end_ui_mode_(app, view));}
static bool32 view_set_ui(Application_Links *app, View_Summary *view, UI_Control *control, UI_Quit_Function_Type *quit_function){return(app->view_set_ui_(app, view, control, quit_function));}
static UI_Control view_get_ui_copy(Application_Links *app, View_Summary *view, struct Partition *part){return(app->view_get_ui_copy_(app, view, part));}
static Managed_Scope create_user_managed_scope(Application_Links *app){return(app->create_user_managed_scope_(app));}
static bool32 destroy_user_managed_scope(Application_Links *app, Managed_Scope scope){return(app->destroy_user_managed_scope_(app, scope));}
static Managed_Scope get_global_managed_scope(Application_Links *app){return(app->get_global_managed_scope_(app));}
static Managed_Scope get_managed_scope_with_multiple_dependencies(Application_Links *app, Managed_Scope *scopes, int32_t count){return(app->get_managed_scope_with_multiple_dependencies_(app, scopes, count));}
static bool32 managed_scope_clear_contents(Application_Links *app, Managed_Scope scope){return(app->managed_scope_clear_contents_(app, scope));}
static bool32 managed_scope_clear_self_all_dependent_scopes(Application_Links *app, Managed_Scope scope){return(app->managed_scope_clear_self_all_dependent_scopes_(app, scope));}
static Managed_Variable_ID managed_variable_create(Application_Links *app, char *null_terminated_name, uint64_t default_value){return(app->managed_variable_create_(app, null_terminated_name, default_value));}
static Managed_Variable_ID managed_variable_get_id(Application_Links *app, char *null_terminated_name){return(app->managed_variable_get_id_(app, null_terminated_name));}
static Managed_Variable_ID managed_variable_create_or_get_id(Application_Links *app, char *null_terminated_name, uint64_t default_value){return(app->managed_variable_create_or_get_id_(app, null_terminated_name, default_value));}
static bool32 managed_variable_set(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t value){return(app->managed_variable_set_(app, scope, id, value));}
static bool32 managed_variable_get(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t *value_out){return(app->managed_variable_get_(app, scope, id, value_out));}
static Managed_Object alloc_managed_memory_in_scope(Application_Links *app, Managed_Scope scope, int32_t item_size, int32_t count){return(app->alloc_managed_memory_in_scope_(app, scope, item_size, count));}
static Managed_Object alloc_buffer_markers_on_buffer(Application_Links *app, Buffer_ID buffer_id, int32_t count, Managed_Scope *optional_extra_scope){return(app->alloc_buffer_markers_on_buffer_(app, buffer_id, count, optional_extra_scope));}
static Marker_Visual create_marker_visual(Application_Links *app, Managed_Object object){return(app->create_marker_visual_(app, object));}
static bool32 marker_visual_set_effect(Application_Links *app, Marker_Visual visual, Marker_Visual_Type type, int_color color, int_color text_color, Marker_Visual_Text_Style text_style){return(app->marker_visual_set_effect_(app, visual, type, color, text_color, text_style));}
static bool32 marker_visual_set_take_rule(Application_Links *app, Marker_Visual visual, Marker_Visual_Take_Rule take_rule){return(app->marker_visual_set_take_rule_(app, visual, take_rule));}
static bool32 marker_visual_set_priority(Application_Links *app, Marker_Visual visual, Marker_Visual_Priority_Level priority){return(app->marker_visual_set_priority_(app, visual, priority));}
static bool32 marker_visual_set_view_key(Application_Links *app, Marker_Visual visual, View_ID key_view_id){return(app->marker_visual_set_view_key_(app, visual, key_view_id));}
static bool32 destroy_marker_visual(Application_Links *app, Marker_Visual visual){return(app->destroy_marker_visual_(app, visual));}
static int32_t buffer_markers_get_attached_visual_count(Application_Links *app, Managed_Object object){return(app->buffer_markers_get_attached_visual_count_(app, object));}
static Marker_Visual* buffer_markers_get_attached_visual(Application_Links *app, Partition *part, Managed_Object object){return(app->buffer_markers_get_attached_visual_(app, part, object));}
static uint32_t managed_object_get_item_size(Application_Links *app, Managed_Object object){return(app->managed_object_get_item_size_(app, object));}
static uint32_t managed_object_get_item_count(Application_Links *app, Managed_Object object){return(app->managed_object_get_item_count_(app, object));}
static Managed_Object_Type managed_object_get_type(Application_Links *app, Managed_Object object){return(app->managed_object_get_type_(app, object));}
static Managed_Scope managed_object_get_containing_scope(Application_Links *app, Managed_Object object){return(app->managed_object_get_containing_scope_(app, object));}
static bool32 managed_object_free(Application_Links *app, Managed_Object object){return(app->managed_object_free_(app, object));}
static bool32 managed_object_store_data(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem){return(app->managed_object_store_data_(app, object, first_index, count, mem));}
static bool32 managed_object_load_data(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem_out){return(app->managed_object_load_data_(app, object, first_index, count, mem_out));}
static User_Input get_user_input(Application_Links *app, Input_Type_Flag get_type, Input_Type_Flag abort_type){return(app->get_user_input_(app, get_type, abort_type));}
static User_Input get_command_input(Application_Links *app){return(app->get_command_input_(app));}
static void set_command_input(Application_Links *app, Key_Event_Data key_data){(app->set_command_input_(app, key_data));}
static Mouse_State get_mouse_state(Application_Links *app){return(app->get_mouse_state_(app));}
static int32_t get_active_query_bars(Application_Links *app, View_ID view_id, int32_t max_result_count, Query_Bar **result_array){return(app->get_active_query_bars_(app, view_id, max_result_count, result_array));}
static bool32 start_query_bar(Application_Links *app, Query_Bar *bar, uint32_t flags){return(app->start_query_bar_(app, bar, flags));}
static void end_query_bar(Application_Links *app, Query_Bar *bar, uint32_t flags){(app->end_query_bar_(app, bar, flags));}
static void print_message(Application_Links *app, char *str, int32_t len){(app->print_message_(app, str, len));}
static int32_t get_theme_count(Application_Links *app){return(app->get_theme_count_(app));}
static String get_theme_name(Application_Links *app, struct Partition *arena, int32_t index){return(app->get_theme_name_(app, arena, index));}
static void create_theme(Application_Links *app, Theme *theme, char *name, int32_t len){(app->create_theme_(app, theme, name, len));}
static void change_theme(Application_Links *app, char *name, int32_t len){(app->change_theme_(app, name, len));}
static bool32 change_theme_by_index(Application_Links *app, int32_t index){return(app->change_theme_by_index_(app, index));}
static Face_ID get_largest_face_id(Application_Links *app){return(app->get_largest_face_id_(app));}
static bool32 set_global_face(Application_Links *app, Face_ID id, bool32 apply_to_all_buffers){return(app->set_global_face_(app, id, apply_to_all_buffers));}
static bool32 buffer_set_face(Application_Links *app, Buffer_Summary *buffer, Face_ID id){return(app->buffer_set_face_(app, buffer, id));}
static Face_Description get_face_description(Application_Links *app, Face_ID id){return(app->get_face_description_(app, id));}
static Face_ID get_face_id(Application_Links *app, Buffer_Summary *buffer){return(app->get_face_id_(app, buffer));}
static Face_ID try_create_new_face(Application_Links *app, Face_Description *description){return(app->try_create_new_face_(app, description));}
static bool32 try_modify_face(Application_Links *app, Face_ID id, Face_Description *description){return(app->try_modify_face_(app, id, description));}
static bool32 try_release_face(Application_Links *app, Face_ID id, Face_ID replacement_id){return(app->try_release_face_(app, id, replacement_id));}
static int32_t get_available_font_count(Application_Links *app){return(app->get_available_font_count_(app));}
static Available_Font get_available_font(Application_Links *app, int32_t index){return(app->get_available_font_(app, index));}
static void set_theme_colors(Application_Links *app, Theme_Color *colors, int32_t count){(app->set_theme_colors_(app, colors, count));}
static void get_theme_colors(Application_Links *app, Theme_Color *colors, int32_t count){(app->get_theme_colors_(app, colors, count));}
static int32_t directory_get_hot(Application_Links *app, char *out, int32_t capacity){return(app->directory_get_hot_(app, out, capacity));}
static bool32 directory_set_hot(Application_Links *app, char *str, int32_t len){return(app->directory_set_hot_(app, str, len));}
static File_List get_file_list(Application_Links *app, char *dir, int32_t len){return(app->get_file_list_(app, dir, len));}
static void free_file_list(Application_Links *app, File_List list){(app->free_file_list_(app, list));}
static void set_gui_up_down_keys(Application_Links *app, Key_Code up_key, Key_Modifier up_key_modifier, Key_Code down_key, Key_Modifier down_key_modifier){(app->set_gui_up_down_keys_(app, up_key, up_key_modifier, down_key, down_key_modifier));}
static void* memory_allocate(Application_Links *app, int32_t size){return(app->memory_allocate_(app, size));}
static bool32 memory_set_protection(Application_Links *app, void *ptr, int32_t size, Memory_Protect_Flags flags){return(app->memory_set_protection_(app, ptr, size, flags));}
static void memory_free(Application_Links *app, void *ptr, int32_t size){(app->memory_free_(app, ptr, size));}
static bool32 file_exists(Application_Links *app, char *filename, int32_t len){return(app->file_exists_(app, filename, len));}
static bool32 directory_cd(Application_Links *app, char *dir, int32_t *len, int32_t capacity, char *rel_path, int32_t rel_len){return(app->directory_cd_(app, dir, len, capacity, rel_path, rel_len));}
static int32_t get_4ed_path(Application_Links *app, char *out, int32_t capacity){return(app->get_4ed_path_(app, out, capacity));}
static void show_mouse_cursor(Application_Links *app, Mouse_Cursor_Show_Type show){(app->show_mouse_cursor_(app, show));}
static bool32 set_fullscreen(Application_Links *app, bool32 full_screen){return(app->set_fullscreen_(app, full_screen));}
static bool32 is_fullscreen(Application_Links *app){return(app->is_fullscreen_(app));}
static void send_exit_signal(Application_Links *app){(app->send_exit_signal_(app));}
static void set_window_title(Application_Links *app, char *title){(app->set_window_title_(app, title));}
static Microsecond_Time_Stamp get_microseconds_timestamp(Application_Links *app){return(app->get_microseconds_timestamp_(app));}
static float draw_string(Application_Links *app, Face_ID font_id, String str, int32_t x, int32_t y, int_color color, uint32_t flags, float dx, float dy){return(app->draw_string_(app, font_id, str, x, y, color, flags, dx, dy));}
static float get_string_advance(Application_Links *app, Face_ID font_id, String str){return(app->get_string_advance_(app, font_id, str));}
static void draw_rectangle(Application_Links *app, f32_Rect rect, int_color color){(app->draw_rectangle_(app, rect, color));}
static void draw_rectangle_outline(Application_Links *app, f32_Rect rect, int_color color){(app->draw_rectangle_outline_(app, rect, color));}
static Face_ID get_default_font_for_view(Application_Links *app, View_ID view_id){return(app->get_default_font_for_view_(app, view_id));}
#endif

View File

@ -4,7 +4,7 @@
// TOP
inline Binding_Unit*
static Binding_Unit*
write_unit(Bind_Helper *helper, Binding_Unit unit){
Binding_Unit *p = 0;
helper->write_total += sizeof(*p);
@ -15,7 +15,7 @@ write_unit(Bind_Helper *helper, Binding_Unit unit){
return p;
}
inline Bind_Helper
static Bind_Helper
begin_bind_helper(void *data, int32_t size){
Bind_Helper result = {};
result.cursor = (Binding_Unit*)data;
@ -29,7 +29,7 @@ begin_bind_helper(void *data, int32_t size){
return(result);
}
inline void
static void
begin_map(Bind_Helper *helper, int32_t mapid, bool32 replace){
if (helper->group != 0 && helper->error == 0){
helper->error = BH_ERR_MISSING_END;
@ -46,17 +46,17 @@ begin_map(Bind_Helper *helper, int32_t mapid, bool32 replace){
helper->group->map_begin.bind_count = 0;
}
inline void
static void
begin_map(Bind_Helper *helper, int32_t mapid){
begin_map(helper, mapid, false);
}
inline void
static void
restart_map(Bind_Helper *helper, int32_t mapid){
begin_map(helper, mapid, true);
}
inline void
static void
end_map(Bind_Helper *helper){
if (helper->group == 0 && helper->error == 0){
helper->error = BH_ERR_MISSING_BEGIN;
@ -64,7 +64,7 @@ end_map(Bind_Helper *helper){
helper->group = 0;
}
inline void
static void
bind(Bind_Helper *helper, Key_Code code, uint8_t modifiers, Command_ID cmdid){
if (helper->group == 0 && helper->error == 0){
helper->error = BH_ERR_MISSING_BEGIN;
@ -82,7 +82,7 @@ bind(Bind_Helper *helper, Key_Code code, uint8_t modifiers, Command_ID cmdid){
write_unit(helper, unit);
}
inline void
static void
bind(Bind_Helper *helper, Key_Code code, uint8_t modifiers, Custom_Command_Function *func){
if (helper->group == 0 && helper->error == 0){
helper->error = BH_ERR_MISSING_BEGIN;
@ -100,7 +100,7 @@ bind(Bind_Helper *helper, Key_Code code, uint8_t modifiers, Custom_Command_Funct
write_unit(helper, unit);
}
inline void
static void
bind(Bind_Helper *helper, Key_Code code, uint8_t modifiers, Generic_Command cmd){
if (cmd.cmdid < cmdid_count){
bind(helper, code, modifiers, cmd.cmdid);
@ -110,27 +110,27 @@ bind(Bind_Helper *helper, Key_Code code, uint8_t modifiers, Generic_Command cmd)
}
}
inline void
static void
bind_vanilla_keys(Bind_Helper *helper, int32_t cmdid){
bind(helper, 0, 0, cmdid);
}
inline void
static void
bind_vanilla_keys(Bind_Helper *helper, Custom_Command_Function *func){
bind(helper, 0, 0, func);
}
inline void
static void
bind_vanilla_keys(Bind_Helper *helper, unsigned char modifiers, int32_t cmdid){
bind(helper, 0, modifiers, cmdid);
}
inline void
static void
bind_vanilla_keys(Bind_Helper *helper, unsigned char modifiers, Custom_Command_Function *func){
bind(helper, 0, modifiers, func);
}
inline void
static void
inherit_map(Bind_Helper *helper, int32_t mapid){
if (helper->group == 0 && helper->error == 0) helper->error = BH_ERR_MISSING_BEGIN;
if (!helper->error && mapid < mapid_global) ++helper->header->header.user_map_count;
@ -140,7 +140,7 @@ inherit_map(Bind_Helper *helper, int32_t mapid){
write_unit(helper, unit);
}
inline void
static void
set_hook(Bind_Helper *helper, int32_t hook_id, Hook_Function *func){
Binding_Unit unit = {};
unit.type = unit_hook;
@ -149,7 +149,7 @@ set_hook(Bind_Helper *helper, int32_t hook_id, Hook_Function *func){
write_unit(helper, unit);
}
inline void
static void
set_scroll_rule(Bind_Helper *helper, Scroll_Rule_Function *func){
Binding_Unit unit = {};
unit.type = unit_hook;
@ -158,7 +158,7 @@ set_scroll_rule(Bind_Helper *helper, Scroll_Rule_Function *func){
write_unit(helper, unit);
}
inline void
static void
set_buffer_name_resolver(Bind_Helper *helper, Buffer_Name_Resolver_Function *func){
Binding_Unit unit = {};
unit.type = unit_hook;
@ -167,7 +167,7 @@ set_buffer_name_resolver(Bind_Helper *helper, Buffer_Name_Resolver_Function *fun
write_unit(helper, unit);
}
inline void
static void
set_new_file_hook(Bind_Helper *helper, Open_File_Hook_Function *func){
Binding_Unit unit = {};
unit.type = unit_hook;
@ -176,7 +176,7 @@ set_new_file_hook(Bind_Helper *helper, Open_File_Hook_Function *func){
write_unit(helper, unit);
}
inline void
static void
set_start_hook(Bind_Helper *helper, Start_Hook_Function *func){
Binding_Unit unit = {};
unit.type = unit_hook;
@ -185,7 +185,7 @@ set_start_hook(Bind_Helper *helper, Start_Hook_Function *func){
write_unit(helper, unit);
}
inline void
static void
set_open_file_hook(Bind_Helper *helper, Open_File_Hook_Function *func){
Binding_Unit unit = {};
unit.type = unit_hook;
@ -194,7 +194,7 @@ set_open_file_hook(Bind_Helper *helper, Open_File_Hook_Function *func){
write_unit(helper, unit);
}
inline void
static void
set_save_file_hook(Bind_Helper *helper, Open_File_Hook_Function *func){
Binding_Unit unit = {};
unit.type = unit_hook;
@ -203,7 +203,7 @@ set_save_file_hook(Bind_Helper *helper, Open_File_Hook_Function *func){
write_unit(helper, unit);
}
inline void
static void
set_end_file_hook(Bind_Helper *helper, Open_File_Hook_Function *func){
Binding_Unit unit = {};
unit.type = unit_hook;
@ -221,7 +221,7 @@ set_file_edit_finished_hook(Bind_Helper *helper, File_Edit_Finished_Function *fu
write_unit(helper, unit);
}
inline void
static void
set_command_caller(Bind_Helper *helper, Command_Caller_Hook_Function *func){
Binding_Unit unit = {};
unit.type = unit_hook;
@ -230,7 +230,7 @@ set_command_caller(Bind_Helper *helper, Command_Caller_Hook_Function *func){
write_unit(helper, unit);
}
inline void
static void
set_render_caller(Bind_Helper *helper, Render_Caller_Function *func){
Binding_Unit unit = {};
unit.type = unit_hook;
@ -239,7 +239,7 @@ set_render_caller(Bind_Helper *helper, Render_Caller_Function *func){
write_unit(helper, unit);
}
inline void
static void
set_input_filter(Bind_Helper *helper, Input_Filter_Function *func){
Binding_Unit unit = {};
unit.type = unit_hook;
@ -248,7 +248,7 @@ set_input_filter(Bind_Helper *helper, Input_Filter_Function *func){
write_unit(helper, unit);
}
inline int32_t
static int32_t
end_bind_helper(Bind_Helper *helper){
if (helper->header){
helper->header->header.total_size = (int32_t)(helper->cursor - helper->start);
@ -258,7 +258,7 @@ end_bind_helper(Bind_Helper *helper){
return(result);
}
inline Bind_Buffer
static Bind_Buffer
end_bind_helper_get_buffer(Bind_Helper *helper){
int32_t size = end_bind_helper(helper);
Bind_Buffer result = {};

View File

@ -50,7 +50,7 @@ struct Bind_Buffer{
#define IntAsPtr(a) (void*)(((uint8_t*)0) + a)
#if !defined(max_f32)
inline float
static float
max_f32_proc(void){
union{
uint32_t x;

View File

@ -9,7 +9,7 @@ distribute, and modify this file as you see fit.
// TOP
inline Partition
static Partition
make_part(void *memory, i32_4tech size){
Partition partition = {};
partition.base = (char*)memory;
@ -18,7 +18,7 @@ make_part(void *memory, i32_4tech size){
return partition;
}
inline void*
static void*
partition_allocate(Partition *data, i32_4tech size){
void *ret = 0;
if (size < 0){
@ -31,31 +31,31 @@ partition_allocate(Partition *data, i32_4tech size){
return(ret);
}
inline void
static void
partition_reduce(Partition *data, i32_4tech size){
if (size > 0 && size <= data->pos){
data->pos -= size;
}
}
inline void*
static void*
partition_align(Partition *data, u32_4tech boundary){
--boundary;
data->pos = (data->pos + boundary) & (~boundary);
return(data->base + data->pos);
}
inline void*
static void*
partition_current(Partition *data){
return(data->base + data->pos);
}
inline i32_4tech
static i32_4tech
partition_remaining(Partition *data){
return(data->max - data->pos);
}
inline Partition
static Partition
partition_sub_part(Partition *data, i32_4tech size){
Partition result = {};
void *d = partition_allocate(data, size);
@ -68,7 +68,7 @@ partition_sub_part(Partition *data, i32_4tech size){
#define push_array(part, T, size) (T*)partition_allocate(part, sizeof(T)*(size))
#define push_align(part, b) partition_align(part, b)
inline Temp_Memory
static Temp_Memory
begin_temp_memory(Partition *data){
Temp_Memory result;
result.handle = data;
@ -76,7 +76,7 @@ begin_temp_memory(Partition *data){
return(result);
}
inline void
static void
end_temp_memory(Temp_Memory temp){
((Partition*)temp.handle)->pos = temp.pos;
}

View File

@ -49,11 +49,7 @@ typedef int32_t b32_4tech;
#endif
#if !defined(FSTRING_INLINE)
# if defined(FSTRING_C)
# define FSTRING_INLINE static
# else
# define FSTRING_INLINE inline
# endif
#endif
#if !defined(FSTRING_GUARD)

View File

@ -148,7 +148,7 @@ table_find_pos(Table *table, void *search_key, void *arg, i32_4tech *pos, i32_4t
return(0);
}
inline void*
static void*
table_find_item(Table *table, void *search_key, void *arg, Hash_Function *hash_func, Compare_Function *comp_func){
void *result = 0;
i32_4tech pos;
@ -158,13 +158,13 @@ table_find_item(Table *table, void *search_key, void *arg, Hash_Function *hash_f
return(result);
}
inline void
static void
table_remove_index(Table *table, i32_4tech index){
table->hash_array[index] = TableHashDeleted;
--table->count;
}
inline i32_4tech
static i32_4tech
table_remove_match(Table *table, void *search_key, void *arg, Hash_Function *hash_func, Compare_Function *comp_func){
i32_4tech result = false;
i32_4tech index;
@ -175,7 +175,7 @@ table_remove_match(Table *table, void *search_key, void *arg, Hash_Function *has
return(result);
}
inline void
static void
table_clear(Table *table){
table->count = 0;
memset(table->hash_array, 0, table->max*sizeof(*table->hash_array));

View File

@ -133,7 +133,7 @@ static String_And_Flag default_keywords[] = {
{make_stafl("extern" , CPP_TOKEN_KEY_LINKAGE)},
{make_stafl("export" , CPP_TOKEN_KEY_LINKAGE)},
{make_stafl("inline" , CPP_TOKEN_KEY_LINKAGE)},
{make_stafl("internal" , CPP_TOKEN_KEY_LINKAGE)},
{make_stafl("static" , CPP_TOKEN_KEY_LINKAGE)},
{make_stafl("virtual" , CPP_TOKEN_KEY_LINKAGE)},

View File

@ -11,7 +11,7 @@
#define API_EXPORT
inline b32
internal b32
access_test(u32 lock_flags, u32 access_flags){
b32 result = ((lock_flags & ~access_flags) == 0);
return(result);
@ -81,7 +81,7 @@ fill_view_summary(System_Functions *system, View_Summary *view, View *vptr, Live
}
}
inline void
internal void
fill_view_summary(System_Functions *system, View_Summary *view, View *vptr, Models *models){
fill_view_summary(system, view, vptr, &models->live_set, &models->working_set);
}

View File

@ -13,7 +13,7 @@
// Buffer low level operations
//
inline void
internal void
write_cursor_with_index(Cursor_With_Index *positions, i32 *count, i32 pos){
positions[(*count)].index = *count;
positions[(*count)].pos = pos;
@ -61,13 +61,13 @@ buffer_quick_unsort_cursors(Cursor_With_Index *positions, i32 start, i32 pivot){
#undef CursorSwap__
inline void
internal void
buffer_sort_cursors(Cursor_With_Index *positions, i32 count){
Assert(count > 0);
buffer_quick_sort_cursors(positions, 0, count-1);
}
inline void
internal void
buffer_unsort_cursors(Cursor_With_Index *positions, i32 count){
Assert(count > 0);
buffer_quick_unsort_cursors(positions, 0, count-1);
@ -280,13 +280,13 @@ eol_in_place_convert_out(char *data, i32 size, i32 max, i32 *size_out){
// Implementation of the gap buffer
//
inline i32
internal i32
buffer_good(Gap_Buffer *buffer){
i32 good = (buffer->data != 0);
return(good);
}
inline i32
internal i32
buffer_size(Gap_Buffer *buffer){
i32 size = buffer->size1 + buffer->size2;
return(size);
@ -527,7 +527,7 @@ buffer_get_chunks(Partition *part, Gap_Buffer *buffer){
return(result);
}
inline void
internal void
buffer_stringify(Gap_Buffer *buffer, i32 start, i32 end, char *out){
Gap_Buffer_Stream stream = {};
@ -1118,7 +1118,7 @@ binary_search(i32 *array, i32 value, i32 l_bound, i32 u_bound){
}
// TODO(allen): CHECK
inline i32
internal i32
buffer_get_line_index_range(Gap_Buffer *buffer, i32 pos, i32 l_bound, i32 u_bound){
Assert(0 <= l_bound);
Assert(l_bound <= u_bound);
@ -1130,19 +1130,19 @@ buffer_get_line_index_range(Gap_Buffer *buffer, i32 pos, i32 l_bound, i32 u_boun
return(i);
}
inline i32
internal i32
buffer_get_line_number(Gap_Buffer *buffer, i32 pos){
i32 result = buffer_get_line_index_range(buffer, pos, 0, buffer->line_count);
return(result);
}
inline i32
internal i32
buffer_get_line_index_from_character_pos(i32 *character_starts, i32 pos, i32 l_bound, i32 u_bound){
i32 i = binary_search(character_starts, pos, l_bound, u_bound);
return(i);
}
inline i32
internal i32
buffer_get_line_index_from_wrapped_y(i32 *wrap_line_index, f32 y, i32 line_height, i32 l_bound, i32 u_bound){
i32 wrap_index = floor32(y/line_height);
i32 i = binary_search(wrap_line_index, wrap_index, l_bound, u_bound);
@ -1561,7 +1561,7 @@ buffer_invert_edit_shift(Gap_Buffer *buffer, Buffer_Edit edit, Buffer_Edit *inve
buffer_stringify(buffer, edit.start, edit.end, strings + pos);
}
inline void
internal void
buffer_invert_edit(Gap_Buffer *buffer, Buffer_Edit edit, Buffer_Edit *inverse, char *strings,
i32 *str_pos, i32 max){
buffer_invert_edit_shift(buffer, edit, inverse, strings, str_pos, max, 0);
@ -1599,7 +1599,7 @@ enum{
RenderItemFlag_NoAdvance = 2,
};
inline Render_Item_Write
internal Render_Item_Write
write_render_item(Render_Item_Write write, i32 index, u32 codepoint, u32 flags,
Render_Item_Flag render_flags){
if (write.item < write.item_end){

View File

@ -9,7 +9,7 @@
// TOP
inline CLI_List
internal CLI_List
make_cli_list(Partition *part, u32 max){
CLI_List list = {};
partition_align(part, 8);
@ -18,7 +18,7 @@ make_cli_list(Partition *part, u32 max){
return(list);
}
inline b32
internal b32
cli_list_call(System_Functions *system, CLI_List *list, char *path, char *command, Editing_File *file, b32 cursor_at_end){
b32 result = false;
@ -35,14 +35,14 @@ cli_list_call(System_Functions *system, CLI_List *list, char *path, char *comman
return(result);
}
inline void
internal void
cli_list_free_proc(CLI_List *list, CLI_Process *proc){
Assert(proc >= list->procs);
Assert(proc < list->procs + list->count);
*proc = list->procs[--list->count];
}
inline b32
internal b32
cli_list_has_space(CLI_List *list){
b32 has_space = (list->count < list->max);
return(has_space);

View File

@ -117,7 +117,7 @@ map_add(Command_Map *map, Key_Code event_code, u8 modifiers, Command_Function *f
return(result);
}
inline b32
internal b32
map_add(Command_Map *map, Key_Code event_code, u8 modifiers, Command_Function *function, u64 custom_id){
return(map_add(map, event_code, modifiers, function, (Custom_Command_Function*)custom_id));
}

View File

@ -100,37 +100,37 @@ typedef double f64;
#define FixSize(s) struct{ u8 __size_fixer__[s]; }
inline i32 ceil32(f32 v){
internal i32 ceil32(f32 v){
return(((v)>0)?( (v == (i32)(v))?((i32)(v)):((i32)((v)+1.f)) ):( ((i32)(v)) ));
}
inline i32 floor32(f32 v){
internal i32 floor32(f32 v){
return(((v)<0)?( (v == (i32)(v))?((i32)(v)):((i32)((v)-1.f)) ):( ((i32)(v)) ));
}
inline i32 round32(f32 v){
internal i32 round32(f32 v){
return(floor32(v + 0.5f));
}
inline i32 trun32(f32 v){
internal i32 trun32(f32 v){
return((i32)(v));
}
inline i32 div_ceil(i32 n, i32 d){
internal i32 div_ceil(i32 n, i32 d){
return( ((n) % (d) != 0) + ((n) / (d)) );
}
inline i32 l_round_up_i32(i32 x, i32 b){
internal i32 l_round_up_i32(i32 x, i32 b){
i32 t = x + b - 1;
return(t - (t%b));
}
inline u32 l_round_up_u32(u32 x, u32 b){
internal u32 l_round_up_u32(u32 x, u32 b){
i32 t = x + b - 1;
return(t - (t%b));
}
inline u32 round_up_pot_u32(u32 x){
internal u32 round_up_pot_u32(u32 x){
--x;
x |= x >> 1;
x |= x >> 2;
@ -172,7 +172,7 @@ inline u32 round_up_pot_u32(u32 x){
#define min_u64 ((u64)0)
#if !defined(max_f32)
inline f32
internal f32
max_f32_proc(void){
union{
u32 x;

View File

@ -277,7 +277,7 @@ edit_single__inner(System_Functions *system, Models *models, Editing_File *file,
edit_fix_markers(system, models, file, layout, desc);
}
inline void
internal void
edit_single(System_Functions *system, Models *models, Editing_File *file,
i32 start, i32 end, char *str, i32 len){
Edit_Spec spec = {};
@ -440,7 +440,7 @@ file_end_file(Models *models, Editing_File *file){
file->lifetime_object = lifetime_alloc_object(heap, lifetime_allocator, DynamicWorkspace_Buffer, file);
}
inline void
internal void
edit_clear(System_Functions *system, Models *models, Editing_File *file){
file_end_file(models, file);

View File

@ -9,7 +9,7 @@
// TOP
inline Buffer_Slot_ID
internal Buffer_Slot_ID
to_file_id(i32 id){
Buffer_Slot_ID result;
result.id = id;
@ -136,7 +136,7 @@ edit_pos_get_new(Editing_File *file, i32 index){
////////////////////////////////
inline b32
internal b32
file_needs_save(Editing_File *file){
b32 result = false;
if (file->state.dirty == DirtyState_UnsavedChanges){
@ -145,7 +145,7 @@ file_needs_save(Editing_File *file){
return(result);
}
inline b32
internal b32
file_can_save(Editing_File *file){
b32 result = false;
if (file->state.dirty == DirtyState_UnsavedChanges ||
@ -155,7 +155,7 @@ file_can_save(Editing_File *file){
return(result);
}
inline b32
internal b32
file_is_ready(Editing_File *file){
b32 result = false;
if (file != 0 && file->is_loading == 0){
@ -164,7 +164,7 @@ file_is_ready(Editing_File *file){
return(result);
}
inline void
internal void
file_set_unimportant(Editing_File *file, b32 val){
if (val){
file->state.dirty = DirtyState_UpToDate;
@ -172,14 +172,14 @@ file_set_unimportant(Editing_File *file, b32 val){
file->settings.unimportant = (b8)(val != false);
}
inline void
internal void
file_set_to_loading(Editing_File *file){
memset(&file->state, 0, sizeof(file->state));
memset(&file->settings, 0, sizeof(file->settings));
file->is_loading = true;
}
inline void
internal void
file_set_dirty_flag(Editing_File *file, Dirty_State state){
if (!file->settings.unimportant){
file->state.dirty = state;
@ -273,7 +273,7 @@ save_file_to_name(System_Functions *system, Models *models, Editing_File *file,
return(result);
}
inline b32
internal b32
save_file(System_Functions *system, Models *models, Editing_File *file){
b32 result = save_file_to_name(system, models, file, 0);
return(result);
@ -281,7 +281,7 @@ save_file(System_Functions *system, Models *models, Editing_File *file){
////////////////////////////////
inline b32
internal b32
file_compute_partial_cursor(Editing_File *file, Buffer_Seek seek, Partial_Cursor *cursor){
b32 result = true;
switch (seek.type){
@ -442,7 +442,7 @@ file_allocate_metadata_as_needed(Heap *heap, Gap_Buffer *buffer, void **mem, i32
}
}
inline void
internal void
file_allocate_character_starts_as_needed(Heap *heap, Editing_File *file){
file_allocate_metadata_as_needed(heap,
&file->state.buffer, (void**)&file->state.character_starts,
@ -457,14 +457,14 @@ file_allocate_indents_as_needed(Heap *heap, Editing_File *file, i32 min_last_ind
&file->state.line_indent_max, min_amount, sizeof(f32));
}
inline void
internal void
file_allocate_wraps_as_needed(Heap *heap, Editing_File *file){
file_allocate_metadata_as_needed(heap,
&file->state.buffer, (void**)&file->state.wrap_line_index,
&file->state.wrap_max, file->state.buffer.line_count + 1, sizeof(f32));
}
inline void
internal void
file_allocate_wrap_positions_as_needed(Heap *heap, Editing_File *file, i32 min_last_index){
i32 min_amount = min_last_index + 1;
file_allocate_metadata_as_needed(heap,

View File

@ -293,8 +293,8 @@ file_relex_parallel(System_Functions *system, Models *models, Editing_File *file
}
b32 result = true;
b32 inline_lex = !file->state.still_lexing;
if (inline_lex){
b32 internal_lex = !file->state.still_lexing;
if (internal_lex){
Gap_Buffer *buffer = &file->state.buffer;
i32 extra_tolerance = 100;
@ -348,7 +348,7 @@ file_relex_parallel(System_Functions *system, Models *models, Editing_File *file
case LexResult_NeedTokenMemory:
{
inline_lex = false;
internal_lex = false;
}goto doublebreak;
case LexResult_Finished: goto doublebreak;
@ -356,7 +356,7 @@ file_relex_parallel(System_Functions *system, Models *models, Editing_File *file
}
doublebreak:;
if (inline_lex){
if (internal_lex){
i32 new_count = cpp_relex_get_new_count(&state, array->count, &relex_array);
if (new_count > array->max_count){
i32 new_max = l_round_up_i32(new_count, KB(1));
@ -377,7 +377,7 @@ file_relex_parallel(System_Functions *system, Models *models, Editing_File *file
end_temp_memory(temp);
}
if (!inline_lex){
if (!internal_lex){
Cpp_Token_Array *array = &file->state.token_array;
Cpp_Get_Token_Result get_token_result = cpp_get_token(*array, end_i);
i32 end_token_i = get_token_result.token_index;

View File

@ -44,7 +44,7 @@ hot_directory_quick_sort(File_Info *infos, i32 start, i32 pivot){
if (mid+1 < pivot) hot_directory_quick_sort(infos, mid+1, pivot);
}
inline void
internal void
hot_directory_fixup(Hot_Directory *hot_directory){
File_List *files = &hot_directory->file_list;
if (files->count >= 2){
@ -52,7 +52,7 @@ hot_directory_fixup(Hot_Directory *hot_directory){
}
}
inline void
internal void
hot_directory_set(System_Functions *system, Hot_Directory *hot_directory, String str){
copy_checked_ss(&hot_directory->string, str);
b32 success = terminate_with_null(&hot_directory->string);
@ -80,7 +80,7 @@ hot_directory_set(System_Functions *system, Hot_Directory *hot_directory, String
hot_directory_fixup(hot_directory);
}
inline void
internal void
hot_directory_reload(System_Functions *system, Hot_Directory *hot_directory){
hot_directory_set(system, hot_directory, hot_directory->string);
}

View File

@ -22,7 +22,7 @@ panel_init(Panel *panel){
panel->b_margin = 3;
}
inline Panel_Divider
internal Panel_Divider
panel_divider_zero(){
Panel_Divider divider={};
return(divider);

View File

@ -17,7 +17,7 @@
#define DEG_TO_RAD (0.0174533f)
inline f32
internal f32
ABS(f32 x){
if (x < 0) x = -x;
return(x);

View File

@ -9,18 +9,18 @@
// TOP
inline void
internal void
draw_push_clip(Render_Target *target, i32_Rect clip_box){
render_push_clip(target, clip_box);
}
inline i32_Rect
internal i32_Rect
draw_pop_clip(Render_Target *target){
i32_Rect result = render_pop_clip(target);
return(result);
}
inline void
internal void
draw_change_clip(Render_Target *target, i32_Rect clip_box){
render_change_clip(target, clip_box);
}
@ -69,7 +69,7 @@ draw_rectangle_outline(Render_Target *target, f32_Rect rect, u32 color){
render_end_push(target, h);
}
inline void
internal void
draw_rectangle_outline(Render_Target *target, i32_Rect rect, u32 color){
draw_rectangle_outline(target, f32R(rect), color);
}
@ -82,7 +82,7 @@ draw_margin(Render_Target *target, f32_Rect outer, f32_Rect inner, u32 color){
draw_rectangle(target, f32R(inner.x1, inner.y0, outer.x1, inner.y1), color);
}
inline void
internal void
draw_margin(Render_Target *target, f32_Rect outer, f32 width, u32 color){
f32_Rect inner = get_inner_rect(outer, width);
draw_margin(target, outer, inner, color);
@ -97,7 +97,7 @@ draw_margin(Render_Target *target, i32_Rect outer, i32_Rect inner, u32 color){
draw_rectangle(target, i32R(inner.x1, inner.y0, outer.x1, inner.y1), color);
}
inline void
internal void
draw_margin(Render_Target *target, i32_Rect outer, i32 width, u32 color){
i32_Rect inner = get_inner_rect(outer, width);
draw_margin(target, outer, inner, color);

View File

@ -19,7 +19,7 @@ struct Plat_Handle{
static Plat_Handle null_plat_handle = {};
inline b32
internal b32
handle_equal(Plat_Handle a, Plat_Handle b){
b32 result = (memcmp(&a, &b, sizeof(a)) == 0);
return(result);

View File

@ -148,7 +148,7 @@ file_post_undo(Heap *heap, Editing_File *file, Edit_Step step, b32 do_merge, b32
return result;
}
inline void
internal void
undo_stack_pop(Edit_Stack *stack){
if (stack->edit_count > 0){
Edit_Step *edit = stack->edits + (--stack->edit_count);
@ -195,7 +195,7 @@ file_post_redo(Heap *heap, Editing_File *file, Edit_Step step){
}
}
inline void
internal void
file_post_history_block(Editing_File *file, i32 pos){
Assert(file->state.undo.history_head_block < pos);
Assert(pos < file->state.undo.history.edit_count);
@ -209,7 +209,7 @@ file_post_history_block(Editing_File *file, i32 pos){
++file->state.undo.history_block_count;
}
inline void
internal void
file_unpost_history_block(Editing_File *file){
Assert(file->state.undo.history_block_count > 1);
--file->state.undo.history_block_count;

View File

@ -44,7 +44,7 @@ live_set_alloc_view(Heap *heap, Lifetime_Allocator *lifetime_allocator, Live_Vie
return(result);
}
inline void
internal void
live_set_free_view(Heap *heap, Lifetime_Allocator *lifetime_allocator, Live_Views *live_set, View *view){
Assert(live_set->count > 0);
--live_set->count;
@ -65,21 +65,21 @@ live_set_free_view(Heap *heap, Lifetime_Allocator *lifetime_allocator, Live_View
////////////////////////////////
// TODO(allen): Switch over to using an i32 for these.
inline f32
internal f32
view_width(View *view){
i32_Rect file_rect = view->transient.file_region;
f32 result = (f32)(file_rect.x1 - file_rect.x0);
return (result);
}
inline f32
internal f32
view_height(View *view){
i32_Rect file_rect = view->transient.file_region;
f32 result = (f32)(file_rect.y1 - file_rect.y0);
return (result);
}
inline Vec2
internal Vec2
view_get_cursor_xy(View *view){
Full_Cursor *cursor = 0;
if (view->transient.file_data.show_temp_highlight){
@ -99,7 +99,7 @@ view_get_cursor_xy(View *view){
return(result);
}
inline Cursor_Limits
internal Cursor_Limits
view_cursor_limits(View *view){
Cursor_Limits limits = {};
@ -128,7 +128,7 @@ view_cursor_limits(View *view){
return(limits);
}
inline i32
internal i32
view_compute_max_target_y_from_bottom_y(View *view, f32 max_item_y){
i32 line_height = view->transient.line_height;
f32 height = clamp_bottom((f32)line_height, view_height(view));
@ -136,7 +136,7 @@ view_compute_max_target_y_from_bottom_y(View *view, f32 max_item_y){
return(ceil32(max_target_y));
}
inline i32
internal i32
view_compute_max_target_y(View *view){
i32 line_height = view->transient.line_height;
Editing_File *file = view->transient.file_data.file;
@ -148,7 +148,7 @@ view_compute_max_target_y(View *view){
return(view_compute_max_target_y_from_bottom_y(view, (lowest_line + 0.5f)*(f32)line_height));
}
inline u32
internal u32
view_lock_flags(View *view){
u32 result = AccessOpen;
File_Viewing_Data *data = &view->transient.file_data;
@ -305,7 +305,7 @@ view_set_relative_scrolling(View *view, Relative_Scrolling scrolling){
}
}
inline void
internal void
view_cursor_move(System_Functions *system, View *view, i32 pos){
Editing_File *file = view->transient.file_data.file;
Assert(file != 0);
@ -314,7 +314,7 @@ view_cursor_move(System_Functions *system, View *view, i32 pos){
view->transient.file_data.show_temp_highlight = false;
}
inline void
internal void
view_set_temp_highlight(System_Functions *system, View *view, i32 pos, i32 end_pos){
Editing_File *file = view->transient.file_data.file;
Assert(file != 0);
@ -324,7 +324,7 @@ view_set_temp_highlight(System_Functions *system, View *view, i32 pos, i32 end_p
view_set_cursor(view, view->transient.file_data.temp_highlight, 0, file->settings.unwrapped_lines);
}
inline void
internal void
view_post_paste_effect(View *view, f32 seconds, i32 start, i32 size, u32 color){
Editing_File *file = view->transient.file_data.file;
file->state.paste_effect.start = start;

View File

@ -105,7 +105,7 @@ working_set_alloc_always(Working_Set *working_set, Heap *heap, Lifetime_Allocato
return(result);
}
inline void
internal void
working_set_free_file(Heap *heap, Working_Set *working_set, Editing_File *file){
if (working_set->sync_check_iter == &file->main_chain_node){
working_set->sync_check_iter = working_set->sync_check_iter->next;
@ -116,7 +116,7 @@ working_set_free_file(Heap *heap, Working_Set *working_set, Editing_File *file)
--working_set->file_count;
}
inline Editing_File*
internal Editing_File*
working_set_index(Working_Set *working_set, Buffer_Slot_ID id){
Editing_File *result = 0;
File_Array *array = 0;
@ -131,13 +131,13 @@ working_set_index(Working_Set *working_set, Buffer_Slot_ID id){
return(result);
}
inline Editing_File*
internal Editing_File*
working_set_index(Working_Set *working_set, i32 id){
Editing_File *result = working_set_index(working_set, to_file_id(id));
return(result);
}
inline Editing_File*
internal Editing_File*
working_set_get_active_file(Working_Set *working_set, Buffer_Slot_ID id){
Editing_File *result = 0;
result = working_set_index(working_set, id);
@ -147,7 +147,7 @@ working_set_get_active_file(Working_Set *working_set, Buffer_Slot_ID id){
return(result);
}
inline Editing_File*
internal Editing_File*
working_set_get_active_file(Working_Set *working_set, i32 id){
Editing_File *result= working_set_get_active_file(working_set, to_file_id(id));
return(result);
@ -199,7 +199,7 @@ working_set_init(Working_Set *working_set, Partition *partition, Heap *heap){
}
}
inline void
internal void
working_set__grow_if_needed(Table *table, Heap *heap, void *arg, Hash_Function *hash_func, Compare_Function *comp_func){
if (table_at_capacity(table)){
Table btable = {};

View File

@ -91,7 +91,7 @@ init_language_cpp(Application_Links *app){
PSAT("extern" , CPP_TOKEN_KEY_LINKAGE),
PSAT("export" , CPP_TOKEN_KEY_LINKAGE),
PSAT("inline" , CPP_TOKEN_KEY_LINKAGE),
PSAT("internal" , CPP_TOKEN_KEY_LINKAGE),
PSAT("static" , CPP_TOKEN_KEY_LINKAGE),
PSAT("virtual" , CPP_TOKEN_KEY_LINKAGE),

View File

@ -153,7 +153,7 @@ generate_custom_headers(Partition *part){
String ret = unit_custom.set.items[i].ret;
String public_name = func_4ed_names.names[i].public_name;
append(&out, "static inline ");
append(&out, "static ");
append(&out, ret);
append(&out, " ");
append(&out, public_name);

View File

@ -31,7 +31,7 @@ private_texture_initialize(GLint tex_width, GLint tex_height, u32 *pixels){
return(tex);
}
inline void
internal void
private_draw_bind_texture(Render_Target *t, i32 texid){
if (t->bound_texture != texid){
glBindTexture(GL_TEXTURE_2D, texid);
@ -39,7 +39,7 @@ private_draw_bind_texture(Render_Target *t, i32 texid){
}
}
inline void
internal void
private_draw_set_color(Render_Target *t, u32 color){
if (t->color != color){
t->color = color;

View File

@ -150,7 +150,7 @@ initialize_unbounded_queue(Unbounded_Work_Queue *source_queue){
source_queue->skip = 0;
}
inline i32
internal i32
get_work_queue_available_space(i32 write, i32 read){
// NOTE(allen): The only time that queue->write_position == queue->read_position
// is allowed is when the queue is empty. Thus if (write_position+1 == read_position)

View File

@ -11,9 +11,9 @@
#define IS_OBJC_LAYER
#define inline internal
#define internal internal
#include "4ed_defines.h"
#undef inline
#undef internal
#include "4coder_API/4coder_version.h"
#include "4coder_API/4coder_keycodes.h"

View File

@ -26,11 +26,7 @@ FSTRING_BEGIN
#endif
#if !defined(FSTRING_INLINE)
# if defined(FSTRING_C)
# define FSTRING_INLINE static
# else
# define FSTRING_INLINE inline
# endif
#endif
#if !defined(FSTRING_GUARD)