From a25b5c0baab08e77b32baa7451cc0845e10f6fa4 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Sun, 26 Aug 2018 02:55:12 -0700 Subject: [PATCH] Moved Managed_Scope and Managed_Object over to checkable id system with u32_Ptr_Table --- 4coder_API/types.h | 21 +- 4coder_clipboard.cpp | 4 +- 4coder_default_framework.cpp | 4 +- 4coder_default_hooks.cpp | 4 +- 4coder_generated/app_functions.h | 80 +++--- 4coder_generated/command_metadata.h | 404 ++++++++++++++-------------- 4coder_jump_sticky.cpp | 17 +- 4coder_lib/4coder_heap.cpp | 77 ++++-- 4coder_lib/4coder_heap.h | 2 + 4coder_search.cpp | 2 +- 4ed.cpp | 4 +- 4ed_api_implementation.cpp | 193 ++++++------- 4ed_app_models.h | 8 + 4ed_app_target.cpp | 4 + 4ed_buffer.cpp | 30 ++- 4ed_dynamic_variables.cpp | 185 ++++--------- 4ed_dynamic_variables.h | 17 +- 4ed_hash_functions.cpp | 94 +++++++ 4ed_mem.cpp | 80 ++++++ 4ed_mem_ansi.c | 93 ------- 4ed_ptr_check.cpp | 365 +++++++++++++++++++++++++ 4ed_ptr_check.h | 39 +++ 4ed_view.cpp | 6 +- 4ed_working_set.cpp | 6 +- meta/4ed_fsm_table_generator.cpp | 6 +- project.4coder | 13 +- 26 files changed, 1113 insertions(+), 645 deletions(-) create mode 100644 4ed_hash_functions.cpp create mode 100644 4ed_mem.cpp delete mode 100644 4ed_mem_ansi.c create mode 100644 4ed_ptr_check.cpp create mode 100644 4ed_ptr_check.h diff --git a/4coder_API/types.h b/4coder_API/types.h index db659e1a..1dabff47 100644 --- a/4coder_API/types.h +++ b/4coder_API/types.h @@ -689,25 +689,12 @@ STRUCT Query_Bar{ }; TYPEDEF int32_t Managed_Variable_ID; -static Managed_Variable_ID ManagedVariableIndex_ERROR = -1; - +TYPEDEF uint64_t Managed_Scope; TYPEDEF uint64_t Managed_Object; -ENUM(int32_t, Dynamic_Scope_Type){ - DynamicScopeType_Global = 0, - DynamicScopeType_Intersected = 1, - DynamicScopeType_Buffer = 2, - DynamicScopeType_View = 3, -}; - -STRUCT Dynamic_Scope{ - Dynamic_Scope_Type type; - union{ - uint64_t intersected_opaque_handle; - View_ID view_id; - Buffer_ID buffer_id; - }; -}; +static Managed_Variable_ID ManagedVariableIndex_ERROR = -1; +static Managed_Scope ManagedScope_NULL = 0; +static Managed_Object ManagedObject_NULL = 0; ENUM(int16_t, UI_Item_Type){ UIType_Option = 0, diff --git a/4coder_clipboard.cpp b/4coder_clipboard.cpp index 009b99b8..1fd3251c 100644 --- a/4coder_clipboard.cpp +++ b/4coder_clipboard.cpp @@ -50,7 +50,7 @@ CUSTOM_DOC("At the cursor, insert the text at the top of the clipboard.") int32_t count = clipboard_count(app, 0); if (count > 0){ View_Summary view = get_active_view(app, access); - Dynamic_Scope scope = view_get_dynamic_scope(app, view.view_id); + Managed_Scope scope = view_get_managed_scope(app, view.view_id); managed_variable_set(app, scope, view_next_rewrite_loc, RewritePaste); int32_t paste_index = 0; managed_variable_set(app, scope, view_paste_index_loc, paste_index); @@ -87,7 +87,7 @@ CUSTOM_DOC("If the previous command was paste or paste_next, replaces the paste int32_t count = clipboard_count(app, 0); if (count > 0){ View_Summary view = get_active_view(app, access); - Dynamic_Scope scope = view_get_dynamic_scope(app, view.view_id); + Managed_Scope scope = view_get_managed_scope(app, view.view_id); uint64_t rewrite = 0; managed_variable_get(app, scope, view_rewrite_loc, &rewrite); diff --git a/4coder_default_framework.cpp b/4coder_default_framework.cpp index edbaee39..a69db071 100644 --- a/4coder_default_framework.cpp +++ b/4coder_default_framework.cpp @@ -56,13 +56,13 @@ new_view_settings(Application_Links *app, View_Summary *view){ static void view_set_passive(Application_Links *app, View_Summary *view, bool32 value){ - Dynamic_Scope scope = view_get_dynamic_scope(app, view->view_id); + Managed_Scope scope = view_get_managed_scope(app, view->view_id); managed_variable_set(app, scope, view_is_passive_loc, (uint64_t)value); } static bool32 view_get_is_passive(Application_Links *app, View_Summary *view){ - Dynamic_Scope scope = view_get_dynamic_scope(app, view->view_id); + Managed_Scope scope = view_get_managed_scope(app, view->view_id); uint64_t is_passive = 0; managed_variable_get(app, scope, view_is_passive_loc, &is_passive); return(is_passive != 0); diff --git a/4coder_default_hooks.cpp b/4coder_default_hooks.cpp index 8e1d84ab..89937418 100644 --- a/4coder_default_hooks.cpp +++ b/4coder_default_hooks.cpp @@ -42,14 +42,12 @@ START_HOOK_SIG(default_start){ // also relies on this particular command caller hook. COMMAND_CALLER_HOOK(default_command_caller){ View_Summary view = get_active_view(app, AccessAll); - Dynamic_Scope scope = view_get_dynamic_scope(app, view.view_id); - + Managed_Scope scope = view_get_managed_scope(app, view.view_id); managed_variable_set(app, scope, view_next_rewrite_loc, 0); exec_command(app, cmd); uint64_t next_rewrite = 0; managed_variable_get(app, scope, view_next_rewrite_loc, &next_rewrite); managed_variable_set(app, scope, view_rewrite_loc, next_rewrite); - return(0); } diff --git a/4coder_generated/app_functions.h b/4coder_generated/app_functions.h index 6375e948..9a8d0959 100644 --- a/4coder_generated/app_functions.h +++ b/4coder_generated/app_functions.h @@ -17,14 +17,14 @@ struct Application_Links; #define BUFFER_REPLACE_RANGE_SIG(n) bool32 n(Application_Links *app, Buffer_Summary *buffer, int32_t start, int32_t end, char *str, int32_t len) #define BUFFER_COMPUTE_CURSOR_SIG(n) bool32 n(Application_Links *app, Buffer_Summary *buffer, Buffer_Seek seek, Partial_Cursor *cursor_out) #define BUFFER_BATCH_EDIT_SIG(n) bool32 n(Application_Links *app, Buffer_Summary *buffer, char *str, int32_t str_len, Buffer_Edit *edits, int32_t edit_count, Buffer_Batch_Edit_Type type) -#define BUFFER_ADD_MARKERS_SIG(n) Managed_Object n(Application_Links *app, Buffer_ID buffer_id, uint32_t marker_count, Dynamic_Scope *scope) +#define BUFFER_ADD_MARKERS_SIG(n) Managed_Object n(Application_Links *app, Buffer_ID buffer_id, uint32_t marker_count, Managed_Scope *scope) #define GET_BUFFER_BY_MARKER_HANDLE_SIG(n) Buffer_Summary n(Application_Links *app, Managed_Object marker_object, Access_Flag access) #define BUFFER_SET_MARKERS_SIG(n) bool32 n(Application_Links *app, Managed_Object marker_object, uint32_t first_marker_index, uint32_t marker_count, Marker *source_markers) #define BUFFER_GET_MARKERS_SIG(n) bool32 n(Application_Links *app, Managed_Object marker_object, uint32_t first_marker_index, uint32_t marker_count, Marker *markers_out) #define BUFFER_REMOVE_MARKERS_SIG(n) bool32 n(Application_Links *app, Managed_Object marker_object) #define BUFFER_GET_SETTING_SIG(n) bool32 n(Application_Links *app, Buffer_Summary *buffer, Buffer_Setting_ID setting, int32_t *value_out) #define BUFFER_SET_SETTING_SIG(n) bool32 n(Application_Links *app, Buffer_Summary *buffer, Buffer_Setting_ID setting, int32_t value) -#define BUFFER_GET_DYNAMIC_SCOPE_SIG(n) Dynamic_Scope n(Application_Links *app, Buffer_ID buffer_id) +#define BUFFER_GET_MANAGED_SCOPE_SIG(n) Managed_Scope n(Application_Links *app, Buffer_ID buffer_id) #define BUFFER_TOKEN_COUNT_SIG(n) int32_t n(Application_Links *app, Buffer_Summary *buffer) #define BUFFER_READ_TOKENS_SIG(n) bool32 n(Application_Links *app, Buffer_Summary *buffer, int32_t start_token, int32_t end_token, Cpp_Token *tokens_out) #define BUFFER_GET_TOKEN_INDEX_SIG(n) bool32 n(Application_Links *app, Buffer_Summary *buffer, int32_t pos, Cpp_Get_Token_Result *get_result) @@ -41,7 +41,7 @@ struct Application_Links; #define SET_ACTIVE_VIEW_SIG(n) bool32 n(Application_Links *app, View_Summary *view) #define VIEW_GET_SETTING_SIG(n) bool32 n(Application_Links *app, View_Summary *view, View_Setting_ID setting, int32_t *value_out) #define VIEW_SET_SETTING_SIG(n) bool32 n(Application_Links *app, View_Summary *view, View_Setting_ID setting, int32_t value) -#define VIEW_GET_DYNAMIC_SCOPE_SIG(n) Dynamic_Scope n(Application_Links *app, View_ID view_id) +#define VIEW_GET_MANAGED_SCOPE_SIG(n) Managed_Scope n(Application_Links *app, View_ID view_id) #define VIEW_SET_SPLIT_PROPORTION_SIG(n) bool32 n(Application_Links *app, View_Summary *view, float t) #define VIEW_COMPUTE_CURSOR_SIG(n) bool32 n(Application_Links *app, View_Summary *view, Buffer_Seek seek, Full_Cursor *cursor_out) #define VIEW_SET_CURSOR_SIG(n) bool32 n(Application_Links *app, View_Summary *view, Buffer_Seek seek, bool32 set_preferred_x) @@ -54,14 +54,14 @@ struct Application_Links; #define VIEW_END_UI_MODE_SIG(n) int32_t n(Application_Links *app, View_Summary *view) #define VIEW_SET_UI_SIG(n) bool32 n(Application_Links *app, View_Summary *view, UI_Control *control) #define VIEW_GET_UI_COPY_SIG(n) UI_Control n(Application_Links *app, View_Summary *view, struct Partition *part) -#define GET_GLOBAL_DYNAMIC_SCOPE_SIG(n) Dynamic_Scope n(Application_Links *app) -#define GET_INTERSECTED_DYNAMIC_SCOPE_SIG(n) Dynamic_Scope n(Application_Links *app, Dynamic_Scope *intersected_scopes, int32_t count) +#define GET_GLOBAL_MANAGED_SCOPE_SIG(n) Managed_Scope n(Application_Links *app) +#define GET_INTERSECTED_MANAGED_SCOPE_SIG(n) Managed_Scope n(Application_Links *app, Managed_Scope *intersected_scopes, int32_t count) #define MANAGED_VARIABLE_CREATE_SIG(n) Managed_Variable_ID n(Application_Links *app, char *null_terminated_name, uint64_t default_value) #define MANAGED_VARIABLE_GET_ID_SIG(n) Managed_Variable_ID n(Application_Links *app, char *null_terminated_name) #define MANAGED_VARIABLE_CREATE_OR_GET_ID_SIG(n) int32_t n(Application_Links *app, char *null_terminated_name, uint64_t default_value) -#define MANAGED_VARIABLE_SET_SIG(n) bool32 n(Application_Links *app, Dynamic_Scope scope, Managed_Variable_ID location, uint64_t value) -#define MANAGED_VARIABLE_GET_SIG(n) bool32 n(Application_Links *app, Dynamic_Scope scope, Managed_Variable_ID location, uint64_t *value_out) -#define MANAGED_MEMORY_ALLOC_SIG(n) Managed_Object n(Application_Links *app, Dynamic_Scope scope, int32_t size) +#define MANAGED_VARIABLE_SET_SIG(n) bool32 n(Application_Links *app, Managed_Scope scope, Managed_Variable_ID location, uint64_t value) +#define MANAGED_VARIABLE_GET_SIG(n) bool32 n(Application_Links *app, Managed_Scope scope, Managed_Variable_ID location, uint64_t *value_out) +#define MANAGED_MEMORY_ALLOC_SIG(n) Managed_Object n(Application_Links *app, Managed_Scope scope, int32_t size) #define MANAGED_MEMORY_SET_SIG(n) bool32 n(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem) #define MANAGED_MEMORY_GET_SIG(n) bool32 n(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem_out) #define GET_USER_INPUT_SIG(n) User_Input n(Application_Links *app, Input_Type_Flag get_type, Input_Type_Flag abort_type) @@ -128,7 +128,7 @@ typedef BUFFER_GET_MARKERS_SIG(Buffer_Get_Markers_Function); typedef BUFFER_REMOVE_MARKERS_SIG(Buffer_Remove_Markers_Function); typedef BUFFER_GET_SETTING_SIG(Buffer_Get_Setting_Function); typedef BUFFER_SET_SETTING_SIG(Buffer_Set_Setting_Function); -typedef BUFFER_GET_DYNAMIC_SCOPE_SIG(Buffer_Get_Dynamic_Scope_Function); +typedef BUFFER_GET_MANAGED_SCOPE_SIG(Buffer_Get_Managed_Scope_Function); typedef BUFFER_TOKEN_COUNT_SIG(Buffer_Token_Count_Function); typedef BUFFER_READ_TOKENS_SIG(Buffer_Read_Tokens_Function); typedef BUFFER_GET_TOKEN_INDEX_SIG(Buffer_Get_Token_Index_Function); @@ -145,7 +145,7 @@ typedef CLOSE_VIEW_SIG(Close_View_Function); typedef SET_ACTIVE_VIEW_SIG(Set_Active_View_Function); typedef VIEW_GET_SETTING_SIG(View_Get_Setting_Function); typedef VIEW_SET_SETTING_SIG(View_Set_Setting_Function); -typedef VIEW_GET_DYNAMIC_SCOPE_SIG(View_Get_Dynamic_Scope_Function); +typedef VIEW_GET_MANAGED_SCOPE_SIG(View_Get_Managed_Scope_Function); typedef VIEW_SET_SPLIT_PROPORTION_SIG(View_Set_Split_Proportion_Function); typedef VIEW_COMPUTE_CURSOR_SIG(View_Compute_Cursor_Function); typedef VIEW_SET_CURSOR_SIG(View_Set_Cursor_Function); @@ -158,8 +158,8 @@ typedef VIEW_START_UI_MODE_SIG(View_Start_UI_Mode_Function); typedef VIEW_END_UI_MODE_SIG(View_End_UI_Mode_Function); typedef VIEW_SET_UI_SIG(View_Set_UI_Function); typedef VIEW_GET_UI_COPY_SIG(View_Get_UI_Copy_Function); -typedef GET_GLOBAL_DYNAMIC_SCOPE_SIG(Get_Global_Dynamic_Scope_Function); -typedef GET_INTERSECTED_DYNAMIC_SCOPE_SIG(Get_Intersected_Dynamic_Scope_Function); +typedef GET_GLOBAL_MANAGED_SCOPE_SIG(Get_Global_Managed_Scope_Function); +typedef GET_INTERSECTED_MANAGED_SCOPE_SIG(Get_Intersected_Managed_Scope_Function); typedef MANAGED_VARIABLE_CREATE_SIG(Managed_Variable_Create_Function); typedef MANAGED_VARIABLE_GET_ID_SIG(Managed_Variable_Get_ID_Function); typedef MANAGED_VARIABLE_CREATE_OR_GET_ID_SIG(Managed_Variable_Create_Or_Get_ID_Function); @@ -234,7 +234,7 @@ Buffer_Get_Markers_Function *buffer_get_markers; Buffer_Remove_Markers_Function *buffer_remove_markers; Buffer_Get_Setting_Function *buffer_get_setting; Buffer_Set_Setting_Function *buffer_set_setting; -Buffer_Get_Dynamic_Scope_Function *buffer_get_dynamic_scope; +Buffer_Get_Managed_Scope_Function *buffer_get_managed_scope; Buffer_Token_Count_Function *buffer_token_count; Buffer_Read_Tokens_Function *buffer_read_tokens; Buffer_Get_Token_Index_Function *buffer_get_token_index; @@ -251,7 +251,7 @@ Close_View_Function *close_view; Set_Active_View_Function *set_active_view; View_Get_Setting_Function *view_get_setting; View_Set_Setting_Function *view_set_setting; -View_Get_Dynamic_Scope_Function *view_get_dynamic_scope; +View_Get_Managed_Scope_Function *view_get_managed_scope; View_Set_Split_Proportion_Function *view_set_split_proportion; View_Compute_Cursor_Function *view_compute_cursor; View_Set_Cursor_Function *view_set_cursor; @@ -264,8 +264,8 @@ View_Start_UI_Mode_Function *view_start_ui_mode; View_End_UI_Mode_Function *view_end_ui_mode; View_Set_UI_Function *view_set_ui; View_Get_UI_Copy_Function *view_get_ui_copy; -Get_Global_Dynamic_Scope_Function *get_global_dynamic_scope; -Get_Intersected_Dynamic_Scope_Function *get_intersected_dynamic_scope; +Get_Global_Managed_Scope_Function *get_global_managed_scope; +Get_Intersected_Managed_Scope_Function *get_intersected_managed_scope; Managed_Variable_Create_Function *managed_variable_create; Managed_Variable_Get_ID_Function *managed_variable_get_id; Managed_Variable_Create_Or_Get_ID_Function *managed_variable_create_or_get_id; @@ -339,7 +339,7 @@ Buffer_Get_Markers_Function *buffer_get_markers_; Buffer_Remove_Markers_Function *buffer_remove_markers_; Buffer_Get_Setting_Function *buffer_get_setting_; Buffer_Set_Setting_Function *buffer_set_setting_; -Buffer_Get_Dynamic_Scope_Function *buffer_get_dynamic_scope_; +Buffer_Get_Managed_Scope_Function *buffer_get_managed_scope_; Buffer_Token_Count_Function *buffer_token_count_; Buffer_Read_Tokens_Function *buffer_read_tokens_; Buffer_Get_Token_Index_Function *buffer_get_token_index_; @@ -356,7 +356,7 @@ Close_View_Function *close_view_; Set_Active_View_Function *set_active_view_; View_Get_Setting_Function *view_get_setting_; View_Set_Setting_Function *view_set_setting_; -View_Get_Dynamic_Scope_Function *view_get_dynamic_scope_; +View_Get_Managed_Scope_Function *view_get_managed_scope_; View_Set_Split_Proportion_Function *view_set_split_proportion_; View_Compute_Cursor_Function *view_compute_cursor_; View_Set_Cursor_Function *view_set_cursor_; @@ -369,8 +369,8 @@ View_Start_UI_Mode_Function *view_start_ui_mode_; View_End_UI_Mode_Function *view_end_ui_mode_; View_Set_UI_Function *view_set_ui_; View_Get_UI_Copy_Function *view_get_ui_copy_; -Get_Global_Dynamic_Scope_Function *get_global_dynamic_scope_; -Get_Intersected_Dynamic_Scope_Function *get_intersected_dynamic_scope_; +Get_Global_Managed_Scope_Function *get_global_managed_scope_; +Get_Intersected_Managed_Scope_Function *get_intersected_managed_scope_; Managed_Variable_Create_Function *managed_variable_create_; Managed_Variable_Get_ID_Function *managed_variable_get_id_; Managed_Variable_Create_Or_Get_ID_Function *managed_variable_create_or_get_id_; @@ -452,7 +452,7 @@ app_links->buffer_get_markers_ = Buffer_Get_Markers;\ app_links->buffer_remove_markers_ = Buffer_Remove_Markers;\ app_links->buffer_get_setting_ = Buffer_Get_Setting;\ app_links->buffer_set_setting_ = Buffer_Set_Setting;\ -app_links->buffer_get_dynamic_scope_ = Buffer_Get_Dynamic_Scope;\ +app_links->buffer_get_managed_scope_ = Buffer_Get_Managed_Scope;\ app_links->buffer_token_count_ = Buffer_Token_Count;\ app_links->buffer_read_tokens_ = Buffer_Read_Tokens;\ app_links->buffer_get_token_index_ = Buffer_Get_Token_Index;\ @@ -469,7 +469,7 @@ app_links->close_view_ = Close_View;\ app_links->set_active_view_ = Set_Active_View;\ app_links->view_get_setting_ = View_Get_Setting;\ app_links->view_set_setting_ = View_Set_Setting;\ -app_links->view_get_dynamic_scope_ = View_Get_Dynamic_Scope;\ +app_links->view_get_managed_scope_ = View_Get_Managed_Scope;\ app_links->view_set_split_proportion_ = View_Set_Split_Proportion;\ app_links->view_compute_cursor_ = View_Compute_Cursor;\ app_links->view_set_cursor_ = View_Set_Cursor;\ @@ -482,8 +482,8 @@ app_links->view_start_ui_mode_ = View_Start_UI_Mode;\ app_links->view_end_ui_mode_ = View_End_UI_Mode;\ app_links->view_set_ui_ = View_Set_UI;\ app_links->view_get_ui_copy_ = View_Get_UI_Copy;\ -app_links->get_global_dynamic_scope_ = Get_Global_Dynamic_Scope;\ -app_links->get_intersected_dynamic_scope_ = Get_Intersected_Dynamic_Scope;\ +app_links->get_global_managed_scope_ = Get_Global_Managed_Scope;\ +app_links->get_intersected_managed_scope_ = Get_Intersected_Managed_Scope;\ app_links->managed_variable_create_ = Managed_Variable_Create;\ app_links->managed_variable_get_id_ = Managed_Variable_Get_ID;\ app_links->managed_variable_create_or_get_id_ = Managed_Variable_Create_Or_Get_ID;\ @@ -550,14 +550,14 @@ static inline bool32 buffer_read_range(Application_Links *app, Buffer_Summary *b 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 Managed_Object buffer_add_markers(Application_Links *app, Buffer_ID buffer_id, uint32_t marker_count, Dynamic_Scope *scope){return(app->buffer_add_markers(app, buffer_id, marker_count, scope));} +static inline Managed_Object buffer_add_markers(Application_Links *app, Buffer_ID buffer_id, uint32_t marker_count, Managed_Scope *scope){return(app->buffer_add_markers(app, buffer_id, marker_count, scope));} static inline Buffer_Summary get_buffer_by_marker_handle(Application_Links *app, Managed_Object marker_object, Access_Flag access){return(app->get_buffer_by_marker_handle(app, marker_object, access));} static inline bool32 buffer_set_markers(Application_Links *app, Managed_Object marker_object, uint32_t first_marker_index, uint32_t marker_count, Marker *source_markers){return(app->buffer_set_markers(app, marker_object, first_marker_index, marker_count, source_markers));} static inline bool32 buffer_get_markers(Application_Links *app, Managed_Object marker_object, uint32_t first_marker_index, uint32_t marker_count, Marker *markers_out){return(app->buffer_get_markers(app, marker_object, first_marker_index, marker_count, markers_out));} static inline bool32 buffer_remove_markers(Application_Links *app, Managed_Object marker_object){return(app->buffer_remove_markers(app, marker_object));} 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 Dynamic_Scope buffer_get_dynamic_scope(Application_Links *app, Buffer_ID buffer_id){return(app->buffer_get_dynamic_scope(app, buffer_id));} +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));} @@ -574,7 +574,7 @@ static inline bool32 close_view(Application_Links *app, View_Summary *view){retu 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 Dynamic_Scope view_get_dynamic_scope(Application_Links *app, View_ID view_id){return(app->view_get_dynamic_scope(app, view_id));} +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 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));} @@ -587,14 +587,14 @@ static inline int32_t view_start_ui_mode(Application_Links *app, View_Summary *v static inline int32_t 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){return(app->view_set_ui(app, view, control));} 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 Dynamic_Scope get_global_dynamic_scope(Application_Links *app){return(app->get_global_dynamic_scope(app));} -static inline Dynamic_Scope get_intersected_dynamic_scope(Application_Links *app, Dynamic_Scope *intersected_scopes, int32_t count){return(app->get_intersected_dynamic_scope(app, intersected_scopes, count));} +static inline Managed_Scope get_global_managed_scope(Application_Links *app){return(app->get_global_managed_scope(app));} +static inline Managed_Scope get_intersected_managed_scope(Application_Links *app, Managed_Scope *intersected_scopes, int32_t count){return(app->get_intersected_managed_scope(app, intersected_scopes, count));} 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 int32_t 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, Dynamic_Scope scope, Managed_Variable_ID location, uint64_t value){return(app->managed_variable_set(app, scope, location, value));} -static inline bool32 managed_variable_get(Application_Links *app, Dynamic_Scope scope, Managed_Variable_ID location, uint64_t *value_out){return(app->managed_variable_get(app, scope, location, value_out));} -static inline Managed_Object managed_memory_alloc(Application_Links *app, Dynamic_Scope scope, int32_t size){return(app->managed_memory_alloc(app, scope, size));} +static inline bool32 managed_variable_set(Application_Links *app, Managed_Scope scope, Managed_Variable_ID location, uint64_t value){return(app->managed_variable_set(app, scope, location, value));} +static inline bool32 managed_variable_get(Application_Links *app, Managed_Scope scope, Managed_Variable_ID location, uint64_t *value_out){return(app->managed_variable_get(app, scope, location, value_out));} +static inline Managed_Object managed_memory_alloc(Application_Links *app, Managed_Scope scope, int32_t size){return(app->managed_memory_alloc(app, scope, size));} static inline bool32 managed_memory_set(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem){return(app->managed_memory_set(app, object, start, size, mem));} static inline bool32 managed_memory_get(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem_out){return(app->managed_memory_get(app, object, start, size, 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));} @@ -655,14 +655,14 @@ static inline bool32 buffer_read_range(Application_Links *app, Buffer_Summary *b 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 Managed_Object buffer_add_markers(Application_Links *app, Buffer_ID buffer_id, uint32_t marker_count, Dynamic_Scope *scope){return(app->buffer_add_markers_(app, buffer_id, marker_count, scope));} +static inline Managed_Object buffer_add_markers(Application_Links *app, Buffer_ID buffer_id, uint32_t marker_count, Managed_Scope *scope){return(app->buffer_add_markers_(app, buffer_id, marker_count, scope));} static inline Buffer_Summary get_buffer_by_marker_handle(Application_Links *app, Managed_Object marker_object, Access_Flag access){return(app->get_buffer_by_marker_handle_(app, marker_object, access));} static inline bool32 buffer_set_markers(Application_Links *app, Managed_Object marker_object, uint32_t first_marker_index, uint32_t marker_count, Marker *source_markers){return(app->buffer_set_markers_(app, marker_object, first_marker_index, marker_count, source_markers));} static inline bool32 buffer_get_markers(Application_Links *app, Managed_Object marker_object, uint32_t first_marker_index, uint32_t marker_count, Marker *markers_out){return(app->buffer_get_markers_(app, marker_object, first_marker_index, marker_count, markers_out));} static inline bool32 buffer_remove_markers(Application_Links *app, Managed_Object marker_object){return(app->buffer_remove_markers_(app, marker_object));} 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 Dynamic_Scope buffer_get_dynamic_scope(Application_Links *app, Buffer_ID buffer_id){return(app->buffer_get_dynamic_scope_(app, buffer_id));} +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));} @@ -679,7 +679,7 @@ static inline bool32 close_view(Application_Links *app, View_Summary *view){retu 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 Dynamic_Scope view_get_dynamic_scope(Application_Links *app, View_ID view_id){return(app->view_get_dynamic_scope_(app, view_id));} +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 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));} @@ -692,14 +692,14 @@ static inline int32_t view_start_ui_mode(Application_Links *app, View_Summary *v static inline int32_t 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){return(app->view_set_ui_(app, view, control));} 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 Dynamic_Scope get_global_dynamic_scope(Application_Links *app){return(app->get_global_dynamic_scope_(app));} -static inline Dynamic_Scope get_intersected_dynamic_scope(Application_Links *app, Dynamic_Scope *intersected_scopes, int32_t count){return(app->get_intersected_dynamic_scope_(app, intersected_scopes, count));} +static inline Managed_Scope get_global_managed_scope(Application_Links *app){return(app->get_global_managed_scope_(app));} +static inline Managed_Scope get_intersected_managed_scope(Application_Links *app, Managed_Scope *intersected_scopes, int32_t count){return(app->get_intersected_managed_scope_(app, intersected_scopes, count));} 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 int32_t 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, Dynamic_Scope scope, Managed_Variable_ID location, uint64_t value){return(app->managed_variable_set_(app, scope, location, value));} -static inline bool32 managed_variable_get(Application_Links *app, Dynamic_Scope scope, Managed_Variable_ID location, uint64_t *value_out){return(app->managed_variable_get_(app, scope, location, value_out));} -static inline Managed_Object managed_memory_alloc(Application_Links *app, Dynamic_Scope scope, int32_t size){return(app->managed_memory_alloc_(app, scope, size));} +static inline bool32 managed_variable_set(Application_Links *app, Managed_Scope scope, Managed_Variable_ID location, uint64_t value){return(app->managed_variable_set_(app, scope, location, value));} +static inline bool32 managed_variable_get(Application_Links *app, Managed_Scope scope, Managed_Variable_ID location, uint64_t *value_out){return(app->managed_variable_get_(app, scope, location, value_out));} +static inline Managed_Object managed_memory_alloc(Application_Links *app, Managed_Scope scope, int32_t size){return(app->managed_memory_alloc_(app, scope, size));} static inline bool32 managed_memory_set(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem){return(app->managed_memory_set_(app, object, start, size, mem));} static inline bool32 managed_memory_get(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem_out){return(app->managed_memory_get_(app, object, start, size, 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));} diff --git a/4coder_generated/command_metadata.h b/4coder_generated/command_metadata.h index a525fdf3..103ef24c 100644 --- a/4coder_generated/command_metadata.h +++ b/4coder_generated/command_metadata.h @@ -223,208 +223,208 @@ int32_t source_name_len; int32_t line_number; }; static Command_Metadata fcoder_metacmd_table[202] = { -{ PROC_LINKS(allow_mouse, 0), "allow_mouse", 11, "Shows the mouse and causes all mouse input to be processed normally.", 68, "w:\\4ed\\code\\4coder_default_framework.cpp", 43, 193 }, -{ PROC_LINKS(auto_tab_line_at_cursor, 0), "auto_tab_line_at_cursor", 23, "Auto-indents the line on which the cursor sits.", 47, "w:\\4ed\\code\\4coder_auto_indent.cpp", 37, 722 }, -{ PROC_LINKS(auto_tab_range, 0), "auto_tab_range", 14, "Auto-indents the range between the cursor and the mark.", 55, "w:\\4ed\\code\\4coder_auto_indent.cpp", 37, 733 }, -{ PROC_LINKS(auto_tab_whole_file, 0), "auto_tab_whole_file", 19, "Audo-indents the entire current buffer.", 39, "w:\\4ed\\code\\4coder_auto_indent.cpp", 37, 712 }, -{ PROC_LINKS(backspace_char, 0), "backspace_char", 14, "Deletes the character to the left of the cursor.", 48, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 67 }, -{ PROC_LINKS(backspace_word, 0), "backspace_word", 14, "Delete characters between the cursor position and the first alphanumeric boundary to the left.", 94, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1247 }, -{ PROC_LINKS(basic_change_active_panel, 0), "basic_change_active_panel", 25, "Change the currently active panel, moving to the panel with the next highest view_id. Will not skipe the build panel if it is open.", 132, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 433 }, -{ PROC_LINKS(build_in_build_panel, 0), "build_in_build_panel", 20, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*. Puts the *compilation* buffer in a panel at the footer of the current view.", 230, "w:\\4ed\\code\\4coder_build_commands.cpp", 40, 187 }, -{ PROC_LINKS(build_search, 0), "build_search", 12, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*.", 153, "w:\\4ed\\code\\4coder_build_commands.cpp", 40, 155 }, -{ PROC_LINKS(center_view, 0), "center_view", 11, "Centers the view vertically on the line on which the cursor sits.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 120 }, -{ PROC_LINKS(change_active_panel, 0), "change_active_panel", 19, "Change the currently active panel, moving to the panel with the next highest view_id.", 85, "w:\\4ed\\code\\4coder_default_framework.cpp", 43, 135 }, -{ PROC_LINKS(change_active_panel_backwards, 0), "change_active_panel_backwards", 29, "Change the currently active panel, moving to the panel with the next lowest view_id.", 84, "w:\\4ed\\code\\4coder_default_framework.cpp", 43, 145 }, -{ PROC_LINKS(change_to_build_panel, 0), "change_to_build_panel", 21, "If the special build panel is open, makes the build panel the active panel.", 75, "w:\\4ed\\code\\4coder_build_commands.cpp", 40, 209 }, -{ PROC_LINKS(clean_all_lines, 0), "clean_all_lines", 15, "Removes trailing whitespace from all lines in the current buffer.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 368 }, -{ PROC_LINKS(click_set_cursor, 0), "click_set_cursor", 16, "Sets the cursor position to the mouse position.", 47, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 174 }, -{ PROC_LINKS(click_set_mark, 0), "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 187 }, -{ PROC_LINKS(close_all_code, 0), "close_all_code", 14, "Closes any buffer with a filename ending with an extension configured to be recognized as a code file type.", 107, "w:\\4ed\\code\\4coder_project_commands.cpp", 42, 1048 }, -{ PROC_LINKS(close_build_panel, 0), "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "w:\\4ed\\code\\4coder_build_commands.cpp", 40, 203 }, -{ PROC_LINKS(close_panel, 0), "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 441 }, -{ PROC_LINKS(copy, 0), "copy", 4, "Copy the text in the range from the cursor to the mark onto the clipboard.", 74, "w:\\4ed\\code\\4coder_clipboard.cpp", 35, 26 }, -{ PROC_LINKS(cursor_mark_swap, 0), "cursor_mark_swap", 16, "Swaps the position of the cursor and the mark.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 95 }, -{ PROC_LINKS(cut, 0), "cut", 3, "Cut the text in the range from the cursor to the mark onto the clipboard.", 73, "w:\\4ed\\code\\4coder_clipboard.cpp", 35, 35 }, -{ PROC_LINKS(decrease_face_size, 0), "decrease_face_size", 18, "Decrease the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 531 }, -{ PROC_LINKS(decrease_line_wrap, 0), "decrease_line_wrap", 18, "Decrases the current buffer's width for line wrapping.", 54, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 508 }, -{ PROC_LINKS(delete_char, 0), "delete_char", 11, "Deletes the character to the right of the cursor.", 49, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 49 }, -{ PROC_LINKS(delete_current_scope, 0), "delete_current_scope", 20, "Deletes the braces surrounding the currently selected scope. Leaves the contents within the scope.", 99, "w:\\4ed\\code\\4coder_scope_commands.cpp", 40, 487 }, -{ PROC_LINKS(delete_file_query, 0), "delete_file_query", 17, "Deletes the file of the current buffer if 4coder has the appropriate access rights. Will ask the user for confirmation first.", 125, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1024 }, -{ PROC_LINKS(delete_line, 0), "delete_line", 11, "Delete the line the on which the cursor sits.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1274 }, -{ PROC_LINKS(delete_range, 0), "delete_range", 12, "Deletes the text in the range between the cursor and the mark.", 62, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 107 }, -{ PROC_LINKS(delete_word, 0), "delete_word", 11, "Delete characters between the cursor position and the first alphanumeric boundary to the right.", 95, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1253 }, -{ PROC_LINKS(duplicate_line, 0), "duplicate_line", 14, "Create a copy of the line on which the cursor sits.", 51, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1252 }, -{ PROC_LINKS(eol_dosify, 0), "eol_dosify", 10, "Puts the buffer in DOS line ending mode.", 40, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 561 }, -{ PROC_LINKS(eol_nixify, 0), "eol_nixify", 10, "Puts the buffer in NIX line ending mode.", 40, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 569 }, -{ PROC_LINKS(execute_any_cli, 0), "execute_any_cli", 15, "Queries for an output buffer name and system command, runs the system command as a CLI and prints the output to the specified buffer.", 133, "w:\\4ed\\code\\4coder_system_command.cpp", 40, 23 }, -{ PROC_LINKS(execute_arbitrary_command, 0), "execute_arbitrary_command", 25, "Execute a 'long form' command.", 30, "w:\\4ed\\code\\4coder_long_command_switch.cpp", 45, 8 }, -{ PROC_LINKS(execute_previous_cli, 0), "execute_previous_cli", 20, "If the command execute_any_cli has already been used, this will execute a CLI reusing the most recent buffer name and command.", 126, "w:\\4ed\\code\\4coder_system_command.cpp", 40, 7 }, -{ PROC_LINKS(exit_4coder, 0), "exit_4coder", 11, "Attempts to close 4coder.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 577 }, -{ PROC_LINKS(goto_beginning_of_file, 0), "goto_beginning_of_file", 22, "Sets the cursor to the beginning of the file.", 45, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1168 }, -{ PROC_LINKS(goto_end_of_file, 0), "goto_end_of_file", 16, "Sets the cursor to the end of the file.", 39, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1175 }, -{ PROC_LINKS(goto_first_jump_direct, 0), "goto_first_jump_direct", 22, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "w:\\4ed\\code\\4coder_jump_direct.cpp", 37, 84 }, -{ PROC_LINKS(goto_first_jump_same_panel_sticky, 0), "goto_first_jump_same_panel_sticky", 33, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer and views the buffer in the panel where the jump list was.", 153, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 37, 517 }, -{ PROC_LINKS(goto_first_jump_sticky, 0), "goto_first_jump_sticky", 22, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 37, 499 }, -{ PROC_LINKS(goto_jump_at_cursor_direct, 0), "goto_jump_at_cursor_direct", 26, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.", 187, "w:\\4ed\\code\\4coder_jump_direct.cpp", 37, 8 }, -{ PROC_LINKS(goto_jump_at_cursor_same_panel_direct, 0), "goto_jump_at_cursor_same_panel_direct", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list..", 168, "w:\\4ed\\code\\4coder_jump_direct.cpp", 37, 29 }, -{ PROC_LINKS(goto_jump_at_cursor_same_panel_sticky, 0), "goto_jump_at_cursor_same_panel_sticky", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list.", 167, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 37, 345 }, -{ PROC_LINKS(goto_jump_at_cursor_sticky, 0), "goto_jump_at_cursor_sticky", 26, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.", 187, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 37, 317 }, -{ PROC_LINKS(goto_line, 0), "goto_line", 9, "Queries the user for a number, and jumps the cursor to the corresponding line.", 78, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 585 }, -{ PROC_LINKS(goto_next_jump_direct, 0), "goto_next_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "w:\\4ed\\code\\4coder_jump_direct.cpp", 37, 48 }, -{ PROC_LINKS(goto_next_jump_no_skips_direct, 0), "goto_next_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "w:\\4ed\\code\\4coder_jump_direct.cpp", 37, 66 }, -{ PROC_LINKS(goto_next_jump_no_skips_sticky, 0), "goto_next_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 37, 468 }, -{ PROC_LINKS(goto_next_jump_sticky, 0), "goto_next_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 37, 438 }, -{ PROC_LINKS(goto_prev_jump_direct, 0), "goto_prev_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "w:\\4ed\\code\\4coder_jump_direct.cpp", 37, 57 }, -{ PROC_LINKS(goto_prev_jump_no_skips_direct, 0), "goto_prev_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "w:\\4ed\\code\\4coder_jump_direct.cpp", 37, 75 }, -{ PROC_LINKS(goto_prev_jump_no_skips_sticky, 0), "goto_prev_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 37, 484 }, -{ PROC_LINKS(goto_prev_jump_sticky, 0), "goto_prev_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 37, 454 }, -{ PROC_LINKS(hide_filebar, 0), "hide_filebar", 12, "Sets the current view to hide it's filebar.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 471 }, -{ PROC_LINKS(hide_scrollbar, 0), "hide_scrollbar", 14, "Sets the current view to hide it's scrollbar.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 457 }, -{ PROC_LINKS(highlight_next_scope_absolute, 0), "highlight_next_scope_absolute", 29, "Finds the first scope started by '{' after the cursor and puts the cursor and mark on the '{' and '}'.", 102, "w:\\4ed\\code\\4coder_scope_commands.cpp", 40, 363 }, -{ PROC_LINKS(highlight_prev_scope_absolute, 0), "highlight_prev_scope_absolute", 29, "Finds the first scope started by '{' before the cursor and puts the cursor and mark on the '{' and '}'.", 103, "w:\\4ed\\code\\4coder_scope_commands.cpp", 40, 382 }, -{ PROC_LINKS(highlight_surrounding_scope, 0), "highlight_surrounding_scope", 27, "Finds the scope enclosed by '{' '}' surrounding the cursor and puts the cursor and mark on the '{' and '}'.", 107, "w:\\4ed\\code\\4coder_scope_commands.cpp", 40, 341 }, -{ PROC_LINKS(if0_off, 0), "if0_off", 7, "Surround the range between the cursor and mark with an '#if 0' and an '#endif'", 78, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 49, 82 }, -{ PROC_LINKS(increase_face_size, 0), "increase_face_size", 18, "Increase the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 519 }, -{ PROC_LINKS(increase_line_wrap, 0), "increase_line_wrap", 18, "Increases the current buffer's width for line wrapping.", 55, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 497 }, -{ PROC_LINKS(interactive_kill_buffer, 0), "interactive_kill_buffer", 23, "Interactively kill an open buffer.", 34, "w:\\4ed\\code\\4coder_lists.cpp", 31, 646 }, -{ PROC_LINKS(interactive_new, 0), "interactive_new", 15, "Interactively creates a new file.", 33, "w:\\4ed\\code\\4coder_lists.cpp", 31, 748 }, -{ PROC_LINKS(interactive_open, 0), "interactive_open", 16, "Interactively opens a file.", 27, "w:\\4ed\\code\\4coder_lists.cpp", 31, 775 }, -{ PROC_LINKS(interactive_open_or_new, 0), "interactive_open_or_new", 23, "Interactively open a file out of the file system.", 49, "w:\\4ed\\code\\4coder_lists.cpp", 31, 715 }, -{ PROC_LINKS(interactive_switch_buffer, 0), "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "w:\\4ed\\code\\4coder_lists.cpp", 31, 628 }, -{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1444 }, -{ PROC_LINKS(left_adjust_view, 0), "left_adjust_view", 16, "Sets the left size of the view near the x position of the cursor.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 135 }, -{ PROC_LINKS(list_all_functions_current_buffer, 0), "list_all_functions_current_buffer", 33, "Creates a jump list of lines of the current buffer that appear to define or declare functions.", 94, "w:\\4ed\\code\\4coder_function_list.cpp", 39, 318 }, -{ PROC_LINKS(list_all_locations, 0), "list_all_locations", 18, "Queries the user for a string and lists all exact case-sensitive matches found in all open buffers.", 99, "w:\\4ed\\code\\4coder_search.cpp", 32, 747 }, -{ PROC_LINKS(list_all_locations_case_insensitive, 0), "list_all_locations_case_insensitive", 35, "Queries the user for a string and lists all exact case-insensitive matches found in all open buffers.", 101, "w:\\4ed\\code\\4coder_search.cpp", 32, 759 }, -{ PROC_LINKS(list_all_locations_of_identifier, 0), "list_all_locations_of_identifier", 32, "Reads a token or word under the cursor and lists all exact case-sensitive mathces in all open buffers.", 102, "w:\\4ed\\code\\4coder_search.cpp", 32, 771 }, -{ PROC_LINKS(list_all_locations_of_identifier_case_insensitive, 0), "list_all_locations_of_identifier_case_insensitive", 49, "Reads a token or word under the cursor and lists all exact case-insensitive mathces in all open buffers.", 104, "w:\\4ed\\code\\4coder_search.cpp", 32, 777 }, -{ PROC_LINKS(list_all_locations_of_selection, 0), "list_all_locations_of_selection", 31, "Reads the string in the selected range and lists all exact case-sensitive mathces in all open buffers.", 102, "w:\\4ed\\code\\4coder_search.cpp", 32, 783 }, -{ PROC_LINKS(list_all_locations_of_selection_case_insensitive, 0), "list_all_locations_of_selection_case_insensitive", 48, "Reads the string in the selected range and lists all exact case-insensitive mathces in all open buffers.", 104, "w:\\4ed\\code\\4coder_search.cpp", 32, 789 }, -{ PROC_LINKS(list_all_locations_of_type_definition, 0), "list_all_locations_of_type_definition", 37, "Queries user for string, lists all locations of strings that appear to define a type whose name matches the input string.", 121, "w:\\4ed\\code\\4coder_search.cpp", 32, 795 }, -{ PROC_LINKS(list_all_locations_of_type_definition_of_identifier, 0), "list_all_locations_of_type_definition_of_identifier", 51, "Reads a token or word under the cursor and lists all locations of strings that appear to define a type whose name matches it.", 125, "w:\\4ed\\code\\4coder_search.cpp", 32, 806 }, -{ PROC_LINKS(list_all_substring_locations, 0), "list_all_substring_locations", 28, "Queries the user for a string and lists all case-sensitive substring matches found in all open buffers.", 103, "w:\\4ed\\code\\4coder_search.cpp", 32, 753 }, -{ PROC_LINKS(list_all_substring_locations_case_insensitive, 0), "list_all_substring_locations_case_insensitive", 45, "Queries the user for a string and lists all case-insensitive substring matches found in all open buffers.", 105, "w:\\4ed\\code\\4coder_search.cpp", 32, 765 }, -{ PROC_LINKS(lister__activate, 0), "lister__activate", 16, "A lister mode command that activates the list's action on the highlighted item.", 79, "w:\\4ed\\code\\4coder_lists.cpp", 31, 17 }, -{ PROC_LINKS(lister__backspace_text_field, 0), "lister__backspace_text_field", 28, "A lister mode command that dispatches to the lister's backspace text field handler.", 83, "w:\\4ed\\code\\4coder_lists.cpp", 31, 43 }, -{ PROC_LINKS(lister__backspace_text_field__default, 0), "lister__backspace_text_field__default", 37, "A lister mode command that backspaces one character from the text field.", 72, "w:\\4ed\\code\\4coder_lists.cpp", 31, 148 }, -{ PROC_LINKS(lister__backspace_text_field__file_path, 0), "lister__backspace_text_field__file_path", 39, "A lister mode command that backspaces one character from the text field of a file system list.", 94, "w:\\4ed\\code\\4coder_lists.cpp", 31, 220 }, -{ PROC_LINKS(lister__mouse_press, 0), "lister__mouse_press", 19, "A lister mode command that beings a click interaction with a list item under the mouse.", 87, "w:\\4ed\\code\\4coder_lists.cpp", 31, 88 }, -{ PROC_LINKS(lister__mouse_release, 0), "lister__mouse_release", 21, "A lister mode command that ends a click interaction with a list item under the mouse, possibly activating it.", 109, "w:\\4ed\\code\\4coder_lists.cpp", 31, 100 }, -{ PROC_LINKS(lister__move_down, 0), "lister__move_down", 17, "A lister mode command that dispatches to the lister's navigate down handler.", 76, "w:\\4ed\\code\\4coder_lists.cpp", 31, 63 }, -{ PROC_LINKS(lister__move_down__default, 0), "lister__move_down__default", 26, "A lister mode command that moves the highlighted item one down in the list.", 75, "w:\\4ed\\code\\4coder_lists.cpp", 31, 179 }, -{ PROC_LINKS(lister__move_up, 0), "lister__move_up", 15, "A lister mode command that dispatches to the lister's navigate up handler.", 74, "w:\\4ed\\code\\4coder_lists.cpp", 31, 53 }, -{ PROC_LINKS(lister__move_up__default, 0), "lister__move_up__default", 24, "A lister mode command that moves the highlighted item one up in the list.", 73, "w:\\4ed\\code\\4coder_lists.cpp", 31, 163 }, -{ PROC_LINKS(lister__quit, 0), "lister__quit", 12, "A lister mode command that quits the list without executing any actions.", 72, "w:\\4ed\\code\\4coder_lists.cpp", 31, 8 }, -{ PROC_LINKS(lister__repaint, 0), "lister__repaint", 15, "A lister mode command that updates the lists UI data.", 53, "w:\\4ed\\code\\4coder_lists.cpp", 31, 117 }, -{ PROC_LINKS(lister__wheel_scroll, 0), "lister__wheel_scroll", 20, "A lister mode command that scrolls the list in response to the mouse wheel.", 75, "w:\\4ed\\code\\4coder_lists.cpp", 31, 73 }, -{ PROC_LINKS(lister__write_character, 0), "lister__write_character", 23, "A lister mode command that dispatches to the lister's write character handler.", 78, "w:\\4ed\\code\\4coder_lists.cpp", 31, 33 }, -{ PROC_LINKS(lister__write_character__default, 0), "lister__write_character__default", 32, "A lister mode command that inserts a new character to the text field.", 69, "w:\\4ed\\code\\4coder_lists.cpp", 31, 128 }, -{ PROC_LINKS(lister__write_character__file_path, 0), "lister__write_character__file_path", 34, "A lister mode command that inserts a character into the text field of a file system list.", 89, "w:\\4ed\\code\\4coder_lists.cpp", 31, 195 }, -{ PROC_LINKS(lister__write_character__fixed_list, 0), "lister__write_character__fixed_list", 35, "A lister mode command that handles input for the fixed sure to kill list.", 73, "w:\\4ed\\code\\4coder_lists.cpp", 31, 255 }, -{ PROC_LINKS(load_project, 0), "load_project", 12, "Looks for a project.4coder file in the current directory and tries to load it. Looks in parent directories until a project file is found or there are no more parents.", 167, "w:\\4ed\\code\\4coder_project_commands.cpp", 42, 1071 }, -{ PROC_LINKS(make_directory_query, 0), "make_directory_query", 20, "Queries the user for a name and creates a new directory with the given name.", 76, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1132 }, -{ PROC_LINKS(move_down, 0), "move_down", 9, "Moves the cursor down one line.", 31, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 250 }, -{ PROC_LINKS(move_down_10, 0), "move_down_10", 12, "Moves the cursor down ten lines.", 32, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 262 }, -{ PROC_LINKS(move_down_textual, 0), "move_down_textual", 17, "Moves down to the next line of actual text, regardless of line wrapping.", 72, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 268 }, -{ PROC_LINKS(move_left, 0), "move_left", 9, "Moves the cursor one character to the left.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 299 }, -{ PROC_LINKS(move_line_down, 0), "move_line_down", 14, "Swaps the line under the cursor with the line below it, and moves the cursor down with it.", 90, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1229 }, -{ PROC_LINKS(move_line_up, 0), "move_line_up", 12, "Swaps the line under the cursor with the line above it, and moves the cursor up with it.", 88, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1165 }, -{ PROC_LINKS(move_right, 0), "move_right", 10, "Moves the cursor one character to the right.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 308 }, -{ PROC_LINKS(move_up, 0), "move_up", 7, "Moves the cursor up one line.", 29, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 244 }, -{ PROC_LINKS(move_up_10, 0), "move_up_10", 10, "Moves the cursor up ten lines.", 30, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 256 }, -{ PROC_LINKS(newline_or_goto_position_direct, 0), "newline_or_goto_position_direct", 31, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "w:\\4ed\\code\\4coder_jump_direct.cpp", 37, 101 }, -{ PROC_LINKS(newline_or_goto_position_same_panel_direct, 0), "newline_or_goto_position_same_panel_direct", 42, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "w:\\4ed\\code\\4coder_jump_direct.cpp", 37, 116 }, -{ PROC_LINKS(newline_or_goto_position_same_panel_sticky, 0), "newline_or_goto_position_same_panel_sticky", 42, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 37, 555 }, -{ PROC_LINKS(newline_or_goto_position_sticky, 0), "newline_or_goto_position_sticky", 31, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 37, 540 }, -{ PROC_LINKS(open_all_code, 0), "open_all_code", 13, "Open all code in the current directory. File types are determined by extensions. An extension is considered code based on the extensions specified in 4coder.config.", 164, "w:\\4ed\\code\\4coder_project_commands.cpp", 42, 1055 }, -{ PROC_LINKS(open_all_code_recursive, 0), "open_all_code_recursive", 23, "Works as open_all_code but also runs in all subdirectories.", 59, "w:\\4ed\\code\\4coder_project_commands.cpp", 42, 1062 }, -{ PROC_LINKS(open_color_tweaker, 0), "open_color_tweaker", 18, "Opens the 4coder theme selector list.", 37, "w:\\4ed\\code\\4coder_lists.cpp", 31, 791 }, -{ PROC_LINKS(open_file_in_quotes, 0), "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1351 }, -{ PROC_LINKS(open_in_other, 0), "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1502 }, -{ PROC_LINKS(open_long_braces, 0), "open_long_braces", 16, "At the cursor, insert a '{' and '}' separated by a blank line.", 62, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 49, 58 }, -{ PROC_LINKS(open_long_braces_break, 0), "open_long_braces_break", 22, "At the cursor, insert a '{' and '}break;' separated by a blank line.", 68, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 49, 74 }, -{ PROC_LINKS(open_long_braces_semicolon, 0), "open_long_braces_semicolon", 26, "At the cursor, insert a '{' and '};' separated by a blank line.", 63, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 49, 66 }, -{ PROC_LINKS(open_matching_file_cpp, 0), "open_matching_file_cpp", 22, "If the current file is a *.cpp or *.h, attempts to open the corresponding *.h or *.cpp file in the other view.", 110, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1387 }, -{ PROC_LINKS(open_panel_hsplit, 0), "open_panel_hsplit", 17, "Create a new panel by horizontally splitting the active panel.", 62, "w:\\4ed\\code\\4coder_default_framework.cpp", 43, 164 }, -{ PROC_LINKS(open_panel_vsplit, 0), "open_panel_vsplit", 17, "Create a new panel by vertically splitting the active panel.", 60, "w:\\4ed\\code\\4coder_default_framework.cpp", 43, 155 }, -{ PROC_LINKS(page_down, 0), "page_down", 9, "Scrolls the view down one view height and moves the cursor down one view height.", 80, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 288 }, -{ PROC_LINKS(page_up, 0), "page_up", 7, "Scrolls the view up one view height and moves the cursor up one view height.", 76, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 279 }, -{ PROC_LINKS(paste, 0), "paste", 5, "At the cursor, insert the text at the top of the clipboard.", 59, "w:\\4ed\\code\\4coder_clipboard.cpp", 35, 46 }, -{ PROC_LINKS(paste_and_indent, 0), "paste_and_indent", 16, "Paste from the top of clipboard and run auto-indent on the newly pasted text.", 77, "w:\\4ed\\code\\4coder_clipboard.cpp", 35, 131 }, -{ PROC_LINKS(paste_next, 0), "paste_next", 10, "If the previous command was paste or paste_next, replaces the paste range with the next text down on the clipboard, otherwise operates as the paste command.", 156, "w:\\4ed\\code\\4coder_clipboard.cpp", 35, 83 }, -{ PROC_LINKS(paste_next_and_indent, 0), "paste_next_and_indent", 21, "Paste the next item on the clipboard and run auto-indent on the newly pasted text.", 82, "w:\\4ed\\code\\4coder_clipboard.cpp", 35, 138 }, -{ PROC_LINKS(place_in_scope, 0), "place_in_scope", 14, "Wraps the code contained in the range between cursor and mark with a new curly brace scope.", 91, "w:\\4ed\\code\\4coder_scope_commands.cpp", 40, 481 }, -{ PROC_LINKS(project_fkey_command, 0), "project_fkey_command", 20, "Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.", 175, "w:\\4ed\\code\\4coder_project_commands.cpp", 42, 1078 }, -{ PROC_LINKS(project_go_to_root_directory, 0), "project_go_to_root_directory", 28, "Changes 4coder's hot directory to the root directory of the currently loaded project. With no loaded project nothing hapepns.", 125, "w:\\4ed\\code\\4coder_project_commands.cpp", 42, 1103 }, -{ PROC_LINKS(query_replace, 0), "query_replace", 13, "Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.", 120, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 912 }, -{ PROC_LINKS(query_replace_identifier, 0), "query_replace_identifier", 24, "Queries the user for a string, and incrementally replace every occurence of the word or token found at the cursor with the specified string.", 140, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 932 }, -{ PROC_LINKS(query_replace_selection, 0), "query_replace_selection", 23, "Queries the user for a string, and incrementally replace every occurence of the string found in the selected range with the specified string.", 141, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 950 }, -{ PROC_LINKS(redo, 0), "redo", 4, "Advances forewards through the undo history.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1459 }, -{ PROC_LINKS(reload_themes, 0), "reload_themes", 13, "Loads all the theme files in the theme folder, replacing duplicates with the new theme data.", 92, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1479 }, -{ PROC_LINKS(remap_interactive, 0), "remap_interactive", 17, "Switch to a named key binding map.", 34, "w:\\4ed\\code\\4coder_default_framework.cpp", 43, 213 }, -{ PROC_LINKS(rename_file_query, 0), "rename_file_query", 17, "Queries the user for a new name and renames the file of the current buffer, altering the buffer's name too.", 107, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1090 }, -{ PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1465 }, -{ PROC_LINKS(replace_in_range, 0), "replace_in_range", 16, "Queries the user for two strings, and replaces all occurences of the first string in the range between the cursor and the mark with the second string.", 150, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 810 }, -{ PROC_LINKS(reverse_search, 0), "reverse_search", 14, "Begins an incremental search up through the current buffer for a user specified string.", 87, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 781 }, -{ PROC_LINKS(reverse_search_identifier, 0), "reverse_search_identifier", 25, "Begins an incremental search up through the current buffer for the word or token under the cursor.", 98, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 799 }, -{ PROC_LINKS(save, 0), "save", 4, "Saves the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1471 }, -{ PROC_LINKS(save_all_dirty_buffers, 0), "save_all_dirty_buffers", 22, "Saves all buffers marked dirty (showing the '*' indicator).", 59, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 994 }, -{ PROC_LINKS(save_to_query, 0), "save_to_query", 13, "Queries the user for a name and saves the contents of the current buffer, altering the buffer's name too.", 105, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1050 }, -{ PROC_LINKS(scope_absorb_down, 0), "scope_absorb_down", 17, "If a scope is currently selected, and a statement or block statement is present below the current scope, the statement is moved into the scope.", 143, "w:\\4ed\\code\\4coder_scope_commands.cpp", 40, 738 }, -{ PROC_LINKS(search, 0), "search", 6, "Begins an incremental search down through the current buffer for a user specified string.", 89, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 774 }, -{ PROC_LINKS(search_identifier, 0), "search_identifier", 17, "Begins an incremental search down through the current buffer for the word or token under the cursor.", 100, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 788 }, -{ PROC_LINKS(seek_alphanumeric_left, 0), "seek_alphanumeric_left", 22, "Seek left for boundary between alphanumeric characters and non-alphanumeric characters.", 87, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1227 }, -{ PROC_LINKS(seek_alphanumeric_or_camel_left, 0), "seek_alphanumeric_or_camel_left", 31, "Seek left for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 106, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1239 }, -{ PROC_LINKS(seek_alphanumeric_or_camel_right, 0), "seek_alphanumeric_or_camel_right", 32, "Seek right for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 107, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1233 }, -{ PROC_LINKS(seek_alphanumeric_right, 0), "seek_alphanumeric_right", 23, "Seek right for boundary between alphanumeric characters and non-alphanumeric characters.", 88, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1221 }, -{ PROC_LINKS(seek_beginning_of_line, 0), "seek_beginning_of_line", 22, "Seeks the cursor to the beginning of the visual line.", 53, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1126 }, -{ PROC_LINKS(seek_beginning_of_textual_line, 0), "seek_beginning_of_textual_line", 30, "Seeks the cursor to the beginning of the line across all text.", 62, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1108 }, -{ PROC_LINKS(seek_end_of_line, 0), "seek_end_of_line", 16, "Seeks the cursor to the end of the visual line.", 47, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1137 }, -{ PROC_LINKS(seek_end_of_textual_line, 0), "seek_end_of_textual_line", 24, "Seeks the cursor to the end of the line across all text.", 56, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1117 }, -{ PROC_LINKS(seek_token_left, 0), "seek_token_left", 15, "Seek left for the next beginning of a token.", 44, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1203 }, -{ PROC_LINKS(seek_token_right, 0), "seek_token_right", 16, "Seek right for the next end of a token.", 39, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1197 }, -{ PROC_LINKS(seek_white_or_token_left, 0), "seek_white_or_token_left", 24, "Seek left for the next end of a token or boundary between whitespace and non-whitespace.", 88, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1215 }, -{ PROC_LINKS(seek_white_or_token_right, 0), "seek_white_or_token_right", 25, "Seek right for the next end of a token or boundary between whitespace and non-whitespace.", 89, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1209 }, -{ PROC_LINKS(seek_whitespace_down, 0), "seek_whitespace_down", 20, "Seeks the cursor down to the next blank line.", 45, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1099 }, -{ PROC_LINKS(seek_whitespace_down_end_line, 0), "seek_whitespace_down_end_line", 29, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1158 }, -{ PROC_LINKS(seek_whitespace_left, 0), "seek_whitespace_left", 20, "Seek left for the next boundary between whitespace and non-whitespace.", 70, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1191 }, -{ PROC_LINKS(seek_whitespace_right, 0), "seek_whitespace_right", 21, "Seek right for the next boundary between whitespace and non-whitespace.", 71, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1185 }, -{ PROC_LINKS(seek_whitespace_up, 0), "seek_whitespace_up", 18, "Seeks the cursor up to the next blank line.", 43, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1090 }, -{ PROC_LINKS(seek_whitespace_up_end_line, 0), "seek_whitespace_up_end_line", 27, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1148 }, -{ PROC_LINKS(select_all, 0), "select_all", 10, "Puts the cursor at the top of the file, and the mark at the bottom of the file.", 79, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 317 }, -{ PROC_LINKS(set_bindings_choose, 0), "set_bindings_choose", 19, "Remap keybindings using the 'choose' mapping rule.", 50, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 44, 47 }, -{ PROC_LINKS(set_bindings_default, 0), "set_bindings_default", 20, "Remap keybindings using the 'default' mapping rule.", 51, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 44, 61 }, -{ PROC_LINKS(set_bindings_mac_default, 0), "set_bindings_mac_default", 24, "Remap keybindings using the 'mac-default' mapping rule.", 55, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 44, 75 }, -{ PROC_LINKS(set_mark, 0), "set_mark", 8, "Sets the mark to the current position of the cursor.", 52, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 86 }, -{ PROC_LINKS(setup_build_bat, 0), "setup_build_bat", 15, "Queries the user for several configuration options and initializes a new build batch script.", 92, "w:\\4ed\\code\\4coder_project_commands.cpp", 42, 1488 }, -{ PROC_LINKS(setup_build_bat_and_sh, 0), "setup_build_bat_and_sh", 22, "Queries the user for several configuration options and initializes a new build batch script.", 92, "w:\\4ed\\code\\4coder_project_commands.cpp", 42, 1500 }, -{ PROC_LINKS(setup_build_sh, 0), "setup_build_sh", 14, "Queries the user for several configuration options and initializes a new build shell script.", 92, "w:\\4ed\\code\\4coder_project_commands.cpp", 42, 1494 }, -{ PROC_LINKS(setup_new_project, 0), "setup_new_project", 17, "Queries the user for several configuration options and initializes a new 4coder project with build scripts for every OS.", 120, "w:\\4ed\\code\\4coder_project_commands.cpp", 42, 1481 }, -{ PROC_LINKS(show_filebar, 0), "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 464 }, -{ PROC_LINKS(show_scrollbar, 0), "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 450 }, -{ PROC_LINKS(snipe_token_or_word, 0), "snipe_token_or_word", 19, "Delete a single, whole token on or to the left of the cursor and post it to the clipboard.", 90, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1259 }, -{ PROC_LINKS(snipe_token_or_word_right, 0), "snipe_token_or_word_right", 25, "Delete a single, whole token on or to the right of the cursor and post it to the clipboard.", 91, "w:\\4ed\\code\\4coder_seek.cpp", 30, 1265 }, -{ PROC_LINKS(suppress_mouse, 0), "suppress_mouse", 14, "Hides the mouse and causes all mosue input (clicks, position, wheel) to be ignored.", 83, "w:\\4ed\\code\\4coder_default_framework.cpp", 43, 187 }, -{ PROC_LINKS(swap_buffers_between_panels, 0), "swap_buffers_between_panels", 27, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1411 }, -{ PROC_LINKS(to_lowercase, 0), "to_lowercase", 12, "Converts all ascii text in the range between the cursor and the mark to lowercase.", 82, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 348 }, -{ PROC_LINKS(to_uppercase, 0), "to_uppercase", 12, "Converts all ascii text in the range between the cursor and the mark to uppercase.", 82, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 328 }, -{ PROC_LINKS(toggle_filebar, 0), "toggle_filebar", 14, "Toggles the visibility status of the current view's filebar.", 60, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 478 }, -{ PROC_LINKS(toggle_fullscreen, 0), "toggle_fullscreen", 17, "Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.", 89, "w:\\4ed\\code\\4coder_default_framework.cpp", 43, 205 }, -{ PROC_LINKS(toggle_line_wrap, 0), "toggle_line_wrap", 16, "Toggles the current buffer's line wrapping status.", 50, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 487 }, -{ PROC_LINKS(toggle_mouse, 0), "toggle_mouse", 12, "Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.", 71, "w:\\4ed\\code\\4coder_default_framework.cpp", 43, 199 }, -{ PROC_LINKS(toggle_show_whitespace, 0), "toggle_show_whitespace", 22, "Toggles the current buffer's whitespace visibility status.", 58, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 554 }, -{ PROC_LINKS(toggle_virtual_whitespace, 0), "toggle_virtual_whitespace", 25, "Toggles the current buffer's virtual whitespace status.", 55, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 543 }, -{ PROC_LINKS(undo, 0), "undo", 4, "Advances backwards through the undo history.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1453 }, -{ PROC_LINKS(view_buffer_other_panel, 0), "view_buffer_other_panel", 23, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 1401 }, -{ PROC_LINKS(word_complete, 0), "word_complete", 13, "Iteratively tries completing the word to the left of the cursor with other words in open buffers that have the same prefix string.", 130, "w:\\4ed\\code\\4coder_search.cpp", 32, 826 }, -{ PROC_LINKS(write_and_auto_tab, 0), "write_and_auto_tab", 18, "Inserts a character and auto-indents the line on which the cursor sits.", 71, "w:\\4ed\\code\\4coder_auto_indent.cpp", 37, 745 }, -{ PROC_LINKS(write_block, 0), "write_block", 11, "At the cursor, insert a block comment.", 38, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 49, 106 }, -{ PROC_LINKS(write_character, 0), "write_character", 15, "Inserts whatever character was used to trigger this command.", 60, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 33 }, -{ PROC_LINKS(write_hack, 0), "write_hack", 10, "At the cursor, insert a '// HACK' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 49, 94 }, -{ PROC_LINKS(write_note, 0), "write_note", 10, "At the cursor, insert a '// NOTE' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 49, 100 }, -{ PROC_LINKS(write_todo, 0), "write_todo", 10, "At the cursor, insert a '// TODO' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 49, 88 }, -{ PROC_LINKS(write_underscore, 0), "write_underscore", 16, "Inserts an underscore.", 22, "w:\\4ed\\code\\4coder_base_commands.cpp", 39, 42 }, -{ PROC_LINKS(write_zero_struct, 0), "write_zero_struct", 17, "At the cursor, insert a ' = {0};'.", 34, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 49, 112 }, +{ PROC_LINKS(allow_mouse, 0), "allow_mouse", 11, "Shows the mouse and causes all mouse input to be processed normally.", 68, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 49, 193 }, +{ PROC_LINKS(auto_tab_line_at_cursor, 0), "auto_tab_line_at_cursor", 23, "Auto-indents the line on which the cursor sits.", 47, "c:\\work\\4ed\\code\\4coder_auto_indent.cpp", 43, 722 }, +{ PROC_LINKS(auto_tab_range, 0), "auto_tab_range", 14, "Auto-indents the range between the cursor and the mark.", 55, "c:\\work\\4ed\\code\\4coder_auto_indent.cpp", 43, 733 }, +{ PROC_LINKS(auto_tab_whole_file, 0), "auto_tab_whole_file", 19, "Audo-indents the entire current buffer.", 39, "c:\\work\\4ed\\code\\4coder_auto_indent.cpp", 43, 712 }, +{ PROC_LINKS(backspace_char, 0), "backspace_char", 14, "Deletes the character to the left of the cursor.", 48, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 67 }, +{ PROC_LINKS(backspace_word, 0), "backspace_word", 14, "Delete characters between the cursor position and the first alphanumeric boundary to the left.", 94, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1247 }, +{ PROC_LINKS(basic_change_active_panel, 0), "basic_change_active_panel", 25, "Change the currently active panel, moving to the panel with the next highest view_id. Will not skipe the build panel if it is open.", 132, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 433 }, +{ PROC_LINKS(build_in_build_panel, 0), "build_in_build_panel", 20, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*. Puts the *compilation* buffer in a panel at the footer of the current view.", 230, "c:\\work\\4ed\\code\\4coder_build_commands.cpp", 46, 187 }, +{ PROC_LINKS(build_search, 0), "build_search", 12, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*.", 153, "c:\\work\\4ed\\code\\4coder_build_commands.cpp", 46, 155 }, +{ PROC_LINKS(center_view, 0), "center_view", 11, "Centers the view vertically on the line on which the cursor sits.", 65, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 120 }, +{ PROC_LINKS(change_active_panel, 0), "change_active_panel", 19, "Change the currently active panel, moving to the panel with the next highest view_id.", 85, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 49, 135 }, +{ PROC_LINKS(change_active_panel_backwards, 0), "change_active_panel_backwards", 29, "Change the currently active panel, moving to the panel with the next lowest view_id.", 84, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 49, 145 }, +{ PROC_LINKS(change_to_build_panel, 0), "change_to_build_panel", 21, "If the special build panel is open, makes the build panel the active panel.", 75, "c:\\work\\4ed\\code\\4coder_build_commands.cpp", 46, 209 }, +{ PROC_LINKS(clean_all_lines, 0), "clean_all_lines", 15, "Removes trailing whitespace from all lines in the current buffer.", 65, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 368 }, +{ PROC_LINKS(click_set_cursor, 0), "click_set_cursor", 16, "Sets the cursor position to the mouse position.", 47, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 174 }, +{ PROC_LINKS(click_set_mark, 0), "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 187 }, +{ PROC_LINKS(close_all_code, 0), "close_all_code", 14, "Closes any buffer with a filename ending with an extension configured to be recognized as a code file type.", 107, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 48, 1048 }, +{ PROC_LINKS(close_build_panel, 0), "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "c:\\work\\4ed\\code\\4coder_build_commands.cpp", 46, 203 }, +{ PROC_LINKS(close_panel, 0), "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 441 }, +{ PROC_LINKS(copy, 0), "copy", 4, "Copy the text in the range from the cursor to the mark onto the clipboard.", 74, "c:\\work\\4ed\\code\\4coder_clipboard.cpp", 41, 26 }, +{ PROC_LINKS(cursor_mark_swap, 0), "cursor_mark_swap", 16, "Swaps the position of the cursor and the mark.", 46, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 95 }, +{ PROC_LINKS(cut, 0), "cut", 3, "Cut the text in the range from the cursor to the mark onto the clipboard.", 73, "c:\\work\\4ed\\code\\4coder_clipboard.cpp", 41, 35 }, +{ PROC_LINKS(decrease_face_size, 0), "decrease_face_size", 18, "Decrease the size of the face used by the current buffer.", 57, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 531 }, +{ PROC_LINKS(decrease_line_wrap, 0), "decrease_line_wrap", 18, "Decrases the current buffer's width for line wrapping.", 54, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 508 }, +{ PROC_LINKS(delete_char, 0), "delete_char", 11, "Deletes the character to the right of the cursor.", 49, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 49 }, +{ PROC_LINKS(delete_current_scope, 0), "delete_current_scope", 20, "Deletes the braces surrounding the currently selected scope. Leaves the contents within the scope.", 99, "c:\\work\\4ed\\code\\4coder_scope_commands.cpp", 46, 487 }, +{ PROC_LINKS(delete_file_query, 0), "delete_file_query", 17, "Deletes the file of the current buffer if 4coder has the appropriate access rights. Will ask the user for confirmation first.", 125, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1024 }, +{ PROC_LINKS(delete_line, 0), "delete_line", 11, "Delete the line the on which the cursor sits.", 45, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1274 }, +{ PROC_LINKS(delete_range, 0), "delete_range", 12, "Deletes the text in the range between the cursor and the mark.", 62, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 107 }, +{ PROC_LINKS(delete_word, 0), "delete_word", 11, "Delete characters between the cursor position and the first alphanumeric boundary to the right.", 95, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1253 }, +{ PROC_LINKS(duplicate_line, 0), "duplicate_line", 14, "Create a copy of the line on which the cursor sits.", 51, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1252 }, +{ PROC_LINKS(eol_dosify, 0), "eol_dosify", 10, "Puts the buffer in DOS line ending mode.", 40, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 561 }, +{ PROC_LINKS(eol_nixify, 0), "eol_nixify", 10, "Puts the buffer in NIX line ending mode.", 40, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 569 }, +{ PROC_LINKS(execute_any_cli, 0), "execute_any_cli", 15, "Queries for an output buffer name and system command, runs the system command as a CLI and prints the output to the specified buffer.", 133, "c:\\work\\4ed\\code\\4coder_system_command.cpp", 46, 23 }, +{ PROC_LINKS(execute_arbitrary_command, 0), "execute_arbitrary_command", 25, "Execute a 'long form' command.", 30, "c:\\work\\4ed\\code\\4coder_long_command_switch.cpp", 51, 8 }, +{ PROC_LINKS(execute_previous_cli, 0), "execute_previous_cli", 20, "If the command execute_any_cli has already been used, this will execute a CLI reusing the most recent buffer name and command.", 126, "c:\\work\\4ed\\code\\4coder_system_command.cpp", 46, 7 }, +{ PROC_LINKS(exit_4coder, 0), "exit_4coder", 11, "Attempts to close 4coder.", 25, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 577 }, +{ PROC_LINKS(goto_beginning_of_file, 0), "goto_beginning_of_file", 22, "Sets the cursor to the beginning of the file.", 45, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1168 }, +{ PROC_LINKS(goto_end_of_file, 0), "goto_end_of_file", 16, "Sets the cursor to the end of the file.", 39, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1175 }, +{ PROC_LINKS(goto_first_jump_direct, 0), "goto_first_jump_direct", 22, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "c:\\work\\4ed\\code\\4coder_jump_direct.cpp", 43, 84 }, +{ PROC_LINKS(goto_first_jump_same_panel_sticky, 0), "goto_first_jump_same_panel_sticky", 33, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer and views the buffer in the panel where the jump list was.", 153, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 43, 516 }, +{ PROC_LINKS(goto_first_jump_sticky, 0), "goto_first_jump_sticky", 22, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 43, 498 }, +{ PROC_LINKS(goto_jump_at_cursor_direct, 0), "goto_jump_at_cursor_direct", 26, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.", 187, "c:\\work\\4ed\\code\\4coder_jump_direct.cpp", 43, 8 }, +{ PROC_LINKS(goto_jump_at_cursor_same_panel_direct, 0), "goto_jump_at_cursor_same_panel_direct", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list..", 168, "c:\\work\\4ed\\code\\4coder_jump_direct.cpp", 43, 29 }, +{ PROC_LINKS(goto_jump_at_cursor_same_panel_sticky, 0), "goto_jump_at_cursor_same_panel_sticky", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list.", 167, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 43, 344 }, +{ PROC_LINKS(goto_jump_at_cursor_sticky, 0), "goto_jump_at_cursor_sticky", 26, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.", 187, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 43, 316 }, +{ PROC_LINKS(goto_line, 0), "goto_line", 9, "Queries the user for a number, and jumps the cursor to the corresponding line.", 78, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 585 }, +{ PROC_LINKS(goto_next_jump_direct, 0), "goto_next_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "c:\\work\\4ed\\code\\4coder_jump_direct.cpp", 43, 48 }, +{ PROC_LINKS(goto_next_jump_no_skips_direct, 0), "goto_next_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "c:\\work\\4ed\\code\\4coder_jump_direct.cpp", 43, 66 }, +{ PROC_LINKS(goto_next_jump_no_skips_sticky, 0), "goto_next_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 43, 467 }, +{ PROC_LINKS(goto_next_jump_sticky, 0), "goto_next_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 43, 437 }, +{ PROC_LINKS(goto_prev_jump_direct, 0), "goto_prev_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "c:\\work\\4ed\\code\\4coder_jump_direct.cpp", 43, 57 }, +{ PROC_LINKS(goto_prev_jump_no_skips_direct, 0), "goto_prev_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "c:\\work\\4ed\\code\\4coder_jump_direct.cpp", 43, 75 }, +{ PROC_LINKS(goto_prev_jump_no_skips_sticky, 0), "goto_prev_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 43, 483 }, +{ PROC_LINKS(goto_prev_jump_sticky, 0), "goto_prev_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 43, 453 }, +{ PROC_LINKS(hide_filebar, 0), "hide_filebar", 12, "Sets the current view to hide it's filebar.", 43, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 471 }, +{ PROC_LINKS(hide_scrollbar, 0), "hide_scrollbar", 14, "Sets the current view to hide it's scrollbar.", 45, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 457 }, +{ PROC_LINKS(highlight_next_scope_absolute, 0), "highlight_next_scope_absolute", 29, "Finds the first scope started by '{' after the cursor and puts the cursor and mark on the '{' and '}'.", 102, "c:\\work\\4ed\\code\\4coder_scope_commands.cpp", 46, 363 }, +{ PROC_LINKS(highlight_prev_scope_absolute, 0), "highlight_prev_scope_absolute", 29, "Finds the first scope started by '{' before the cursor and puts the cursor and mark on the '{' and '}'.", 103, "c:\\work\\4ed\\code\\4coder_scope_commands.cpp", 46, 382 }, +{ PROC_LINKS(highlight_surrounding_scope, 0), "highlight_surrounding_scope", 27, "Finds the scope enclosed by '{' '}' surrounding the cursor and puts the cursor and mark on the '{' and '}'.", 107, "c:\\work\\4ed\\code\\4coder_scope_commands.cpp", 46, 341 }, +{ PROC_LINKS(if0_off, 0), "if0_off", 7, "Surround the range between the cursor and mark with an '#if 0' and an '#endif'", 78, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 55, 82 }, +{ PROC_LINKS(increase_face_size, 0), "increase_face_size", 18, "Increase the size of the face used by the current buffer.", 57, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 519 }, +{ PROC_LINKS(increase_line_wrap, 0), "increase_line_wrap", 18, "Increases the current buffer's width for line wrapping.", 55, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 497 }, +{ PROC_LINKS(interactive_kill_buffer, 0), "interactive_kill_buffer", 23, "Interactively kill an open buffer.", 34, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 646 }, +{ PROC_LINKS(interactive_new, 0), "interactive_new", 15, "Interactively creates a new file.", 33, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 748 }, +{ PROC_LINKS(interactive_open, 0), "interactive_open", 16, "Interactively opens a file.", 27, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 775 }, +{ PROC_LINKS(interactive_open_or_new, 0), "interactive_open_or_new", 23, "Interactively open a file out of the file system.", 49, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 715 }, +{ PROC_LINKS(interactive_switch_buffer, 0), "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 628 }, +{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1444 }, +{ PROC_LINKS(left_adjust_view, 0), "left_adjust_view", 16, "Sets the left size of the view near the x position of the cursor.", 65, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 135 }, +{ PROC_LINKS(list_all_functions_current_buffer, 0), "list_all_functions_current_buffer", 33, "Creates a jump list of lines of the current buffer that appear to define or declare functions.", 94, "c:\\work\\4ed\\code\\4coder_function_list.cpp", 45, 318 }, +{ PROC_LINKS(list_all_locations, 0), "list_all_locations", 18, "Queries the user for a string and lists all exact case-sensitive matches found in all open buffers.", 99, "c:\\work\\4ed\\code\\4coder_search.cpp", 38, 747 }, +{ PROC_LINKS(list_all_locations_case_insensitive, 0), "list_all_locations_case_insensitive", 35, "Queries the user for a string and lists all exact case-insensitive matches found in all open buffers.", 101, "c:\\work\\4ed\\code\\4coder_search.cpp", 38, 759 }, +{ PROC_LINKS(list_all_locations_of_identifier, 0), "list_all_locations_of_identifier", 32, "Reads a token or word under the cursor and lists all exact case-sensitive mathces in all open buffers.", 102, "c:\\work\\4ed\\code\\4coder_search.cpp", 38, 771 }, +{ PROC_LINKS(list_all_locations_of_identifier_case_insensitive, 0), "list_all_locations_of_identifier_case_insensitive", 49, "Reads a token or word under the cursor and lists all exact case-insensitive mathces in all open buffers.", 104, "c:\\work\\4ed\\code\\4coder_search.cpp", 38, 777 }, +{ PROC_LINKS(list_all_locations_of_selection, 0), "list_all_locations_of_selection", 31, "Reads the string in the selected range and lists all exact case-sensitive mathces in all open buffers.", 102, "c:\\work\\4ed\\code\\4coder_search.cpp", 38, 783 }, +{ PROC_LINKS(list_all_locations_of_selection_case_insensitive, 0), "list_all_locations_of_selection_case_insensitive", 48, "Reads the string in the selected range and lists all exact case-insensitive mathces in all open buffers.", 104, "c:\\work\\4ed\\code\\4coder_search.cpp", 38, 789 }, +{ PROC_LINKS(list_all_locations_of_type_definition, 0), "list_all_locations_of_type_definition", 37, "Queries user for string, lists all locations of strings that appear to define a type whose name matches the input string.", 121, "c:\\work\\4ed\\code\\4coder_search.cpp", 38, 795 }, +{ PROC_LINKS(list_all_locations_of_type_definition_of_identifier, 0), "list_all_locations_of_type_definition_of_identifier", 51, "Reads a token or word under the cursor and lists all locations of strings that appear to define a type whose name matches it.", 125, "c:\\work\\4ed\\code\\4coder_search.cpp", 38, 806 }, +{ PROC_LINKS(list_all_substring_locations, 0), "list_all_substring_locations", 28, "Queries the user for a string and lists all case-sensitive substring matches found in all open buffers.", 103, "c:\\work\\4ed\\code\\4coder_search.cpp", 38, 753 }, +{ PROC_LINKS(list_all_substring_locations_case_insensitive, 0), "list_all_substring_locations_case_insensitive", 45, "Queries the user for a string and lists all case-insensitive substring matches found in all open buffers.", 105, "c:\\work\\4ed\\code\\4coder_search.cpp", 38, 765 }, +{ PROC_LINKS(lister__activate, 0), "lister__activate", 16, "A lister mode command that activates the list's action on the highlighted item.", 79, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 17 }, +{ PROC_LINKS(lister__backspace_text_field, 0), "lister__backspace_text_field", 28, "A lister mode command that dispatches to the lister's backspace text field handler.", 83, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 43 }, +{ PROC_LINKS(lister__backspace_text_field__default, 0), "lister__backspace_text_field__default", 37, "A lister mode command that backspaces one character from the text field.", 72, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 148 }, +{ PROC_LINKS(lister__backspace_text_field__file_path, 0), "lister__backspace_text_field__file_path", 39, "A lister mode command that backspaces one character from the text field of a file system list.", 94, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 220 }, +{ PROC_LINKS(lister__mouse_press, 0), "lister__mouse_press", 19, "A lister mode command that beings a click interaction with a list item under the mouse.", 87, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 88 }, +{ PROC_LINKS(lister__mouse_release, 0), "lister__mouse_release", 21, "A lister mode command that ends a click interaction with a list item under the mouse, possibly activating it.", 109, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 100 }, +{ PROC_LINKS(lister__move_down, 0), "lister__move_down", 17, "A lister mode command that dispatches to the lister's navigate down handler.", 76, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 63 }, +{ PROC_LINKS(lister__move_down__default, 0), "lister__move_down__default", 26, "A lister mode command that moves the highlighted item one down in the list.", 75, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 179 }, +{ PROC_LINKS(lister__move_up, 0), "lister__move_up", 15, "A lister mode command that dispatches to the lister's navigate up handler.", 74, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 53 }, +{ PROC_LINKS(lister__move_up__default, 0), "lister__move_up__default", 24, "A lister mode command that moves the highlighted item one up in the list.", 73, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 163 }, +{ PROC_LINKS(lister__quit, 0), "lister__quit", 12, "A lister mode command that quits the list without executing any actions.", 72, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 8 }, +{ PROC_LINKS(lister__repaint, 0), "lister__repaint", 15, "A lister mode command that updates the lists UI data.", 53, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 117 }, +{ PROC_LINKS(lister__wheel_scroll, 0), "lister__wheel_scroll", 20, "A lister mode command that scrolls the list in response to the mouse wheel.", 75, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 73 }, +{ PROC_LINKS(lister__write_character, 0), "lister__write_character", 23, "A lister mode command that dispatches to the lister's write character handler.", 78, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 33 }, +{ PROC_LINKS(lister__write_character__default, 0), "lister__write_character__default", 32, "A lister mode command that inserts a new character to the text field.", 69, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 128 }, +{ PROC_LINKS(lister__write_character__file_path, 0), "lister__write_character__file_path", 34, "A lister mode command that inserts a character into the text field of a file system list.", 89, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 195 }, +{ PROC_LINKS(lister__write_character__fixed_list, 0), "lister__write_character__fixed_list", 35, "A lister mode command that handles input for the fixed sure to kill list.", 73, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 255 }, +{ PROC_LINKS(load_project, 0), "load_project", 12, "Looks for a project.4coder file in the current directory and tries to load it. Looks in parent directories until a project file is found or there are no more parents.", 167, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 48, 1071 }, +{ PROC_LINKS(make_directory_query, 0), "make_directory_query", 20, "Queries the user for a name and creates a new directory with the given name.", 76, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1132 }, +{ PROC_LINKS(move_down, 0), "move_down", 9, "Moves the cursor down one line.", 31, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 250 }, +{ PROC_LINKS(move_down_10, 0), "move_down_10", 12, "Moves the cursor down ten lines.", 32, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 262 }, +{ PROC_LINKS(move_down_textual, 0), "move_down_textual", 17, "Moves down to the next line of actual text, regardless of line wrapping.", 72, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 268 }, +{ PROC_LINKS(move_left, 0), "move_left", 9, "Moves the cursor one character to the left.", 43, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 299 }, +{ PROC_LINKS(move_line_down, 0), "move_line_down", 14, "Swaps the line under the cursor with the line below it, and moves the cursor down with it.", 90, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1229 }, +{ PROC_LINKS(move_line_up, 0), "move_line_up", 12, "Swaps the line under the cursor with the line above it, and moves the cursor up with it.", 88, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1165 }, +{ PROC_LINKS(move_right, 0), "move_right", 10, "Moves the cursor one character to the right.", 44, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 308 }, +{ PROC_LINKS(move_up, 0), "move_up", 7, "Moves the cursor up one line.", 29, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 244 }, +{ PROC_LINKS(move_up_10, 0), "move_up_10", 10, "Moves the cursor up ten lines.", 30, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 256 }, +{ PROC_LINKS(newline_or_goto_position_direct, 0), "newline_or_goto_position_direct", 31, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "c:\\work\\4ed\\code\\4coder_jump_direct.cpp", 43, 101 }, +{ PROC_LINKS(newline_or_goto_position_same_panel_direct, 0), "newline_or_goto_position_same_panel_direct", 42, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "c:\\work\\4ed\\code\\4coder_jump_direct.cpp", 43, 116 }, +{ PROC_LINKS(newline_or_goto_position_same_panel_sticky, 0), "newline_or_goto_position_same_panel_sticky", 42, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 43, 554 }, +{ PROC_LINKS(newline_or_goto_position_sticky, 0), "newline_or_goto_position_sticky", 31, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 43, 539 }, +{ PROC_LINKS(open_all_code, 0), "open_all_code", 13, "Open all code in the current directory. File types are determined by extensions. An extension is considered code based on the extensions specified in 4coder.config.", 164, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 48, 1055 }, +{ PROC_LINKS(open_all_code_recursive, 0), "open_all_code_recursive", 23, "Works as open_all_code but also runs in all subdirectories.", 59, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 48, 1062 }, +{ PROC_LINKS(open_color_tweaker, 0), "open_color_tweaker", 18, "Opens the 4coder theme selector list.", 37, "c:\\work\\4ed\\code\\4coder_lists.cpp", 37, 791 }, +{ PROC_LINKS(open_file_in_quotes, 0), "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1351 }, +{ PROC_LINKS(open_in_other, 0), "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1502 }, +{ PROC_LINKS(open_long_braces, 0), "open_long_braces", 16, "At the cursor, insert a '{' and '}' separated by a blank line.", 62, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 55, 58 }, +{ PROC_LINKS(open_long_braces_break, 0), "open_long_braces_break", 22, "At the cursor, insert a '{' and '}break;' separated by a blank line.", 68, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 55, 74 }, +{ PROC_LINKS(open_long_braces_semicolon, 0), "open_long_braces_semicolon", 26, "At the cursor, insert a '{' and '};' separated by a blank line.", 63, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 55, 66 }, +{ PROC_LINKS(open_matching_file_cpp, 0), "open_matching_file_cpp", 22, "If the current file is a *.cpp or *.h, attempts to open the corresponding *.h or *.cpp file in the other view.", 110, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1387 }, +{ PROC_LINKS(open_panel_hsplit, 0), "open_panel_hsplit", 17, "Create a new panel by horizontally splitting the active panel.", 62, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 49, 164 }, +{ PROC_LINKS(open_panel_vsplit, 0), "open_panel_vsplit", 17, "Create a new panel by vertically splitting the active panel.", 60, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 49, 155 }, +{ PROC_LINKS(page_down, 0), "page_down", 9, "Scrolls the view down one view height and moves the cursor down one view height.", 80, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 288 }, +{ PROC_LINKS(page_up, 0), "page_up", 7, "Scrolls the view up one view height and moves the cursor up one view height.", 76, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 279 }, +{ PROC_LINKS(paste, 0), "paste", 5, "At the cursor, insert the text at the top of the clipboard.", 59, "c:\\work\\4ed\\code\\4coder_clipboard.cpp", 41, 46 }, +{ PROC_LINKS(paste_and_indent, 0), "paste_and_indent", 16, "Paste from the top of clipboard and run auto-indent on the newly pasted text.", 77, "c:\\work\\4ed\\code\\4coder_clipboard.cpp", 41, 131 }, +{ PROC_LINKS(paste_next, 0), "paste_next", 10, "If the previous command was paste or paste_next, replaces the paste range with the next text down on the clipboard, otherwise operates as the paste command.", 156, "c:\\work\\4ed\\code\\4coder_clipboard.cpp", 41, 83 }, +{ PROC_LINKS(paste_next_and_indent, 0), "paste_next_and_indent", 21, "Paste the next item on the clipboard and run auto-indent on the newly pasted text.", 82, "c:\\work\\4ed\\code\\4coder_clipboard.cpp", 41, 138 }, +{ PROC_LINKS(place_in_scope, 0), "place_in_scope", 14, "Wraps the code contained in the range between cursor and mark with a new curly brace scope.", 91, "c:\\work\\4ed\\code\\4coder_scope_commands.cpp", 46, 481 }, +{ PROC_LINKS(project_fkey_command, 0), "project_fkey_command", 20, "Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.", 175, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 48, 1078 }, +{ PROC_LINKS(project_go_to_root_directory, 0), "project_go_to_root_directory", 28, "Changes 4coder's hot directory to the root directory of the currently loaded project. With no loaded project nothing hapepns.", 125, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 48, 1103 }, +{ PROC_LINKS(query_replace, 0), "query_replace", 13, "Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.", 120, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 912 }, +{ PROC_LINKS(query_replace_identifier, 0), "query_replace_identifier", 24, "Queries the user for a string, and incrementally replace every occurence of the word or token found at the cursor with the specified string.", 140, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 932 }, +{ PROC_LINKS(query_replace_selection, 0), "query_replace_selection", 23, "Queries the user for a string, and incrementally replace every occurence of the string found in the selected range with the specified string.", 141, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 950 }, +{ PROC_LINKS(redo, 0), "redo", 4, "Advances forewards through the undo history.", 44, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1459 }, +{ PROC_LINKS(reload_themes, 0), "reload_themes", 13, "Loads all the theme files in the theme folder, replacing duplicates with the new theme data.", 92, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1479 }, +{ PROC_LINKS(remap_interactive, 0), "remap_interactive", 17, "Switch to a named key binding map.", 34, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 49, 213 }, +{ PROC_LINKS(rename_file_query, 0), "rename_file_query", 17, "Queries the user for a new name and renames the file of the current buffer, altering the buffer's name too.", 107, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1090 }, +{ PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1465 }, +{ PROC_LINKS(replace_in_range, 0), "replace_in_range", 16, "Queries the user for two strings, and replaces all occurences of the first string in the range between the cursor and the mark with the second string.", 150, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 810 }, +{ PROC_LINKS(reverse_search, 0), "reverse_search", 14, "Begins an incremental search up through the current buffer for a user specified string.", 87, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 781 }, +{ PROC_LINKS(reverse_search_identifier, 0), "reverse_search_identifier", 25, "Begins an incremental search up through the current buffer for the word or token under the cursor.", 98, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 799 }, +{ PROC_LINKS(save, 0), "save", 4, "Saves the current buffer.", 25, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1471 }, +{ PROC_LINKS(save_all_dirty_buffers, 0), "save_all_dirty_buffers", 22, "Saves all buffers marked dirty (showing the '*' indicator).", 59, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 994 }, +{ PROC_LINKS(save_to_query, 0), "save_to_query", 13, "Queries the user for a name and saves the contents of the current buffer, altering the buffer's name too.", 105, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1050 }, +{ PROC_LINKS(scope_absorb_down, 0), "scope_absorb_down", 17, "If a scope is currently selected, and a statement or block statement is present below the current scope, the statement is moved into the scope.", 143, "c:\\work\\4ed\\code\\4coder_scope_commands.cpp", 46, 738 }, +{ PROC_LINKS(search, 0), "search", 6, "Begins an incremental search down through the current buffer for a user specified string.", 89, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 774 }, +{ PROC_LINKS(search_identifier, 0), "search_identifier", 17, "Begins an incremental search down through the current buffer for the word or token under the cursor.", 100, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 788 }, +{ PROC_LINKS(seek_alphanumeric_left, 0), "seek_alphanumeric_left", 22, "Seek left for boundary between alphanumeric characters and non-alphanumeric characters.", 87, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1227 }, +{ PROC_LINKS(seek_alphanumeric_or_camel_left, 0), "seek_alphanumeric_or_camel_left", 31, "Seek left for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 106, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1239 }, +{ PROC_LINKS(seek_alphanumeric_or_camel_right, 0), "seek_alphanumeric_or_camel_right", 32, "Seek right for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 107, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1233 }, +{ PROC_LINKS(seek_alphanumeric_right, 0), "seek_alphanumeric_right", 23, "Seek right for boundary between alphanumeric characters and non-alphanumeric characters.", 88, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1221 }, +{ PROC_LINKS(seek_beginning_of_line, 0), "seek_beginning_of_line", 22, "Seeks the cursor to the beginning of the visual line.", 53, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1126 }, +{ PROC_LINKS(seek_beginning_of_textual_line, 0), "seek_beginning_of_textual_line", 30, "Seeks the cursor to the beginning of the line across all text.", 62, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1108 }, +{ PROC_LINKS(seek_end_of_line, 0), "seek_end_of_line", 16, "Seeks the cursor to the end of the visual line.", 47, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1137 }, +{ PROC_LINKS(seek_end_of_textual_line, 0), "seek_end_of_textual_line", 24, "Seeks the cursor to the end of the line across all text.", 56, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1117 }, +{ PROC_LINKS(seek_token_left, 0), "seek_token_left", 15, "Seek left for the next beginning of a token.", 44, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1203 }, +{ PROC_LINKS(seek_token_right, 0), "seek_token_right", 16, "Seek right for the next end of a token.", 39, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1197 }, +{ PROC_LINKS(seek_white_or_token_left, 0), "seek_white_or_token_left", 24, "Seek left for the next end of a token or boundary between whitespace and non-whitespace.", 88, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1215 }, +{ PROC_LINKS(seek_white_or_token_right, 0), "seek_white_or_token_right", 25, "Seek right for the next end of a token or boundary between whitespace and non-whitespace.", 89, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1209 }, +{ PROC_LINKS(seek_whitespace_down, 0), "seek_whitespace_down", 20, "Seeks the cursor down to the next blank line.", 45, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1099 }, +{ PROC_LINKS(seek_whitespace_down_end_line, 0), "seek_whitespace_down_end_line", 29, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1158 }, +{ PROC_LINKS(seek_whitespace_left, 0), "seek_whitespace_left", 20, "Seek left for the next boundary between whitespace and non-whitespace.", 70, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1191 }, +{ PROC_LINKS(seek_whitespace_right, 0), "seek_whitespace_right", 21, "Seek right for the next boundary between whitespace and non-whitespace.", 71, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1185 }, +{ PROC_LINKS(seek_whitespace_up, 0), "seek_whitespace_up", 18, "Seeks the cursor up to the next blank line.", 43, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1090 }, +{ PROC_LINKS(seek_whitespace_up_end_line, 0), "seek_whitespace_up_end_line", 27, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1148 }, +{ PROC_LINKS(select_all, 0), "select_all", 10, "Puts the cursor at the top of the file, and the mark at the bottom of the file.", 79, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 317 }, +{ PROC_LINKS(set_bindings_choose, 0), "set_bindings_choose", 19, "Remap keybindings using the 'choose' mapping rule.", 50, "c:\\work\\4ed\\code\\4coder_remapping_commands.cpp", 50, 47 }, +{ PROC_LINKS(set_bindings_default, 0), "set_bindings_default", 20, "Remap keybindings using the 'default' mapping rule.", 51, "c:\\work\\4ed\\code\\4coder_remapping_commands.cpp", 50, 61 }, +{ PROC_LINKS(set_bindings_mac_default, 0), "set_bindings_mac_default", 24, "Remap keybindings using the 'mac-default' mapping rule.", 55, "c:\\work\\4ed\\code\\4coder_remapping_commands.cpp", 50, 75 }, +{ PROC_LINKS(set_mark, 0), "set_mark", 8, "Sets the mark to the current position of the cursor.", 52, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 86 }, +{ PROC_LINKS(setup_build_bat, 0), "setup_build_bat", 15, "Queries the user for several configuration options and initializes a new build batch script.", 92, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 48, 1488 }, +{ PROC_LINKS(setup_build_bat_and_sh, 0), "setup_build_bat_and_sh", 22, "Queries the user for several configuration options and initializes a new build batch script.", 92, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 48, 1500 }, +{ PROC_LINKS(setup_build_sh, 0), "setup_build_sh", 14, "Queries the user for several configuration options and initializes a new build shell script.", 92, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 48, 1494 }, +{ PROC_LINKS(setup_new_project, 0), "setup_new_project", 17, "Queries the user for several configuration options and initializes a new 4coder project with build scripts for every OS.", 120, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 48, 1481 }, +{ PROC_LINKS(show_filebar, 0), "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 464 }, +{ PROC_LINKS(show_scrollbar, 0), "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 450 }, +{ PROC_LINKS(snipe_token_or_word, 0), "snipe_token_or_word", 19, "Delete a single, whole token on or to the left of the cursor and post it to the clipboard.", 90, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1259 }, +{ PROC_LINKS(snipe_token_or_word_right, 0), "snipe_token_or_word_right", 25, "Delete a single, whole token on or to the right of the cursor and post it to the clipboard.", 91, "c:\\work\\4ed\\code\\4coder_seek.cpp", 36, 1265 }, +{ PROC_LINKS(suppress_mouse, 0), "suppress_mouse", 14, "Hides the mouse and causes all mosue input (clicks, position, wheel) to be ignored.", 83, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 49, 187 }, +{ PROC_LINKS(swap_buffers_between_panels, 0), "swap_buffers_between_panels", 27, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1411 }, +{ PROC_LINKS(to_lowercase, 0), "to_lowercase", 12, "Converts all ascii text in the range between the cursor and the mark to lowercase.", 82, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 348 }, +{ PROC_LINKS(to_uppercase, 0), "to_uppercase", 12, "Converts all ascii text in the range between the cursor and the mark to uppercase.", 82, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 328 }, +{ PROC_LINKS(toggle_filebar, 0), "toggle_filebar", 14, "Toggles the visibility status of the current view's filebar.", 60, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 478 }, +{ PROC_LINKS(toggle_fullscreen, 0), "toggle_fullscreen", 17, "Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.", 89, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 49, 205 }, +{ PROC_LINKS(toggle_line_wrap, 0), "toggle_line_wrap", 16, "Toggles the current buffer's line wrapping status.", 50, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 487 }, +{ PROC_LINKS(toggle_mouse, 0), "toggle_mouse", 12, "Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.", 71, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 49, 199 }, +{ PROC_LINKS(toggle_show_whitespace, 0), "toggle_show_whitespace", 22, "Toggles the current buffer's whitespace visibility status.", 58, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 554 }, +{ PROC_LINKS(toggle_virtual_whitespace, 0), "toggle_virtual_whitespace", 25, "Toggles the current buffer's virtual whitespace status.", 55, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 543 }, +{ PROC_LINKS(undo, 0), "undo", 4, "Advances backwards through the undo history.", 44, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1453 }, +{ PROC_LINKS(view_buffer_other_panel, 0), "view_buffer_other_panel", 23, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1401 }, +{ PROC_LINKS(word_complete, 0), "word_complete", 13, "Iteratively tries completing the word to the left of the cursor with other words in open buffers that have the same prefix string.", 130, "c:\\work\\4ed\\code\\4coder_search.cpp", 38, 826 }, +{ PROC_LINKS(write_and_auto_tab, 0), "write_and_auto_tab", 18, "Inserts a character and auto-indents the line on which the cursor sits.", 71, "c:\\work\\4ed\\code\\4coder_auto_indent.cpp", 43, 745 }, +{ PROC_LINKS(write_block, 0), "write_block", 11, "At the cursor, insert a block comment.", 38, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 55, 106 }, +{ PROC_LINKS(write_character, 0), "write_character", 15, "Inserts whatever character was used to trigger this command.", 60, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 33 }, +{ PROC_LINKS(write_hack, 0), "write_hack", 10, "At the cursor, insert a '// HACK' comment, includes user name if it was specified in config.4coder.", 99, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 55, 94 }, +{ PROC_LINKS(write_note, 0), "write_note", 10, "At the cursor, insert a '// NOTE' comment, includes user name if it was specified in config.4coder.", 99, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 55, 100 }, +{ PROC_LINKS(write_todo, 0), "write_todo", 10, "At the cursor, insert a '// TODO' comment, includes user name if it was specified in config.4coder.", 99, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 55, 88 }, +{ PROC_LINKS(write_underscore, 0), "write_underscore", 16, "Inserts an underscore.", 22, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 42 }, +{ PROC_LINKS(write_zero_struct, 0), "write_zero_struct", 17, "At the cursor, insert a ' = {0};'.", 34, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 55, 112 }, }; static int32_t fcoder_metacmd_ID_allow_mouse = 0; static int32_t fcoder_metacmd_ID_auto_tab_line_at_cursor = 1; diff --git a/4coder_jump_sticky.cpp b/4coder_jump_sticky.cpp index 35ca845b..2de2da05 100644 --- a/4coder_jump_sticky.cpp +++ b/4coder_jump_sticky.cpp @@ -116,8 +116,8 @@ init_marker_list(Application_Links *app, Partition *scratch, Heap *heap, Buffer_ Sticky_Jump_Stored *stored = push_array(scratch, Sticky_Jump_Stored, jumps.count); - Dynamic_Scope scope_array[2] = {0}; - scope_array[0] = buffer_get_dynamic_scope(app, buffer_id); + Managed_Scope scope_array[2] = {0}; + scope_array[0] = buffer_get_managed_scope(app, buffer_id); for (int32_t i = 0; i < grouped_buffer_ranges.count; i += 1){ Range buffer_range_indices = grouped_buffer_ranges.ranges[i]; @@ -131,7 +131,6 @@ init_marker_list(Application_Links *app, Partition *scratch, Heap *heap, Buffer_ j += 1){ int32_t range_index = range_index_buffer_id_pairs[j].index; Range range = buffer_ranges.ranges[range_index]; - total_jump_count += range.one_past_last - range.first; if (target_buffer_id == 0){ target_buffer_id = jumps.jumps[range.first].jump_buffer_id; } @@ -148,8 +147,8 @@ init_marker_list(Application_Links *app, Partition *scratch, Heap *heap, Buffer_ } } - scope_array[1] = buffer_get_dynamic_scope(app, target_buffer_id); - Dynamic_Scope scope = get_intersected_dynamic_scope(app, scope_array, ArrayCount(scope_array)); + scope_array[1] = buffer_get_managed_scope(app, target_buffer_id); + Managed_Scope scope = get_intersected_managed_scope(app, scope_array, ArrayCount(scope_array)); Managed_Object marker_handle = buffer_add_markers(app, target_buffer_id, total_jump_count, &scope); buffer_set_markers(app, marker_handle, 0, total_jump_count, markers); end_temp_memory(marker_temp); @@ -249,10 +248,10 @@ get_jump_from_list(Application_Links *app, Marker_List *list, int32_t index, ID_ if (get_stored_jump_from_list(app, list, index, &stored)){ Buffer_ID target_buffer_id = stored.jump_buffer_id; - Dynamic_Scope scope_array[2] = {0}; - scope_array[0] = buffer_get_dynamic_scope(app, list->buffer_id); - scope_array[1] = buffer_get_dynamic_scope(app, target_buffer_id); - Dynamic_Scope scope = get_intersected_dynamic_scope(app, scope_array, ArrayCount(scope_array)); + Managed_Scope scope_array[2] = {0}; + scope_array[0] = buffer_get_managed_scope(app, list->buffer_id); + scope_array[1] = buffer_get_managed_scope(app, target_buffer_id); + Managed_Scope scope = get_intersected_managed_scope(app, scope_array, ArrayCount(scope_array)); sticky_jump_marker_handle_loc = managed_variable_create_or_get_id(app, sticky_jump_marker_handle_var, 0); Managed_Object marker_array = 0; diff --git a/4coder_lib/4coder_heap.cpp b/4coder_lib/4coder_heap.cpp index c5157ef1..e3edf74c 100644 --- a/4coder_lib/4coder_heap.cpp +++ b/4coder_lib/4coder_heap.cpp @@ -14,6 +14,35 @@ distribute, and modify this file as you see fit. #define heap__insert_prev(p,n) ((n)->prev=(p)->prev,(n)->next=(p),(n)->prev->next=(n),(p)->prev=(n)) #define heap__remove(n) ((n)->next->prev=(n)->prev,(n)->prev->next=(n)->next) +#if defined(DO_HEAP_CHECKS) +static void +heap_assert_good(Heap *heap){ + if (heap->in_order.next != 0){ + Assert(heap->in_order.prev != 0); + Assert(heap->free_nodes.next != 0); + Assert(heap->free_nodes.prev != 0); + for (Heap_Basic_Node *node = &heap->in_order;;){ + Assert(node->next->prev == node); + Assert(node->prev->next == node); + node = node->next; + if (node == &heap->in_order){ + break; + } + } + for (Heap_Basic_Node *node = &heap->free_nodes;;){ + Assert(node->next->prev == node); + Assert(node->prev->next == node); + node = node->next; + if (node == &heap->free_nodes){ + break; + } + } + } +} +#else +#define heap_assert_good(heap) ((void)(heap)) +#endif + static void heap_init(Heap *heap){ heap__sent_init(&heap->in_order); @@ -22,12 +51,14 @@ heap_init(Heap *heap){ static void heap_extend(Heap *heap, void *memory, i32_4tech size){ + heap_assert_good(heap); if (size >= sizeof(Heap_Node)){ Heap_Node *new_node = (Heap_Node*)memory; heap__insert_prev(&heap->in_order, &new_node->order); heap__insert_next(&heap->free_nodes, &new_node->alloc); new_node->size = size - sizeof(*new_node); } + heap_assert_good(heap); } static void* @@ -40,25 +71,31 @@ heap__reserve_chunk(Heap_Node *node, i32_4tech size){ heap__insert_next(&node->order, &new_node->order); heap__insert_next(&node->alloc, &new_node->alloc); new_node->size = new_node_size; - heap__remove(&node->alloc); - node->alloc.next = 0; - node->alloc.prev = 0; - node->size = size; } + heap__remove(&node->alloc); + node->alloc.next = 0; + node->alloc.prev = 0; + node->size = size; return(ptr); } static void* heap_allocate(Heap *heap, i32_4tech size){ - i32_4tech aligned_size = (size + sizeof(Heap_Node) - 1); - aligned_size = aligned_size - (aligned_size%sizeof(Heap_Node)); - for (Heap_Basic_Node *n = heap->free_nodes.next; - n != &heap->free_nodes; - n = n->next){ - Heap_Node *node = CastFromMember(Heap_Node, alloc, n); - if (node->size >= aligned_size){ - return(heap__reserve_chunk(node, aligned_size)); + if (heap->in_order.next != 0){ + heap_assert_good(heap); + i32_4tech aligned_size = (size + sizeof(Heap_Node) - 1); + aligned_size = aligned_size - (aligned_size%sizeof(Heap_Node)); + for (Heap_Basic_Node *n = heap->free_nodes.next; + n != &heap->free_nodes; + n = n->next){ + Heap_Node *node = CastFromMember(Heap_Node, alloc, n); + if (node->size >= aligned_size){ + void *ptr = heap__reserve_chunk(node, aligned_size); + heap_assert_good(heap); + return(ptr); + } } + heap_assert_good(heap); } return(0); } @@ -81,10 +118,18 @@ heap__merge(Heap *heap, Heap_Node *l, Heap_Node *r){ static void heap_free(Heap *heap, void *memory){ - Heap_Node *node = ((Heap_Node*)memory) - 1; - heap__insert_next(&heap->free_nodes, &node->alloc); - heap__merge(heap, node, CastFromMember(Heap_Node, order, node->order.next)); - heap__merge(heap, CastFromMember(Heap_Node, order, node->order.prev), node); + if (heap->in_order.next != 0 && memory != 0){ + Heap_Node *node = ((Heap_Node*)memory) - 1; + Assert(node->alloc.next == 0); + Assert(node->alloc.prev == 0); + heap_assert_good(heap); + heap__insert_next(&heap->free_nodes, &node->alloc); + heap_assert_good(heap); + heap__merge(heap, node, CastFromMember(Heap_Node, order, node->order.next)); + heap_assert_good(heap); + heap__merge(heap, CastFromMember(Heap_Node, order, node->order.prev), node); + heap_assert_good(heap); + } } #define heap_array(g, T, size) (T*)heap_allocate(g, sizeof(T)*(size)) diff --git a/4coder_lib/4coder_heap.h b/4coder_lib/4coder_heap.h index 9913e9c2..c03d48bb 100644 --- a/4coder_lib/4coder_heap.h +++ b/4coder_lib/4coder_heap.h @@ -85,6 +85,8 @@ struct Heap{ Heap_Basic_Node free_nodes; }; +#define DO_HEAP_CHECKS + #endif // BOTTOM diff --git a/4coder_search.cpp b/4coder_search.cpp index 2477553e..ba37e62f 100644 --- a/4coder_search.cpp +++ b/4coder_search.cpp @@ -834,7 +834,7 @@ CUSTOM_DOC("Iteratively tries completing the word to the left of the cursor with if (buffer.exists){ int32_t do_init = false; - Dynamic_Scope scope = view_get_dynamic_scope(app, view.view_id); + Managed_Scope scope = view_get_managed_scope(app, view.view_id); uint64_t rewrite = 0; managed_variable_get(app, scope, view_rewrite_loc, &rewrite); diff --git a/4ed.cpp b/4ed.cpp index ed78c89d..37257d2e 100644 --- a/4ed.cpp +++ b/4ed.cpp @@ -1075,7 +1075,9 @@ App_Init_Sig(app_init){ } dynamic_variables_init(&models->variable_layout); - dynamic_workspace_init(&models->mem.heap, &models->dynamic_workspace); + dynamic_workspace_init(&models->mem.heap, &models->lifetime_allocator, + DynamicWorkspace_Global, 0, + &models->dynamic_workspace); // NOTE(allen): file setup working_set_init(&models->working_set, partition, &vars->models.mem.heap); diff --git a/4ed_api_implementation.cpp b/4ed_api_implementation.cpp index ef8f0bd4..f3a87e38 100644 --- a/4ed_api_implementation.cpp +++ b/4ed_api_implementation.cpp @@ -1,11 +1,11 @@ /* -* Mr. 4th Dimention - Allen Webster + * Mr. 4th Dimention - Allen Webster * * ??.??.???? * * Implementation of the API functions. * -*/ + */ // TOP @@ -783,7 +783,7 @@ DOC_SEE(Buffer_Batch_Edit_Type) } API_EXPORT Managed_Object -Buffer_Add_Markers(Application_Links *app, Buffer_ID buffer_id, uint32_t marker_count, Dynamic_Scope *scope) +Buffer_Add_Markers(Application_Links *app, Buffer_ID buffer_id, uint32_t marker_count, Managed_Scope *scope) /* DOC_PARAM(buffer_id, The id of the buffer on which to add the new markers.) DOC_PARAM(marker_count, How many markers to be stored in the new marker array.) @@ -1175,15 +1175,14 @@ DOC_SEE(Buffer_Setting_ID) return(result); } -API_EXPORT Dynamic_Scope -Buffer_Get_Dynamic_Scope(Application_Links *app, Buffer_ID buffer_id) +API_EXPORT Managed_Scope +Buffer_Get_Managed_Scope(Application_Links *app, Buffer_ID buffer_id) { Command_Data *cmd = (Command_Data*)app->cmd_context; Editing_File *file = imp_get_file(cmd, buffer_id); - Dynamic_Scope lifetime = {0}; + Managed_Scope lifetime = 0; if (file != 0){ - lifetime.type = DynamicScopeType_Buffer; - lifetime.buffer_id = buffer_id; + lifetime = (Managed_Scope)file->dynamic_workspace.scope_id; } return(lifetime); } @@ -1919,15 +1918,14 @@ DOC_SEE(View_Setting_ID) return(result); } -API_EXPORT Dynamic_Scope -View_Get_Dynamic_Scope(Application_Links *app, View_ID view_id) +API_EXPORT Managed_Scope +View_Get_Managed_Scope(Application_Links *app, View_ID view_id) { Command_Data *cmd = (Command_Data*)app->cmd_context; View *view = imp_get_view(cmd, view_id); - Dynamic_Scope lifetime = {0}; + Managed_Scope lifetime = 0; if (view != 0){ - lifetime.type = DynamicScopeType_View; - lifetime.view_id = view_id; + lifetime = (Managed_Scope)(view->transient.dynamic_workspace.scope_id); } return(lifetime); } @@ -1954,7 +1952,7 @@ DOC_RETURN(This call returns non-zero on success.) Panel_Divider *div = layout->dividers + panel->parent; if (panel->which_child == 1){ - t = 1-t; + t = 1 - t; } div->pos = t; @@ -2336,39 +2334,66 @@ View_Get_UI_Copy(Application_Links *app, View_Summary *view, struct Partition *p return(result); } -API_EXPORT Dynamic_Scope -Get_Global_Dynamic_Scope(Application_Links *app) +API_EXPORT Managed_Scope +Get_Global_Managed_Scope(Application_Links *app) { - Dynamic_Scope scope = {0}; - scope.type = DynamicScopeType_Global; + Command_Data *cmd = (Command_Data*)app->cmd_context; + Models *models = cmd->models; + Managed_Scope scope = (Managed_Scope)models->dynamic_workspace.scope_id; return(scope); } -API_EXPORT Dynamic_Scope -Get_Intersected_Dynamic_Scope(Application_Links *app, Dynamic_Scope *intersected_scopes, int32_t count) +internal Dynamic_Workspace* +get_dynamic_workspace(Models *models, Managed_Scope handle){ + u32_Ptr_Lookup_Result lookup_result = lookup_u32_Ptr_table(&models->lifetime_allocator.scope_id_to_scope_ptr_table, (u32)handle); + if (!lookup_result.success){ + return(0); + } + return((Dynamic_Workspace*)*lookup_result.val); +} + +API_EXPORT Managed_Scope +Get_Intersected_Managed_Scope(Application_Links *app, Managed_Scope *intersected_scopes, int32_t count) { Command_Data *cmd = (Command_Data*)app->cmd_context; Models *models = cmd->models; Lifetime_Allocator *lifetime_allocator = &models->lifetime_allocator; Partition *scratch = &models->mem.part; - Dynamic_Scope result = {0}; Temp_Memory temp = begin_temp_memory(scratch); b32 filled_array = true; Lifetime_Object **object_ptr_array = push_array(scratch, Lifetime_Object*, 0); for (i32 i = 0; i < count; i += 1){ - Dynamic_Scope handle = intersected_scopes[i]; + Dynamic_Workspace *workspace = get_dynamic_workspace(models, intersected_scopes[i]); + if (workspace == 0){ + filled_array = false; + break; + } - switch (handle.type){ - case DynamicScopeType_Global: + switch (workspace->user_type){ + case DynamicWorkspace_Global: { // NOTE(allen): (global_scope INTERSECT X) == X for all X, therefore we emit nothing when a global scope is in the key list. }break; - case DynamicScopeType_Intersected: + case DynamicWorkspace_Buffer: { - Lifetime_Key *key = (Lifetime_Key*)IntAsPtr(handle.intersected_opaque_handle); + Editing_File *file = (Editing_File*)workspace->user_back_ptr; + Lifetime_Object **new_object_ptr = push_array(scratch, Lifetime_Object*, 1); + *new_object_ptr = file->lifetime_object; + }break; + + case DynamicWorkspace_View: + { + View *vptr = (View*)workspace->user_back_ptr; + Lifetime_Object **new_object_ptr = push_array(scratch, Lifetime_Object*, 1); + *new_object_ptr = vptr->transient.lifetime_object; + }break; + + case DynamicWorkspace_Intersected: + { + Lifetime_Key *key = (Lifetime_Key*)workspace->user_back_ptr; if (lifetime_key_check(lifetime_allocator, key)){ i32 member_count = key->count; Lifetime_Object **key_member_ptr = key->members; @@ -2378,40 +2403,16 @@ Get_Intersected_Dynamic_Scope(Application_Links *app, Dynamic_Scope *intersected } } }break; - - case DynamicScopeType_Buffer: - { - Editing_File *file = imp_get_file(cmd, handle.buffer_id); - if (file == 0){ - filled_array = false; - goto quit_loop; - } - Lifetime_Object **new_object_ptr = push_array(scratch, Lifetime_Object*, 1); - *new_object_ptr = file->lifetime_object; - }break; - - case DynamicScopeType_View: - { - View *vptr = imp_get_view(cmd, handle.view_id); - if (vptr == 0){ - filled_array = false; - goto quit_loop; - } - Lifetime_Object **new_object_ptr = push_array(scratch, Lifetime_Object*, 1); - *new_object_ptr = vptr->transient.lifetime_object; - }break; } } - quit_loop:; + Managed_Scope result = 0; if (filled_array){ i32 member_count = (i32)(push_array(scratch, Lifetime_Object*, 0) - object_ptr_array); member_count = lifetime_sort_and_dedup_object_set(object_ptr_array, member_count); - Heap *heap = &models->mem.heap; Lifetime_Key *key = lifetime_get_or_create_intersection_key(heap, lifetime_allocator, object_ptr_array, member_count); - result.type = DynamicScopeType_Intersected; - result.intersected_opaque_handle = (u64)(PtrAsInt(key)); + result = (Managed_Scope)key->dynamic_workspace.scope_id; } end_temp_memory(temp); @@ -2451,47 +2452,12 @@ Managed_Variable_Create_Or_Get_ID(Application_Links *app, char *null_terminated_ return(dynamic_variables_lookup_or_create(heap, layout, name, default_value)); } -internal Dynamic_Workspace* -get_dynamic_workspace(Command_Data *cmd, Dynamic_Scope handle){ - Models *models = cmd->models; - Dynamic_Workspace *workspace = 0; - switch (handle.type){ - case DynamicScopeType_Global: - { - workspace = &models->dynamic_workspace; - }break; - case DynamicScopeType_Intersected: - { - Lifetime_Key *key = (Lifetime_Key*)IntAsPtr(handle.intersected_opaque_handle); - Lifetime_Allocator *lifetime_allocator = &models->lifetime_allocator; - if (lifetime_key_check(lifetime_allocator, key)){ - workspace = &key->dynamic_workspace; - } - }break; - case DynamicScopeType_Buffer: - { - Editing_File *file = imp_get_file(cmd, handle.buffer_id); - if (file != 0){ - workspace = &file->dynamic_workspace; - } - }break; - case DynamicScopeType_View: - { - View *vptr = imp_get_view(cmd, handle.view_id); - if (vptr != 0){ - workspace = &vptr->transient.dynamic_workspace; - } - }break; - } - return(workspace); -} - internal bool32 -get_dynamic_variable(Command_Data *cmd, Dynamic_Scope handle, int32_t location, uint64_t **ptr_out){ +get_dynamic_variable(Command_Data *cmd, Managed_Scope handle, int32_t location, uint64_t **ptr_out){ Models *models = cmd->models; Heap *heap = &models->mem.heap; Dynamic_Variable_Layout *layout = &models->variable_layout; - Dynamic_Workspace *workspace = get_dynamic_workspace(cmd, handle); + Dynamic_Workspace *workspace = get_dynamic_workspace(models, handle); bool32 result = false; if (workspace != 0){ if (dynamic_variables_get_ptr(heap, layout, &workspace->var_block, location, ptr_out)){ @@ -2502,7 +2468,7 @@ get_dynamic_variable(Command_Data *cmd, Dynamic_Scope handle, int32_t location, } API_EXPORT bool32 -Managed_Variable_Set(Application_Links *app, Dynamic_Scope scope, Managed_Variable_ID location, uint64_t value) +Managed_Variable_Set(Application_Links *app, Managed_Scope scope, Managed_Variable_ID location, uint64_t value) { Command_Data *cmd = (Command_Data*)app->cmd_context; u64 *ptr = 0; @@ -2514,7 +2480,7 @@ Managed_Variable_Set(Application_Links *app, Dynamic_Scope scope, Managed_Variab } API_EXPORT bool32 -Managed_Variable_Get(Application_Links *app, Dynamic_Scope scope, Managed_Variable_ID location, uint64_t *value_out) +Managed_Variable_Get(Application_Links *app, Managed_Scope scope, Managed_Variable_ID location, uint64_t *value_out) { Command_Data *cmd = (Command_Data*)app->cmd_context; u64 *ptr = 0; @@ -2526,37 +2492,56 @@ Managed_Variable_Get(Application_Links *app, Dynamic_Scope scope, Managed_Variab } API_EXPORT Managed_Object -Managed_Memory_Alloc(Application_Links *app, Dynamic_Scope scope, int32_t size) +Managed_Memory_Alloc(Application_Links *app, Managed_Scope scope, int32_t size) { Command_Data *cmd = (Command_Data*)app->cmd_context; Models *models = cmd->models; Heap *heap = &models->mem.heap; - Dynamic_Workspace *workspace = get_dynamic_workspace(cmd, scope); + Dynamic_Workspace *workspace = get_dynamic_workspace(models, scope); Managed_Object result = 0; if (workspace != 0){ - result = (Managed_Object)dynamic_allocate(heap, &workspace->mem_bank, size); + void *ptr = dynamic_memory_bank_allocate(heap, &workspace->mem_bank, size); + u32 id = dynamic_workspace_store_pointer(heap, workspace, ptr); + result = ((u64)scope << 32) | (u64)id; } return(result); } +internal u8* +get_dynamic_object(Models *models, Managed_Object object){ + u32 hi_id = (object >> 32)&max_u32; + Dynamic_Workspace *workspace = get_dynamic_workspace(models, hi_id); + if (workspace != 0){ + u32 lo_id = object&max_u32; + return((u8*)dynamic_workspace_get_pointer(workspace, lo_id)); + } + return(0); +} + API_EXPORT bool32 Managed_Memory_Set(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem) { - // Command_Data *cmd = (Command_Data*)app->cmd_context; - // Models *models = cmd->models; - u8 *ptr = (u8*)IntAsPtr(object); - memcpy(ptr + start, mem, size); - return(true); + Command_Data *cmd = (Command_Data*)app->cmd_context; + Models *models = cmd->models; + u8 *ptr = get_dynamic_object(models, object); + if (ptr != 0){ + memcpy(ptr + start, mem, size); + return(true); + } + return(false); } API_EXPORT bool32 Managed_Memory_Get(Application_Links *app, Managed_Object object, uint32_t start, uint32_t size, void *mem_out) { - // Command_Data *cmd = (Command_Data*)app->cmd_context; - // Models *models = cmd->models; - u8 *ptr = (u8*)IntAsPtr(object); - memcpy(mem_out, ptr + start, size); - return(true); + Command_Data *cmd = (Command_Data*)app->cmd_context; + Models *models = cmd->models; + u8 *ptr = get_dynamic_object(models, object); + if (ptr != 0){ + memcpy(mem_out, ptr + start, size); + return(true); + } + return(false); } API_EXPORT User_Input diff --git a/4ed_app_models.h b/4ed_app_models.h index 8c7e5623..010e25bf 100644 --- a/4ed_app_models.h +++ b/4ed_app_models.h @@ -97,6 +97,14 @@ struct Models{ //////////////////////////////// +typedef i32 Dynamic_Workspace_Type; +enum{ + DynamicWorkspace_Global = 0, + DynamicWorkspace_Buffer = 1, + DynamicWorkspace_View = 2, + DynamicWorkspace_Intersected = 3, +}; + typedef i32 Lifetime_Object_Type; enum{ LifetimeObject_File = 0, diff --git a/4ed_app_target.cpp b/4ed_app_target.cpp index 71f55388..7d46ee9e 100644 --- a/4ed_app_target.cpp +++ b/4ed_app_target.cpp @@ -48,6 +48,7 @@ struct Mem_Options{ #include "4ed_linked_node_macros.h" #include "4ed_log.h" +#include "4ed_ptr_check.h" #include "4ed_dynamic_variables.h" #include "4ed_buffer_model.h" @@ -68,6 +69,9 @@ struct Mem_Options{ #include "4ed_view.h" #include "4ed_app_models.h" +#include "4ed_mem.cpp" +#include "4ed_hash_functions.cpp" +#include "4ed_ptr_check.cpp" #include "4ed_dynamic_variables.cpp" #include "4ed_parse_context.cpp" #include "4ed_font.cpp" diff --git a/4ed_buffer.cpp b/4ed_buffer.cpp index 9ff7a900..fb296ba7 100644 --- a/4ed_buffer.cpp +++ b/4ed_buffer.cpp @@ -20,8 +20,12 @@ write_cursor_with_index(Cursor_With_Index *positions, i32 *count, i32 pos){ ++(*count); } +// TODO(allen): Rewrite this without being a dumbass. +// TODO(allen): Rewrite this without being a dumbass. +// TODO(allen): Rewrite this without being a dumbass. #define CursorSwap__(a,b) { Cursor_With_Index t = a; a = b; b = t; } +// TODO(allen): Rewrite this without being a dumbass. internal void buffer_quick_sort_cursors(Cursor_With_Index *positions, i32 start, i32 pivot){ i32 mid = start; @@ -343,7 +347,7 @@ buffer_end_init(Gap_Buffer_Init *init, void *scratch, i32 scratch_size){ internal b32 buffer_stringify_loop(Gap_Buffer_Stream *stream, Gap_Buffer *buffer, i32 start, i32 end){ - b32 result = 0; + b32 result = false; if (0 <= start && start < end && end <= buffer->size1 + buffer->size2){ stream->buffer = buffer; @@ -351,15 +355,15 @@ buffer_stringify_loop(Gap_Buffer_Stream *stream, Gap_Buffer *buffer, i32 start, if (start < buffer->size1){ if (buffer->size1 < end){ - stream->separated = 1; + stream->separated = true; } else{ - stream->separated = 0; + stream->separated = false; } stream->data = buffer->data; } else{ - stream->separated = 0; + stream->separated = false; stream->data = buffer->data + buffer->gap_size; } @@ -374,18 +378,16 @@ buffer_stringify_loop(Gap_Buffer_Stream *stream, Gap_Buffer *buffer, i32 start, stream->end = stream->absolute_end; } - result = 1; + result = true; } - if (result == 0){ - if (stream->use_termination_character){ - stream->buffer = buffer; - stream->absolute_end = end; - stream->use_termination_character = 0; - stream->data = (&stream->terminator) - buffer->size1 - buffer->size2; - stream->end = stream->absolute_end + 1; - result = 1; - } + if (!result && stream->use_termination_character){ + stream->buffer = buffer; + stream->absolute_end = end; + stream->use_termination_character = true; + stream->data = (&stream->terminator) - buffer->size1 - buffer->size2; + stream->end = stream->absolute_end + 1; + result = true; } return(result); diff --git a/4ed_dynamic_variables.cpp b/4ed_dynamic_variables.cpp index a186d2b4..1c65fdc0 100644 --- a/4ed_dynamic_variables.cpp +++ b/4ed_dynamic_variables.cpp @@ -122,8 +122,25 @@ dynamic_variables_get_ptr(Heap *heap, //////////////////////////////// +internal void +dynamic_memory_bank_init(Heap *heap, Dynamic_Memory_Bank *mem_bank){ + heap_init(&mem_bank->heap); + mem_bank->first = 0; + mem_bank->last = 0; +} + +internal void +dynamic_memory_bank_free(Heap *heap, Dynamic_Memory_Bank *mem_bank){ + for (Dynamic_Memory_Header *header = mem_bank->first, *next = 0; + header != 0; + header = next){ + next = header->next; + heap_free(heap, header); + } +} + internal void* -dynamic_allocate(Heap *heap, Dynamic_Memory_Bank *bank, i32 size){ +dynamic_memory_bank_allocate(Heap *heap, Dynamic_Memory_Bank *bank, i32 size){ void *ptr = heap_allocate(&bank->heap, size); if (ptr == 0){ i32 alloc_size = clamp_bottom(4096, size*4); @@ -141,131 +158,44 @@ dynamic_allocate(Heap *heap, Dynamic_Memory_Bank *bank, i32 size){ //////////////////////////////// internal void -dynamic_workspace_init(Heap *heap, Dynamic_Workspace *workspace){ +dynamic_workspace_init(Heap *heap, Lifetime_Allocator *lifetime_allocator, + i32 user_type, void *user_back_ptr, + Dynamic_Workspace *workspace){ dynamic_variables_block_init(heap, &workspace->var_block); + dynamic_memory_bank_init(heap, &workspace->mem_bank); + if (lifetime_allocator->scope_id_counter == 0){ + lifetime_allocator->scope_id_counter = 1; + } + workspace->scope_id = lifetime_allocator->scope_id_counter++; + insert_u32_Ptr_table(heap, &lifetime_allocator->scope_id_to_scope_ptr_table, workspace->scope_id, workspace); + workspace->user_type = user_type; + workspace->user_back_ptr = user_back_ptr; } internal void -dynamic_workspace_free(Heap *heap, Dynamic_Workspace *workspace){ +dynamic_workspace_free(Heap *heap, Lifetime_Allocator *lifetime_allocator, Dynamic_Workspace *workspace){ + erase_u32_Ptr_table(&lifetime_allocator->scope_id_to_scope_ptr_table, workspace->scope_id); dynamic_variables_block_free(heap, &workspace->var_block); + dynamic_memory_bank_free(heap, &workspace->mem_bank); } -//////////////////////////////// - -internal u64 -ptr_check__hash(void *key){ - u64 x = (u64)(PtrAsInt(key)); - return((x >> 3) | bit_63); +internal u32 +dynamic_workspace_store_pointer(Heap *heap, Dynamic_Workspace *workspace, void *ptr){ + if (workspace->object_id_counter == 0){ + workspace->object_id_counter = 1; + } + u32 id = workspace->object_id_counter++; + insert_u32_Ptr_table(heap, &workspace->object_id_to_object_ptr, id, ptr); + return(id); } -internal b32 -ptr_check_table_check(Ptr_Check_Table *table, void *key){ - u32 max = table->max; - if (max > 0 && table->count > 0){ - u64 hash = ptr_check__hash(key); - u32 first_index = hash%max; - u32 index = first_index; - void **keys = table->keys; - for (;;){ - if (keys[index] == key){ - return(true); - } - else if (keys[index] == IntAsPtr(LifetimeKeyHash_Empty)){ - return(false); - } - index += 1; - if (index == max){ - index = 0; - } - if (index == first_index){ - return(false); - } - } +internal void* +dynamic_workspace_get_pointer(Dynamic_Workspace *workspace, u32 id){ + u32_Ptr_Lookup_Result lookup = lookup_u32_Ptr_table(&workspace->object_id_to_object_ptr, id); + if (lookup.success){ + return(*lookup.val); } - return(false); -} - -internal Ptr_Check_Table -ptr_check_table_copy(Heap *heap, Ptr_Check_Table table, u32 new_max); - -internal void -ptr_check_table_insert(Heap *heap, Ptr_Check_Table *table, void *key){ - { - u32 max = table->max; - u32 count = table->count; - if (max == 0 || (count + 1)*6 > max*5){ - Assert(heap != 0); - Ptr_Check_Table new_table = ptr_check_table_copy(heap, *table, max*2); - heap_free(heap, table->keys); - *table = new_table; - } - } - - { - u32 max = table->max; - if (max > 0 && table->count > 0){ - u64 hash = ptr_check__hash(key); - u32 first_index = hash%max; - u32 index = first_index; - void **keys = table->keys; - for (;;){ - if (keys[index] == 0 || keys[index] == (Lifetime_Key*)1){ - keys[index] = key; - return; - } - index += 1; - if (index == max){ - index = 0; - } - if (index == first_index){ - return; - } - } - } - } -} - -internal void -ptr_check_table_erase(Ptr_Check_Table *table, Lifetime_Key *erase_key){ - u32 max = table->max; - if (max > 0 && table->count > 0){ - u64 hash = ptr_check__hash(erase_key); - u32 first_index = hash%max; - u32 index = first_index; - void **keys = table->keys; - for (;;){ - if (keys[index] == erase_key){ - keys[index] = 0; - return; - } - else if (keys[index] == IntAsPtr(LifetimeKeyHash_Empty)){ - return; - } - index += 1; - if (index == max){ - index = 0; - } - if (index == first_index){ - return; - } - } - } -} - -internal Ptr_Check_Table -ptr_check_table_copy(Heap *heap, Ptr_Check_Table table, u32 new_max){ - Ptr_Check_Table new_table = {0}; - new_table.max = clamp_bottom(table.max, new_max); - new_table.max = clamp_bottom(307, new_table.max); - new_table.keys = heap_array(heap, void*, new_table.max); - memset(new_table.keys, 0, sizeof(*new_table.keys)*new_table.max); - for (u32 i = 0; i < table.max; i += 1){ - u64 k = (u64)(PtrAsInt(table.keys[i])); - if ((k&bit_63) == 0){ - ptr_check_table_insert(0, &new_table, table.keys[i]); - } - } - return(new_table); + return(0); } //////////////////////////////// @@ -330,7 +260,7 @@ lifetime__key_table_insert(Heap *heap, Lifetime_Key_Table *table, u64 hash, Life { u32 max = table->max; - if (max > 0 && table->count > 0){ + if (max > 0){ u32 first_index = hash%max; u32 index = first_index; u64 *hashes = table->hashes; @@ -339,6 +269,7 @@ lifetime__key_table_insert(Heap *heap, Lifetime_Key_Table *table, u64 hash, Life hashes[index] == LifetimeKeyHash_Deleted){ hashes[index] = hash; table->keys[index] = key; + table->count += 1; return; } index += 1; @@ -406,7 +337,7 @@ internal void lifetime__free_key(Heap *heap, Lifetime_Allocator *lifetime_allocator, Lifetime_Key *key, Lifetime_Object *skip_object){ // Deinit - dynamic_workspace_free(heap, &key->dynamic_workspace); + dynamic_workspace_free(heap, lifetime_allocator, &key->dynamic_workspace); // Remove From Objects i32 count = key->count; @@ -448,7 +379,7 @@ lifetime__free_key(Heap *heap, Lifetime_Allocator *lifetime_allocator, // Free lifetime__key_table_erase(&lifetime_allocator->key_table, key); - ptr_check_table_erase(&lifetime_allocator->key_check_table, key); + erase_Ptr_table(&lifetime_allocator->key_check_table, key); heap_free(heap, key->members); zdll_push_back(lifetime_allocator->free_keys.first, lifetime_allocator->free_keys.last, key); } @@ -575,11 +506,11 @@ lifetime_sort_object_set__quick(Lifetime_Object **ptr_array, i32 first, i32 one_ internal i32 lifetime_sort_and_dedup_object_set(Lifetime_Object **ptr_array, i32 count){ lifetime_sort_object_set__quick(ptr_array, 0, count); - Lifetime_Object **ptr_write = ptr_array; - Lifetime_Object **ptr_read = ptr_array; + Lifetime_Object **ptr_write = ptr_array + 1; + Lifetime_Object **ptr_read = ptr_array + 1; for (i32 i = 1; i < count; i += 1, ptr_read += 1){ - if (ptr_write[-1] < *ptr_read){ - ptr_write[0] = *ptr_read; + if (ptr_read[-1] < ptr_read[0]){ + *ptr_write = *ptr_read; ptr_write += 1; } } @@ -622,17 +553,19 @@ lifetime_get_or_create_intersection_key(Heap *heap, Lifetime_Allocator *lifetime new_key->members = heap_array(heap, Lifetime_Object*, count); memcpy(new_key->members, object_ptr_array, sizeof(*new_key->members)*count); new_key->count = count; - dynamic_workspace_init(heap, &new_key->dynamic_workspace); + dynamic_workspace_init(heap, lifetime_allocator, + DynamicWorkspace_Intersected, new_key, + &new_key->dynamic_workspace); lifetime__key_table_insert(heap, &lifetime_allocator->key_table, hash, new_key); - ptr_check_table_insert(heap, &lifetime_allocator->key_check_table, new_key); + insert_Ptr_table(heap, &lifetime_allocator->key_check_table, new_key); return(new_key); } internal b32 lifetime_key_check(Lifetime_Allocator *lifetime_allocator, Lifetime_Key *key){ - return(ptr_check_table_check(&lifetime_allocator->key_check_table, key)); + return(lookup_Ptr_table(&lifetime_allocator->key_check_table, key)); } // BOTTOM diff --git a/4ed_dynamic_variables.h b/4ed_dynamic_variables.h index 7759226e..ca733083 100644 --- a/4ed_dynamic_variables.h +++ b/4ed_dynamic_variables.h @@ -48,14 +48,11 @@ struct Dynamic_Memory_Bank{ struct Dynamic_Workspace{ Dynamic_Variable_Block var_block; Dynamic_Memory_Bank mem_bank; -}; - -//////////////////////////////// - -struct Ptr_Check_Table{ - void **keys; - u32 count; - u32 max; + u32_Ptr_Table object_id_to_object_ptr; + u32 object_id_counter; + u32 scope_id; + i32 user_type; + void *user_back_ptr; }; //////////////////////////////// @@ -132,7 +129,9 @@ struct Lifetime_Allocator{ Lifetime_Object_List free_objects; Lifetime_Key_List free_keys; Lifetime_Key_Table key_table; - Ptr_Check_Table key_check_table; + Ptr_Table key_check_table; + u32_Ptr_Table scope_id_to_scope_ptr_table; + u32 scope_id_counter; }; struct Lifetime_Key_With_Opaque_ID{ diff --git a/4ed_hash_functions.cpp b/4ed_hash_functions.cpp new file mode 100644 index 00000000..3a4ff364 --- /dev/null +++ b/4ed_hash_functions.cpp @@ -0,0 +1,94 @@ +/* + * Mr. 4th Dimention - Allen Webster + * + * 26.08.2018 + * + * Generic hash functions + * + */ + +// TOP + +internal u64 +table_hash_u8(u8 *v, i32 size){ + u64 hash = 0; + for (u8 *p = v, *e = v + size; p < e; p += 1){ + u8 k = *p; + k *= 81; + k = ((u8)(k << 4)) | ((u8)(k >> 4)); + hash ^= k; + hash *= 11; + hash += 237; + } + return(hash); +} +internal u64 +table_hash_u16(u16 *v, i32 size){ + u64 hash = 0; + for (u16 *p = v, *e = v + size; p < e; p += 1){ + u16 k = *p; + k *= 11601; + k = ((u16)(k << 8)) | ((u16)(k >> 8)); + hash ^= k; + hash *= 11; + hash += 12525; + } + return(hash); +} +internal u64 +table_hash_u32(u32 *v, i32 size){ + u64 hash = 0; + for (u32 *p = v, *e = v + size; p < e; p += 1){ + u32 k = *p; + k *= 3432918353; + k = ((u32)(k << 16)) | ((u32)(k >> 16)); + hash ^= k; + hash *= 11; + hash += 2041000173; + } + return(hash); +} +internal u64 +table_hash_u64(u64 *v, i32 size){ + u64 hash = 0; + for (u64 *p = v, *e = v + size; p < e; p += 1){ + u64 k = *p; + k *= 14744272059406101841; + k = ((u64)(k << 32)) | ((u64)(k >> 32)); + hash ^= k; + hash *= 11; + hash += 8766028991911375085; + } + return(hash); +} +internal u64 +table_hash(void *v, i32 it_size, i32 size){ + u64 hash = 0; + switch (it_size){ + case 1: + { + hash = table_hash_u8((u8*)v, size); + }break; + case 2: + { + hash = table_hash_u16((u16*)v, size); + }break; + case 4: + { + hash = table_hash_u32((u32*)v, size); + }break; + case 8: + { + hash = table_hash_u64((u64*)v, size); + }break; + default: + { + hash = table_hash_u8((u8*)v, it_size*size); + }break; + } + return(hash); +} + +// BOTTOM + + diff --git a/4ed_mem.cpp b/4ed_mem.cpp new file mode 100644 index 00000000..41025c43 --- /dev/null +++ b/4ed_mem.cpp @@ -0,0 +1,80 @@ +/* +* Mr. 4th Dimention - Allen Webster + * + * 30.08.2016 + * + * Replacements for common memory block managing functions. + */ + +// TOP + +// TODO(allen): Make these as fast as possible + +internal void +block_zero(void *a, umem_4tech size){ + for (u8_4tech *ptr = (u8_4tech*)a, *e = ptr + size; ptr < e; ptr += 1){ + *ptr = 0; + } +} + +internal void +block_fill_ones(void *a, umem_4tech size){ + for (u8_4tech *ptr = (u8_4tech*)a, *e = ptr + size; ptr < e; ptr += 1){ + *ptr = 0xFF; + } +} + +internal void +block_copy(void *dst, void *src, umem_4tech size){ + for (u8_4tech *d = (u8_4tech*)dst, *s = (u8_4tech*)src, *e = s + size; s < e; d += 1, s += 1){ + *d = *s; + } +} + +internal i32_4tech +block_compare(void *a, void *b, umem_4tech size){ + for (u8_4tech *aptr = (u8_4tech*)a, *bptr = (u8_4tech*)b, *e = bptr + size; bptr < e; aptr += 1, bptr += 1){ + i32_4tech dif = (i32_4tech)*aptr - (i32_4tech)*bptr; + if (dif != 0){ + return(dif > 0?1:-1); + } + } + return(0); +} + +internal void +block_fill_u8_4tech(void *a, umem_4tech size, u8_4tech val){ + for (u8_4tech *ptr = (u8_4tech*)a, *e = ptr + size; ptr < e; ptr += 1){ + *ptr = val; + } +} + +internal void +block_fill_u16(void *a, umem_4tech size, u16_4tech val){ + Assert(size%sizeof(u16_4tech) == 0); + umem_4tech count = size/sizeof(u16_4tech); + for (u16_4tech *ptr = (u16_4tech*)a, *e = ptr + count; ptr < e; ptr += 1){ + *ptr = val; + } +} + +internal void +block_fill_u32(void *a, umem_4tech size, u32_4tech val){ + Assert(size%sizeof(u32_4tech) == 0); + umem_4tech count = size/sizeof(u32_4tech); + for (u32_4tech *ptr = (u32_4tech*)a, *e = ptr + count; ptr < e; ptr += 1){ + *ptr = val; + } +} + +internal void +block_fill_u64(void *a, umem_4tech size, u64_4tech val){ + Assert(size%sizeof(u64_4tech) == 0); + umem_4tech count = size/sizeof(u64_4tech); + for (u64_4tech *ptr = (u64_4tech*)a, *e = ptr + count; ptr < e; ptr += 1){ + *ptr = val; + } +} + +// BOTTOM + diff --git a/4ed_mem_ansi.c b/4ed_mem_ansi.c deleted file mode 100644 index f0714944..00000000 --- a/4ed_mem_ansi.c +++ /dev/null @@ -1,93 +0,0 @@ -/* -* Mr. 4th Dimention - Allen Webster - * - * 30.08.2016 - * - * Replacements for common memory block managing functions. - */ - -// TOP - -// TODO(allen): make these as fast as possible -// with per architecture implementations. -void -block_copy(void *a, void *b, int32_t size){ - int32_t size8 = size/8; - uint64_t *a8 = (uint64_t*)a; - uint64_t *b8 = (uint64_t*)b; - uint64_t *a8_end = a8 + size8; - uint8_t *a1 = 0, *b1 = 0; - - for (;a8 < a8_end; ++a8, ++b8){ - *a8 = *b8; - } - - a1 = (uint8_t*)a8; - b1 = (uint8_t*)b8; - - switch (size % 8){ - case 7: *a1++ = *b1++; - case 6: *a1++ = *b1++; - case 5: *a1++ = *b1++; - case 4: *a1++ = *b1++; - case 3: *a1++ = *b1++; - case 2: *a1++ = *b1++; - case 1: *a1 = *b1; - } -} - -int64_t -block_compare(void *a, void *b, int32_t size){ - int64_t r = 0; - int32_t size8 = size/4; - uint32_t *a8 = (uint32_t*)a; - uint32_t *b8 = (uint32_t*)b; - uint32_t *a8_end = a8 + size8; - uint8_t *a1 = 0, *b1 = 0; - - for (;a8 < a8_end; ++a8, ++b8){ - if (*a8 != *b8){ - r = (*a8 - *b8); - goto end; - } - } - - a1 = (uint8_t*)a8; - b1 = (uint8_t*)b8; - - switch (size % 4){ - case 3: if (*a1 != *b1){r = (*a1 - *b1); goto end;} ++a1, ++b1; - case 2: if (*a1 != *b1){r = (*a1 - *b1); goto end;} ++a1, ++b1; - case 1: if (*a1 != *b1){r = (*a1 - *b1); goto end;} - } - - end:; - return(r); -} - -void -block_zero(void *a, int32_t size){ - int32_t size8 = size/8; - uint64_t *a8 = (uint64_t*)a; - uint64_t *a8_end = a8 + size8; - uint8_t *a1 = 0; - - for (;a8 < a8_end; ++a8){ - *a8 = 0; - } - - a1 = (uint8_t*)a8; - - switch (size % 8){ - case 7: *a1++ = 0; - case 6: *a1++ = 0; - case 5: *a1++ = 0; - case 4: *a1++ = 0; - case 3: *a1++ = 0; - case 2: *a1++ = 0; - case 1: *a1 = 0; - } -} - -// BOTTOM - diff --git a/4ed_ptr_check.cpp b/4ed_ptr_check.cpp new file mode 100644 index 00000000..0e5d2721 --- /dev/null +++ b/4ed_ptr_check.cpp @@ -0,0 +1,365 @@ +/* + * Mr. 4th Dimention - Allen Webster + * + * 26.08.2018 + * + * Pointer check table + * + */ + +// TOP + +internal Ptr_Table +make_Ptr_table(void *mem, umem size){ + Ptr_Table table = {0}; + i32 max = (i32)(size/8); + if (max > 0){ + table.mem = mem; + u8 *cursor = (u8*)mem; + table.hashes = (u64*)cursor; + cursor += 8*max; + table.count = 0; + table.max = max; + block_fill_ones(table.hashes, sizeof(*table.hashes)*max); + } + return(table); +} + +internal i32 +max_to_memsize_Ptr_table(i32 max){ + return(max*8); +} + +internal b32 +at_max_Ptr_table(Ptr_Table *table){ + if (table->max > 0 && (table->count + 1)*8 <= table->max*7){ + return(false); + } + return(true); +} + +internal b32 +insert_Ptr_table(Ptr_Table *table, void**key){ + i32 max = table->max; + if (max > 0){ + i32 count = table->count; + if ((count + 1)*8 <= max*7){ + u64 hash = 0; + block_copy(&hash, key, 8); + if (hash >= 18446744073709551614){ hash += 2; } + i32 first_index = hash%max; + i32 index = first_index; + u64 *hashes = table->hashes; + for (;;){ + if (hashes[index] == 18446744073709551615){ + table->dirty_slot_count += 1; + } + if (hashes[index] == 18446744073709551615 || hashes[index] == 18446744073709551614){ + hashes[index] = hash; + table->count += 1; + return(true); + } + if (hashes[index] == hash) return(false); + index = (index + 1)%max; + if (index == first_index) return(false); + } + } + } + return(false); +} + +internal b32 +lookup_Ptr_table(Ptr_Table *table, void**key){ + i32 max = table->max; + if (max > 0){ + u64 hash = 0; + block_copy(&hash, key, 8); + if (hash >= 18446744073709551614){ hash += 2; } + i32 first_index = hash%max; + i32 index = first_index; + u64 *hashes = table->hashes; + for (;;){ + if (hashes[index] == 18446744073709551615) break; + if (hashes[index] == hash){ + return(true); + } + index = (index + 1)%max; + if (index == first_index) break; + } + } + return(false); +} + +internal b32 +erase_Ptr_table(Ptr_Table *table, void**key){ + i32 max = table->max; + if (max > 0 && table->count > 0){ + u64 hash = 0; + block_copy(&hash, key, 8); + if (hash >= 18446744073709551614){ hash += 2; } + i32 first_index = hash%max; + i32 index = first_index; + u64 *hashes = table->hashes; + for (;;){ + if (hashes[index] == 18446744073709551615) break; + if (hashes[index] == hash){ + hashes[index] = 18446744073709551614; + table->count -= 1; + return(true); + } + index = (index + 1)%max; + if (index == first_index) break; + } + } + return(false); +} + +internal b32 +move_Ptr_table(Ptr_Table *dst_table, Ptr_Table *src_table){ + if ((src_table->count + dst_table->count)*8 <= dst_table->max*7){ + i32 max = src_table->max; + u64 *hashes = src_table->hashes; + for (i32 index = 0; index < max; index += 1){ + if (hashes[index] != 18446744073709551615 && hashes[index] != 18446744073709551614){ + void* key_; + void**key = &key_; + block_copy(key, &hashes[index], 8); + insert_Ptr_table(dst_table, key); + } + } + return(true); + } + return(false); +} + +internal b32 +insert_Ptr_table(Ptr_Table *table, void* key){ + return(insert_Ptr_table(table, &key)); +} + +internal b32 +lookup_Ptr_table(Ptr_Table *table, void* key){ + return(lookup_Ptr_table(table, &key)); +} + +internal b32 +erase_Ptr_table(Ptr_Table *table, void* key){ + return(erase_Ptr_table(table, &key)); +} + +//////////////////////////////// + +internal void +insert_Ptr_table(Heap *heap, Ptr_Table *table, void* key){ + if (at_max_Ptr_table(table)){ + i32 new_max = (table->max + 1)*2; + i32 new_mem_size = max_to_memsize_Ptr_table(new_max); + void *new_mem = heap_allocate(heap, new_mem_size); + Ptr_Table new_table = make_Ptr_table(new_mem, new_mem_size); + if (table->mem != 0){ + b32 result = move_Ptr_table(&new_table, table); + Assert(result); + AllowLocal(result); + heap_free(heap, table->mem); + } + *table = new_table; + } + b32 result = insert_Ptr_table(table, &key); + Assert(result); + AllowLocal(result); +} + +//////////////////////////////// + +internal u32_Ptr_Table +make_u32_Ptr_table(void *mem, umem size){ + u32_Ptr_Table table = {0}; + i32 max = (i32)(size/16); + if (max > 0){ + table.mem = mem; + u8 *cursor = (u8*)mem; + table.hashes = (u64*)cursor; + cursor += 8*max; + table.vals = (void**)cursor; + table.count = 0; + table.max = max; + block_fill_ones(table.hashes, sizeof(*table.hashes)*max); + } + return(table); +} + +internal i32 +max_to_memsize_u32_Ptr_table(i32 max){ + return(max*16); +} + +internal b32 +at_max_u32_Ptr_table(u32_Ptr_Table *table){ + if (table->max > 0 && (table->count + 1)*8 <= table->max*7){ + return(false); + } + return(true); +} + +internal b32 +insert_u32_Ptr_table(u32_Ptr_Table *table, u32*key, void**val){ + i32 max = table->max; + if (max > 0){ + i32 count = table->count; + if ((count + 1)*8 <= max*7){ + u64 hash = 0; + block_copy(&hash, key, 4); + if (hash >= 18446744073709551614){ hash += 2; } + i32 first_index = hash%max; + i32 index = first_index; + u64 *hashes = table->hashes; + for (;;){ + if (hashes[index] == 18446744073709551615){ + table->dirty_slot_count += 1; + } + if (hashes[index] == 18446744073709551615 || hashes[index] == 18446744073709551614){ + hashes[index] = hash; + table->vals[index] = *val; + table->count += 1; + return(true); + } + if (hashes[index] == hash) return(false); + index = (index + 1)%max; + if (index == first_index) return(false); + } + } + } + return(false); +} + +internal u32_Ptr_Lookup_Result +lookup_u32_Ptr_table(u32_Ptr_Table *table, u32*key){ + u32_Ptr_Lookup_Result result = {0}; + i32 max = table->max; + if (max > 0){ + u64 hash = 0; + block_copy(&hash, key, 4); + if (hash >= 18446744073709551614){ hash += 2; } + i32 first_index = hash%max; + i32 index = first_index; + u64 *hashes = table->hashes; + for (;;){ + if (hashes[index] == 18446744073709551615) break; + if (hashes[index] == hash){ + result.success = true; + result.val = &table->vals[index]; + return(result); + } + index = (index + 1)%max; + if (index == first_index) break; + } + } + return(result); +} + +internal b32 +erase_u32_Ptr_table(u32_Ptr_Table *table, u32*key){ + i32 max = table->max; + if (max > 0 && table->count > 0){ + u64 hash = 0; + block_copy(&hash, key, 4); + if (hash >= 18446744073709551614){ hash += 2; } + i32 first_index = hash%max; + i32 index = first_index; + u64 *hashes = table->hashes; + for (;;){ + if (hashes[index] == 18446744073709551615) break; + if (hashes[index] == hash){ + hashes[index] = 18446744073709551614; + table->count -= 1; + return(true); + } + index = (index + 1)%max; + if (index == first_index) break; + } + } + return(false); +} + +internal b32 +move_u32_Ptr_table(u32_Ptr_Table *dst_table, u32_Ptr_Table *src_table){ + if ((src_table->count + dst_table->count)*8 <= dst_table->max*7){ + i32 max = src_table->max; + u64 *hashes = src_table->hashes; + for (i32 index = 0; index < max; index += 1){ + if (hashes[index] != 18446744073709551615 && hashes[index] != 18446744073709551614){ + u32 key_; + u32*key = &key_; + block_copy(key, &hashes[index], 4); + void**val = &src_table->vals[index]; + insert_u32_Ptr_table(dst_table, key, val); + } + } + return(true); + } + return(false); +} + +internal b32 +lookup_u32_Ptr_table(u32_Ptr_Table *table, u32 *key, void* *val_out){ + u32_Ptr_Lookup_Result result = lookup_u32_Ptr_table(table, key); + if (result.success){ + *val_out = *result.val; + } + return(result.success); +} + +internal b32 +insert_u32_Ptr_table(u32_Ptr_Table *table, u32*key, void* val){ + return(insert_u32_Ptr_table(table, key, &val)); +} + +internal b32 +insert_u32_Ptr_table(u32_Ptr_Table *table, u32 key, void**val){ + return(insert_u32_Ptr_table(table, &key, val)); +} + +internal b32 +insert_u32_Ptr_table(u32_Ptr_Table *table, u32 key, void* val){ + return(insert_u32_Ptr_table(table, &key, &val)); +} + +internal u32_Ptr_Lookup_Result +lookup_u32_Ptr_table(u32_Ptr_Table *table, u32 key){ + return(lookup_u32_Ptr_table(table, &key)); +} + +internal b32 +lookup_u32_Ptr_table(u32_Ptr_Table *table, u32 key, void* *val_out){ + return(lookup_u32_Ptr_table(table, &key, val_out)); +} + +internal b32 +erase_u32_Ptr_table(u32_Ptr_Table *table, u32 key){ + return(erase_u32_Ptr_table(table, &key)); +} + +//////////////////////////////// + +internal void +insert_u32_Ptr_table(Heap *heap, u32_Ptr_Table *table, u32 key, void* val){ + if (at_max_u32_Ptr_table(table)){ + i32 new_max = (table->max + 1)*2; + i32 new_mem_size = max_to_memsize_u32_Ptr_table(new_max); + void *new_mem = heap_allocate(heap, new_mem_size); + u32_Ptr_Table new_table = make_u32_Ptr_table(new_mem, new_mem_size); + if (table->mem != 0){ + b32 result = move_u32_Ptr_table(&new_table, table); + Assert(result); + AllowLocal(result); + heap_free(heap, table->mem); + } + *table = new_table; + } + b32 result = insert_u32_Ptr_table(table, &key, &val); + Assert(result); + AllowLocal(result); +} + +// BOTTOM + diff --git a/4ed_ptr_check.h b/4ed_ptr_check.h new file mode 100644 index 00000000..28e3d6a4 --- /dev/null +++ b/4ed_ptr_check.h @@ -0,0 +1,39 @@ +/* + * Mr. 4th Dimention - Allen Webster + * + * 26.08.2018 + * + * Pointer check table + * + */ + +// TOP + +#if !defined(FRED_POINTER_CHECK_H) +#define FRED_POINTER_CHECK_H + +struct Ptr_Table{ + void *mem; + u64 *hashes; + i32 count; + i32 dirty_slot_count; + i32 max; +}; + +struct u32_Ptr_Lookup_Result{ + b32 success; + void**val; +}; +struct u32_Ptr_Table{ + void *mem; + u64 *hashes; + void**vals; + i32 count; + i32 dirty_slot_count; + i32 max; +}; + +#endif + +// BOTTOM + diff --git a/4ed_view.cpp b/4ed_view.cpp index 2c67f864..1c66cb9b 100644 --- a/4ed_view.cpp +++ b/4ed_view.cpp @@ -39,7 +39,9 @@ live_set_alloc_view(Heap *heap, Lifetime_Allocator *lifetime_allocator, Live_Vie init_query_set(&result.view->transient.query_set); - dynamic_workspace_init(heap, &result.view->transient.dynamic_workspace); + dynamic_workspace_init(heap, lifetime_allocator, + DynamicWorkspace_View, result.view, + &result.view->transient.dynamic_workspace); result.view->transient.lifetime_object = lifetime_alloc_object(heap, lifetime_allocator, LifetimeObject_View, result.view); return(result); @@ -60,7 +62,7 @@ live_set_free_view(Heap *heap, Lifetime_Allocator *lifetime_allocator, Live_View view->transient.next->transient.prev = view; view->transient.in_use = false; - dynamic_workspace_free(heap, &view->transient.dynamic_workspace); + dynamic_workspace_free(heap, lifetime_allocator, &view->transient.dynamic_workspace); lifetime_free_object(heap, lifetime_allocator, view->transient.lifetime_object); } diff --git a/4ed_working_set.cpp b/4ed_working_set.cpp index 200f45a0..09b8e4ba 100644 --- a/4ed_working_set.cpp +++ b/4ed_working_set.cpp @@ -88,7 +88,9 @@ working_set_alloc_always(Working_Set *working_set, Heap *heap, Lifetime_Allocato result->settings.minimum_base_display_width = working_set->default_minimum_base_display_width; result->settings.wrap_indicator = WrapIndicator_Show_At_Wrap_Edge; init_file_markers_state(&result->markers); - dynamic_workspace_init(heap, &result->dynamic_workspace); + dynamic_workspace_init(heap, lifetime_allocator, + DynamicWorkspace_Buffer, result, + &result->dynamic_workspace); result->lifetime_object = lifetime_alloc_object(heap, lifetime_allocator, LifetimeObject_File, result); ++working_set->file_count; } @@ -102,7 +104,7 @@ working_set_free_file(Heap *heap, Lifetime_Allocator *lifetime_allocator, Workin working_set->sync_check_iter = working_set->sync_check_iter->next; } - dynamic_workspace_free(heap, &file->dynamic_workspace); + dynamic_workspace_free(heap, lifetime_allocator, &file->dynamic_workspace); lifetime_free_object(heap, lifetime_allocator, file->lifetime_object); file->is_dummy = true; diff --git a/meta/4ed_fsm_table_generator.cpp b/meta/4ed_fsm_table_generator.cpp index ec832b7e..528b9a63 100644 --- a/meta/4ed_fsm_table_generator.cpp +++ b/meta/4ed_fsm_table_generator.cpp @@ -41,6 +41,10 @@ typedef int32_t b32_4tech; #if !defined(API_EXPORT) # define API_EXPORT #endif + +#if !defined(internal) +# define internal static +#endif // standard preamble end #include @@ -54,7 +58,7 @@ typedef int32_t bool32; #define LEXER_TABLE_FILE "4coder_lib/4cpp_lexer_tables.c" #include "../4coder_lib/4cpp_lexer_types.h" -#include "../4ed_mem_ansi.c" +#include "../4ed_mem.cpp" struct Whitespace_FSM{ unsigned char pp_state; diff --git a/project.4coder b/project.4coder index 2a99f7f2..d3717483 100644 --- a/project.4coder +++ b/project.4coder @@ -13,7 +13,10 @@ patterns = { blacklist_patterns = { ".*", }; -load_paths_only = { {"."}, }; +load_paths_only = { + {"."}, + { "../../one_time_code", .relative = true, .recursive = true, }, +}; load_paths = { { load_paths_only, .os = "win" }, { load_paths_only, .os = "linux"}, @@ -65,6 +68,12 @@ command_list = { .cmd = { {"..\\build\\generate_config_parser", .os = "win" }, {"../build/generate_config_parser" , .os = "linux"}, {"../build/generate_config_parser" , .os = "mac" }, }, }, + { .name = "build one time", + .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, + .cmd = { { "pushd ..\\..\\one_time_code & build.bat" , .os = "win" }, }, }, + { .name = "run one time", + .out = "*run*", .footer_panel = false, .save_dirty_files = false, + .cmd = { { "pushd ..\\..\\one_time_code\\build & one_time", .os = "win" }, }, }, }; fkey_command[1] = "build x64"; @@ -74,4 +83,6 @@ fkey_command[4] = "build x86"; fkey_command[5] = "build metadata"; fkey_command[6] = "build config parser generator"; fkey_command[7] = "generate config parser"; +fkey_command[9] = "build one time"; +fkey_command[10] = "run one time"; fkey_command[12] = "package";