Eliminated global fm arena
parent
9e81a83ec9
commit
ceda879326
|
@ -2,7 +2,7 @@
|
|||
#define command_id(c) (fcoder_metacmd_ID_##c)
|
||||
#define command_metadata(c) (&fcoder_metacmd_table[command_id(c)])
|
||||
#define command_metadata_by_id(id) (&fcoder_metacmd_table[id])
|
||||
#define command_one_past_last_id 216
|
||||
#define command_one_past_last_id 228
|
||||
#if defined(CUSTOM_COMMAND_SIG)
|
||||
#define PROC_LINKS(x,y) x
|
||||
#else
|
||||
|
@ -77,6 +77,7 @@ CUSTOM_COMMAND_SIG(interactive_open);
|
|||
CUSTOM_COMMAND_SIG(interactive_open_or_new);
|
||||
CUSTOM_COMMAND_SIG(interactive_switch_buffer);
|
||||
CUSTOM_COMMAND_SIG(kill_buffer);
|
||||
CUSTOM_COMMAND_SIG(kill_rect);
|
||||
CUSTOM_COMMAND_SIG(left_adjust_view);
|
||||
CUSTOM_COMMAND_SIG(list_all_functions_all_buffers);
|
||||
CUSTOM_COMMAND_SIG(list_all_functions_all_buffers_lister);
|
||||
|
@ -111,6 +112,12 @@ CUSTOM_COMMAND_SIG(lister__write_character__file_path);
|
|||
CUSTOM_COMMAND_SIG(lister__write_character__fixed_list);
|
||||
CUSTOM_COMMAND_SIG(load_project);
|
||||
CUSTOM_COMMAND_SIG(make_directory_query);
|
||||
CUSTOM_COMMAND_SIG(miblo_decrement_basic);
|
||||
CUSTOM_COMMAND_SIG(miblo_decrement_time_stamp);
|
||||
CUSTOM_COMMAND_SIG(miblo_decrement_time_stamp_minute);
|
||||
CUSTOM_COMMAND_SIG(miblo_increment_basic);
|
||||
CUSTOM_COMMAND_SIG(miblo_increment_time_stamp);
|
||||
CUSTOM_COMMAND_SIG(miblo_increment_time_stamp_minute);
|
||||
CUSTOM_COMMAND_SIG(mouse_wheel_scroll);
|
||||
CUSTOM_COMMAND_SIG(move_down);
|
||||
CUSTOM_COMMAND_SIG(move_down_10);
|
||||
|
@ -121,6 +128,7 @@ CUSTOM_COMMAND_SIG(move_line_up);
|
|||
CUSTOM_COMMAND_SIG(move_right);
|
||||
CUSTOM_COMMAND_SIG(move_up);
|
||||
CUSTOM_COMMAND_SIG(move_up_10);
|
||||
CUSTOM_COMMAND_SIG(multi_line_edit);
|
||||
CUSTOM_COMMAND_SIG(newline_or_goto_position_direct);
|
||||
CUSTOM_COMMAND_SIG(newline_or_goto_position_same_panel_direct);
|
||||
CUSTOM_COMMAND_SIG(newline_or_goto_position_same_panel_sticky);
|
||||
|
@ -153,7 +161,9 @@ CUSTOM_COMMAND_SIG(redo);
|
|||
CUSTOM_COMMAND_SIG(reload_themes);
|
||||
CUSTOM_COMMAND_SIG(remap_interactive);
|
||||
CUSTOM_COMMAND_SIG(rename_file_query);
|
||||
CUSTOM_COMMAND_SIG(rename_parameter);
|
||||
CUSTOM_COMMAND_SIG(reopen);
|
||||
CUSTOM_COMMAND_SIG(replace_all_occurrences);
|
||||
CUSTOM_COMMAND_SIG(replace_in_range);
|
||||
CUSTOM_COMMAND_SIG(reverse_search);
|
||||
CUSTOM_COMMAND_SIG(reverse_search_identifier);
|
||||
|
@ -220,6 +230,8 @@ CUSTOM_COMMAND_SIG(word_complete);
|
|||
CUSTOM_COMMAND_SIG(write_and_auto_tab);
|
||||
CUSTOM_COMMAND_SIG(write_block);
|
||||
CUSTOM_COMMAND_SIG(write_character);
|
||||
CUSTOM_COMMAND_SIG(write_explicit_enum_flags);
|
||||
CUSTOM_COMMAND_SIG(write_explicit_enum_values);
|
||||
CUSTOM_COMMAND_SIG(write_hack);
|
||||
CUSTOM_COMMAND_SIG(write_note);
|
||||
CUSTOM_COMMAND_SIG(write_todo);
|
||||
|
@ -236,7 +248,7 @@ char *source_name;
|
|||
int32_t source_name_len;
|
||||
int32_t line_number;
|
||||
};
|
||||
static Command_Metadata fcoder_metacmd_table[216] = {
|
||||
static Command_Metadata fcoder_metacmd_table[228] = {
|
||||
{ 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", 40, 240 },
|
||||
{ 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", 34, 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", 34, 733 },
|
||||
|
@ -305,6 +317,7 @@ static Command_Metadata fcoder_metacmd_table[216] = {
|
|||
{ 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", 28, 822 },
|
||||
{ PROC_LINKS(interactive_switch_buffer, 0), "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "w:\\4ed\\code\\4coder_lists.cpp", 28, 732 },
|
||||
{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1538 },
|
||||
{ PROC_LINKS(kill_rect, 0), "kill_rect", 9, "Delete characters in a rectangular region. Range testing is done by unwrapped-xy coordinates.", 93, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 26 },
|
||||
{ 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", 36, 133 },
|
||||
{ PROC_LINKS(list_all_functions_all_buffers, 0), "list_all_functions_all_buffers", 30, "Creates a jump list of lines from all buffers that appear to define or declare functions.", 89, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 355 },
|
||||
{ PROC_LINKS(list_all_functions_all_buffers_lister, 0), "list_all_functions_all_buffers_lister", 37, "Creates a lister of locations that look like function definitions and declarations all buffers.", 95, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 361 },
|
||||
|
@ -339,6 +352,12 @@ static Command_Metadata fcoder_metacmd_table[216] = {
|
|||
{ 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", 28, 253 },
|
||||
{ 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", 39, 1083 },
|
||||
{ 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", 36, 1226 },
|
||||
{ PROC_LINKS(miblo_decrement_basic, 0), "miblo_decrement_basic", 21, "Decrement an integer under the cursor by one.", 45, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 110 },
|
||||
{ PROC_LINKS(miblo_decrement_time_stamp, 0), "miblo_decrement_time_stamp", 26, "Decrement a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 383 },
|
||||
{ PROC_LINKS(miblo_decrement_time_stamp_minute, 0), "miblo_decrement_time_stamp_minute", 33, "Decrement a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 395 },
|
||||
{ PROC_LINKS(miblo_increment_basic, 0), "miblo_increment_basic", 21, "Increment an integer under the cursor by one.", 45, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 94 },
|
||||
{ PROC_LINKS(miblo_increment_time_stamp, 0), "miblo_increment_time_stamp", 26, "Increment a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 377 },
|
||||
{ PROC_LINKS(miblo_increment_time_stamp_minute, 0), "miblo_increment_time_stamp_minute", 33, "Increment a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 389 },
|
||||
{ PROC_LINKS(mouse_wheel_scroll, 0), "mouse_wheel_scroll", 18, "Reads the scroll wheel value from the mouse state and scrolls accordingly.", 74, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 226 },
|
||||
{ PROC_LINKS(move_down, 0), "move_down", 9, "Moves the cursor down one line.", 31, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 290 },
|
||||
{ PROC_LINKS(move_down_10, 0), "move_down_10", 12, "Moves the cursor down ten lines.", 32, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 302 },
|
||||
|
@ -349,6 +368,7 @@ static Command_Metadata fcoder_metacmd_table[216] = {
|
|||
{ PROC_LINKS(move_right, 0), "move_right", 10, "Moves the cursor one character to the right.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 349 },
|
||||
{ PROC_LINKS(move_up, 0), "move_up", 7, "Moves the cursor up one line.", 29, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 284 },
|
||||
{ PROC_LINKS(move_up_10, 0), "move_up_10", 10, "Moves the cursor up ten lines.", 30, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 296 },
|
||||
{ PROC_LINKS(multi_line_edit, 0), "multi_line_edit", 15, "Begin multi-line mode. In multi-line mode characters are inserted at every line between the mark and cursor. All characters are inserted at the same character offset into the line. This mode uses line_char coordinates.", 221, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 117 },
|
||||
{ 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", 34, 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", 34, 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", 34, 588 },
|
||||
|
@ -381,7 +401,9 @@ static Command_Metadata fcoder_metacmd_table[216] = {
|
|||
{ 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", 36, 1577 },
|
||||
{ PROC_LINKS(remap_interactive, 0), "remap_interactive", 17, "Switch to a named key binding map.", 34, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 290 },
|
||||
{ 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", 36, 1184 },
|
||||
{ PROC_LINKS(rename_parameter, 0), "rename_parameter", 16, "If the cursor is found to be on the name of a function parameter in the signature of a function definition, all occurences within the scope of the function will be replaced with a new provided string.", 200, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 383 },
|
||||
{ PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1553 },
|
||||
{ PROC_LINKS(replace_all_occurrences, 0), "replace_all_occurrences", 23, "Queries the user for two strings, and replaces all occurrences of the first string with the second string in all open buffers.", 126, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 778 },
|
||||
{ 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", 36, 883 },
|
||||
{ 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", 36, 854 },
|
||||
{ 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", 36, 872 },
|
||||
|
@ -448,6 +470,8 @@ static Command_Metadata fcoder_metacmd_table[216] = {
|
|||
{ 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", 34, 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", 46, 105 },
|
||||
{ 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", 36, 35 },
|
||||
{ PROC_LINKS(write_explicit_enum_flags, 0), "write_explicit_enum_flags", 25, "If the cursor is found to be on the '{' of an enum definition, the values of the enum will be filled in to give each a unique power of 2 value, starting from 1. Existing values are overwritten.", 194, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 705 },
|
||||
{ PROC_LINKS(write_explicit_enum_values, 0), "write_explicit_enum_values", 26, "If the cursor is found to be on the '{' of an enum definition, the values of the enum will be filled in sequentially starting from zero. Existing values are overwritten.", 170, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 699 },
|
||||
{ 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", 46, 93 },
|
||||
{ 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", 46, 99 },
|
||||
{ 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", 46, 87 },
|
||||
|
@ -522,152 +546,164 @@ static int32_t fcoder_metacmd_ID_interactive_open = 64;
|
|||
static int32_t fcoder_metacmd_ID_interactive_open_or_new = 65;
|
||||
static int32_t fcoder_metacmd_ID_interactive_switch_buffer = 66;
|
||||
static int32_t fcoder_metacmd_ID_kill_buffer = 67;
|
||||
static int32_t fcoder_metacmd_ID_left_adjust_view = 68;
|
||||
static int32_t fcoder_metacmd_ID_list_all_functions_all_buffers = 69;
|
||||
static int32_t fcoder_metacmd_ID_list_all_functions_all_buffers_lister = 70;
|
||||
static int32_t fcoder_metacmd_ID_list_all_functions_current_buffer = 71;
|
||||
static int32_t fcoder_metacmd_ID_list_all_functions_current_buffer_lister = 72;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations = 73;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_case_insensitive = 74;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier = 75;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier_case_insensitive = 76;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_selection = 77;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_selection_case_insensitive = 78;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_type_definition = 79;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_type_definition_of_identifier = 80;
|
||||
static int32_t fcoder_metacmd_ID_list_all_substring_locations = 81;
|
||||
static int32_t fcoder_metacmd_ID_list_all_substring_locations_case_insensitive = 82;
|
||||
static int32_t fcoder_metacmd_ID_lister__activate = 83;
|
||||
static int32_t fcoder_metacmd_ID_lister__backspace_text_field = 84;
|
||||
static int32_t fcoder_metacmd_ID_lister__backspace_text_field__default = 85;
|
||||
static int32_t fcoder_metacmd_ID_lister__backspace_text_field__file_path = 86;
|
||||
static int32_t fcoder_metacmd_ID_lister__mouse_press = 87;
|
||||
static int32_t fcoder_metacmd_ID_lister__mouse_release = 88;
|
||||
static int32_t fcoder_metacmd_ID_lister__move_down = 89;
|
||||
static int32_t fcoder_metacmd_ID_lister__move_down__default = 90;
|
||||
static int32_t fcoder_metacmd_ID_lister__move_up = 91;
|
||||
static int32_t fcoder_metacmd_ID_lister__move_up__default = 92;
|
||||
static int32_t fcoder_metacmd_ID_lister__quit = 93;
|
||||
static int32_t fcoder_metacmd_ID_lister__repaint = 94;
|
||||
static int32_t fcoder_metacmd_ID_lister__wheel_scroll = 95;
|
||||
static int32_t fcoder_metacmd_ID_lister__write_character = 96;
|
||||
static int32_t fcoder_metacmd_ID_lister__write_character__default = 97;
|
||||
static int32_t fcoder_metacmd_ID_lister__write_character__file_path = 98;
|
||||
static int32_t fcoder_metacmd_ID_lister__write_character__fixed_list = 99;
|
||||
static int32_t fcoder_metacmd_ID_load_project = 100;
|
||||
static int32_t fcoder_metacmd_ID_make_directory_query = 101;
|
||||
static int32_t fcoder_metacmd_ID_mouse_wheel_scroll = 102;
|
||||
static int32_t fcoder_metacmd_ID_move_down = 103;
|
||||
static int32_t fcoder_metacmd_ID_move_down_10 = 104;
|
||||
static int32_t fcoder_metacmd_ID_move_down_textual = 105;
|
||||
static int32_t fcoder_metacmd_ID_move_left = 106;
|
||||
static int32_t fcoder_metacmd_ID_move_line_down = 107;
|
||||
static int32_t fcoder_metacmd_ID_move_line_up = 108;
|
||||
static int32_t fcoder_metacmd_ID_move_right = 109;
|
||||
static int32_t fcoder_metacmd_ID_move_up = 110;
|
||||
static int32_t fcoder_metacmd_ID_move_up_10 = 111;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_direct = 112;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_direct = 113;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_sticky = 114;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_sticky = 115;
|
||||
static int32_t fcoder_metacmd_ID_open_all_code = 116;
|
||||
static int32_t fcoder_metacmd_ID_open_all_code_recursive = 117;
|
||||
static int32_t fcoder_metacmd_ID_open_color_tweaker = 118;
|
||||
static int32_t fcoder_metacmd_ID_open_file_in_quotes = 119;
|
||||
static int32_t fcoder_metacmd_ID_open_in_other = 120;
|
||||
static int32_t fcoder_metacmd_ID_open_long_braces = 121;
|
||||
static int32_t fcoder_metacmd_ID_open_long_braces_break = 122;
|
||||
static int32_t fcoder_metacmd_ID_open_long_braces_semicolon = 123;
|
||||
static int32_t fcoder_metacmd_ID_open_matching_file_cpp = 124;
|
||||
static int32_t fcoder_metacmd_ID_open_panel_hsplit = 125;
|
||||
static int32_t fcoder_metacmd_ID_open_panel_vsplit = 126;
|
||||
static int32_t fcoder_metacmd_ID_page_down = 127;
|
||||
static int32_t fcoder_metacmd_ID_page_up = 128;
|
||||
static int32_t fcoder_metacmd_ID_paste = 129;
|
||||
static int32_t fcoder_metacmd_ID_paste_and_indent = 130;
|
||||
static int32_t fcoder_metacmd_ID_paste_next = 131;
|
||||
static int32_t fcoder_metacmd_ID_paste_next_and_indent = 132;
|
||||
static int32_t fcoder_metacmd_ID_place_in_scope = 133;
|
||||
static int32_t fcoder_metacmd_ID_project_command_lister = 134;
|
||||
static int32_t fcoder_metacmd_ID_project_fkey_command = 135;
|
||||
static int32_t fcoder_metacmd_ID_project_go_to_root_directory = 136;
|
||||
static int32_t fcoder_metacmd_ID_query_replace = 137;
|
||||
static int32_t fcoder_metacmd_ID_query_replace_identifier = 138;
|
||||
static int32_t fcoder_metacmd_ID_query_replace_selection = 139;
|
||||
static int32_t fcoder_metacmd_ID_redo = 140;
|
||||
static int32_t fcoder_metacmd_ID_reload_themes = 141;
|
||||
static int32_t fcoder_metacmd_ID_remap_interactive = 142;
|
||||
static int32_t fcoder_metacmd_ID_rename_file_query = 143;
|
||||
static int32_t fcoder_metacmd_ID_reopen = 144;
|
||||
static int32_t fcoder_metacmd_ID_replace_in_range = 145;
|
||||
static int32_t fcoder_metacmd_ID_reverse_search = 146;
|
||||
static int32_t fcoder_metacmd_ID_reverse_search_identifier = 147;
|
||||
static int32_t fcoder_metacmd_ID_save = 148;
|
||||
static int32_t fcoder_metacmd_ID_save_all_dirty_buffers = 149;
|
||||
static int32_t fcoder_metacmd_ID_save_to_query = 150;
|
||||
static int32_t fcoder_metacmd_ID_scope_absorb_down = 151;
|
||||
static int32_t fcoder_metacmd_ID_search = 152;
|
||||
static int32_t fcoder_metacmd_ID_search_identifier = 153;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_left = 154;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_left = 155;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_right = 156;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_right = 157;
|
||||
static int32_t fcoder_metacmd_ID_seek_beginning_of_line = 158;
|
||||
static int32_t fcoder_metacmd_ID_seek_beginning_of_textual_line = 159;
|
||||
static int32_t fcoder_metacmd_ID_seek_end_of_line = 160;
|
||||
static int32_t fcoder_metacmd_ID_seek_end_of_textual_line = 161;
|
||||
static int32_t fcoder_metacmd_ID_seek_token_left = 162;
|
||||
static int32_t fcoder_metacmd_ID_seek_token_right = 163;
|
||||
static int32_t fcoder_metacmd_ID_seek_white_or_token_left = 164;
|
||||
static int32_t fcoder_metacmd_ID_seek_white_or_token_right = 165;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_down = 166;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_down_end_line = 167;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_left = 168;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_right = 169;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_up = 170;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_up_end_line = 171;
|
||||
static int32_t fcoder_metacmd_ID_select_all = 172;
|
||||
static int32_t fcoder_metacmd_ID_select_next_scope_absolute = 173;
|
||||
static int32_t fcoder_metacmd_ID_select_prev_scope_absolute = 174;
|
||||
static int32_t fcoder_metacmd_ID_select_surrounding_scope = 175;
|
||||
static int32_t fcoder_metacmd_ID_set_bindings_choose = 176;
|
||||
static int32_t fcoder_metacmd_ID_set_bindings_default = 177;
|
||||
static int32_t fcoder_metacmd_ID_set_bindings_mac_default = 178;
|
||||
static int32_t fcoder_metacmd_ID_set_mark = 179;
|
||||
static int32_t fcoder_metacmd_ID_set_mode_to_notepad_like = 180;
|
||||
static int32_t fcoder_metacmd_ID_set_mode_to_original = 181;
|
||||
static int32_t fcoder_metacmd_ID_setup_build_bat = 182;
|
||||
static int32_t fcoder_metacmd_ID_setup_build_bat_and_sh = 183;
|
||||
static int32_t fcoder_metacmd_ID_setup_build_sh = 184;
|
||||
static int32_t fcoder_metacmd_ID_setup_new_project = 185;
|
||||
static int32_t fcoder_metacmd_ID_show_filebar = 186;
|
||||
static int32_t fcoder_metacmd_ID_show_scrollbar = 187;
|
||||
static int32_t fcoder_metacmd_ID_snipe_token_or_word = 188;
|
||||
static int32_t fcoder_metacmd_ID_snipe_token_or_word_right = 189;
|
||||
static int32_t fcoder_metacmd_ID_snippet_lister = 190;
|
||||
static int32_t fcoder_metacmd_ID_suppress_mouse = 191;
|
||||
static int32_t fcoder_metacmd_ID_swap_buffers_between_panels = 192;
|
||||
static int32_t fcoder_metacmd_ID_to_lowercase = 193;
|
||||
static int32_t fcoder_metacmd_ID_to_uppercase = 194;
|
||||
static int32_t fcoder_metacmd_ID_toggle_filebar = 195;
|
||||
static int32_t fcoder_metacmd_ID_toggle_fullscreen = 196;
|
||||
static int32_t fcoder_metacmd_ID_toggle_highlight_enclosing_scopes = 197;
|
||||
static int32_t fcoder_metacmd_ID_toggle_highlight_line_at_cursor = 198;
|
||||
static int32_t fcoder_metacmd_ID_toggle_line_wrap = 199;
|
||||
static int32_t fcoder_metacmd_ID_toggle_mouse = 200;
|
||||
static int32_t fcoder_metacmd_ID_toggle_paren_matching_helper = 201;
|
||||
static int32_t fcoder_metacmd_ID_toggle_show_whitespace = 202;
|
||||
static int32_t fcoder_metacmd_ID_toggle_virtual_whitespace = 203;
|
||||
static int32_t fcoder_metacmd_ID_undo = 204;
|
||||
static int32_t fcoder_metacmd_ID_view_buffer_other_panel = 205;
|
||||
static int32_t fcoder_metacmd_ID_view_jump_list_with_lister = 206;
|
||||
static int32_t fcoder_metacmd_ID_word_complete = 207;
|
||||
static int32_t fcoder_metacmd_ID_write_and_auto_tab = 208;
|
||||
static int32_t fcoder_metacmd_ID_write_block = 209;
|
||||
static int32_t fcoder_metacmd_ID_write_character = 210;
|
||||
static int32_t fcoder_metacmd_ID_write_hack = 211;
|
||||
static int32_t fcoder_metacmd_ID_write_note = 212;
|
||||
static int32_t fcoder_metacmd_ID_write_todo = 213;
|
||||
static int32_t fcoder_metacmd_ID_write_underscore = 214;
|
||||
static int32_t fcoder_metacmd_ID_write_zero_struct = 215;
|
||||
static int32_t fcoder_metacmd_ID_kill_rect = 68;
|
||||
static int32_t fcoder_metacmd_ID_left_adjust_view = 69;
|
||||
static int32_t fcoder_metacmd_ID_list_all_functions_all_buffers = 70;
|
||||
static int32_t fcoder_metacmd_ID_list_all_functions_all_buffers_lister = 71;
|
||||
static int32_t fcoder_metacmd_ID_list_all_functions_current_buffer = 72;
|
||||
static int32_t fcoder_metacmd_ID_list_all_functions_current_buffer_lister = 73;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations = 74;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_case_insensitive = 75;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier = 76;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier_case_insensitive = 77;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_selection = 78;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_selection_case_insensitive = 79;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_type_definition = 80;
|
||||
static int32_t fcoder_metacmd_ID_list_all_locations_of_type_definition_of_identifier = 81;
|
||||
static int32_t fcoder_metacmd_ID_list_all_substring_locations = 82;
|
||||
static int32_t fcoder_metacmd_ID_list_all_substring_locations_case_insensitive = 83;
|
||||
static int32_t fcoder_metacmd_ID_lister__activate = 84;
|
||||
static int32_t fcoder_metacmd_ID_lister__backspace_text_field = 85;
|
||||
static int32_t fcoder_metacmd_ID_lister__backspace_text_field__default = 86;
|
||||
static int32_t fcoder_metacmd_ID_lister__backspace_text_field__file_path = 87;
|
||||
static int32_t fcoder_metacmd_ID_lister__mouse_press = 88;
|
||||
static int32_t fcoder_metacmd_ID_lister__mouse_release = 89;
|
||||
static int32_t fcoder_metacmd_ID_lister__move_down = 90;
|
||||
static int32_t fcoder_metacmd_ID_lister__move_down__default = 91;
|
||||
static int32_t fcoder_metacmd_ID_lister__move_up = 92;
|
||||
static int32_t fcoder_metacmd_ID_lister__move_up__default = 93;
|
||||
static int32_t fcoder_metacmd_ID_lister__quit = 94;
|
||||
static int32_t fcoder_metacmd_ID_lister__repaint = 95;
|
||||
static int32_t fcoder_metacmd_ID_lister__wheel_scroll = 96;
|
||||
static int32_t fcoder_metacmd_ID_lister__write_character = 97;
|
||||
static int32_t fcoder_metacmd_ID_lister__write_character__default = 98;
|
||||
static int32_t fcoder_metacmd_ID_lister__write_character__file_path = 99;
|
||||
static int32_t fcoder_metacmd_ID_lister__write_character__fixed_list = 100;
|
||||
static int32_t fcoder_metacmd_ID_load_project = 101;
|
||||
static int32_t fcoder_metacmd_ID_make_directory_query = 102;
|
||||
static int32_t fcoder_metacmd_ID_miblo_decrement_basic = 103;
|
||||
static int32_t fcoder_metacmd_ID_miblo_decrement_time_stamp = 104;
|
||||
static int32_t fcoder_metacmd_ID_miblo_decrement_time_stamp_minute = 105;
|
||||
static int32_t fcoder_metacmd_ID_miblo_increment_basic = 106;
|
||||
static int32_t fcoder_metacmd_ID_miblo_increment_time_stamp = 107;
|
||||
static int32_t fcoder_metacmd_ID_miblo_increment_time_stamp_minute = 108;
|
||||
static int32_t fcoder_metacmd_ID_mouse_wheel_scroll = 109;
|
||||
static int32_t fcoder_metacmd_ID_move_down = 110;
|
||||
static int32_t fcoder_metacmd_ID_move_down_10 = 111;
|
||||
static int32_t fcoder_metacmd_ID_move_down_textual = 112;
|
||||
static int32_t fcoder_metacmd_ID_move_left = 113;
|
||||
static int32_t fcoder_metacmd_ID_move_line_down = 114;
|
||||
static int32_t fcoder_metacmd_ID_move_line_up = 115;
|
||||
static int32_t fcoder_metacmd_ID_move_right = 116;
|
||||
static int32_t fcoder_metacmd_ID_move_up = 117;
|
||||
static int32_t fcoder_metacmd_ID_move_up_10 = 118;
|
||||
static int32_t fcoder_metacmd_ID_multi_line_edit = 119;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_direct = 120;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_direct = 121;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_sticky = 122;
|
||||
static int32_t fcoder_metacmd_ID_newline_or_goto_position_sticky = 123;
|
||||
static int32_t fcoder_metacmd_ID_open_all_code = 124;
|
||||
static int32_t fcoder_metacmd_ID_open_all_code_recursive = 125;
|
||||
static int32_t fcoder_metacmd_ID_open_color_tweaker = 126;
|
||||
static int32_t fcoder_metacmd_ID_open_file_in_quotes = 127;
|
||||
static int32_t fcoder_metacmd_ID_open_in_other = 128;
|
||||
static int32_t fcoder_metacmd_ID_open_long_braces = 129;
|
||||
static int32_t fcoder_metacmd_ID_open_long_braces_break = 130;
|
||||
static int32_t fcoder_metacmd_ID_open_long_braces_semicolon = 131;
|
||||
static int32_t fcoder_metacmd_ID_open_matching_file_cpp = 132;
|
||||
static int32_t fcoder_metacmd_ID_open_panel_hsplit = 133;
|
||||
static int32_t fcoder_metacmd_ID_open_panel_vsplit = 134;
|
||||
static int32_t fcoder_metacmd_ID_page_down = 135;
|
||||
static int32_t fcoder_metacmd_ID_page_up = 136;
|
||||
static int32_t fcoder_metacmd_ID_paste = 137;
|
||||
static int32_t fcoder_metacmd_ID_paste_and_indent = 138;
|
||||
static int32_t fcoder_metacmd_ID_paste_next = 139;
|
||||
static int32_t fcoder_metacmd_ID_paste_next_and_indent = 140;
|
||||
static int32_t fcoder_metacmd_ID_place_in_scope = 141;
|
||||
static int32_t fcoder_metacmd_ID_project_command_lister = 142;
|
||||
static int32_t fcoder_metacmd_ID_project_fkey_command = 143;
|
||||
static int32_t fcoder_metacmd_ID_project_go_to_root_directory = 144;
|
||||
static int32_t fcoder_metacmd_ID_query_replace = 145;
|
||||
static int32_t fcoder_metacmd_ID_query_replace_identifier = 146;
|
||||
static int32_t fcoder_metacmd_ID_query_replace_selection = 147;
|
||||
static int32_t fcoder_metacmd_ID_redo = 148;
|
||||
static int32_t fcoder_metacmd_ID_reload_themes = 149;
|
||||
static int32_t fcoder_metacmd_ID_remap_interactive = 150;
|
||||
static int32_t fcoder_metacmd_ID_rename_file_query = 151;
|
||||
static int32_t fcoder_metacmd_ID_rename_parameter = 152;
|
||||
static int32_t fcoder_metacmd_ID_reopen = 153;
|
||||
static int32_t fcoder_metacmd_ID_replace_all_occurrences = 154;
|
||||
static int32_t fcoder_metacmd_ID_replace_in_range = 155;
|
||||
static int32_t fcoder_metacmd_ID_reverse_search = 156;
|
||||
static int32_t fcoder_metacmd_ID_reverse_search_identifier = 157;
|
||||
static int32_t fcoder_metacmd_ID_save = 158;
|
||||
static int32_t fcoder_metacmd_ID_save_all_dirty_buffers = 159;
|
||||
static int32_t fcoder_metacmd_ID_save_to_query = 160;
|
||||
static int32_t fcoder_metacmd_ID_scope_absorb_down = 161;
|
||||
static int32_t fcoder_metacmd_ID_search = 162;
|
||||
static int32_t fcoder_metacmd_ID_search_identifier = 163;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_left = 164;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_left = 165;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_right = 166;
|
||||
static int32_t fcoder_metacmd_ID_seek_alphanumeric_right = 167;
|
||||
static int32_t fcoder_metacmd_ID_seek_beginning_of_line = 168;
|
||||
static int32_t fcoder_metacmd_ID_seek_beginning_of_textual_line = 169;
|
||||
static int32_t fcoder_metacmd_ID_seek_end_of_line = 170;
|
||||
static int32_t fcoder_metacmd_ID_seek_end_of_textual_line = 171;
|
||||
static int32_t fcoder_metacmd_ID_seek_token_left = 172;
|
||||
static int32_t fcoder_metacmd_ID_seek_token_right = 173;
|
||||
static int32_t fcoder_metacmd_ID_seek_white_or_token_left = 174;
|
||||
static int32_t fcoder_metacmd_ID_seek_white_or_token_right = 175;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_down = 176;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_down_end_line = 177;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_left = 178;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_right = 179;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_up = 180;
|
||||
static int32_t fcoder_metacmd_ID_seek_whitespace_up_end_line = 181;
|
||||
static int32_t fcoder_metacmd_ID_select_all = 182;
|
||||
static int32_t fcoder_metacmd_ID_select_next_scope_absolute = 183;
|
||||
static int32_t fcoder_metacmd_ID_select_prev_scope_absolute = 184;
|
||||
static int32_t fcoder_metacmd_ID_select_surrounding_scope = 185;
|
||||
static int32_t fcoder_metacmd_ID_set_bindings_choose = 186;
|
||||
static int32_t fcoder_metacmd_ID_set_bindings_default = 187;
|
||||
static int32_t fcoder_metacmd_ID_set_bindings_mac_default = 188;
|
||||
static int32_t fcoder_metacmd_ID_set_mark = 189;
|
||||
static int32_t fcoder_metacmd_ID_set_mode_to_notepad_like = 190;
|
||||
static int32_t fcoder_metacmd_ID_set_mode_to_original = 191;
|
||||
static int32_t fcoder_metacmd_ID_setup_build_bat = 192;
|
||||
static int32_t fcoder_metacmd_ID_setup_build_bat_and_sh = 193;
|
||||
static int32_t fcoder_metacmd_ID_setup_build_sh = 194;
|
||||
static int32_t fcoder_metacmd_ID_setup_new_project = 195;
|
||||
static int32_t fcoder_metacmd_ID_show_filebar = 196;
|
||||
static int32_t fcoder_metacmd_ID_show_scrollbar = 197;
|
||||
static int32_t fcoder_metacmd_ID_snipe_token_or_word = 198;
|
||||
static int32_t fcoder_metacmd_ID_snipe_token_or_word_right = 199;
|
||||
static int32_t fcoder_metacmd_ID_snippet_lister = 200;
|
||||
static int32_t fcoder_metacmd_ID_suppress_mouse = 201;
|
||||
static int32_t fcoder_metacmd_ID_swap_buffers_between_panels = 202;
|
||||
static int32_t fcoder_metacmd_ID_to_lowercase = 203;
|
||||
static int32_t fcoder_metacmd_ID_to_uppercase = 204;
|
||||
static int32_t fcoder_metacmd_ID_toggle_filebar = 205;
|
||||
static int32_t fcoder_metacmd_ID_toggle_fullscreen = 206;
|
||||
static int32_t fcoder_metacmd_ID_toggle_highlight_enclosing_scopes = 207;
|
||||
static int32_t fcoder_metacmd_ID_toggle_highlight_line_at_cursor = 208;
|
||||
static int32_t fcoder_metacmd_ID_toggle_line_wrap = 209;
|
||||
static int32_t fcoder_metacmd_ID_toggle_mouse = 210;
|
||||
static int32_t fcoder_metacmd_ID_toggle_paren_matching_helper = 211;
|
||||
static int32_t fcoder_metacmd_ID_toggle_show_whitespace = 212;
|
||||
static int32_t fcoder_metacmd_ID_toggle_virtual_whitespace = 213;
|
||||
static int32_t fcoder_metacmd_ID_undo = 214;
|
||||
static int32_t fcoder_metacmd_ID_view_buffer_other_panel = 215;
|
||||
static int32_t fcoder_metacmd_ID_view_jump_list_with_lister = 216;
|
||||
static int32_t fcoder_metacmd_ID_word_complete = 217;
|
||||
static int32_t fcoder_metacmd_ID_write_and_auto_tab = 218;
|
||||
static int32_t fcoder_metacmd_ID_write_block = 219;
|
||||
static int32_t fcoder_metacmd_ID_write_character = 220;
|
||||
static int32_t fcoder_metacmd_ID_write_explicit_enum_flags = 221;
|
||||
static int32_t fcoder_metacmd_ID_write_explicit_enum_values = 222;
|
||||
static int32_t fcoder_metacmd_ID_write_hack = 223;
|
||||
static int32_t fcoder_metacmd_ID_write_note = 224;
|
||||
static int32_t fcoder_metacmd_ID_write_todo = 225;
|
||||
static int32_t fcoder_metacmd_ID_write_underscore = 226;
|
||||
static int32_t fcoder_metacmd_ID_write_zero_struct = 227;
|
||||
#endif
|
||||
|
|
|
@ -83,14 +83,14 @@ bind(context, key_up, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_up_end_line);
|
|||
bind(context, key_down, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_down_end_line);
|
||||
bind(context, key_left, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_left);
|
||||
bind(context, key_right, MDFR_CTRL|MDFR_SHIFT, seek_whitespace_right);
|
||||
bind(context, 'k', MDFR_CTRL|MDFR_ALT, seek_whitespace_up_end_line);
|
||||
bind(context, 'j', MDFR_CTRL|MDFR_ALT, seek_whitespace_down_end_line);
|
||||
bind(context, 'h', MDFR_CTRL|MDFR_ALT, seek_whitespace_left);
|
||||
bind(context, 'l', MDFR_CTRL|MDFR_ALT, seek_whitespace_right);
|
||||
bind(context, 'K', MDFR_ALT, seek_whitespace_up_end_line);
|
||||
bind(context, 'J', MDFR_ALT, seek_whitespace_down_end_line);
|
||||
bind(context, 'H', MDFR_ALT, seek_whitespace_left);
|
||||
bind(context, 'L', MDFR_ALT, seek_whitespace_right);
|
||||
bind(context, key_up, MDFR_ALT, move_line_up);
|
||||
bind(context, key_down, MDFR_ALT, move_line_down);
|
||||
bind(context, 'K', MDFR_ALT, move_line_up);
|
||||
bind(context, 'J', MDFR_ALT, move_line_down);
|
||||
bind(context, 'k', MDFR_CTRL|MDFR_ALT, move_line_up);
|
||||
bind(context, 'j', MDFR_CTRL|MDFR_ALT, move_line_down);
|
||||
bind(context, key_back, MDFR_CTRL, backspace_word);
|
||||
bind(context, key_del, MDFR_CTRL, delete_word);
|
||||
bind(context, key_back, MDFR_ALT, snipe_token_or_word);
|
||||
|
@ -133,8 +133,10 @@ bind(context, ' ', MDFR_SHIFT, write_character);
|
|||
end_map(context);
|
||||
begin_map(context, default_code_map);
|
||||
inherit_map(context, mapid_file);
|
||||
bind(context, key_right, MDFR_CTRL, seek_alphanumeric_or_camel_right);
|
||||
bind(context, key_left, MDFR_CTRL, seek_alphanumeric_or_camel_left);
|
||||
bind(context, key_right, MDFR_CTRL, seek_alphanumeric_or_camel_right);
|
||||
bind(context, 'H', MDFR_ALT, seek_alphanumeric_or_camel_left);
|
||||
bind(context, 'L', MDFR_ALT, seek_alphanumeric_or_camel_right);
|
||||
bind(context, '\n', MDFR_NONE, write_and_auto_tab);
|
||||
bind(context, '\n', MDFR_SHIFT, write_and_auto_tab);
|
||||
bind(context, '}', MDFR_NONE, write_and_auto_tab);
|
||||
|
@ -244,10 +246,10 @@ bind(context, key_up, MDFR_SHIFT, move_up);
|
|||
bind(context, key_down, MDFR_SHIFT, move_down);
|
||||
bind(context, key_left, MDFR_SHIFT, move_left);
|
||||
bind(context, key_right, MDFR_SHIFT, move_right);
|
||||
bind(context, 'k', MDFR_ALT, move_up);
|
||||
bind(context, 'j', MDFR_ALT, move_down);
|
||||
bind(context, 'h', MDFR_ALT, move_left);
|
||||
bind(context, 'l', MDFR_ALT, move_right);
|
||||
bind(context, 'k', MDFR_CTRL, move_up);
|
||||
bind(context, 'j', MDFR_CTRL, move_down);
|
||||
bind(context, 'h', MDFR_CTRL, move_left);
|
||||
bind(context, 'l', MDFR_CTRL, move_right);
|
||||
bind(context, key_end, MDFR_NONE, seek_end_of_line);
|
||||
bind(context, key_home, MDFR_NONE, seek_beginning_of_line);
|
||||
bind(context, key_page_up, MDFR_CTRL, goto_beginning_of_file);
|
||||
|
@ -268,10 +270,10 @@ bind(context, key_up, MDFR_CMND|MDFR_SHIFT, seek_whitespace_up_end_line);
|
|||
bind(context, key_down, MDFR_CMND|MDFR_SHIFT, seek_whitespace_down_end_line);
|
||||
bind(context, key_left, MDFR_CMND|MDFR_SHIFT, seek_whitespace_left);
|
||||
bind(context, key_right, MDFR_CMND|MDFR_SHIFT, seek_whitespace_right);
|
||||
bind(context, 'k', MDFR_CTRL|MDFR_CMND, seek_whitespace_up_end_line);
|
||||
bind(context, 'j', MDFR_CTRL|MDFR_CMND, seek_whitespace_down_end_line);
|
||||
bind(context, 'h', MDFR_CTRL|MDFR_CMND, seek_whitespace_left);
|
||||
bind(context, 'l', MDFR_CTRL|MDFR_CMND, seek_whitespace_right);
|
||||
bind(context, 'K', MDFR_CTRL, seek_whitespace_up_end_line);
|
||||
bind(context, 'J', MDFR_CTRL, seek_whitespace_down_end_line);
|
||||
bind(context, 'H', MDFR_CTRL, seek_whitespace_left);
|
||||
bind(context, 'L', MDFR_CTRL, seek_whitespace_right);
|
||||
bind(context, key_up, MDFR_ALT, move_line_up);
|
||||
bind(context, key_down, MDFR_ALT, move_line_down);
|
||||
bind(context, 'k', MDFR_CTRL|MDFR_ALT, move_line_up);
|
||||
|
@ -316,8 +318,10 @@ bind(context, ' ', MDFR_SHIFT, write_character);
|
|||
end_map(context);
|
||||
begin_map(context, default_code_map);
|
||||
inherit_map(context, mapid_file);
|
||||
bind(context, key_right, MDFR_CMND, seek_alphanumeric_or_camel_right);
|
||||
bind(context, key_left, MDFR_CMND, seek_alphanumeric_or_camel_left);
|
||||
bind(context, key_right, MDFR_CMND, seek_alphanumeric_or_camel_right);
|
||||
bind(context, 'H', MDFR_CTRL, seek_alphanumeric_or_camel_left);
|
||||
bind(context, 'L', MDFR_CTRL, seek_alphanumeric_or_camel_right);
|
||||
bind(context, '\n', MDFR_NONE, write_and_auto_tab);
|
||||
bind(context, '\n', MDFR_SHIFT, write_and_auto_tab);
|
||||
bind(context, '}', MDFR_NONE, write_and_auto_tab);
|
||||
|
@ -480,14 +484,14 @@ static Meta_Key_Bind fcoder_binds_for_default_mapid_file[88] = {
|
|||
{0, 55298, 9, "seek_whitespace_down_end_line", 29, LINK_PROCS(seek_whitespace_down_end_line)},
|
||||
{0, 55299, 9, "seek_whitespace_left", 20, LINK_PROCS(seek_whitespace_left)},
|
||||
{0, 55300, 9, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
|
||||
{0, 107, 3, "seek_whitespace_up_end_line", 27, LINK_PROCS(seek_whitespace_up_end_line)},
|
||||
{0, 106, 3, "seek_whitespace_down_end_line", 29, LINK_PROCS(seek_whitespace_down_end_line)},
|
||||
{0, 104, 3, "seek_whitespace_left", 20, LINK_PROCS(seek_whitespace_left)},
|
||||
{0, 108, 3, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
|
||||
{0, 75, 2, "seek_whitespace_up_end_line", 27, LINK_PROCS(seek_whitespace_up_end_line)},
|
||||
{0, 74, 2, "seek_whitespace_down_end_line", 29, LINK_PROCS(seek_whitespace_down_end_line)},
|
||||
{0, 72, 2, "seek_whitespace_left", 20, LINK_PROCS(seek_whitespace_left)},
|
||||
{0, 76, 2, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
|
||||
{0, 55297, 2, "move_line_up", 12, LINK_PROCS(move_line_up)},
|
||||
{0, 55298, 2, "move_line_down", 14, LINK_PROCS(move_line_down)},
|
||||
{0, 75, 2, "move_line_up", 12, LINK_PROCS(move_line_up)},
|
||||
{0, 74, 2, "move_line_down", 14, LINK_PROCS(move_line_down)},
|
||||
{0, 107, 3, "move_line_up", 12, LINK_PROCS(move_line_up)},
|
||||
{0, 106, 3, "move_line_down", 14, LINK_PROCS(move_line_down)},
|
||||
{0, 55296, 1, "backspace_word", 14, LINK_PROCS(backspace_word)},
|
||||
{0, 55301, 1, "delete_word", 11, LINK_PROCS(delete_word)},
|
||||
{0, 55296, 2, "snipe_token_or_word", 19, LINK_PROCS(snipe_token_or_word)},
|
||||
|
@ -528,9 +532,11 @@ static Meta_Key_Bind fcoder_binds_for_default_mapid_file[88] = {
|
|||
{0, 62, 1, "view_jump_list_with_lister", 26, LINK_PROCS(view_jump_list_with_lister)},
|
||||
{0, 32, 8, "write_character", 15, LINK_PROCS(write_character)},
|
||||
};
|
||||
static Meta_Key_Bind fcoder_binds_for_default_default_code_map[30] = {
|
||||
{0, 55300, 1, "seek_alphanumeric_or_camel_right", 32, LINK_PROCS(seek_alphanumeric_or_camel_right)},
|
||||
static Meta_Key_Bind fcoder_binds_for_default_default_code_map[32] = {
|
||||
{0, 55299, 1, "seek_alphanumeric_or_camel_left", 31, LINK_PROCS(seek_alphanumeric_or_camel_left)},
|
||||
{0, 55300, 1, "seek_alphanumeric_or_camel_right", 32, LINK_PROCS(seek_alphanumeric_or_camel_right)},
|
||||
{0, 72, 2, "seek_alphanumeric_or_camel_left", 31, LINK_PROCS(seek_alphanumeric_or_camel_left)},
|
||||
{0, 76, 2, "seek_alphanumeric_or_camel_right", 32, LINK_PROCS(seek_alphanumeric_or_camel_right)},
|
||||
{0, 10, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
|
||||
{0, 10, 8, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
|
||||
{0, 125, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
|
||||
|
@ -581,7 +587,7 @@ static Meta_Key_Bind fcoder_binds_for_default_default_lister_ui_map[16] = {
|
|||
static Meta_Sub_Map fcoder_submaps_for_default[4] = {
|
||||
{"mapid_global", 12, "The following bindings apply in all situations.", 47, 0, 0, fcoder_binds_for_default_mapid_global, 39},
|
||||
{"mapid_file", 10, "The following bindings apply in general text files and most apply in code files, but some are overriden by other commands specific to code files.", 145, 0, 0, fcoder_binds_for_default_mapid_file, 88},
|
||||
{"default_code_map", 16, "The following commands only apply in files where the lexer (syntax highlighting) is turned on.", 94, "mapid_file", 10, fcoder_binds_for_default_default_code_map, 30},
|
||||
{"default_code_map", 16, "The following commands only apply in files where the lexer (syntax highlighting) is turned on.", 94, "mapid_file", 10, fcoder_binds_for_default_default_code_map, 32},
|
||||
{"default_lister_ui_map", 21, "These commands apply in 'lister mode' such as when you open a file.", 67, 0, 0, fcoder_binds_for_default_default_lister_ui_map, 16},
|
||||
};
|
||||
static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_global[39] = {
|
||||
|
@ -644,10 +650,10 @@ static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_file[87] = {
|
|||
{0, 55298, 8, "move_down", 9, LINK_PROCS(move_down)},
|
||||
{0, 55299, 8, "move_left", 9, LINK_PROCS(move_left)},
|
||||
{0, 55300, 8, "move_right", 10, LINK_PROCS(move_right)},
|
||||
{0, 107, 2, "move_up", 7, LINK_PROCS(move_up)},
|
||||
{0, 106, 2, "move_down", 9, LINK_PROCS(move_down)},
|
||||
{0, 104, 2, "move_left", 9, LINK_PROCS(move_left)},
|
||||
{0, 108, 2, "move_right", 10, LINK_PROCS(move_right)},
|
||||
{0, 107, 1, "move_up", 7, LINK_PROCS(move_up)},
|
||||
{0, 106, 1, "move_down", 9, LINK_PROCS(move_down)},
|
||||
{0, 104, 1, "move_left", 9, LINK_PROCS(move_left)},
|
||||
{0, 108, 1, "move_right", 10, LINK_PROCS(move_right)},
|
||||
{0, 55304, 0, "seek_end_of_line", 16, LINK_PROCS(seek_end_of_line)},
|
||||
{0, 55303, 0, "seek_beginning_of_line", 22, LINK_PROCS(seek_beginning_of_line)},
|
||||
{0, 55305, 1, "goto_beginning_of_file", 22, LINK_PROCS(goto_beginning_of_file)},
|
||||
|
@ -668,10 +674,10 @@ static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_file[87] = {
|
|||
{0, 55298, 12, "seek_whitespace_down_end_line", 29, LINK_PROCS(seek_whitespace_down_end_line)},
|
||||
{0, 55299, 12, "seek_whitespace_left", 20, LINK_PROCS(seek_whitespace_left)},
|
||||
{0, 55300, 12, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
|
||||
{0, 107, 5, "seek_whitespace_up_end_line", 27, LINK_PROCS(seek_whitespace_up_end_line)},
|
||||
{0, 106, 5, "seek_whitespace_down_end_line", 29, LINK_PROCS(seek_whitespace_down_end_line)},
|
||||
{0, 104, 5, "seek_whitespace_left", 20, LINK_PROCS(seek_whitespace_left)},
|
||||
{0, 108, 5, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
|
||||
{0, 75, 1, "seek_whitespace_up_end_line", 27, LINK_PROCS(seek_whitespace_up_end_line)},
|
||||
{0, 74, 1, "seek_whitespace_down_end_line", 29, LINK_PROCS(seek_whitespace_down_end_line)},
|
||||
{0, 72, 1, "seek_whitespace_left", 20, LINK_PROCS(seek_whitespace_left)},
|
||||
{0, 76, 1, "seek_whitespace_right", 21, LINK_PROCS(seek_whitespace_right)},
|
||||
{0, 55297, 2, "move_line_up", 12, LINK_PROCS(move_line_up)},
|
||||
{0, 55298, 2, "move_line_down", 14, LINK_PROCS(move_line_down)},
|
||||
{0, 107, 3, "move_line_up", 12, LINK_PROCS(move_line_up)},
|
||||
|
@ -714,9 +720,11 @@ static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_file[87] = {
|
|||
{0, 62, 4, "view_jump_list_with_lister", 26, LINK_PROCS(view_jump_list_with_lister)},
|
||||
{0, 32, 8, "write_character", 15, LINK_PROCS(write_character)},
|
||||
};
|
||||
static Meta_Key_Bind fcoder_binds_for_mac_default_default_code_map[30] = {
|
||||
{0, 55300, 4, "seek_alphanumeric_or_camel_right", 32, LINK_PROCS(seek_alphanumeric_or_camel_right)},
|
||||
static Meta_Key_Bind fcoder_binds_for_mac_default_default_code_map[32] = {
|
||||
{0, 55299, 4, "seek_alphanumeric_or_camel_left", 31, LINK_PROCS(seek_alphanumeric_or_camel_left)},
|
||||
{0, 55300, 4, "seek_alphanumeric_or_camel_right", 32, LINK_PROCS(seek_alphanumeric_or_camel_right)},
|
||||
{0, 72, 1, "seek_alphanumeric_or_camel_left", 31, LINK_PROCS(seek_alphanumeric_or_camel_left)},
|
||||
{0, 76, 1, "seek_alphanumeric_or_camel_right", 32, LINK_PROCS(seek_alphanumeric_or_camel_right)},
|
||||
{0, 10, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
|
||||
{0, 10, 8, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
|
||||
{0, 125, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)},
|
||||
|
@ -765,7 +773,7 @@ static Meta_Key_Bind fcoder_binds_for_mac_default_default_lister_ui_map[14] = {
|
|||
static Meta_Sub_Map fcoder_submaps_for_mac_default[4] = {
|
||||
{"mapid_global", 12, "The following bindings apply in all situations.", 47, 0, 0, fcoder_binds_for_mac_default_mapid_global, 39},
|
||||
{"mapid_file", 10, "The following bindings apply in general text files and most apply in code files, but some are overriden by other commands specific to code files.", 145, 0, 0, fcoder_binds_for_mac_default_mapid_file, 87},
|
||||
{"default_code_map", 16, "The following commands only apply in files where the lexer (syntax highlighting) is turned on.", 94, "mapid_file", 10, fcoder_binds_for_mac_default_default_code_map, 30},
|
||||
{"default_code_map", 16, "The following commands only apply in files where the lexer (syntax highlighting) is turned on.", 94, "mapid_file", 10, fcoder_binds_for_mac_default_default_code_map, 32},
|
||||
{"default_lister_ui_map", 21, "These commands apply in 'lister mode' such as when you open a file.", 67, 0, 0, fcoder_binds_for_mac_default_default_lister_ui_map, 14},
|
||||
};
|
||||
static Meta_Mapping fcoder_meta_maps[2] = {
|
||||
|
|
|
@ -12,6 +12,10 @@
|
|||
//#define FM_PRINT_COMMANDS
|
||||
|
||||
#include "../4ed_defines.h"
|
||||
# include "../4coder_lib/4coder_arena.h"
|
||||
# include "../4coder_lib/4coder_arena.cpp"
|
||||
# define FSTRING_IMPLEMENTATION
|
||||
# include "../4coder_lib/4coder_string.h"
|
||||
|
||||
#define FTECH_FILE_MOVING_IMPLEMENTATION
|
||||
#include "4ed_file_moving.h"
|
||||
|
@ -160,20 +164,20 @@ enum{
|
|||
};
|
||||
|
||||
internal char**
|
||||
get_defines_from_flags(u32 flags){
|
||||
get_defines_from_flags(Partition *part, u32 flags){
|
||||
char **result = 0;
|
||||
if (flags & KEEP_ASSERT){
|
||||
result = fm_list(fm_list_one_item("FRED_KEEP_ASSERT"), result);
|
||||
result = fm_list(part, fm_list_one_item(part, "FRED_KEEP_ASSERT"), result);
|
||||
}
|
||||
if (flags & INTERNAL){
|
||||
result = fm_list(fm_list_one_item("FRED_INTERNAL"), result);
|
||||
result = fm_list(part, fm_list_one_item(part, "FRED_INTERNAL"), result);
|
||||
}
|
||||
if (flags & SUPER){
|
||||
result = fm_list(fm_list_one_item("FRED_SUPER"), result);
|
||||
result = fm_list(part, fm_list_one_item(part, "FRED_SUPER"), result);
|
||||
}
|
||||
if (flags & LOG){
|
||||
char *log_defines[] = { "USE_LOG", "USE_LOGF", 0};
|
||||
result = fm_list(log_defines, result);
|
||||
result = fm_list(part, log_defines, result);
|
||||
}
|
||||
return(result);
|
||||
}
|
||||
|
@ -200,7 +204,7 @@ FOREIGN_WIN"\\x86\\freetype.lib"
|
|||
#define CL_ICON "..\\4coder-non-source\\res\\icon.res"
|
||||
|
||||
internal void
|
||||
build(u32 flags, u32 arch, char *code_path, char **code_files, char *out_path, char *out_file, char **defines, char **exports, char **inc_folders){
|
||||
build(Partition *part, u32 flags, u32 arch, char *code_path, char **code_files, char *out_path, char *out_file, char **defines, char **exports, char **inc_folders){
|
||||
Temp_Dir temp = fm_pushdir(out_path);
|
||||
|
||||
Build_Line line;
|
||||
|
@ -225,7 +229,7 @@ build(u32 flags, u32 arch, char *code_path, char **code_files, char *out_path, c
|
|||
fm_add_to_line(line, "-I%s", code_path);
|
||||
if (inc_folders != 0){
|
||||
for (u32 i = 0; inc_folders[i] != 0; ++i){
|
||||
char *str = fm_str(code_path, "/", inc_folders[i]);
|
||||
char *str = fm_str(part, code_path, "/", inc_folders[i]);
|
||||
fm_add_to_line(line, "-I%s", str);
|
||||
}
|
||||
}
|
||||
|
@ -256,7 +260,7 @@ build(u32 flags, u32 arch, char *code_path, char **code_files, char *out_path, c
|
|||
|
||||
if (defines != 0){
|
||||
for (u32 i = 0; defines[i] != 0; ++i){
|
||||
char *define_flag = fm_str("-D", defines[i]);
|
||||
char *define_flag = fm_str(part, "-D", defines[i]);
|
||||
fm_add_to_line(line, "%s", define_flag);
|
||||
}
|
||||
}
|
||||
|
@ -282,7 +286,7 @@ build(u32 flags, u32 arch, char *code_path, char **code_files, char *out_path, c
|
|||
Assert(exports != 0);
|
||||
fm_add_to_line(line, "-OPT:REF");
|
||||
for (u32 i = 0; exports[i] != 0; ++i){
|
||||
char *str = fm_str("-EXPORT:", exports[i]);
|
||||
char *str = fm_str(part, "-EXPORT:", exports[i]);
|
||||
fm_add_to_line(line, "%s", str);
|
||||
}
|
||||
}
|
||||
|
@ -342,7 +346,7 @@ FOREIGN"/x86/libfreetype-mac.a"
|
|||
#endif
|
||||
|
||||
internal void
|
||||
build(u32 flags, u32 arch, char *code_path, char **code_files, char *out_path, char *out_file, char **defines, char **exports, char **inc_folders){
|
||||
build(Partition *part, u32 flags, u32 arch, char *code_path, char **code_files, char *out_path, char *out_file, char **defines, char **exports, char **inc_folders){
|
||||
Build_Line line;
|
||||
fm_init_build_line(&line);
|
||||
|
||||
|
@ -416,11 +420,11 @@ build(u32 flags, u32 arch, char *code_path, char **code_files, char *out_path, c
|
|||
#endif
|
||||
|
||||
internal void
|
||||
build(u32 flags, u32 arch, char *code_path, char *code_file, char *out_path, char *out_file, char **defines, char **exports, char **inc_folders){
|
||||
build(Partition *part, u32 flags, u32 arch, char *code_path, char *code_file, char *out_path, char *out_file, char **defines, char **exports, char **inc_folders){
|
||||
char *code_files[2];
|
||||
code_files[0] = code_file;
|
||||
code_files[1] = 0;
|
||||
build(flags, arch, code_path, code_files, out_path, out_file, defines, exports, inc_folders);
|
||||
build(part, flags, arch, code_path, code_files, out_path, out_file, defines, exports, inc_folders);
|
||||
}
|
||||
|
||||
// TODO(NAME): build metadata fully from C++ and eliminate build_metadata.bat and build_metadata.sh
|
||||
|
@ -431,88 +435,88 @@ build_metadata(void){
|
|||
}
|
||||
|
||||
internal void
|
||||
site_build(char *cdir, u32 flags){
|
||||
site_build(Partition *part, char *cdir, u32 flags){
|
||||
build_metadata();
|
||||
|
||||
{
|
||||
char *file = fm_str("site/4ed_sitegen.cpp");
|
||||
char *dir = fm_str(BUILD_DIR);
|
||||
char *file = fm_str(part, "site/4ed_sitegen.cpp");
|
||||
char *dir = fm_str(part, BUILD_DIR);
|
||||
BEGIN_TIME_SECTION();
|
||||
build(OPTS | flags, Arch_X64, cdir, file, dir, "sitegen", get_defines_from_flags(flags), 0, includes);
|
||||
build(part, OPTS | flags, Arch_X64, cdir, file, dir, "sitegen", get_defines_from_flags(part, flags), 0, includes);
|
||||
END_TIME_SECTION("build sitegen");
|
||||
}
|
||||
|
||||
if (prev_error == 0){
|
||||
BEGIN_TIME_SECTION();
|
||||
char *cmd = fm_str(BUILD_DIR "/sitegen");
|
||||
char *code_dir = fm_str(".");
|
||||
char *asset_dir = fm_str("../4coder-non-source/site_resources");
|
||||
char *site_source_dir = fm_str("site/source_material");
|
||||
char *dest_dir = fm_str("../site");
|
||||
fm_make_folder_if_missing(dest_dir);
|
||||
char *cmd = fm_str(part, BUILD_DIR "/sitegen");
|
||||
char *code_dir = fm_str(part, ".");
|
||||
char *asset_dir = fm_str(part, "../4coder-non-source/site_resources");
|
||||
char *site_source_dir = fm_str(part, "site/source_material");
|
||||
char *dest_dir = fm_str(part, "../site");
|
||||
fm_make_folder_if_missing(part, dest_dir);
|
||||
systemf("%s %s %s %s %s", cmd, code_dir, asset_dir, site_source_dir, dest_dir);
|
||||
END_TIME_SECTION("run sitegen");
|
||||
}
|
||||
}
|
||||
|
||||
internal void
|
||||
build_and_run(char *cdir, char *filename, char *name, u32 flags){
|
||||
char *dir = fm_str(BUILD_DIR);
|
||||
build_and_run(Partition *part, char *cdir, char *filename, char *name, u32 flags){
|
||||
char *dir = fm_str(part, BUILD_DIR);
|
||||
|
||||
{
|
||||
char *file = fm_str(filename);
|
||||
char *file = fm_str(part, filename);
|
||||
BEGIN_TIME_SECTION();
|
||||
build(flags, Arch_X64, cdir, file, dir, name, get_defines_from_flags(flags), 0, includes);
|
||||
END_TIME_SECTION(fm_str("build ", name));
|
||||
build(part, flags, Arch_X64, cdir, file, dir, name, get_defines_from_flags(part, flags), 0, includes);
|
||||
END_TIME_SECTION(fm_str(part, "build ", name));
|
||||
}
|
||||
|
||||
if (prev_error == 0){
|
||||
char *cmd = fm_str(dir, "/", name);
|
||||
char *cmd = fm_str(part, dir, "/", name);
|
||||
BEGIN_TIME_SECTION();
|
||||
fm_execute_in_dir(cdir, cmd, 0);
|
||||
END_TIME_SECTION(fm_str("run ", name));
|
||||
END_TIME_SECTION(fm_str(part, "run ", name));
|
||||
}
|
||||
}
|
||||
|
||||
internal void
|
||||
fsm_generator(char *cdir){
|
||||
build_and_run(cdir, "meta/4ed_fsm_table_generator.cpp", "fsmgen", OPTS | DEBUG_INFO);
|
||||
fsm_generator(Partition *part, char *cdir){
|
||||
build_and_run(part, cdir, "meta/4ed_fsm_table_generator.cpp", "fsmgen", OPTS | DEBUG_INFO);
|
||||
}
|
||||
|
||||
internal void
|
||||
metagen(char *cdir){
|
||||
build_and_run(cdir, "meta/4ed_metagen.cpp", "metagen", OPTS | DEBUG_INFO);
|
||||
metagen(Partition *part, char *cdir){
|
||||
build_and_run(part, cdir, "meta/4ed_metagen.cpp", "metagen", OPTS | DEBUG_INFO);
|
||||
}
|
||||
|
||||
internal void
|
||||
string_build(char *cdir){
|
||||
char *dir = fm_str(BUILD_DIR);
|
||||
string_build(Partition *part, char *cdir){
|
||||
char *dir = fm_str(part, BUILD_DIR);
|
||||
|
||||
{
|
||||
char *file = fm_str("string/4ed_string_builder.cpp");
|
||||
char *file = fm_str(part, "string/4ed_string_builder.cpp");
|
||||
BEGIN_TIME_SECTION();
|
||||
build(OPTS | DEBUG_INFO, Arch_X64, cdir, file, dir, "string_builder", 0, 0, includes);
|
||||
build(part, OPTS | DEBUG_INFO, Arch_X64, cdir, file, dir, "string_builder", 0, 0, includes);
|
||||
END_TIME_SECTION("build string_builder");
|
||||
}
|
||||
|
||||
if (prev_error == 0){
|
||||
char *cmd = fm_str(cdir, "/", dir, "/string_builder");
|
||||
char *cmd = fm_str(part, cdir, "/", dir, "/string_builder");
|
||||
BEGIN_TIME_SECTION();
|
||||
fm_execute_in_dir(fm_str(cdir, "/string"), cmd, 0);
|
||||
fm_execute_in_dir(fm_str(part, cdir, "/string"), cmd, 0);
|
||||
END_TIME_SECTION("run string_builder");
|
||||
}
|
||||
}
|
||||
|
||||
internal void
|
||||
do_buildsuper(char *cdir, char *file, u32 arch){
|
||||
do_buildsuper(Partition *part, char *cdir, char *file, u32 arch){
|
||||
BEGIN_TIME_SECTION();
|
||||
Temp_Dir temp = fm_pushdir(fm_str(BUILD_DIR));
|
||||
Temp_Dir temp = fm_pushdir(fm_str(part, BUILD_DIR));
|
||||
|
||||
char *build_script = fm_str("buildsuper_", arch_names[arch], BAT);
|
||||
char *build_script = fm_str(part, "buildsuper_", arch_names[arch], BAT);
|
||||
|
||||
char *build_command = fm_str("\"", cdir, "/", build_script, "\" \"", file, "\"");
|
||||
char *build_command = fm_str(part, "\"", cdir, "/", build_script, "\" \"", file, "\"");
|
||||
if (This_OS == Platform_Windows){
|
||||
build_command = fm_str("call ", build_command);
|
||||
build_command = fm_str(part, "call ", build_command);
|
||||
}
|
||||
systemf("%s", build_command);
|
||||
|
||||
|
@ -545,12 +549,12 @@ get_freetype_include(char *out, u32 max){
|
|||
}
|
||||
|
||||
internal void
|
||||
build_main(char *cdir, b32 update_local_theme, u32 flags, u32 arch){
|
||||
char *dir = fm_str(BUILD_DIR);
|
||||
build_main(Partition *part, char *cdir, b32 update_local_theme, u32 flags, u32 arch){
|
||||
char *dir = fm_str(part, BUILD_DIR);
|
||||
|
||||
{
|
||||
char *file = fm_str("4ed_app_target.cpp");
|
||||
char **exports = fm_list_one_item("app_get_functions");
|
||||
char *file = fm_str(part, "4ed_app_target.cpp");
|
||||
char **exports = fm_list_one_item(part, "app_get_functions");
|
||||
|
||||
char **build_includes = includes;
|
||||
|
||||
|
@ -559,67 +563,67 @@ build_main(char *cdir, b32 update_local_theme, u32 flags, u32 arch){
|
|||
if (ft_size > 0){
|
||||
ft_include[ft_size] = 0;
|
||||
fprintf(stdout, "FREETYPE: %s\n", ft_include);
|
||||
build_includes = fm_list(build_includes, fm_list_one_item(ft_include));
|
||||
build_includes = fm_list(part, build_includes, fm_list_one_item(part, ft_include));
|
||||
}
|
||||
|
||||
BEGIN_TIME_SECTION();
|
||||
build(OPTS | SHARED_CODE | flags, arch, cdir, file, dir, "4ed_app" DLL, get_defines_from_flags(flags), exports, build_includes);
|
||||
build(part, OPTS | SHARED_CODE | flags, arch, cdir, file, dir, "4ed_app" DLL, get_defines_from_flags(part, flags), exports, build_includes);
|
||||
END_TIME_SECTION("build 4ed_app");
|
||||
}
|
||||
|
||||
{
|
||||
BEGIN_TIME_SECTION();
|
||||
char **inc = (char**)fm_list(includes, platform_includes[This_OS][This_Compiler]);
|
||||
build(OPTS | LIBS | ICON | flags, arch, cdir, platform_layers[This_OS], dir, "4ed", get_defines_from_flags(flags), 0, inc);
|
||||
char **inc = (char**)fm_list(part, includes, platform_includes[This_OS][This_Compiler]);
|
||||
build(part, OPTS | LIBS | ICON | flags, arch, cdir, platform_layers[This_OS], dir, "4ed", get_defines_from_flags(part, flags), 0, inc);
|
||||
END_TIME_SECTION("build 4ed");
|
||||
}
|
||||
|
||||
if (update_local_theme){
|
||||
BEGIN_TIME_SECTION();
|
||||
char *themes_folder = fm_str("../build/themes");
|
||||
char *source_themes_folder = fm_str("themes");
|
||||
char *themes_folder = fm_str(part, "../build/themes");
|
||||
char *source_themes_folder = fm_str(part, "themes");
|
||||
fm_clear_folder(themes_folder);
|
||||
fm_make_folder_if_missing(themes_folder);
|
||||
fm_make_folder_if_missing(part, themes_folder);
|
||||
fm_copy_all(source_themes_folder, "*", themes_folder);
|
||||
END_TIME_SECTION("move files");
|
||||
}
|
||||
}
|
||||
|
||||
internal void
|
||||
standard_build(char *cdir, u32 flags, u32 arch){
|
||||
fsm_generator(cdir);
|
||||
metagen(cdir);
|
||||
//do_buildsuper(cdir, fm_str(custom_files[Custom_Default]), arch);
|
||||
do_buildsuper(cdir, fm_str(custom_files[Custom_Experiments]), arch);
|
||||
//do_buildsuper(cdir, fm_str(custom_files[Custom_Casey]), arch);
|
||||
//do_buildsuper(cdir, fm_str(custom_files[Custom_ChronalVim]), arch);
|
||||
build_main(cdir, true, flags, arch);
|
||||
standard_build(Partition *part, char *cdir, u32 flags, u32 arch){
|
||||
fsm_generator(part, cdir);
|
||||
metagen(part, cdir);
|
||||
//do_buildsuper(part, cdir, fm_str(part, custom_files[Custom_Default]), arch);
|
||||
do_buildsuper(part, cdir, fm_str(part, custom_files[Custom_Experiments]), arch);
|
||||
//do_buildsuper(part, cdir, fm_str(part, custom_files[Custom_Casey]), arch);
|
||||
//do_buildsuper(part, cdir, fm_str(part, custom_files[Custom_ChronalVim]), arch);
|
||||
build_main(part, cdir, true, flags, arch);
|
||||
}
|
||||
|
||||
internal char*
|
||||
get_4coder_dist_name(u32 platform, char *tier, u32 arch){
|
||||
char *name = fm_str("4coder-alpha-"MAJOR_STR"-"MINOR_STR"-"PATCH_STR);
|
||||
get_4coder_dist_name(Partition *part, u32 platform, char *tier, u32 arch){
|
||||
char *name = fm_str(part, "4coder-alpha-" MAJOR_STR "-" MINOR_STR "-" PATCH_STR);
|
||||
if (strcmp(tier, "alpha") != 0){
|
||||
name = fm_str(name, "-", tier);
|
||||
name = fm_str(part, name, "-", tier);
|
||||
}
|
||||
if (platform != Platform_None){
|
||||
name = fm_str(name, "-", platform_names[platform]);
|
||||
name = fm_str(part, name, "-", platform_names[platform]);
|
||||
}
|
||||
if (arch != Arch_None){
|
||||
name = fm_str(name, "-", arch_names[arch]);
|
||||
name = fm_str(part, name, "-", arch_names[arch]);
|
||||
}
|
||||
return(name);
|
||||
}
|
||||
|
||||
internal void
|
||||
package(char *cdir){
|
||||
package(Partition *part, char *cdir){
|
||||
// NOTE(allen): meta
|
||||
fsm_generator(cdir);
|
||||
metagen(cdir);
|
||||
fsm_generator(part, cdir);
|
||||
metagen(part, cdir);
|
||||
|
||||
char *build_dir = fm_str(BUILD_DIR);
|
||||
char *pack_dir = fm_str(PACK_DIR);
|
||||
char *fonts_source_dir = fm_str("../4coder-non-source/dist_files/fonts");
|
||||
char *build_dir = fm_str(part, BUILD_DIR);
|
||||
char *pack_dir = fm_str(part, PACK_DIR);
|
||||
char *fonts_source_dir = fm_str(part, "../4coder-non-source/dist_files/fonts");
|
||||
|
||||
char *base_package_root = "../current_dist";
|
||||
|
||||
|
@ -638,62 +642,62 @@ package(char *cdir){
|
|||
char *tier = tiers[tier_index];
|
||||
u32 flags = base_flags | tier_flags[tier_index];
|
||||
|
||||
Temp temp = fm_begin_temp();
|
||||
char *tier_package_root = fm_str(base_package_root, "_", tier);
|
||||
Temp_Memory temp = begin_temp_memory(part);
|
||||
char *tier_package_root = fm_str(part, base_package_root, "_", tier);
|
||||
for (u32 arch = 0; arch < Arch_COUNT; ++arch){
|
||||
char *par_dir = fm_str(tier_package_root, "_", arch_names[arch]);
|
||||
char *dir = fm_str(par_dir, "/4coder");
|
||||
char *fonts_dir = fm_str(dir, "/fonts");
|
||||
char *zip_dir = fm_str(pack_dir, "/", tier, "_", arch_names[arch]);
|
||||
char *par_dir = fm_str(part, tier_package_root, "_", arch_names[arch]);
|
||||
char *dir = fm_str(part, par_dir, "/4coder");
|
||||
char *fonts_dir = fm_str(part, dir, "/fonts");
|
||||
char *zip_dir = fm_str(part, pack_dir, "/", tier, "_", arch_names[arch]);
|
||||
|
||||
build_metadata();
|
||||
build_main(cdir, false, flags, arch);
|
||||
build_main(part, cdir, false, flags, arch);
|
||||
|
||||
fm_clear_folder(par_dir);
|
||||
|
||||
fm_make_folder_if_missing(dir);
|
||||
fm_copy_file(fm_str(build_dir, "/4ed" EXE), fm_str(dir, "/4ed" EXE));
|
||||
fm_copy_file(fm_str(build_dir, "/4ed_app" DLL), fm_str(dir, "/4ed_app" DLL));
|
||||
fm_make_folder_if_missing(part, dir);
|
||||
fm_copy_file(fm_str(part, build_dir, "/4ed" EXE), fm_str(part, dir, "/4ed" EXE));
|
||||
fm_copy_file(fm_str(part, build_dir, "/4ed_app" DLL), fm_str(part, dir, "/4ed_app" DLL));
|
||||
|
||||
fm_copy_folder(cdir, dir, "themes");
|
||||
fm_copy_file(fm_str(cdir, "/LICENSE.txt"), fm_str(dir, "/LICENSE.txt"));
|
||||
fm_copy_file(fm_str(cdir, "/README.txt"), fm_str(dir, "/README.txt"));
|
||||
fm_copy_file(fm_str(cdir, "/changes.txt"), fm_str(dir, "/changes.txt"));
|
||||
fm_copy_folder(part, cdir, dir, "themes");
|
||||
fm_copy_file(fm_str(part, cdir, "/LICENSE.txt"), fm_str(part, dir, "/LICENSE.txt"));
|
||||
fm_copy_file(fm_str(part, cdir, "/README.txt"), fm_str(part, dir, "/README.txt"));
|
||||
fm_copy_file(fm_str(part, cdir, "/changes.txt"), fm_str(part, dir, "/changes.txt"));
|
||||
|
||||
fm_make_folder_if_missing(fonts_dir);
|
||||
fm_make_folder_if_missing(part, fonts_dir);
|
||||
fm_copy_all(fonts_source_dir, "*", fonts_dir);
|
||||
fm_copy_file(fm_str(cdir, "/release-config.4coder"), fm_str(dir, "/config.4coder"));
|
||||
fm_copy_file(fm_str(part, cdir, "/release-config.4coder"), fm_str(part, dir, "/config.4coder"));
|
||||
|
||||
if (tier_index == Tier_Super){
|
||||
fm_copy_all(0, "4coder_*", dir);
|
||||
|
||||
do_buildsuper(cdir, fm_str(custom_files[Custom_Default]), arch);
|
||||
fm_copy_file(fm_str(build_dir, "/custom_4coder" DLL), fm_str(dir, "/custom_4coder" DLL));
|
||||
do_buildsuper(part, cdir, fm_str(part, custom_files[Custom_Default]), arch);
|
||||
fm_copy_file(fm_str(part, build_dir, "/custom_4coder" DLL), fm_str(part, dir, "/custom_4coder" DLL));
|
||||
|
||||
char *build_script = fm_str("buildsuper_", arch_names[arch], BAT);
|
||||
fm_copy_file(build_script, fm_str(dir, "/buildsuper" BAT));
|
||||
char *build_script = fm_str(part, "buildsuper_", arch_names[arch], BAT);
|
||||
fm_copy_file(build_script, fm_str(part, dir, "/buildsuper" BAT));
|
||||
|
||||
if (This_OS == Platform_Windows){
|
||||
fm_copy_folder(cdir, dir, "windows_scripts");
|
||||
fm_copy_folder(part, cdir, dir, "windows_scripts");
|
||||
}
|
||||
|
||||
fm_copy_folder(cdir, dir, "4coder_API");
|
||||
fm_copy_folder(cdir, dir, "4coder_lib");
|
||||
fm_copy_folder(cdir, dir, "4coder_generated");
|
||||
fm_copy_folder(cdir, dir, "languages");
|
||||
fm_copy_folder(part, cdir, dir, "4coder_API");
|
||||
fm_copy_folder(part, cdir, dir, "4coder_lib");
|
||||
fm_copy_folder(part, cdir, dir, "4coder_generated");
|
||||
fm_copy_folder(part, cdir, dir, "languages");
|
||||
}
|
||||
|
||||
char *dist_name = get_4coder_dist_name(This_OS, tier, arch);
|
||||
char *zip_name = fm_str(zip_dir, "/", dist_name, ".zip");
|
||||
fm_make_folder_if_missing(zip_dir);
|
||||
char *dist_name = get_4coder_dist_name(part, This_OS, tier, arch);
|
||||
char *zip_name = fm_str(part, zip_dir, "/", dist_name, ".zip");
|
||||
fm_make_folder_if_missing(part, zip_dir);
|
||||
fm_zip(par_dir, "4coder", zip_name);
|
||||
}
|
||||
fm_end_temp(temp);
|
||||
end_temp_memory(temp);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv){
|
||||
fm_init_system();
|
||||
Partition part = fm_init_system();
|
||||
|
||||
char cdir[256];
|
||||
BEGIN_TIME_SECTION();
|
||||
|
@ -710,16 +714,16 @@ int main(int argc, char **argv){
|
|||
#if defined(DEV_BUILD_X86)
|
||||
arch = Arch_X86;
|
||||
#endif
|
||||
standard_build(cdir, flags, arch);
|
||||
standard_build(&part, cdir, flags, arch);
|
||||
|
||||
#elif defined(PACKAGE)
|
||||
package(cdir);
|
||||
package(&part, cdir);
|
||||
|
||||
#elif defined(SITE_BUILD)
|
||||
site_build(cdir, DEBUG_INFO);
|
||||
site_build(&part, cdir, DEBUG_INFO);
|
||||
|
||||
#elif defined(STRING_BUILD)
|
||||
string_build(cdir);
|
||||
string_build(&part, cdir);
|
||||
|
||||
#else
|
||||
# error No build type specified.
|
||||
|
|
|
@ -46,22 +46,22 @@ static i32 prev_error = 0;
|
|||
internal void fm_execute_in_dir(char *dir, char *str, char *args);
|
||||
|
||||
// Init
|
||||
internal void fm_init_system();
|
||||
internal Partition fm_init_system();
|
||||
|
||||
// Timing
|
||||
internal u64 fm_get_time();
|
||||
internal u64 fm_get_time();
|
||||
|
||||
#define LLU_CAST(n) (long long unsigned int)(n)
|
||||
#define BEGIN_TIME_SECTION() u64 start = fm_get_time()
|
||||
#define END_TIME_SECTION(n) u64 total = fm_get_time() - start; printf("%-20s: %.2llu.%.6llu\n", (n), LLU_CAST(total/1000000), LLU_CAST(total%1000000));
|
||||
|
||||
// Files and Folders Manipulation
|
||||
internal void fm_make_folder_if_missing(char *dir);
|
||||
internal void fm_make_folder_if_missing(Partition *part, char *dir);
|
||||
internal void fm_clear_folder(char *folder);
|
||||
internal void fm_delete_file(char *file);
|
||||
internal void fm_copy_file(char *file, char *newname);
|
||||
internal void fm_copy_all(char *source, char *tag, char *folder);
|
||||
internal void fm_copy_folder(char *src_dir, char *dst_dir, char *src_folder);
|
||||
internal void fm_copy_folder(Partition *part, char *src_dir, char *dst_dir, char *src_folder);
|
||||
|
||||
// File Reading and Writing
|
||||
internal void fm_write_file(char *file_name, char *data, u32 size);
|
||||
|
@ -73,27 +73,18 @@ internal void fm_zip(char *parent, char *folder, char *dest);
|
|||
internal void fm_slash_fix(char *path);
|
||||
|
||||
// Memory concat helpers
|
||||
internal char *fm_prepare_string_internal(char *s1, ...);
|
||||
internal char *fm_prepare_string_internal(Partition *part, char *s1, ...);
|
||||
#define fm_str(...) fm_prepare_string_internal(__VA_ARGS__, (void*)0)
|
||||
|
||||
internal char *fm_basic_string_internal(char *s1, ...);
|
||||
internal char *fm_basic_string_internal(Partition *part, char *s1, ...);
|
||||
#define fm_basic_str(...) fm_basic_string_internal(__VA_ARGS__, (void*)0)
|
||||
|
||||
internal char **fm_prepare_list_internal(char **l1, ...);
|
||||
internal char **fm_prepare_list_internal(Partition *part, char **l1, ...);
|
||||
#define fm_list(...) fm_prepare_list_internal(__VA_ARGS__, (void*)0)
|
||||
|
||||
internal char **fm_list_one_item(char *item);
|
||||
|
||||
internal void *fm__push(umem size);
|
||||
internal void fm_align();
|
||||
|
||||
#define fm_push_array(T,c) (T*)fm__push(sizeof(T)*c)
|
||||
internal char **fm_list_one_item(Partition *part, char *item);
|
||||
|
||||
// File System Navigation
|
||||
typedef umem Temp;
|
||||
internal Temp fm_begin_temp();
|
||||
internal void fm_end_temp(Temp temp);
|
||||
|
||||
internal i32 fm_get_current_directory(char *buffer, i32 max);
|
||||
|
||||
struct Temp_Dir{
|
||||
|
@ -190,42 +181,11 @@ static char platform_correct_slash = '/';
|
|||
#if defined(FTECH_FILE_MOVING_IMPLEMENTATION) && !defined(FTECH_FILE_MOVING_IMPL_GUARD)
|
||||
#define FTECH_FILE_MOVING_IMPL_GUARD
|
||||
|
||||
char *fm_arena_memory = 0;
|
||||
umem fm_arena_pos = 0;
|
||||
umem fm_arena_max = 0;
|
||||
|
||||
internal void
|
||||
internal Partition
|
||||
fm__init_memory(){
|
||||
Assert(fm_arena_memory == 0);
|
||||
fm_arena_max = MB(512);
|
||||
fm_arena_memory = (char*)malloc((size_t)fm_arena_max);
|
||||
}
|
||||
|
||||
internal Temp
|
||||
fm_begin_temp(){
|
||||
return(fm_arena_pos);
|
||||
}
|
||||
|
||||
internal void
|
||||
fm_end_temp(Temp temp){
|
||||
fm_arena_pos = temp;
|
||||
}
|
||||
|
||||
internal void*
|
||||
fm__push(umem size){
|
||||
void *result = fm_arena_memory + fm_arena_pos;
|
||||
if (size + fm_arena_pos > fm_arena_max){
|
||||
result = 0;
|
||||
}
|
||||
else{
|
||||
fm_arena_pos += size;
|
||||
}
|
||||
return(result);
|
||||
}
|
||||
|
||||
internal void
|
||||
fm_align(){
|
||||
fm_arena_pos = (fm_arena_pos+7)&(~7);
|
||||
i32_4tech size = MB(512);
|
||||
Partition part = make_part(malloc(size), size);
|
||||
return(part);
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -310,13 +270,13 @@ extern "C"{
|
|||
|
||||
global u64 perf_frequency;
|
||||
|
||||
internal void
|
||||
internal Partition
|
||||
fm_init_system(){
|
||||
LARGE_INTEGER lint;
|
||||
if (QueryPerformanceFrequency(&lint)){
|
||||
perf_frequency = lint.QuadPart;
|
||||
}
|
||||
fm__init_memory();
|
||||
return(fm__init_memory());
|
||||
}
|
||||
|
||||
internal Temp_Dir
|
||||
|
@ -381,8 +341,8 @@ fm_slash_fix(char *path){
|
|||
}
|
||||
|
||||
internal void
|
||||
fm_make_folder_if_missing(char *dir){
|
||||
char *path = fm_str(dir);
|
||||
fm_make_folder_if_missing(Partition *part, char *dir){
|
||||
char *path = fm_str(part, dir);
|
||||
char *p = path;
|
||||
for (; *p; ++p){
|
||||
if (*p == '\\'){
|
||||
|
@ -478,9 +438,9 @@ fm_popdir(Temp_Dir temp){
|
|||
chdir(temp.dir);
|
||||
}
|
||||
|
||||
internal void
|
||||
internal Partition
|
||||
fm_init_system(){
|
||||
fm__init_memory();
|
||||
return(fm__init_memory());
|
||||
}
|
||||
|
||||
internal u64
|
||||
|
@ -585,77 +545,77 @@ fm_zip(char *parent, char *folder, char *file){
|
|||
#endif
|
||||
|
||||
internal void
|
||||
fm_copy_folder(char *src_dir, char *dst_dir, char *src_folder){
|
||||
fm_copy_folder(Partition *part, char *src_dir, char *dst_dir, char *src_folder){
|
||||
Temp_Dir temp = fm_pushdir(src_dir);
|
||||
fm_make_folder_if_missing(fm_str(dst_dir, "/", src_folder));
|
||||
char *copy_name = fm_str(dst_dir, "/", src_folder);
|
||||
fm_make_folder_if_missing(part, fm_str(part, dst_dir, "/", src_folder));
|
||||
char *copy_name = fm_str(part, dst_dir, "/", src_folder);
|
||||
fm_copy_all(src_folder, "*", copy_name);
|
||||
fm_popdir(temp);
|
||||
}
|
||||
|
||||
// List Helpers
|
||||
internal umem
|
||||
internal i32
|
||||
listsize(void *p, umem item_size){
|
||||
u64 zero = 0;
|
||||
u8 *ptr = (u8*)p;
|
||||
for (;memcmp(ptr, &zero, (size_t)item_size) != 0; ptr += item_size);
|
||||
umem size = (ptr - (u8*)p);
|
||||
i32 size = (i32)(ptr - (u8*)p);
|
||||
return(size);
|
||||
}
|
||||
|
||||
internal void*
|
||||
fm__prepare(umem item_size, void *i1, va_list list){
|
||||
umem size = listsize(i1, item_size);
|
||||
void *result = (void*)fm__push(size);
|
||||
fm__prepare(Partition *part, i32 item_size, void *i1, va_list list){
|
||||
i32 size = listsize(i1, item_size);
|
||||
void *result = push_array(part, char, size);
|
||||
memcpy(result, i1, (size_t)size);
|
||||
|
||||
void *ln = va_arg(list, void*);
|
||||
for (;ln != 0;){
|
||||
size = listsize(ln, item_size);
|
||||
void *new_str = (void*)fm__push(size);
|
||||
void *new_str = push_array(part, char, size);
|
||||
memcpy(new_str, ln, (size_t)size);
|
||||
ln = va_arg(list, void*);
|
||||
}
|
||||
|
||||
void *terminator = (void*)fm__push(item_size);
|
||||
void *terminator = push_array(part, char, item_size);
|
||||
memset(terminator, 0, (size_t)item_size);
|
||||
return(result);
|
||||
}
|
||||
|
||||
internal char*
|
||||
fm_basic_string_internal(char *s1, ...){
|
||||
umem item_size = sizeof(*s1);
|
||||
fm_basic_string_internal(Partition *part, char *s1, ...){
|
||||
i32 item_size = sizeof(*s1);
|
||||
va_list list;
|
||||
va_start(list, s1);
|
||||
char *result = (char*)fm__prepare(item_size, s1, list);
|
||||
char *result = (char*)fm__prepare(part, item_size, s1, list);
|
||||
va_end(list);
|
||||
return(result);
|
||||
}
|
||||
|
||||
internal char*
|
||||
fm_prepare_string_internal(char *s1, ...){
|
||||
umem item_size = sizeof(*s1);
|
||||
fm_prepare_string_internal(Partition *part, char *s1, ...){
|
||||
i32 item_size = sizeof(*s1);
|
||||
va_list list;
|
||||
va_start(list, s1);
|
||||
char *result = (char*)fm__prepare(item_size, s1, list);
|
||||
char *result = (char*)fm__prepare(part, item_size, s1, list);
|
||||
va_end(list);
|
||||
fm_slash_fix(result);
|
||||
return(result);
|
||||
}
|
||||
|
||||
internal char**
|
||||
fm_prepare_list_internal(char **p1, ...){
|
||||
umem item_size = sizeof(*p1);
|
||||
fm_prepare_list_internal(Partition *part, char **p1, ...){
|
||||
i32 item_size = sizeof(*p1);
|
||||
va_list list;
|
||||
va_start(list, p1);
|
||||
char **result = (char**)fm__prepare(item_size, p1, list);
|
||||
char **result = (char**)fm__prepare(part, item_size, p1, list);
|
||||
va_end(list);
|
||||
return(result);
|
||||
}
|
||||
|
||||
internal char**
|
||||
fm_list_one_item(char *item){
|
||||
char **result = (char**)fm__push(sizeof(char*)*2);
|
||||
fm_list_one_item(Partition *part, char *item){
|
||||
char **result = push_array(part, char*, 2);
|
||||
result[0] = item;
|
||||
result[1] = 0;
|
||||
return(result);
|
||||
|
|
|
@ -186,15 +186,15 @@ set_token(Parse_Context *context, Cpp_Token *token){
|
|||
}
|
||||
|
||||
internal String
|
||||
str_alloc(i32 cap){
|
||||
return(make_string_cap(fm_push_array(char, cap), 0, cap));
|
||||
str_alloc(Partition *part, i32 cap){
|
||||
return(make_string_cap(push_array(part, char, cap), 0, cap));
|
||||
}
|
||||
|
||||
internal Item_Set
|
||||
allocate_item_set(i32 count){
|
||||
allocate_item_set(Partition *part, i32 count){
|
||||
Item_Set item_set = {};
|
||||
if (count > 0){
|
||||
item_set.items = fm_push_array(Item_Node, count);
|
||||
item_set.items = push_array(part, Item_Node, count);
|
||||
item_set.count = count;
|
||||
memset(item_set.items, 0, sizeof(Item_Node)*count);
|
||||
}
|
||||
|
@ -431,7 +431,7 @@ doc_parse_last_parameter(String source, i32 *pos){
|
|||
}
|
||||
|
||||
internal void
|
||||
perform_doc_parse(String doc_string, Documentation *doc){
|
||||
perform_doc_parse(Partition *part, String doc_string, Documentation *doc){
|
||||
i32 keep_parsing = true;
|
||||
i32 pos = 0;
|
||||
|
||||
|
@ -459,7 +459,7 @@ perform_doc_parse(String doc_string, Documentation *doc){
|
|||
|
||||
if (param_count + see_count > 0){
|
||||
i32 memory_size = sizeof(String)*(2*param_count + see_count);
|
||||
doc->param_name = fm_push_array(String, memory_size);
|
||||
doc->param_name = push_array(part, String, memory_size);
|
||||
doc->param_docs = doc->param_name + param_count;
|
||||
doc->see_also = doc->param_docs + param_count;
|
||||
|
||||
|
@ -520,7 +520,7 @@ perform_doc_parse(String doc_string, Documentation *doc){
|
|||
}
|
||||
|
||||
internal i32
|
||||
struct_parse(i32 is_struct, Parse_Context *context, Item_Node *top_member);
|
||||
struct_parse(Partition *part, i32 is_struct, Parse_Context *context, Item_Node *top_member);
|
||||
|
||||
internal i32
|
||||
struct_parse_member(Parse_Context *context, Item_Node *member){
|
||||
|
@ -583,7 +583,7 @@ struct_parse_member(Parse_Context *context, Item_Node *member){
|
|||
}
|
||||
|
||||
internal Item_Node*
|
||||
struct_parse_next_member(Parse_Context *context){
|
||||
struct_parse_next_member(Partition *part, Parse_Context *context){
|
||||
Item_Node *result = 0;
|
||||
|
||||
Cpp_Token *token = 0;
|
||||
|
@ -594,8 +594,8 @@ struct_parse_next_member(Parse_Context *context){
|
|||
String lexeme = get_lexeme(*token, context->data);
|
||||
|
||||
if (match(lexeme, "STRUCT")){
|
||||
Item_Node *member = fm_push_array(Item_Node, 1);
|
||||
if (struct_parse(true, context, member)){
|
||||
Item_Node *member = push_array(part, Item_Node, 1);
|
||||
if (struct_parse(part, true, context, member)){
|
||||
result = member;
|
||||
break;
|
||||
}
|
||||
|
@ -604,8 +604,8 @@ struct_parse_next_member(Parse_Context *context){
|
|||
}
|
||||
}
|
||||
else if (match(lexeme, "UNION")){
|
||||
Item_Node *member = fm_push_array(Item_Node, 1);
|
||||
if (struct_parse(false, context, member)){
|
||||
Item_Node *member = push_array(part, Item_Node, 1);
|
||||
if (struct_parse(part, false, context, member)){
|
||||
result = member;
|
||||
break;
|
||||
}
|
||||
|
@ -614,7 +614,7 @@ struct_parse_next_member(Parse_Context *context){
|
|||
}
|
||||
}
|
||||
else{
|
||||
Item_Node *member = fm_push_array(Item_Node, 1);
|
||||
Item_Node *member = push_array(part, Item_Node, 1);
|
||||
if (struct_parse_member(context, member)){
|
||||
result = member;
|
||||
break;
|
||||
|
@ -633,7 +633,7 @@ struct_parse_next_member(Parse_Context *context){
|
|||
}
|
||||
|
||||
internal i32
|
||||
struct_parse(i32 is_struct, Parse_Context *context, Item_Node *top_member){
|
||||
struct_parse(Partition *part, i32 is_struct, Parse_Context *context, Item_Node *top_member){
|
||||
i32 result = false;
|
||||
|
||||
Cpp_Token *start_token = get_token(context);
|
||||
|
@ -671,14 +671,14 @@ struct_parse(i32 is_struct, Parse_Context *context, Item_Node *top_member){
|
|||
}
|
||||
|
||||
set_token(context, token+1);
|
||||
Item_Node *new_member = struct_parse_next_member(context);
|
||||
Item_Node *new_member = struct_parse_next_member(part, context);
|
||||
|
||||
if (new_member){
|
||||
top_member->first_child = new_member;
|
||||
|
||||
Item_Node *head_member = new_member;
|
||||
for(;;){
|
||||
new_member = struct_parse_next_member(context);
|
||||
new_member = struct_parse_next_member(part, context);
|
||||
if (new_member){
|
||||
head_member->next_sibling = new_member;
|
||||
head_member = new_member;
|
||||
|
@ -755,7 +755,7 @@ typedef_parse(Parse_Context *context, Item_Node *item){
|
|||
}
|
||||
|
||||
internal i32
|
||||
enum_parse(Parse_Context *context, Item_Node *item){
|
||||
enum_parse(Partition *part, Parse_Context *context, Item_Node *item){
|
||||
i32 result = false;
|
||||
|
||||
String parent_doc_string = {};
|
||||
|
@ -827,7 +827,7 @@ enum_parse(Parse_Context *context, Item_Node *item){
|
|||
}
|
||||
}
|
||||
|
||||
Item_Node *new_member = fm_push_array(Item_Node, 1);
|
||||
Item_Node *new_member = push_array(part, Item_Node, 1);
|
||||
if (first_member == 0){
|
||||
first_member = new_member;
|
||||
}
|
||||
|
@ -865,11 +865,11 @@ enum_parse(Parse_Context *context, Item_Node *item){
|
|||
}
|
||||
|
||||
internal Argument_Breakdown
|
||||
allocate_argument_breakdown(i32 count){
|
||||
allocate_argument_breakdown(Partition *part, i32 count){
|
||||
Argument_Breakdown breakdown = {};
|
||||
if (count > 0){
|
||||
breakdown.count = count;
|
||||
breakdown.args = fm_push_array(Argument, count);
|
||||
breakdown.args = push_array(part, Argument, count);
|
||||
memset(breakdown.args, 0, sizeof(Argument)*count);
|
||||
}
|
||||
return(breakdown);
|
||||
|
@ -881,7 +881,7 @@ foo(a, ... , z)
|
|||
^ ^
|
||||
*/
|
||||
internal Argument_Breakdown
|
||||
parameter_parse(char *data, Cpp_Token *args_start_token, Cpp_Token *args_end_token){
|
||||
parameter_parse(Partition *part, char *data, Cpp_Token *args_start_token, Cpp_Token *args_end_token){
|
||||
i32 arg_index = 0;
|
||||
Cpp_Token *arg_token = args_start_token + 1;
|
||||
i32 param_string_start = arg_token->start;
|
||||
|
@ -894,7 +894,7 @@ parameter_parse(char *data, Cpp_Token *args_start_token, Cpp_Token *args_end_tok
|
|||
}
|
||||
}
|
||||
|
||||
Argument_Breakdown breakdown = allocate_argument_breakdown(arg_count);
|
||||
Argument_Breakdown breakdown = allocate_argument_breakdown(part, arg_count);
|
||||
|
||||
arg_token = args_start_token + 1;
|
||||
for (; arg_token <= args_end_token; ++arg_token){
|
||||
|
@ -1025,7 +1025,7 @@ Moves the context in the following way:
|
|||
^ ---------------> ^
|
||||
*/
|
||||
internal i32
|
||||
function_sig_parse(Parse_Context *context, Item_Node *item, String cpp_name){
|
||||
function_sig_parse(Partition *part, Parse_Context *context, Item_Node *item, String cpp_name){
|
||||
i32 result = false;
|
||||
|
||||
Cpp_Token *token = 0;
|
||||
|
@ -1049,7 +1049,7 @@ function_sig_parse(Parse_Context *context, Item_Node *item, String cpp_name){
|
|||
item->args = str_start_end(context->data, args_start_token->start, token->start + token->size);
|
||||
item->t = Item_Function;
|
||||
item->cpp_name = cpp_name;
|
||||
item->breakdown = parameter_parse(context->data, args_start_token, token);
|
||||
item->breakdown = parameter_parse(part, context->data, args_start_token, token);
|
||||
|
||||
Assert(get_token(context)->type == CPP_TOKEN_PARENTHESE_CLOSE);
|
||||
result = true;
|
||||
|
@ -1065,7 +1065,7 @@ Moves the context in the following way:
|
|||
^ -------------------> ^
|
||||
*/
|
||||
internal i32
|
||||
function_parse(Parse_Context *context, Item_Node *item, String cpp_name){
|
||||
function_parse(Partition *part, Parse_Context *context, Item_Node *item, String cpp_name){
|
||||
i32 result = false;
|
||||
|
||||
String doc_string = {};
|
||||
|
@ -1079,7 +1079,7 @@ function_parse(Parse_Context *context, Item_Node *item, String cpp_name){
|
|||
|
||||
set_token(context, token);
|
||||
if (get_next_token(context)){
|
||||
if (function_sig_parse(context, item, cpp_name)){
|
||||
if (function_sig_parse(part, context, item, cpp_name)){
|
||||
Assert(get_token(context)->type == CPP_TOKEN_PARENTHESE_CLOSE);
|
||||
result = true;
|
||||
}
|
||||
|
@ -1118,7 +1118,7 @@ Moves the context in the following way:
|
|||
^ ----------------------------> ^
|
||||
*/
|
||||
internal i32
|
||||
macro_parse(Parse_Context *context, Item_Node *item){
|
||||
macro_parse(Partition *part, Parse_Context *context, Item_Node *item){
|
||||
i32 result = false;
|
||||
|
||||
Cpp_Token *token = 0;
|
||||
|
@ -1157,7 +1157,7 @@ macro_parse(Parse_Context *context, Item_Node *item){
|
|||
if (token){
|
||||
item->args = str_start_end(context->data, args_start_token->start, token->start + token->size);
|
||||
|
||||
item->breakdown = parameter_parse(context->data, args_start_token, token);
|
||||
item->breakdown = parameter_parse(part, context->data, args_start_token, token);
|
||||
|
||||
if ((token = get_next_token(context)) != 0){
|
||||
Cpp_Token *body_start = token;
|
||||
|
@ -1188,14 +1188,14 @@ macro_parse(Parse_Context *context, Item_Node *item){
|
|||
}
|
||||
|
||||
internal Meta_Unit
|
||||
compile_meta_unit(char *code_directory, char **files, Meta_Keywords *meta_keywords, i32 key_count){
|
||||
compile_meta_unit(Partition *part, char *code_directory, char **files, Meta_Keywords *meta_keywords, i32 key_count){
|
||||
Meta_Unit unit = {};
|
||||
|
||||
i32 file_count = 0;
|
||||
for (char **file_ptr = files; *file_ptr; ++file_ptr, ++file_count);
|
||||
|
||||
unit.count = file_count;
|
||||
unit.parse = fm_push_array(Parse, file_count);
|
||||
unit.parse = push_array(part, Parse, file_count);
|
||||
|
||||
b32 all_files_lexed = true;
|
||||
i32 i = 0;
|
||||
|
@ -1245,7 +1245,7 @@ compile_meta_unit(char *code_directory, char **files, Meta_Keywords *meta_keywor
|
|||
}
|
||||
|
||||
if (unit.set.count > 0){
|
||||
unit.set = allocate_item_set(unit.set.count);
|
||||
unit.set = allocate_item_set(part, unit.set.count);
|
||||
}
|
||||
|
||||
i32 index = 0;
|
||||
|
@ -1269,7 +1269,7 @@ compile_meta_unit(char *code_directory, char **files, Meta_Keywords *meta_keywor
|
|||
switch (type){
|
||||
case Item_Function:
|
||||
{
|
||||
if (function_parse(context, unit.set.items + index, cpp_name)){
|
||||
if (function_parse(part, context, unit.set.items + index, cpp_name)){
|
||||
Assert(unit.set.items[index].t == Item_Function);
|
||||
++index;
|
||||
}
|
||||
|
@ -1290,7 +1290,7 @@ compile_meta_unit(char *code_directory, char **files, Meta_Keywords *meta_keywor
|
|||
|
||||
case Item_Macro:
|
||||
{
|
||||
if (macro_parse(context, unit.set.items + index)){
|
||||
if (macro_parse(part, context, unit.set.items + index)){
|
||||
Assert(unit.set.items[index].t == Item_Macro);
|
||||
++index;
|
||||
}
|
||||
|
@ -1312,7 +1312,7 @@ compile_meta_unit(char *code_directory, char **files, Meta_Keywords *meta_keywor
|
|||
|
||||
case Item_Struct: case Item_Union: //struct/union
|
||||
{
|
||||
if (struct_parse((type == Item_Struct), context, unit.set.items + index)){
|
||||
if (struct_parse(part, (type == Item_Struct), context, unit.set.items + index)){
|
||||
Assert(unit.set.items[index].t == Item_Struct ||unit.set.items[index].t == Item_Union);
|
||||
++index;
|
||||
}
|
||||
|
@ -1323,7 +1323,7 @@ compile_meta_unit(char *code_directory, char **files, Meta_Keywords *meta_keywor
|
|||
|
||||
case Item_Enum: //ENUM
|
||||
{
|
||||
if (enum_parse(context, unit.set.items + index)){
|
||||
if (enum_parse(part, context, unit.set.items + index)){
|
||||
Assert(unit.set.items[index].t == Item_Enum);
|
||||
++index;
|
||||
}
|
||||
|
@ -1361,9 +1361,9 @@ compile_meta_unit(char *code_directory, char **files, Meta_Keywords *meta_keywor
|
|||
}
|
||||
|
||||
internal Meta_Unit
|
||||
compile_meta_unit(char *code_directory, char *file, Meta_Keywords *meta_keywords, i32 key_count){
|
||||
compile_meta_unit(Partition *part, char *code_directory, char *file, Meta_Keywords *meta_keywords, i32 key_count){
|
||||
char *file_array[2] = {file, 0};
|
||||
Meta_Unit unit = compile_meta_unit(code_directory, file_array, meta_keywords, key_count);
|
||||
Meta_Unit unit = compile_meta_unit(part, code_directory, file_array, meta_keywords, key_count);
|
||||
return(unit);
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue