From 4fd34688ba8bc6a02d74f83a249fe0a54432da0e Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Sat, 2 Jun 2018 16:02:14 -0700 Subject: [PATCH] Version 4.0.27 ready to ship --- 4coder_API/types.h | 5 ----- 4coder_API/version.h | 2 +- 4coder_generated/command_metadata.h | 20 ++++++++++---------- 4coder_project_commands.cpp | 7 +++++-- 4ed_api_implementation.cpp | 2 +- changes.txt | 16 ++++++++++++++++ platform_win32/win32_4ed.cpp | 6 ++++-- site/4ed_abstract_document.cpp | 4 ++-- site/source_material/binding_list.txt | 4 ++-- 9 files changed, 41 insertions(+), 25 deletions(-) diff --git a/4coder_API/types.h b/4coder_API/types.h index adc54623..e371fe04 100644 --- a/4coder_API/types.h +++ b/4coder_API/types.h @@ -869,11 +869,6 @@ ENUM(int32_t, Special_Hook_ID){ special_hook_buffer_name_resolver, }; -STRUCT Startup_Parameters{ - int32_t override_font_size; - bool32 override_hinting; -}; - TYPEDEF_FUNC int32_t Command_Caller_Hook_Function(struct Application_Links *app, Generic_Command cmd); #define COMMAND_CALLER_HOOK(name) int32_t name(struct Application_Links *app, Generic_Command cmd) diff --git a/4coder_API/version.h b/4coder_API/version.h index 634fbe84..2479ec9b 100644 --- a/4coder_API/version.h +++ b/4coder_API/version.h @@ -1,6 +1,6 @@ #define MAJOR 4 #define MINOR 0 -#define PATCH 26 +#define PATCH 27 // string #define VN__(a,b,c) #a "." #b "." #c diff --git a/4coder_generated/command_metadata.h b/4coder_generated/command_metadata.h index 1f1800b7..caeb1d77 100644 --- a/4coder_generated/command_metadata.h +++ b/4coder_generated/command_metadata.h @@ -232,7 +232,7 @@ static Command_Metadata fcoder_metacmd_table[196] = { { 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, 1000 }, +{ 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, 1003 }, { 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, 205 }, { 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 }, @@ -298,7 +298,7 @@ static Command_Metadata fcoder_metacmd_table[196] = { { 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, 800 }, { 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, 747 }, { 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, 759 }, -{ 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, 1023 }, +{ 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, 1026 }, { 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, 1101 }, { PROC_LINKS(miblo_decrement_basic, 0), "miblo_decrement_basic", 21, "Decrement an integer under the cursor by one.", 45, "C:\\work\\4ed\\code\\4coder_miblo_numbers.cpp", 45, 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, "C:\\work\\4ed\\code\\4coder_miblo_numbers.cpp", 45, 383 }, @@ -320,8 +320,8 @@ static Command_Metadata fcoder_metacmd_table[196] = { { 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, 571 }, { 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, 556 }, -{ 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, 1007 }, -{ 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, 1014 }, +{ 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, 1010 }, +{ 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, 1017 }, { PROC_LINKS(open_color_tweaker, 0), "open_color_tweaker", 18, "Opens the 4coder colors and fonts selector menu.", 48, "C:\\work\\4ed\\code\\4coder_base_commands.cpp", 45, 1457 }, { 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, 1320 }, { 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, 1465 }, @@ -338,8 +338,8 @@ static Command_Metadata fcoder_metacmd_table[196] = { { 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, 84 }, { 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, 135 }, { 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, 1030 }, -{ 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, 1055 }, +{ 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, 1033 }, +{ 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, 1058 }, { 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, 893 }, { 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, 913 }, { 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, 931 }, @@ -381,10 +381,10 @@ static Command_Metadata fcoder_metacmd_table[196] = { { 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, 1440 }, -{ 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, 1452 }, -{ 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, 1446 }, -{ 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, 1433 }, +{ 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, 1443 }, +{ 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, 1455 }, +{ 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, 1449 }, +{ 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, 1436 }, { 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 }, diff --git a/4coder_project_commands.cpp b/4coder_project_commands.cpp index 60767cac..9085cbe6 100644 --- a/4coder_project_commands.cpp +++ b/4coder_project_commands.cpp @@ -334,6 +334,9 @@ parse_project__config_data__version_1(Partition *arena, String root_dir, Config if (config_string_var(parsed, "project_name", 0, &str)){ project->name = push_string_copy(arena, str); } + else{ + project->name = make_lit_string(""); + } } // patterns @@ -1280,11 +1283,11 @@ project_generate_project_4coder_file(Partition *scratch, fprintf(out, "\"*.sh\",\n"); fprintf(out, "\"*.4coder\",\n"); fprintf(out, "};\n"); - fprintf(out, "patterns = {\n"); + fprintf(out, "blacklist_patterns = {\n"); fprintf(out, "\".*\",\n"); fprintf(out, "};\n"); fprintf(out, "load_paths_base = {\n"); - fprintf(out, " { \".\", .relative = true, .recursive = true, },"); + fprintf(out, " { \".\", .relative = true, .recursive = true, },\n"); fprintf(out, "};\n"); fprintf(out, "load_paths = {\n"); fprintf(out, " { load_paths_base, .os = \"win\", },\n"); diff --git a/4ed_api_implementation.cpp b/4ed_api_implementation.cpp index 07aef51d..207104d5 100644 --- a/4ed_api_implementation.cpp +++ b/4ed_api_implementation.cpp @@ -793,7 +793,7 @@ DOC_PARAM(buffer, The buffer on which to add the new markers.) DOC_PARAM(marker_count, How many markers to be stored in the new marker array.) DOC_PARAM(callback, A callback that will be called if the buffer closes with these markers still attached.) DOC_PARAM(user_data, A pointer to data that will be passed to the callback on close. The data will be copied so you do not need to manage it's lifetime.) -DOC_RETURN(user_data_size, The size of the data pointed to by user_data in bytes.) +DOC_PARAM(user_data_size, The size of the data pointed to by user_data in bytes.) DOC_RETURN(If this call succeeds it returns a handle to the new markers. If it fails it returns a null handle.) DOC(This call makes an allocation of markers for the specified buffer. The newly allocated markers are not immediately activated. To activate a marker use buffer_set_markers to give the marker a value. The markers will remain allocated on the buffer until buffer_remove_markers is called or until the buffer is killed.) DOC_SEE(Marker) diff --git a/changes.txt b/changes.txt index 8273342d..b3c912d8 100644 --- a/changes.txt +++ b/changes.txt @@ -1,4 +1,20 @@ +New in alpha 4.0.27: +-Project system upgraded to "version(1)" + Wildcard patterns for file loading + Load all files from multiple paths + Maintain a list of common command line commands for the project +-New commands: + + 'toggle fullscreen' toggle fullscreen mode + + 'new bat' create a batch script for building a particular source file + + 'new sh' create a shell script for building a particular source file + + 'new scripts' create a batch and shell script for building a particular source file +-Upgrade to config.4coder: + "default_font_size" set a font size to use (overriden by command line) + "default_font_hinting" default setting for hinting (overriden by command line) + "use_scroll_bars" the default setting for panel scroll bars + "use_file_bars" the default setting for panel file bars + New in alpha 4.0.26: Routine bug fixing... -Fixed various text input crash bugs diff --git a/platform_win32/win32_4ed.cpp b/platform_win32/win32_4ed.cpp index 64a77925..11aa09e8 100644 --- a/platform_win32/win32_4ed.cpp +++ b/platform_win32/win32_4ed.cpp @@ -784,7 +784,8 @@ win32_init_gl(HDC hdc){ PIXELFORMATDESCRIPTOR format = {0}; format.nSize = sizeof(format); format.nVersion = 1; - format.dwFlags = PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW | PFD_DOUBLEBUFFER; + //format.dwFlags = PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW | PFD_DOUBLEBUFFER; + format.dwFlags = PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW; format.iPixelType = PFD_TYPE_RGBA; format.cColorBits = 32; format.cAlphaBits = 8; @@ -836,7 +837,8 @@ win32_init_gl(HDC hdc){ WGL_DRAW_TO_WINDOW_ARB, TRUE, WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB, WGL_SUPPORT_OPENGL_ARB, TRUE, - WGL_DOUBLE_BUFFER_ARB, GL_TRUE, + //WGL_DOUBLE_BUFFER_ARB, TRUE, + WGL_DOUBLE_BUFFER_ARB, FALSE, WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB, 0, }; diff --git a/site/4ed_abstract_document.cpp b/site/4ed_abstract_document.cpp index 15ef10e3..484c8149 100644 --- a/site/4ed_abstract_document.cpp +++ b/site/4ed_abstract_document.cpp @@ -1307,11 +1307,11 @@ output_end_list(String *out){ internal void output_begin_item(String *out, Section_Counter *section_counter){ if (section_counter->list_item_counter == 0){ - append(out, "
  • "); + append(out, "
  • "); section_counter->list_item_counter = 1; } else{ - append(out, "
  • "); + append(out, "
  • "); section_counter->list_item_counter = 0; } } diff --git a/site/source_material/binding_list.txt b/site/source_material/binding_list.txt index c65bcc34..4a53694d 100644 --- a/site/source_material/binding_list.txt +++ b/site/source_material/binding_list.txt @@ -34,7 +34,7 @@ The following bindings apply in all situations. \ITEM \STYLE{code} \END Change the currently active panel, moving to the panel with the next lowest view_id. \ITEM \STYLE{code} \END Interactively creates a new file. \ITEM \STYLE{code} \END Interactively opens or creates a new file. -\ITEM \STYLE{code} \END Switches to the next active panel and begins an open file dialogue. +\ITEM \STYLE{code} \END Interactively opens a file in the other panel. \ITEM \STYLE{code} \END Interactively kill an open buffer. \ITEM \STYLE{code} \END Interactively switch to an open buffer. \ITEM \STYLE{code} \END Changes 4coder's hot directory to the root directory of the currently loaded project. With no loaded project nothing hapepns. @@ -194,7 +194,7 @@ The following bindings apply in all situations. \ITEM \STYLE{code} \END Change the currently active panel, moving to the panel with the next lowest view_id. \ITEM \STYLE{code} \END Interactively creates a new file. \ITEM \STYLE{code} \END Interactively opens or creates a new file. -\ITEM \STYLE{code} \END Switches to the next active panel and begins an open file dialogue. +\ITEM \STYLE{code} \END Interactively opens a file in the other panel. \ITEM \STYLE{code} \END Interactively kill an open buffer. \ITEM \STYLE{code} \END Interactively switch to an open buffer. \ITEM \STYLE{code} \END Changes 4coder's hot directory to the root directory of the currently loaded project. With no loaded project nothing hapepns.