Changed off bool32 int32_t uint32_t; Frame_Info, and Render_Parameters structures

master
Allen Webster 2019-02-26 15:08:42 -08:00
parent 0bc8ee17f9
commit 632e2bf9cd
45 changed files with 2291 additions and 2273 deletions

View File

@ -13,9 +13,6 @@
#endif
/* DOC(bool32 is an alias name to signal that an integer parameter or field is for true/false values.) */
TYPEDEF int32_t bool32;
/* DOC(argb_color is an alias name to signal that an integer parameter or field is for a color value,
colors are specified as 32 bit integers with 4 channels: 0xAARRGGBB.) */
TYPEDEF u32 argb_color;
@ -25,18 +22,18 @@ TYPEDEF u32 int_color;
TYPEDEF u16 id_color;
/* DOC(Parse_Context_ID identifies a parse context, which is a guiding rule for the parser. Each buffer sets which parse context to use when it is parsed.) */
TYPEDEF uint32_t Parse_Context_ID;
TYPEDEF u32 Parse_Context_ID;
/* DOC(Buffer_ID is used to name a 4coder buffer. Each buffer has a unique id but when a buffer is closed it's id may be recycled by future, different buffers.) */
TYPEDEF int32_t Buffer_ID;
TYPEDEF i32 Buffer_ID;
/* DOC(View_ID is used to name a 4coder view. Each view has a unique id in the interval [1,16].) */
TYPEDEF int32_t View_ID;
TYPEDEF i32 View_ID;
TYPEDEF int32_t Panel_ID;
TYPEDEF i32 Panel_ID;
/* DOC(A Key_Modifier_Index acts as an index for specifying modifiers in arrays.) */
ENUM(int32_t, Key_Modifier_Index){
ENUM(i32, Key_Modifier_Index){
MDFR_SHIFT_INDEX,
MDFR_CONTROL_INDEX,
MDFR_ALT_INDEX,
@ -54,7 +51,7 @@ ENUM(int32_t, Key_Modifier_Index){
/* DOC(A Key_Modifier_Flag field is used to specify a specific state of modifiers.
Flags can be combined with bit or to specify a state with multiple modifiers.) */
ENUM(uint32_t, Key_Modifier_Flag){
ENUM(u32, Key_Modifier_Flag){
/* DOC(MDFR_NONE specifies that no modifiers are pressed.) */
MDFR_NONE = 0x0,
MDFR_CTRL = 0x1,
@ -64,7 +61,7 @@ ENUM(uint32_t, Key_Modifier_Flag){
};
/* DOC(Flags for describing the memory protection status of pages that come back from memory allocate. Some combinations may not be available on some platforms, but you are gauranteed to get back a page with at least the permissions you requested. For example if you request just write permission, you may get back a page with read and write permission, but you will never get back a page that doesn't have write permission.) */
ENUM(uint32_t, Memory_Protect_Flags){
ENUM(u32, Memory_Protect_Flags){
/* DOC(Allows the page to be read.) */
MemProtect_Read = 0x1,
/* DOC(Allows the page to be written.) */
@ -74,7 +71,7 @@ ENUM(uint32_t, Memory_Protect_Flags){
};
/* DOC(A Wrap_Indicator_Mode is used in the buffer setting BufferSetting_WrapIndicator to specify how to indicate that line has been wrapped.) */
ENUM(int32_t, Wrap_Indicator_Mode){
ENUM(i32, Wrap_Indicator_Mode){
/* DOC(WrapIndicator_Hide tells the buffer rendering system not to put any indicator on wrapped lines.) */
WrapIndicator_Hide,
@ -86,7 +83,7 @@ ENUM(int32_t, Wrap_Indicator_Mode){
};
/* DOC(A Global_Setting_ID names a setting.) */
ENUM(int32_t, Global_Setting_ID){
ENUM(i32, Global_Setting_ID){
/* DOC(GlobalSetting_Null is not a valid setting, it is reserved to detect errors.) */
GlobalSetting_Null,
@ -95,7 +92,7 @@ ENUM(int32_t, Global_Setting_ID){
};
/* DOC(A Buffer_Setting_ID names a setting in a buffer.) */
ENUM(int32_t, Buffer_Setting_ID){
ENUM(i32, Buffer_Setting_ID){
/* DOC(BufferSetting_Null is not a valid setting, it is reserved to detect errors.) */
BufferSetting_Null,
@ -140,7 +137,7 @@ ENUM(int32_t, Buffer_Setting_ID){
};
/* DOC(A View_Setting_ID names an adjustable setting in a view.) */
ENUM(int32_t, View_Setting_ID){
ENUM(i32, View_Setting_ID){
/* DOC(ViewSetting_Null is not a valid setting, it is reserved to detect errors.) */
ViewSetting_Null,
@ -158,7 +155,7 @@ ENUM(int32_t, View_Setting_ID){
};
/* DOC(A Buffer_Create_Flag field specifies how a buffer should be created.) */
ENUM(uint32_t, Buffer_Create_Flag){
ENUM(u32, Buffer_Create_Flag){
/* DOC(BufferCreate_Background is not currently implemented.) */
BufferCreate_Background = 0x1,
/* DOC(When BufferCreate_AlwaysNew is set it indicates the buffer should be cleared to empty even if it's associated file already has content.) */
@ -180,28 +177,28 @@ HIDE_MEMBERS() */
STRUCT Buffer_Creation_Data{
Buffer_Create_Flag flags;
char fname_space [256];
int32_t fname_len;
i32 fname_len;
};
/* DOC(A Buffer_Save_Flag field specifies buffer saving behavior.) */
ENUM(uint32_t, Buffer_Save_Flag){
ENUM(u32, Buffer_Save_Flag){
/* DOC(BufferSave_IgnoreDirtyFlag tells the save procedure not to check the dirty flag of the buffer. Usually buffers not marked dirty will not be saved, but sometimes it is useful to force it to save anyway. ) */
BufferSave_IgnoreDirtyFlag = 0x1,
};
/* DOC(A Buffer_Kill_Flag field specifies how a buffer should be killed.) */
ENUM(uint32_t, Buffer_Kill_Flag){
ENUM(u32, Buffer_Kill_Flag){
/* DOC(When BufferKill_AlwaysKill is set it indicates the buffer should be killed
without asking, even when the buffer is dirty.) */
BufferKill_AlwaysKill = 0x2,
};
/* DOC(A Buffer_Reopen_Flag field specifies how a buffer should be reopened -- currently no flags are provided.) */
ENUM(uint32_t, Buffer_Reopen_Flag){};
ENUM(u32, Buffer_Reopen_Flag){};
/* DOC(A status enumeration returned by kill_buffer.)
DOC_SEE(kill_buffer) */
ENUM(int32_t, Buffer_Kill_Result){
ENUM(i32, Buffer_Kill_Result){
/* DOC(The buffer was successfully killed.) */
BufferKillResult_Killed = 0,
/* DOC(The buffer was not killed because it is dirty. This can be overriden with the flag BufferKill_AlwaysKill. This result is usually followed up by launching a "sure to kill" dialogue, but that is entirely optional.) */
@ -214,7 +211,7 @@ ENUM(int32_t, Buffer_Kill_Result){
/* DOC(A status enumeration returned by reopen_buffer.)
DOC_SEE(kill_buffer) */
ENUM(int32_t, Buffer_Reopen_Result){
ENUM(i32, Buffer_Reopen_Result){
/* DOC(The buffer was successfully reopened.) */
BufferReopenResult_Reopened = 0,
/* DOC(The buffer was not reopened, because either the buffer has no attached file, or the attached file could not be loaded.) */
@ -222,7 +219,7 @@ ENUM(int32_t, Buffer_Reopen_Result){
};
/* DOC(An Access_Flag field specifies what sort of permission you grant to an access call. An access call is usually one the returns a summary struct. If a 4coder object has a particular protection flag set and the corresponding bit is not set in the access field, that 4coder object is hidden. On the other hand if a protection flag is set in the access parameter and the object does not have that protection flag, the object is still returned from the access call.) */
ENUM(uint32_t, Access_Flag){
ENUM(u32, Access_Flag){
/* DOC(AccessOpen does not include any bits, it indicates that the access should only return objects that have no protection flags set.) */
AccessOpen = 0x0,
/* DOC(AccessProtected is set on buffers and views that are "read only" such as the output from an exec_system_command call into *build*. This is to prevent the user from accidentally editing output that they might prefer to keep in tact.) */
@ -236,7 +233,7 @@ ENUM(uint32_t, Access_Flag){
/* DOC(A Dirty_State value describes whether changes have been made to a buffer or to an underlying
file since the last sync time between the two. Saving a buffer to it's file or loading the buffer
from the file both act as sync points.) */
ENUM(uint32_t, Dirty_State){
ENUM(u32, Dirty_State){
/* DOC(DirtyState_UpToDate indicates that there are no unsaved changes and the underlying
system file still agrees with the buffer's state.) */
DirtyState_UpToDate = 0,
@ -254,7 +251,7 @@ the last sync point .) */
};
/* DOC(A Seek_Boundary_Flag field specifies a set of "boundary" types used in seeks for the beginning or end of different types of words.) */
ENUM(uint32_t, Seek_Boundary_Flag){
ENUM(u32, Seek_Boundary_Flag){
BoundaryWhitespace = 0x1,
BoundaryToken = 0x2,
BoundaryAlphanumeric = 0x4,
@ -262,7 +259,7 @@ ENUM(uint32_t, Seek_Boundary_Flag){
};
/* DOC(A Command_Line_Interface_Flag field specifies the behavior of a call to a command line interface.) */
ENUM(uint32_t, Command_Line_Interface_Flag){
ENUM(u32, Command_Line_Interface_Flag){
/* DOC(If CLI_OverlapWithConflict is set if output buffer of the new command is already in use by another command which is still executing, the older command relinquishes control of the buffer and both operate simultaneously with only the newer command outputting to the buffer.) */
CLI_OverlapWithConflict = 0x1,
/* DOC(If CLI_AlwaysBindToView is set the output buffer will always be set in the active view even if it is already set in another open view.) */
@ -272,7 +269,7 @@ ENUM(uint32_t, Command_Line_Interface_Flag){
};
/* DOC(An Auto_Indent_Flag field specifies the behavior of an auto indentation operation.) */
ENUM(uint32_t, Auto_Indent_Flag){
ENUM(u32, Auto_Indent_Flag){
/* DOC(If AutoIndent_ClearLine is set, then any line that is only whitespace will be cleared to contain nothing at all, otherwise the line is filled with whitespace to match the nearby indentation.) */
AutoIndent_ClearLine = 0x1,
/* DOC(If AutoIndent_UseTab is set, then when putting in leading whitespace to align code, as many tabs will be used as possible until the fine grained control of spaces is needed to finish the alignment.) */
@ -284,7 +281,7 @@ ENUM(uint32_t, Auto_Indent_Flag){
};
/* DOC(A Set_Buffer_Flag field specifies the behavior of an operation that sets the buffer of a view.) */
ENUM(uint32_t, Set_Buffer_Flag){
ENUM(u32, Set_Buffer_Flag){
/* DOC(If SetBuffer_KeepOriginalGUI then when the file is set, the view will not switch to it
if some other GUI was currently up, otherwise any GUI that is up is closed and the view
switches to the file.) */
@ -292,7 +289,7 @@ ENUM(uint32_t, Set_Buffer_Flag){
};
/* DOC(A Input_Type_Flag field specifies a set of input event types.) */
ENUM(uint32_t, Input_Type_Flag){
ENUM(u32, Input_Type_Flag){
/* DOC(If EventOnAnyKey is set, all keyboard events are included in the set.) */
EventOnAnyKey = 0x1,
/* DOC(If EventOnEsc is set, any press of the escape key is included in the set.) */
@ -317,7 +314,7 @@ ENUM(uint32_t, Input_Type_Flag){
};
/* DOC(A Mouse_Cursor_Show_Type value specifes a mode for 4coder to handle the mouse cursor.) */
ENUM(int32_t, Mouse_Cursor_Show_Type){
ENUM(i32, Mouse_Cursor_Show_Type){
/* DOC(The MouseCursorShow_Never mode never shows the cursor.) */
MouseCursorShow_Never,
/* DOC(The MouseCursorShow_Never mode always shows the cursor.) */
@ -327,7 +324,7 @@ ENUM(int32_t, Mouse_Cursor_Show_Type){
};
/* DOC(A View_Split_Position specifies where a new view should be placed as a result of a view split operation.) */
ENUM(int32_t, View_Split_Position){
ENUM(i32, View_Split_Position){
/* DOC(This value indicates that the new view should be above the existing view.) */
ViewSplit_Top,
/* DOC(This value indicates that the new view should be below the existing view.) */
@ -338,25 +335,25 @@ ENUM(int32_t, View_Split_Position){
ViewSplit_Right,
};
ENUM(int32_t, Panel_Split_Kind){
ENUM(i32, Panel_Split_Kind){
PanelSplitKind_Ratio_Min = 0,
PanelSplitKind_Ratio_Max = 1,
PanelSplitKind_FixedPixels_Min = 2,
PanelSplitKind_FixedPixels_Max = 3,
};
ENUM(int32_t, Panel_Split_Orientation){
ENUM(i32, Panel_Split_Orientation){
PanelSplit_LeftAndRight = 0,
PanelSplit_TopAndBottom = 1,
};
ENUM(int32_t, Panel_Child){
ENUM(i32, Panel_Child){
PanelChild_Min = 0,
PanelChild_Max = 1,
};
/* DOC(Key_Code is the alias for key codes including raw codes and codes translated to textual input that takes modifiers into account.) */
TYPEDEF uint32_t Key_Code;
TYPEDEF u32 Key_Code;
/* DOC(Key_Modifier is the alias for flags that represent keyboard modifiers, ctrl, alt, shift, etc.)
DOC_SEE(Key_Modifier_Flag) */
@ -401,13 +398,13 @@ STRUCT Mouse_State{
/* DOC(Mouse is outside of the window.) */
int8_t out_of_window;
/* DOC(The motion of the wheel. Zero indicates no motion. Positive indicates downard scrolling. Negative indicates upward scrolling. The magnitude corresponds to the number of pixels of scroll that would be applied at standard scroll speeds.) */
int32_t wheel;
i32 wheel;
UNION{
STRUCT{
/* DOC(X position of the mouse where the left of the window is x = 0, and x grows to the right.) */
int32_t x;
i32 x;
/* DOC(Y position of the mouse where the top of the window is y = 0, and y grows to downward.) */
int32_t y;
i32 y;
};
/* DOC(TODO) */
Vec2_i32 p;
@ -420,21 +417,21 @@ Throughout the API ranges are thought of in the form [min,max) where max is "one
UNION Range{
STRUCT{
/* DOC(This is the smaller value in the range.) */
int32_t min;
i32 min;
/* DOC(This is the larger value in the range.) */
int32_t max;
i32 max;
};
STRUCT{
/* DOC(This is the start of the range, unioned with min.) */
int32_t start;
i32 start;
/* DOC(This is the end of the range, unioned with max.) */
int32_t end;
i32 end;
};
STRUCT{
/* DOC(This is the first value in the range, unioned with min.) */
int32_t first;
i32 first;
/* DOC(This is one_past_the_last value in the range, unioned with max.) */
int32_t one_past_last;
i32 one_past_last;
};
};
@ -443,7 +440,7 @@ STRUCT Range_Array{
/* DOC(A pointer to the array of ranges.) */
Range *ranges;
/* DOC(The number of ranges in the array.) */
int32_t count;
i32 count;
};
/* DOC(Parser_String_And_Type contains a string and type integer used to specify information about keywords to the parser.) */
@ -451,9 +448,9 @@ STRUCT Parser_String_And_Type{
/* DOC(The string specified by the pair, it need not be null terminated.) */
char *str;
/* DOC(The number of bytes in the string str.) */
uint32_t length;
u32 length;
/* DOC(The type integer.) */
uint32_t type;
u32 type;
};
/* DOC(Microsecond_Time_Stamp is a typedef of an unsigned 64 bit integer used to signify that the value is an arbitrary for a moment in time.) */
@ -467,9 +464,9 @@ STRUCT File_Info{
/* DOC(This field is a null terminated string specifying the name of the file.) */
char *filename;
/* DOC(This field specifies the length of the filename string not counting the null terminator.) */
int32_t filename_len;
i32 filename_len;
/* DOC(This field indicates that the description is for a folder not a file.) */
bool32 folder;
b32 folder;
};
/* DOC(File_List is a list of File_Info structs.)
@ -480,9 +477,9 @@ STRUCT File_List{
/* DOC(This field is an array of File_Info structs.) */
File_Info *infos;
/* DOC(This field specifies the number of struts in the info array.) */
uint32_t count;
u32 count;
/* DOC(This field is for internal use.) */
uint32_t block_size;
u32 block_size;
};
/* DOC(Buffer_Identifier acts as a loosely typed description of a buffer that can either be a name or an id.) */
@ -490,7 +487,7 @@ STRUCT Buffer_Identifier{
/* DOC(This field is the name of the buffer; it need not be null terminated. If id is specified this pointer should be NULL.) */
char *name;
/* DOC(This field specifies the length of the name string.) */
int32_t name_len;
i32 name_len;
/* DOC(This field is the id of the buffer. If name is specified this should be 0.) */
Buffer_ID id;
};
@ -523,7 +520,7 @@ STRUCT GUI_Scroll_Vars{
DOC_SEE(Buffer_Seek)
DOC_SEE(4coder_Buffer_Positioning_System)
*/
ENUM(int32_t, Buffer_Seek_Type){
ENUM(i32, Buffer_Seek_Type){
/* DOC(This value indicates absolute byte index positioning
where positions are measured as the number of bytes from the start of the file.) */
buffer_seek_pos,
@ -548,11 +545,11 @@ STRUCT Buffer_Seek{
UNION{
STRUCT {
/* DOC(The pos field specified the pos when the seek is in absolute position.) */
int32_t pos;
i32 pos;
};
STRUCT {
/* DOC(For xy coordinate seeks, rounding down means that any x in the box of the character lands on that character. For instance when clicking rounding down is the user's expected behavior. Not rounding down means that the right hand portion of the character's box, which is closer to the next character, will land on that next character. The unrounded behavior is the expected behavior when moving vertically and keeping the preferred x.) */
bool32 round_down;
b32 round_down;
/* DOC(The x coordinate for xy type seeks.) */
float x;
/* DOC(The y coordinate for xy type seeks.) */
@ -560,9 +557,9 @@ STRUCT Buffer_Seek{
};
STRUCT {
/* DOC(The line number of a line-character type seek.) */
int32_t line;
i32 line;
/* DOC(The character number of a line-character type seek.) */
int32_t character;
i32 character;
};
};
};
@ -571,15 +568,15 @@ STRUCT Buffer_Seek{
DOC_SEE(4coder_Buffer_Positioning_System) */
STRUCT Full_Cursor{
/* DOC(This field contains the cursor's position in absolute byte index positioning.) */
int32_t pos;
i32 pos;
/* DOC(This field contains the cursor's position in apparent character index positioning.) */
int32_t character_pos;
i32 character_pos;
/* DOC(This field contains the number of the line where the cursor is located. This field is one based.) */
int32_t line;
i32 line;
/* DOC(This field contains the number of the character from the beginninf of the line where the cursor is located. This field is one based.) */
int32_t character;
i32 character;
/* DOC(This field contains the number of the line where the cursor is located, taking the line wrapping into account. This field is one based.) */
int32_t wrap_line;
i32 wrap_line;
/* DOC(This field contains the x position measured with unwrapped lines.) */
float unwrapped_x;
/* DOC(This field contains the y position measured with unwrapped lines.) */
@ -594,15 +591,15 @@ STRUCT Full_Cursor{
DOC_SEE(4coder_Buffer_Positioning_System) */
STRUCT Partial_Cursor{
/* DOC(This field contains the cursor's position in absolute byte index positioning.) */
int32_t pos;
i32 pos;
/* DOC(This field contains the number of the character from the beginninf of the line
where the cursor is located. This field is one based.) */
int32_t line;
i32 line;
/* DOC(This field contains the number of the column where the cursor is located. This field is one based.) */
int32_t character;
i32 character;
};
TYPEDEF_FUNC bool32 Buffer_Edit_Handler(struct Application_Links *app, Buffer_ID buffer_id, int32_t start, int32_t one_past_last, String str);
TYPEDEF_FUNC b32 Buffer_Edit_Handler(struct Application_Links *app, Buffer_ID buffer_id, i32 start, i32 one_past_last, String str);
// TODO(allen): what to do with batches???
STRUCT File_Attributes{
@ -615,11 +612,11 @@ DOC_SEE(Access_Flag)
DOC_SEE(Dirty_State) */
STRUCT Buffer_Summary{
/* DOC(This field indicates whether the Buffer_Summary describes a buffer that is open in 4coder. When this field is false the summary is referred to as a "null summary".) */
bool32 exists;
b32 exists;
/* DOC(If this is not a null summary, this field indicates whether the buffer has finished loading.) */
bool32 ready;
b32 ready;
/* DOC(If this is not a null summary this field is the id of the associated buffer. If this is a null summary then buffer_id is 0.) */
int32_t buffer_id;
i32 buffer_id;
/* DOC(If this is not a null summary, this field contains flags describing the protection status of the buffer.) */
Access_Flag lock_flags;
@ -627,31 +624,31 @@ STRUCT Buffer_Summary{
Buffer_Edit_Handler *edit_handler;
/* DOC(If this is not a null summary, this field specifies the number of bytes in the buffer.) */
int32_t size;
i32 size;
/* DOC(If this is not a null summary, this field specifies the number of lines in the buffer.) */
int32_t line_count;
i32 line_count;
/* DOC(If this is not a null summary, this field specifies the file name associated to this buffer.) */
char *file_name;
/* DOC(This field specifies the length of the file_name string.) */
int32_t file_name_len;
i32 file_name_len;
/* DOC(If this is not a null summary, this field specifies the name of the buffer.) */
char *buffer_name;
/* DOC(This field specifies the length of the buffer_name string.) */
int32_t buffer_name_len;
i32 buffer_name_len;
/* DOC(This field indicates the dirty state of the buffer.) */
Dirty_State dirty;
/* DOC(If this is not a null summary, this field indicates whether the buffer is set to lex tokens.) */
bool32 is_lexed;
b32 is_lexed;
/* DOC(If this is not a null summary, this field indicates whether the buffer has up to date tokens available. If this field is false, it may simply mean the tokens are still being generated in a background task and will be available later. If that is the case, is_lexed will be true to indicate that the buffer is trying to get it's tokens up to date.) */
bool32 tokens_are_ready;
b32 tokens_are_ready;
/* DOC(If this is not a null summary, this field specifies the id of the command map for this buffer.) */
int32_t map_id;
i32 map_id;
/* DOC(If this is not a null summary, this field indicates whether the buffer 'prefers' wrapped lines.) */
bool32 unwrapped_lines;
b32 unwrapped_lines;
};
/*
@ -660,9 +657,9 @@ DOC_SEE(buffer_add_markers)
*/
STRUCT Marker{
/* DOC(The current position of the marker measure in absolute byte positioning coordinates.) */
int32_t pos;
i32 pos;
/* DOC(When a marker is inside a range that gets edited, by default the marker 'leans_left' which means it goes to the beginning of the edited range. If the field lean_right is set to true, the marker will lean right with edits and will go to the end of edited range.) */
bool32 lean_right;
b32 lean_right;
};
@ -672,11 +669,11 @@ DOC_SEE(Full_Cursor)
DOC_SEE(GUI_Scroll_Vars) */
STRUCT View_Summary{
/* DOC(This field indicates whether the View_Summary describes a view that is open in 4coder. When this field is false the summary is referred to as a "null summary". ) */
bool32 exists;
b32 exists;
/* DOC(This field is the id of the associated view. If this is a null summary then view_id is 0. ) */
int32_t view_id;
i32 view_id;
/* DOC(Then this is the id of the buffer this view currently sees.) */
int32_t buffer_id;
i32 buffer_id;
/* DOC(This field contains flags describing the protection status of the view.) */
Access_Flag lock_flags;
@ -689,9 +686,9 @@ STRUCT View_Summary{
/* DOC(This specifies the height of a line rendered in the view.) */
float line_height;
/* DOC(This indicates that the view is set to render with unwrapped lines.) */
bool32 unwrapped_lines;
b32 unwrapped_lines;
/* DOC(This indicates that the view is set to highlight white space.) */
bool32 show_whitespace;
b32 show_whitespace;
/* DOC(This describes the screen position in which this view is displayed.) */
i32_Rect view_region;
@ -704,7 +701,7 @@ STRUCT View_Summary{
};
/* DOC(The enumeration of types of managed objects.) */
ENUM(int32_t, Managed_Object_Type)
ENUM(i32, Managed_Object_Type)
{
/* DOC(This type value indicates that the specified object for an operation is not a valid managed object.
A handle for a managed object can "go bad" when it's scope is cleared, or when it is freed, so it is possible to store handles and check them for validity on use. However, all managed object APIs do the necessary checks on their parameters and return appropriate failure results on bad handles.) */
@ -724,7 +721,7 @@ A handle for a managed object can "go bad" when it's scope is cleared, or when i
TYPEDEF uint64_t Managed_Scope;
/* DOC(An id refering to a managed variable. Managed variables are created globally, but each managed scope has it's own set of values for the managed variables. Managed variables are created via a unique string. Attempting to create a variable with the same name as an existing variable fails. When naming variables it is recommended that you place a 'module name' followed by a '.' and then a descriptive variable name to distinguish your variables from variables written by other 4coder users that might someday need to work together in the same configuration. Example: "MyUniqueCustomization.variable_name"). The variable's id is used to set and get the value from managed scopes. */
TYPEDEF int32_t Managed_Variable_ID;
TYPEDEF i32 Managed_Variable_ID;
/* DOC(A handle to a managed object. Managed objects have various behaviors and special uses depending on their type. All managed objects share the property of being tied to a managed scope, so that they are cleaned up and freed when that scope's contents are cleared or when the scope is destroyed, they all support store and load operations, although not all with the exact same meanings and implications, and they can all be freed individually instead of with the entire scope.) */
TYPEDEF uint64_t Managed_Object;
@ -742,8 +739,8 @@ DOC_SEE(Marker_Visual_Priority_Level)
*/
STRUCT Marker_Visual{
Managed_Scope scope;
uint32_t slot_id;
uint32_t gen_id;
u32 slot_id;
u32 gen_id;
};
/*
@ -764,7 +761,7 @@ Single marked effects use each marker to specify a single point at which an effe
In range marked effects, two conflicting effects with the same priority level are further resolved by prefering the effect with the higher-index starting position. This means that if range A completely contains range B and they have the same priority level, then range B will be visible, and range A will be visible wherever range B is not.
)
*/
ENUM(int32_t, Marker_Visual_Type)
ENUM(i32, Marker_Visual_Type)
{
/* DOC(No visual effect, with this type it is as if the marker visual does not exist.) */
VisualType_Invisible = 0,
@ -796,7 +793,7 @@ This is a line oriented highlight style range marked effect.) */
};
/* DOC(Special codes that can be used as the color aspects of marker visual effects. These special codes are for convenience and in some cases effects that could not be expressed as 32-bit colors.) */
ENUM(uint32_t, Marker_Visual_Symbolic_Color)
ENUM(u32, Marker_Visual_Symbolic_Color)
{
/* DOC(When default is used for text_color aspect, the text is unchanged from the coloring the core would apply to it. For all effects, the default value of the color aspect for all effects is the same as transparent. For convenience it is guaranteed this will always be the zero value, so that users may simply pass 0 to color aspects they do not wish to set.) */
SymbolicColor_Default = 0,
@ -805,7 +802,7 @@ ENUM(uint32_t, Marker_Visual_Symbolic_Color)
};
/* DOC(Not implemented, but reserved for future use. Where this type is used in the API the value passed should always be zero for now.) */
ENUM(int32_t, Marker_Visual_Text_Style)
ENUM(i32, Marker_Visual_Text_Style)
{
MARKER_TEXT_STYLE_NOT_YET_IMPLEMENTED,
};
@ -813,19 +810,19 @@ ENUM(int32_t, Marker_Visual_Text_Style)
/* DOC(The take rule of a marker visual specifies how to iterate the markers in the marker object when applying the visual effect. For range marked effects, which use a pair of markers to specify a left inclusive right exclusive range, it is not necessary that two markers be adjacent in the marker object when they are taken. The first taken marker is paired to the second taken marker, the third to the fourth, etc, regardless of any gaps between the consecutively taken markers. If the take rule overflows the marker object, the effect is still applied, but the iteration is cut short as soon as it would overflow.) */
STRUCT Marker_Visual_Take_Rule{
/* DOC(The index of the first marker to take. Indices are zero based. The default value is zero.) */
int32_t first_index;
i32 first_index;
/* DOC(From the start of a "step" take_count_per_step markers. Markers taken in the same step have consectuive indices. For example, if the first marker taken has index = 0, and the take_count_per_step = 2, then the second marker taken will have index = 1. The default value is 1.) */
int32_t take_count_per_step;
i32 take_count_per_step;
/* DOC(The stride between each "step". After taking take_count_per_step markers from the current step, the iteation advances to the next step counting from the start of current step. So if 2 markers are taken per step, and the stride is 3, then the pattern of taken markers will be **.**.**.**. where * is a tken marker. The core automatically adjusts this field to be at least equal to take_count_per_step before using it to iterate. The default value is 1.) */
int32_t step_stride_in_marker_count;
i32 step_stride_in_marker_count;
/* DOC(The maximum number of markers to be taken durring iteration. Since overflow does not cause the visual effect to fail, and is prevented internally, this field can be set to the max value of a signed 32-bit integer and will take as many markers as possible until it hits the end of the marker object. If the maximum count is reached mid-step, the iteration stops without completeing the step.) */
int32_t maximum_number_of_markers;
i32 maximum_number_of_markers;
};
/* DOC(A helper enumeration for common priority levels. Although any unsigned integer is a valid priority level, the following five levels are used to establish a standard convention. Highest priority is given to effects immediately at the cursor, mark, and highlighted range. Default priority is given to actively attached effects like compilation error highlights. Passive effects like scope highlighting go to Lowest priority.
This system is considered a temporary measure and will eventually be replaced with a priority level brokering system to enable cooperation between modules [note made 4.0.29].) */
ENUM(uint32_t, Marker_Visual_Priority_Level){
ENUM(u32, Marker_Visual_Priority_Level){
VisualPriority_Lowest = 0,
VisualPriority_Low = 1000,
VisualPriority_Default = 2000,
@ -834,7 +831,7 @@ ENUM(uint32_t, Marker_Visual_Priority_Level){
};
/* DOC(Flags that control how font glyphs are modified before drawing.) */
ENUM(uint32_t, Glyph_Flag){
ENUM(u32, Glyph_Flag){
GlyphFlag_None = 0x0,
GlyphFlag_Rotate90 = 0x1,
};
@ -877,13 +874,13 @@ DOC_SEE(get_available_font)
*/
STRUCT Available_Font{
char name[64];
bool32 in_local_font_folder;
b32 in_local_font_folder;
};
/*
DOC(Every face is assigned a unique and consistent Face_ID for it's life time. This represents a slot in which a face can exist. The face in the slot is always valid once it exists, but the face might be changed or released durring it's lifetime. A Face_ID value of zero is reserved for the meaning "not a valid face".)
*/
TYPEDEF uint32_t Face_ID;
TYPEDEF u32 Face_ID;
/*
DOC(Face_Description contains all the information unique to a single font face, including the font name, the size, and style of the face.)
@ -894,23 +891,23 @@ STRUCT Face_Description{
Available_Font font;
/* DOC(Indicates the size for the face. Valid values must be greater than 0. Different fonts with the same pt_size do not necessarily have the same line height.) */
int32_t pt_size;
i32 pt_size;
/* DOC(Indicates whether the face tries to use a bold style.) */
bool32 bold;
b32 bold;
/* DOC(Indicates whether the face tries to use an italic style.) */
bool32 italic;
b32 italic;
/* DOC(Indicates whether the face tries to underline text.) */
bool32 underline;
b32 underline;
/* DOC(Indicates whether the face tries to apply hinting.) */
bool32 hinting;
b32 hinting;
};
/* DOC(A Buffer_Batch_Edit_Type is a type of batch operation.) */
ENUM(int32_t, Buffer_Batch_Edit_Type){
ENUM(i32, Buffer_Batch_Edit_Type){
/* DOC(The BatchEdit_Normal operation is always correct but does the most work if there are tokens to correct.) */
BatchEdit_Normal,
/* DOC(The BatchEdit_PreserveTokens operation is one in which none of the edits add, delete, or change any tokens. This usually applies when whitespace is being replaced with whitespace.) */
@ -921,13 +918,13 @@ ENUM(int32_t, Buffer_Batch_Edit_Type){
text that will be replaced into the buffer.) */
STRUCT Buffer_Edit{
/* DOC(The str_start field specifies the first character in the accompanying string that corresponds with this edit.) */
int32_t str_start;
i32 str_start;
/* DOC(The len field specifies the length of the string being written into the buffer.) */
int32_t len;
i32 len;
/* DOC(The start field specifies the start of the range in the buffer to replace in absolute position.) */
int32_t start;
i32 start;
/* DOC(The end field specifies one past the end of the range in the buffer to replace in absolute position.) */
int32_t end;
i32 end;
};
/*
@ -939,21 +936,21 @@ STRUCT Buffer_Batch_Edit{
/* DOC(The pointer to the edit string buffer.) */
char *str;
/* DOC(The length of the edit string buffer.) */
int32_t str_len;
i32 str_len;
/* DOC(The array of edits to be applied.) */
Buffer_Edit *edits;
/* DOC(The number of edits in the array.) */
int32_t edit_count;
i32 edit_count;
};
ENUM(int32_t, Record_Kind){
ENUM(i32, Record_Kind){
RecordKind_Single,
RecordKind_Batch,
RecordKind_Group,
};
ENUM(int32_t, Record_Error){
ENUM(i32, Record_Error){
RecordError_NoError,
RecordError_InvalidBuffer,
RecordError_NoHistoryAttached,
@ -962,30 +959,30 @@ ENUM(int32_t, Record_Error){
RecordError_WrongRecordTypeAtIndex,
};
ENUM(uint32_t, Record_Merge_Flag){
ENUM(u32, Record_Merge_Flag){
RecordMergeFlag_StateInRange_MoveStateForward = 0x0,
RecordMergeFlag_StateInRange_MoveStateBackward = 0x1,
RecordMergeFlag_StateInRange_ErrorOut = 0x2,
};
TYPEDEF int32_t History_Record_Index;
TYPEDEF i32 History_Record_Index;
STRUCT Record_Info{
Record_Error error;
Record_Kind kind;
int32_t edit_number;
i32 edit_number;
union{
struct{
String string_forward;
String string_backward;
int32_t first;
i32 first;
} single;
struct{
Buffer_Batch_Edit_Type type;
int32_t count;
i32 count;
} batch;
struct{
int32_t count;
i32 count;
} group;
};
};
@ -1028,7 +1025,7 @@ STRUCT User_Input{
/* DOC(This field indicates that an abort event has occurred and the command needs to shut down.
This can be set even if key and command are also set, in which case the command still needs to abort, and the key and command simply reflect
what event triggered the abort event.) */
bool32 abort;
b32 abort;
};
/*
@ -1041,9 +1038,24 @@ STRUCT Data{
uint64_t size;
};
STRUCT Frame_Info{
i32 index;
f32 literal_dt;
f32 animation_dt;
};
TYPEDEF_FUNC void Render_Callback(struct Application_Links *app);
STRUCT Render_Parameters{
Frame_Info frame;
View_ID view_id;
Range on_screen_range;
Render_Callback *do_core_render;
};
/* DOC(Hook_IDs name the various hooks in 4coder, these hooks use the Hook_Function signature.)
DOC_SEE(Hook_Function) */
ENUM(int32_t, Hook_ID){
ENUM(i32, Hook_ID){
/* DOC(TODO) */
hook_file_out_of_sync,
/* DOC(TODO) */
@ -1055,7 +1067,7 @@ ENUM(int32_t, Hook_ID){
};
/* DOC(Special_Hook_IDs name special hooks that use specialized signatures.) */
ENUM(int32_t, Special_Hook_ID){
ENUM(i32, Special_Hook_ID){
/* DOC(TODO) */
special_hook_scroll_rule = hook_type_count,
/* DOC(TODO) */
@ -1082,60 +1094,57 @@ ENUM(int32_t, Special_Hook_ID){
special_hook_modify_color_table,
};
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)
TYPEDEF_FUNC i32 Command_Caller_Hook_Function(struct Application_Links *app, Generic_Command cmd);
#define COMMAND_CALLER_HOOK(name) i32 name(struct Application_Links *app, Generic_Command cmd)
TYPEDEF_FUNC void Render_Callback(struct Application_Links *app);
TYPEDEF_FUNC void Render_Caller_Function(struct Application_Links *app, View_ID view_id, Range on_screen_range, i32 frame_index, f32 literal_dt, f32 animation_dt, Render_Callback *do_core_render);
#define RENDER_CALLER_SIG(name) \
void name(struct Application_Links *app, View_ID view_id, Range on_screen_range, \
i32 frame_index, f32 literal_dt, f32 animation_dt, Render_Callback *do_core_render)
TYPEDEF_FUNC void Render_Caller_Function(struct Application_Links *app, Render_Parameters render_params);
#define RENDER_CALLER_SIG(name) void name(struct Application_Links *app, Render_Parameters render_params)
TYPEDEF_FUNC int32_t Hook_Function(struct Application_Links *app);
#define HOOK_SIG(name) int32_t name(struct Application_Links *app)
TYPEDEF_FUNC i32 Hook_Function(struct Application_Links *app);
#define HOOK_SIG(name) i32 name(struct Application_Links *app)
TYPEDEF_FUNC int32_t Open_File_Hook_Function(struct Application_Links *app, Buffer_ID buffer_id);
#define OPEN_FILE_HOOK_SIG(name) int32_t name(struct Application_Links *app, Buffer_ID buffer_id)
TYPEDEF_FUNC i32 Open_File_Hook_Function(struct Application_Links *app, Buffer_ID buffer_id);
#define OPEN_FILE_HOOK_SIG(name) i32 name(struct Application_Links *app, Buffer_ID buffer_id)
TYPEDEF_FUNC int32_t File_Edit_Finished_Function(struct Application_Links *app, Buffer_ID *buffer_ids, int32_t buffer_id_count);
#define FILE_EDIT_FINISHED_SIG(name) int32_t name(struct Application_Links *app, Buffer_ID *buffer_ids, int32_t buffer_id_count)
TYPEDEF_FUNC i32 File_Edit_Finished_Function(struct Application_Links *app, Buffer_ID *buffer_ids, i32 buffer_id_count);
#define FILE_EDIT_FINISHED_SIG(name) i32 name(struct Application_Links *app, Buffer_ID *buffer_ids, i32 buffer_id_count)
TYPEDEF_FUNC void Input_Filter_Function(Mouse_State *mouse);
#define INPUT_FILTER_SIG(name) void name(Mouse_State *mouse)
TYPEDEF_FUNC int32_t Scroll_Rule_Function(float target_x, float target_y, float *scroll_x, float *scroll_y, int32_t view_id, int32_t is_new_target, float dt);
TYPEDEF_FUNC i32 Scroll_Rule_Function(float target_x, float target_y, float *scroll_x, float *scroll_y, i32 view_id, i32 is_new_target, float dt);
#define SCROLL_RULE_SIG(name) \
int32_t name(float target_x, float target_y, float *scroll_x, float *scroll_y, int32_t view_id, int32_t is_new_target, float dt)
i32 name(float target_x, float target_y, float *scroll_x, float *scroll_y, i32 view_id, i32 is_new_target, float dt)
STRUCT Color_Table{
argb_color *vals;
u32 count;
};
TYPEDEF_FUNC Color_Table Modify_Color_Table_Function(struct Application_Links *app, i32 frame_index, f32 literal_dt, f32 animation_dt);
#define MODIFY_COLOR_TABLE_SIG(name) Color_Table name(struct Application_Links *app, i32 frame_index, f32 literal_dt, f32 animation_dt)
TYPEDEF_FUNC Color_Table Modify_Color_Table_Function(struct Application_Links *app, Frame_Info frame);
#define MODIFY_COLOR_TABLE_SIG(name) Color_Table name(struct Application_Links *app, Frame_Info frame)
STRUCT Buffer_Name_Conflict_Entry{
Buffer_ID buffer_id;
char *file_name;
int32_t file_name_len;
i32 file_name_len;
char *base_name;
int32_t base_name_len;
i32 base_name_len;
char *unique_name_in_out;
int32_t unique_name_len_in_out;
int32_t unique_name_capacity;
i32 unique_name_len_in_out;
i32 unique_name_capacity;
};
TYPEDEF_FUNC void Buffer_Name_Resolver_Function(struct Application_Links *app, Buffer_Name_Conflict_Entry *conflicts, int32_t conflict_count);
TYPEDEF_FUNC void Buffer_Name_Resolver_Function(struct Application_Links *app, Buffer_Name_Conflict_Entry *conflicts, i32 conflict_count);
#define BUFFER_NAME_RESOLVER_SIG(n) \
void n(struct Application_Links *app, Buffer_Name_Conflict_Entry *conflicts, int32_t conflict_count)
void n(struct Application_Links *app, Buffer_Name_Conflict_Entry *conflicts, i32 conflict_count)
TYPEDEF_FUNC int32_t Start_Hook_Function(struct Application_Links *app, char **files, int32_t file_count, char **flags, int32_t flag_count);
TYPEDEF_FUNC i32 Start_Hook_Function(struct Application_Links *app, char **files, i32 file_count, char **flags, i32 flag_count);
#define START_HOOK_SIG(name) \
int32_t name(struct Application_Links *app, char **files, int32_t file_count, char **flags, int32_t flag_count)
i32 name(struct Application_Links *app, char **files, i32 file_count, char **flags, i32 flag_count)
TYPEDEF_FUNC int32_t Get_Binding_Data_Function(void *data, int32_t size);
#define GET_BINDING_DATA(name) int32_t name(void *data, int32_t size)
TYPEDEF_FUNC i32 Get_Binding_Data_Function(void *data, i32 size);
#define GET_BINDING_DATA(name) i32 name(void *data, i32 size)
// NOTE(allen): Definitions for the format that Get_Binding_Data uses to launch 4coder.
// TODO(allen): Transition to a more dynamic Command_Map system.
@ -1144,7 +1153,7 @@ TYPEDEF_FUNC int32_t Get_Binding_Data_Function(void *data, int32_t size);
DOC(Values for the type field in the discriminated union Binding_Unit.)
DOC_SEE(Binding_Unit)
*/
ENUM(int32_t, Binding_Unit_Type){
ENUM(i32, Binding_Unit_Type){
unit_header,
unit_map_begin,
unit_callback,
@ -1153,7 +1162,7 @@ ENUM(int32_t, Binding_Unit_Type){
};
/* DOC(Values for built in command maps.) */
ENUM(int32_t, Map_ID){
ENUM(i32, Map_ID){
mapid_global = (1 << 24),
mapid_file,
mapid_ui,
@ -1166,21 +1175,21 @@ DOC(Describes a unit of information for setting up key bindings. A unit can set
STRUCT Binding_Unit{
Binding_Unit_Type type;
UNION{
STRUCT{ int32_t total_size; int32_t user_map_count; int32_t error; } header;
STRUCT{ int32_t mapid; int32_t replace; int32_t bind_count; } map_begin;
STRUCT{ int32_t mapid; } map_inherit;
STRUCT{ i32 total_size; i32 user_map_count; i32 error; } header;
STRUCT{ i32 mapid; i32 replace; i32 bind_count; } map_begin;
STRUCT{ i32 mapid; } map_inherit;
STRUCT{ Key_Code code; uint8_t modifiers; Custom_Command_Function *func; } callback;
STRUCT{ int32_t hook_id; void *func; } hook;
STRUCT{ i32 hook_id; void *func; } hook;
};
};
typedef int32_t _Get_Version_Function(int32_t maj, int32_t min, int32_t patch);
#define _GET_VERSION_SIG(n) int32_t n(int32_t maj, int32_t min, int32_t patch)
typedef i32 _Get_Version_Function(i32 maj, i32 min, i32 patch);
#define _GET_VERSION_SIG(n) i32 n(i32 maj, i32 min, i32 patch)
STRUCT color_picker{
String title;
argb_color *dest;
bool32 *finished;
b32 *finished;
};
enum Found_String_Flag{
@ -1195,18 +1204,18 @@ STRUCT Found_String{
Found_String *next;
Buffer_ID buffer_id;
uint32_t flags;
int32_t string_id;
u32 flags;
i32 string_id;
int32_t start;
int32_t end;
i32 start;
i32 end;
};
// TODO(casey): If this sticks around, there should be a way to export add/remove/merge as inlines that are shared
STRUCT Found_String_List{
Found_String *first;
Found_String *last;
int32_t count;
i32 count;
};
#endif

View File

@ -24,10 +24,12 @@
#if !defined(REMOVE_TRANSITION_HELPER)
static bool32
typedef b32 bool32;
static b32
exec_system_command(Application_Links *app, View_Summary *view, Buffer_Identifier buffer_id,
char *path, int32_t path_len, char *command, int32_t command_len, Command_Line_Interface_Flag flags){
bool32 result = false;
b32 result = false;
if (view != 0 && view->exists){
result = exec_system_command(app, view->view_id, buffer_id, make_string(path, path_len), make_string(command, command_len), flags);
get_view_summary(app, view->view_id, AccessAll, view);
@ -35,7 +37,7 @@ exec_system_command(Application_Links *app, View_Summary *view, Buffer_Identifie
return(result);
}
static bool32
static b32
clipboard_post(Application_Links *app, int32_t clipboard_id, char *str, int32_t len){
return(clipboard_post(app, clipboard_id, make_string(str, len)));
}
@ -105,9 +107,9 @@ get_buffer_by_file_name(Application_Links *app, char *name, int32_t len, Access_
return(buffer);
}
static bool32
static b32
buffer_read_range(Application_Links *app, Buffer_Summary *buffer, int32_t start, int32_t one_past_last, char *out){
bool32 result = false;
b32 result = false;
if (buffer != 0 && buffer->exists){
result = buffer_read_range(app, buffer->buffer_id, start, one_past_last, out);
get_buffer_summary(app, buffer->buffer_id, AccessAll, buffer);
@ -115,9 +117,9 @@ buffer_read_range(Application_Links *app, Buffer_Summary *buffer, int32_t start,
return(result);
}
static bool32
static b32
buffer_replace_range(Application_Links *app, Buffer_Summary *buffer, int32_t start, int32_t one_past_last, char *str, int32_t len){
bool32 result = false;
b32 result = false;
if (buffer != 0 && buffer->exists){
result = buffer_replace_range(app, buffer->buffer_id, start, one_past_last, make_string(str, len));
get_buffer_summary(app, buffer->buffer_id, AccessAll, buffer);
@ -125,9 +127,9 @@ buffer_replace_range(Application_Links *app, Buffer_Summary *buffer, int32_t sta
return(result);
}
static bool32
static b32
buffer_compute_cursor(Application_Links *app, Buffer_Summary *buffer, Buffer_Seek seek, Partial_Cursor *cursor_out){
bool32 result = false;
b32 result = false;
if (buffer != 0 && buffer->exists){
result = buffer_compute_cursor(app, buffer->buffer_id, seek, cursor_out);
get_buffer_summary(app, buffer->buffer_id, AccessAll, buffer);
@ -135,9 +137,9 @@ buffer_compute_cursor(Application_Links *app, Buffer_Summary *buffer, Buffer_See
return(result);
}
static bool32
static b32
buffer_batch_edit(Application_Links *app, Buffer_Summary *buffer, char *str, int32_t str_len, Buffer_Edit *edits, int32_t edit_count, Buffer_Batch_Edit_Type type){
bool32 result = false;
b32 result = false;
if (buffer != 0 && buffer->exists){
result = buffer_batch_edit(app, buffer->buffer_id, str, str_len, edits, edit_count, type);
get_buffer_summary(app, buffer->buffer_id, AccessAll, buffer);
@ -145,9 +147,9 @@ buffer_batch_edit(Application_Links *app, Buffer_Summary *buffer, char *str, int
return(result);
}
static bool32
static b32
buffer_get_setting(Application_Links *app, Buffer_Summary *buffer, Buffer_Setting_ID setting, int32_t *value_out){
bool32 result = false;
b32 result = false;
if (buffer != 0 && buffer->exists){
result = buffer_get_setting(app, buffer->buffer_id, setting, value_out);
get_buffer_summary(app, buffer->buffer_id, AccessAll, buffer);
@ -155,9 +157,9 @@ buffer_get_setting(Application_Links *app, Buffer_Summary *buffer, Buffer_Settin
return(result);
}
static bool32
static b32
buffer_set_setting(Application_Links *app, Buffer_Summary *buffer, Buffer_Setting_ID setting, int32_t value){
bool32 result = false;
b32 result = false;
if (buffer != 0 && buffer->exists){
result = buffer_set_setting(app, buffer->buffer_id, setting, value);
get_buffer_summary(app, buffer->buffer_id, AccessAll, buffer);
@ -181,9 +183,9 @@ buffer_token_count(Application_Links *app, Buffer_Summary *buffer){
return(count);
}
static bool32
static b32
buffer_read_tokens(Application_Links *app, Buffer_Summary *buffer, int32_t start_token, int32_t end_token, Cpp_Token *tokens_out){
bool32 result = false;
b32 result = false;
if (buffer != 0 && buffer->exists){
result = buffer_read_tokens(app, buffer->buffer_id, start_token, end_token, tokens_out);
get_buffer_summary(app, buffer->buffer_id, AccessAll, buffer);
@ -191,9 +193,9 @@ buffer_read_tokens(Application_Links *app, Buffer_Summary *buffer, int32_t start
return(result);
}
static bool32
static b32
buffer_get_token_range(Application_Links *app, Buffer_Summary *buffer, Cpp_Token **first_token_out, Cpp_Token **one_past_last_token_out){
bool32 result = false;
b32 result = false;
if (buffer != 0 && buffer->exists){
result = buffer_get_token_range(app, buffer->buffer_id, first_token_out, one_past_last_token_out);
get_buffer_summary(app, buffer->buffer_id, AccessAll, buffer);
@ -201,9 +203,9 @@ buffer_get_token_range(Application_Links *app, Buffer_Summary *buffer, Cpp_Token
return(result);
}
static bool32
static b32
buffer_get_token_index(Application_Links *app, Buffer_Summary *buffer, int32_t pos, Cpp_Get_Token_Result *get_result){
bool32 result = false;
b32 result = false;
if (buffer != 0 && buffer->exists){
result = buffer_get_token_index(app, buffer->buffer_id, pos, get_result);
get_buffer_summary(app, buffer->buffer_id, AccessAll, buffer);
@ -211,9 +213,9 @@ buffer_get_token_index(Application_Links *app, Buffer_Summary *buffer, int32_t p
return(result);
}
static bool32
static b32
buffer_send_end_signal(Application_Links *app, Buffer_Summary *buffer){
bool32 result = false;
b32 result = false;
if (buffer != 0 && buffer->exists){
result = buffer_send_end_signal(app, buffer->buffer_id);
get_buffer_summary(app, buffer->buffer_id, AccessAll, buffer);
@ -231,9 +233,9 @@ create_buffer(Application_Links *app, char *filename, int32_t filename_len, Buff
return(buffer);
}
static bool32
static b32
save_buffer(Application_Links *app, Buffer_Summary *buffer, char *file_name, int32_t file_name_len, uint32_t flags){
bool32 result = false;
b32 result = false;
if (buffer != 0 && buffer->exists){
result = buffer_save(app, buffer->buffer_id, make_string(file_name, file_name_len), flags);
get_buffer_summary(app, buffer->buffer_id, AccessAll, buffer);
@ -328,27 +330,27 @@ open_view(Application_Links *app, View_Summary *view_location, View_Split_Positi
return(view);
}
static bool32
static b32
close_view(Application_Links *app, View_Summary *view){
bool32 result = false;
b32 result = false;
if (view != 0 && view->exists){
result = view_close(app, view->view_id);
}
return(result);
}
static bool32
static b32
set_active_view(Application_Links *app, View_Summary *view){
bool32 result = false;
b32 result = false;
if (view != 0 && view->exists){
result = view_set_active(app, view->view_id);
}
return(result);
}
static bool32
static b32
view_get_setting(Application_Links *app, View_Summary *view, View_Setting_ID setting, int32_t *value_out){
bool32 result = false;
b32 result = false;
if (view != 0 && view->exists){
result = view_get_setting(app, view->view_id, setting, value_out);
get_view_summary(app, view->view_id, AccessAll, view);
@ -356,9 +358,9 @@ view_get_setting(Application_Links *app, View_Summary *view, View_Setting_ID set
return(result);
}
static bool32
static b32
view_set_setting(Application_Links *app, View_Summary *view, View_Setting_ID setting, int32_t value){
bool32 result = false;
b32 result = false;
if (view != 0 && view->exists){
result = view_set_setting(app, view->view_id, setting, value);
get_view_summary(app, view->view_id, AccessAll, view);
@ -416,9 +418,9 @@ view_get_enclosure_rect(Application_Links *app, View_Summary *view){
return(result);
}
static bool32
static b32
view_compute_cursor(Application_Links *app, View_Summary *view, Buffer_Seek seek, Full_Cursor *cursor_out){
bool32 result = false;
b32 result = false;
if (view != 0 && view->exists){
result = view_compute_cursor(app, view->view_id, seek, cursor_out);
get_view_summary(app, view->view_id, AccessAll, view);
@ -426,9 +428,9 @@ view_compute_cursor(Application_Links *app, View_Summary *view, Buffer_Seek seek
return(result);
}
static bool32
view_set_cursor(Application_Links *app, View_Summary *view, Buffer_Seek seek, bool32 set_preferred_x){
bool32 result = false;
static b32
view_set_cursor(Application_Links *app, View_Summary *view, Buffer_Seek seek, b32 set_preferred_x){
b32 result = false;
if (view != 0 && view->exists){
result = view_set_cursor(app, view->view_id, seek, set_preferred_x);
get_view_summary(app, view->view_id, AccessAll, view);
@ -436,9 +438,9 @@ view_set_cursor(Application_Links *app, View_Summary *view, Buffer_Seek seek, bo
return(result);
}
static bool32
static b32
view_set_scroll(Application_Links *app, View_Summary *view, GUI_Scroll_Vars scroll){
bool32 result = false;
b32 result = false;
if (view != 0 && view->exists){
result = view_set_scroll(app, view->view_id, scroll);
get_view_summary(app, view->view_id, AccessAll, view);
@ -446,9 +448,9 @@ view_set_scroll(Application_Links *app, View_Summary *view, GUI_Scroll_Vars scro
return(result);
}
static bool32
static b32
view_set_mark(Application_Links *app, View_Summary *view, Buffer_Seek seek){
bool32 result = false;
b32 result = false;
if (view != 0 && view->exists){
result = view_set_mark(app, view->view_id, seek);
get_view_summary(app, view->view_id, AccessAll, view);
@ -456,9 +458,9 @@ view_set_mark(Application_Links *app, View_Summary *view, Buffer_Seek seek){
return(result);
}
static bool32
static b32
view_set_buffer(Application_Links *app, View_Summary *view, Buffer_ID buffer_id, Set_Buffer_Flag flags){
bool32 result = false;
b32 result = false;
if (view != 0 && view->exists){
result = view_set_buffer(app, view->view_id, buffer_id, flags);
get_view_summary(app, view->view_id, AccessAll, view);
@ -466,9 +468,9 @@ view_set_buffer(Application_Links *app, View_Summary *view, Buffer_ID buffer_id,
return(result);
}
static bool32
static b32
view_post_fade(Application_Links *app, View_Summary *view, float seconds, int32_t start, int32_t end, int_color color){
bool32 result = false;
b32 result = false;
if (view != 0 && view->exists){
result = view_post_fade(app, view->view_id, seconds, start, end, color);
get_view_summary(app, view->view_id, AccessAll, view);
@ -476,9 +478,9 @@ view_post_fade(Application_Links *app, View_Summary *view, float seconds, int32_
return(result);
}
static bool32
static b32
view_begin_ui_mode(Application_Links *app, View_Summary *view){
bool32 result = false;
b32 result = false;
if (view != 0 && view->exists){
result = view_begin_ui_mode(app, view->view_id);
get_view_summary(app, view->view_id, AccessAll, view);
@ -486,9 +488,9 @@ view_begin_ui_mode(Application_Links *app, View_Summary *view){
return(result);
}
static bool32
static b32
view_end_ui_mode(Application_Links *app, View_Summary *view){
bool32 result = false;
b32 result = false;
if (view != 0 && view->exists){
result = view_end_ui_mode(app, view->view_id);
get_view_summary(app, view->view_id, AccessAll, view);
@ -496,15 +498,15 @@ view_end_ui_mode(Application_Links *app, View_Summary *view){
return(result);
}
static bool32
view_set_highlight(Application_Links *app, View_ID view_id, int32_t start, int32_t end, bool32 turn_on){
static b32
view_set_highlight(Application_Links *app, View_ID view_id, int32_t start, int32_t end, b32 turn_on){
// NOTE(allen): this feature is completely removed, transition to using highlighted markers instead
return(false);
}
static bool32
static b32
buffer_set_face(Application_Links *app, Buffer_Summary *buffer, Face_ID id){
bool32 result = false;
b32 result = false;
if (buffer != 0 && buffer->exists){
result = buffer_set_face(app, buffer->buffer_id, id);
get_buffer_summary(app, buffer->buffer_id, AccessAll, buffer);
@ -549,7 +551,7 @@ directory_get_hot(Application_Links *app, char *out, int32_t capacity){
return(required_size);
}
static bool32
static b32
directory_set_hot(Application_Links *app, char *str, int32_t len){
return(set_hot_directory(app, make_string(str, len)));
}
@ -561,18 +563,18 @@ get_file_list(Application_Links *app, char *dir, int32_t len){
return(list);
}
static bool32
static b32
file_exists(Application_Links *app, char *file_name, int32_t len){
File_Attributes attributes = {};
file_get_attributes(app, make_string(file_name, len), &attributes);
return(attributes.last_write_time > 0);
}
static bool32
static b32
directory_cd(Application_Links *app, char *dir, int32_t *len, int32_t capacity, char *rel_path, int32_t rel_len){
String directory = make_string_cap(dir, *len, capacity);
String relative_path = make_string(rel_path, rel_len);
bool32 result = directory_cd(app, &directory, relative_path);
b32 result = directory_cd(app, &directory, relative_path);
*len = directory.size;
return(result);
}

View File

@ -5,8 +5,8 @@
// TOP
static Hard_Start_Result
buffer_find_hard_start(Application_Links *app, Buffer_Summary *buffer, int32_t line_start, int32_t tab_width){
int32_t tab_additional_width = tab_width - 1;
buffer_find_hard_start(Application_Links *app, Buffer_Summary *buffer, i32 line_start, i32 tab_width){
i32 tab_additional_width = tab_width - 1;
Hard_Start_Result result = {};
result.all_space = true;
@ -17,7 +17,7 @@ buffer_find_hard_start(Application_Links *app, Buffer_Summary *buffer, int32_t l
Stream_Chunk stream = {};
stream.add_null = true;
if (init_stream_chunk(&stream, app, buffer, line_start, data_chunk, sizeof(data_chunk))){
bool32 still_looping = true;
b32 still_looping = true;
do{
for (; result.char_pos < stream.end; ++result.char_pos){
char c = stream.data[result.char_pos];
@ -51,23 +51,23 @@ buffer_find_hard_start(Application_Links *app, Buffer_Summary *buffer, int32_t l
static Buffer_Batch_Edit
make_batch_from_indent_marks(Application_Links *app, Partition *arena, Buffer_Summary *buffer,
int32_t first_line, int32_t one_past_last_line, int32_t *indent_marks,
i32 first_line, i32 one_past_last_line, i32 *indent_marks,
Indent_Options opts){
int32_t *shifted_indent_marks = indent_marks - first_line;
i32 *shifted_indent_marks = indent_marks - first_line;
int32_t edit_count = 0;
int32_t edit_max = one_past_last_line - first_line;
i32 edit_count = 0;
i32 edit_max = one_past_last_line - first_line;
Buffer_Edit *edits = push_array(arena, Buffer_Edit, edit_max);
char *str_base = push_array(arena, char, 0);
for (int32_t line_number = first_line;
for (i32 line_number = first_line;
line_number < one_past_last_line;
++line_number){
int32_t line_start_pos = buffer_get_line_start(app, buffer, line_number);
i32 line_start_pos = buffer_get_line_start(app, buffer, line_number);
Hard_Start_Result hard_start = buffer_find_hard_start(app, buffer, line_start_pos, opts.tab_width);
int32_t correct_indentation = shifted_indent_marks[line_number];
i32 correct_indentation = shifted_indent_marks[line_number];
if (hard_start.all_whitespace && opts.empty_blank_lines){
correct_indentation = 0;
}
@ -76,14 +76,14 @@ make_batch_from_indent_marks(Application_Links *app, Partition *arena, Buffer_Su
}
if (correct_indentation != hard_start.indent_pos){
int32_t str_size = correct_indentation;
i32 str_size = correct_indentation;
if (opts.use_tabs){
str_size = correct_indentation/opts.tab_width + correct_indentation%opts.tab_width;
}
char *str = push_array(arena, char, str_size);
if (opts.use_tabs){
int32_t indent = 0;
int32_t j = 0;
i32 indent = 0;
i32 j = 0;
for (;indent + opts.tab_width <= correct_indentation;
indent += opts.tab_width){
str[j++] = '\t';
@ -94,13 +94,13 @@ make_batch_from_indent_marks(Application_Links *app, Partition *arena, Buffer_Su
}
}
else{
for (int32_t j = 0; j < correct_indentation;){
for (i32 j = 0; j < correct_indentation;){
str[j++] = ' ';
}
}
Buffer_Edit new_edit;
new_edit.str_start = (int32_t)(str - str_base);
new_edit.str_start = (i32)(str - str_base);
new_edit.len = str_size;
new_edit.start = line_start_pos;
new_edit.end = hard_start.char_pos;
@ -112,7 +112,7 @@ make_batch_from_indent_marks(Application_Links *app, Partition *arena, Buffer_Su
Buffer_Batch_Edit result = {};
result.str = str_base;
result.str_len = (int32_t)(push_array(arena, char, 0) - str_base);
result.str_len = (i32)(push_array(arena, char, 0) - str_base);
result.edits = edits;
result.edit_count = edit_count;
return(result);
@ -120,8 +120,8 @@ make_batch_from_indent_marks(Application_Links *app, Partition *arena, Buffer_Su
static void
set_line_indents(Application_Links *app, Partition *part, Buffer_Summary *buffer,
int32_t first_line, int32_t one_past_last_line,
int32_t *indent_marks, Indent_Options opts){
i32 first_line, i32 one_past_last_line,
i32 *indent_marks, Indent_Options opts){
Buffer_Batch_Edit batch = make_batch_from_indent_marks(app, part, buffer,
first_line, one_past_last_line,
indent_marks, opts);
@ -138,7 +138,7 @@ seek_matching_token_backwards(Cpp_Token_Array tokens, Cpp_Token *token,
token = tokens.tokens;
}
else{
int32_t nesting_level = 0;
i32 nesting_level = 0;
for (; token > tokens.tokens; --token){
if (!(token->flags & CPP_TFLAG_PP_BODY)){
if (token->type == close_type){
@ -160,7 +160,7 @@ seek_matching_token_backwards(Cpp_Token_Array tokens, Cpp_Token *token,
static Indent_Anchor_Position
find_anchor_token(Application_Links *app, Buffer_Summary *buffer, Cpp_Token_Array tokens,
int32_t line_start, int32_t tab_width){
i32 line_start, i32 tab_width){
// NOTE(allen): New implementation of find_anchor_token (4.0.26) revert if it is a problem.
Indent_Anchor_Position anchor = {};
@ -170,13 +170,13 @@ find_anchor_token(Application_Links *app, Buffer_Summary *buffer, Cpp_Token_Arra
anchor.token = tokens.tokens;
}
else{
int32_t stack[256];
int32_t top = -1;
i32 stack[256];
i32 top = -1;
Cpp_Token *token_it = tokens.tokens;
int32_t highest_checked_line_number = -1;
i32 highest_checked_line_number = -1;
for (; token_it < first_invalid_token; ++token_it){
int32_t line_number = buffer_get_line_number(app, buffer, token_it->start);
i32 line_number = buffer_get_line_number(app, buffer, token_it->start);
if (highest_checked_line_number < line_number){
highest_checked_line_number = line_number;
if (top == -1){
@ -196,7 +196,7 @@ find_anchor_token(Application_Links *app, Buffer_Summary *buffer, Cpp_Token_Arra
case CPP_TOKEN_PARENTHESE_CLOSE:
{
for (;top >= 0;){
int32_t index = top;
i32 index = top;
top -= 1;
if (stack[index] == CPP_TOKEN_PARENTHESE_OPEN){
break;
@ -207,7 +207,7 @@ find_anchor_token(Application_Links *app, Buffer_Summary *buffer, Cpp_Token_Arra
case CPP_TOKEN_BRACE_CLOSE:
{
for (;top >= 0;){
int32_t index = top;
i32 index = top;
if (stack[index] == CPP_TOKEN_PARENTHESE_OPEN){
break;
}
@ -221,7 +221,7 @@ find_anchor_token(Application_Links *app, Buffer_Summary *buffer, Cpp_Token_Arra
case CPP_TOKEN_BRACKET_CLOSE:
{
for (;top >= 0;){
int32_t index = top;
i32 index = top;
if (stack[index] == CPP_TOKEN_PARENTHESE_OPEN ||
stack[index] == CPP_TOKEN_BRACE_OPEN){
break;
@ -239,12 +239,12 @@ find_anchor_token(Application_Links *app, Buffer_Summary *buffer, Cpp_Token_Arra
return(anchor);
}
static int32_t*
static i32*
get_indentation_marks(Application_Links *app, Partition *arena, Buffer_Summary *buffer,
Cpp_Token_Array tokens, int32_t first_line, int32_t one_past_last_line,
bool32 exact_align, int32_t tab_width){
int32_t indent_mark_count = one_past_last_line - first_line;
int32_t *indent_marks = push_array(arena, int32_t, indent_mark_count);
Cpp_Token_Array tokens, i32 first_line, i32 one_past_last_line,
b32 exact_align, i32 tab_width){
i32 indent_mark_count = one_past_last_line - first_line;
i32 *indent_marks = push_array(arena, i32, indent_mark_count);
// Shift the array so line_index works correctly.
indent_marks -= first_line;
@ -255,12 +255,12 @@ get_indentation_marks(Application_Links *app, Partition *arena, Buffer_Summary *
indent.current_indent = anchor.indentation;
if (token_ptr == 0){
for (int32_t line_index = first_line; line_index < one_past_last_line; ++line_index){
for (i32 line_index = first_line; line_index < one_past_last_line; ++line_index){
indent_marks[line_index] = 0;
}
}
else{
int32_t line_number = buffer_get_line_number(app, buffer, token_ptr->start);
i32 line_number = buffer_get_line_number(app, buffer, token_ptr->start);
if (line_number > first_line){
line_number = first_line;
}
@ -269,7 +269,7 @@ get_indentation_marks(Application_Links *app, Partition *arena, Buffer_Summary *
indent.current_indent = 0;
}
int32_t next_line_start_pos = buffer_get_line_start(app, buffer, line_number);
i32 next_line_start_pos = buffer_get_line_start(app, buffer, line_number);
indent.previous_line_indent = indent.current_indent;
Cpp_Token prev_token = {};
Cpp_Token token = {};
@ -302,13 +302,13 @@ get_indentation_marks(Application_Links *app, Partition *arena, Buffer_Summary *
for (;token.start >= next_line_start_pos && line_number < one_past_last_line;){
next_line_start_pos = buffer_get_line_start(app, buffer, line_number + 1);
int32_t this_indent = 0;
int32_t previous_indent = indent.previous_line_indent;
i32 this_indent = 0;
i32 previous_indent = indent.previous_line_indent;
int32_t this_line_start = buffer_get_line_start(app, buffer, line_number);
int32_t next_line_start = next_line_start_pos;
i32 this_line_start = buffer_get_line_start(app, buffer, line_number);
i32 next_line_start = next_line_start_pos;
bool32 did_multi_line_behavior = false;
b32 did_multi_line_behavior = false;
// NOTE(allen): Check for multi-line tokens
if (prev_token.start <= this_line_start && prev_token.start + prev_token.size > this_line_start){
@ -323,7 +323,7 @@ get_indentation_marks(Application_Links *app, Partition *arena, Buffer_Summary *
this_indent = previous_indent;
}
else{
int32_t line_pos = hard_start.char_pos - this_line_start;
i32 line_pos = hard_start.char_pos - this_line_start;
this_indent = line_pos + indent.comment_shift;
if (this_indent < 0){
this_indent = 0;
@ -365,7 +365,7 @@ get_indentation_marks(Application_Links *app, Partition *arena, Buffer_Summary *
default:
if (indent.current_indent > 0){
bool32 statement_complete = false;
b32 statement_complete = false;
Cpp_Token *prev_usable_token_ptr = token_ptr - 1;
Cpp_Token prev_usable_token = {};
@ -374,7 +374,7 @@ get_indentation_marks(Application_Links *app, Partition *arena, Buffer_Summary *
}
// Scan backwards for the previous token that actually tells us about the statement.
bool32 has_prev_usable_token = true;
b32 has_prev_usable_token = true;
#define NotUsable(T) \
(((T).flags&CPP_TFLAG_PP_BODY) || ((T).flags&CPP_TFLAG_PP_DIRECTIVE) || ((T).type == CPP_TOKEN_COMMENT))
if (NotUsable(prev_usable_token)){
@ -421,7 +421,7 @@ get_indentation_marks(Application_Links *app, Partition *arena, Buffer_Summary *
if (indent.paren_nesting > 0){
if (prev_token.type != CPP_TOKEN_PARENTHESE_OPEN){
int32_t level = indent.paren_nesting - 1;
i32 level = indent.paren_nesting - 1;
if (level >= ArrayCount(indent.paren_anchor_indent)){
level = ArrayCount(indent.paren_anchor_indent) - 1;
}
@ -433,7 +433,7 @@ get_indentation_marks(Application_Links *app, Partition *arena, Buffer_Summary *
// after the open paren is on the next line.
if (indent.paren_nesting > 0){
if (prev_token.type == CPP_TOKEN_PARENTHESE_OPEN){
int32_t level = indent.paren_nesting - 1;
i32 level = indent.paren_nesting - 1;
if (level >= ArrayCount(indent.paren_anchor_indent)){
level = ArrayCount(indent.paren_anchor_indent) - 1;
}
@ -459,14 +459,14 @@ get_indentation_marks(Application_Links *app, Partition *arena, Buffer_Summary *
case CPP_TOKEN_COMMENT:
case CPP_TOKEN_STRING_CONSTANT:
{
int32_t line = buffer_get_line_number(app, buffer, token.start);
int32_t start = buffer_get_line_start(app, buffer, line);
i32 line = buffer_get_line_number(app, buffer, token.start);
i32 start = buffer_get_line_start(app, buffer, line);
Hard_Start_Result hard_start = buffer_find_hard_start(app, buffer, start, tab_width);
int32_t old_dist_to_token = (token.start - start);
int32_t old_indent = hard_start.indent_pos;
int32_t token_start_inset = old_dist_to_token - old_indent;
int32_t new_dist_to_token = indent.current_indent + token_start_inset;
i32 old_dist_to_token = (token.start - start);
i32 old_indent = hard_start.indent_pos;
i32 token_start_inset = old_dist_to_token - old_indent;
i32 new_dist_to_token = indent.current_indent + token_start_inset;
indent.comment_shift = (new_dist_to_token - old_dist_to_token);
indent.previous_comment_indent = old_indent;
@ -476,13 +476,13 @@ get_indentation_marks(Application_Links *app, Partition *arena, Buffer_Summary *
{
if (!(token.flags & CPP_TFLAG_PP_BODY)){
if (indent.paren_nesting < ArrayCount(indent.paren_anchor_indent)){
int32_t line = buffer_get_line_number(app, buffer, token.start);
int32_t start = buffer_get_line_start(app, buffer, line);
int32_t char_pos = token.start - start;
i32 line = buffer_get_line_number(app, buffer, token.start);
i32 start = buffer_get_line_start(app, buffer, line);
i32 char_pos = token.start - start;
Hard_Start_Result hard_start = buffer_find_hard_start(app, buffer, start, tab_width);
int32_t line_pos = hard_start.char_pos - start;
i32 line_pos = hard_start.char_pos - start;
indent.paren_anchor_indent[indent.paren_nesting] = char_pos - line_pos + indent.previous_line_indent + 1;
}
@ -508,21 +508,21 @@ get_indentation_marks(Application_Links *app, Partition *arena, Buffer_Summary *
}
static void
get_indent_lines_minimum(Application_Links *app, Buffer_Summary *buffer, int32_t start_pos, int32_t end_pos, int32_t *line_start_out, int32_t *line_end_out){
int32_t line_start = buffer_get_line_number(app, buffer, start_pos);
int32_t line_end = buffer_get_line_number(app, buffer, end_pos) + 1;
get_indent_lines_minimum(Application_Links *app, Buffer_Summary *buffer, i32 start_pos, i32 end_pos, i32 *line_start_out, i32 *line_end_out){
i32 line_start = buffer_get_line_number(app, buffer, start_pos);
i32 line_end = buffer_get_line_number(app, buffer, end_pos) + 1;
*line_start_out = line_start;
*line_end_out = line_end;
}
static void
get_indent_lines_whole_tokens(Application_Links *app, Buffer_Summary *buffer, Cpp_Token_Array tokens, int32_t start_pos, int32_t end_pos, int32_t *line_start_out, int32_t *line_end_out){
int32_t line_start = buffer_get_line_number(app, buffer, start_pos);
int32_t line_end = buffer_get_line_number(app, buffer, end_pos);
get_indent_lines_whole_tokens(Application_Links *app, Buffer_Summary *buffer, Cpp_Token_Array tokens, i32 start_pos, i32 end_pos, i32 *line_start_out, i32 *line_end_out){
i32 line_start = buffer_get_line_number(app, buffer, start_pos);
i32 line_end = buffer_get_line_number(app, buffer, end_pos);
for (;line_start > 1;){
int32_t line_start_pos = 0;
i32 line_start_pos = 0;
Cpp_Token *token = get_first_token_at_line(app, buffer, tokens, line_start, &line_start_pos);
if (token && token->start < line_start_pos){
line_start = buffer_get_line_number(app, buffer, token->start);
@ -533,7 +533,7 @@ get_indent_lines_whole_tokens(Application_Links *app, Buffer_Summary *buffer, Cp
}
for (;line_end < buffer->line_count;){
int32_t next_line_start_pos = 0;
i32 next_line_start_pos = 0;
Cpp_Token *token = get_first_token_at_line(app, buffer, tokens, line_end+1, &next_line_start_pos);
if (token && token->start < next_line_start_pos){
line_end = buffer_get_line_number(app, buffer, token->start+token->size);
@ -554,10 +554,10 @@ get_indent_lines_whole_tokens(Application_Links *app, Buffer_Summary *buffer, Cp
*line_end_out = line_end;
}
static bool32
buffer_auto_indent(Application_Links *app, Partition *part, Buffer_Summary *buffer, int32_t start, int32_t end, int32_t tab_width, Auto_Indent_Flag flags){
static b32
buffer_auto_indent(Application_Links *app, Partition *part, Buffer_Summary *buffer, i32 start, i32 end, i32 tab_width, Auto_Indent_Flag flags){
bool32 result = false;
b32 result = false;
if (buffer->exists && buffer->tokens_are_ready){
result = true;
@ -572,7 +572,7 @@ buffer_auto_indent(Application_Links *app, Partition *part, Buffer_Summary *buff
// Stage 2: Decide where the first and last lines are.
// The lines in the range [line_start,line_end) will be indented.
int32_t line_start = 0, line_end = 0;
i32 line_start = 0, line_end = 0;
if (flags & AutoIndent_FullTokens){
get_indent_lines_whole_tokens(app, buffer, tokens, start, end, &line_start, &line_end);
}
@ -583,7 +583,7 @@ buffer_auto_indent(Application_Links *app, Partition *part, Buffer_Summary *buff
// Stage 3: Decide Indent Amounts
// Get an array representing how much each line in
// the range [line_start,line_end) should be indented.
int32_t *indent_marks = get_indentation_marks(app, part, buffer, tokens, line_start, line_end, (flags & AutoIndent_ExactAlignBlock), tab_width);
i32 *indent_marks = get_indentation_marks(app, part, buffer, tokens, line_start, line_end, (flags & AutoIndent_ExactAlignBlock), tab_width);
// Stage 4: Set the Line Indents
Indent_Options opts = {};
@ -599,10 +599,9 @@ buffer_auto_indent(Application_Links *app, Partition *part, Buffer_Summary *buff
return(result);
}
static bool32
buffer_auto_indent(Application_Links *app, Buffer_Summary *buffer, int32_t start, int32_t end, int32_t tab_width, Auto_Indent_Flag flags){
bool32 result = buffer_auto_indent(app, &global_part, buffer, start, end, tab_width, flags);
return(result);
static b32
buffer_auto_indent(Application_Links *app, Buffer_Summary *buffer, i32 start, i32 end, i32 tab_width, Auto_Indent_Flag flags){
return(buffer_auto_indent(app, &global_part, buffer, start, end, tab_width, flags));
}
//
@ -620,7 +619,7 @@ buffer_auto_indent(Application_Links *app, Buffer_Summary *buffer, int32_t start
CUSTOM_COMMAND_SIG(auto_tab_whole_file)
CUSTOM_DOC("Audo-indents the entire current buffer.")
{
uint32_t access = AccessOpen;
u32 access = AccessOpen;
View_Summary view = get_active_view(app, access);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
@ -630,7 +629,7 @@ CUSTOM_DOC("Audo-indents the entire current buffer.")
CUSTOM_COMMAND_SIG(auto_tab_line_at_cursor)
CUSTOM_DOC("Auto-indents the line on which the cursor sits.")
{
uint32_t access = AccessOpen;
u32 access = AccessOpen;
View_Summary view = get_active_view(app, access);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
@ -641,7 +640,7 @@ CUSTOM_DOC("Auto-indents the line on which the cursor sits.")
CUSTOM_COMMAND_SIG(auto_tab_range)
CUSTOM_DOC("Auto-indents the range between the cursor and the mark.")
{
uint32_t access = AccessOpen;
u32 access = AccessOpen;
View_Summary view = get_active_view(app, access);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
Range range = get_view_range(&view);
@ -655,11 +654,11 @@ CUSTOM_DOC("Inserts a character and auto-indents the line on which the cursor si
{
exec_command(app, write_character);
uint32_t access = AccessOpen;
u32 access = AccessOpen;
View_Summary view = get_active_view(app, access);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
uint32_t flags = DEFAULT_INDENT_FLAGS;
u32 flags = DEFAULT_INDENT_FLAGS;
User_Input in = get_command_input(app);
if (in.key.character == '\n'){
flags |= AutoIndent_ExactAlignBlock;

View File

@ -8,30 +8,30 @@
#define FCODER_AUTO_INDENT_H
struct Hard_Start_Result{
int32_t char_pos;
int32_t indent_pos;
int32_t all_whitespace;
int32_t all_space;
i32 char_pos;
i32 indent_pos;
i32 all_whitespace;
i32 all_space;
};
struct Indent_Options{
bool32 empty_blank_lines;
bool32 use_tabs;
int32_t tab_width;
b32 empty_blank_lines;
b32 use_tabs;
i32 tab_width;
};
struct Indent_Parse_State{
int32_t current_indent;
int32_t previous_line_indent;
int32_t paren_nesting;
int32_t paren_anchor_indent[16];
int32_t comment_shift;
int32_t previous_comment_indent;
i32 current_indent;
i32 previous_line_indent;
i32 paren_nesting;
i32 paren_anchor_indent[16];
i32 comment_shift;
i32 previous_comment_indent;
};
struct Indent_Anchor_Position{
Cpp_Token *token;
int32_t indentation;
i32 indentation;
};
#endif

View File

@ -25,7 +25,7 @@ write_character_parameter(Application_Links *app, uint8_t *character, uint32_t l
// NOTE(allen): consecutive inserts merge logic
History_Record_Index first_index = 0;
buffer_history_get_current_state_index(app, buffer.buffer_id, &first_index);
bool32 do_merge = false;
b32 do_merge = false;
if (character[0] != '\n'){
Record_Info record = get_single_record(app, buffer.buffer_id, first_index);
if (record.error == RecordError_NoError && record.kind == RecordKind_Single){
@ -46,7 +46,7 @@ write_character_parameter(Application_Links *app, uint8_t *character, uint32_t l
}
// NOTE(allen): perform the edit
bool32 edit_success = buffer_replace_range(app, &buffer, pos, pos, (char*)character, length);
b32 edit_success = buffer_replace_range(app, &buffer, pos, pos, (char*)character, length);
// NOTE(allen): finish merging records if necessary
if (do_merge){
@ -179,9 +179,9 @@ CUSTOM_DOC("Sets the left size of the view near the x position of the cursor.")
view_set_scroll(app, &view, scroll);
}
static bool32
static b32
view_space_from_screen_space_checked(Vec2_i32 p, Rect_i32 file_region, Vec2 scroll_p, Vec2 *p_out){
bool32 result = false;
b32 result = false;
if (hit_check(file_region, p)){
*p_out = view_space_from_screen_space(V2(p), V2(file_region.p0), scroll_p);
result = true;
@ -541,7 +541,7 @@ CUSTOM_COMMAND_SIG(toggle_filebar)
CUSTOM_DOC("Toggles the visibility status of the current view's filebar.")
{
View_Summary view = get_active_view(app, AccessAll);
bool32 value;
b32 value;
view_get_setting(app, &view, ViewSetting_ShowFileBar, &value);
view_set_setting(app, &view, ViewSetting_ShowFileBar, !value);
}
@ -551,7 +551,7 @@ CUSTOM_DOC("Toggles the current buffer's line wrapping status.")
{
View_Summary view = get_active_view(app, AccessProtected);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessProtected);
bool32 unwrapped = view.unwrapped_lines;
b32 unwrapped = view.unwrapped_lines;
buffer_set_setting(app, &buffer, BufferSetting_WrapLine, unwrapped);
}
@ -699,7 +699,7 @@ isearch__update_highlight(Application_Links *app, View_Summary *view, Managed_Ob
}
static void
isearch(Application_Links *app, bool32 start_reversed, String query_init, bool32 on_the_query_init_string){
isearch(Application_Links *app, b32 start_reversed, String query_init, b32 on_the_query_init_string){
View_Summary view = get_active_view(app, AccessProtected);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessProtected);
if (!buffer.exists){
@ -711,7 +711,7 @@ isearch(Application_Links *app, bool32 start_reversed, String query_init, bool32
return;
}
bool32 reverse = start_reversed;
b32 reverse = start_reversed;
int32_t first_pos = view.cursor.pos;
int32_t pos = first_pos;
@ -729,7 +729,7 @@ isearch(Application_Links *app, bool32 start_reversed, String query_init, bool32
String isearch_str = make_lit_string("I-Search: ");
String rsearch_str = make_lit_string("Reverse-I-Search: ");
bool32 first_step = true;
b32 first_step = true;
Managed_Scope view_scope = view_get_managed_scope(app, view.view_id);
Managed_Object highlight = alloc_buffer_markers_on_buffer(app, buffer.buffer_id, 2, &view_scope);
@ -753,10 +753,10 @@ isearch(Application_Links *app, bool32 start_reversed, String query_init, bool32
bar.prompt = isearch_str;
}
bool32 step_forward = false;
bool32 step_backward = false;
bool32 backspace = false;
bool32 suppress_highligh_update = false;
b32 step_forward = false;
b32 step_backward = false;
b32 backspace = false;
b32 suppress_highligh_update = false;
if (!first_step){
in = get_user_input(app, EventOnAnyKey, EventOnEsc);
@ -765,7 +765,7 @@ isearch(Application_Links *app, bool32 start_reversed, String query_init, bool32
uint8_t character[4];
uint32_t length = to_writable_character(in, character);
bool32 made_change = false;
b32 made_change = false;
if (in.key.keycode == '\n' || in.key.keycode == '\t'){
if (in.key.modifiers[MDFR_CONTROL_INDEX]){
copy(&bar.string, previous_isearch_query);
@ -1009,7 +1009,7 @@ query_replace_base(Application_Links *app, View_Summary *view, Buffer_Summary *b
}
static void
query_replace_parameter(Application_Links *app, String replace_str, int32_t start_pos, bool32 add_replace_query_bar){
query_replace_parameter(Application_Links *app, String replace_str, int32_t start_pos, b32 add_replace_query_bar){
Query_Bar replace;
replace.prompt = make_lit_string("Replace: ");
replace.string = replace_str;
@ -1339,7 +1339,7 @@ CUSTOM_DOC("Swaps the line under the cursor with the line above it, and moves th
int32_t first_len = next_line_pos - this_line_pos;
if (buffer_read_range(app, &buffer, this_line_pos, next_line_pos, swap)){
bool32 second_line_didnt_have_newline = true;
b32 second_line_didnt_have_newline = true;
for (int32_t i = first_len - 1; i >= 0; --i){
if (swap[i] == '\n'){
second_line_didnt_have_newline = false;
@ -1438,9 +1438,9 @@ CUSTOM_DOC("Delete the line the on which the cursor sits.")
////////////////////////////////
static bool32
static b32
get_cpp_matching_file(Application_Links *app, Buffer_Summary buffer, Buffer_Summary *buffer_out){
bool32 result = false;
b32 result = false;
if (buffer.file_name != 0){
char space[512];
@ -1669,7 +1669,7 @@ CUSTOM_DOC("Advances backward through the undo history in the buffer containing
for (Buffer_Summary buffer = get_buffer(app, first_buffer_match, AccessAll);
buffer.exists;
get_buffer_next(app, &buffer, AccessAll)){
bool32 did_match = false;
b32 did_match = false;
for (;;){
History_Record_Index index = 0;
buffer_history_get_current_state_index(app, buffer.buffer_id, &index);
@ -1743,7 +1743,7 @@ CUSTOM_DOC("Advances forward through the undo history in the buffer containing t
for (Buffer_Summary buffer = get_buffer(app, first_buffer_match, AccessAll);
buffer.exists;
get_buffer_next(app, &buffer, AccessAll)){
bool32 did_match = false;
b32 did_match = false;
History_Record_Index max_index = 0;
buffer_history_get_max_record_index(app, buffer.buffer_id, &max_index);
for (;;){

View File

@ -5,7 +5,7 @@
// TOP
static Buffer_Seek
seek_pos(int32_t pos){
seek_pos(i32 pos){
Buffer_Seek result;
result.type = buffer_seek_pos;
result.pos = pos;
@ -13,7 +13,7 @@ seek_pos(int32_t pos){
}
static Buffer_Seek
seek_character_pos(int32_t pos){
seek_character_pos(i32 pos){
Buffer_Seek result;
result.type = buffer_seek_character_pos;
result.pos = pos;
@ -21,7 +21,7 @@ seek_character_pos(int32_t pos){
}
static Buffer_Seek
seek_wrapped_xy(float x, float y, int32_t round_down){
seek_wrapped_xy(f32 x, f32 y, b32 round_down){
Buffer_Seek result;
result.type = buffer_seek_wrapped_xy;
result.x = x;
@ -31,7 +31,7 @@ seek_wrapped_xy(float x, float y, int32_t round_down){
}
static Buffer_Seek
seek_unwrapped_xy(float x, float y, int32_t round_down){
seek_unwrapped_xy(f32 x, f32 y, b32 round_down){
Buffer_Seek result;
result.type = buffer_seek_unwrapped_xy;
result.x = x;
@ -41,7 +41,7 @@ seek_unwrapped_xy(float x, float y, int32_t round_down){
}
static Buffer_Seek
seek_xy(float x, float y, bool32 round_down, bool32 unwrapped){
seek_xy(f32 x, f32 y, b32 round_down, b32 unwrapped){
Buffer_Seek result;
result.type = unwrapped?buffer_seek_unwrapped_xy:buffer_seek_wrapped_xy;
result.x = x;
@ -51,7 +51,7 @@ seek_xy(float x, float y, bool32 round_down, bool32 unwrapped){
}
static Buffer_Seek
seek_line_char(int32_t line, int32_t character){
seek_line_char(i32 line, i32 character){
Buffer_Seek result;
result.type = buffer_seek_line_char;
result.line = line;

View File

@ -11,14 +11,14 @@
//
// There is no requirement that a custom build system in 4coder actually use the
// directory given by this function.
static int32_t
static i32
get_build_directory(Application_Links *app, Buffer_Summary *buffer, String *dir_out){
int32_t result = BuildDir_None;
i32 result = BuildDir_None;
if (buffer != 0 && buffer->file_name != 0){
if (!match_cc(buffer->file_name, buffer->buffer_name)){
char *file_name = buffer->file_name;
int32_t file_name_len = buffer->file_name_len;
i32 file_name_len = buffer->file_name_len;
String dir = make_string_cap(file_name, file_name_len, file_name_len+1);
remove_last_folder(&dir);
append_ss(dir_out, dir);
@ -27,8 +27,8 @@ get_build_directory(Application_Links *app, Buffer_Summary *buffer, String *dir_
}
if (!result){
int32_t len = directory_get_hot(app, dir_out->str,
dir_out->memory_size - dir_out->size);
i32 len = directory_get_hot(app, dir_out->str,
dir_out->memory_size - dir_out->size);
if (dir_out->size + len < dir_out->memory_size){
dir_out->size += len;
result = BuildDir_AtHot;
@ -39,13 +39,13 @@ get_build_directory(Application_Links *app, Buffer_Summary *buffer, String *dir_
}
// TODO(allen): Better names for the "standard build search" family.
static int32_t
static i32
standard_build_search(Application_Links *app, View_Summary *view, Buffer_Summary *active_buffer,
String *dir, String *command, bool32 perform_backup, bool32 use_path_in_command, String filename, String command_name){
int32_t result = false;
String *dir, String *command, b32 perform_backup, b32 use_path_in_command, String filename, String command_name){
i32 result = false;
for(;;){
int32_t old_size = dir->size;
i32 old_size = dir->size;
append_ss(dir, filename);
if (file_exists(app, dir->str, dir->size)){
@ -97,24 +97,24 @@ standard_build_search(Application_Links *app, View_Summary *view, Buffer_Summary
#if defined(IS_WINDOWS)
// NOTE(allen): Build search rule for windows.
static int32_t
static i32
execute_standard_build_search(Application_Links *app, View_Summary *view,
Buffer_Summary *active_buffer,
String *dir, String *command, int32_t perform_backup){
int32_t result = standard_build_search(app, view, active_buffer, dir, command, perform_backup, true, make_lit_string("build.bat"), make_lit_string("build"));
String *dir, String *command, i32 perform_backup){
i32 result = standard_build_search(app, view, active_buffer, dir, command, perform_backup, true, make_lit_string("build.bat"), make_lit_string("build"));
return(result);
}
#elif defined(IS_LINUX) || defined(IS_MAC)
// NOTE(allen): Build search rule for linux and mac.
static int32_t
execute_standard_build_search(Application_Links *app, View_Summary *view, Buffer_Summary *active_buffer, String *dir, String *command, bool32 perform_backup){
static i32
execute_standard_build_search(Application_Links *app, View_Summary *view, Buffer_Summary *active_buffer, String *dir, String *command, b32 perform_backup){
char dir_space[512];
String dir_copy = make_fixed_width_string(dir_space);
copy(&dir_copy, *dir);
int32_t result = standard_build_search(app, view, active_buffer, dir, command, 0, 1, make_lit_string("build.sh"), make_lit_string("build.sh"));
i32 result = standard_build_search(app, view, active_buffer, dir, command, 0, 1, make_lit_string("build.sh"), make_lit_string("build.sh"));
if (!result){
result = standard_build_search(app, view, active_buffer, &dir_copy, command, perform_backup, 0, make_lit_string("Makefile"), make_lit_string("make"));
@ -137,7 +137,7 @@ execute_standard_build(Application_Links *app, View_Summary *view, Buffer_Summar
char command_str_space[512];
String command = make_fixed_width_string(command_str_space);
int32_t build_dir_type = get_build_directory(app, active_buffer, &dir);
i32 build_dir_type = get_build_directory(app, active_buffer, &dir);
if (build_dir_type == BuildDir_AtFile){
if (!execute_standard_build_search(app, view, active_buffer, &dir, &command, false)){
@ -155,7 +155,7 @@ execute_standard_build(Application_Links *app, View_Summary *view, Buffer_Summar
CUSTOM_COMMAND_SIG(build_search)
CUSTOM_DOC("Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*.")
{
uint32_t access = AccessAll;
u32 access = AccessAll;
View_Summary view = get_active_view(app, access);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
execute_standard_build(app, &view, &buffer);
@ -187,7 +187,7 @@ set_fancy_compilation_buffer_font(Application_Links *app){
CUSTOM_COMMAND_SIG(build_in_build_panel)
CUSTOM_DOC("Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*. Puts the *compilation* buffer in a panel at the footer of the current view.")
{
uint32_t access = AccessAll;
u32 access = AccessAll;
View_Summary view = get_active_view(app, access);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);

View File

@ -4,14 +4,14 @@
// TOP
static bool32
post_buffer_range_to_clipboard(Application_Links *app, Partition *scratch, int32_t clipboard_index,
Buffer_Summary *buffer, int32_t first, int32_t one_past_last){
bool32 success = false;
static b32
post_buffer_range_to_clipboard(Application_Links *app, Partition *scratch, i32 clipboard_index,
Buffer_Summary *buffer, i32 first, i32 one_past_last){
b32 success = false;
if (buffer->exists &&
0 <= first && first < one_past_last && one_past_last <= buffer->size){
Temp_Memory temp = begin_temp_memory(scratch);
int32_t size = one_past_last - first;
i32 size = one_past_last - first;
char *str = push_array(scratch, char, size);
if (str != 0){
buffer_read_range(app, buffer, first, one_past_last, str);
@ -46,8 +46,8 @@ CUSTOM_DOC("Cut the text in the range from the cursor to the mark onto the clipb
CUSTOM_COMMAND_SIG(paste)
CUSTOM_DOC("At the cursor, insert the text at the top of the clipboard.")
{
uint32_t access = AccessOpen;
int32_t count = clipboard_count(app, 0);
u32 access = AccessOpen;
i32 count = clipboard_count(app, 0);
if (count > 0){
View_Summary view = get_active_view(app, access);
if_view_has_highlighted_range_delete_range(app, view.view_id);
@ -55,10 +55,10 @@ CUSTOM_DOC("At the cursor, insert the text at the top of the clipboard.")
Managed_Scope scope = view_get_managed_scope(app, view.view_id);
managed_variable_set(app, scope, view_next_rewrite_loc, RewritePaste);
int32_t paste_index = 0;
i32 paste_index = 0;
managed_variable_set(app, scope, view_paste_index_loc, paste_index);
int32_t len = clipboard_index(app, 0, paste_index, 0, 0);
i32 len = clipboard_index(app, 0, paste_index, 0, 0);
char *str = 0;
if (len <= app->memory_size){
str = (char*)app->memory;
@ -68,7 +68,7 @@ CUSTOM_DOC("At the cursor, insert the text at the top of the clipboard.")
clipboard_index(app, 0, paste_index, str, len);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
int32_t pos = view.cursor.pos;
i32 pos = view.cursor.pos;
buffer_replace_range(app, &buffer, pos, pos, str, len);
view_set_mark(app, &view, seek_pos(pos));
view_set_cursor(app, &view, seek_pos(pos + len), true);
@ -85,8 +85,8 @@ CUSTOM_DOC("At the cursor, insert the text at the top of the clipboard.")
CUSTOM_COMMAND_SIG(paste_next)
CUSTOM_DOC("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.")
{
uint32_t access = AccessOpen;
int32_t count = clipboard_count(app, 0);
u32 access = AccessOpen;
i32 count = clipboard_count(app, 0);
if (count > 0){
View_Summary view = get_active_view(app, access);
Managed_Scope scope = view_get_managed_scope(app, view.view_id);
@ -98,10 +98,10 @@ CUSTOM_DOC("If the previous command was paste or paste_next, replaces the paste
managed_variable_set(app, scope, view_next_rewrite_loc, RewritePaste);
uint64_t prev_paste_index = 0;
managed_variable_get(app, scope, view_paste_index_loc, &prev_paste_index);
int32_t paste_index = (int32_t)prev_paste_index + 1;
i32 paste_index = (i32)prev_paste_index + 1;
managed_variable_set(app, scope, view_paste_index_loc, paste_index);
int32_t len = clipboard_index(app, 0, paste_index, 0, 0);
i32 len = clipboard_index(app, 0, paste_index, 0, 0);
char *str = 0;
if (len <= app->memory_size){
@ -113,7 +113,7 @@ CUSTOM_DOC("If the previous command was paste or paste_next, replaces the paste
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
Range range = get_view_range(&view);
int32_t pos = range.min;
i32 pos = range.min;
buffer_replace_range(app, &buffer, range.min, range.max, str, len);
view_set_cursor(app, &view, seek_pos(pos + len), true);

View File

@ -120,9 +120,9 @@ get_start_of_line_at_cursor(Application_Links *app, View_Summary *view, Buffer_S
return(hard_start.char_pos);
}
static bool32
c_line_comment_starts_at_position(Application_Links *app, Buffer_Summary *buffer, int32_t pos){
bool32 alread_has_comment = false;
static b32
c_line_comment_starts_at_position(Application_Links *app, Buffer_Summary *buffer, i32 pos){
b32 alread_has_comment = false;
char check_buffer[2];
if (buffer_read_range(app, buffer, pos, pos + 2, check_buffer)){
if (check_buffer[0] == '/' && check_buffer[1] == '/'){
@ -137,8 +137,8 @@ CUSTOM_DOC("Insert '//' at the beginning of the line after leading whitespace.")
{
View_Summary view = get_active_view(app, AccessOpen);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessOpen);
int32_t pos = get_start_of_line_at_cursor(app, &view, &buffer);
bool32 alread_has_comment = c_line_comment_starts_at_position(app, &buffer, pos);
i32 pos = get_start_of_line_at_cursor(app, &view, &buffer);
b32 alread_has_comment = c_line_comment_starts_at_position(app, &buffer, pos);
if (!alread_has_comment){
buffer_replace_range(app, &buffer, pos, pos, "//", 2);
}
@ -149,8 +149,8 @@ CUSTOM_DOC("If present, delete '//' at the beginning of the line after leading w
{
View_Summary view = get_active_view(app, AccessOpen);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessOpen);
int32_t pos = get_start_of_line_at_cursor(app, &view, &buffer);
bool32 alread_has_comment = c_line_comment_starts_at_position(app, &buffer, pos);
i32 pos = get_start_of_line_at_cursor(app, &view, &buffer);
b32 alread_has_comment = c_line_comment_starts_at_position(app, &buffer, pos);
if (alread_has_comment){
buffer_replace_range(app, &buffer, pos, pos + 2, 0, 0);
}
@ -161,8 +161,8 @@ CUSTOM_DOC("Turns uncommented lines into commented lines and vice versa for comm
{
View_Summary view = get_active_view(app, AccessOpen);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessOpen);
int32_t pos = get_start_of_line_at_cursor(app, &view, &buffer);
bool32 alread_has_comment = c_line_comment_starts_at_position(app, &buffer, pos);
i32 pos = get_start_of_line_at_cursor(app, &view, &buffer);
b32 alread_has_comment = c_line_comment_starts_at_position(app, &buffer, pos);
if (alread_has_comment){
buffer_replace_range(app, &buffer, pos, pos + 2, 0, 0);
}
@ -206,15 +206,15 @@ static Snippet default_snippets[] = {
static void
activate_snippet(Application_Links *app, Partition *scratch, Heap *heap,
View_Summary *view, struct Lister_State *state,
String text_field, void *user_data, bool32 activated_by_mouse){
int32_t index = (int32_t)PtrAsInt(user_data);
String text_field, void *user_data, b32 activated_by_mouse){
i32 index = (i32)PtrAsInt(user_data);
Snippet_Array snippets = *(Snippet_Array*)state->lister.data.user_data;
if (0 <= index && index < snippets.count){
Snippet snippet = snippets.snippets[index];
lister_default(app, scratch, heap, view, state, ListerActivation_Finished);
Buffer_Summary buffer = get_buffer(app, view->buffer_id, AccessOpen);
int32_t pos = view->cursor.pos;
int32_t len = str_size(snippet.text);
i32 pos = view->cursor.pos;
i32 len = str_size(snippet.text);
buffer_replace_range(app, &buffer, pos, pos, snippet.text, len);
view_set_cursor(app, view, seek_pos(pos + snippet.cursor_offset), true);
view_set_mark(app, view, seek_pos(pos + snippet.mark_offset));
@ -232,9 +232,9 @@ snippet_lister__parameterized(Application_Links *app, Snippet_Array snippet_arra
View_Summary view = get_active_view(app, AccessAll);
view_end_ui_mode(app, &view);
Temp_Memory temp = begin_temp_memory(arena);
int32_t option_count = snippet_array.count;
i32 option_count = snippet_array.count;
Lister_Option *options = push_array(arena, Lister_Option, option_count);
for (int32_t i = 0; i < snippet_array.count; i += 1){
for (i32 i = 0; i < snippet_array.count; i += 1){
options[i].string = make_string_slowly(snippet_array.snippets[i].name);
options[i].status = make_string_slowly(snippet_array.snippets[i].text);
options[i].user_data = IntAsPtr(i);

View File

@ -115,9 +115,9 @@ make_config_parser(Partition *arena, String file_name, String data, Cpp_Token_Ar
return(ctx);
}
static bool32
static b32
config_parser__recognize_token(Config_Parser *ctx, Cpp_Token_Type type){
bool32 result = false;
b32 result = false;
if (ctx->start <= ctx->token && ctx->token < ctx->end){
result = (ctx->token->type == type);
}
@ -127,9 +127,9 @@ config_parser__recognize_token(Config_Parser *ctx, Cpp_Token_Type type){
return(result);
}
static bool32
static b32
config_parser__recognize_token_category(Config_Parser *ctx, Cpp_Token_Category category){
bool32 result = false;
b32 result = false;
if (ctx->start <= ctx->token && ctx->token < ctx->end){
result = (cpp_token_category_from_type(ctx->token->type) == category);
}
@ -163,15 +163,15 @@ config_parser__get_int(Config_Parser *ctx){
return(config_integer);
}
static bool32
static b32
config_parser__get_boolean(Config_Parser *ctx){
String str = config_parser__get_lexeme(ctx);
return(match(str, "true"));
}
static bool32
static b32
config_parser__recognize_text(Config_Parser *ctx, String text){
bool32 result = false;
b32 result = false;
String lexeme = config_parser__get_lexeme(ctx);
if (lexeme.str != 0 && match(lexeme, text)){
result = true;
@ -179,18 +179,18 @@ config_parser__recognize_text(Config_Parser *ctx, String text){
return(result);
}
static bool32
static b32
config_parser__match_token(Config_Parser *ctx, Cpp_Token_Type type){
bool32 result = config_parser__recognize_token(ctx, type);
b32 result = config_parser__recognize_token(ctx, type);
if (result){
config_parser__advance_to_next(ctx);
}
return(result);
}
static bool32
static b32
config_parser__match_text(Config_Parser *ctx, String text){
bool32 result = config_parser__recognize_text(ctx, text);
b32 result = config_parser__recognize_text(ctx, text);
if (result){
config_parser__advance_to_next(ctx);
}
@ -423,7 +423,7 @@ config_parser__rvalue(Config_Parser *ctx){
return(rvalue);
}
else if (config_parser__recognize_token_category(ctx, CPP_TOKEN_CAT_BOOLEAN_CONSTANT)){
bool32 b = config_parser__get_boolean(ctx);
b32 b = config_parser__get_boolean(ctx);
config_parser__advance_to_next(ctx);
Config_RValue *rvalue = push_array(ctx->arena, Config_RValue, 1);
memset(rvalue, 0, sizeof(*rvalue));
@ -476,7 +476,7 @@ config_parser__rvalue(Config_Parser *ctx){
static void
config_parser__compound__check(Config_Parser *ctx, Config_Compound *compound){
bool32 implicit_index_allowed = true;
b32 implicit_index_allowed = true;
for (Config_Compound_Element *node = compound->first;
node != 0;
node = node->next){
@ -637,11 +637,11 @@ static Config_Get_Result
config_compound_member(Config *config, Config_Compound *compound, String var_name, int32_t index){
Config_Get_Result result = {};
int32_t implicit_index = 0;
bool32 implicit_index_is_valid = true;
b32 implicit_index_is_valid = true;
for (Config_Compound_Element *element = compound->first;
element != 0;
element = element->next, implicit_index += 1){
bool32 element_matches_query = false;
b32 element_matches_query = false;
switch (element->l.type){
case ConfigLayoutType_Unset:
{
@ -689,109 +689,109 @@ typed_array_reference_list(Partition *arena, Config *parsed, Config_Compound *co
////////////////////////////////
static bool32
static b32
config_has_var(Config *config, String var_name, int32_t subscript){
Config_Get_Result result = config_var(config, var_name, subscript);
bool32 success = result.success && result.type == ConfigRValueType_NoType;
b32 success = result.success && result.type == ConfigRValueType_NoType;
return(success);
}
static bool32
static b32
config_has_var(Config *config, char *var_name, int32_t subscript){
String var_name_str = make_string_slowly(var_name);
Config_Get_Result result = config_var(config, var_name_str, subscript);
bool32 success = result.success && result.type == ConfigRValueType_NoType;
b32 success = result.success && result.type == ConfigRValueType_NoType;
return(success);
}
static bool32
config_bool_var(Config *config, String var_name, int32_t subscript, bool32* var_out){
static b32
config_bool_var(Config *config, String var_name, int32_t subscript, b32* var_out){
Config_Get_Result result = config_var(config, var_name, subscript);
bool32 success = result.success && result.type == ConfigRValueType_Boolean;
b32 success = result.success && result.type == ConfigRValueType_Boolean;
if (success){
*var_out = result.boolean;
}
return(success);
}
static bool32
config_bool_var(Config *config, char *var_name, int32_t subscript, bool32* var_out){
static b32
config_bool_var(Config *config, char *var_name, int32_t subscript, b32* var_out){
String var_name_str = make_string_slowly(var_name);
Config_Get_Result result = config_var(config, var_name_str, subscript);
bool32 success = result.success && result.type == ConfigRValueType_Boolean;
b32 success = result.success && result.type == ConfigRValueType_Boolean;
if (success){
*var_out = result.boolean;
}
return(success);
}
static bool32
static b32
config_int_var(Config *config, String var_name, int32_t subscript, int32_t* var_out){
Config_Get_Result result = config_var(config, var_name, subscript);
bool32 success = result.success && result.type == ConfigRValueType_Integer;
b32 success = result.success && result.type == ConfigRValueType_Integer;
if (success){
*var_out = result.integer;
}
return(success);
}
static bool32
static b32
config_int_var(Config *config, char *var_name, int32_t subscript, int32_t* var_out){
String var_name_str = make_string_slowly(var_name);
Config_Get_Result result = config_var(config, var_name_str, subscript);
bool32 success = result.success && result.type == ConfigRValueType_Integer;
b32 success = result.success && result.type == ConfigRValueType_Integer;
if (success){
*var_out = result.integer;
}
return(success);
}
static bool32
static b32
config_uint_var(Config *config, String var_name, int32_t subscript, uint32_t* var_out){
Config_Get_Result result = config_var(config, var_name, subscript);
bool32 success = result.success && result.type == ConfigRValueType_Integer;
b32 success = result.success && result.type == ConfigRValueType_Integer;
if (success){
*var_out = result.uinteger;
}
return(success);
}
static bool32
static b32
config_uint_var(Config *config, char *var_name, int32_t subscript, uint32_t* var_out){
String var_name_str = make_string_slowly(var_name);
Config_Get_Result result = config_var(config, var_name_str, subscript);
bool32 success = result.success && result.type == ConfigRValueType_Integer;
b32 success = result.success && result.type == ConfigRValueType_Integer;
if (success){
*var_out = result.uinteger;
}
return(success);
}
static bool32
static b32
config_string_var(Config *config, String var_name, int32_t subscript, String* var_out){
Config_Get_Result result = config_var(config, var_name, subscript);
bool32 success = result.success && result.type == ConfigRValueType_String;
b32 success = result.success && result.type == ConfigRValueType_String;
if (success){
*var_out = result.string;
}
return(success);
}
static bool32
static b32
config_string_var(Config *config, char *var_name, int32_t subscript, String* var_out){
String var_name_str = make_string_slowly(var_name);
Config_Get_Result result = config_var(config, var_name_str, subscript);
bool32 success = result.success && result.type == ConfigRValueType_String;
b32 success = result.success && result.type == ConfigRValueType_String;
if (success){
*var_out = result.string;
}
return(success);
}
static bool32
static b32
config_placed_string_var(Config *config, String var_name, int32_t subscript, String* var_out, char *space, int32_t space_size){
Config_Get_Result result = config_var(config, var_name, subscript);
bool32 success = result.success && result.type == ConfigRValueType_String;
b32 success = result.success && result.type == ConfigRValueType_String;
if (success){
*var_out = result.string;
}
@ -803,11 +803,11 @@ config_placed_string_var(Config *config, String var_name, int32_t subscript, Str
return(success);
}
static bool32
static b32
config_placed_string_var(Config *config, char *var_name, int32_t subscript, String* var_out, char *space, int32_t space_size){
String var_name_str = make_string_slowly(var_name);
Config_Get_Result result = config_var(config, var_name_str, subscript);
bool32 success = result.success && result.type == ConfigRValueType_String;
b32 success = result.success && result.type == ConfigRValueType_String;
if (success){
*var_out = result.string;
}
@ -819,162 +819,162 @@ config_placed_string_var(Config *config, char *var_name, int32_t subscript, Stri
return(success);
}
static bool32
static b32
config_char_var(Config *config, String var_name, int32_t subscript, char* var_out){
Config_Get_Result result = config_var(config, var_name, subscript);
bool32 success = result.success && result.type == ConfigRValueType_Character;
b32 success = result.success && result.type == ConfigRValueType_Character;
if (success){
*var_out = result.character;
}
return(success);
}
static bool32
static b32
config_char_var(Config *config, char *var_name, int32_t subscript, char* var_out){
String var_name_str = make_string_slowly(var_name);
Config_Get_Result result = config_var(config, var_name_str, subscript);
bool32 success = result.success && result.type == ConfigRValueType_Character;
b32 success = result.success && result.type == ConfigRValueType_Character;
if (success){
*var_out = result.character;
}
return(success);
}
static bool32
static b32
config_compound_var(Config *config, String var_name, int32_t subscript, Config_Compound** var_out){
Config_Get_Result result = config_var(config, var_name, subscript);
bool32 success = result.success && result.type == ConfigRValueType_Compound;
b32 success = result.success && result.type == ConfigRValueType_Compound;
if (success){
*var_out = result.compound;
}
return(success);
}
static bool32
static b32
config_compound_var(Config *config, char *var_name, int32_t subscript, Config_Compound** var_out){
String var_name_str = make_string_slowly(var_name);
Config_Get_Result result = config_var(config, var_name_str, subscript);
bool32 success = result.success && result.type == ConfigRValueType_Compound;
b32 success = result.success && result.type == ConfigRValueType_Compound;
if (success){
*var_out = result.compound;
}
return(success);
}
static bool32
static b32
config_compound_has_member(Config *config, Config_Compound *compound,
String var_name, int32_t index){
Config_Get_Result result = config_compound_member(config, compound, var_name, index);
bool32 success = result.success && result.type == ConfigRValueType_NoType;
b32 success = result.success && result.type == ConfigRValueType_NoType;
return(success);
}
static bool32
static b32
config_compound_has_member(Config *config, Config_Compound *compound,
char *var_name, int32_t index){
String var_name_str = make_string_slowly(var_name);
Config_Get_Result result = config_compound_member(config, compound, var_name_str, index);
bool32 success = result.success && result.type == ConfigRValueType_NoType;
b32 success = result.success && result.type == ConfigRValueType_NoType;
return(success);
}
static bool32
static b32
config_compound_bool_member(Config *config, Config_Compound *compound,
String var_name, int32_t index, bool32* var_out){
String var_name, int32_t index, b32* var_out){
Config_Get_Result result = config_compound_member(config, compound, var_name, index);
bool32 success = result.success && result.type == ConfigRValueType_Boolean;
b32 success = result.success && result.type == ConfigRValueType_Boolean;
if (success){
*var_out = result.boolean;
}
return(success);
}
static bool32
static b32
config_compound_bool_member(Config *config, Config_Compound *compound,
char *var_name, int32_t index, bool32* var_out){
char *var_name, int32_t index, b32* var_out){
String var_name_str = make_string_slowly(var_name);
Config_Get_Result result = config_compound_member(config, compound, var_name_str, index);
bool32 success = result.success && result.type == ConfigRValueType_Boolean;
b32 success = result.success && result.type == ConfigRValueType_Boolean;
if (success){
*var_out = result.boolean;
}
return(success);
}
static bool32
static b32
config_compound_int_member(Config *config, Config_Compound *compound,
String var_name, int32_t index, int32_t* var_out){
Config_Get_Result result = config_compound_member(config, compound, var_name, index);
bool32 success = result.success && result.type == ConfigRValueType_Integer;
b32 success = result.success && result.type == ConfigRValueType_Integer;
if (success){
*var_out = result.integer;
}
return(success);
}
static bool32
static b32
config_compound_int_member(Config *config, Config_Compound *compound,
char *var_name, int32_t index, int32_t* var_out){
String var_name_str = make_string_slowly(var_name);
Config_Get_Result result = config_compound_member(config, compound, var_name_str, index);
bool32 success = result.success && result.type == ConfigRValueType_Integer;
b32 success = result.success && result.type == ConfigRValueType_Integer;
if (success){
*var_out = result.integer;
}
return(success);
}
static bool32
static b32
config_compound_uint_member(Config *config, Config_Compound *compound,
String var_name, int32_t index, uint32_t* var_out){
Config_Get_Result result = config_compound_member(config, compound, var_name, index);
bool32 success = result.success && result.type == ConfigRValueType_Integer;
b32 success = result.success && result.type == ConfigRValueType_Integer;
if (success){
*var_out = result.uinteger;
}
return(success);
}
static bool32
static b32
config_compound_uint_member(Config *config, Config_Compound *compound,
char *var_name, int32_t index, uint32_t* var_out){
String var_name_str = make_string_slowly(var_name);
Config_Get_Result result = config_compound_member(config, compound, var_name_str, index);
bool32 success = result.success && result.type == ConfigRValueType_Integer;
b32 success = result.success && result.type == ConfigRValueType_Integer;
if (success){
*var_out = result.uinteger;
}
return(success);
}
static bool32
static b32
config_compound_string_member(Config *config, Config_Compound *compound,
String var_name, int32_t index, String* var_out){
Config_Get_Result result = config_compound_member(config, compound, var_name, index);
bool32 success = result.success && result.type == ConfigRValueType_String;
b32 success = result.success && result.type == ConfigRValueType_String;
if (success){
*var_out = result.string;
}
return(success);
}
static bool32
static b32
config_compound_string_member(Config *config, Config_Compound *compound,
char *var_name, int32_t index, String* var_out){
String var_name_str = make_string_slowly(var_name);
Config_Get_Result result = config_compound_member(config, compound, var_name_str, index);
bool32 success = result.success && result.type == ConfigRValueType_String;
b32 success = result.success && result.type == ConfigRValueType_String;
if (success){
*var_out = result.string;
}
return(success);
}
static bool32
static b32
config_compound_placed_string_member(Config *config, Config_Compound *compound,
String var_name, int32_t index, String* var_out, char *space, int32_t space_size){
Config_Get_Result result = config_compound_member(config, compound, var_name, index);
bool32 success = result.success && result.type == ConfigRValueType_String;
b32 success = result.success && result.type == ConfigRValueType_String;
if (success){
*var_out = result.string;
}
@ -986,12 +986,12 @@ config_compound_placed_string_member(Config *config, Config_Compound *compound,
return(success);
}
static bool32
static b32
config_compound_placed_string_member(Config *config, Config_Compound *compound,
char *var_name, int32_t index, String* var_out, char *space, int32_t space_size){
String var_name_str = make_string_slowly(var_name);
Config_Get_Result result = config_compound_member(config, compound, var_name_str, index);
bool32 success = result.success && result.type == ConfigRValueType_String;
b32 success = result.success && result.type == ConfigRValueType_String;
if (success){
*var_out = result.string;
}
@ -1003,46 +1003,46 @@ config_compound_placed_string_member(Config *config, Config_Compound *compound,
return(success);
}
static bool32
static b32
config_compound_char_member(Config *config, Config_Compound *compound,
String var_name, int32_t index, char* var_out){
Config_Get_Result result = config_compound_member(config, compound, var_name, index);
bool32 success = result.success && result.type == ConfigRValueType_Character;
b32 success = result.success && result.type == ConfigRValueType_Character;
if (success){
*var_out = result.character;
}
return(success);
}
static bool32
static b32
config_compound_char_member(Config *config, Config_Compound *compound,
char *var_name, int32_t index, char* var_out){
String var_name_str = make_string_slowly(var_name);
Config_Get_Result result = config_compound_member(config, compound, var_name_str, index);
bool32 success = result.success && result.type == ConfigRValueType_Character;
b32 success = result.success && result.type == ConfigRValueType_Character;
if (success){
*var_out = result.character;
}
return(success);
}
static bool32
static b32
config_compound_compound_member(Config *config, Config_Compound *compound,
String var_name, int32_t index, Config_Compound** var_out){
Config_Get_Result result = config_compound_member(config, compound, var_name, index);
bool32 success = result.success && result.type == ConfigRValueType_Compound;
b32 success = result.success && result.type == ConfigRValueType_Compound;
if (success){
*var_out = result.compound;
}
return(success);
}
static bool32
static b32
config_compound_compound_member(Config *config, Config_Compound *compound,
char *var_name, int32_t index, Config_Compound** var_out){
String var_name_str = make_string_slowly(var_name);
Config_Get_Result result = config_compound_member(config, compound, var_name_str, index);
bool32 success = result.success && result.type == ConfigRValueType_Compound;
b32 success = result.success && result.type == ConfigRValueType_Compound;
if (success){
*var_out = result.compound;
}
@ -1056,9 +1056,9 @@ typed_has_array_iteration_step(Config *config, Config_Compound *compound, int32_
}
static Iteration_Step_Result
typed_bool_array_iteration_step(Config *config, Config_Compound *compound, int32_t index, bool32* var_out){
typed_bool_array_iteration_step(Config *config, Config_Compound *compound, int32_t index, b32* var_out){
Config_Iteration_Step_Result result = typed_array_iteration_step(config, compound, ConfigRValueType_Boolean, index);
bool32 success = (result.step == Iteration_Good);
b32 success = (result.step == Iteration_Good);
if (success){
*var_out = result.get.boolean;
}
@ -1068,7 +1068,7 @@ typed_bool_array_iteration_step(Config *config, Config_Compound *compound, int32
static Iteration_Step_Result
typed_int_array_iteration_step(Config *config, Config_Compound *compound, int32_t index, int32_t* var_out){
Config_Iteration_Step_Result result = typed_array_iteration_step(config, compound, ConfigRValueType_Integer, index);
bool32 success = (result.step == Iteration_Good);
b32 success = (result.step == Iteration_Good);
if (success){
*var_out = result.get.integer;
}
@ -1078,7 +1078,7 @@ typed_int_array_iteration_step(Config *config, Config_Compound *compound, int32_
static Iteration_Step_Result
typed_uint_array_iteration_step(Config *config, Config_Compound *compound, int32_t index, uint32_t* var_out){
Config_Iteration_Step_Result result = typed_array_iteration_step(config, compound, ConfigRValueType_Integer, index);
bool32 success = (result.step == Iteration_Good);
b32 success = (result.step == Iteration_Good);
if (success){
*var_out = result.get.uinteger;
}
@ -1088,7 +1088,7 @@ typed_uint_array_iteration_step(Config *config, Config_Compound *compound, int32
static Iteration_Step_Result
typed_string_array_iteration_step(Config *config, Config_Compound *compound, int32_t index, String* var_out){
Config_Iteration_Step_Result result = typed_array_iteration_step(config, compound, ConfigRValueType_String, index);
bool32 success = (result.step == Iteration_Good);
b32 success = (result.step == Iteration_Good);
if (success){
*var_out = result.get.string;
}
@ -1099,7 +1099,7 @@ static Iteration_Step_Result
typed_placed_string_array_iteration_step(Config *config, Config_Compound *compound, int32_t index, String* var_out
, char *space, int32_t space_size){
Config_Iteration_Step_Result result = typed_array_iteration_step(config, compound, ConfigRValueType_String, index);
bool32 success = (result.step == Iteration_Good);
b32 success = (result.step == Iteration_Good);
if (success){
*var_out = result.get.string;
}
@ -1114,7 +1114,7 @@ typed_placed_string_array_iteration_step(Config *config, Config_Compound *compou
static Iteration_Step_Result
typed_char_array_iteration_step(Config *config, Config_Compound *compound, int32_t index, char* var_out){
Config_Iteration_Step_Result result = typed_array_iteration_step(config, compound, ConfigRValueType_Character, index);
bool32 success = (result.step == Iteration_Good);
b32 success = (result.step == Iteration_Good);
if (success){
*var_out = result.get.character;
}
@ -1124,7 +1124,7 @@ typed_char_array_iteration_step(Config *config, Config_Compound *compound, int32
static Iteration_Step_Result
typed_compound_array_iteration_step(Config *config, Config_Compound *compound, int32_t index, Config_Compound** var_out){
Config_Iteration_Step_Result result = typed_array_iteration_step(config, compound, ConfigRValueType_Compound, index);
bool32 success = (result.step == Iteration_Good);
b32 success = (result.step == Iteration_Good);
if (success){
*var_out = result.get.compound;
}
@ -1273,7 +1273,7 @@ typed_array_reference_list(Partition *arena, Config *parsed, Config_Compound *co
static void
change_mapping(Application_Links *app, String mapping){
bool32 did_remap = false;
b32 did_remap = false;
for (int32_t i = 0; i < named_map_count; ++i){
if (match(mapping, named_maps[i].name)){
did_remap = true;
@ -1304,7 +1304,7 @@ change_mode(Application_Links *app, String mode){
static Cpp_Token_Array
text_data_to_token_array(Partition *arena, String data){
bool32 success = false;
b32 success = false;
int32_t max_count = (1 << 20)/sizeof(Cpp_Token);
Temp_Memory restore_point = begin_temp_memory(arena);
Cpp_Token_Array array = {};
@ -1405,7 +1405,7 @@ static Config*
config_parse__data(Partition *arena, String file_name, String data, Config_Data *config){
config_init_default(config);
bool32 success = false;
b32 success = false;
Config *parsed = text_data_to_parsed_data(arena, file_name, data);
if (parsed != 0){
@ -1492,7 +1492,7 @@ static Config*
config_parse__file_name(Application_Links *app, Partition *arena,
char *file_name, Config_Data *config){
Config *parsed = 0;
bool32 success = false;
b32 success = false;
FILE *file = open_file_try_current_path_then_binary_path(app, file_name);
if (file != 0){
String data = dump_file_handle(arena, file);
@ -1574,7 +1574,7 @@ theme_parse__file_name(Application_Links *app, Partition *arena,
////////////////////////////////
static void
config_feedback_bool(String *space, char *name, bool32 val){
config_feedback_bool(String *space, char *name, b32 val){
append(space, name);
append(space, " = ");
append(space, (char*)(val?"true":"false"));
@ -1621,7 +1621,7 @@ config_feedback_int(String *space, char *name, int32_t val){
static void
load_config_and_apply(Application_Links *app, Partition *scratch, Config_Data *config,
int32_t override_font_size, bool32 override_hinting){
int32_t override_font_size, b32 override_hinting){
Temp_Memory temp = begin_temp_memory(scratch);
Config *parsed = config_parse__file_name(app, scratch, "config.4coder", config);

View File

@ -12,8 +12,8 @@
#include <stdio.h>
struct Error_Location{
int32_t line_number;
int32_t column_number;
i32 line_number;
i32 column_number;
};
struct Config_Error{
@ -27,7 +27,7 @@ struct Config_Error{
struct Config_Error_List{
Config_Error *first;
Config_Error *last;
int32_t count;
i32 count;
};
struct Config_Parser{
@ -45,10 +45,10 @@ struct Config_Parser{
struct Config_LValue{
String identifier;
int32_t index;
i32 index;
};
typedef int32_t Config_RValue_Type;
typedef i32 Config_RValue_Type;
enum{
ConfigRValueType_LValue = 0,
ConfigRValueType_Boolean = 1,
@ -66,16 +66,16 @@ enum{
struct Config_Compound{
struct Config_Compound_Element *first;
struct Config_Compound_Element *last;
int32_t count;
i32 count;
};
struct Config_RValue{
Config_RValue_Type type;
union{
Config_LValue *lvalue;
bool32 boolean;
int32_t integer;
uint32_t uinteger;
b32 boolean;
i32 integer;
u32 uinteger;
String string;
char character;
Config_Compound *compound;
@ -83,14 +83,14 @@ struct Config_RValue{
};
struct Config_Integer{
bool32 is_signed;
b32 is_signed;
union{
int32_t integer;
uint32_t uinteger;
i32 integer;
u32 uinteger;
};
};
typedef int32_t Config_Layout_Type;
typedef i32 Config_Layout_Type;
enum{
ConfigLayoutType_Unset = 0,
ConfigLayoutType_Identifier = 1,
@ -102,7 +102,7 @@ struct Config_Layout{
char *pos;
union{
String identifier;
int32_t integer;
i32 integer;
};
};
@ -122,14 +122,14 @@ struct Config_Assignment{
Config_LValue *l;
Config_RValue *r;
bool32 visited;
b32 visited;
};
struct Config{
int32_t *version;
i32 *version;
Config_Assignment *first;
Config_Assignment *last;
int32_t count;
i32 count;
Config_Error_List errors;
@ -139,7 +139,7 @@ struct Config{
////////////////////////////////
typedef int32_t Iteration_Step_Result;
typedef i32 Iteration_Step_Result;
enum{
Iteration_Good = 0,
Iteration_Skip = 1,
@ -147,13 +147,13 @@ enum{
};
struct Config_Get_Result{
bool32 success;
b32 success;
Config_RValue_Type type;
char *pos;
union{
bool32 boolean;
int32_t integer;
uint32_t uinteger;
b32 boolean;
i32 integer;
u32 uinteger;
String string;
char character;
Config_Compound *compound;
@ -174,7 +174,7 @@ struct Config_Get_Result_Node{
struct Config_Get_Result_List{
Config_Get_Result_Node *first;
Config_Get_Result_Node *last;
int32_t count;
i32 count;
};
////////////////////////////////
@ -182,12 +182,12 @@ struct Config_Get_Result_List{
struct Extension_List{
char space[256];
char *exts[94];
int32_t count;
i32 count;
};
struct CString_Array{
char **strings;
int32_t count;
i32 count;
};
struct Config_Data{
@ -202,35 +202,35 @@ struct Config_Data{
char mode_space[64];
String mode;
bool32 use_scroll_bars;
bool32 use_file_bars;
bool32 use_line_highlight;
bool32 use_scope_highlight;
bool32 use_paren_helper;
bool32 use_comment_keyword;
b32 use_scroll_bars;
b32 use_file_bars;
b32 use_line_highlight;
b32 use_scope_highlight;
b32 use_paren_helper;
b32 use_comment_keyword;
bool32 enable_virtual_whitespace;
bool32 enable_code_wrapping;
bool32 automatically_indent_text_on_save;
bool32 automatically_save_changes_on_build;
bool32 automatically_adjust_wrapping;
bool32 automatically_load_project;
b32 enable_virtual_whitespace;
b32 enable_code_wrapping;
b32 automatically_indent_text_on_save;
b32 automatically_save_changes_on_build;
b32 automatically_adjust_wrapping;
b32 automatically_load_project;
bool32 indent_with_tabs;
int32_t indent_width;
b32 indent_with_tabs;
i32 indent_width;
int32_t default_wrap_width;
int32_t default_min_base_width;
i32 default_wrap_width;
i32 default_min_base_width;
char default_theme_name_space[256];
String default_theme_name;
bool32 highlight_line_at_cursor;
b32 highlight_line_at_cursor;
char default_font_name_space[256];
String default_font_name;
int32_t default_font_size;
bool32 default_font_hinting;
i32 default_font_size;
b32 default_font_hinting;
char default_compiler_bat_space[256];
String default_compiler_bat;
@ -244,7 +244,7 @@ struct Config_Data{
char default_flags_sh_space[1024];
String default_flags_sh;
bool32 lalt_lctrl_is_altgr;
b32 lalt_lctrl_is_altgr;
};
#if 0

View File

@ -60,12 +60,12 @@ new_view_settings(Application_Links *app, View_Summary *view){
////////////////////////////////
static void
view_set_passive(Application_Links *app, View_Summary *view, bool32 value){
view_set_passive(Application_Links *app, View_Summary *view, b32 value){
Managed_Scope scope = view_get_managed_scope(app, view->view_id);
managed_variable_set(app, scope, view_is_passive_loc, (uint64_t)value);
}
static bool32
static b32
view_get_is_passive(Application_Links *app, View_Summary *view){
Managed_Scope scope = view_get_managed_scope(app, view->view_id);
uint64_t is_passive = 0;
@ -94,7 +94,7 @@ close_build_footer_panel(Application_Links *app){
}
static View_Summary
open_build_footer_panel(Application_Links *app, bool32 create_if_not_exist = true){
open_build_footer_panel(Application_Links *app, b32 create_if_not_exist = true){
View_Summary special_view = get_view(app, build_footer_panel_view_id, AccessAll);
if (create_if_not_exist && !special_view.exists){
View_Summary view = get_active_view(app, AccessAll);
@ -227,7 +227,7 @@ create_or_switch_to_buffer_by_name(Application_Links *app, char *name, int32_t n
////////////////////////////////
static void
set_mouse_suppression(Application_Links *app, bool32 suppress){
set_mouse_suppression(Application_Links *app, b32 suppress){
if (suppress){
suppressing_mouse = true;
show_mouse_cursor(app, MouseCursorShow_Never);

View File

@ -8,7 +8,7 @@ the default 4coder behavior.
static Named_Mapping *named_maps = 0;
static int32_t named_map_count = 0;
static bool32 allow_immediate_close_without_checking_for_changes = false;
static b32 allow_immediate_close_without_checking_for_changes = false;
static char *default_extensions[] = {
"cpp",
@ -26,7 +26,7 @@ static char *default_extensions[] = {
#if !defined(AUTO_CENTER_AFTER_JUMPS)
#define AUTO_CENTER_AFTER_JUMPS true
#endif
static bool32 auto_center_after_jumps = AUTO_CENTER_AFTER_JUMPS;
static b32 auto_center_after_jumps = AUTO_CENTER_AFTER_JUMPS;
static char locked_buffer_space[256];
static String locked_buffer = make_fixed_width_string(locked_buffer_space);

View File

@ -54,8 +54,8 @@ START_HOOK_SIG(default_start){
panel_get_margin(app, header, &header_margin);
panel_get_margin(app, header, &bottom_margin);
int32_t header_vertical_pixels = header_margin.y0 + header_margin.y1;
int32_t margin_vertical_pixels = header_vertical_pixels + bottom_margin.y0 + bottom_margin.y1;
i32 header_vertical_pixels = header_margin.y0 + header_margin.y1;
i32 margin_vertical_pixels = header_vertical_pixels + bottom_margin.y0 + bottom_margin.y1;
View_Summary view = {};
get_view_summary(app, left_view, AccessAll, &view);
@ -122,12 +122,12 @@ struct Highlight_Record{
};
static void
sort_highlight_record(Highlight_Record *records, int32_t first, int32_t one_past_last){
sort_highlight_record(Highlight_Record *records, i32 first, i32 one_past_last){
if (first + 1 < one_past_last){
int32_t pivot_index = one_past_last - 1;
i32 pivot_index = one_past_last - 1;
int_color pivot_color = records[pivot_index].color;
int32_t j = first;
for (int32_t i = first; i < pivot_index; i += 1){
i32 j = first;
for (i32 i = first; i < pivot_index; i += 1){
int_color color = records[i].color;
if (color < pivot_color){
Swap(Highlight_Record, records[i], records[j]);
@ -144,7 +144,7 @@ sort_highlight_record(Highlight_Record *records, int32_t first, int32_t one_past
static Range_Array
get_enclosure_ranges(Application_Links *app, Partition *part,
Buffer_Summary *buffer, int32_t pos, uint32_t flags){
Buffer_Summary *buffer, i32 pos, u32 flags){
Range_Array array = {};
array.ranges = push_array(part, Range, 0);
for (;;){
@ -158,24 +158,24 @@ get_enclosure_ranges(Application_Links *app, Partition *part,
break;
}
}
array.count = (int32_t)(push_array(part, Range, 0) - array.ranges);
array.count = (i32)(push_array(part, Range, 0) - array.ranges);
return(array);
}
static void
mark_enclosures(Application_Links *app, Partition *scratch, Managed_Scope render_scope,
Buffer_Summary *buffer, int32_t pos, uint32_t flags,
Buffer_Summary *buffer, i32 pos, u32 flags,
Marker_Visual_Type type,
int_color *back_colors, int_color *fore_colors, int32_t color_count){
int_color *back_colors, int_color *fore_colors, i32 color_count){
Temp_Memory temp = begin_temp_memory(scratch);
Range_Array ranges = get_enclosure_ranges(app, scratch, buffer, pos, flags);
if (ranges.count > 0){
int32_t marker_count = ranges.count*2;
i32 marker_count = ranges.count*2;
Marker *markers = push_array(scratch, Marker, marker_count);
Marker *marker = markers;
Range *range = ranges.ranges;
for (int32_t i = 0;
for (i32 i = 0;
i < ranges.count;
i += 1, range += 1, marker += 2){
marker[0].pos = range->first;
@ -188,8 +188,8 @@ mark_enclosures(Application_Links *app, Partition *scratch, Managed_Scope render
take_rule.take_count_per_step = 2;
take_rule.step_stride_in_marker_count = 8;
int32_t first_color_index = (ranges.count - 1)%color_count;
for (int32_t i = 0, color_index = first_color_index;
i32 first_color_index = (ranges.count - 1)%color_count;
for (i32 i = 0, color_index = first_color_index;
i < color_count;
i += 1){
Marker_Visual visual = create_marker_visual(app, o);
@ -275,12 +275,11 @@ MODIFY_COLOR_TABLE_SIG(default_modify_color_table){
}
static void
default_buffer_render_caller(Application_Links *app, View_ID view_id, Range on_screen_range, i32 frame_index, f32 literal_dt, f32 animation_dt,
Render_Callback *do_core_render){
View_Summary view = get_view(app, view_id, AccessAll);
default_buffer_render_caller(Application_Links *app, Render_Parameters render_params){
View_Summary view = get_view(app, render_params.view_id, AccessAll);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessAll);
View_Summary active_view = get_active_view(app, AccessAll);
bool32 is_active_view = (active_view.view_id == view_id);
b32 is_active_view = (active_view.view_id == render_params.view_id);
static Managed_Scope render_scope = 0;
if (render_scope == 0){
@ -292,16 +291,16 @@ default_buffer_render_caller(Application_Links *app, View_ID view_id, Range on_s
// NOTE(allen): Scan for TODOs and NOTEs
{
Temp_Memory temp = begin_temp_memory(scratch);
int32_t text_size = on_screen_range.one_past_last - on_screen_range.first;
i32 text_size = render_params.on_screen_range.one_past_last - render_params.on_screen_range.first;
char *text = push_array(scratch, char, text_size);
buffer_read_range(app, &buffer, on_screen_range.first, on_screen_range.one_past_last, text);
buffer_read_range(app, &buffer, render_params.on_screen_range.first, render_params.on_screen_range.one_past_last, text);
Highlight_Record *records = push_array(scratch, Highlight_Record, 0);
String tail = make_string(text, text_size);
for (int32_t i = 0; i < text_size; tail.str += 1, tail.size -= 1, i += 1){
for (i32 i = 0; i < text_size; tail.str += 1, tail.size -= 1, i += 1){
if (match_part(tail, make_lit_string("NOTE"))){
Highlight_Record *record = push_array(scratch, Highlight_Record, 1);
record->first = i + on_screen_range.first;
record->first = i + render_params.on_screen_range.first;
record->one_past_last = record->first + 4;
record->color = Stag_Text_Cycle_2;
tail.str += 3;
@ -310,7 +309,7 @@ default_buffer_render_caller(Application_Links *app, View_ID view_id, Range on_s
}
else if (match_part(tail, make_lit_string("TODO"))){
Highlight_Record *record = push_array(scratch, Highlight_Record, 1);
record->first = i + on_screen_range.first;
record->first = i + render_params.on_screen_range.first;
record->one_past_last = record->first + 4;
record->color = Stag_Text_Cycle_1;
tail.str += 3;
@ -318,7 +317,7 @@ default_buffer_render_caller(Application_Links *app, View_ID view_id, Range on_s
i += 3;
}
}
int32_t record_count = (int32_t)(push_array(scratch, Highlight_Record, 0) - records);
i32 record_count = (i32)(push_array(scratch, Highlight_Record, 0) - records);
push_array(scratch, Highlight_Record, 1);
if (record_count > 0){
@ -331,10 +330,10 @@ default_buffer_render_caller(Application_Links *app, View_ID view_id, Range on_s
marker[0].pos = records[0].first;
marker[1].pos = records[0].one_past_last;
}
for (int32_t i = 1; i <= record_count; i += 1){
bool32 do_emit = i == record_count || (records[i].color != current_color);
for (i32 i = 1; i <= record_count; i += 1){
b32 do_emit = i == record_count || (records[i].color != current_color);
if (do_emit){
int32_t marker_count = (int32_t)(push_array(scratch, Marker, 0) - markers);
i32 marker_count = (i32)(push_array(scratch, Marker, 0) - markers);
Managed_Object o = alloc_buffer_markers_on_buffer(app, buffer.buffer_id, marker_count, &render_scope);
managed_object_store_data(app, o, 0, marker_count, markers);
Marker_Visual v = create_marker_visual(app, o);
@ -360,7 +359,7 @@ default_buffer_render_caller(Application_Links *app, View_ID view_id, Range on_s
cm_markers[1].pos = view.mark.pos;
managed_object_store_data(app, cursor_and_mark, 0, 2, cm_markers);
bool32 cursor_is_hidden_in_this_view = (cursor_is_hidden && is_active_view);
b32 cursor_is_hidden_in_this_view = (cursor_is_hidden && is_active_view);
if (!cursor_is_hidden_in_this_view){
switch (fcoder_mode){
case FCoderMode_Original:
@ -414,7 +413,7 @@ default_buffer_render_caller(Application_Links *app, View_ID view_id, Range on_s
// NOTE(allen): Line highlight setup
if (highlight_line_at_cursor && is_active_view){
uint32_t line_color = Stag_Highlight_Cursor_Line;
u32 line_color = Stag_Highlight_Cursor_Line;
Marker_Visual visual = create_marker_visual(app, cursor_and_mark);
marker_visual_set_effect(app, visual, VisualType_LineHighlights, line_color, 0, 0);
Marker_Visual_Take_Rule take_rule = {};
@ -427,15 +426,15 @@ default_buffer_render_caller(Application_Links *app, View_ID view_id, Range on_s
}
// NOTE(allen): Token highlight setup
bool32 do_token_highlight = false;
b32 do_token_highlight = false;
if (do_token_highlight){
int_color token_color = 0x5000EE00;
uint32_t token_flags = BoundaryToken|BoundaryWhitespace;
int32_t pos0 = view.cursor.pos;
int32_t pos1 = buffer_boundary_seek(app, &buffer, pos0, DirLeft , token_flags);
u32 token_flags = BoundaryToken|BoundaryWhitespace;
i32 pos0 = view.cursor.pos;
i32 pos1 = buffer_boundary_seek(app, &buffer, pos0, DirLeft , token_flags);
if (pos1 >= 0){
int32_t pos2 = buffer_boundary_seek(app, &buffer, pos1, DirRight, token_flags);
i32 pos2 = buffer_boundary_seek(app, &buffer, pos1, DirRight, token_flags);
if (pos2 <= buffer.size){
Managed_Object token_highlight = alloc_buffer_markers_on_buffer(app, buffer.buffer_id, 2, &render_scope);
Marker range_markers[2] = {};
@ -449,7 +448,7 @@ default_buffer_render_caller(Application_Links *app, View_ID view_id, Range on_s
}
// NOTE(allen): Matching enclosure highlight setup
static const int32_t color_count = 4;
static const i32 color_count = 4;
if (do_matching_enclosure_highlight){
int_color colors[color_count];
for (u16 i = 0; i < color_count; i += 1){
@ -458,7 +457,7 @@ default_buffer_render_caller(Application_Links *app, View_ID view_id, Range on_s
mark_enclosures(app, scratch, render_scope, &buffer, view.cursor.pos, FindScope_Brace, VisualType_LineHighlightRanges, colors, 0, color_count);
}
if (do_matching_paren_highlight){
int32_t pos = view.cursor.pos;
i32 pos = view.cursor.pos;
if (buffer_get_char(app, &buffer, pos) == '('){
pos += 1;
}
@ -474,7 +473,7 @@ default_buffer_render_caller(Application_Links *app, View_ID view_id, Range on_s
mark_enclosures(app, scratch, render_scope, &buffer, pos, FindScope_Paren, VisualType_CharacterBlocks, 0, colors, color_count);
}
do_core_render(app);
render_params.do_core_render(app);
// NOTE(allen): FPS HUD
if (show_fps_hud){
@ -483,10 +482,10 @@ default_buffer_render_caller(Application_Links *app, View_ID view_id, Range on_s
static f32 history_animation_dt[history_depth] = {};
static i32 history_frame_index[history_depth] = {};
i32 wrapped_index = frame_index%history_depth;
history_literal_dt[wrapped_index] = literal_dt;
history_animation_dt[wrapped_index] = animation_dt;
history_frame_index[wrapped_index] = frame_index;
i32 wrapped_index = render_params.frame.index%history_depth;
history_literal_dt[wrapped_index] = render_params.frame.literal_dt;
history_animation_dt[wrapped_index] = render_params.frame.animation_dt;
history_frame_index[wrapped_index] = render_params.frame.index;
Rect_f32 hud_rect = f32R(view.render_region);
hud_rect.y0 = hud_rect.y1 - view.line_height*(f32)(history_depth);
@ -569,13 +568,12 @@ get_margin_color(i32 level){
}
static void
default_ui_render_caller(Application_Links *app, View_ID view_id, Range on_screen_range, i32 frame_index, f32 literal_dt, f32 animation_dt,
Render_Callback *do_core_render){
default_ui_render_caller(Application_Links *app, Render_Parameters render_params){
UI_Data *ui_data = 0;
Arena *ui_arena = 0;
if (view_get_ui_data(app, view_id, ViewGetUIFlag_KeepDataAsIs, &ui_data, &ui_arena)){
if (view_get_ui_data(app, render_params.view_id, ViewGetUIFlag_KeepDataAsIs, &ui_data, &ui_arena)){
View_Summary view = {};
if (get_view_summary(app, view_id, AccessAll, &view)){
if (get_view_summary(app, render_params.view_id, AccessAll, &view)){
Rect_f32 rect_f32 = f32R(view.render_region);
GUI_Scroll_Vars ui_scroll = view.scroll_vars;
@ -621,11 +619,11 @@ default_ui_render_caller(Application_Links *app, View_ID view_id, Range on_scree
}
RENDER_CALLER_SIG(default_render_caller){
if (view_is_in_ui_mode(app, view_id)){
default_ui_render_caller(app, view_id, on_screen_range, frame_index, literal_dt, animation_dt, do_core_render);
if (view_is_in_ui_mode(app, render_params.view_id)){
default_ui_render_caller(app, render_params);
}
else{
default_buffer_render_caller(app, view_id, on_screen_range, frame_index, literal_dt, animation_dt, do_core_render);
default_buffer_render_caller(app, render_params);
}
}
@ -635,7 +633,7 @@ HOOK_SIG(default_exit){
return(1);
}
bool32 has_unsaved_changes = false;
b32 has_unsaved_changes = false;
for (Buffer_Summary buffer = get_buffer_first(app, AccessAll);
buffer.exists;
@ -662,7 +660,7 @@ HOOK_SIG(default_view_adjust){
view.exists;
get_view_next(app, &view, AccessAll)){
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessAll);
int32_t view_width = view.render_region.x1 - view.render_region.x0;
i32 view_width = view.render_region.x1 - view.render_region.x0;
Face_ID face_id = get_default_font_for_view(app, view.view_id);
float em = get_string_advance(app, face_id, make_lit_string("m"));
@ -673,8 +671,8 @@ HOOK_SIG(default_view_adjust){
}
float min_base_width = 20.0f*em;
buffer_set_setting(app, &buffer, BufferSetting_WrapPosition, (int32_t)(wrap_width));
buffer_set_setting(app, &buffer, BufferSetting_MinimumBaseWrapPosition, (int32_t)(min_base_width));
buffer_set_setting(app, &buffer, BufferSetting_WrapPosition, (i32)(wrap_width));
buffer_set_setting(app, &buffer, BufferSetting_MinimumBaseWrapPosition, (i32)(min_base_width));
}
return(0);
}
@ -685,24 +683,24 @@ BUFFER_NAME_RESOLVER_SIG(default_buffer_name_resolution){
Partition *part = &global_part;
Temp_Memory temp = begin_temp_memory(part);
int32_t *unresolved = push_array(part, int32_t, conflict_count);
i32 *unresolved = push_array(part, i32, conflict_count);
if (unresolved == 0) return;
int32_t unresolved_count = conflict_count;
for (int32_t i = 0; i < conflict_count; ++i){
i32 unresolved_count = conflict_count;
for (i32 i = 0; i < conflict_count; ++i){
unresolved[i] = i;
}
// Resolution Loop
int32_t x = 0;
i32 x = 0;
for (;;){
// Resolution Pass
++x;
for (int32_t i = 0; i < unresolved_count; ++i){
int32_t conflict_index = unresolved[i];
for (i32 i = 0; i < unresolved_count; ++i){
i32 conflict_index = unresolved[i];
Buffer_Name_Conflict_Entry *conflict = &conflicts[conflict_index];
int32_t len = conflict->base_name_len;
i32 len = conflict->base_name_len;
if (len < 0){
len = 0;
}
@ -721,8 +719,8 @@ BUFFER_NAME_RESOLVER_SIG(default_buffer_name_resolution){
if (s_file_name.size > 0){
s_file_name.size -= 1;
char *end = s_file_name.str + s_file_name.size;
bool32 past_the_end = false;
for (int32_t j = 0; j < x; ++j){
b32 past_the_end = false;
for (i32 j = 0; j < x; ++j){
s_file_name = path_of_directory(s_file_name);
if (j + 1 < x){
s_file_name.size -= 1;
@ -737,7 +735,7 @@ BUFFER_NAME_RESOLVER_SIG(default_buffer_name_resolution){
}
char *start = s_file_name.str + s_file_name.size;
append(&uniqueifier, make_string(start, (int32_t)(end - start)));
append(&uniqueifier, make_string(start, (i32)(end - start)));
if (past_the_end){
append(&uniqueifier, "~");
append_int_to_str(&uniqueifier, i);
@ -758,19 +756,19 @@ BUFFER_NAME_RESOLVER_SIG(default_buffer_name_resolution){
}
// Conflict Check Pass
bool32 has_conflicts = false;
for (int32_t i = 0; i < unresolved_count; ++i){
int32_t conflict_index = unresolved[i];
b32 has_conflicts = false;
for (i32 i = 0; i < unresolved_count; ++i){
i32 conflict_index = unresolved[i];
Buffer_Name_Conflict_Entry *conflict = &conflicts[conflict_index];
String conflict_name = make_string(conflict->unique_name_in_out,
conflict->unique_name_len_in_out);
bool32 hit_conflict = false;
b32 hit_conflict = false;
if (conflict->file_name != 0){
for (int32_t j = 0; j < unresolved_count; ++j){
for (i32 j = 0; j < unresolved_count; ++j){
if (i == j) continue;
int32_t conflict_j_index = unresolved[j];
i32 conflict_j_index = unresolved[j];
Buffer_Name_Conflict_Entry *conflict_j = &conflicts[conflict_j_index];
if (match(conflict_name, make_string(conflict_j->unique_name_in_out,
@ -818,7 +816,7 @@ OPEN_FILE_HOOK_SIG(default_file_settings){
if (buffer.file_name != 0 && buffer.size < (16 << 20)){
String name = make_string(buffer.file_name, buffer.file_name_len);
String ext = file_extension(name);
for (int32_t i = 0; i < extensions.count; ++i){
for (i32 i = 0; i < extensions.count; ++i){
if (match(ext, extensions.strings[i])){
treat_as_code = true;
@ -944,7 +942,7 @@ OPEN_FILE_HOOK_SIG(default_file_save){
Buffer_Summary buffer = get_buffer(app, buffer_id, AccessAll);
Assert(buffer.exists);
int32_t is_virtual = 0;
i32 is_virtual = 0;
if (global_config.automatically_indent_text_on_save &&
buffer_get_setting(app, &buffer, BufferSetting_VirtualWhitespace, &is_virtual)){
if (is_virtual){
@ -957,7 +955,7 @@ OPEN_FILE_HOOK_SIG(default_file_save){
}
FILE_EDIT_FINISHED_SIG(default_file_edit){
for (int32_t i = 0; i < buffer_id_count; i += 1){
for (i32 i = 0; i < buffer_id_count; i += 1){
#if 0
// NOTE(allen|4.0.31): This code is example usage, it's not a particularly nice feature to actually have.
@ -1045,9 +1043,9 @@ struct Scroll_Velocity{
Scroll_Velocity scroll_velocity_[16] = {};
Scroll_Velocity *scroll_velocity = scroll_velocity_ - 1;
static int32_t
static i32
smooth_camera_step(float target, float *current, float *vel, float S, float T){
int32_t result = 0;
i32 result = 0;
float curr = *current;
float v = *vel;
if (curr != target){
@ -1058,7 +1056,7 @@ smooth_camera_step(float target, float *current, float *vel, float S, float T){
else{
float L = curr + T*(target - curr);
int32_t sign = (target > curr) - (target < curr);
i32 sign = (target > curr) - (target < curr);
float V = curr + sign*v;
if (sign > 0) curr = (L<V)?(L):(V);
@ -1078,7 +1076,7 @@ smooth_camera_step(float target, float *current, float *vel, float S, float T){
SCROLL_RULE_SIG(smooth_scroll_rule){
Scroll_Velocity *velocity = scroll_velocity + view_id;
int32_t result = 0;
i32 result = 0;
if (velocity->x == 0.f){
velocity->x = 1.f;
velocity->y = 1.f;

View File

@ -13,7 +13,7 @@
#include <string.h>
static float
get_line_y(Application_Links *app, View_Summary *view, int32_t line){
get_line_y(Application_Links *app, View_Summary *view, i32 line){
Full_Cursor cursor = {};
view_compute_cursor(app, view, seek_line_char(line, 1), &cursor);
float y = cursor.wrapped_y;
@ -31,13 +31,13 @@ CUSTOM_DOC("Delete characters in a rectangular region. Range testing is done by
i32_Rect rect = get_line_x_rect(&view);
bool32 unwrapped = view.unwrapped_lines;
b32 unwrapped = view.unwrapped_lines;
for (int32_t line = rect.y1; line >= rect.y0; --line){
int32_t start = 0;
int32_t end = 0;
for (i32 line = rect.y1; line >= rect.y0; --line){
i32 start = 0;
i32 end = 0;
bool32 success = 1;
b32 success = 1;
Full_Cursor cursor = {};
float y = get_line_y(app, &view, line);
@ -59,7 +59,7 @@ CUSTOM_DOC("Delete characters in a rectangular region. Range testing is done by
}
static void
pad_buffer_line(Application_Links *app, Partition *part, Buffer_Summary *buffer, int32_t line, char padchar, int32_t target){
pad_buffer_line(Application_Links *app, Partition *part, Buffer_Summary *buffer, i32 line, char padchar, i32 target){
Partial_Cursor start = {};
Partial_Cursor end = {};
@ -68,7 +68,7 @@ pad_buffer_line(Application_Links *app, Partition *part, Buffer_Summary *buffer,
if (start.line == line){
if (end.character-1 < target){
Temp_Memory temp = begin_temp_memory(part);
int32_t size = target - (end.character-1);
i32 size = target - (end.character-1);
char *str = push_array(part, char, size);
memset(str, ' ', size);
buffer_replace_range(app, buffer, end.pos, end.pos, str, size);
@ -124,14 +124,14 @@ CUSTOM_DOC("Begin multi-line mode. In multi-line mode characters are inserted a
Buffer_Rect rect = get_rect(&view);
int32_t start_line = view.cursor.line;
int32_t pos = view.cursor.character-1;
i32 start_line = view.cursor.line;
i32 pos = view.cursor.character-1;
for (int32_t i = rect.line0; i <= rect.line1; ++i){
for (i32 i = rect.line0; i <= rect.line1; ++i){
pad_buffer_line(app, &global_part, &buffer, i, ' ', pos);
}
int32_t line_count = rect.line1 - rect.line0 + 1;
i32 line_count = rect.line1 - rect.line0 + 1;
for (;;){
User_Input in = get_user_input(app, EventOnAnyKey, EventOnEsc|EventOnMouseLeftButton|EventOnMouseRightButton);
@ -144,7 +144,7 @@ CUSTOM_DOC("Begin multi-line mode. In multi-line mode characters are inserted a
Buffer_Edit *edit = push_array(part, Buffer_Edit, line_count);
Buffer_Edit *edits = edit;
for (int32_t i = rect.line0; i <= rect.line1; ++i){
for (i32 i = rect.line0; i <= rect.line1; ++i){
Partial_Cursor cursor = {};
if (buffer_compute_cursor(app, &buffer, seek_line_char(i, pos+1), &cursor)){
@ -156,7 +156,7 @@ CUSTOM_DOC("Begin multi-line mode. In multi-line mode characters are inserted a
}
}
int32_t edit_count = (int)(edit - edits);
i32 edit_count = (int)(edit - edits);
buffer_batch_edit(app, &buffer, &str, 1, edits, edit_count, BatchEdit_Normal);
end_temp_memory(temp);
@ -172,7 +172,7 @@ CUSTOM_DOC("Begin multi-line mode. In multi-line mode characters are inserted a
Buffer_Edit *edit = push_array(part, Buffer_Edit, line_count);
Buffer_Edit *edits = edit;
for (int32_t i = rect.line0; i <= rect.line1; ++i){
for (i32 i = rect.line0; i <= rect.line1; ++i){
Partial_Cursor cursor = {};
if (buffer_compute_cursor(app, &buffer, seek_line_char(i, pos+1), &cursor)){
@ -184,7 +184,7 @@ CUSTOM_DOC("Begin multi-line mode. In multi-line mode characters are inserted a
}
}
int32_t edit_count = (int)(edit - edits);
i32 edit_count = (int)(edit - edits);
buffer_batch_edit(app, &buffer, 0, 0, edits, edit_count, BatchEdit_Normal);
end_temp_memory(temp);
@ -201,8 +201,8 @@ CUSTOM_DOC("Begin multi-line mode. In multi-line mode characters are inserted a
// NOTE(allen): An experimental mutli-pasting thing
CUSTOM_COMMAND_SIG(multi_paste){
uint32_t access = AccessOpen;
int32_t count = clipboard_count(app, 0);
u32 access = AccessOpen;
i32 count = clipboard_count(app, 0);
if (count > 0){
View_Summary view = get_active_view(app, access);
Managed_Scope scope = view_get_managed_scope(app, view.view_id);
@ -213,10 +213,10 @@ CUSTOM_COMMAND_SIG(multi_paste){
managed_variable_set(app, scope, view_next_rewrite_loc, RewritePaste);
uint64_t prev_paste_index = 0;
managed_variable_get(app, scope, view_paste_index_loc, &prev_paste_index);
int32_t paste_index = (int32_t)prev_paste_index + 1;
i32 paste_index = (i32)prev_paste_index + 1;
managed_variable_set(app, scope, view_paste_index_loc, paste_index);
int32_t len = clipboard_index(app, 0, paste_index, 0, 0);
i32 len = clipboard_index(app, 0, paste_index, 0, 0);
if (len + 1 <= app->memory_size){
char *str = (char*)app->memory;
@ -243,24 +243,24 @@ CUSTOM_COMMAND_SIG(multi_paste){
}
static Range
multi_paste_range(Application_Links *app, View_Summary *view, Range range, int32_t paste_count, bool32 old_to_new){
multi_paste_range(Application_Links *app, View_Summary *view, Range range, i32 paste_count, b32 old_to_new){
Range finish_range = range;
if (paste_count >= 1){
Buffer_Summary buffer = get_buffer(app, view->buffer_id, AccessOpen);
if (buffer.exists){
int32_t total_size = 0;
for (int32_t paste_index = 0; paste_index < paste_count; ++paste_index){
i32 total_size = 0;
for (i32 paste_index = 0; paste_index < paste_count; ++paste_index){
total_size += 1 + clipboard_index(app, 0, paste_index, 0, 0);
}
total_size -= 1;
if (total_size <= app->memory_size){
char *str = (char*)app->memory;
int32_t position = 0;
i32 position = 0;
int32_t first = paste_count - 1;
int32_t one_past_last = -1;
int32_t step = -1;
i32 first = paste_count - 1;
i32 one_past_last = -1;
i32 step = -1;
if (!old_to_new){
first = 0;
@ -268,17 +268,17 @@ multi_paste_range(Application_Links *app, View_Summary *view, Range range, int32
step = 1;
}
for (int32_t paste_index = first; paste_index != one_past_last; paste_index += step){
for (i32 paste_index = first; paste_index != one_past_last; paste_index += step){
if (paste_index != first){
str[position] = '\n';
++position;
}
int32_t len = clipboard_index(app, 0, paste_index, str + position, total_size - position);
i32 len = clipboard_index(app, 0, paste_index, str + position, total_size - position);
position += len;
}
int32_t pos = range.min;
i32 pos = range.min;
buffer_replace_range(app, &buffer, range.min, range.max, str, total_size);
finish_range.min = pos;
finish_range.max = pos + total_size;
@ -297,13 +297,13 @@ multi_paste_range(Application_Links *app, View_Summary *view, Range range, int32
}
static void
multi_paste_interactive_up_down(Application_Links *app, int32_t paste_count, int32_t clip_count){
multi_paste_interactive_up_down(Application_Links *app, i32 paste_count, i32 clip_count){
View_Summary view = get_active_view(app, AccessOpen);
Range range = {};
range.min = range.max = view.cursor.pos;
bool32 old_to_new = true;
b32 old_to_new = true;
range = multi_paste_range(app, &view, range, paste_count, old_to_new);
@ -316,7 +316,7 @@ multi_paste_interactive_up_down(Application_Links *app, int32_t paste_count, int
in = get_user_input(app, EventOnAnyKey, EventOnEsc);
if (in.abort) break;
bool32 did_modify = false;
b32 did_modify = false;
if (in.key.keycode == key_up){
if (paste_count > 1){
--paste_count;
@ -349,14 +349,14 @@ multi_paste_interactive_up_down(Application_Links *app, int32_t paste_count, int
}
CUSTOM_COMMAND_SIG(multi_paste_interactive){
int32_t clip_count = clipboard_count(app, 0);
i32 clip_count = clipboard_count(app, 0);
if (clip_count > 0){
multi_paste_interactive_up_down(app, 1, clip_count);
}
}
CUSTOM_COMMAND_SIG(multi_paste_interactive_quick){
int32_t clip_count = clipboard_count(app, 0);
i32 clip_count = clipboard_count(app, 0);
if (clip_count > 0){
char string_space[256];
Query_Bar bar = {};
@ -364,7 +364,7 @@ CUSTOM_COMMAND_SIG(multi_paste_interactive_quick){
bar.string = make_fixed_width_string(string_space);
query_user_number(app, &bar);
int32_t initial_paste_count = str_to_int_s(bar.string);
i32 initial_paste_count = str_to_int_s(bar.string);
if (initial_paste_count > clip_count){
initial_paste_count = clip_count;
}
@ -383,7 +383,7 @@ CUSTOM_COMMAND_SIG(multi_paste_interactive_quick){
CUSTOM_COMMAND_SIG(rename_parameter)
CUSTOM_DOC("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.")
{
uint32_t access = AccessOpen;
u32 access = AccessOpen;
View_Summary view = get_active_view(app, access);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
@ -394,12 +394,12 @@ CUSTOM_DOC("If the cursor is found to be on the name of a function parameter in
Cpp_Get_Token_Result result;
if (buffer_get_token_index(app, &buffer, view.cursor.pos, &result)){
if (!result.in_whitespace_after_token){
static const int32_t stream_space_size = 512;
static const i32 stream_space_size = 512;
Cpp_Token stream_space[stream_space_size];
Stream_Tokens_DEP stream = {};
if (init_stream_tokens(&stream, app, &buffer, result.token_index, stream_space, stream_space_size)){
int32_t token_index = result.token_index;
i32 token_index = result.token_index;
Cpp_Token token = stream.tokens[token_index];
if (token.type == CPP_TOKEN_IDENTIFIER){
@ -412,8 +412,8 @@ CUSTOM_DOC("If the cursor is found to be on the name of a function parameter in
old_lexeme.size = token.size;
buffer_read_range(app, &buffer, token.start, token.start+token.size, old_lexeme.str);
int32_t proc_body_found = 0;
bool32 still_looping = 0;
i32 proc_body_found = 0;
b32 still_looping = 0;
++token_index;
do{
@ -448,8 +448,8 @@ CUSTOM_DOC("If the cursor is found to be on the name of a function parameter in
String replace_string = with.string;
Buffer_Edit *edits = push_array(part, Buffer_Edit, 0);
int32_t edit_max = (part_remaining(part))/sizeof(Buffer_Edit);
int32_t edit_count = 0;
i32 edit_max = (part_remaining(part))/sizeof(Buffer_Edit);
i32 edit_count = 0;
if (edit_max >= 1){
Buffer_Edit edit;
@ -462,8 +462,8 @@ CUSTOM_DOC("If the cursor is found to be on the name of a function parameter in
++edit_count;
}
int32_t nesting_level = 0;
int32_t closed_correctly = 0;
i32 nesting_level = 0;
i32 closed_correctly = 0;
++token_index;
still_looping = 0;
do{
@ -533,7 +533,7 @@ CUSTOM_DOC("If the cursor is found to be on the name of a function parameter in
end_temp_memory(temp);
}
typedef uint32_t Write_Explicit_Enum_Values_Mode;
typedef u32 Write_Explicit_Enum_Values_Mode;
enum{
WriteExplicitEnumValues_Integers,
WriteExplicitEnumValues_Flags,
@ -541,7 +541,7 @@ enum{
static void
write_explicit_enum_values_parameters(Application_Links *app, Write_Explicit_Enum_Values_Mode mode){
uint32_t access = AccessOpen;
u32 access = AccessOpen;
View_Summary view = get_active_view(app, access);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
@ -556,18 +556,18 @@ write_explicit_enum_values_parameters(Application_Links *app, Write_Explicit_Enu
Stream_Tokens_DEP stream = {};
if (init_stream_tokens(&stream, app, &buffer, result.token_index, stream_space, 32)){
int32_t token_index = result.token_index;
i32 token_index = result.token_index;
Cpp_Token token = stream.tokens[token_index];
if (token.type == CPP_TOKEN_BRACE_OPEN){
++token_index;
int32_t seeker_index = token_index;
i32 seeker_index = token_index;
Stream_Tokens_DEP seek_stream = begin_temp_stream_token(&stream);
bool32 closed_correctly = false;
bool32 still_looping = false;
b32 closed_correctly = false;
b32 still_looping = false;
do{
for (; seeker_index < stream.end; ++seeker_index){
Cpp_Token *token_seeker = stream.tokens + seeker_index;
@ -586,9 +586,9 @@ write_explicit_enum_values_parameters(Application_Links *app, Write_Explicit_Enu
end_temp_stream_token(&stream, seek_stream);
if (closed_correctly){
int32_t count_estimate = 1 + (seeker_index - token_index)/2;
i32 count_estimate = 1 + (seeker_index - token_index)/2;
int32_t edit_count = 0;
i32 edit_count = 0;
Buffer_Edit *edits = push_array(part, Buffer_Edit, count_estimate);
char *string_base = push_array(part, char, 0);
@ -596,7 +596,7 @@ write_explicit_enum_values_parameters(Application_Links *app, Write_Explicit_Enu
closed_correctly = false;
still_looping = false;
uint32_t value = 0;
u32 value = 0;
if (mode == WriteExplicitEnumValues_Flags){
value = 1;
}
@ -607,10 +607,10 @@ write_explicit_enum_values_parameters(Application_Links *app, Write_Explicit_Enu
switch (token_ptr->type){
case CPP_TOKEN_IDENTIFIER:
{
int32_t edit_start = token_ptr->start + token_ptr->size;
int32_t edit_stop = edit_start;
i32 edit_start = token_ptr->start + token_ptr->size;
i32 edit_stop = edit_start;
int32_t edit_is_good = 0;
i32 edit_is_good = 0;
++token_index;
do{
for (; token_index < stream.end; ++token_index){
@ -637,7 +637,7 @@ write_explicit_enum_values_parameters(Application_Links *app, Write_Explicit_Enu
good_edit:;
if (edit_is_good){
int32_t str_pos = string.size;
i32 str_pos = string.size;
append(&string, " = ");
append_int_to_str(&string, value);
@ -654,7 +654,7 @@ write_explicit_enum_values_parameters(Application_Links *app, Write_Explicit_Enu
}
}
int32_t str_size = string.size - str_pos;
i32 str_size = string.size - str_pos;
Buffer_Edit edit;
edit.str_start = str_pos;
@ -714,7 +714,7 @@ CUSTOM_DOC("If the cursor is found to be on the '{' of an enum definition, the v
struct Replace_Target{
Buffer_ID buffer_id;
int32_t start_pos;
i32 start_pos;
};
static void
@ -722,7 +722,7 @@ replace_all_occurrences_parameters(Application_Links *app, Heap *heap, Partition
if (target_string.size <= 0) return;
global_history_edit_group_begin(app);
for (bool32 got_all_occurrences = false;
for (b32 got_all_occurrences = false;
!got_all_occurrences;){
// Initialize a generic search all buffers
Search_Set set = {};
@ -732,7 +732,7 @@ replace_all_occurrences_parameters(Application_Links *app, Heap *heap, Partition
// Visit all locations and create replacement list
Temp_Memory temp = begin_temp_memory(part);
Replace_Target *targets = push_array(part, Replace_Target, 0);
int32_t target_count = 0;
i32 target_count = 0;
got_all_occurrences = true;
for (Search_Match match = search_next_match(app, &set, &iter);
@ -757,17 +757,17 @@ replace_all_occurrences_parameters(Application_Links *app, Heap *heap, Partition
}
// Use replacement list to do replacements
int32_t shift_per_replacement = new_string.size - target_string.size;
int32_t current_offset = 0;
int32_t current_buffer_id = 0;
i32 shift_per_replacement = new_string.size - target_string.size;
i32 current_offset = 0;
i32 current_buffer_id = 0;
Replace_Target *target = targets;
for (int32_t i = 0; i < target_count; ++i, ++target){
for (i32 i = 0; i < target_count; ++i, ++target){
if (target->buffer_id != current_buffer_id){
current_buffer_id = target->buffer_id;
current_offset = 0;
}
Buffer_Summary buffer = get_buffer(app, target->buffer_id, AccessOpen);
int32_t pos = target->start_pos + current_offset;
i32 pos = target->start_pos + current_offset;
buffer_replace_range(app, &buffer, pos, pos + target_string.size, new_string.str, new_string.size);
current_offset += shift_per_replacement;
}
@ -801,8 +801,8 @@ CUSTOM_DOC("Queries the user for two strings, and replaces all occurrences of th
replace_all_occurrences_parameters(app, &global_heap, &global_part, r, w);
}
extern "C" int32_t
get_bindings(void *data, int32_t size){
extern "C" i32
get_bindings(void *data, i32 size){
Bind_Helper context_ = begin_bind_helper(data, size);
Bind_Helper *context = &context_;
@ -849,8 +849,7 @@ get_bindings(void *data, int32_t size){
bind(context, 'p', MDFR_ALT, rename_parameter);
end_map(context);
int32_t result = end_bind_helper(context);
return(result);
return(end_bind_helper(context));
}
// BOTTOM

View File

@ -78,9 +78,9 @@ int_color_from(Application_Links *app, Fancy_Color source){
return(result);
}
static bool32
static b32
is_valid(Fancy_Color source){
bool32 result = !((source.code == 0) && (source.rgba == 0));
b32 result = !((source.code == 0) && (source.rgba == 0));
return(result);
}

View File

@ -21,9 +21,9 @@ get_global_face_description(Application_Links *app){
return(description);
}
static bool32
static b32
descriptions_match(Face_Description *a, Face_Description *b){
bool32 result = false;
b32 result = false;
if (match(a->font.name, b->font.name) && a->font.in_local_font_folder == b->font.in_local_font_folder){
if (memcmp((&a->pt_size), (&b->pt_size), sizeof(*a) - sizeof(a->font)) == 0){
result = true;
@ -95,7 +95,7 @@ get_face_id_by_description(Application_Links *app, Face_Description *description
}
static void
set_global_face_by_name(Application_Links *app, char *name, int32_t len, bool32 apply_to_all_buffers){
set_global_face_by_name(Application_Links *app, char *name, int32_t len, b32 apply_to_all_buffers){
Face_ID global_face_id = get_face_id(app, 0);
Face_Description description = get_face_description(app, global_face_id);
Face_ID new_id = get_face_id_by_name(app, name, len, &description);
@ -105,7 +105,7 @@ set_global_face_by_name(Application_Links *app, char *name, int32_t len, bool32
}
static void
change_global_face_by_description(Application_Links *app, Face_Description description, bool32 apply_to_all_buffers){
change_global_face_by_description(Application_Links *app, Face_Description description, b32 apply_to_all_buffers){
Face_ID face_id = get_face_id(app, 0);
if (!try_modify_face(app, face_id, &description)){
description.font.in_local_font_folder = !description.font.in_local_font_folder;

View File

@ -22,7 +22,7 @@ make_buffered_write_stream(Buffer_ID output_buffer_id, Partition *buffering_aren
static void
buffered_write_stream_flush(Application_Links *app, Buffered_Write_Stream *stream){
Buffer_Summary buffer = get_buffer(app, stream->output_buffer_id, AccessProtected);
int32_t buffer_size = (int32_t)(push_array(stream->buffering_arena, char, 0) - stream->buffer);
i32 buffer_size = (i32)(push_array(stream->buffering_arena, char, 0) - stream->buffer);
buffer_replace_range(app, &buffer, buffer.size, buffer.size, stream->buffer, buffer_size);
stream->buffering_arena->pos -= buffer_size;
}
@ -36,7 +36,7 @@ buffered_write_stream_write(Application_Links *app, Buffered_Write_Stream *strea
text.size = 0;
}
else{
int32_t partial_size = part_remaining(stream->buffering_arena);
i32 partial_size = part_remaining(stream->buffering_arena);
buffered = push_array(stream->buffering_arena, char, partial_size);
Assert(partial_size < text.size);
memcpy(buffered, text.str, partial_size);
@ -48,7 +48,7 @@ buffered_write_stream_write(Application_Links *app, Buffered_Write_Stream *strea
}
static void
buffered_write_stream_write_int(Application_Links *app, Buffered_Write_Stream *stream, int32_t x){
buffered_write_stream_write_int(Application_Links *app, Buffered_Write_Stream *stream, i32 x){
char space[128];
String integer_string = make_fixed_width_string(space);
append_int_to_str(&integer_string, x);
@ -56,20 +56,20 @@ buffered_write_stream_write_int(Application_Links *app, Buffered_Write_Stream *s
}
static Get_Positions_Results
get_function_positions(Application_Links *app, Buffer_Summary *buffer, int32_t first_token_index, Function_Positions *positions_array, int32_t positions_max){
get_function_positions(Application_Links *app, Buffer_Summary *buffer, i32 first_token_index, Function_Positions *positions_array, i32 positions_max){
Get_Positions_Results result = {};
Token_Range token_range = buffer_get_token_range(app, buffer->buffer_id);
if (token_range.first != 0){
Token_Iterator token_it = make_token_iterator(token_range, first_token_index);
int32_t nest_level = 0;
int32_t paren_nest_level = 0;
i32 nest_level = 0;
i32 paren_nest_level = 0;
Cpp_Token *first_paren = 0;
int32_t first_paren_index = 0;
int32_t first_paren_position = 0;
int32_t last_paren_index = 0;
i32 first_paren_index = 0;
i32 first_paren_position = 0;
i32 last_paren_index = 0;
// Look for the next token at global scope that might need to be printed.
mode1:
@ -141,7 +141,7 @@ get_function_positions(Application_Links *app, Buffer_Summary *buffer, int32_t f
Cpp_Token *restore_point = token_iterator_current(&token_it);
token_iterator_set(&token_it, first_paren);
int32_t signature_start_index = 0;
i32 signature_start_index = 0;
for (Cpp_Token *token = token_iterator_current(&token_it);
token != 0;
token = token_iterator_goto_prev(&token_it)){
@ -186,17 +186,17 @@ get_function_positions(Application_Links *app, Buffer_Summary *buffer, int32_t f
}
static void
print_positions_buffered(Application_Links *app, Buffer_Summary *buffer, Function_Positions *positions_array, int32_t positions_count, Buffered_Write_Stream *stream){
print_positions_buffered(Application_Links *app, Buffer_Summary *buffer, Function_Positions *positions_array, i32 positions_count, Buffered_Write_Stream *stream){
String buffer_name = make_string(buffer->buffer_name, buffer->buffer_name_len);
for (int32_t i = 0; i < positions_count; ++i){
for (i32 i = 0; i < positions_count; ++i){
Function_Positions *positions = &positions_array[i];
int32_t start_index = positions->sig_start_index;
int32_t end_index = positions->sig_end_index;
int32_t open_paren_pos = positions->open_paren_pos;
int32_t line_number = buffer_get_line_number(app, buffer, open_paren_pos);
i32 start_index = positions->sig_start_index;
i32 end_index = positions->sig_end_index;
i32 open_paren_pos = positions->open_paren_pos;
i32 line_number = buffer_get_line_number(app, buffer, open_paren_pos);
Assert(end_index > start_index);
@ -214,7 +214,7 @@ print_positions_buffered(Application_Links *app, Buffer_Summary *buffer, Functio
token = token_iterator_goto_next_raw(&token_it)){
if ((token->flags & CPP_TFLAG_PP_BODY) == 0 && token->type != CPP_TOKEN_COMMENT){
char space[2 << 10];
int32_t token_size = token->size;
i32 token_size = token->size;
if (token_size > sizeof(space)){
token_size = sizeof(space);
}
@ -260,7 +260,7 @@ list_all_functions(Application_Links *app, Partition *part, Buffer_Summary *opti
Temp_Memory temp = begin_temp_memory(part);
int32_t positions_max = (4<<10)/sizeof(Function_Positions);
i32 positions_max = (4<<10)/sizeof(Function_Positions);
Function_Positions *positions_array = push_array(part, Function_Positions, positions_max);
Buffered_Write_Stream buffered_write_stream = make_buffered_write_stream(decls_buffer.buffer_id, part);
@ -277,12 +277,12 @@ list_all_functions(Application_Links *app, Partition *part, Buffer_Summary *opti
continue;
}
int32_t token_index = 0;
bool32 still_looping = false;
i32 token_index = 0;
b32 still_looping = false;
do{
Get_Positions_Results get_positions_results = get_function_positions(app, &buffer, token_index, positions_array, positions_max);
int32_t positions_count = get_positions_results.positions_count;
i32 positions_count = get_positions_results.positions_count;
token_index = get_positions_results.next_token_index;
still_looping = get_positions_results.still_looping;

View File

@ -8,15 +8,15 @@
#define FCODER_FUNCTION_LIST_H
struct Function_Positions{
int32_t sig_start_index;
int32_t sig_end_index;
int32_t open_paren_pos;
i32 sig_start_index;
i32 sig_end_index;
i32 open_paren_pos;
};
struct Get_Positions_Results{
int32_t positions_count;
int32_t next_token_index;
bool32 still_looping;
i32 positions_count;
i32 next_token_index;
b32 still_looping;
};
struct Buffered_Write_Stream{

View File

@ -1,144 +1,144 @@
struct Application_Links;
#define GLOBAL_SET_SETTING_SIG(n) bool32 n(Application_Links *app, Global_Setting_ID setting, int32_t value)
#define GLOBAL_SET_MAPPING_SIG(n) bool32 n(Application_Links *app, void *data, int32_t size)
#define EXEC_SYSTEM_COMMAND_SIG(n) bool32 n(Application_Links *app, View_ID view_id, Buffer_Identifier buffer_id, String path, String command, Command_Line_Interface_Flag flags)
#define CLIPBOARD_POST_SIG(n) bool32 n(Application_Links *app, int32_t clipboard_id, String string)
#define CLIPBOARD_COUNT_SIG(n) bool32 n(Application_Links *app, int32_t clipboard_id, int32_t *count_out)
#define CLIPBOARD_INDEX_SIG(n) bool32 n(Application_Links *app, int32_t clipboard_id, int32_t item_index, String *string_out, int32_t *required_size_out)
#define GLOBAL_SET_SETTING_SIG(n) b32 n(Application_Links *app, Global_Setting_ID setting, int32_t value)
#define GLOBAL_SET_MAPPING_SIG(n) b32 n(Application_Links *app, void *data, int32_t size)
#define EXEC_SYSTEM_COMMAND_SIG(n) b32 n(Application_Links *app, View_ID view_id, Buffer_Identifier buffer_id, String path, String command, Command_Line_Interface_Flag flags)
#define CLIPBOARD_POST_SIG(n) b32 n(Application_Links *app, int32_t clipboard_id, String string)
#define CLIPBOARD_COUNT_SIG(n) b32 n(Application_Links *app, int32_t clipboard_id, int32_t *count_out)
#define CLIPBOARD_INDEX_SIG(n) b32 n(Application_Links *app, int32_t clipboard_id, int32_t item_index, String *string_out, int32_t *required_size_out)
#define CREATE_PARSE_CONTEXT_SIG(n) Parse_Context_ID n(Application_Links *app, Parser_String_And_Type *kw, uint32_t kw_count, Parser_String_And_Type *pp, uint32_t pp_count)
#define GET_BUFFER_COUNT_SIG(n) int32_t n(Application_Links *app)
#define GET_BUFFER_FIRST_SIG(n) bool32 n(Application_Links *app, Access_Flag access, Buffer_ID *buffer_id_out)
#define GET_BUFFER_NEXT_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, Access_Flag access, Buffer_ID *buffer_id_out)
#define GET_BUFFER_SUMMARY_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, Access_Flag access, Buffer_Summary *buffer_summary_out)
#define GET_BUFFER_BY_NAME_SIG(n) bool32 n(Application_Links *app, String name, Access_Flag access, Buffer_ID *buffer_id_out)
#define GET_BUFFER_BY_FILE_NAME_SIG(n) bool32 n(Application_Links *app, String file_name, Access_Flag access, Buffer_ID *buffer_id_out)
#define BUFFER_READ_RANGE_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, int32_t start, int32_t one_past_last, char *out)
#define BUFFER_REPLACE_RANGE_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, int32_t start, int32_t one_past_last, String string)
#define BUFFER_SET_EDIT_HANDLER_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, Buffer_Edit_Handler *handler)
#define BUFFER_COMPUTE_CURSOR_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, Buffer_Seek seek, Partial_Cursor *cursor_out)
#define BUFFER_BATCH_EDIT_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, char *str, int32_t str_len, Buffer_Edit *edits, int32_t edit_count, Buffer_Batch_Edit_Type type)
#define BUFFER_GET_SETTING_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, Buffer_Setting_ID setting, int32_t *value_out)
#define BUFFER_SET_SETTING_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, Buffer_Setting_ID setting, int32_t value)
#define BUFFER_GET_MANAGED_SCOPE_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, Managed_Scope *scope_out)
#define BUFFER_TOKEN_COUNT_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, int32_t *count_out)
#define BUFFER_READ_TOKENS_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, int32_t start_token, int32_t end_token, Cpp_Token *tokens_out)
#define BUFFER_GET_TOKEN_RANGE_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, Cpp_Token **first_token_out, Cpp_Token **one_past_last_token_out)
#define BUFFER_GET_TOKEN_INDEX_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, int32_t pos, Cpp_Get_Token_Result *get_result)
#define BUFFER_SEND_END_SIGNAL_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id)
#define CREATE_BUFFER_SIG(n) bool32 n(Application_Links *app, String file_name, Buffer_Create_Flag flags, Buffer_ID *new_buffer_id_out)
#define BUFFER_SAVE_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, String file_name, uint32_t flags)
#define BUFFER_KILL_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, Buffer_Kill_Flag flags, Buffer_Kill_Result *result)
#define BUFFER_REOPEN_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, Buffer_Reopen_Flag flags, Buffer_Reopen_Result *result)
#define BUFFER_GET_FILE_ATTRIBUTES_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, File_Attributes *attributes_out)
#define GET_VIEW_FIRST_SIG(n) bool32 n(Application_Links *app, Access_Flag access, View_ID *view_id_out)
#define GET_VIEW_NEXT_SIG(n) bool32 n(Application_Links *app, View_ID view_id, Access_Flag access, View_ID *view_id_out)
#define GET_VIEW_SUMMARY_SIG(n) bool32 n(Application_Links *app, View_ID view_id, Access_Flag access, View_Summary *view_summary_out)
#define GET_ACTIVE_VIEW_SIG(n) bool32 n(Application_Links *app, Access_Flag access, View_ID *view_id_out)
#define GET_ACTIVE_PANEL_SIG(n) bool32 n(Application_Links *app, Panel_ID *panel_id_out)
#define VIEW_GET_PANEL_SIG(n) bool32 n(Application_Links *app, View_ID view_id, Panel_ID *panel_id_out)
#define PANEL_GET_VIEW_SIG(n) bool32 n(Application_Links *app, Panel_ID panel_id, View_ID *view_id_out)
#define PANEL_IS_SPLIT_SIG(n) bool32 n(Application_Links *app, Panel_ID panel_id)
#define PANEL_IS_LEAF_SIG(n) bool32 n(Application_Links *app, Panel_ID panel_id)
#define PANEL_SPLIT_SIG(n) bool32 n(Application_Links *app, Panel_ID panel_id, Panel_Split_Orientation orientation)
#define PANEL_SET_SPLIT_SIG(n) bool32 n(Application_Links *app, Panel_ID panel_id, Panel_Split_Kind kind, float t)
#define PANEL_SWAP_CHILDREN_SIG(n) bool32 n(Application_Links *app, Panel_ID panel_id, Panel_Split_Kind kind, float t)
#define PANEL_GET_PARENT_SIG(n) bool32 n(Application_Links *app, Panel_ID panel_id, Panel_ID *panel_id_out)
#define PANEL_GET_CHILD_SIG(n) bool32 n(Application_Links *app, Panel_ID panel_id, Panel_Child which_child, Panel_ID *panel_id_out)
#define PANEL_GET_MAX_SIG(n) bool32 n(Application_Links *app, Panel_ID panel_id, Panel_ID *panel_id_out)
#define PANEL_GET_MARGIN_SIG(n) bool32 n(Application_Links *app, Panel_ID panel_id, i32_Rect *margins_out)
#define VIEW_CLOSE_SIG(n) bool32 n(Application_Links *app, View_ID view_id)
#define VIEW_SET_ACTIVE_SIG(n) bool32 n(Application_Links *app, View_ID view_id)
#define VIEW_GET_SETTING_SIG(n) bool32 n(Application_Links *app, View_ID view_id, View_Setting_ID setting, int32_t *value_out)
#define VIEW_SET_SETTING_SIG(n) bool32 n(Application_Links *app, View_ID view_id, View_Setting_ID setting, int32_t value)
#define VIEW_GET_MANAGED_SCOPE_SIG(n) bool32 n(Application_Links *app, View_ID view_id, Managed_Scope *scope)
#define VIEW_GET_ENCLOSURE_RECT_SIG(n) bool32 n(Application_Links *app, View_ID view_id, i32_Rect *rect_out)
#define VIEW_COMPUTE_CURSOR_SIG(n) bool32 n(Application_Links *app, View_ID view_id, Buffer_Seek seek, Full_Cursor *cursor_out)
#define VIEW_SET_CURSOR_SIG(n) bool32 n(Application_Links *app, View_ID view_id, Buffer_Seek seek, bool32 set_preferred_x)
#define VIEW_SET_SCROLL_SIG(n) bool32 n(Application_Links *app, View_ID view_id, GUI_Scroll_Vars scroll)
#define VIEW_SET_MARK_SIG(n) bool32 n(Application_Links *app, View_ID view_id, Buffer_Seek seek)
#define VIEW_SET_BUFFER_SIG(n) bool32 n(Application_Links *app, View_ID view_id, Buffer_ID buffer_id, Set_Buffer_Flag flags)
#define VIEW_POST_FADE_SIG(n) bool32 n(Application_Links *app, View_ID view_id, float seconds, int32_t start, int32_t end, int_color color)
#define VIEW_BEGIN_UI_MODE_SIG(n) bool32 n(Application_Links *app, View_ID view_id)
#define VIEW_END_UI_MODE_SIG(n) bool32 n(Application_Links *app, View_ID view_id)
#define VIEW_IS_IN_UI_MODE_SIG(n) bool32 n(Application_Links *app, View_ID view_id)
#define VIEW_SET_QUIT_UI_HANDLER_SIG(n) bool32 n(Application_Links *app, View_ID view_id, UI_Quit_Function_Type *quit_function)
#define VIEW_GET_QUIT_UI_HANDLER_SIG(n) bool32 n(Application_Links *app, View_ID view_id, UI_Quit_Function_Type **quit_function_out)
#define GET_BUFFER_FIRST_SIG(n) b32 n(Application_Links *app, Access_Flag access, Buffer_ID *buffer_id_out)
#define GET_BUFFER_NEXT_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, Access_Flag access, Buffer_ID *buffer_id_out)
#define GET_BUFFER_SUMMARY_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, Access_Flag access, Buffer_Summary *buffer_summary_out)
#define GET_BUFFER_BY_NAME_SIG(n) b32 n(Application_Links *app, String name, Access_Flag access, Buffer_ID *buffer_id_out)
#define GET_BUFFER_BY_FILE_NAME_SIG(n) b32 n(Application_Links *app, String file_name, Access_Flag access, Buffer_ID *buffer_id_out)
#define BUFFER_READ_RANGE_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, int32_t start, int32_t one_past_last, char *out)
#define BUFFER_REPLACE_RANGE_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, int32_t start, int32_t one_past_last, String string)
#define BUFFER_SET_EDIT_HANDLER_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, Buffer_Edit_Handler *handler)
#define BUFFER_COMPUTE_CURSOR_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, Buffer_Seek seek, Partial_Cursor *cursor_out)
#define BUFFER_BATCH_EDIT_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, char *str, int32_t str_len, Buffer_Edit *edits, int32_t edit_count, Buffer_Batch_Edit_Type type)
#define BUFFER_GET_SETTING_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, Buffer_Setting_ID setting, int32_t *value_out)
#define BUFFER_SET_SETTING_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, Buffer_Setting_ID setting, int32_t value)
#define BUFFER_GET_MANAGED_SCOPE_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, Managed_Scope *scope_out)
#define BUFFER_TOKEN_COUNT_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, int32_t *count_out)
#define BUFFER_READ_TOKENS_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, int32_t start_token, int32_t end_token, Cpp_Token *tokens_out)
#define BUFFER_GET_TOKEN_RANGE_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, Cpp_Token **first_token_out, Cpp_Token **one_past_last_token_out)
#define BUFFER_GET_TOKEN_INDEX_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, int32_t pos, Cpp_Get_Token_Result *get_result)
#define BUFFER_SEND_END_SIGNAL_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id)
#define CREATE_BUFFER_SIG(n) b32 n(Application_Links *app, String file_name, Buffer_Create_Flag flags, Buffer_ID *new_buffer_id_out)
#define BUFFER_SAVE_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, String file_name, uint32_t flags)
#define BUFFER_KILL_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, Buffer_Kill_Flag flags, Buffer_Kill_Result *result)
#define BUFFER_REOPEN_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, Buffer_Reopen_Flag flags, Buffer_Reopen_Result *result)
#define BUFFER_GET_FILE_ATTRIBUTES_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, File_Attributes *attributes_out)
#define GET_VIEW_FIRST_SIG(n) b32 n(Application_Links *app, Access_Flag access, View_ID *view_id_out)
#define GET_VIEW_NEXT_SIG(n) b32 n(Application_Links *app, View_ID view_id, Access_Flag access, View_ID *view_id_out)
#define GET_VIEW_SUMMARY_SIG(n) b32 n(Application_Links *app, View_ID view_id, Access_Flag access, View_Summary *view_summary_out)
#define GET_ACTIVE_VIEW_SIG(n) b32 n(Application_Links *app, Access_Flag access, View_ID *view_id_out)
#define GET_ACTIVE_PANEL_SIG(n) b32 n(Application_Links *app, Panel_ID *panel_id_out)
#define VIEW_GET_PANEL_SIG(n) b32 n(Application_Links *app, View_ID view_id, Panel_ID *panel_id_out)
#define PANEL_GET_VIEW_SIG(n) b32 n(Application_Links *app, Panel_ID panel_id, View_ID *view_id_out)
#define PANEL_IS_SPLIT_SIG(n) b32 n(Application_Links *app, Panel_ID panel_id)
#define PANEL_IS_LEAF_SIG(n) b32 n(Application_Links *app, Panel_ID panel_id)
#define PANEL_SPLIT_SIG(n) b32 n(Application_Links *app, Panel_ID panel_id, Panel_Split_Orientation orientation)
#define PANEL_SET_SPLIT_SIG(n) b32 n(Application_Links *app, Panel_ID panel_id, Panel_Split_Kind kind, float t)
#define PANEL_SWAP_CHILDREN_SIG(n) b32 n(Application_Links *app, Panel_ID panel_id, Panel_Split_Kind kind, float t)
#define PANEL_GET_PARENT_SIG(n) b32 n(Application_Links *app, Panel_ID panel_id, Panel_ID *panel_id_out)
#define PANEL_GET_CHILD_SIG(n) b32 n(Application_Links *app, Panel_ID panel_id, Panel_Child which_child, Panel_ID *panel_id_out)
#define PANEL_GET_MAX_SIG(n) b32 n(Application_Links *app, Panel_ID panel_id, Panel_ID *panel_id_out)
#define PANEL_GET_MARGIN_SIG(n) b32 n(Application_Links *app, Panel_ID panel_id, i32_Rect *margins_out)
#define VIEW_CLOSE_SIG(n) b32 n(Application_Links *app, View_ID view_id)
#define VIEW_SET_ACTIVE_SIG(n) b32 n(Application_Links *app, View_ID view_id)
#define VIEW_GET_SETTING_SIG(n) b32 n(Application_Links *app, View_ID view_id, View_Setting_ID setting, int32_t *value_out)
#define VIEW_SET_SETTING_SIG(n) b32 n(Application_Links *app, View_ID view_id, View_Setting_ID setting, int32_t value)
#define VIEW_GET_MANAGED_SCOPE_SIG(n) b32 n(Application_Links *app, View_ID view_id, Managed_Scope *scope)
#define VIEW_GET_ENCLOSURE_RECT_SIG(n) b32 n(Application_Links *app, View_ID view_id, i32_Rect *rect_out)
#define VIEW_COMPUTE_CURSOR_SIG(n) b32 n(Application_Links *app, View_ID view_id, Buffer_Seek seek, Full_Cursor *cursor_out)
#define VIEW_SET_CURSOR_SIG(n) b32 n(Application_Links *app, View_ID view_id, Buffer_Seek seek, b32 set_preferred_x)
#define VIEW_SET_SCROLL_SIG(n) b32 n(Application_Links *app, View_ID view_id, GUI_Scroll_Vars scroll)
#define VIEW_SET_MARK_SIG(n) b32 n(Application_Links *app, View_ID view_id, Buffer_Seek seek)
#define VIEW_SET_BUFFER_SIG(n) b32 n(Application_Links *app, View_ID view_id, Buffer_ID buffer_id, Set_Buffer_Flag flags)
#define VIEW_POST_FADE_SIG(n) b32 n(Application_Links *app, View_ID view_id, float seconds, int32_t start, int32_t end, int_color color)
#define VIEW_BEGIN_UI_MODE_SIG(n) b32 n(Application_Links *app, View_ID view_id)
#define VIEW_END_UI_MODE_SIG(n) b32 n(Application_Links *app, View_ID view_id)
#define VIEW_IS_IN_UI_MODE_SIG(n) b32 n(Application_Links *app, View_ID view_id)
#define VIEW_SET_QUIT_UI_HANDLER_SIG(n) b32 n(Application_Links *app, View_ID view_id, UI_Quit_Function_Type *quit_function)
#define VIEW_GET_QUIT_UI_HANDLER_SIG(n) b32 n(Application_Links *app, View_ID view_id, UI_Quit_Function_Type **quit_function_out)
#define CREATE_USER_MANAGED_SCOPE_SIG(n) Managed_Scope n(Application_Links *app)
#define DESTROY_USER_MANAGED_SCOPE_SIG(n) bool32 n(Application_Links *app, Managed_Scope scope)
#define DESTROY_USER_MANAGED_SCOPE_SIG(n) b32 n(Application_Links *app, Managed_Scope scope)
#define GET_GLOBAL_MANAGED_SCOPE_SIG(n) Managed_Scope n(Application_Links *app)
#define GET_MANAGED_SCOPE_WITH_MULTIPLE_DEPENDENCIES_SIG(n) Managed_Scope n(Application_Links *app, Managed_Scope *scopes, int32_t count)
#define MANAGED_SCOPE_CLEAR_CONTENTS_SIG(n) bool32 n(Application_Links *app, Managed_Scope scope)
#define MANAGED_SCOPE_CLEAR_SELF_ALL_DEPENDENT_SCOPES_SIG(n) bool32 n(Application_Links *app, Managed_Scope scope)
#define MANAGED_SCOPE_CLEAR_CONTENTS_SIG(n) b32 n(Application_Links *app, Managed_Scope scope)
#define MANAGED_SCOPE_CLEAR_SELF_ALL_DEPENDENT_SCOPES_SIG(n) b32 n(Application_Links *app, Managed_Scope scope)
#define MANAGED_VARIABLE_CREATE_SIG(n) Managed_Variable_ID n(Application_Links *app, char *null_terminated_name, uint64_t default_value)
#define MANAGED_VARIABLE_GET_ID_SIG(n) Managed_Variable_ID n(Application_Links *app, char *null_terminated_name)
#define MANAGED_VARIABLE_CREATE_OR_GET_ID_SIG(n) Managed_Variable_ID n(Application_Links *app, char *null_terminated_name, uint64_t default_value)
#define MANAGED_VARIABLE_SET_SIG(n) bool32 n(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t value)
#define MANAGED_VARIABLE_GET_SIG(n) bool32 n(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t *value_out)
#define MANAGED_VARIABLE_SET_SIG(n) b32 n(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t value)
#define MANAGED_VARIABLE_GET_SIG(n) b32 n(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t *value_out)
#define ALLOC_MANAGED_MEMORY_IN_SCOPE_SIG(n) Managed_Object n(Application_Links *app, Managed_Scope scope, i32 item_size, i32 count)
#define ALLOC_BUFFER_MARKERS_ON_BUFFER_SIG(n) Managed_Object n(Application_Links *app, Buffer_ID buffer_id, int32_t count, Managed_Scope *optional_extra_scope)
#define ALLOC_MANAGED_ARENA_IN_SCOPE_SIG(n) Managed_Object n(Application_Links *app, Managed_Scope scope, i32 page_size)
#define CREATE_MARKER_VISUAL_SIG(n) Marker_Visual n(Application_Links *app, Managed_Object object)
#define MARKER_VISUAL_SET_EFFECT_SIG(n) bool32 n(Application_Links *app, Marker_Visual visual, Marker_Visual_Type type, int_color color, int_color text_color, Marker_Visual_Text_Style text_style)
#define MARKER_VISUAL_SET_TAKE_RULE_SIG(n) bool32 n(Application_Links *app, Marker_Visual visual, Marker_Visual_Take_Rule take_rule)
#define MARKER_VISUAL_SET_PRIORITY_SIG(n) bool32 n(Application_Links *app, Marker_Visual visual, Marker_Visual_Priority_Level priority)
#define MARKER_VISUAL_SET_VIEW_KEY_SIG(n) bool32 n(Application_Links *app, Marker_Visual visual, View_ID key_view_id)
#define DESTROY_MARKER_VISUAL_SIG(n) bool32 n(Application_Links *app, Marker_Visual visual)
#define MARKER_VISUAL_SET_EFFECT_SIG(n) b32 n(Application_Links *app, Marker_Visual visual, Marker_Visual_Type type, int_color color, int_color text_color, Marker_Visual_Text_Style text_style)
#define MARKER_VISUAL_SET_TAKE_RULE_SIG(n) b32 n(Application_Links *app, Marker_Visual visual, Marker_Visual_Take_Rule take_rule)
#define MARKER_VISUAL_SET_PRIORITY_SIG(n) b32 n(Application_Links *app, Marker_Visual visual, Marker_Visual_Priority_Level priority)
#define MARKER_VISUAL_SET_VIEW_KEY_SIG(n) b32 n(Application_Links *app, Marker_Visual visual, View_ID key_view_id)
#define DESTROY_MARKER_VISUAL_SIG(n) b32 n(Application_Links *app, Marker_Visual visual)
#define BUFFER_MARKERS_GET_ATTACHED_VISUAL_COUNT_SIG(n) int32_t n(Application_Links *app, Managed_Object object)
#define BUFFER_MARKERS_GET_ATTACHED_VISUAL_SIG(n) Marker_Visual* n(Application_Links *app, Partition *part, Managed_Object object)
#define MANAGED_OBJECT_GET_ITEM_SIZE_SIG(n) uint32_t n(Application_Links *app, Managed_Object object)
#define MANAGED_OBJECT_GET_ITEM_COUNT_SIG(n) uint32_t n(Application_Links *app, Managed_Object object)
#define MANAGED_OBJECT_GET_TYPE_SIG(n) Managed_Object_Type n(Application_Links *app, Managed_Object object)
#define MANAGED_OBJECT_GET_CONTAINING_SCOPE_SIG(n) Managed_Scope n(Application_Links *app, Managed_Object object)
#define MANAGED_OBJECT_FREE_SIG(n) bool32 n(Application_Links *app, Managed_Object object)
#define MANAGED_OBJECT_STORE_DATA_SIG(n) bool32 n(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem)
#define MANAGED_OBJECT_LOAD_DATA_SIG(n) bool32 n(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem_out)
#define MANAGED_OBJECT_FREE_SIG(n) b32 n(Application_Links *app, Managed_Object object)
#define MANAGED_OBJECT_STORE_DATA_SIG(n) b32 n(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem)
#define MANAGED_OBJECT_LOAD_DATA_SIG(n) b32 n(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem_out)
#define GET_USER_INPUT_SIG(n) User_Input n(Application_Links *app, Input_Type_Flag get_type, Input_Type_Flag abort_type)
#define GET_COMMAND_INPUT_SIG(n) User_Input n(Application_Links *app)
#define SET_COMMAND_INPUT_SIG(n) void n(Application_Links *app, Key_Event_Data key_data)
#define GET_MOUSE_STATE_SIG(n) Mouse_State n(Application_Links *app)
#define GET_ACTIVE_QUERY_BARS_SIG(n) int32_t n(Application_Links *app, View_ID view_id, int32_t max_result_count, Query_Bar **result_array)
#define START_QUERY_BAR_SIG(n) bool32 n(Application_Links *app, Query_Bar *bar, uint32_t flags)
#define START_QUERY_BAR_SIG(n) b32 n(Application_Links *app, Query_Bar *bar, uint32_t flags)
#define END_QUERY_BAR_SIG(n) void n(Application_Links *app, Query_Bar *bar, uint32_t flags)
#define PRINT_MESSAGE_SIG(n) bool32 n(Application_Links *app, String message)
#define PRINT_MESSAGE_SIG(n) b32 n(Application_Links *app, String message)
#define GET_LARGEST_FACE_ID_SIG(n) Face_ID n(Application_Links *app)
#define SET_GLOBAL_FACE_SIG(n) bool32 n(Application_Links *app, Face_ID id, bool32 apply_to_all_buffers)
#define BUFFER_HISTORY_GET_MAX_RECORD_INDEX_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, History_Record_Index *index_out)
#define BUFFER_HISTORY_GET_RECORD_INFO_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index, Record_Info *record_out)
#define BUFFER_HISTORY_GET_GROUP_SUB_RECORD_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index, int32_t sub_index, Record_Info *record_out)
#define BUFFER_HISTORY_GET_CURRENT_STATE_INDEX_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, History_Record_Index *index_out)
#define BUFFER_HISTORY_SET_CURRENT_STATE_INDEX_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index)
#define BUFFER_HISTORY_MERGE_RECORD_RANGE_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, History_Record_Index first_index, History_Record_Index last_index, Record_Merge_Flag flags)
#define BUFFER_HISTORY_CLEAR_AFTER_CURRENT_STATE_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id)
#define SET_GLOBAL_FACE_SIG(n) b32 n(Application_Links *app, Face_ID id, b32 apply_to_all_buffers)
#define BUFFER_HISTORY_GET_MAX_RECORD_INDEX_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, History_Record_Index *index_out)
#define BUFFER_HISTORY_GET_RECORD_INFO_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index, Record_Info *record_out)
#define BUFFER_HISTORY_GET_GROUP_SUB_RECORD_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index, int32_t sub_index, Record_Info *record_out)
#define BUFFER_HISTORY_GET_CURRENT_STATE_INDEX_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, History_Record_Index *index_out)
#define BUFFER_HISTORY_SET_CURRENT_STATE_INDEX_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index)
#define BUFFER_HISTORY_MERGE_RECORD_RANGE_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, History_Record_Index first_index, History_Record_Index last_index, Record_Merge_Flag flags)
#define BUFFER_HISTORY_CLEAR_AFTER_CURRENT_STATE_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id)
#define GLOBAL_HISTORY_EDIT_GROUP_BEGIN_SIG(n) void n(Application_Links *app)
#define GLOBAL_HISTORY_EDIT_GROUP_END_SIG(n) void n(Application_Links *app)
#define BUFFER_SET_FACE_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, Face_ID id)
#define BUFFER_SET_FACE_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, Face_ID id)
#define GET_FACE_DESCRIPTION_SIG(n) Face_Description n(Application_Links *app, Face_ID id)
#define GET_FACE_ID_SIG(n) bool32 n(Application_Links *app, Buffer_ID buffer_id, Face_ID *face_id_out)
#define GET_FACE_ID_SIG(n) b32 n(Application_Links *app, Buffer_ID buffer_id, Face_ID *face_id_out)
#define TRY_CREATE_NEW_FACE_SIG(n) Face_ID n(Application_Links *app, Face_Description *description)
#define TRY_MODIFY_FACE_SIG(n) bool32 n(Application_Links *app, Face_ID id, Face_Description *description)
#define TRY_RELEASE_FACE_SIG(n) bool32 n(Application_Links *app, Face_ID id, Face_ID replacement_id)
#define TRY_MODIFY_FACE_SIG(n) b32 n(Application_Links *app, Face_ID id, Face_Description *description)
#define TRY_RELEASE_FACE_SIG(n) b32 n(Application_Links *app, Face_ID id, Face_ID replacement_id)
#define GET_AVAILABLE_FONT_COUNT_SIG(n) int32_t n(Application_Links *app)
#define GET_AVAILABLE_FONT_SIG(n) Available_Font n(Application_Links *app, int32_t index)
#define SET_THEME_COLORS_SIG(n) void n(Application_Links *app, Theme_Color *colors, int32_t count)
#define GET_THEME_COLORS_SIG(n) void n(Application_Links *app, Theme_Color *colors, int32_t count)
#define FINALIZE_COLOR_SIG(n) argb_color n(Application_Links *app, int_color color)
#define GET_HOT_DIRECTORY_SIG(n) int32_t n(Application_Links *app, String *out, int32_t *required_size_out)
#define SET_HOT_DIRECTORY_SIG(n) bool32 n(Application_Links *app, String string)
#define GET_FILE_LIST_SIG(n) bool32 n(Application_Links *app, String directory, File_List *list_out)
#define SET_HOT_DIRECTORY_SIG(n) b32 n(Application_Links *app, String string)
#define GET_FILE_LIST_SIG(n) b32 n(Application_Links *app, String directory, File_List *list_out)
#define FREE_FILE_LIST_SIG(n) void n(Application_Links *app, File_List list)
#define SET_GUI_UP_DOWN_KEYS_SIG(n) void n(Application_Links *app, Key_Code up_key, Key_Modifier up_key_modifier, Key_Code down_key, Key_Modifier down_key_modifier)
#define MEMORY_ALLOCATE_SIG(n) void* n(Application_Links *app, int32_t size)
#define MEMORY_SET_PROTECTION_SIG(n) bool32 n(Application_Links *app, void *ptr, int32_t size, Memory_Protect_Flags flags)
#define MEMORY_SET_PROTECTION_SIG(n) b32 n(Application_Links *app, void *ptr, int32_t size, Memory_Protect_Flags flags)
#define MEMORY_FREE_SIG(n) void n(Application_Links *app, void *ptr, int32_t size)
#define FILE_GET_ATTRIBUTES_SIG(n) bool32 n(Application_Links *app, String file_name, File_Attributes *attributes_out)
#define DIRECTORY_CD_SIG(n) bool32 n(Application_Links *app, String *directory, String relative_path)
#define GET_4ED_PATH_SIG(n) bool32 n(Application_Links *app, String *path_out, int32_t *required_size_out)
#define FILE_GET_ATTRIBUTES_SIG(n) b32 n(Application_Links *app, String file_name, File_Attributes *attributes_out)
#define DIRECTORY_CD_SIG(n) b32 n(Application_Links *app, String *directory, String relative_path)
#define GET_4ED_PATH_SIG(n) b32 n(Application_Links *app, String *path_out, int32_t *required_size_out)
#define SHOW_MOUSE_CURSOR_SIG(n) void n(Application_Links *app, Mouse_Cursor_Show_Type show)
#define SET_EDIT_FINISHED_HOOK_REPEAT_SPEED_SIG(n) bool32 n(Application_Links *app, u32 milliseconds)
#define SET_FULLSCREEN_SIG(n) bool32 n(Application_Links *app, bool32 full_screen)
#define IS_FULLSCREEN_SIG(n) bool32 n(Application_Links *app)
#define SET_EDIT_FINISHED_HOOK_REPEAT_SPEED_SIG(n) b32 n(Application_Links *app, u32 milliseconds)
#define SET_FULLSCREEN_SIG(n) b32 n(Application_Links *app, b32 full_screen)
#define IS_FULLSCREEN_SIG(n) b32 n(Application_Links *app)
#define SEND_EXIT_SIGNAL_SIG(n) void n(Application_Links *app)
#define SET_WINDOW_TITLE_SIG(n) bool32 n(Application_Links *app, String title)
#define SET_WINDOW_TITLE_SIG(n) b32 n(Application_Links *app, String title)
#define GET_MICROSECONDS_TIMESTAMP_SIG(n) Microsecond_Time_Stamp n(Application_Links *app)
#define DRAW_STRING_SIG(n) Vec2 n(Application_Links *app, Face_ID font_id, String str, Vec2 point, int_color color, u32 flags, Vec2 delta)
#define GET_STRING_ADVANCE_SIG(n) f32 n(Application_Links *app, Face_ID font_id, String str)
@ -757,146 +757,146 @@ app_links->open_color_picker_ = Open_Color_Picker;\
app_links->animate_ = Animate;\
app_links->find_all_in_range_insensitive_ = Find_All_In_Range_Insensitive;} while(false)
#if defined(ALLOW_DEP_4CODER)
static bool32 global_set_setting(Application_Links *app, Global_Setting_ID setting, int32_t value){return(app->global_set_setting(app, setting, value));}
static bool32 global_set_mapping(Application_Links *app, void *data, int32_t size){return(app->global_set_mapping(app, data, size));}
static bool32 exec_system_command(Application_Links *app, View_ID view_id, Buffer_Identifier buffer_id, String path, String command, Command_Line_Interface_Flag flags){return(app->exec_system_command(app, view_id, buffer_id, path, command, flags));}
static bool32 clipboard_post(Application_Links *app, int32_t clipboard_id, String string){return(app->clipboard_post(app, clipboard_id, string));}
static bool32 clipboard_count(Application_Links *app, int32_t clipboard_id, int32_t *count_out){return(app->clipboard_count(app, clipboard_id, count_out));}
static bool32 clipboard_index(Application_Links *app, int32_t clipboard_id, int32_t item_index, String *string_out, int32_t *required_size_out){return(app->clipboard_index(app, clipboard_id, item_index, string_out, required_size_out));}
static b32 global_set_setting(Application_Links *app, Global_Setting_ID setting, int32_t value){return(app->global_set_setting(app, setting, value));}
static b32 global_set_mapping(Application_Links *app, void *data, int32_t size){return(app->global_set_mapping(app, data, size));}
static b32 exec_system_command(Application_Links *app, View_ID view_id, Buffer_Identifier buffer_id, String path, String command, Command_Line_Interface_Flag flags){return(app->exec_system_command(app, view_id, buffer_id, path, command, flags));}
static b32 clipboard_post(Application_Links *app, int32_t clipboard_id, String string){return(app->clipboard_post(app, clipboard_id, string));}
static b32 clipboard_count(Application_Links *app, int32_t clipboard_id, int32_t *count_out){return(app->clipboard_count(app, clipboard_id, count_out));}
static b32 clipboard_index(Application_Links *app, int32_t clipboard_id, int32_t item_index, String *string_out, int32_t *required_size_out){return(app->clipboard_index(app, clipboard_id, item_index, string_out, required_size_out));}
static Parse_Context_ID create_parse_context(Application_Links *app, Parser_String_And_Type *kw, uint32_t kw_count, Parser_String_And_Type *pp, uint32_t pp_count){return(app->create_parse_context(app, kw, kw_count, pp, pp_count));}
static int32_t get_buffer_count(Application_Links *app){return(app->get_buffer_count(app));}
static bool32 get_buffer_first(Application_Links *app, Access_Flag access, Buffer_ID *buffer_id_out){return(app->get_buffer_first(app, access, buffer_id_out));}
static bool32 get_buffer_next(Application_Links *app, Buffer_ID buffer_id, Access_Flag access, Buffer_ID *buffer_id_out){return(app->get_buffer_next(app, buffer_id, access, buffer_id_out));}
static bool32 get_buffer_summary(Application_Links *app, Buffer_ID buffer_id, Access_Flag access, Buffer_Summary *buffer_summary_out){return(app->get_buffer_summary(app, buffer_id, access, buffer_summary_out));}
static bool32 get_buffer_by_name(Application_Links *app, String name, Access_Flag access, Buffer_ID *buffer_id_out){return(app->get_buffer_by_name(app, name, access, buffer_id_out));}
static bool32 get_buffer_by_file_name(Application_Links *app, String file_name, Access_Flag access, Buffer_ID *buffer_id_out){return(app->get_buffer_by_file_name(app, file_name, access, buffer_id_out));}
static bool32 buffer_read_range(Application_Links *app, Buffer_ID buffer_id, int32_t start, int32_t one_past_last, char *out){return(app->buffer_read_range(app, buffer_id, start, one_past_last, out));}
static bool32 buffer_replace_range(Application_Links *app, Buffer_ID buffer_id, int32_t start, int32_t one_past_last, String string){return(app->buffer_replace_range(app, buffer_id, start, one_past_last, string));}
static bool32 buffer_set_edit_handler(Application_Links *app, Buffer_ID buffer_id, Buffer_Edit_Handler *handler){return(app->buffer_set_edit_handler(app, buffer_id, handler));}
static bool32 buffer_compute_cursor(Application_Links *app, Buffer_ID buffer_id, Buffer_Seek seek, Partial_Cursor *cursor_out){return(app->buffer_compute_cursor(app, buffer_id, seek, cursor_out));}
static bool32 buffer_batch_edit(Application_Links *app, Buffer_ID buffer_id, char *str, int32_t str_len, Buffer_Edit *edits, int32_t edit_count, Buffer_Batch_Edit_Type type){return(app->buffer_batch_edit(app, buffer_id, str, str_len, edits, edit_count, type));}
static bool32 buffer_get_setting(Application_Links *app, Buffer_ID buffer_id, Buffer_Setting_ID setting, int32_t *value_out){return(app->buffer_get_setting(app, buffer_id, setting, value_out));}
static bool32 buffer_set_setting(Application_Links *app, Buffer_ID buffer_id, Buffer_Setting_ID setting, int32_t value){return(app->buffer_set_setting(app, buffer_id, setting, value));}
static bool32 buffer_get_managed_scope(Application_Links *app, Buffer_ID buffer_id, Managed_Scope *scope_out){return(app->buffer_get_managed_scope(app, buffer_id, scope_out));}
static bool32 buffer_token_count(Application_Links *app, Buffer_ID buffer_id, int32_t *count_out){return(app->buffer_token_count(app, buffer_id, count_out));}
static bool32 buffer_read_tokens(Application_Links *app, Buffer_ID buffer_id, int32_t start_token, int32_t end_token, Cpp_Token *tokens_out){return(app->buffer_read_tokens(app, buffer_id, start_token, end_token, tokens_out));}
static bool32 buffer_get_token_range(Application_Links *app, Buffer_ID buffer_id, Cpp_Token **first_token_out, Cpp_Token **one_past_last_token_out){return(app->buffer_get_token_range(app, buffer_id, first_token_out, one_past_last_token_out));}
static bool32 buffer_get_token_index(Application_Links *app, Buffer_ID buffer_id, int32_t pos, Cpp_Get_Token_Result *get_result){return(app->buffer_get_token_index(app, buffer_id, pos, get_result));}
static bool32 buffer_send_end_signal(Application_Links *app, Buffer_ID buffer_id){return(app->buffer_send_end_signal(app, buffer_id));}
static bool32 create_buffer(Application_Links *app, String file_name, Buffer_Create_Flag flags, Buffer_ID *new_buffer_id_out){return(app->create_buffer(app, file_name, flags, new_buffer_id_out));}
static bool32 buffer_save(Application_Links *app, Buffer_ID buffer_id, String file_name, uint32_t flags){return(app->buffer_save(app, buffer_id, file_name, flags));}
static bool32 buffer_kill(Application_Links *app, Buffer_ID buffer_id, Buffer_Kill_Flag flags, Buffer_Kill_Result *result){return(app->buffer_kill(app, buffer_id, flags, result));}
static bool32 buffer_reopen(Application_Links *app, Buffer_ID buffer_id, Buffer_Reopen_Flag flags, Buffer_Reopen_Result *result){return(app->buffer_reopen(app, buffer_id, flags, result));}
static bool32 buffer_get_file_attributes(Application_Links *app, Buffer_ID buffer_id, File_Attributes *attributes_out){return(app->buffer_get_file_attributes(app, buffer_id, attributes_out));}
static bool32 get_view_first(Application_Links *app, Access_Flag access, View_ID *view_id_out){return(app->get_view_first(app, access, view_id_out));}
static bool32 get_view_next(Application_Links *app, View_ID view_id, Access_Flag access, View_ID *view_id_out){return(app->get_view_next(app, view_id, access, view_id_out));}
static bool32 get_view_summary(Application_Links *app, View_ID view_id, Access_Flag access, View_Summary *view_summary_out){return(app->get_view_summary(app, view_id, access, view_summary_out));}
static bool32 get_active_view(Application_Links *app, Access_Flag access, View_ID *view_id_out){return(app->get_active_view(app, access, view_id_out));}
static bool32 get_active_panel(Application_Links *app, Panel_ID *panel_id_out){return(app->get_active_panel(app, panel_id_out));}
static bool32 view_get_panel(Application_Links *app, View_ID view_id, Panel_ID *panel_id_out){return(app->view_get_panel(app, view_id, panel_id_out));}
static bool32 panel_get_view(Application_Links *app, Panel_ID panel_id, View_ID *view_id_out){return(app->panel_get_view(app, panel_id, view_id_out));}
static bool32 panel_is_split(Application_Links *app, Panel_ID panel_id){return(app->panel_is_split(app, panel_id));}
static bool32 panel_is_leaf(Application_Links *app, Panel_ID panel_id){return(app->panel_is_leaf(app, panel_id));}
static bool32 panel_split(Application_Links *app, Panel_ID panel_id, Panel_Split_Orientation orientation){return(app->panel_split(app, panel_id, orientation));}
static bool32 panel_set_split(Application_Links *app, Panel_ID panel_id, Panel_Split_Kind kind, float t){return(app->panel_set_split(app, panel_id, kind, t));}
static bool32 panel_swap_children(Application_Links *app, Panel_ID panel_id, Panel_Split_Kind kind, float t){return(app->panel_swap_children(app, panel_id, kind, t));}
static bool32 panel_get_parent(Application_Links *app, Panel_ID panel_id, Panel_ID *panel_id_out){return(app->panel_get_parent(app, panel_id, panel_id_out));}
static bool32 panel_get_child(Application_Links *app, Panel_ID panel_id, Panel_Child which_child, Panel_ID *panel_id_out){return(app->panel_get_child(app, panel_id, which_child, panel_id_out));}
static bool32 panel_get_max(Application_Links *app, Panel_ID panel_id, Panel_ID *panel_id_out){return(app->panel_get_max(app, panel_id, panel_id_out));}
static bool32 panel_get_margin(Application_Links *app, Panel_ID panel_id, i32_Rect *margins_out){return(app->panel_get_margin(app, panel_id, margins_out));}
static bool32 view_close(Application_Links *app, View_ID view_id){return(app->view_close(app, view_id));}
static bool32 view_set_active(Application_Links *app, View_ID view_id){return(app->view_set_active(app, view_id));}
static bool32 view_get_setting(Application_Links *app, View_ID view_id, View_Setting_ID setting, int32_t *value_out){return(app->view_get_setting(app, view_id, setting, value_out));}
static bool32 view_set_setting(Application_Links *app, View_ID view_id, View_Setting_ID setting, int32_t value){return(app->view_set_setting(app, view_id, setting, value));}
static bool32 view_get_managed_scope(Application_Links *app, View_ID view_id, Managed_Scope *scope){return(app->view_get_managed_scope(app, view_id, scope));}
static bool32 view_get_enclosure_rect(Application_Links *app, View_ID view_id, i32_Rect *rect_out){return(app->view_get_enclosure_rect(app, view_id, rect_out));}
static bool32 view_compute_cursor(Application_Links *app, View_ID view_id, Buffer_Seek seek, Full_Cursor *cursor_out){return(app->view_compute_cursor(app, view_id, seek, cursor_out));}
static bool32 view_set_cursor(Application_Links *app, View_ID view_id, Buffer_Seek seek, bool32 set_preferred_x){return(app->view_set_cursor(app, view_id, seek, set_preferred_x));}
static bool32 view_set_scroll(Application_Links *app, View_ID view_id, GUI_Scroll_Vars scroll){return(app->view_set_scroll(app, view_id, scroll));}
static bool32 view_set_mark(Application_Links *app, View_ID view_id, Buffer_Seek seek){return(app->view_set_mark(app, view_id, seek));}
static bool32 view_set_buffer(Application_Links *app, View_ID view_id, Buffer_ID buffer_id, Set_Buffer_Flag flags){return(app->view_set_buffer(app, view_id, buffer_id, flags));}
static bool32 view_post_fade(Application_Links *app, View_ID view_id, float seconds, int32_t start, int32_t end, int_color color){return(app->view_post_fade(app, view_id, seconds, start, end, color));}
static bool32 view_begin_ui_mode(Application_Links *app, View_ID view_id){return(app->view_begin_ui_mode(app, view_id));}
static bool32 view_end_ui_mode(Application_Links *app, View_ID view_id){return(app->view_end_ui_mode(app, view_id));}
static bool32 view_is_in_ui_mode(Application_Links *app, View_ID view_id){return(app->view_is_in_ui_mode(app, view_id));}
static bool32 view_set_quit_ui_handler(Application_Links *app, View_ID view_id, UI_Quit_Function_Type *quit_function){return(app->view_set_quit_ui_handler(app, view_id, quit_function));}
static bool32 view_get_quit_ui_handler(Application_Links *app, View_ID view_id, UI_Quit_Function_Type **quit_function_out){return(app->view_get_quit_ui_handler(app, view_id, quit_function_out));}
static b32 get_buffer_first(Application_Links *app, Access_Flag access, Buffer_ID *buffer_id_out){return(app->get_buffer_first(app, access, buffer_id_out));}
static b32 get_buffer_next(Application_Links *app, Buffer_ID buffer_id, Access_Flag access, Buffer_ID *buffer_id_out){return(app->get_buffer_next(app, buffer_id, access, buffer_id_out));}
static b32 get_buffer_summary(Application_Links *app, Buffer_ID buffer_id, Access_Flag access, Buffer_Summary *buffer_summary_out){return(app->get_buffer_summary(app, buffer_id, access, buffer_summary_out));}
static b32 get_buffer_by_name(Application_Links *app, String name, Access_Flag access, Buffer_ID *buffer_id_out){return(app->get_buffer_by_name(app, name, access, buffer_id_out));}
static b32 get_buffer_by_file_name(Application_Links *app, String file_name, Access_Flag access, Buffer_ID *buffer_id_out){return(app->get_buffer_by_file_name(app, file_name, access, buffer_id_out));}
static b32 buffer_read_range(Application_Links *app, Buffer_ID buffer_id, int32_t start, int32_t one_past_last, char *out){return(app->buffer_read_range(app, buffer_id, start, one_past_last, out));}
static b32 buffer_replace_range(Application_Links *app, Buffer_ID buffer_id, int32_t start, int32_t one_past_last, String string){return(app->buffer_replace_range(app, buffer_id, start, one_past_last, string));}
static b32 buffer_set_edit_handler(Application_Links *app, Buffer_ID buffer_id, Buffer_Edit_Handler *handler){return(app->buffer_set_edit_handler(app, buffer_id, handler));}
static b32 buffer_compute_cursor(Application_Links *app, Buffer_ID buffer_id, Buffer_Seek seek, Partial_Cursor *cursor_out){return(app->buffer_compute_cursor(app, buffer_id, seek, cursor_out));}
static b32 buffer_batch_edit(Application_Links *app, Buffer_ID buffer_id, char *str, int32_t str_len, Buffer_Edit *edits, int32_t edit_count, Buffer_Batch_Edit_Type type){return(app->buffer_batch_edit(app, buffer_id, str, str_len, edits, edit_count, type));}
static b32 buffer_get_setting(Application_Links *app, Buffer_ID buffer_id, Buffer_Setting_ID setting, int32_t *value_out){return(app->buffer_get_setting(app, buffer_id, setting, value_out));}
static b32 buffer_set_setting(Application_Links *app, Buffer_ID buffer_id, Buffer_Setting_ID setting, int32_t value){return(app->buffer_set_setting(app, buffer_id, setting, value));}
static b32 buffer_get_managed_scope(Application_Links *app, Buffer_ID buffer_id, Managed_Scope *scope_out){return(app->buffer_get_managed_scope(app, buffer_id, scope_out));}
static b32 buffer_token_count(Application_Links *app, Buffer_ID buffer_id, int32_t *count_out){return(app->buffer_token_count(app, buffer_id, count_out));}
static b32 buffer_read_tokens(Application_Links *app, Buffer_ID buffer_id, int32_t start_token, int32_t end_token, Cpp_Token *tokens_out){return(app->buffer_read_tokens(app, buffer_id, start_token, end_token, tokens_out));}
static b32 buffer_get_token_range(Application_Links *app, Buffer_ID buffer_id, Cpp_Token **first_token_out, Cpp_Token **one_past_last_token_out){return(app->buffer_get_token_range(app, buffer_id, first_token_out, one_past_last_token_out));}
static b32 buffer_get_token_index(Application_Links *app, Buffer_ID buffer_id, int32_t pos, Cpp_Get_Token_Result *get_result){return(app->buffer_get_token_index(app, buffer_id, pos, get_result));}
static b32 buffer_send_end_signal(Application_Links *app, Buffer_ID buffer_id){return(app->buffer_send_end_signal(app, buffer_id));}
static b32 create_buffer(Application_Links *app, String file_name, Buffer_Create_Flag flags, Buffer_ID *new_buffer_id_out){return(app->create_buffer(app, file_name, flags, new_buffer_id_out));}
static b32 buffer_save(Application_Links *app, Buffer_ID buffer_id, String file_name, uint32_t flags){return(app->buffer_save(app, buffer_id, file_name, flags));}
static b32 buffer_kill(Application_Links *app, Buffer_ID buffer_id, Buffer_Kill_Flag flags, Buffer_Kill_Result *result){return(app->buffer_kill(app, buffer_id, flags, result));}
static b32 buffer_reopen(Application_Links *app, Buffer_ID buffer_id, Buffer_Reopen_Flag flags, Buffer_Reopen_Result *result){return(app->buffer_reopen(app, buffer_id, flags, result));}
static b32 buffer_get_file_attributes(Application_Links *app, Buffer_ID buffer_id, File_Attributes *attributes_out){return(app->buffer_get_file_attributes(app, buffer_id, attributes_out));}
static b32 get_view_first(Application_Links *app, Access_Flag access, View_ID *view_id_out){return(app->get_view_first(app, access, view_id_out));}
static b32 get_view_next(Application_Links *app, View_ID view_id, Access_Flag access, View_ID *view_id_out){return(app->get_view_next(app, view_id, access, view_id_out));}
static b32 get_view_summary(Application_Links *app, View_ID view_id, Access_Flag access, View_Summary *view_summary_out){return(app->get_view_summary(app, view_id, access, view_summary_out));}
static b32 get_active_view(Application_Links *app, Access_Flag access, View_ID *view_id_out){return(app->get_active_view(app, access, view_id_out));}
static b32 get_active_panel(Application_Links *app, Panel_ID *panel_id_out){return(app->get_active_panel(app, panel_id_out));}
static b32 view_get_panel(Application_Links *app, View_ID view_id, Panel_ID *panel_id_out){return(app->view_get_panel(app, view_id, panel_id_out));}
static b32 panel_get_view(Application_Links *app, Panel_ID panel_id, View_ID *view_id_out){return(app->panel_get_view(app, panel_id, view_id_out));}
static b32 panel_is_split(Application_Links *app, Panel_ID panel_id){return(app->panel_is_split(app, panel_id));}
static b32 panel_is_leaf(Application_Links *app, Panel_ID panel_id){return(app->panel_is_leaf(app, panel_id));}
static b32 panel_split(Application_Links *app, Panel_ID panel_id, Panel_Split_Orientation orientation){return(app->panel_split(app, panel_id, orientation));}
static b32 panel_set_split(Application_Links *app, Panel_ID panel_id, Panel_Split_Kind kind, float t){return(app->panel_set_split(app, panel_id, kind, t));}
static b32 panel_swap_children(Application_Links *app, Panel_ID panel_id, Panel_Split_Kind kind, float t){return(app->panel_swap_children(app, panel_id, kind, t));}
static b32 panel_get_parent(Application_Links *app, Panel_ID panel_id, Panel_ID *panel_id_out){return(app->panel_get_parent(app, panel_id, panel_id_out));}
static b32 panel_get_child(Application_Links *app, Panel_ID panel_id, Panel_Child which_child, Panel_ID *panel_id_out){return(app->panel_get_child(app, panel_id, which_child, panel_id_out));}
static b32 panel_get_max(Application_Links *app, Panel_ID panel_id, Panel_ID *panel_id_out){return(app->panel_get_max(app, panel_id, panel_id_out));}
static b32 panel_get_margin(Application_Links *app, Panel_ID panel_id, i32_Rect *margins_out){return(app->panel_get_margin(app, panel_id, margins_out));}
static b32 view_close(Application_Links *app, View_ID view_id){return(app->view_close(app, view_id));}
static b32 view_set_active(Application_Links *app, View_ID view_id){return(app->view_set_active(app, view_id));}
static b32 view_get_setting(Application_Links *app, View_ID view_id, View_Setting_ID setting, int32_t *value_out){return(app->view_get_setting(app, view_id, setting, value_out));}
static b32 view_set_setting(Application_Links *app, View_ID view_id, View_Setting_ID setting, int32_t value){return(app->view_set_setting(app, view_id, setting, value));}
static b32 view_get_managed_scope(Application_Links *app, View_ID view_id, Managed_Scope *scope){return(app->view_get_managed_scope(app, view_id, scope));}
static b32 view_get_enclosure_rect(Application_Links *app, View_ID view_id, i32_Rect *rect_out){return(app->view_get_enclosure_rect(app, view_id, rect_out));}
static b32 view_compute_cursor(Application_Links *app, View_ID view_id, Buffer_Seek seek, Full_Cursor *cursor_out){return(app->view_compute_cursor(app, view_id, seek, cursor_out));}
static b32 view_set_cursor(Application_Links *app, View_ID view_id, Buffer_Seek seek, b32 set_preferred_x){return(app->view_set_cursor(app, view_id, seek, set_preferred_x));}
static b32 view_set_scroll(Application_Links *app, View_ID view_id, GUI_Scroll_Vars scroll){return(app->view_set_scroll(app, view_id, scroll));}
static b32 view_set_mark(Application_Links *app, View_ID view_id, Buffer_Seek seek){return(app->view_set_mark(app, view_id, seek));}
static b32 view_set_buffer(Application_Links *app, View_ID view_id, Buffer_ID buffer_id, Set_Buffer_Flag flags){return(app->view_set_buffer(app, view_id, buffer_id, flags));}
static b32 view_post_fade(Application_Links *app, View_ID view_id, float seconds, int32_t start, int32_t end, int_color color){return(app->view_post_fade(app, view_id, seconds, start, end, color));}
static b32 view_begin_ui_mode(Application_Links *app, View_ID view_id){return(app->view_begin_ui_mode(app, view_id));}
static b32 view_end_ui_mode(Application_Links *app, View_ID view_id){return(app->view_end_ui_mode(app, view_id));}
static b32 view_is_in_ui_mode(Application_Links *app, View_ID view_id){return(app->view_is_in_ui_mode(app, view_id));}
static b32 view_set_quit_ui_handler(Application_Links *app, View_ID view_id, UI_Quit_Function_Type *quit_function){return(app->view_set_quit_ui_handler(app, view_id, quit_function));}
static b32 view_get_quit_ui_handler(Application_Links *app, View_ID view_id, UI_Quit_Function_Type **quit_function_out){return(app->view_get_quit_ui_handler(app, view_id, quit_function_out));}
static Managed_Scope create_user_managed_scope(Application_Links *app){return(app->create_user_managed_scope(app));}
static bool32 destroy_user_managed_scope(Application_Links *app, Managed_Scope scope){return(app->destroy_user_managed_scope(app, scope));}
static b32 destroy_user_managed_scope(Application_Links *app, Managed_Scope scope){return(app->destroy_user_managed_scope(app, scope));}
static Managed_Scope get_global_managed_scope(Application_Links *app){return(app->get_global_managed_scope(app));}
static Managed_Scope get_managed_scope_with_multiple_dependencies(Application_Links *app, Managed_Scope *scopes, int32_t count){return(app->get_managed_scope_with_multiple_dependencies(app, scopes, count));}
static bool32 managed_scope_clear_contents(Application_Links *app, Managed_Scope scope){return(app->managed_scope_clear_contents(app, scope));}
static bool32 managed_scope_clear_self_all_dependent_scopes(Application_Links *app, Managed_Scope scope){return(app->managed_scope_clear_self_all_dependent_scopes(app, scope));}
static b32 managed_scope_clear_contents(Application_Links *app, Managed_Scope scope){return(app->managed_scope_clear_contents(app, scope));}
static b32 managed_scope_clear_self_all_dependent_scopes(Application_Links *app, Managed_Scope scope){return(app->managed_scope_clear_self_all_dependent_scopes(app, scope));}
static Managed_Variable_ID managed_variable_create(Application_Links *app, char *null_terminated_name, uint64_t default_value){return(app->managed_variable_create(app, null_terminated_name, default_value));}
static Managed_Variable_ID managed_variable_get_id(Application_Links *app, char *null_terminated_name){return(app->managed_variable_get_id(app, null_terminated_name));}
static Managed_Variable_ID managed_variable_create_or_get_id(Application_Links *app, char *null_terminated_name, uint64_t default_value){return(app->managed_variable_create_or_get_id(app, null_terminated_name, default_value));}
static bool32 managed_variable_set(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t value){return(app->managed_variable_set(app, scope, id, value));}
static bool32 managed_variable_get(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t *value_out){return(app->managed_variable_get(app, scope, id, value_out));}
static b32 managed_variable_set(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t value){return(app->managed_variable_set(app, scope, id, value));}
static b32 managed_variable_get(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t *value_out){return(app->managed_variable_get(app, scope, id, value_out));}
static Managed_Object alloc_managed_memory_in_scope(Application_Links *app, Managed_Scope scope, i32 item_size, i32 count){return(app->alloc_managed_memory_in_scope(app, scope, item_size, count));}
static Managed_Object alloc_buffer_markers_on_buffer(Application_Links *app, Buffer_ID buffer_id, int32_t count, Managed_Scope *optional_extra_scope){return(app->alloc_buffer_markers_on_buffer(app, buffer_id, count, optional_extra_scope));}
static Managed_Object alloc_managed_arena_in_scope(Application_Links *app, Managed_Scope scope, i32 page_size){return(app->alloc_managed_arena_in_scope(app, scope, page_size));}
static Marker_Visual create_marker_visual(Application_Links *app, Managed_Object object){return(app->create_marker_visual(app, object));}
static bool32 marker_visual_set_effect(Application_Links *app, Marker_Visual visual, Marker_Visual_Type type, int_color color, int_color text_color, Marker_Visual_Text_Style text_style){return(app->marker_visual_set_effect(app, visual, type, color, text_color, text_style));}
static bool32 marker_visual_set_take_rule(Application_Links *app, Marker_Visual visual, Marker_Visual_Take_Rule take_rule){return(app->marker_visual_set_take_rule(app, visual, take_rule));}
static bool32 marker_visual_set_priority(Application_Links *app, Marker_Visual visual, Marker_Visual_Priority_Level priority){return(app->marker_visual_set_priority(app, visual, priority));}
static bool32 marker_visual_set_view_key(Application_Links *app, Marker_Visual visual, View_ID key_view_id){return(app->marker_visual_set_view_key(app, visual, key_view_id));}
static bool32 destroy_marker_visual(Application_Links *app, Marker_Visual visual){return(app->destroy_marker_visual(app, visual));}
static b32 marker_visual_set_effect(Application_Links *app, Marker_Visual visual, Marker_Visual_Type type, int_color color, int_color text_color, Marker_Visual_Text_Style text_style){return(app->marker_visual_set_effect(app, visual, type, color, text_color, text_style));}
static b32 marker_visual_set_take_rule(Application_Links *app, Marker_Visual visual, Marker_Visual_Take_Rule take_rule){return(app->marker_visual_set_take_rule(app, visual, take_rule));}
static b32 marker_visual_set_priority(Application_Links *app, Marker_Visual visual, Marker_Visual_Priority_Level priority){return(app->marker_visual_set_priority(app, visual, priority));}
static b32 marker_visual_set_view_key(Application_Links *app, Marker_Visual visual, View_ID key_view_id){return(app->marker_visual_set_view_key(app, visual, key_view_id));}
static b32 destroy_marker_visual(Application_Links *app, Marker_Visual visual){return(app->destroy_marker_visual(app, visual));}
static int32_t buffer_markers_get_attached_visual_count(Application_Links *app, Managed_Object object){return(app->buffer_markers_get_attached_visual_count(app, object));}
static Marker_Visual* buffer_markers_get_attached_visual(Application_Links *app, Partition *part, Managed_Object object){return(app->buffer_markers_get_attached_visual(app, part, object));}
static uint32_t managed_object_get_item_size(Application_Links *app, Managed_Object object){return(app->managed_object_get_item_size(app, object));}
static uint32_t managed_object_get_item_count(Application_Links *app, Managed_Object object){return(app->managed_object_get_item_count(app, object));}
static Managed_Object_Type managed_object_get_type(Application_Links *app, Managed_Object object){return(app->managed_object_get_type(app, object));}
static Managed_Scope managed_object_get_containing_scope(Application_Links *app, Managed_Object object){return(app->managed_object_get_containing_scope(app, object));}
static bool32 managed_object_free(Application_Links *app, Managed_Object object){return(app->managed_object_free(app, object));}
static bool32 managed_object_store_data(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem){return(app->managed_object_store_data(app, object, first_index, count, mem));}
static bool32 managed_object_load_data(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem_out){return(app->managed_object_load_data(app, object, first_index, count, mem_out));}
static b32 managed_object_free(Application_Links *app, Managed_Object object){return(app->managed_object_free(app, object));}
static b32 managed_object_store_data(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem){return(app->managed_object_store_data(app, object, first_index, count, mem));}
static b32 managed_object_load_data(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem_out){return(app->managed_object_load_data(app, object, first_index, count, mem_out));}
static User_Input get_user_input(Application_Links *app, Input_Type_Flag get_type, Input_Type_Flag abort_type){return(app->get_user_input(app, get_type, abort_type));}
static User_Input get_command_input(Application_Links *app){return(app->get_command_input(app));}
static void set_command_input(Application_Links *app, Key_Event_Data key_data){(app->set_command_input(app, key_data));}
static Mouse_State get_mouse_state(Application_Links *app){return(app->get_mouse_state(app));}
static int32_t get_active_query_bars(Application_Links *app, View_ID view_id, int32_t max_result_count, Query_Bar **result_array){return(app->get_active_query_bars(app, view_id, max_result_count, result_array));}
static bool32 start_query_bar(Application_Links *app, Query_Bar *bar, uint32_t flags){return(app->start_query_bar(app, bar, flags));}
static b32 start_query_bar(Application_Links *app, Query_Bar *bar, uint32_t flags){return(app->start_query_bar(app, bar, flags));}
static void end_query_bar(Application_Links *app, Query_Bar *bar, uint32_t flags){(app->end_query_bar(app, bar, flags));}
static bool32 print_message(Application_Links *app, String message){return(app->print_message(app, message));}
static b32 print_message(Application_Links *app, String message){return(app->print_message(app, message));}
static Face_ID get_largest_face_id(Application_Links *app){return(app->get_largest_face_id(app));}
static bool32 set_global_face(Application_Links *app, Face_ID id, bool32 apply_to_all_buffers){return(app->set_global_face(app, id, apply_to_all_buffers));}
static bool32 buffer_history_get_max_record_index(Application_Links *app, Buffer_ID buffer_id, History_Record_Index *index_out){return(app->buffer_history_get_max_record_index(app, buffer_id, index_out));}
static bool32 buffer_history_get_record_info(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index, Record_Info *record_out){return(app->buffer_history_get_record_info(app, buffer_id, index, record_out));}
static bool32 buffer_history_get_group_sub_record(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index, int32_t sub_index, Record_Info *record_out){return(app->buffer_history_get_group_sub_record(app, buffer_id, index, sub_index, record_out));}
static bool32 buffer_history_get_current_state_index(Application_Links *app, Buffer_ID buffer_id, History_Record_Index *index_out){return(app->buffer_history_get_current_state_index(app, buffer_id, index_out));}
static bool32 buffer_history_set_current_state_index(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index){return(app->buffer_history_set_current_state_index(app, buffer_id, index));}
static bool32 buffer_history_merge_record_range(Application_Links *app, Buffer_ID buffer_id, History_Record_Index first_index, History_Record_Index last_index, Record_Merge_Flag flags){return(app->buffer_history_merge_record_range(app, buffer_id, first_index, last_index, flags));}
static bool32 buffer_history_clear_after_current_state(Application_Links *app, Buffer_ID buffer_id){return(app->buffer_history_clear_after_current_state(app, buffer_id));}
static b32 set_global_face(Application_Links *app, Face_ID id, b32 apply_to_all_buffers){return(app->set_global_face(app, id, apply_to_all_buffers));}
static b32 buffer_history_get_max_record_index(Application_Links *app, Buffer_ID buffer_id, History_Record_Index *index_out){return(app->buffer_history_get_max_record_index(app, buffer_id, index_out));}
static b32 buffer_history_get_record_info(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index, Record_Info *record_out){return(app->buffer_history_get_record_info(app, buffer_id, index, record_out));}
static b32 buffer_history_get_group_sub_record(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index, int32_t sub_index, Record_Info *record_out){return(app->buffer_history_get_group_sub_record(app, buffer_id, index, sub_index, record_out));}
static b32 buffer_history_get_current_state_index(Application_Links *app, Buffer_ID buffer_id, History_Record_Index *index_out){return(app->buffer_history_get_current_state_index(app, buffer_id, index_out));}
static b32 buffer_history_set_current_state_index(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index){return(app->buffer_history_set_current_state_index(app, buffer_id, index));}
static b32 buffer_history_merge_record_range(Application_Links *app, Buffer_ID buffer_id, History_Record_Index first_index, History_Record_Index last_index, Record_Merge_Flag flags){return(app->buffer_history_merge_record_range(app, buffer_id, first_index, last_index, flags));}
static b32 buffer_history_clear_after_current_state(Application_Links *app, Buffer_ID buffer_id){return(app->buffer_history_clear_after_current_state(app, buffer_id));}
static void global_history_edit_group_begin(Application_Links *app){(app->global_history_edit_group_begin(app));}
static void global_history_edit_group_end(Application_Links *app){(app->global_history_edit_group_end(app));}
static bool32 buffer_set_face(Application_Links *app, Buffer_ID buffer_id, Face_ID id){return(app->buffer_set_face(app, buffer_id, id));}
static b32 buffer_set_face(Application_Links *app, Buffer_ID buffer_id, Face_ID id){return(app->buffer_set_face(app, buffer_id, id));}
static Face_Description get_face_description(Application_Links *app, Face_ID id){return(app->get_face_description(app, id));}
static bool32 get_face_id(Application_Links *app, Buffer_ID buffer_id, Face_ID *face_id_out){return(app->get_face_id(app, buffer_id, face_id_out));}
static b32 get_face_id(Application_Links *app, Buffer_ID buffer_id, Face_ID *face_id_out){return(app->get_face_id(app, buffer_id, face_id_out));}
static Face_ID try_create_new_face(Application_Links *app, Face_Description *description){return(app->try_create_new_face(app, description));}
static bool32 try_modify_face(Application_Links *app, Face_ID id, Face_Description *description){return(app->try_modify_face(app, id, description));}
static bool32 try_release_face(Application_Links *app, Face_ID id, Face_ID replacement_id){return(app->try_release_face(app, id, replacement_id));}
static b32 try_modify_face(Application_Links *app, Face_ID id, Face_Description *description){return(app->try_modify_face(app, id, description));}
static b32 try_release_face(Application_Links *app, Face_ID id, Face_ID replacement_id){return(app->try_release_face(app, id, replacement_id));}
static int32_t get_available_font_count(Application_Links *app){return(app->get_available_font_count(app));}
static Available_Font get_available_font(Application_Links *app, int32_t index){return(app->get_available_font(app, index));}
static void set_theme_colors(Application_Links *app, Theme_Color *colors, int32_t count){(app->set_theme_colors(app, colors, count));}
static void get_theme_colors(Application_Links *app, Theme_Color *colors, int32_t count){(app->get_theme_colors(app, colors, count));}
static argb_color finalize_color(Application_Links *app, int_color color){return(app->finalize_color(app, color));}
static int32_t get_hot_directory(Application_Links *app, String *out, int32_t *required_size_out){return(app->get_hot_directory(app, out, required_size_out));}
static bool32 set_hot_directory(Application_Links *app, String string){return(app->set_hot_directory(app, string));}
static bool32 get_file_list(Application_Links *app, String directory, File_List *list_out){return(app->get_file_list(app, directory, list_out));}
static b32 set_hot_directory(Application_Links *app, String string){return(app->set_hot_directory(app, string));}
static b32 get_file_list(Application_Links *app, String directory, File_List *list_out){return(app->get_file_list(app, directory, list_out));}
static void free_file_list(Application_Links *app, File_List list){(app->free_file_list(app, list));}
static void set_gui_up_down_keys(Application_Links *app, Key_Code up_key, Key_Modifier up_key_modifier, Key_Code down_key, Key_Modifier down_key_modifier){(app->set_gui_up_down_keys(app, up_key, up_key_modifier, down_key, down_key_modifier));}
static void* memory_allocate(Application_Links *app, int32_t size){return(app->memory_allocate(app, size));}
static bool32 memory_set_protection(Application_Links *app, void *ptr, int32_t size, Memory_Protect_Flags flags){return(app->memory_set_protection(app, ptr, size, flags));}
static b32 memory_set_protection(Application_Links *app, void *ptr, int32_t size, Memory_Protect_Flags flags){return(app->memory_set_protection(app, ptr, size, flags));}
static void memory_free(Application_Links *app, void *ptr, int32_t size){(app->memory_free(app, ptr, size));}
static bool32 file_get_attributes(Application_Links *app, String file_name, File_Attributes *attributes_out){return(app->file_get_attributes(app, file_name, attributes_out));}
static bool32 directory_cd(Application_Links *app, String *directory, String relative_path){return(app->directory_cd(app, directory, relative_path));}
static bool32 get_4ed_path(Application_Links *app, String *path_out, int32_t *required_size_out){return(app->get_4ed_path(app, path_out, required_size_out));}
static b32 file_get_attributes(Application_Links *app, String file_name, File_Attributes *attributes_out){return(app->file_get_attributes(app, file_name, attributes_out));}
static b32 directory_cd(Application_Links *app, String *directory, String relative_path){return(app->directory_cd(app, directory, relative_path));}
static b32 get_4ed_path(Application_Links *app, String *path_out, int32_t *required_size_out){return(app->get_4ed_path(app, path_out, required_size_out));}
static void show_mouse_cursor(Application_Links *app, Mouse_Cursor_Show_Type show){(app->show_mouse_cursor(app, show));}
static bool32 set_edit_finished_hook_repeat_speed(Application_Links *app, u32 milliseconds){return(app->set_edit_finished_hook_repeat_speed(app, milliseconds));}
static bool32 set_fullscreen(Application_Links *app, bool32 full_screen){return(app->set_fullscreen(app, full_screen));}
static bool32 is_fullscreen(Application_Links *app){return(app->is_fullscreen(app));}
static b32 set_edit_finished_hook_repeat_speed(Application_Links *app, u32 milliseconds){return(app->set_edit_finished_hook_repeat_speed(app, milliseconds));}
static b32 set_fullscreen(Application_Links *app, b32 full_screen){return(app->set_fullscreen(app, full_screen));}
static b32 is_fullscreen(Application_Links *app){return(app->is_fullscreen(app));}
static void send_exit_signal(Application_Links *app){(app->send_exit_signal(app));}
static bool32 set_window_title(Application_Links *app, String title){return(app->set_window_title(app, title));}
static b32 set_window_title(Application_Links *app, String title){return(app->set_window_title(app, title));}
static Microsecond_Time_Stamp get_microseconds_timestamp(Application_Links *app){return(app->get_microseconds_timestamp(app));}
static Vec2 draw_string(Application_Links *app, Face_ID font_id, String str, Vec2 point, int_color color, u32 flags, Vec2 delta){return(app->draw_string(app, font_id, str, point, color, flags, delta));}
static f32 get_string_advance(Application_Links *app, Face_ID font_id, String str){return(app->get_string_advance(app, font_id, str));}
@ -907,146 +907,146 @@ static void open_color_picker(Application_Links *app, color_picker *picker){(app
static void animate(Application_Links *app){(app->animate(app));}
static Found_String_List find_all_in_range_insensitive(Application_Links *app, Buffer_ID buffer_id, int32_t start, int32_t end, String key, Partition *memory){return(app->find_all_in_range_insensitive(app, buffer_id, start, end, key, memory));}
#else
static bool32 global_set_setting(Application_Links *app, Global_Setting_ID setting, int32_t value){return(app->global_set_setting_(app, setting, value));}
static bool32 global_set_mapping(Application_Links *app, void *data, int32_t size){return(app->global_set_mapping_(app, data, size));}
static bool32 exec_system_command(Application_Links *app, View_ID view_id, Buffer_Identifier buffer_id, String path, String command, Command_Line_Interface_Flag flags){return(app->exec_system_command_(app, view_id, buffer_id, path, command, flags));}
static bool32 clipboard_post(Application_Links *app, int32_t clipboard_id, String string){return(app->clipboard_post_(app, clipboard_id, string));}
static bool32 clipboard_count(Application_Links *app, int32_t clipboard_id, int32_t *count_out){return(app->clipboard_count_(app, clipboard_id, count_out));}
static bool32 clipboard_index(Application_Links *app, int32_t clipboard_id, int32_t item_index, String *string_out, int32_t *required_size_out){return(app->clipboard_index_(app, clipboard_id, item_index, string_out, required_size_out));}
static b32 global_set_setting(Application_Links *app, Global_Setting_ID setting, int32_t value){return(app->global_set_setting_(app, setting, value));}
static b32 global_set_mapping(Application_Links *app, void *data, int32_t size){return(app->global_set_mapping_(app, data, size));}
static b32 exec_system_command(Application_Links *app, View_ID view_id, Buffer_Identifier buffer_id, String path, String command, Command_Line_Interface_Flag flags){return(app->exec_system_command_(app, view_id, buffer_id, path, command, flags));}
static b32 clipboard_post(Application_Links *app, int32_t clipboard_id, String string){return(app->clipboard_post_(app, clipboard_id, string));}
static b32 clipboard_count(Application_Links *app, int32_t clipboard_id, int32_t *count_out){return(app->clipboard_count_(app, clipboard_id, count_out));}
static b32 clipboard_index(Application_Links *app, int32_t clipboard_id, int32_t item_index, String *string_out, int32_t *required_size_out){return(app->clipboard_index_(app, clipboard_id, item_index, string_out, required_size_out));}
static Parse_Context_ID create_parse_context(Application_Links *app, Parser_String_And_Type *kw, uint32_t kw_count, Parser_String_And_Type *pp, uint32_t pp_count){return(app->create_parse_context_(app, kw, kw_count, pp, pp_count));}
static int32_t get_buffer_count(Application_Links *app){return(app->get_buffer_count_(app));}
static bool32 get_buffer_first(Application_Links *app, Access_Flag access, Buffer_ID *buffer_id_out){return(app->get_buffer_first_(app, access, buffer_id_out));}
static bool32 get_buffer_next(Application_Links *app, Buffer_ID buffer_id, Access_Flag access, Buffer_ID *buffer_id_out){return(app->get_buffer_next_(app, buffer_id, access, buffer_id_out));}
static bool32 get_buffer_summary(Application_Links *app, Buffer_ID buffer_id, Access_Flag access, Buffer_Summary *buffer_summary_out){return(app->get_buffer_summary_(app, buffer_id, access, buffer_summary_out));}
static bool32 get_buffer_by_name(Application_Links *app, String name, Access_Flag access, Buffer_ID *buffer_id_out){return(app->get_buffer_by_name_(app, name, access, buffer_id_out));}
static bool32 get_buffer_by_file_name(Application_Links *app, String file_name, Access_Flag access, Buffer_ID *buffer_id_out){return(app->get_buffer_by_file_name_(app, file_name, access, buffer_id_out));}
static bool32 buffer_read_range(Application_Links *app, Buffer_ID buffer_id, int32_t start, int32_t one_past_last, char *out){return(app->buffer_read_range_(app, buffer_id, start, one_past_last, out));}
static bool32 buffer_replace_range(Application_Links *app, Buffer_ID buffer_id, int32_t start, int32_t one_past_last, String string){return(app->buffer_replace_range_(app, buffer_id, start, one_past_last, string));}
static bool32 buffer_set_edit_handler(Application_Links *app, Buffer_ID buffer_id, Buffer_Edit_Handler *handler){return(app->buffer_set_edit_handler_(app, buffer_id, handler));}
static bool32 buffer_compute_cursor(Application_Links *app, Buffer_ID buffer_id, Buffer_Seek seek, Partial_Cursor *cursor_out){return(app->buffer_compute_cursor_(app, buffer_id, seek, cursor_out));}
static bool32 buffer_batch_edit(Application_Links *app, Buffer_ID buffer_id, char *str, int32_t str_len, Buffer_Edit *edits, int32_t edit_count, Buffer_Batch_Edit_Type type){return(app->buffer_batch_edit_(app, buffer_id, str, str_len, edits, edit_count, type));}
static bool32 buffer_get_setting(Application_Links *app, Buffer_ID buffer_id, Buffer_Setting_ID setting, int32_t *value_out){return(app->buffer_get_setting_(app, buffer_id, setting, value_out));}
static bool32 buffer_set_setting(Application_Links *app, Buffer_ID buffer_id, Buffer_Setting_ID setting, int32_t value){return(app->buffer_set_setting_(app, buffer_id, setting, value));}
static bool32 buffer_get_managed_scope(Application_Links *app, Buffer_ID buffer_id, Managed_Scope *scope_out){return(app->buffer_get_managed_scope_(app, buffer_id, scope_out));}
static bool32 buffer_token_count(Application_Links *app, Buffer_ID buffer_id, int32_t *count_out){return(app->buffer_token_count_(app, buffer_id, count_out));}
static bool32 buffer_read_tokens(Application_Links *app, Buffer_ID buffer_id, int32_t start_token, int32_t end_token, Cpp_Token *tokens_out){return(app->buffer_read_tokens_(app, buffer_id, start_token, end_token, tokens_out));}
static bool32 buffer_get_token_range(Application_Links *app, Buffer_ID buffer_id, Cpp_Token **first_token_out, Cpp_Token **one_past_last_token_out){return(app->buffer_get_token_range_(app, buffer_id, first_token_out, one_past_last_token_out));}
static bool32 buffer_get_token_index(Application_Links *app, Buffer_ID buffer_id, int32_t pos, Cpp_Get_Token_Result *get_result){return(app->buffer_get_token_index_(app, buffer_id, pos, get_result));}
static bool32 buffer_send_end_signal(Application_Links *app, Buffer_ID buffer_id){return(app->buffer_send_end_signal_(app, buffer_id));}
static bool32 create_buffer(Application_Links *app, String file_name, Buffer_Create_Flag flags, Buffer_ID *new_buffer_id_out){return(app->create_buffer_(app, file_name, flags, new_buffer_id_out));}
static bool32 buffer_save(Application_Links *app, Buffer_ID buffer_id, String file_name, uint32_t flags){return(app->buffer_save_(app, buffer_id, file_name, flags));}
static bool32 buffer_kill(Application_Links *app, Buffer_ID buffer_id, Buffer_Kill_Flag flags, Buffer_Kill_Result *result){return(app->buffer_kill_(app, buffer_id, flags, result));}
static bool32 buffer_reopen(Application_Links *app, Buffer_ID buffer_id, Buffer_Reopen_Flag flags, Buffer_Reopen_Result *result){return(app->buffer_reopen_(app, buffer_id, flags, result));}
static bool32 buffer_get_file_attributes(Application_Links *app, Buffer_ID buffer_id, File_Attributes *attributes_out){return(app->buffer_get_file_attributes_(app, buffer_id, attributes_out));}
static bool32 get_view_first(Application_Links *app, Access_Flag access, View_ID *view_id_out){return(app->get_view_first_(app, access, view_id_out));}
static bool32 get_view_next(Application_Links *app, View_ID view_id, Access_Flag access, View_ID *view_id_out){return(app->get_view_next_(app, view_id, access, view_id_out));}
static bool32 get_view_summary(Application_Links *app, View_ID view_id, Access_Flag access, View_Summary *view_summary_out){return(app->get_view_summary_(app, view_id, access, view_summary_out));}
static bool32 get_active_view(Application_Links *app, Access_Flag access, View_ID *view_id_out){return(app->get_active_view_(app, access, view_id_out));}
static bool32 get_active_panel(Application_Links *app, Panel_ID *panel_id_out){return(app->get_active_panel_(app, panel_id_out));}
static bool32 view_get_panel(Application_Links *app, View_ID view_id, Panel_ID *panel_id_out){return(app->view_get_panel_(app, view_id, panel_id_out));}
static bool32 panel_get_view(Application_Links *app, Panel_ID panel_id, View_ID *view_id_out){return(app->panel_get_view_(app, panel_id, view_id_out));}
static bool32 panel_is_split(Application_Links *app, Panel_ID panel_id){return(app->panel_is_split_(app, panel_id));}
static bool32 panel_is_leaf(Application_Links *app, Panel_ID panel_id){return(app->panel_is_leaf_(app, panel_id));}
static bool32 panel_split(Application_Links *app, Panel_ID panel_id, Panel_Split_Orientation orientation){return(app->panel_split_(app, panel_id, orientation));}
static bool32 panel_set_split(Application_Links *app, Panel_ID panel_id, Panel_Split_Kind kind, float t){return(app->panel_set_split_(app, panel_id, kind, t));}
static bool32 panel_swap_children(Application_Links *app, Panel_ID panel_id, Panel_Split_Kind kind, float t){return(app->panel_swap_children_(app, panel_id, kind, t));}
static bool32 panel_get_parent(Application_Links *app, Panel_ID panel_id, Panel_ID *panel_id_out){return(app->panel_get_parent_(app, panel_id, panel_id_out));}
static bool32 panel_get_child(Application_Links *app, Panel_ID panel_id, Panel_Child which_child, Panel_ID *panel_id_out){return(app->panel_get_child_(app, panel_id, which_child, panel_id_out));}
static bool32 panel_get_max(Application_Links *app, Panel_ID panel_id, Panel_ID *panel_id_out){return(app->panel_get_max_(app, panel_id, panel_id_out));}
static bool32 panel_get_margin(Application_Links *app, Panel_ID panel_id, i32_Rect *margins_out){return(app->panel_get_margin_(app, panel_id, margins_out));}
static bool32 view_close(Application_Links *app, View_ID view_id){return(app->view_close_(app, view_id));}
static bool32 view_set_active(Application_Links *app, View_ID view_id){return(app->view_set_active_(app, view_id));}
static bool32 view_get_setting(Application_Links *app, View_ID view_id, View_Setting_ID setting, int32_t *value_out){return(app->view_get_setting_(app, view_id, setting, value_out));}
static bool32 view_set_setting(Application_Links *app, View_ID view_id, View_Setting_ID setting, int32_t value){return(app->view_set_setting_(app, view_id, setting, value));}
static bool32 view_get_managed_scope(Application_Links *app, View_ID view_id, Managed_Scope *scope){return(app->view_get_managed_scope_(app, view_id, scope));}
static bool32 view_get_enclosure_rect(Application_Links *app, View_ID view_id, i32_Rect *rect_out){return(app->view_get_enclosure_rect_(app, view_id, rect_out));}
static bool32 view_compute_cursor(Application_Links *app, View_ID view_id, Buffer_Seek seek, Full_Cursor *cursor_out){return(app->view_compute_cursor_(app, view_id, seek, cursor_out));}
static bool32 view_set_cursor(Application_Links *app, View_ID view_id, Buffer_Seek seek, bool32 set_preferred_x){return(app->view_set_cursor_(app, view_id, seek, set_preferred_x));}
static bool32 view_set_scroll(Application_Links *app, View_ID view_id, GUI_Scroll_Vars scroll){return(app->view_set_scroll_(app, view_id, scroll));}
static bool32 view_set_mark(Application_Links *app, View_ID view_id, Buffer_Seek seek){return(app->view_set_mark_(app, view_id, seek));}
static bool32 view_set_buffer(Application_Links *app, View_ID view_id, Buffer_ID buffer_id, Set_Buffer_Flag flags){return(app->view_set_buffer_(app, view_id, buffer_id, flags));}
static bool32 view_post_fade(Application_Links *app, View_ID view_id, float seconds, int32_t start, int32_t end, int_color color){return(app->view_post_fade_(app, view_id, seconds, start, end, color));}
static bool32 view_begin_ui_mode(Application_Links *app, View_ID view_id){return(app->view_begin_ui_mode_(app, view_id));}
static bool32 view_end_ui_mode(Application_Links *app, View_ID view_id){return(app->view_end_ui_mode_(app, view_id));}
static bool32 view_is_in_ui_mode(Application_Links *app, View_ID view_id){return(app->view_is_in_ui_mode_(app, view_id));}
static bool32 view_set_quit_ui_handler(Application_Links *app, View_ID view_id, UI_Quit_Function_Type *quit_function){return(app->view_set_quit_ui_handler_(app, view_id, quit_function));}
static bool32 view_get_quit_ui_handler(Application_Links *app, View_ID view_id, UI_Quit_Function_Type **quit_function_out){return(app->view_get_quit_ui_handler_(app, view_id, quit_function_out));}
static b32 get_buffer_first(Application_Links *app, Access_Flag access, Buffer_ID *buffer_id_out){return(app->get_buffer_first_(app, access, buffer_id_out));}
static b32 get_buffer_next(Application_Links *app, Buffer_ID buffer_id, Access_Flag access, Buffer_ID *buffer_id_out){return(app->get_buffer_next_(app, buffer_id, access, buffer_id_out));}
static b32 get_buffer_summary(Application_Links *app, Buffer_ID buffer_id, Access_Flag access, Buffer_Summary *buffer_summary_out){return(app->get_buffer_summary_(app, buffer_id, access, buffer_summary_out));}
static b32 get_buffer_by_name(Application_Links *app, String name, Access_Flag access, Buffer_ID *buffer_id_out){return(app->get_buffer_by_name_(app, name, access, buffer_id_out));}
static b32 get_buffer_by_file_name(Application_Links *app, String file_name, Access_Flag access, Buffer_ID *buffer_id_out){return(app->get_buffer_by_file_name_(app, file_name, access, buffer_id_out));}
static b32 buffer_read_range(Application_Links *app, Buffer_ID buffer_id, int32_t start, int32_t one_past_last, char *out){return(app->buffer_read_range_(app, buffer_id, start, one_past_last, out));}
static b32 buffer_replace_range(Application_Links *app, Buffer_ID buffer_id, int32_t start, int32_t one_past_last, String string){return(app->buffer_replace_range_(app, buffer_id, start, one_past_last, string));}
static b32 buffer_set_edit_handler(Application_Links *app, Buffer_ID buffer_id, Buffer_Edit_Handler *handler){return(app->buffer_set_edit_handler_(app, buffer_id, handler));}
static b32 buffer_compute_cursor(Application_Links *app, Buffer_ID buffer_id, Buffer_Seek seek, Partial_Cursor *cursor_out){return(app->buffer_compute_cursor_(app, buffer_id, seek, cursor_out));}
static b32 buffer_batch_edit(Application_Links *app, Buffer_ID buffer_id, char *str, int32_t str_len, Buffer_Edit *edits, int32_t edit_count, Buffer_Batch_Edit_Type type){return(app->buffer_batch_edit_(app, buffer_id, str, str_len, edits, edit_count, type));}
static b32 buffer_get_setting(Application_Links *app, Buffer_ID buffer_id, Buffer_Setting_ID setting, int32_t *value_out){return(app->buffer_get_setting_(app, buffer_id, setting, value_out));}
static b32 buffer_set_setting(Application_Links *app, Buffer_ID buffer_id, Buffer_Setting_ID setting, int32_t value){return(app->buffer_set_setting_(app, buffer_id, setting, value));}
static b32 buffer_get_managed_scope(Application_Links *app, Buffer_ID buffer_id, Managed_Scope *scope_out){return(app->buffer_get_managed_scope_(app, buffer_id, scope_out));}
static b32 buffer_token_count(Application_Links *app, Buffer_ID buffer_id, int32_t *count_out){return(app->buffer_token_count_(app, buffer_id, count_out));}
static b32 buffer_read_tokens(Application_Links *app, Buffer_ID buffer_id, int32_t start_token, int32_t end_token, Cpp_Token *tokens_out){return(app->buffer_read_tokens_(app, buffer_id, start_token, end_token, tokens_out));}
static b32 buffer_get_token_range(Application_Links *app, Buffer_ID buffer_id, Cpp_Token **first_token_out, Cpp_Token **one_past_last_token_out){return(app->buffer_get_token_range_(app, buffer_id, first_token_out, one_past_last_token_out));}
static b32 buffer_get_token_index(Application_Links *app, Buffer_ID buffer_id, int32_t pos, Cpp_Get_Token_Result *get_result){return(app->buffer_get_token_index_(app, buffer_id, pos, get_result));}
static b32 buffer_send_end_signal(Application_Links *app, Buffer_ID buffer_id){return(app->buffer_send_end_signal_(app, buffer_id));}
static b32 create_buffer(Application_Links *app, String file_name, Buffer_Create_Flag flags, Buffer_ID *new_buffer_id_out){return(app->create_buffer_(app, file_name, flags, new_buffer_id_out));}
static b32 buffer_save(Application_Links *app, Buffer_ID buffer_id, String file_name, uint32_t flags){return(app->buffer_save_(app, buffer_id, file_name, flags));}
static b32 buffer_kill(Application_Links *app, Buffer_ID buffer_id, Buffer_Kill_Flag flags, Buffer_Kill_Result *result){return(app->buffer_kill_(app, buffer_id, flags, result));}
static b32 buffer_reopen(Application_Links *app, Buffer_ID buffer_id, Buffer_Reopen_Flag flags, Buffer_Reopen_Result *result){return(app->buffer_reopen_(app, buffer_id, flags, result));}
static b32 buffer_get_file_attributes(Application_Links *app, Buffer_ID buffer_id, File_Attributes *attributes_out){return(app->buffer_get_file_attributes_(app, buffer_id, attributes_out));}
static b32 get_view_first(Application_Links *app, Access_Flag access, View_ID *view_id_out){return(app->get_view_first_(app, access, view_id_out));}
static b32 get_view_next(Application_Links *app, View_ID view_id, Access_Flag access, View_ID *view_id_out){return(app->get_view_next_(app, view_id, access, view_id_out));}
static b32 get_view_summary(Application_Links *app, View_ID view_id, Access_Flag access, View_Summary *view_summary_out){return(app->get_view_summary_(app, view_id, access, view_summary_out));}
static b32 get_active_view(Application_Links *app, Access_Flag access, View_ID *view_id_out){return(app->get_active_view_(app, access, view_id_out));}
static b32 get_active_panel(Application_Links *app, Panel_ID *panel_id_out){return(app->get_active_panel_(app, panel_id_out));}
static b32 view_get_panel(Application_Links *app, View_ID view_id, Panel_ID *panel_id_out){return(app->view_get_panel_(app, view_id, panel_id_out));}
static b32 panel_get_view(Application_Links *app, Panel_ID panel_id, View_ID *view_id_out){return(app->panel_get_view_(app, panel_id, view_id_out));}
static b32 panel_is_split(Application_Links *app, Panel_ID panel_id){return(app->panel_is_split_(app, panel_id));}
static b32 panel_is_leaf(Application_Links *app, Panel_ID panel_id){return(app->panel_is_leaf_(app, panel_id));}
static b32 panel_split(Application_Links *app, Panel_ID panel_id, Panel_Split_Orientation orientation){return(app->panel_split_(app, panel_id, orientation));}
static b32 panel_set_split(Application_Links *app, Panel_ID panel_id, Panel_Split_Kind kind, float t){return(app->panel_set_split_(app, panel_id, kind, t));}
static b32 panel_swap_children(Application_Links *app, Panel_ID panel_id, Panel_Split_Kind kind, float t){return(app->panel_swap_children_(app, panel_id, kind, t));}
static b32 panel_get_parent(Application_Links *app, Panel_ID panel_id, Panel_ID *panel_id_out){return(app->panel_get_parent_(app, panel_id, panel_id_out));}
static b32 panel_get_child(Application_Links *app, Panel_ID panel_id, Panel_Child which_child, Panel_ID *panel_id_out){return(app->panel_get_child_(app, panel_id, which_child, panel_id_out));}
static b32 panel_get_max(Application_Links *app, Panel_ID panel_id, Panel_ID *panel_id_out){return(app->panel_get_max_(app, panel_id, panel_id_out));}
static b32 panel_get_margin(Application_Links *app, Panel_ID panel_id, i32_Rect *margins_out){return(app->panel_get_margin_(app, panel_id, margins_out));}
static b32 view_close(Application_Links *app, View_ID view_id){return(app->view_close_(app, view_id));}
static b32 view_set_active(Application_Links *app, View_ID view_id){return(app->view_set_active_(app, view_id));}
static b32 view_get_setting(Application_Links *app, View_ID view_id, View_Setting_ID setting, int32_t *value_out){return(app->view_get_setting_(app, view_id, setting, value_out));}
static b32 view_set_setting(Application_Links *app, View_ID view_id, View_Setting_ID setting, int32_t value){return(app->view_set_setting_(app, view_id, setting, value));}
static b32 view_get_managed_scope(Application_Links *app, View_ID view_id, Managed_Scope *scope){return(app->view_get_managed_scope_(app, view_id, scope));}
static b32 view_get_enclosure_rect(Application_Links *app, View_ID view_id, i32_Rect *rect_out){return(app->view_get_enclosure_rect_(app, view_id, rect_out));}
static b32 view_compute_cursor(Application_Links *app, View_ID view_id, Buffer_Seek seek, Full_Cursor *cursor_out){return(app->view_compute_cursor_(app, view_id, seek, cursor_out));}
static b32 view_set_cursor(Application_Links *app, View_ID view_id, Buffer_Seek seek, b32 set_preferred_x){return(app->view_set_cursor_(app, view_id, seek, set_preferred_x));}
static b32 view_set_scroll(Application_Links *app, View_ID view_id, GUI_Scroll_Vars scroll){return(app->view_set_scroll_(app, view_id, scroll));}
static b32 view_set_mark(Application_Links *app, View_ID view_id, Buffer_Seek seek){return(app->view_set_mark_(app, view_id, seek));}
static b32 view_set_buffer(Application_Links *app, View_ID view_id, Buffer_ID buffer_id, Set_Buffer_Flag flags){return(app->view_set_buffer_(app, view_id, buffer_id, flags));}
static b32 view_post_fade(Application_Links *app, View_ID view_id, float seconds, int32_t start, int32_t end, int_color color){return(app->view_post_fade_(app, view_id, seconds, start, end, color));}
static b32 view_begin_ui_mode(Application_Links *app, View_ID view_id){return(app->view_begin_ui_mode_(app, view_id));}
static b32 view_end_ui_mode(Application_Links *app, View_ID view_id){return(app->view_end_ui_mode_(app, view_id));}
static b32 view_is_in_ui_mode(Application_Links *app, View_ID view_id){return(app->view_is_in_ui_mode_(app, view_id));}
static b32 view_set_quit_ui_handler(Application_Links *app, View_ID view_id, UI_Quit_Function_Type *quit_function){return(app->view_set_quit_ui_handler_(app, view_id, quit_function));}
static b32 view_get_quit_ui_handler(Application_Links *app, View_ID view_id, UI_Quit_Function_Type **quit_function_out){return(app->view_get_quit_ui_handler_(app, view_id, quit_function_out));}
static Managed_Scope create_user_managed_scope(Application_Links *app){return(app->create_user_managed_scope_(app));}
static bool32 destroy_user_managed_scope(Application_Links *app, Managed_Scope scope){return(app->destroy_user_managed_scope_(app, scope));}
static b32 destroy_user_managed_scope(Application_Links *app, Managed_Scope scope){return(app->destroy_user_managed_scope_(app, scope));}
static Managed_Scope get_global_managed_scope(Application_Links *app){return(app->get_global_managed_scope_(app));}
static Managed_Scope get_managed_scope_with_multiple_dependencies(Application_Links *app, Managed_Scope *scopes, int32_t count){return(app->get_managed_scope_with_multiple_dependencies_(app, scopes, count));}
static bool32 managed_scope_clear_contents(Application_Links *app, Managed_Scope scope){return(app->managed_scope_clear_contents_(app, scope));}
static bool32 managed_scope_clear_self_all_dependent_scopes(Application_Links *app, Managed_Scope scope){return(app->managed_scope_clear_self_all_dependent_scopes_(app, scope));}
static b32 managed_scope_clear_contents(Application_Links *app, Managed_Scope scope){return(app->managed_scope_clear_contents_(app, scope));}
static b32 managed_scope_clear_self_all_dependent_scopes(Application_Links *app, Managed_Scope scope){return(app->managed_scope_clear_self_all_dependent_scopes_(app, scope));}
static Managed_Variable_ID managed_variable_create(Application_Links *app, char *null_terminated_name, uint64_t default_value){return(app->managed_variable_create_(app, null_terminated_name, default_value));}
static Managed_Variable_ID managed_variable_get_id(Application_Links *app, char *null_terminated_name){return(app->managed_variable_get_id_(app, null_terminated_name));}
static Managed_Variable_ID managed_variable_create_or_get_id(Application_Links *app, char *null_terminated_name, uint64_t default_value){return(app->managed_variable_create_or_get_id_(app, null_terminated_name, default_value));}
static bool32 managed_variable_set(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t value){return(app->managed_variable_set_(app, scope, id, value));}
static bool32 managed_variable_get(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t *value_out){return(app->managed_variable_get_(app, scope, id, value_out));}
static b32 managed_variable_set(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t value){return(app->managed_variable_set_(app, scope, id, value));}
static b32 managed_variable_get(Application_Links *app, Managed_Scope scope, Managed_Variable_ID id, uint64_t *value_out){return(app->managed_variable_get_(app, scope, id, value_out));}
static Managed_Object alloc_managed_memory_in_scope(Application_Links *app, Managed_Scope scope, i32 item_size, i32 count){return(app->alloc_managed_memory_in_scope_(app, scope, item_size, count));}
static Managed_Object alloc_buffer_markers_on_buffer(Application_Links *app, Buffer_ID buffer_id, int32_t count, Managed_Scope *optional_extra_scope){return(app->alloc_buffer_markers_on_buffer_(app, buffer_id, count, optional_extra_scope));}
static Managed_Object alloc_managed_arena_in_scope(Application_Links *app, Managed_Scope scope, i32 page_size){return(app->alloc_managed_arena_in_scope_(app, scope, page_size));}
static Marker_Visual create_marker_visual(Application_Links *app, Managed_Object object){return(app->create_marker_visual_(app, object));}
static bool32 marker_visual_set_effect(Application_Links *app, Marker_Visual visual, Marker_Visual_Type type, int_color color, int_color text_color, Marker_Visual_Text_Style text_style){return(app->marker_visual_set_effect_(app, visual, type, color, text_color, text_style));}
static bool32 marker_visual_set_take_rule(Application_Links *app, Marker_Visual visual, Marker_Visual_Take_Rule take_rule){return(app->marker_visual_set_take_rule_(app, visual, take_rule));}
static bool32 marker_visual_set_priority(Application_Links *app, Marker_Visual visual, Marker_Visual_Priority_Level priority){return(app->marker_visual_set_priority_(app, visual, priority));}
static bool32 marker_visual_set_view_key(Application_Links *app, Marker_Visual visual, View_ID key_view_id){return(app->marker_visual_set_view_key_(app, visual, key_view_id));}
static bool32 destroy_marker_visual(Application_Links *app, Marker_Visual visual){return(app->destroy_marker_visual_(app, visual));}
static b32 marker_visual_set_effect(Application_Links *app, Marker_Visual visual, Marker_Visual_Type type, int_color color, int_color text_color, Marker_Visual_Text_Style text_style){return(app->marker_visual_set_effect_(app, visual, type, color, text_color, text_style));}
static b32 marker_visual_set_take_rule(Application_Links *app, Marker_Visual visual, Marker_Visual_Take_Rule take_rule){return(app->marker_visual_set_take_rule_(app, visual, take_rule));}
static b32 marker_visual_set_priority(Application_Links *app, Marker_Visual visual, Marker_Visual_Priority_Level priority){return(app->marker_visual_set_priority_(app, visual, priority));}
static b32 marker_visual_set_view_key(Application_Links *app, Marker_Visual visual, View_ID key_view_id){return(app->marker_visual_set_view_key_(app, visual, key_view_id));}
static b32 destroy_marker_visual(Application_Links *app, Marker_Visual visual){return(app->destroy_marker_visual_(app, visual));}
static int32_t buffer_markers_get_attached_visual_count(Application_Links *app, Managed_Object object){return(app->buffer_markers_get_attached_visual_count_(app, object));}
static Marker_Visual* buffer_markers_get_attached_visual(Application_Links *app, Partition *part, Managed_Object object){return(app->buffer_markers_get_attached_visual_(app, part, object));}
static uint32_t managed_object_get_item_size(Application_Links *app, Managed_Object object){return(app->managed_object_get_item_size_(app, object));}
static uint32_t managed_object_get_item_count(Application_Links *app, Managed_Object object){return(app->managed_object_get_item_count_(app, object));}
static Managed_Object_Type managed_object_get_type(Application_Links *app, Managed_Object object){return(app->managed_object_get_type_(app, object));}
static Managed_Scope managed_object_get_containing_scope(Application_Links *app, Managed_Object object){return(app->managed_object_get_containing_scope_(app, object));}
static bool32 managed_object_free(Application_Links *app, Managed_Object object){return(app->managed_object_free_(app, object));}
static bool32 managed_object_store_data(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem){return(app->managed_object_store_data_(app, object, first_index, count, mem));}
static bool32 managed_object_load_data(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem_out){return(app->managed_object_load_data_(app, object, first_index, count, mem_out));}
static b32 managed_object_free(Application_Links *app, Managed_Object object){return(app->managed_object_free_(app, object));}
static b32 managed_object_store_data(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem){return(app->managed_object_store_data_(app, object, first_index, count, mem));}
static b32 managed_object_load_data(Application_Links *app, Managed_Object object, uint32_t first_index, uint32_t count, void *mem_out){return(app->managed_object_load_data_(app, object, first_index, count, mem_out));}
static User_Input get_user_input(Application_Links *app, Input_Type_Flag get_type, Input_Type_Flag abort_type){return(app->get_user_input_(app, get_type, abort_type));}
static User_Input get_command_input(Application_Links *app){return(app->get_command_input_(app));}
static void set_command_input(Application_Links *app, Key_Event_Data key_data){(app->set_command_input_(app, key_data));}
static Mouse_State get_mouse_state(Application_Links *app){return(app->get_mouse_state_(app));}
static int32_t get_active_query_bars(Application_Links *app, View_ID view_id, int32_t max_result_count, Query_Bar **result_array){return(app->get_active_query_bars_(app, view_id, max_result_count, result_array));}
static bool32 start_query_bar(Application_Links *app, Query_Bar *bar, uint32_t flags){return(app->start_query_bar_(app, bar, flags));}
static b32 start_query_bar(Application_Links *app, Query_Bar *bar, uint32_t flags){return(app->start_query_bar_(app, bar, flags));}
static void end_query_bar(Application_Links *app, Query_Bar *bar, uint32_t flags){(app->end_query_bar_(app, bar, flags));}
static bool32 print_message(Application_Links *app, String message){return(app->print_message_(app, message));}
static b32 print_message(Application_Links *app, String message){return(app->print_message_(app, message));}
static Face_ID get_largest_face_id(Application_Links *app){return(app->get_largest_face_id_(app));}
static bool32 set_global_face(Application_Links *app, Face_ID id, bool32 apply_to_all_buffers){return(app->set_global_face_(app, id, apply_to_all_buffers));}
static bool32 buffer_history_get_max_record_index(Application_Links *app, Buffer_ID buffer_id, History_Record_Index *index_out){return(app->buffer_history_get_max_record_index_(app, buffer_id, index_out));}
static bool32 buffer_history_get_record_info(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index, Record_Info *record_out){return(app->buffer_history_get_record_info_(app, buffer_id, index, record_out));}
static bool32 buffer_history_get_group_sub_record(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index, int32_t sub_index, Record_Info *record_out){return(app->buffer_history_get_group_sub_record_(app, buffer_id, index, sub_index, record_out));}
static bool32 buffer_history_get_current_state_index(Application_Links *app, Buffer_ID buffer_id, History_Record_Index *index_out){return(app->buffer_history_get_current_state_index_(app, buffer_id, index_out));}
static bool32 buffer_history_set_current_state_index(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index){return(app->buffer_history_set_current_state_index_(app, buffer_id, index));}
static bool32 buffer_history_merge_record_range(Application_Links *app, Buffer_ID buffer_id, History_Record_Index first_index, History_Record_Index last_index, Record_Merge_Flag flags){return(app->buffer_history_merge_record_range_(app, buffer_id, first_index, last_index, flags));}
static bool32 buffer_history_clear_after_current_state(Application_Links *app, Buffer_ID buffer_id){return(app->buffer_history_clear_after_current_state_(app, buffer_id));}
static b32 set_global_face(Application_Links *app, Face_ID id, b32 apply_to_all_buffers){return(app->set_global_face_(app, id, apply_to_all_buffers));}
static b32 buffer_history_get_max_record_index(Application_Links *app, Buffer_ID buffer_id, History_Record_Index *index_out){return(app->buffer_history_get_max_record_index_(app, buffer_id, index_out));}
static b32 buffer_history_get_record_info(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index, Record_Info *record_out){return(app->buffer_history_get_record_info_(app, buffer_id, index, record_out));}
static b32 buffer_history_get_group_sub_record(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index, int32_t sub_index, Record_Info *record_out){return(app->buffer_history_get_group_sub_record_(app, buffer_id, index, sub_index, record_out));}
static b32 buffer_history_get_current_state_index(Application_Links *app, Buffer_ID buffer_id, History_Record_Index *index_out){return(app->buffer_history_get_current_state_index_(app, buffer_id, index_out));}
static b32 buffer_history_set_current_state_index(Application_Links *app, Buffer_ID buffer_id, History_Record_Index index){return(app->buffer_history_set_current_state_index_(app, buffer_id, index));}
static b32 buffer_history_merge_record_range(Application_Links *app, Buffer_ID buffer_id, History_Record_Index first_index, History_Record_Index last_index, Record_Merge_Flag flags){return(app->buffer_history_merge_record_range_(app, buffer_id, first_index, last_index, flags));}
static b32 buffer_history_clear_after_current_state(Application_Links *app, Buffer_ID buffer_id){return(app->buffer_history_clear_after_current_state_(app, buffer_id));}
static void global_history_edit_group_begin(Application_Links *app){(app->global_history_edit_group_begin_(app));}
static void global_history_edit_group_end(Application_Links *app){(app->global_history_edit_group_end_(app));}
static bool32 buffer_set_face(Application_Links *app, Buffer_ID buffer_id, Face_ID id){return(app->buffer_set_face_(app, buffer_id, id));}
static b32 buffer_set_face(Application_Links *app, Buffer_ID buffer_id, Face_ID id){return(app->buffer_set_face_(app, buffer_id, id));}
static Face_Description get_face_description(Application_Links *app, Face_ID id){return(app->get_face_description_(app, id));}
static bool32 get_face_id(Application_Links *app, Buffer_ID buffer_id, Face_ID *face_id_out){return(app->get_face_id_(app, buffer_id, face_id_out));}
static b32 get_face_id(Application_Links *app, Buffer_ID buffer_id, Face_ID *face_id_out){return(app->get_face_id_(app, buffer_id, face_id_out));}
static Face_ID try_create_new_face(Application_Links *app, Face_Description *description){return(app->try_create_new_face_(app, description));}
static bool32 try_modify_face(Application_Links *app, Face_ID id, Face_Description *description){return(app->try_modify_face_(app, id, description));}
static bool32 try_release_face(Application_Links *app, Face_ID id, Face_ID replacement_id){return(app->try_release_face_(app, id, replacement_id));}
static b32 try_modify_face(Application_Links *app, Face_ID id, Face_Description *description){return(app->try_modify_face_(app, id, description));}
static b32 try_release_face(Application_Links *app, Face_ID id, Face_ID replacement_id){return(app->try_release_face_(app, id, replacement_id));}
static int32_t get_available_font_count(Application_Links *app){return(app->get_available_font_count_(app));}
static Available_Font get_available_font(Application_Links *app, int32_t index){return(app->get_available_font_(app, index));}
static void set_theme_colors(Application_Links *app, Theme_Color *colors, int32_t count){(app->set_theme_colors_(app, colors, count));}
static void get_theme_colors(Application_Links *app, Theme_Color *colors, int32_t count){(app->get_theme_colors_(app, colors, count));}
static argb_color finalize_color(Application_Links *app, int_color color){return(app->finalize_color_(app, color));}
static int32_t get_hot_directory(Application_Links *app, String *out, int32_t *required_size_out){return(app->get_hot_directory_(app, out, required_size_out));}
static bool32 set_hot_directory(Application_Links *app, String string){return(app->set_hot_directory_(app, string));}
static bool32 get_file_list(Application_Links *app, String directory, File_List *list_out){return(app->get_file_list_(app, directory, list_out));}
static b32 set_hot_directory(Application_Links *app, String string){return(app->set_hot_directory_(app, string));}
static b32 get_file_list(Application_Links *app, String directory, File_List *list_out){return(app->get_file_list_(app, directory, list_out));}
static void free_file_list(Application_Links *app, File_List list){(app->free_file_list_(app, list));}
static void set_gui_up_down_keys(Application_Links *app, Key_Code up_key, Key_Modifier up_key_modifier, Key_Code down_key, Key_Modifier down_key_modifier){(app->set_gui_up_down_keys_(app, up_key, up_key_modifier, down_key, down_key_modifier));}
static void* memory_allocate(Application_Links *app, int32_t size){return(app->memory_allocate_(app, size));}
static bool32 memory_set_protection(Application_Links *app, void *ptr, int32_t size, Memory_Protect_Flags flags){return(app->memory_set_protection_(app, ptr, size, flags));}
static b32 memory_set_protection(Application_Links *app, void *ptr, int32_t size, Memory_Protect_Flags flags){return(app->memory_set_protection_(app, ptr, size, flags));}
static void memory_free(Application_Links *app, void *ptr, int32_t size){(app->memory_free_(app, ptr, size));}
static bool32 file_get_attributes(Application_Links *app, String file_name, File_Attributes *attributes_out){return(app->file_get_attributes_(app, file_name, attributes_out));}
static bool32 directory_cd(Application_Links *app, String *directory, String relative_path){return(app->directory_cd_(app, directory, relative_path));}
static bool32 get_4ed_path(Application_Links *app, String *path_out, int32_t *required_size_out){return(app->get_4ed_path_(app, path_out, required_size_out));}
static b32 file_get_attributes(Application_Links *app, String file_name, File_Attributes *attributes_out){return(app->file_get_attributes_(app, file_name, attributes_out));}
static b32 directory_cd(Application_Links *app, String *directory, String relative_path){return(app->directory_cd_(app, directory, relative_path));}
static b32 get_4ed_path(Application_Links *app, String *path_out, int32_t *required_size_out){return(app->get_4ed_path_(app, path_out, required_size_out));}
static void show_mouse_cursor(Application_Links *app, Mouse_Cursor_Show_Type show){(app->show_mouse_cursor_(app, show));}
static bool32 set_edit_finished_hook_repeat_speed(Application_Links *app, u32 milliseconds){return(app->set_edit_finished_hook_repeat_speed_(app, milliseconds));}
static bool32 set_fullscreen(Application_Links *app, bool32 full_screen){return(app->set_fullscreen_(app, full_screen));}
static bool32 is_fullscreen(Application_Links *app){return(app->is_fullscreen_(app));}
static b32 set_edit_finished_hook_repeat_speed(Application_Links *app, u32 milliseconds){return(app->set_edit_finished_hook_repeat_speed_(app, milliseconds));}
static b32 set_fullscreen(Application_Links *app, b32 full_screen){return(app->set_fullscreen_(app, full_screen));}
static b32 is_fullscreen(Application_Links *app){return(app->is_fullscreen_(app));}
static void send_exit_signal(Application_Links *app){(app->send_exit_signal_(app));}
static bool32 set_window_title(Application_Links *app, String title){return(app->set_window_title_(app, title));}
static b32 set_window_title(Application_Links *app, String title){return(app->set_window_title_(app, title));}
static Microsecond_Time_Stamp get_microseconds_timestamp(Application_Links *app){return(app->get_microseconds_timestamp_(app));}
static Vec2 draw_string(Application_Links *app, Face_ID font_id, String str, Vec2 point, int_color color, u32 flags, Vec2 delta){return(app->draw_string_(app, font_id, str, point, color, flags, delta));}
static f32 get_string_advance(Application_Links *app, Face_ID font_id, String str){return(app->get_string_advance_(app, font_id, str));}

View File

@ -254,239 +254,239 @@ int32_t source_name_len;
int32_t line_number;
};
static Command_Metadata fcoder_metacmd_table[233] = {
{ 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, 247 },
{ 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, 630 },
{ 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, 641 },
{ PROC_LINKS(auto_tab_whole_file, 0), "auto_tab_whole_file", 19, "Audo-indents the entire current buffer.", 39, "w:\\4ed\\code\\4coder_auto_indent.cpp", 34, 620 },
{ PROC_LINKS(backspace_char, 0), "backspace_char", 14, "Deletes the character to the left of the cursor.", 48, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 101 },
{ PROC_LINKS(backspace_word, 0), "backspace_word", 14, "Delete characters between the cursor position and the first alphanumeric boundary to the left.", 94, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1257 },
{ PROC_LINKS(basic_change_active_panel, 0), "basic_change_active_panel", 25, "Change the currently active panel, moving to the panel with the next highest view_id. Will not skipe the build panel if it is open.", 132, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 495 },
{ PROC_LINKS(build_in_build_panel, 0), "build_in_build_panel", 20, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*. Puts the *compilation* buffer in a panel at the footer of the current view.", 230, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 187 },
{ PROC_LINKS(build_search, 0), "build_search", 12, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*.", 153, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 155 },
{ PROC_LINKS(center_view, 0), "center_view", 11, "Centers the view vertically on the line on which the cursor sits.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 151 },
{ PROC_LINKS(change_active_panel, 0), "change_active_panel", 19, "Change the currently active panel, moving to the panel with the next highest view_id.", 85, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 149 },
{ PROC_LINKS(change_active_panel_backwards, 0), "change_active_panel_backwards", 29, "Change the currently active panel, moving to the panel with the next lowest view_id.", 84, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 159 },
{ PROC_LINKS(change_to_build_panel, 0), "change_to_build_panel", 21, "If the special build panel is open, makes the build panel the active panel.", 75, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 209 },
{ PROC_LINKS(clean_all_lines, 0), "clean_all_lines", 15, "Removes trailing whitespace from all lines in the current buffer.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 430 },
{ PROC_LINKS(click_set_cursor, 0), "click_set_cursor", 16, "Sets the cursor position to the mouse position.", 47, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 207 },
{ PROC_LINKS(click_set_cursor_and_mark, 0), "click_set_cursor_and_mark", 25, "Sets the cursor position and mark to the mouse position.", 56, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 195 },
{ PROC_LINKS(click_set_cursor_if_lbutton, 0), "click_set_cursor_if_lbutton", 27, "If the mouse left button is pressed, sets the cursor position to the mouse position.", 84, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 219 },
{ PROC_LINKS(click_set_mark, 0), "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 233 },
{ PROC_LINKS(close_all_code, 0), "close_all_code", 14, "Closes any buffer with a filename ending with an extension configured to be recognized as a code file type.", 107, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1060 },
{ PROC_LINKS(close_build_panel, 0), "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 203 },
{ PROC_LINKS(close_panel, 0), "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 503 },
{ PROC_LINKS(command_lister, 0), "command_lister", 14, "Opens an interactive list of all registered commands.", 53, "w:\\4ed\\code\\4coder_lists.cpp", 28, 973 },
{ PROC_LINKS(comment_line, 0), "comment_line", 12, "Insert '//' at the beginning of the line after leading whitespace.", 66, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 135 },
{ PROC_LINKS(comment_line_toggle, 0), "comment_line_toggle", 19, "Turns uncommented lines into commented lines and vice versa for comments starting with '//'.", 92, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 159 },
{ PROC_LINKS(copy, 0), "copy", 4, "Copy the text in the range from the cursor to the mark onto the clipboard.", 74, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 26 },
{ PROC_LINKS(cursor_mark_swap, 0), "cursor_mark_swap", 16, "Swaps the position of the cursor and the mark.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 129 },
{ PROC_LINKS(cut, 0), "cut", 3, "Cut the text in the range from the cursor to the mark onto the clipboard.", 73, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 35 },
{ PROC_LINKS(decrease_face_size, 0), "decrease_face_size", 18, "Decrease the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 598 },
{ PROC_LINKS(decrease_line_wrap, 0), "decrease_line_wrap", 18, "Decrases the current buffer's width for line wrapping.", 54, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 575 },
{ PROC_LINKS(delete_char, 0), "delete_char", 11, "Deletes the character to the right of the cursor.", 49, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 83 },
{ PROC_LINKS(delete_current_scope, 0), "delete_current_scope", 20, "Deletes the braces surrounding the currently selected scope. Leaves the contents within the scope.", 99, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 512 },
{ PROC_LINKS(delete_file_query, 0), "delete_file_query", 17, "Deletes the file of the current buffer if 4coder has the appropriate access rights. Will ask the user for confirmation first.", 125, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1161 },
{ PROC_LINKS(delete_line, 0), "delete_line", 11, "Delete the line the on which the cursor sits.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1413 },
{ PROC_LINKS(delete_range, 0), "delete_range", 12, "Deletes the text in the range between the cursor and the mark.", 62, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 139 },
{ PROC_LINKS(delete_word, 0), "delete_word", 11, "Delete characters between the cursor position and the first alphanumeric boundary to the right.", 95, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1263 },
{ PROC_LINKS(duplicate_line, 0), "duplicate_line", 14, "Create a copy of the line on which the cursor sits.", 51, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1391 },
{ PROC_LINKS(eol_dosify, 0), "eol_dosify", 10, "Puts the buffer in DOS line ending mode.", 40, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 645 },
{ PROC_LINKS(eol_nixify, 0), "eol_nixify", 10, "Puts the buffer in NIX line ending mode.", 40, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 653 },
{ PROC_LINKS(execute_any_cli, 0), "execute_any_cli", 15, "Queries for an output buffer name and system command, runs the system command as a CLI and prints the output to the specified buffer.", 133, "w:\\4ed\\code\\4coder_system_command.cpp", 37, 23 },
{ PROC_LINKS(execute_previous_cli, 0), "execute_previous_cli", 20, "If the command execute_any_cli has already been used, this will execute a CLI reusing the most recent buffer name and command.", 126, "w:\\4ed\\code\\4coder_system_command.cpp", 37, 7 },
{ PROC_LINKS(exit_4coder, 0), "exit_4coder", 11, "Attempts to close 4coder.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 661 },
{ PROC_LINKS(goto_beginning_of_file, 0), "goto_beginning_of_file", 22, "Sets the cursor to the beginning of the file.", 45, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1176 },
{ PROC_LINKS(goto_end_of_file, 0), "goto_end_of_file", 16, "Sets the cursor to the end of the file.", 39, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1184 },
{ PROC_LINKS(goto_first_jump_direct, 0), "goto_first_jump_direct", 22, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 84 },
{ PROC_LINKS(goto_first_jump_same_panel_sticky, 0), "goto_first_jump_same_panel_sticky", 33, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer and views the buffer in the panel where the jump list was.", 153, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 547 },
{ PROC_LINKS(goto_first_jump_sticky, 0), "goto_first_jump_sticky", 22, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 529 },
{ PROC_LINKS(goto_jump_at_cursor_direct, 0), "goto_jump_at_cursor_direct", 26, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.", 187, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 8 },
{ PROC_LINKS(goto_jump_at_cursor_same_panel_direct, 0), "goto_jump_at_cursor_same_panel_direct", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list..", 168, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 29 },
{ PROC_LINKS(goto_jump_at_cursor_same_panel_sticky, 0), "goto_jump_at_cursor_same_panel_sticky", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list.", 167, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 373 },
{ PROC_LINKS(goto_jump_at_cursor_sticky, 0), "goto_jump_at_cursor_sticky", 26, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.", 187, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 345 },
{ PROC_LINKS(goto_line, 0), "goto_line", 9, "Queries the user for a number, and jumps the cursor to the corresponding line.", 78, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 669 },
{ PROC_LINKS(goto_next_jump_direct, 0), "goto_next_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 48 },
{ PROC_LINKS(goto_next_jump_no_skips_direct, 0), "goto_next_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 66 },
{ PROC_LINKS(goto_next_jump_no_skips_sticky, 0), "goto_next_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 498 },
{ PROC_LINKS(goto_next_jump_sticky, 0), "goto_next_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 468 },
{ PROC_LINKS(goto_prev_jump_direct, 0), "goto_prev_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 57 },
{ PROC_LINKS(goto_prev_jump_no_skips_direct, 0), "goto_prev_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 75 },
{ PROC_LINKS(goto_prev_jump_no_skips_sticky, 0), "goto_prev_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 514 },
{ PROC_LINKS(goto_prev_jump_sticky, 0), "goto_prev_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 484 },
{ PROC_LINKS(hide_filebar, 0), "hide_filebar", 12, "Sets the current view to hide it's filebar.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 533 },
{ PROC_LINKS(hide_scrollbar, 0), "hide_scrollbar", 14, "Sets the current view to hide it's scrollbar.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 519 },
{ PROC_LINKS(if0_off, 0), "if0_off", 7, "Surround the range between the cursor and mark with an '#if 0' and an '#endif'", 78, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 79 },
{ PROC_LINKS(increase_face_size, 0), "increase_face_size", 18, "Increase the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 586 },
{ PROC_LINKS(increase_line_wrap, 0), "increase_line_wrap", 18, "Increases the current buffer's width for line wrapping.", 55, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 564 },
{ PROC_LINKS(interactive_kill_buffer, 0), "interactive_kill_buffer", 23, "Interactively kill an open buffer.", 34, "w:\\4ed\\code\\4coder_lists.cpp", 28, 774 },
{ PROC_LINKS(interactive_new, 0), "interactive_new", 15, "Interactively creates a new file.", 33, "w:\\4ed\\code\\4coder_lists.cpp", 28, 884 },
{ PROC_LINKS(interactive_open, 0), "interactive_open", 16, "Interactively opens a file.", 27, "w:\\4ed\\code\\4coder_lists.cpp", 28, 916 },
{ 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, 846 },
{ PROC_LINKS(interactive_switch_buffer, 0), "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "w:\\4ed\\code\\4coder_lists.cpp", 28, 755 },
{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1583 },
{ 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, 166 },
{ 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, 332 },
{ 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, 338 },
{ PROC_LINKS(list_all_functions_current_buffer, 0), "list_all_functions_current_buffer", 33, "Creates a jump list of lines of the current buffer that appear to define or declare functions.", 94, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 309 },
{ PROC_LINKS(list_all_functions_current_buffer_lister, 0), "list_all_functions_current_buffer_lister", 40, "Creates a lister of locations that look like function definitions and declarations in the buffer.", 97, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 319 },
{ PROC_LINKS(list_all_locations, 0), "list_all_locations", 18, "Queries the user for a string and lists all exact case-sensitive matches found in all open buffers.", 99, "w:\\4ed\\code\\4coder_search.cpp", 29, 871 },
{ PROC_LINKS(list_all_locations_case_insensitive, 0), "list_all_locations_case_insensitive", 35, "Queries the user for a string and lists all exact case-insensitive matches found in all open buffers.", 101, "w:\\4ed\\code\\4coder_search.cpp", 29, 885 },
{ PROC_LINKS(list_all_locations_of_identifier, 0), "list_all_locations_of_identifier", 32, "Reads a token or word under the cursor and lists all exact case-sensitive mathces in all open buffers.", 102, "w:\\4ed\\code\\4coder_search.cpp", 29, 899 },
{ PROC_LINKS(list_all_locations_of_identifier_case_insensitive, 0), "list_all_locations_of_identifier_case_insensitive", 49, "Reads a token or word under the cursor and lists all exact case-insensitive mathces in all open buffers.", 104, "w:\\4ed\\code\\4coder_search.cpp", 29, 906 },
{ PROC_LINKS(list_all_locations_of_selection, 0), "list_all_locations_of_selection", 31, "Reads the string in the selected range and lists all exact case-sensitive mathces in all open buffers.", 102, "w:\\4ed\\code\\4coder_search.cpp", 29, 913 },
{ PROC_LINKS(list_all_locations_of_selection_case_insensitive, 0), "list_all_locations_of_selection_case_insensitive", 48, "Reads the string in the selected range and lists all exact case-insensitive mathces in all open buffers.", 104, "w:\\4ed\\code\\4coder_search.cpp", 29, 920 },
{ PROC_LINKS(list_all_locations_of_type_definition, 0), "list_all_locations_of_type_definition", 37, "Queries user for string, lists all locations of strings that appear to define a type whose name matches the input string.", 121, "w:\\4ed\\code\\4coder_search.cpp", 29, 927 },
{ PROC_LINKS(list_all_locations_of_type_definition_of_identifier, 0), "list_all_locations_of_type_definition_of_identifier", 51, "Reads a token or word under the cursor and lists all locations of strings that appear to define a type whose name matches it.", 125, "w:\\4ed\\code\\4coder_search.cpp", 29, 938 },
{ PROC_LINKS(list_all_substring_locations, 0), "list_all_substring_locations", 28, "Queries the user for a string and lists all case-sensitive substring matches found in all open buffers.", 103, "w:\\4ed\\code\\4coder_search.cpp", 29, 878 },
{ PROC_LINKS(list_all_substring_locations_case_insensitive, 0), "list_all_substring_locations_case_insensitive", 45, "Queries the user for a string and lists all case-insensitive substring matches found in all open buffers.", 105, "w:\\4ed\\code\\4coder_search.cpp", 29, 892 },
{ PROC_LINKS(lister__activate, 0), "lister__activate", 16, "A lister mode command that activates the list's action on the highlighted item.", 79, "w:\\4ed\\code\\4coder_lists.cpp", 28, 15 },
{ PROC_LINKS(lister__backspace_text_field, 0), "lister__backspace_text_field", 28, "A lister mode command that dispatches to the lister's backspace text field handler.", 83, "w:\\4ed\\code\\4coder_lists.cpp", 28, 41 },
{ PROC_LINKS(lister__backspace_text_field__default, 0), "lister__backspace_text_field__default", 37, "A lister mode command that backspaces one character from the text field.", 72, "w:\\4ed\\code\\4coder_lists.cpp", 28, 145 },
{ PROC_LINKS(lister__backspace_text_field__file_path, 0), "lister__backspace_text_field__file_path", 39, "A lister mode command that backspaces one character from the text field of a file system list.", 94, "w:\\4ed\\code\\4coder_lists.cpp", 28, 217 },
{ PROC_LINKS(lister__mouse_press, 0), "lister__mouse_press", 19, "A lister mode command that beings a click interaction with a list item under the mouse.", 87, "w:\\4ed\\code\\4coder_lists.cpp", 28, 86 },
{ PROC_LINKS(lister__mouse_release, 0), "lister__mouse_release", 21, "A lister mode command that ends a click interaction with a list item under the mouse, possibly activating it.", 109, "w:\\4ed\\code\\4coder_lists.cpp", 28, 98 },
{ PROC_LINKS(lister__move_down, 0), "lister__move_down", 17, "A lister mode command that dispatches to the lister's navigate down handler.", 76, "w:\\4ed\\code\\4coder_lists.cpp", 28, 61 },
{ PROC_LINKS(lister__move_down__default, 0), "lister__move_down__default", 26, "A lister mode command that moves the highlighted item one down in the list.", 75, "w:\\4ed\\code\\4coder_lists.cpp", 28, 176 },
{ PROC_LINKS(lister__move_up, 0), "lister__move_up", 15, "A lister mode command that dispatches to the lister's navigate up handler.", 74, "w:\\4ed\\code\\4coder_lists.cpp", 28, 51 },
{ PROC_LINKS(lister__move_up__default, 0), "lister__move_up__default", 24, "A lister mode command that moves the highlighted item one up in the list.", 73, "w:\\4ed\\code\\4coder_lists.cpp", 28, 160 },
{ PROC_LINKS(lister__quit, 0), "lister__quit", 12, "A lister mode command that quits the list without executing any actions.", 72, "w:\\4ed\\code\\4coder_lists.cpp", 28, 8 },
{ PROC_LINKS(lister__repaint, 0), "lister__repaint", 15, "A lister mode command that updates the lists UI data.", 53, "w:\\4ed\\code\\4coder_lists.cpp", 28, 114 },
{ PROC_LINKS(lister__wheel_scroll, 0), "lister__wheel_scroll", 20, "A lister mode command that scrolls the list in response to the mouse wheel.", 75, "w:\\4ed\\code\\4coder_lists.cpp", 28, 71 },
{ PROC_LINKS(lister__write_character, 0), "lister__write_character", 23, "A lister mode command that dispatches to the lister's write character handler.", 78, "w:\\4ed\\code\\4coder_lists.cpp", 28, 31 },
{ PROC_LINKS(lister__write_character__default, 0), "lister__write_character__default", 32, "A lister mode command that inserts a new character to the text field.", 69, "w:\\4ed\\code\\4coder_lists.cpp", 28, 125 },
{ PROC_LINKS(lister__write_character__file_path, 0), "lister__write_character__file_path", 34, "A lister mode command that inserts a character into the text field of a file system list.", 89, "w:\\4ed\\code\\4coder_lists.cpp", 28, 192 },
{ 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, 252 },
{ 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, 1271 },
{ 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_change_face_size, 0), "mouse_wheel_change_face_size", 28, "Reads the state of the mouse wheel and uses it to either increase or decrease the face size.", 92, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 610 },
{ 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, 245 },
{ PROC_LINKS(move_down, 0), "move_down", 9, "Moves the cursor down one line.", 31, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 309 },
{ 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, 321 },
{ PROC_LINKS(move_down_textual, 0), "move_down_textual", 17, "Moves down to the next line of actual text, regardless of line wrapping.", 72, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 327 },
{ PROC_LINKS(move_left, 0), "move_left", 9, "Moves the cursor one character to the left.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 358 },
{ PROC_LINKS(move_line_down, 0), "move_line_down", 14, "Swaps the line under the cursor with the line below it, and moves the cursor down with it.", 90, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1368 },
{ PROC_LINKS(move_line_up, 0), "move_line_up", 12, "Swaps the line under the cursor with the line above it, and moves the cursor up with it.", 88, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1304 },
{ 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, 368 },
{ PROC_LINKS(move_up, 0), "move_up", 7, "Moves the cursor up one line.", 29, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 303 },
{ 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, 315 },
{ 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, 584 },
{ PROC_LINKS(newline_or_goto_position_sticky, 0), "newline_or_goto_position_sticky", 31, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 570 },
{ PROC_LINKS(open_all_code, 0), "open_all_code", 13, "Open all code in the current directory. File types are determined by extensions. An extension is considered code based on the extensions specified in 4coder.config.", 164, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1067 },
{ PROC_LINKS(open_all_code_recursive, 0), "open_all_code_recursive", 23, "Works as open_all_code but also runs in all subdirectories.", 59, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1074 },
{ PROC_LINKS(open_file_in_quotes, 0), "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1490 },
{ PROC_LINKS(open_in_other, 0), "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1809 },
{ PROC_LINKS(open_long_braces, 0), "open_long_braces", 16, "At the cursor, insert a '{' and '}' separated by a blank line.", 62, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 55 },
{ PROC_LINKS(open_long_braces_break, 0), "open_long_braces_break", 22, "At the cursor, insert a '{' and '}break;' separated by a blank line.", 68, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 71 },
{ PROC_LINKS(open_long_braces_semicolon, 0), "open_long_braces_semicolon", 26, "At the cursor, insert a '{' and '};' separated by a blank line.", 63, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 63 },
{ PROC_LINKS(open_matching_file_cpp, 0), "open_matching_file_cpp", 22, "If the current file is a *.cpp or *.h, attempts to open the corresponding *.h or *.cpp file in the other view.", 110, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1526 },
{ PROC_LINKS(open_panel_hsplit, 0), "open_panel_hsplit", 17, "Create a new panel by horizontally splitting the active panel.", 62, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 178 },
{ PROC_LINKS(open_panel_vsplit, 0), "open_panel_vsplit", 17, "Create a new panel by vertically splitting the active panel.", 60, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 169 },
{ PROC_LINKS(page_down, 0), "page_down", 9, "Scrolls the view down one view height and moves the cursor down one view height.", 80, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 347 },
{ PROC_LINKS(page_up, 0), "page_up", 7, "Scrolls the view up one view height and moves the cursor up one view height.", 76, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 338 },
{ PROC_LINKS(paste, 0), "paste", 5, "At the cursor, insert the text at the top of the clipboard.", 59, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 46 },
{ PROC_LINKS(paste_and_indent, 0), "paste_and_indent", 16, "Paste from the top of clipboard and run auto-indent on the newly pasted text.", 77, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 134 },
{ PROC_LINKS(paste_next, 0), "paste_next", 10, "If the previous command was paste or paste_next, replaces the paste range with the next text down on the clipboard, otherwise operates as the paste command.", 156, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 85 },
{ PROC_LINKS(paste_next_and_indent, 0), "paste_next_and_indent", 21, "Paste the next item on the clipboard and run auto-indent on the newly pasted text.", 82, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 141 },
{ PROC_LINKS(place_in_scope, 0), "place_in_scope", 14, "Wraps the code contained in the range between cursor and mark with a new curly brace scope.", 91, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 506 },
{ PROC_LINKS(project_command_lister, 0), "project_command_lister", 22, "Open a lister of all commands in the currently loaded project.", 62, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1527 },
{ PROC_LINKS(project_fkey_command, 0), "project_fkey_command", 20, "Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.", 175, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1090 },
{ PROC_LINKS(project_go_to_root_directory, 0), "project_go_to_root_directory", 28, "Changes 4coder's hot directory to the root directory of the currently loaded project. With no loaded project nothing hapepns.", 125, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1113 },
{ PROC_LINKS(query_replace, 0), "query_replace", 13, "Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.", 120, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1045 },
{ PROC_LINKS(query_replace_identifier, 0), "query_replace_identifier", 24, "Queries the user for a string, and incrementally replace every occurence of the word or token found at the cursor with the specified string.", 140, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1069 },
{ PROC_LINKS(query_replace_selection, 0), "query_replace_selection", 23, "Queries the user for a string, and incrementally replace every occurence of the string found in the selected range with the specified string.", 141, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1087 },
{ PROC_LINKS(redo, 0), "redo", 4, "Advances forward through the undo history in the buffer containing the most recent regular edit.", 96, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1706 },
{ PROC_LINKS(redo_this_buffer, 0), "redo_this_buffer", 16, "Advances forwards through the undo history of the current buffer.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1620 },
{ PROC_LINKS(remap_interactive, 0), "remap_interactive", 17, "Switch to a named key binding map.", 34, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 297 },
{ 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, 1227 },
{ 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, 1598 },
{ 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, 780 },
{ 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, 924 },
{ 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, 895 },
{ 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, 913 },
{ PROC_LINKS(save, 0), "save", 4, "Saves the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1590 },
{ PROC_LINKS(save_all_dirty_buffers, 0), "save_all_dirty_buffers", 22, "Saves all buffers marked dirty (showing the '*' indicator).", 59, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1131 },
{ PROC_LINKS(save_to_query, 0), "save_to_query", 13, "Queries the user for a file name and saves the contents of the current buffer, altering the buffer's name too.", 110, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1187 },
{ PROC_LINKS(scope_absorb_down, 0), "scope_absorb_down", 17, "If a scope is currently selected, and a statement or block statement is present below the current scope, the statement is moved into the scope.", 143, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 747 },
{ PROC_LINKS(search, 0), "search", 6, "Begins an incremental search down through the current buffer for a user specified string.", 89, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 888 },
{ PROC_LINKS(search_identifier, 0), "search_identifier", 17, "Begins an incremental search down through the current buffer for the word or token under the cursor.", 100, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 902 },
{ PROC_LINKS(seek_alphanumeric_left, 0), "seek_alphanumeric_left", 22, "Seek left for boundary between alphanumeric characters and non-alphanumeric characters.", 87, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1237 },
{ PROC_LINKS(seek_alphanumeric_or_camel_left, 0), "seek_alphanumeric_or_camel_left", 31, "Seek left for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 106, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1249 },
{ PROC_LINKS(seek_alphanumeric_or_camel_right, 0), "seek_alphanumeric_or_camel_right", 32, "Seek right for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 107, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1243 },
{ PROC_LINKS(seek_alphanumeric_right, 0), "seek_alphanumeric_right", 23, "Seek right for boundary between alphanumeric characters and non-alphanumeric characters.", 88, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1231 },
{ PROC_LINKS(seek_beginning_of_line, 0), "seek_beginning_of_line", 22, "Seeks the cursor to the beginning of the visual line.", 53, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1130 },
{ PROC_LINKS(seek_beginning_of_textual_line, 0), "seek_beginning_of_textual_line", 30, "Seeks the cursor to the beginning of the line across all text.", 62, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1110 },
{ PROC_LINKS(seek_end_of_line, 0), "seek_end_of_line", 16, "Seeks the cursor to the end of the visual line.", 47, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1142 },
{ PROC_LINKS(seek_end_of_textual_line, 0), "seek_end_of_textual_line", 24, "Seeks the cursor to the end of the line across all text.", 56, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1120 },
{ PROC_LINKS(seek_token_left, 0), "seek_token_left", 15, "Seek left for the next beginning of a token.", 44, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1213 },
{ PROC_LINKS(seek_token_right, 0), "seek_token_right", 16, "Seek right for the next end of a token.", 39, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1207 },
{ PROC_LINKS(seek_white_or_token_left, 0), "seek_white_or_token_left", 24, "Seek left for the next end of a token or boundary between whitespace and non-whitespace.", 88, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1225 },
{ PROC_LINKS(seek_white_or_token_right, 0), "seek_white_or_token_right", 25, "Seek right for the next end of a token or boundary between whitespace and non-whitespace.", 89, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1219 },
{ PROC_LINKS(seek_whitespace_down, 0), "seek_whitespace_down", 20, "Seeks the cursor down to the next blank line.", 45, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1100 },
{ PROC_LINKS(seek_whitespace_down_end_line, 0), "seek_whitespace_down_end_line", 29, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1165 },
{ PROC_LINKS(seek_whitespace_left, 0), "seek_whitespace_left", 20, "Seek left for the next boundary between whitespace and non-whitespace.", 70, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1201 },
{ PROC_LINKS(seek_whitespace_right, 0), "seek_whitespace_right", 21, "Seek right for the next boundary between whitespace and non-whitespace.", 71, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1195 },
{ PROC_LINKS(seek_whitespace_up, 0), "seek_whitespace_up", 18, "Seeks the cursor up to the next blank line.", 43, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1090 },
{ PROC_LINKS(seek_whitespace_up_end_line, 0), "seek_whitespace_up_end_line", 27, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1154 },
{ PROC_LINKS(select_all, 0), "select_all", 10, "Puts the cursor at the top of the file, and the mark at the bottom of the file.", 79, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 378 },
{ PROC_LINKS(select_next_scope_absolute, 0), "select_next_scope_absolute", 26, "Finds the first scope started by '{' after the cursor and puts the cursor and mark on the '{' and '}'.", 102, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 387 },
{ PROC_LINKS(select_prev_scope_absolute, 0), "select_prev_scope_absolute", 26, "Finds the first scope started by '{' before the cursor and puts the cursor and mark on the '{' and '}'.", 103, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 407 },
{ PROC_LINKS(select_surrounding_scope, 0), "select_surrounding_scope", 24, "Finds the scope enclosed by '{' '}' surrounding the cursor and puts the cursor and mark on the '{' and '}'.", 107, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 371 },
{ PROC_LINKS(set_bindings_choose, 0), "set_bindings_choose", 19, "Remap keybindings using the 'choose' mapping rule.", 50, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 47 },
{ PROC_LINKS(set_bindings_default, 0), "set_bindings_default", 20, "Remap keybindings using the 'default' mapping rule.", 51, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 61 },
{ PROC_LINKS(set_bindings_mac_default, 0), "set_bindings_mac_default", 24, "Remap keybindings using the 'mac-default' mapping rule.", 55, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 75 },
{ PROC_LINKS(set_mark, 0), "set_mark", 8, "Sets the mark to the current position of the cursor.", 52, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 121 },
{ PROC_LINKS(set_mode_to_notepad_like, 0), "set_mode_to_notepad_like", 24, "Sets the edit mode to Notepad like.", 35, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 265 },
{ PROC_LINKS(set_mode_to_original, 0), "set_mode_to_original", 20, "Sets the edit mode to 4coder original.", 38, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 259 },
{ PROC_LINKS(setup_build_bat, 0), "setup_build_bat", 15, "Queries the user for several configuration options and initializes a new build batch script.", 92, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1498 },
{ PROC_LINKS(setup_build_bat_and_sh, 0), "setup_build_bat_and_sh", 22, "Queries the user for several configuration options and initializes a new build batch script.", 92, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1510 },
{ PROC_LINKS(setup_build_sh, 0), "setup_build_sh", 14, "Queries the user for several configuration options and initializes a new build shell script.", 92, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1504 },
{ PROC_LINKS(setup_new_project, 0), "setup_new_project", 17, "Queries the user for several configuration options and initializes a new 4coder project with build scripts for every OS.", 120, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1491 },
{ PROC_LINKS(show_filebar, 0), "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 526 },
{ PROC_LINKS(show_scrollbar, 0), "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 512 },
{ PROC_LINKS(snipe_token_or_word, 0), "snipe_token_or_word", 19, "Delete a single, whole token on or to the left of the cursor and post it to the clipboard.", 90, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1269 },
{ PROC_LINKS(snipe_token_or_word_right, 0), "snipe_token_or_word_right", 25, "Delete a single, whole token on or to the right of the cursor and post it to the clipboard.", 91, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1275 },
{ PROC_LINKS(snippet_lister, 0), "snippet_lister", 14, "Opens a snippet lister for inserting whole pre-written snippets of text.", 72, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 248 },
{ PROC_LINKS(suppress_mouse, 0), "suppress_mouse", 14, "Hides the mouse and causes all mosue input (clicks, position, wheel) to be ignored.", 83, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 241 },
{ PROC_LINKS(swap_buffers_between_panels, 0), "swap_buffers_between_panels", 27, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1550 },
{ PROC_LINKS(to_lowercase, 0), "to_lowercase", 12, "Converts all ascii text in the range between the cursor and the mark to lowercase.", 82, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 410 },
{ PROC_LINKS(to_uppercase, 0), "to_uppercase", 12, "Converts all ascii text in the range between the cursor and the mark to uppercase.", 82, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 390 },
{ PROC_LINKS(toggle_filebar, 0), "toggle_filebar", 14, "Toggles the visibility status of the current view's filebar.", 60, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 540 },
{ PROC_LINKS(toggle_fps_meter, 0), "toggle_fps_meter", 16, "Toggles the visibility of the FPS performance meter", 51, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 558 },
{ PROC_LINKS(toggle_fullscreen, 0), "toggle_fullscreen", 17, "Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.", 89, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 289 },
{ PROC_LINKS(toggle_highlight_enclosing_scopes, 0), "toggle_highlight_enclosing_scopes", 33, "In code files scopes surrounding the cursor are highlighted with distinguishing colors.", 87, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 277 },
{ PROC_LINKS(toggle_highlight_line_at_cursor, 0), "toggle_highlight_line_at_cursor", 31, "Toggles the line highlight at the cursor.", 41, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 271 },
{ PROC_LINKS(toggle_line_wrap, 0), "toggle_line_wrap", 16, "Toggles the current buffer's line wrapping status.", 50, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 549 },
{ PROC_LINKS(toggle_mouse, 0), "toggle_mouse", 12, "Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.", 71, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 253 },
{ PROC_LINKS(toggle_paren_matching_helper, 0), "toggle_paren_matching_helper", 28, "In code files matching parentheses pairs are colored with distinguishing colors.", 80, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 283 },
{ PROC_LINKS(toggle_show_whitespace, 0), "toggle_show_whitespace", 22, "Toggles the current buffer's whitespace visibility status.", 58, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 638 },
{ PROC_LINKS(toggle_virtual_whitespace, 0), "toggle_virtual_whitespace", 25, "Toggles the current buffer's virtual whitespace status.", 55, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 627 },
{ PROC_LINKS(uncomment_line, 0), "uncomment_line", 14, "If present, delete '//' at the beginning of the line after leading whitespace.", 78, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 147 },
{ PROC_LINKS(undo, 0), "undo", 4, "Advances backward through the undo history in the buffer containing the most recent regular edit.", 97, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1634 },
{ PROC_LINKS(undo_this_buffer, 0), "undo_this_buffer", 16, "Advances backwards through the undo history of the current buffer.", 66, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1608 },
{ PROC_LINKS(view_buffer_other_panel, 0), "view_buffer_other_panel", 23, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1540 },
{ PROC_LINKS(view_jump_list_with_lister, 0), "view_jump_list_with_lister", 26, "When executed on a buffer with jumps, creates a persistent lister for all the jumps", 83, "w:\\4ed\\code\\4coder_jump_lister.cpp", 34, 108 },
{ PROC_LINKS(word_complete, 0), "word_complete", 13, "Iteratively tries completing the word to the left of the cursor with other words in open buffers that have the same prefix string.", 130, "w:\\4ed\\code\\4coder_search.cpp", 29, 958 },
{ 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, 653 },
{ 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, 103 },
{ 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, 67 },
{ 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, 91 },
{ 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, 97 },
{ 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, 85 },
{ PROC_LINKS(write_underscore, 0), "write_underscore", 16, "Inserts an underscore.", 22, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 76 },
{ PROC_LINKS(write_zero_struct, 0), "write_zero_struct", 17, "At the cursor, insert a ' = {};'.", 33, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 109 },
{ PROC_LINKS(allow_mouse, 0), "allow_mouse", 11, "Shows the mouse and causes all mouse input to be processed normally.", 68, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 247 },
{ PROC_LINKS(auto_tab_line_at_cursor, 0), "auto_tab_line_at_cursor", 23, "Auto-indents the line on which the cursor sits.", 47, "c:\\4ed\\code\\4coder_auto_indent.cpp", 34, 629 },
{ PROC_LINKS(auto_tab_range, 0), "auto_tab_range", 14, "Auto-indents the range between the cursor and the mark.", 55, "c:\\4ed\\code\\4coder_auto_indent.cpp", 34, 640 },
{ PROC_LINKS(auto_tab_whole_file, 0), "auto_tab_whole_file", 19, "Audo-indents the entire current buffer.", 39, "c:\\4ed\\code\\4coder_auto_indent.cpp", 34, 619 },
{ PROC_LINKS(backspace_char, 0), "backspace_char", 14, "Deletes the character to the left of the cursor.", 48, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 101 },
{ PROC_LINKS(backspace_word, 0), "backspace_word", 14, "Delete characters between the cursor position and the first alphanumeric boundary to the left.", 94, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1257 },
{ PROC_LINKS(basic_change_active_panel, 0), "basic_change_active_panel", 25, "Change the currently active panel, moving to the panel with the next highest view_id. Will not skipe the build panel if it is open.", 132, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 495 },
{ PROC_LINKS(build_in_build_panel, 0), "build_in_build_panel", 20, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*. Puts the *compilation* buffer in a panel at the footer of the current view.", 230, "c:\\4ed\\code\\4coder_build_commands.cpp", 37, 187 },
{ PROC_LINKS(build_search, 0), "build_search", 12, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*.", 153, "c:\\4ed\\code\\4coder_build_commands.cpp", 37, 155 },
{ PROC_LINKS(center_view, 0), "center_view", 11, "Centers the view vertically on the line on which the cursor sits.", 65, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 151 },
{ PROC_LINKS(change_active_panel, 0), "change_active_panel", 19, "Change the currently active panel, moving to the panel with the next highest view_id.", 85, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 149 },
{ PROC_LINKS(change_active_panel_backwards, 0), "change_active_panel_backwards", 29, "Change the currently active panel, moving to the panel with the next lowest view_id.", 84, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 159 },
{ PROC_LINKS(change_to_build_panel, 0), "change_to_build_panel", 21, "If the special build panel is open, makes the build panel the active panel.", 75, "c:\\4ed\\code\\4coder_build_commands.cpp", 37, 209 },
{ PROC_LINKS(clean_all_lines, 0), "clean_all_lines", 15, "Removes trailing whitespace from all lines in the current buffer.", 65, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 430 },
{ PROC_LINKS(click_set_cursor, 0), "click_set_cursor", 16, "Sets the cursor position to the mouse position.", 47, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 207 },
{ PROC_LINKS(click_set_cursor_and_mark, 0), "click_set_cursor_and_mark", 25, "Sets the cursor position and mark to the mouse position.", 56, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 195 },
{ PROC_LINKS(click_set_cursor_if_lbutton, 0), "click_set_cursor_if_lbutton", 27, "If the mouse left button is pressed, sets the cursor position to the mouse position.", 84, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 219 },
{ PROC_LINKS(click_set_mark, 0), "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 233 },
{ 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:\\4ed\\code\\4coder_project_commands.cpp", 39, 1060 },
{ PROC_LINKS(close_build_panel, 0), "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "c:\\4ed\\code\\4coder_build_commands.cpp", 37, 203 },
{ PROC_LINKS(close_panel, 0), "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 503 },
{ PROC_LINKS(command_lister, 0), "command_lister", 14, "Opens an interactive list of all registered commands.", 53, "c:\\4ed\\code\\4coder_lists.cpp", 28, 973 },
{ PROC_LINKS(comment_line, 0), "comment_line", 12, "Insert '//' at the beginning of the line after leading whitespace.", 66, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 135 },
{ PROC_LINKS(comment_line_toggle, 0), "comment_line_toggle", 19, "Turns uncommented lines into commented lines and vice versa for comments starting with '//'.", 92, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 159 },
{ PROC_LINKS(copy, 0), "copy", 4, "Copy the text in the range from the cursor to the mark onto the clipboard.", 74, "c:\\4ed\\code\\4coder_clipboard.cpp", 32, 26 },
{ PROC_LINKS(cursor_mark_swap, 0), "cursor_mark_swap", 16, "Swaps the position of the cursor and the mark.", 46, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 129 },
{ PROC_LINKS(cut, 0), "cut", 3, "Cut the text in the range from the cursor to the mark onto the clipboard.", 73, "c:\\4ed\\code\\4coder_clipboard.cpp", 32, 35 },
{ PROC_LINKS(decrease_face_size, 0), "decrease_face_size", 18, "Decrease the size of the face used by the current buffer.", 57, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 598 },
{ PROC_LINKS(decrease_line_wrap, 0), "decrease_line_wrap", 18, "Decrases the current buffer's width for line wrapping.", 54, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 575 },
{ PROC_LINKS(delete_char, 0), "delete_char", 11, "Deletes the character to the right of the cursor.", 49, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 83 },
{ PROC_LINKS(delete_current_scope, 0), "delete_current_scope", 20, "Deletes the braces surrounding the currently selected scope. Leaves the contents within the scope.", 99, "c:\\4ed\\code\\4coder_scope_commands.cpp", 37, 512 },
{ PROC_LINKS(delete_file_query, 0), "delete_file_query", 17, "Deletes the file of the current buffer if 4coder has the appropriate access rights. Will ask the user for confirmation first.", 125, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1161 },
{ PROC_LINKS(delete_line, 0), "delete_line", 11, "Delete the line the on which the cursor sits.", 45, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1413 },
{ PROC_LINKS(delete_range, 0), "delete_range", 12, "Deletes the text in the range between the cursor and the mark.", 62, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 139 },
{ PROC_LINKS(delete_word, 0), "delete_word", 11, "Delete characters between the cursor position and the first alphanumeric boundary to the right.", 95, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1263 },
{ PROC_LINKS(duplicate_line, 0), "duplicate_line", 14, "Create a copy of the line on which the cursor sits.", 51, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1391 },
{ PROC_LINKS(eol_dosify, 0), "eol_dosify", 10, "Puts the buffer in DOS line ending mode.", 40, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 645 },
{ PROC_LINKS(eol_nixify, 0), "eol_nixify", 10, "Puts the buffer in NIX line ending mode.", 40, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 653 },
{ PROC_LINKS(execute_any_cli, 0), "execute_any_cli", 15, "Queries for an output buffer name and system command, runs the system command as a CLI and prints the output to the specified buffer.", 133, "c:\\4ed\\code\\4coder_system_command.cpp", 37, 23 },
{ PROC_LINKS(execute_previous_cli, 0), "execute_previous_cli", 20, "If the command execute_any_cli has already been used, this will execute a CLI reusing the most recent buffer name and command.", 126, "c:\\4ed\\code\\4coder_system_command.cpp", 37, 7 },
{ PROC_LINKS(exit_4coder, 0), "exit_4coder", 11, "Attempts to close 4coder.", 25, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 661 },
{ PROC_LINKS(goto_beginning_of_file, 0), "goto_beginning_of_file", 22, "Sets the cursor to the beginning of the file.", 45, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1176 },
{ PROC_LINKS(goto_end_of_file, 0), "goto_end_of_file", 16, "Sets the cursor to the end of the file.", 39, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1184 },
{ PROC_LINKS(goto_first_jump_direct, 0), "goto_first_jump_direct", 22, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "c:\\4ed\\code\\4coder_jump_direct.cpp", 34, 84 },
{ PROC_LINKS(goto_first_jump_same_panel_sticky, 0), "goto_first_jump_same_panel_sticky", 33, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer and views the buffer in the panel where the jump list was.", 153, "c:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 547 },
{ PROC_LINKS(goto_first_jump_sticky, 0), "goto_first_jump_sticky", 22, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "c:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 529 },
{ PROC_LINKS(goto_jump_at_cursor_direct, 0), "goto_jump_at_cursor_direct", 26, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.", 187, "c:\\4ed\\code\\4coder_jump_direct.cpp", 34, 8 },
{ PROC_LINKS(goto_jump_at_cursor_same_panel_direct, 0), "goto_jump_at_cursor_same_panel_direct", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list..", 168, "c:\\4ed\\code\\4coder_jump_direct.cpp", 34, 29 },
{ PROC_LINKS(goto_jump_at_cursor_same_panel_sticky, 0), "goto_jump_at_cursor_same_panel_sticky", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list.", 167, "c:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 373 },
{ PROC_LINKS(goto_jump_at_cursor_sticky, 0), "goto_jump_at_cursor_sticky", 26, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.", 187, "c:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 345 },
{ PROC_LINKS(goto_line, 0), "goto_line", 9, "Queries the user for a number, and jumps the cursor to the corresponding line.", 78, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 669 },
{ PROC_LINKS(goto_next_jump_direct, 0), "goto_next_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "c:\\4ed\\code\\4coder_jump_direct.cpp", 34, 48 },
{ PROC_LINKS(goto_next_jump_no_skips_direct, 0), "goto_next_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "c:\\4ed\\code\\4coder_jump_direct.cpp", 34, 66 },
{ PROC_LINKS(goto_next_jump_no_skips_sticky, 0), "goto_next_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "c:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 498 },
{ PROC_LINKS(goto_next_jump_sticky, 0), "goto_next_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "c:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 468 },
{ PROC_LINKS(goto_prev_jump_direct, 0), "goto_prev_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "c:\\4ed\\code\\4coder_jump_direct.cpp", 34, 57 },
{ PROC_LINKS(goto_prev_jump_no_skips_direct, 0), "goto_prev_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "c:\\4ed\\code\\4coder_jump_direct.cpp", 34, 75 },
{ PROC_LINKS(goto_prev_jump_no_skips_sticky, 0), "goto_prev_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "c:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 514 },
{ PROC_LINKS(goto_prev_jump_sticky, 0), "goto_prev_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "c:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 484 },
{ PROC_LINKS(hide_filebar, 0), "hide_filebar", 12, "Sets the current view to hide it's filebar.", 43, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 533 },
{ PROC_LINKS(hide_scrollbar, 0), "hide_scrollbar", 14, "Sets the current view to hide it's scrollbar.", 45, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 519 },
{ PROC_LINKS(if0_off, 0), "if0_off", 7, "Surround the range between the cursor and mark with an '#if 0' and an '#endif'", 78, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 79 },
{ PROC_LINKS(increase_face_size, 0), "increase_face_size", 18, "Increase the size of the face used by the current buffer.", 57, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 586 },
{ PROC_LINKS(increase_line_wrap, 0), "increase_line_wrap", 18, "Increases the current buffer's width for line wrapping.", 55, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 564 },
{ PROC_LINKS(interactive_kill_buffer, 0), "interactive_kill_buffer", 23, "Interactively kill an open buffer.", 34, "c:\\4ed\\code\\4coder_lists.cpp", 28, 774 },
{ PROC_LINKS(interactive_new, 0), "interactive_new", 15, "Interactively creates a new file.", 33, "c:\\4ed\\code\\4coder_lists.cpp", 28, 884 },
{ PROC_LINKS(interactive_open, 0), "interactive_open", 16, "Interactively opens a file.", 27, "c:\\4ed\\code\\4coder_lists.cpp", 28, 916 },
{ PROC_LINKS(interactive_open_or_new, 0), "interactive_open_or_new", 23, "Interactively open a file out of the file system.", 49, "c:\\4ed\\code\\4coder_lists.cpp", 28, 846 },
{ PROC_LINKS(interactive_switch_buffer, 0), "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "c:\\4ed\\code\\4coder_lists.cpp", 28, 755 },
{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1583 },
{ PROC_LINKS(kill_rect, 0), "kill_rect", 9, "Delete characters in a rectangular region. Range testing is done by unwrapped-xy coordinates.", 93, "c:\\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, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 166 },
{ 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, "c:\\4ed\\code\\4coder_function_list.cpp", 36, 332 },
{ 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, "c:\\4ed\\code\\4coder_function_list.cpp", 36, 338 },
{ PROC_LINKS(list_all_functions_current_buffer, 0), "list_all_functions_current_buffer", 33, "Creates a jump list of lines of the current buffer that appear to define or declare functions.", 94, "c:\\4ed\\code\\4coder_function_list.cpp", 36, 309 },
{ PROC_LINKS(list_all_functions_current_buffer_lister, 0), "list_all_functions_current_buffer_lister", 40, "Creates a lister of locations that look like function definitions and declarations in the buffer.", 97, "c:\\4ed\\code\\4coder_function_list.cpp", 36, 319 },
{ PROC_LINKS(list_all_locations, 0), "list_all_locations", 18, "Queries the user for a string and lists all exact case-sensitive matches found in all open buffers.", 99, "c:\\4ed\\code\\4coder_search.cpp", 29, 871 },
{ PROC_LINKS(list_all_locations_case_insensitive, 0), "list_all_locations_case_insensitive", 35, "Queries the user for a string and lists all exact case-insensitive matches found in all open buffers.", 101, "c:\\4ed\\code\\4coder_search.cpp", 29, 885 },
{ PROC_LINKS(list_all_locations_of_identifier, 0), "list_all_locations_of_identifier", 32, "Reads a token or word under the cursor and lists all exact case-sensitive mathces in all open buffers.", 102, "c:\\4ed\\code\\4coder_search.cpp", 29, 899 },
{ PROC_LINKS(list_all_locations_of_identifier_case_insensitive, 0), "list_all_locations_of_identifier_case_insensitive", 49, "Reads a token or word under the cursor and lists all exact case-insensitive mathces in all open buffers.", 104, "c:\\4ed\\code\\4coder_search.cpp", 29, 906 },
{ PROC_LINKS(list_all_locations_of_selection, 0), "list_all_locations_of_selection", 31, "Reads the string in the selected range and lists all exact case-sensitive mathces in all open buffers.", 102, "c:\\4ed\\code\\4coder_search.cpp", 29, 913 },
{ PROC_LINKS(list_all_locations_of_selection_case_insensitive, 0), "list_all_locations_of_selection_case_insensitive", 48, "Reads the string in the selected range and lists all exact case-insensitive mathces in all open buffers.", 104, "c:\\4ed\\code\\4coder_search.cpp", 29, 920 },
{ PROC_LINKS(list_all_locations_of_type_definition, 0), "list_all_locations_of_type_definition", 37, "Queries user for string, lists all locations of strings that appear to define a type whose name matches the input string.", 121, "c:\\4ed\\code\\4coder_search.cpp", 29, 927 },
{ 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:\\4ed\\code\\4coder_search.cpp", 29, 938 },
{ 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:\\4ed\\code\\4coder_search.cpp", 29, 878 },
{ 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:\\4ed\\code\\4coder_search.cpp", 29, 892 },
{ PROC_LINKS(lister__activate, 0), "lister__activate", 16, "A lister mode command that activates the list's action on the highlighted item.", 79, "c:\\4ed\\code\\4coder_lists.cpp", 28, 15 },
{ PROC_LINKS(lister__backspace_text_field, 0), "lister__backspace_text_field", 28, "A lister mode command that dispatches to the lister's backspace text field handler.", 83, "c:\\4ed\\code\\4coder_lists.cpp", 28, 41 },
{ PROC_LINKS(lister__backspace_text_field__default, 0), "lister__backspace_text_field__default", 37, "A lister mode command that backspaces one character from the text field.", 72, "c:\\4ed\\code\\4coder_lists.cpp", 28, 145 },
{ PROC_LINKS(lister__backspace_text_field__file_path, 0), "lister__backspace_text_field__file_path", 39, "A lister mode command that backspaces one character from the text field of a file system list.", 94, "c:\\4ed\\code\\4coder_lists.cpp", 28, 217 },
{ PROC_LINKS(lister__mouse_press, 0), "lister__mouse_press", 19, "A lister mode command that beings a click interaction with a list item under the mouse.", 87, "c:\\4ed\\code\\4coder_lists.cpp", 28, 86 },
{ PROC_LINKS(lister__mouse_release, 0), "lister__mouse_release", 21, "A lister mode command that ends a click interaction with a list item under the mouse, possibly activating it.", 109, "c:\\4ed\\code\\4coder_lists.cpp", 28, 98 },
{ PROC_LINKS(lister__move_down, 0), "lister__move_down", 17, "A lister mode command that dispatches to the lister's navigate down handler.", 76, "c:\\4ed\\code\\4coder_lists.cpp", 28, 61 },
{ PROC_LINKS(lister__move_down__default, 0), "lister__move_down__default", 26, "A lister mode command that moves the highlighted item one down in the list.", 75, "c:\\4ed\\code\\4coder_lists.cpp", 28, 176 },
{ PROC_LINKS(lister__move_up, 0), "lister__move_up", 15, "A lister mode command that dispatches to the lister's navigate up handler.", 74, "c:\\4ed\\code\\4coder_lists.cpp", 28, 51 },
{ PROC_LINKS(lister__move_up__default, 0), "lister__move_up__default", 24, "A lister mode command that moves the highlighted item one up in the list.", 73, "c:\\4ed\\code\\4coder_lists.cpp", 28, 160 },
{ PROC_LINKS(lister__quit, 0), "lister__quit", 12, "A lister mode command that quits the list without executing any actions.", 72, "c:\\4ed\\code\\4coder_lists.cpp", 28, 8 },
{ PROC_LINKS(lister__repaint, 0), "lister__repaint", 15, "A lister mode command that updates the lists UI data.", 53, "c:\\4ed\\code\\4coder_lists.cpp", 28, 114 },
{ PROC_LINKS(lister__wheel_scroll, 0), "lister__wheel_scroll", 20, "A lister mode command that scrolls the list in response to the mouse wheel.", 75, "c:\\4ed\\code\\4coder_lists.cpp", 28, 71 },
{ PROC_LINKS(lister__write_character, 0), "lister__write_character", 23, "A lister mode command that dispatches to the lister's write character handler.", 78, "c:\\4ed\\code\\4coder_lists.cpp", 28, 31 },
{ PROC_LINKS(lister__write_character__default, 0), "lister__write_character__default", 32, "A lister mode command that inserts a new character to the text field.", 69, "c:\\4ed\\code\\4coder_lists.cpp", 28, 125 },
{ PROC_LINKS(lister__write_character__file_path, 0), "lister__write_character__file_path", 34, "A lister mode command that inserts a character into the text field of a file system list.", 89, "c:\\4ed\\code\\4coder_lists.cpp", 28, 192 },
{ PROC_LINKS(lister__write_character__fixed_list, 0), "lister__write_character__fixed_list", 35, "A lister mode command that handles input for the fixed sure to kill list.", 73, "c:\\4ed\\code\\4coder_lists.cpp", 28, 252 },
{ 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:\\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, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1271 },
{ PROC_LINKS(miblo_decrement_basic, 0), "miblo_decrement_basic", 21, "Decrement an integer under the cursor by one.", 45, "c:\\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, "c:\\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, "c:\\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, "c:\\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, "c:\\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, "c:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 389 },
{ PROC_LINKS(mouse_wheel_change_face_size, 0), "mouse_wheel_change_face_size", 28, "Reads the state of the mouse wheel and uses it to either increase or decrease the face size.", 92, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 610 },
{ PROC_LINKS(mouse_wheel_scroll, 0), "mouse_wheel_scroll", 18, "Reads the scroll wheel value from the mouse state and scrolls accordingly.", 74, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 245 },
{ PROC_LINKS(move_down, 0), "move_down", 9, "Moves the cursor down one line.", 31, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 309 },
{ PROC_LINKS(move_down_10, 0), "move_down_10", 12, "Moves the cursor down ten lines.", 32, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 321 },
{ PROC_LINKS(move_down_textual, 0), "move_down_textual", 17, "Moves down to the next line of actual text, regardless of line wrapping.", 72, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 327 },
{ PROC_LINKS(move_left, 0), "move_left", 9, "Moves the cursor one character to the left.", 43, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 358 },
{ PROC_LINKS(move_line_down, 0), "move_line_down", 14, "Swaps the line under the cursor with the line below it, and moves the cursor down with it.", 90, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1368 },
{ PROC_LINKS(move_line_up, 0), "move_line_up", 12, "Swaps the line under the cursor with the line above it, and moves the cursor up with it.", 88, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1304 },
{ PROC_LINKS(move_right, 0), "move_right", 10, "Moves the cursor one character to the right.", 44, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 368 },
{ PROC_LINKS(move_up, 0), "move_up", 7, "Moves the cursor up one line.", 29, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 303 },
{ PROC_LINKS(move_up_10, 0), "move_up_10", 10, "Moves the cursor up ten lines.", 30, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 315 },
{ 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, "c:\\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, "c:\\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, "c:\\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, "c:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 584 },
{ 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:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 570 },
{ 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:\\4ed\\code\\4coder_project_commands.cpp", 39, 1067 },
{ 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:\\4ed\\code\\4coder_project_commands.cpp", 39, 1074 },
{ 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:\\4ed\\code\\4coder_base_commands.cpp", 36, 1490 },
{ PROC_LINKS(open_in_other, 0), "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1809 },
{ PROC_LINKS(open_long_braces, 0), "open_long_braces", 16, "At the cursor, insert a '{' and '}' separated by a blank line.", 62, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 55 },
{ PROC_LINKS(open_long_braces_break, 0), "open_long_braces_break", 22, "At the cursor, insert a '{' and '}break;' separated by a blank line.", 68, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 71 },
{ PROC_LINKS(open_long_braces_semicolon, 0), "open_long_braces_semicolon", 26, "At the cursor, insert a '{' and '};' separated by a blank line.", 63, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 63 },
{ PROC_LINKS(open_matching_file_cpp, 0), "open_matching_file_cpp", 22, "If the current file is a *.cpp or *.h, attempts to open the corresponding *.h or *.cpp file in the other view.", 110, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1526 },
{ PROC_LINKS(open_panel_hsplit, 0), "open_panel_hsplit", 17, "Create a new panel by horizontally splitting the active panel.", 62, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 178 },
{ PROC_LINKS(open_panel_vsplit, 0), "open_panel_vsplit", 17, "Create a new panel by vertically splitting the active panel.", 60, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 169 },
{ PROC_LINKS(page_down, 0), "page_down", 9, "Scrolls the view down one view height and moves the cursor down one view height.", 80, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 347 },
{ PROC_LINKS(page_up, 0), "page_up", 7, "Scrolls the view up one view height and moves the cursor up one view height.", 76, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 338 },
{ PROC_LINKS(paste, 0), "paste", 5, "At the cursor, insert the text at the top of the clipboard.", 59, "c:\\4ed\\code\\4coder_clipboard.cpp", 32, 46 },
{ PROC_LINKS(paste_and_indent, 0), "paste_and_indent", 16, "Paste from the top of clipboard and run auto-indent on the newly pasted text.", 77, "c:\\4ed\\code\\4coder_clipboard.cpp", 32, 134 },
{ 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:\\4ed\\code\\4coder_clipboard.cpp", 32, 85 },
{ 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:\\4ed\\code\\4coder_clipboard.cpp", 32, 141 },
{ 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:\\4ed\\code\\4coder_scope_commands.cpp", 37, 506 },
{ PROC_LINKS(project_command_lister, 0), "project_command_lister", 22, "Open a lister of all commands in the currently loaded project.", 62, "c:\\4ed\\code\\4coder_project_commands.cpp", 39, 1527 },
{ 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:\\4ed\\code\\4coder_project_commands.cpp", 39, 1090 },
{ 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:\\4ed\\code\\4coder_project_commands.cpp", 39, 1113 },
{ 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:\\4ed\\code\\4coder_base_commands.cpp", 36, 1045 },
{ 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:\\4ed\\code\\4coder_base_commands.cpp", 36, 1069 },
{ 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:\\4ed\\code\\4coder_base_commands.cpp", 36, 1087 },
{ PROC_LINKS(redo, 0), "redo", 4, "Advances forward through the undo history in the buffer containing the most recent regular edit.", 96, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1706 },
{ PROC_LINKS(redo_this_buffer, 0), "redo_this_buffer", 16, "Advances forwards through the undo history of the current buffer.", 65, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1620 },
{ PROC_LINKS(remap_interactive, 0), "remap_interactive", 17, "Switch to a named key binding map.", 34, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 297 },
{ PROC_LINKS(rename_file_query, 0), "rename_file_query", 17, "Queries the user for a new name and renames the file of the current buffer, altering the buffer's name too.", 107, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1227 },
{ 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, "c:\\4ed\\code\\4coder_experiments.cpp", 34, 383 },
{ PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1598 },
{ 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, "c:\\4ed\\code\\4coder_experiments.cpp", 34, 780 },
{ PROC_LINKS(replace_in_range, 0), "replace_in_range", 16, "Queries the user for two strings, and replaces all occurences of the first string in the range between the cursor and the mark with the second string.", 150, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 924 },
{ PROC_LINKS(reverse_search, 0), "reverse_search", 14, "Begins an incremental search up through the current buffer for a user specified string.", 87, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 895 },
{ PROC_LINKS(reverse_search_identifier, 0), "reverse_search_identifier", 25, "Begins an incremental search up through the current buffer for the word or token under the cursor.", 98, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 913 },
{ PROC_LINKS(save, 0), "save", 4, "Saves the current buffer.", 25, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1590 },
{ PROC_LINKS(save_all_dirty_buffers, 0), "save_all_dirty_buffers", 22, "Saves all buffers marked dirty (showing the '*' indicator).", 59, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1131 },
{ PROC_LINKS(save_to_query, 0), "save_to_query", 13, "Queries the user for a file name and saves the contents of the current buffer, altering the buffer's name too.", 110, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1187 },
{ PROC_LINKS(scope_absorb_down, 0), "scope_absorb_down", 17, "If a scope is currently selected, and a statement or block statement is present below the current scope, the statement is moved into the scope.", 143, "c:\\4ed\\code\\4coder_scope_commands.cpp", 37, 747 },
{ PROC_LINKS(search, 0), "search", 6, "Begins an incremental search down through the current buffer for a user specified string.", 89, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 888 },
{ PROC_LINKS(search_identifier, 0), "search_identifier", 17, "Begins an incremental search down through the current buffer for the word or token under the cursor.", 100, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 902 },
{ PROC_LINKS(seek_alphanumeric_left, 0), "seek_alphanumeric_left", 22, "Seek left for boundary between alphanumeric characters and non-alphanumeric characters.", 87, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1237 },
{ PROC_LINKS(seek_alphanumeric_or_camel_left, 0), "seek_alphanumeric_or_camel_left", 31, "Seek left for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 106, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1249 },
{ PROC_LINKS(seek_alphanumeric_or_camel_right, 0), "seek_alphanumeric_or_camel_right", 32, "Seek right for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 107, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1243 },
{ PROC_LINKS(seek_alphanumeric_right, 0), "seek_alphanumeric_right", 23, "Seek right for boundary between alphanumeric characters and non-alphanumeric characters.", 88, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1231 },
{ PROC_LINKS(seek_beginning_of_line, 0), "seek_beginning_of_line", 22, "Seeks the cursor to the beginning of the visual line.", 53, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1130 },
{ PROC_LINKS(seek_beginning_of_textual_line, 0), "seek_beginning_of_textual_line", 30, "Seeks the cursor to the beginning of the line across all text.", 62, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1110 },
{ PROC_LINKS(seek_end_of_line, 0), "seek_end_of_line", 16, "Seeks the cursor to the end of the visual line.", 47, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1142 },
{ PROC_LINKS(seek_end_of_textual_line, 0), "seek_end_of_textual_line", 24, "Seeks the cursor to the end of the line across all text.", 56, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1120 },
{ PROC_LINKS(seek_token_left, 0), "seek_token_left", 15, "Seek left for the next beginning of a token.", 44, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1213 },
{ PROC_LINKS(seek_token_right, 0), "seek_token_right", 16, "Seek right for the next end of a token.", 39, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1207 },
{ PROC_LINKS(seek_white_or_token_left, 0), "seek_white_or_token_left", 24, "Seek left for the next end of a token or boundary between whitespace and non-whitespace.", 88, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1225 },
{ PROC_LINKS(seek_white_or_token_right, 0), "seek_white_or_token_right", 25, "Seek right for the next end of a token or boundary between whitespace and non-whitespace.", 89, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1219 },
{ PROC_LINKS(seek_whitespace_down, 0), "seek_whitespace_down", 20, "Seeks the cursor down to the next blank line.", 45, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1100 },
{ PROC_LINKS(seek_whitespace_down_end_line, 0), "seek_whitespace_down_end_line", 29, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1165 },
{ PROC_LINKS(seek_whitespace_left, 0), "seek_whitespace_left", 20, "Seek left for the next boundary between whitespace and non-whitespace.", 70, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1201 },
{ PROC_LINKS(seek_whitespace_right, 0), "seek_whitespace_right", 21, "Seek right for the next boundary between whitespace and non-whitespace.", 71, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1195 },
{ PROC_LINKS(seek_whitespace_up, 0), "seek_whitespace_up", 18, "Seeks the cursor up to the next blank line.", 43, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1090 },
{ PROC_LINKS(seek_whitespace_up_end_line, 0), "seek_whitespace_up_end_line", 27, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1154 },
{ PROC_LINKS(select_all, 0), "select_all", 10, "Puts the cursor at the top of the file, and the mark at the bottom of the file.", 79, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 378 },
{ PROC_LINKS(select_next_scope_absolute, 0), "select_next_scope_absolute", 26, "Finds the first scope started by '{' after the cursor and puts the cursor and mark on the '{' and '}'.", 102, "c:\\4ed\\code\\4coder_scope_commands.cpp", 37, 387 },
{ PROC_LINKS(select_prev_scope_absolute, 0), "select_prev_scope_absolute", 26, "Finds the first scope started by '{' before the cursor and puts the cursor and mark on the '{' and '}'.", 103, "c:\\4ed\\code\\4coder_scope_commands.cpp", 37, 407 },
{ PROC_LINKS(select_surrounding_scope, 0), "select_surrounding_scope", 24, "Finds the scope enclosed by '{' '}' surrounding the cursor and puts the cursor and mark on the '{' and '}'.", 107, "c:\\4ed\\code\\4coder_scope_commands.cpp", 37, 371 },
{ PROC_LINKS(set_bindings_choose, 0), "set_bindings_choose", 19, "Remap keybindings using the 'choose' mapping rule.", 50, "c:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 47 },
{ PROC_LINKS(set_bindings_default, 0), "set_bindings_default", 20, "Remap keybindings using the 'default' mapping rule.", 51, "c:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 61 },
{ PROC_LINKS(set_bindings_mac_default, 0), "set_bindings_mac_default", 24, "Remap keybindings using the 'mac-default' mapping rule.", 55, "c:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 75 },
{ PROC_LINKS(set_mark, 0), "set_mark", 8, "Sets the mark to the current position of the cursor.", 52, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 121 },
{ PROC_LINKS(set_mode_to_notepad_like, 0), "set_mode_to_notepad_like", 24, "Sets the edit mode to Notepad like.", 35, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 265 },
{ PROC_LINKS(set_mode_to_original, 0), "set_mode_to_original", 20, "Sets the edit mode to 4coder original.", 38, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 259 },
{ 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:\\4ed\\code\\4coder_project_commands.cpp", 39, 1498 },
{ 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:\\4ed\\code\\4coder_project_commands.cpp", 39, 1510 },
{ 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:\\4ed\\code\\4coder_project_commands.cpp", 39, 1504 },
{ 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:\\4ed\\code\\4coder_project_commands.cpp", 39, 1491 },
{ PROC_LINKS(show_filebar, 0), "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 526 },
{ PROC_LINKS(show_scrollbar, 0), "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 512 },
{ 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:\\4ed\\code\\4coder_seek.cpp", 27, 1269 },
{ PROC_LINKS(snipe_token_or_word_right, 0), "snipe_token_or_word_right", 25, "Delete a single, whole token on or to the right of the cursor and post it to the clipboard.", 91, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1275 },
{ PROC_LINKS(snippet_lister, 0), "snippet_lister", 14, "Opens a snippet lister for inserting whole pre-written snippets of text.", 72, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 248 },
{ PROC_LINKS(suppress_mouse, 0), "suppress_mouse", 14, "Hides the mouse and causes all mosue input (clicks, position, wheel) to be ignored.", 83, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 241 },
{ PROC_LINKS(swap_buffers_between_panels, 0), "swap_buffers_between_panels", 27, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1550 },
{ PROC_LINKS(to_lowercase, 0), "to_lowercase", 12, "Converts all ascii text in the range between the cursor and the mark to lowercase.", 82, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 410 },
{ PROC_LINKS(to_uppercase, 0), "to_uppercase", 12, "Converts all ascii text in the range between the cursor and the mark to uppercase.", 82, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 390 },
{ PROC_LINKS(toggle_filebar, 0), "toggle_filebar", 14, "Toggles the visibility status of the current view's filebar.", 60, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 540 },
{ PROC_LINKS(toggle_fps_meter, 0), "toggle_fps_meter", 16, "Toggles the visibility of the FPS performance meter", 51, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 558 },
{ PROC_LINKS(toggle_fullscreen, 0), "toggle_fullscreen", 17, "Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.", 89, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 289 },
{ PROC_LINKS(toggle_highlight_enclosing_scopes, 0), "toggle_highlight_enclosing_scopes", 33, "In code files scopes surrounding the cursor are highlighted with distinguishing colors.", 87, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 277 },
{ PROC_LINKS(toggle_highlight_line_at_cursor, 0), "toggle_highlight_line_at_cursor", 31, "Toggles the line highlight at the cursor.", 41, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 271 },
{ PROC_LINKS(toggle_line_wrap, 0), "toggle_line_wrap", 16, "Toggles the current buffer's line wrapping status.", 50, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 549 },
{ PROC_LINKS(toggle_mouse, 0), "toggle_mouse", 12, "Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.", 71, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 253 },
{ PROC_LINKS(toggle_paren_matching_helper, 0), "toggle_paren_matching_helper", 28, "In code files matching parentheses pairs are colored with distinguishing colors.", 80, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 283 },
{ PROC_LINKS(toggle_show_whitespace, 0), "toggle_show_whitespace", 22, "Toggles the current buffer's whitespace visibility status.", 58, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 638 },
{ PROC_LINKS(toggle_virtual_whitespace, 0), "toggle_virtual_whitespace", 25, "Toggles the current buffer's virtual whitespace status.", 55, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 627 },
{ PROC_LINKS(uncomment_line, 0), "uncomment_line", 14, "If present, delete '//' at the beginning of the line after leading whitespace.", 78, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 147 },
{ PROC_LINKS(undo, 0), "undo", 4, "Advances backward through the undo history in the buffer containing the most recent regular edit.", 97, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1634 },
{ PROC_LINKS(undo_this_buffer, 0), "undo_this_buffer", 16, "Advances backwards through the undo history of the current buffer.", 66, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1608 },
{ PROC_LINKS(view_buffer_other_panel, 0), "view_buffer_other_panel", 23, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1540 },
{ PROC_LINKS(view_jump_list_with_lister, 0), "view_jump_list_with_lister", 26, "When executed on a buffer with jumps, creates a persistent lister for all the jumps", 83, "c:\\4ed\\code\\4coder_jump_lister.cpp", 34, 108 },
{ PROC_LINKS(word_complete, 0), "word_complete", 13, "Iteratively tries completing the word to the left of the cursor with other words in open buffers that have the same prefix string.", 130, "c:\\4ed\\code\\4coder_search.cpp", 29, 958 },
{ PROC_LINKS(write_and_auto_tab, 0), "write_and_auto_tab", 18, "Inserts a character and auto-indents the line on which the cursor sits.", 71, "c:\\4ed\\code\\4coder_auto_indent.cpp", 34, 652 },
{ PROC_LINKS(write_block, 0), "write_block", 11, "At the cursor, insert a block comment.", 38, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 103 },
{ PROC_LINKS(write_character, 0), "write_character", 15, "Inserts whatever character was used to trigger this command.", 60, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 67 },
{ 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, "c:\\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, "c:\\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, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 91 },
{ PROC_LINKS(write_note, 0), "write_note", 10, "At the cursor, insert a '// NOTE' comment, includes user name if it was specified in config.4coder.", 99, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 97 },
{ PROC_LINKS(write_todo, 0), "write_todo", 10, "At the cursor, insert a '// TODO' comment, includes user name if it was specified in config.4coder.", 99, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 85 },
{ PROC_LINKS(write_underscore, 0), "write_underscore", 16, "Inserts an underscore.", 22, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 76 },
{ PROC_LINKS(write_zero_struct, 0), "write_zero_struct", 17, "At the cursor, insert a ' = {};'.", 33, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 109 },
};
static int32_t fcoder_metacmd_ID_allow_mouse = 0;
static int32_t fcoder_metacmd_ID_auto_tab_line_at_cursor = 1;

View File

@ -16,7 +16,7 @@ write_unit(Bind_Helper *helper, Binding_Unit unit){
}
static Bind_Helper
begin_bind_helper(void *data, int32_t size){
begin_bind_helper(void *data, i32 size){
Bind_Helper result = {};
result.cursor = (Binding_Unit*)data;
result.start = result.cursor;
@ -30,7 +30,7 @@ begin_bind_helper(void *data, int32_t size){
}
static void
begin_map(Bind_Helper *helper, int32_t mapid, bool32 replace){
begin_map(Bind_Helper *helper, i32 mapid, b32 replace){
if (helper->group != 0 && helper->error == 0){
helper->error = BH_ERR_MISSING_END;
}
@ -47,12 +47,12 @@ begin_map(Bind_Helper *helper, int32_t mapid, bool32 replace){
}
static void
begin_map(Bind_Helper *helper, int32_t mapid){
begin_map(Bind_Helper *helper, i32 mapid){
begin_map(helper, mapid, false);
}
static void
restart_map(Bind_Helper *helper, int32_t mapid){
restart_map(Bind_Helper *helper, i32 mapid){
begin_map(helper, mapid, true);
}
@ -98,7 +98,7 @@ bind_vanilla_keys(Bind_Helper *helper, unsigned char modifiers, Custom_Command_F
}
static void
inherit_map(Bind_Helper *helper, int32_t mapid){
inherit_map(Bind_Helper *helper, i32 mapid){
if (helper->group == 0 && helper->error == 0) helper->error = BH_ERR_MISSING_BEGIN;
if (!helper->error && mapid < mapid_global) ++helper->header->header.user_map_count;
Binding_Unit unit = {};
@ -108,7 +108,7 @@ inherit_map(Bind_Helper *helper, int32_t mapid){
}
static void
set_hook(Bind_Helper *helper, int32_t hook_id, Hook_Function *func){
set_hook(Bind_Helper *helper, i32 hook_id, Hook_Function *func){
Binding_Unit unit = {};
unit.type = unit_hook;
unit.hook.hook_id = hook_id;
@ -224,19 +224,19 @@ set_input_filter(Bind_Helper *helper, Input_Filter_Function *func){
write_unit(helper, unit);
}
static int32_t
static i32
end_bind_helper(Bind_Helper *helper){
if (helper->header){
helper->header->header.total_size = (int32_t)(helper->cursor - helper->start);
helper->header->header.total_size = (i32)(helper->cursor - helper->start);
helper->header->header.error = helper->error;
}
int32_t result = helper->write_total;
i32 result = helper->write_total;
return(result);
}
static Bind_Buffer
end_bind_helper_get_buffer(Bind_Helper *helper){
int32_t size = end_bind_helper(helper);
i32 size = end_bind_helper(helper);
Bind_Buffer result = {};
result.data = helper->start;
result.size = size;
@ -252,18 +252,18 @@ get_key_code(char *buffer){
////////////////////////////////
static int32_t
round_down(int32_t x, int32_t b){
int32_t r = 0;
static i32
round_down(i32 x, i32 b){
i32 r = 0;
if (x >= 0){
r = x - (x % b);
}
return(r);
}
static int32_t
round_up(int32_t x, int32_t b){
int32_t r = 0;
static i32
round_up(i32 x, i32 b){
i32 r = 0;
if (x >= 0){
r = x + b - (x % b);
}
@ -280,37 +280,37 @@ exec_command(Application_Links *app, Generic_Command cmd){
exec_command(app, cmd.command);
}
static int32_t
static i32
key_is_unmodified(Key_Event_Data *key){
int8_t *mods = key->modifiers;
int32_t unmodified = (!mods[MDFR_CONTROL_INDEX] && !mods[MDFR_ALT_INDEX]);
i32 unmodified = (!mods[MDFR_CONTROL_INDEX] && !mods[MDFR_ALT_INDEX]);
return(unmodified);
}
static uint32_t
static u32
to_writable_character(User_Input in, uint8_t *character){
uint32_t result = 0;
u32 result = 0;
if (in.key.character != 0){
u32_to_utf8_unchecked(in.key.character, character, &result);
}
return(result);
}
static uint32_t
static u32
to_writable_character(Key_Event_Data key, uint8_t *character){
uint32_t result = 0;
u32 result = 0;
if (key.character != 0){
u32_to_utf8_unchecked(key.character, character, &result);
}
return(result);
}
static bool32
static b32
backspace_utf8(String *str){
bool32 result = false;
b32 result = false;
uint8_t *s = (uint8_t*)str->str;
if (str->size > 0){
uint32_t i = str->size-1;
u32 i = str->size-1;
for (; i > 0; --i){
if (s[i] <= 0x7F || s[i] >= 0xC0){
break;
@ -322,8 +322,8 @@ backspace_utf8(String *str){
return(result);
}
static bool32
query_user_general(Application_Links *app, Query_Bar *bar, bool32 force_number){
static b32
query_user_general(Application_Links *app, Query_Bar *bar, b32 force_number){
// NOTE(allen|a3.4.4): It will not cause an *error* if we continue on after failing to.
// start a query bar, but it will be unusual behavior from the point of view of the
// user, if this command starts intercepting input even though no prompt is shown.
@ -333,7 +333,7 @@ query_user_general(Application_Links *app, Query_Bar *bar, bool32 force_number){
return(false);
}
bool32 success = true;
b32 success = true;
for (;;){
// NOTE(allen|a3.4.4): This call will block until the user does one of the input
@ -350,8 +350,8 @@ query_user_general(Application_Links *app, Query_Bar *bar, bool32 force_number){
}
uint8_t character[4];
uint32_t length = 0;
bool32 good_character = false;
u32 length = 0;
b32 good_character = false;
if (key_is_unmodified(&in.key)){
if (force_number){
if (in.key.character >= '0' && in.key.character <= '9'){
@ -386,18 +386,18 @@ query_user_general(Application_Links *app, Query_Bar *bar, bool32 force_number){
return(success);
}
static bool32
static b32
query_user_string(Application_Links *app, Query_Bar *bar){
return(query_user_general(app, bar, false));
}
static bool32
static b32
query_user_number(Application_Links *app, Query_Bar *bar){
return(query_user_general(app, bar, true));
}
static char
buffer_get_char(Application_Links *app, Buffer_Summary *buffer, int32_t pos){
buffer_get_char(Application_Links *app, Buffer_Summary *buffer, i32 pos){
char result = ' ';
*buffer = get_buffer(app, buffer->buffer_id, AccessAll);
if (pos < buffer->size){
@ -407,7 +407,7 @@ buffer_get_char(Application_Links *app, Buffer_Summary *buffer, int32_t pos){
}
static Buffer_Identifier
buffer_identifier(char *str, int32_t len){
buffer_identifier(char *str, i32 len){
Buffer_Identifier identifier;
identifier.name = str;
identifier.name_len = len;
@ -425,7 +425,7 @@ buffer_identifier(Buffer_ID id){
}
static Range
make_range(int32_t p1, int32_t p2){
make_range(i32 p1, i32 p2){
Range range;
if (p1 < p2){
range.min = p1;
@ -439,7 +439,7 @@ make_range(int32_t p1, int32_t p2){
}
static void
adjust_all_buffer_wrap_widths(Application_Links *app, int32_t wrap_width, int32_t min_base_width){
adjust_all_buffer_wrap_widths(Application_Links *app, i32 wrap_width, i32 min_base_width){
for (Buffer_Summary buffer = get_buffer_first(app, AccessAll);
buffer.exists;
get_buffer_next(app, &buffer, AccessAll)){
@ -459,10 +459,10 @@ get_rect(View_Summary *view){
rect.line1 = view->cursor.line;
if (rect.line0 > rect.line1){
Swap(int32_t, rect.line0, rect.line1);
Swap(i32, rect.line0, rect.line1);
}
if (rect.char0 > rect.char1){
Swap(int32_t, rect.char0, rect.char1);
Swap(i32, rect.char0, rect.char1);
}
return(rect);
@ -473,33 +473,33 @@ get_line_x_rect(View_Summary *view){
i32_Rect rect = {};
if (view->unwrapped_lines){
rect.x0 = (int32_t)view->mark.unwrapped_x;
rect.x1 = (int32_t)view->cursor.unwrapped_x;
rect.x0 = (i32)view->mark.unwrapped_x;
rect.x1 = (i32)view->cursor.unwrapped_x;
}
else{
rect.x0 = (int32_t)view->mark.wrapped_x;
rect.x1 = (int32_t)view->cursor.wrapped_x;
rect.x0 = (i32)view->mark.wrapped_x;
rect.x1 = (i32)view->cursor.wrapped_x;
}
rect.y0 = view->mark.line;
rect.y1 = view->cursor.line;
if (rect.y0 > rect.y1){
Swap(int32_t, rect.y0, rect.y1);
Swap(i32, rect.y0, rect.y1);
}
if (rect.x0 > rect.x1){
Swap(int32_t, rect.x0, rect.x1);
Swap(i32, rect.x0, rect.x1);
}
return(rect);
}
static View_Summary
get_first_view_with_buffer(Application_Links *app, int32_t buffer_id){
get_first_view_with_buffer(Application_Links *app, i32 buffer_id){
View_Summary result = {};
View_Summary test = {};
if (buffer_id != 0){
uint32_t access = AccessAll;
u32 access = AccessAll;
for(test = get_view_first(app, access);
test.exists;
get_view_next(app, &test, access)){
@ -516,10 +516,10 @@ get_first_view_with_buffer(Application_Links *app, int32_t buffer_id){
return(result);
}
static bool32
static b32
open_file(Application_Links *app, Buffer_Summary *buffer_out,
char *filename, int32_t filename_len, bool32 background, bool32 never_new){
bool32 result = false;
char *filename, i32 filename_len, b32 background, b32 never_new){
b32 result = false;
Buffer_Summary buffer = get_buffer_by_name(app, filename, filename_len, AccessProtected|AccessHidden);
if (buffer.exists){
@ -580,10 +580,10 @@ buffer_identifier_to_buffer_summary(Application_Links *app, Buffer_Identifier id
return(buffer);
}
static bool32
static b32
view_open_file(Application_Links *app, View_Summary *view,
char *filename, int32_t filename_len, bool32 never_new){
bool32 result = false;
char *filename, i32 filename_len, b32 never_new){
b32 result = false;
if (view != 0){
Buffer_Summary buffer = {};
@ -597,7 +597,7 @@ view_open_file(Application_Links *app, View_Summary *view,
}
static void
get_view_prev(Application_Links *app, View_Summary *view, uint32_t access){
get_view_prev(Application_Links *app, View_Summary *view, u32 access){
if (view->exists){
View_ID original_id = view->view_id;
View_ID check_id = original_id;
@ -635,7 +635,7 @@ kill_buffer(Application_Links *app, Buffer_Identifier identifier, View_ID gui_vi
}
static View_Summary
get_view_last(Application_Links *app, uint32_t access){
get_view_last(Application_Links *app, u32 access){
View_Summary view = {};
view.exists = true;
get_view_prev(app, &view, access);
@ -646,7 +646,7 @@ get_view_last(Application_Links *app, uint32_t access){
}
static void
get_next_view_looped_all_panels(Application_Links *app, View_Summary *view, uint32_t access){
get_next_view_looped_all_panels(Application_Links *app, View_Summary *view, u32 access){
get_view_next(app, view, access);
if (!view->exists){
*view = get_view_first(app, access);
@ -654,7 +654,7 @@ get_next_view_looped_all_panels(Application_Links *app, View_Summary *view, uint
}
static void
get_prev_view_looped_all_panels(Application_Links *app, View_Summary *view, uint32_t access){
get_prev_view_looped_all_panels(Application_Links *app, View_Summary *view, u32 access){
get_view_prev(app, view, access);
if (!view->exists){
*view = get_view_last(app, access);
@ -672,9 +672,9 @@ refresh_view(Application_Links *app, View_Summary *view){
}
// TODO(allen): Setup buffer seeking to do character_pos and get View_Summary out of this parameter list.
static int32_t
character_pos_to_pos(Application_Links *app, View_Summary *view, Buffer_Summary *buffer, int32_t character_pos){
int32_t result = 0;
static i32
character_pos_to_pos(Application_Links *app, View_Summary *view, Buffer_Summary *buffer, i32 character_pos){
i32 result = 0;
Full_Cursor cursor = {};
if (view_compute_cursor(app, view, seek_character_pos(character_pos), &cursor)){
result = cursor.pos;
@ -705,19 +705,19 @@ get_view_range(View_Summary *view){
return(make_range(view->cursor.pos, view->mark.pos));
}
static bool32
read_line(Application_Links *app, Partition *part, Buffer_Summary *buffer, int32_t line, String *str,
static b32
read_line(Application_Links *app, Partition *part, Buffer_Summary *buffer, i32 line, String *str,
Partial_Cursor *start_out, Partial_Cursor *one_past_last_out){
Partial_Cursor begin = {};
Partial_Cursor end = {};
bool32 success = false;
b32 success = false;
if (buffer_compute_cursor(app, buffer, seek_line_char(line, 1), &begin)){
if (buffer_compute_cursor(app, buffer, seek_line_char(line, -1), &end)){
if (begin.line == line){
if (0 <= begin.pos && begin.pos <= end.pos && end.pos <= buffer->size){
int32_t size = (end.pos - begin.pos);
int32_t alloc_size = size + 1;
i32 size = (end.pos - begin.pos);
i32 alloc_size = size + 1;
char *memory = push_array(part, char, alloc_size);
if (memory != 0){
*str = make_string(memory, 0, alloc_size);
@ -737,17 +737,17 @@ read_line(Application_Links *app, Partition *part, Buffer_Summary *buffer, int32
return(success);
}
static bool32
read_line(Application_Links *app, Partition *part, Buffer_Summary *buffer, int32_t line, String *str){
static b32
read_line(Application_Links *app, Partition *part, Buffer_Summary *buffer, i32 line, String *str){
Partial_Cursor ignore = {};
return(read_line(app, part, buffer, line, str, &ignore, &ignore));
}
static String
scratch_read(Application_Links *app, Partition *scratch, Buffer_ID buffer, int32_t start, int32_t end){
scratch_read(Application_Links *app, Partition *scratch, Buffer_ID buffer, i32 start, i32 end){
String result = {};
if (start <= end){
int32_t len = end - start;
i32 len = end - start;
result = string_push(scratch, len);
if (buffer_read_range(app, buffer, start, end, result.str)){
result.size = len;
@ -762,9 +762,9 @@ scratch_read(Application_Links *app, Partition *scratch, Buffer_ID buffer, Cpp_T
return(result);
}
static int32_t
buffer_get_line_start(Application_Links *app, Buffer_Summary *buffer, int32_t line){
int32_t result = buffer->size;
static i32
buffer_get_line_start(Application_Links *app, Buffer_Summary *buffer, i32 line){
i32 result = buffer->size;
if (line <= buffer->line_count){
Partial_Cursor partial_cursor = {};
buffer_compute_cursor(app, buffer, seek_line_char(line, 1), &partial_cursor);
@ -773,9 +773,9 @@ buffer_get_line_start(Application_Links *app, Buffer_Summary *buffer, int32_t li
return(result);
}
static int32_t
buffer_get_line_end(Application_Links *app, Buffer_Summary *buffer, int32_t line){
int32_t result = buffer->size;
static i32
buffer_get_line_end(Application_Links *app, Buffer_Summary *buffer, i32 line){
i32 result = buffer->size;
if (line <= buffer->line_count){
Partial_Cursor partial_cursor = {};
buffer_compute_cursor(app, buffer, seek_line_char(line, -1), &partial_cursor);
@ -784,16 +784,16 @@ buffer_get_line_end(Application_Links *app, Buffer_Summary *buffer, int32_t line
return(result);
}
static int32_t
buffer_get_line_number(Application_Links *app, Buffer_Summary *buffer, int32_t pos){
static i32
buffer_get_line_number(Application_Links *app, Buffer_Summary *buffer, i32 pos){
Partial_Cursor partial_cursor = {};
buffer_compute_cursor(app, buffer, seek_pos(pos), &partial_cursor);
return(partial_cursor.line);
}
static Cpp_Token*
get_first_token_at_line(Application_Links *app, Buffer_Summary *buffer, Cpp_Token_Array tokens, int32_t line, int32_t *line_start_out = 0){
int32_t line_start = buffer_get_line_start(app, buffer, line);
get_first_token_at_line(Application_Links *app, Buffer_Summary *buffer, Cpp_Token_Array tokens, i32 line, i32 *line_start_out = 0){
i32 line_start = buffer_get_line_start(app, buffer, line);
Cpp_Get_Token_Result get_token = cpp_get_token(tokens, line_start);
if (get_token.in_whitespace_after_token){
@ -814,10 +814,10 @@ get_first_token_at_line(Application_Links *app, Buffer_Summary *buffer, Cpp_Toke
////////////////////////////////
static bool32
static b32
init_stream_chunk(Stream_Chunk *chunk, Application_Links *app, Buffer_Summary *buffer,
int32_t pos, char *data, uint32_t size){
bool32 result = false;
i32 pos, char *data, u32 size){
b32 result = false;
refresh_buffer(app, buffer);
if (0 <= pos && pos < buffer->size && size > 0){
@ -849,11 +849,11 @@ init_stream_chunk(Stream_Chunk *chunk, Application_Links *app, Buffer_Summary *b
return(result);
}
static bool32
static b32
forward_stream_chunk(Stream_Chunk *chunk){
Application_Links *app = chunk->app;
Buffer_Summary *buffer = chunk->buffer;
bool32 result = 0;
b32 result = 0;
refresh_buffer(app, buffer);
if (chunk->end < buffer->size){
@ -885,11 +885,11 @@ forward_stream_chunk(Stream_Chunk *chunk){
return(result);
}
static bool32
static b32
backward_stream_chunk(Stream_Chunk *chunk){
Application_Links *app = chunk->app;
Buffer_Summary *buffer = chunk->buffer;
bool32 result = 0;
b32 result = 0;
refresh_buffer(app, buffer);
if (chunk->start > 0){
@ -923,14 +923,14 @@ backward_stream_chunk(Stream_Chunk *chunk){
////////////////////////////////
static bool32
static b32
init_stream_tokens(Stream_Tokens_DEP *stream, Application_Links *app, Buffer_Summary *buffer,
int32_t pos, Cpp_Token *data, int32_t count){
bool32 result = false;
i32 pos, Cpp_Token *data, i32 count){
b32 result = false;
refresh_buffer(app, buffer);
int32_t token_count = buffer_token_count(app, buffer);
i32 token_count = buffer_token_count(app, buffer);
if (buffer->tokens_are_ready && pos >= 0 && pos < token_count && count > 0){
stream->app = app;
stream->buffer = buffer;
@ -971,11 +971,11 @@ end_temp_stream_token(Stream_Tokens_DEP *stream, Stream_Tokens_DEP temp){
}
}
static bool32
static b32
forward_stream_tokens(Stream_Tokens_DEP *stream){
Application_Links *app = stream->app;
Buffer_Summary *buffer = stream->buffer;
bool32 result = false;
b32 result = false;
refresh_buffer(app, buffer);
if (stream->end < stream->token_count){
@ -996,11 +996,11 @@ forward_stream_tokens(Stream_Tokens_DEP *stream){
return(result);
}
static bool32
static b32
backward_stream_tokens(Stream_Tokens_DEP *stream){
Application_Links *app = stream->app;
Buffer_Summary *buffer = stream->buffer;
bool32 result = false;
b32 result = false;
refresh_buffer(app, buffer);
if (stream->start > 0){
@ -1048,7 +1048,7 @@ make_token_iterator(Token_Range range, Cpp_Token *token){
}
static Token_Iterator
make_token_iterator(Token_Range range, int32_t index){
make_token_iterator(Token_Range range, i32 index){
return(make_token_iterator(range, range.first + index));
}
@ -1070,12 +1070,12 @@ token_iterator_current(Token_Iterator *iterator){
return(token_range_check(iterator->range, iterator->token));
}
static int32_t
static i32
token_iterator_current_index(Token_Iterator *iterator){
int32_t index = -1;
i32 index = -1;
Cpp_Token *token = token_iterator_current(iterator);
if (token != 0 && iterator->range.first <= token && token <= iterator->range.one_past_last){
index = (int32_t)(token - iterator->range.first);
index = (i32)(token - iterator->range.first);
}
return(index);
}
@ -1123,10 +1123,10 @@ token_iterator_goto_prev_raw(Token_Iterator *iterator){
}
static String
token_get_lexeme(Application_Links *app, Buffer_Summary *buffer, Cpp_Token *token, char *out_buffer, int32_t out_buffer_size){
token_get_lexeme(Application_Links *app, Buffer_Summary *buffer, Cpp_Token *token, char *out_buffer, i32 out_buffer_size){
String result = {};
if (out_buffer_size > 1){
int32_t read_size = token->size;
i32 read_size = token->size;
if (read_size >= out_buffer_size){
read_size = out_buffer_size - 1;
}
@ -1155,7 +1155,7 @@ token_get_lexeme(Application_Links *app, Partition *part, Buffer_Summary *buffer
////////////////////////////////
static String
get_query_string(Application_Links *app, char *query_str, char *string_space, int32_t space_size){
get_query_string(Application_Links *app, char *query_str, char *string_space, i32 space_size){
Query_Bar bar;
bar.prompt = make_string_slowly(query_str);
bar.string = make_string_cap(string_space, 0, space_size);
@ -1171,7 +1171,7 @@ get_string_in_view_range(Application_Links *app, Partition *arena, View_Summary
Buffer_Summary buffer = get_buffer(app, view->buffer_id, AccessProtected);
if (!buffer.exists) return(str);
Range range = get_view_range(view);
int32_t query_length = range.max - range.min;
i32 query_length = range.max - range.min;
if (query_length != 0){
char *query_space = push_array(arena, char, query_length);
if (buffer_read_range(app, &buffer, range.min, range.max, query_space)){
@ -1182,12 +1182,12 @@ get_string_in_view_range(Application_Links *app, Partition *arena, View_Summary
}
static String
get_token_or_word_under_pos(Application_Links *app, Buffer_Summary *buffer, int32_t pos, char *space, int32_t capacity){
get_token_or_word_under_pos(Application_Links *app, Buffer_Summary *buffer, i32 pos, char *space, i32 capacity){
String result = {};
Cpp_Get_Token_Result get_result = {};
bool32 success = buffer_get_token_index(app, buffer, pos, &get_result);
b32 success = buffer_get_token_index(app, buffer, pos, &get_result);
if (success && !get_result.in_whitespace_after_token){
int32_t size = get_result.token_one_past_last - get_result.token_start;
i32 size = get_result.token_one_past_last - get_result.token_start;
if (size > 0 && size <= capacity){
success = buffer_read_range(app, buffer, get_result.token_start, get_result.token_one_past_last, space);
if (success){
@ -1333,9 +1333,9 @@ append_int_to_str_left_pad(String *str, i32 x, i32 minimum_width, char pad_char)
append_int_to_str(str, x);
}
static bool32
static b32
lexer_keywords_default_init(Partition *arena, Cpp_Keyword_Table *kw_out, Cpp_Keyword_Table *pp_out){
bool32 success = false;
b32 success = false;
umem_4tech kw_size = cpp_get_table_memory_size_default(CPP_TABLE_KEYWORDS);
umem_4tech pp_size = cpp_get_table_memory_size_default(CPP_TABLE_PREPROCESSOR_DIRECTIVES);
void *kw_mem = push_array(arena, char, (i32_4tech)kw_size);
@ -1353,7 +1353,7 @@ lexer_keywords_default_init(Partition *arena, Cpp_Keyword_Table *kw_out, Cpp_Key
static String
get_hot_directory(Application_Links *app, Partition *part){
Temp_Memory temp = begin_temp_memory(part);
int32_t space_cap = part_remaining(part);
i32 space_cap = part_remaining(part);
char *space = push_array(part, char, space_cap);
String hot_dir = make_string_cap(space, 0, space_cap);
hot_dir.size = directory_get_hot(app, hot_dir.str, hot_dir.memory_size);
@ -1365,7 +1365,7 @@ get_hot_directory(Application_Links *app, Partition *part){
static String
get_hot_directory(Application_Links *app, Arena *arena){
int32_t space_required = directory_get_hot(app, 0, 0);
i32 space_required = directory_get_hot(app, 0, 0);
char *space = push_array(arena, char, space_required);
String hot_dir = make_string_cap(space, 0, space_required);
hot_dir.size = directory_get_hot(app, hot_dir.str, hot_dir.memory_size);
@ -1379,7 +1379,7 @@ dump_file_handle(Partition *arena, FILE *file){
String str = {};
if (file != 0){
fseek(file, 0, SEEK_END);
int32_t size = ftell(file);
i32 size = ftell(file);
char *mem = push_array(arena, char, size + 1);
push_align(arena, 8);
if (mem != 0){
@ -1396,7 +1396,7 @@ static File_Handle_Path
open_file_search_up_path(Partition *arena, String path, String file_name){
File_Handle_Path result = {};
int32_t cap = path.size + file_name.size + 2;
i32 cap = path.size + file_name.size + 2;
char *space = push_array(arena, char, cap);
push_align(arena, 8);
String name_str = make_string_cap(space, 0, cap);
@ -1406,7 +1406,7 @@ open_file_search_up_path(Partition *arena, String path, String file_name){
}
for (;;){
int32_t base_size = name_str.size;
i32 base_size = name_str.size;
append(&name_str, file_name);
terminate_with_null(&name_str);
result.file = fopen(name_str.str, "rb");
@ -1430,7 +1430,7 @@ open_file_try_current_path_then_binary_path(Application_Links *app, char *file_n
FILE *file = fopen(file_name, "rb");
if (file == 0){
char space[256];
int32_t size = get_4ed_path(app, space, sizeof(space));
i32 size = get_4ed_path(app, space, sizeof(space));
String str = make_string_cap(space, size, sizeof(space));
append(&str, "/");
append(&str, file_name);
@ -1496,14 +1496,14 @@ dump_file_search_up_path(Partition *arena, String path, String file_name){
}
static void
sort_pairs_by_key__quick(Sort_Pair_i32 *pairs, int32_t first, int32_t one_past_last){
int32_t dif = one_past_last - first;
sort_pairs_by_key__quick(Sort_Pair_i32 *pairs, i32 first, i32 one_past_last){
i32 dif = one_past_last - first;
if (dif >= 2){
int32_t pivot = one_past_last - 1;
i32 pivot = one_past_last - 1;
Sort_Pair_i32 pivot_pair = pairs[pivot];
int32_t j = first;
bool32 interleave = false;
for (int32_t i = first; i < pivot; i += 1){
i32 j = first;
b32 interleave = false;
for (i32 i = first; i < pivot; i += 1){
Sort_Pair_i32 pair = pairs[i];
if (pair.key < pivot_pair.key){
pairs[i] = pairs[j];
@ -1527,22 +1527,22 @@ sort_pairs_by_key__quick(Sort_Pair_i32 *pairs, int32_t first, int32_t one_past_l
}
static void
sort_pairs_by_key(Sort_Pair_i32 *pairs, int32_t count){
sort_pairs_by_key(Sort_Pair_i32 *pairs, i32 count){
sort_pairs_by_key__quick(pairs, 0, count);
}
static Range_Array
get_ranges_of_duplicate_keys(Partition *arena, int32_t *keys, int32_t stride, int32_t count){
get_ranges_of_duplicate_keys(Partition *arena, i32 *keys, i32 stride, i32 count){
Range_Array result = {};
result.ranges = push_array(arena, Range, 0);
uint8_t *ptr = (uint8_t*)keys;
int32_t start_i = 0;
for (int32_t i = 1; i <= count; i += 1){
bool32 is_end = false;
i32 start_i = 0;
for (i32 i = 1; i <= count; i += 1){
b32 is_end = false;
if (i == count){
is_end = true;
}
else if (*(int32_t*)(ptr + i*stride) != *(int32_t*)(ptr + start_i*stride)){
else if (*(i32*)(ptr + i*stride) != *(i32*)(ptr + start_i*stride)){
is_end = true;
}
if (is_end){
@ -1552,7 +1552,7 @@ get_ranges_of_duplicate_keys(Partition *arena, int32_t *keys, int32_t stride, in
start_i = i;
}
}
result.count = (int32_t)(push_array(arena, Range, 0) - result.ranges);
result.count = (i32)(push_array(arena, Range, 0) - result.ranges);
return(result);
}
@ -1575,7 +1575,7 @@ no_mark_snap_to_cursor_if_shift(Application_Links *app, View_ID view_id){
}
}
static bool32
static b32
view_has_highlighted_range(Application_Links *app, View_ID view_id){
if (fcoder_mode == FCoderMode_NotepadLike){
View_Summary view = get_view(app, view_id, AccessAll);
@ -1584,7 +1584,7 @@ view_has_highlighted_range(Application_Links *app, View_ID view_id){
return(false);
}
static bool32
static b32
if_view_has_highlighted_range_delete_range(Application_Links *app, View_ID view_id){
if (view_has_highlighted_range(app, view_id)){
View_Summary view = get_view(app, view_id, AccessAll);
@ -1608,13 +1608,13 @@ begin_notepad_mode(Application_Links *app){
////////////////////////////////
static bool32
static b32
view_set_split_proportion(Application_Links *app, View_Summary *view, float t){
return(view_set_split(app, view, ViewSplitKind_Ratio, t));
}
static bool32
view_set_split_pixel_size(Application_Links *app, View_Summary *view, int32_t t){
static b32
view_set_split_pixel_size(Application_Links *app, View_Summary *view, i32 t){
return(view_set_split(app, view, ViewSplitKind_FixedPixels, (float)t));
}
@ -1633,7 +1633,7 @@ get_single_record(Application_Links *app, Buffer_ID buffer_id, History_Record_In
////////////////////////////////
static void
view_buffer_set(Application_Links *app, Buffer_ID *buffers, int32_t count){
view_buffer_set(Application_Links *app, Buffer_ID *buffers, i32 count){
// TODO(allen): do(implement view_buffer_set)
}

View File

@ -14,8 +14,8 @@
struct Bind_Helper{
Binding_Unit *cursor, *start, *end;
Binding_Unit *header, *group;
int32_t write_total;
int32_t error;
i32 write_total;
i32 error;
};
#define BH_ERR_NONE 0
@ -25,7 +25,7 @@ struct Bind_Helper{
struct Bind_Buffer{
void *data;
int32_t size;
i32 size;
};
////////////////////////////////
@ -50,11 +50,11 @@ struct Bind_Buffer{
#define IntAsPtr(a) (void*)(((uint8_t*)0) + a)
#if !defined(max_f32)
static float
static f32
max_f32_proc(void){
union{
uint32_t x;
float f;
u32 x;
f32 f;
} c;
c.x = 0x7f800000;
return(c.f);
@ -94,10 +94,10 @@ struct File_Name_Path_Data{
////////////////////////////////
struct Buffer_Rect{
int32_t char0;
int32_t line0;
int32_t char1;
int32_t line1;
i32 char0;
i32 line0;
i32 char1;
i32 line1;
};
////////////////////////////////
@ -107,12 +107,12 @@ struct Stream_Chunk{
Buffer_Summary *buffer;
char *base_data;
int32_t start;
int32_t end;
int32_t min_start;
int32_t max_end;
bool32 add_null;
uint32_t data_size;
i32 start;
i32 end;
i32 min_start;
i32 max_end;
b32 add_null;
u32 data_size;
char *data;
};
@ -126,10 +126,10 @@ struct Stream_Tokens_DEP{
Cpp_Token *base_tokens;
Cpp_Token *tokens;
int32_t start;
int32_t end;
int32_t count;
int32_t token_count;
i32 start;
i32 end;
i32 count;
i32 token_count;
};
//typedef Stream_Tokens_DEP Stream_Tokens;
@ -147,8 +147,8 @@ struct Token_Iterator{
////////////////////////////////
struct Sort_Pair_i32{
int32_t index;
int32_t key;
i32 index;
i32 key;
};
////////////////////////////////
@ -157,7 +157,7 @@ struct Buffer_Insertion
{
Application_Links *app;
Buffer_ID buffer;
int32_t at;
i32 at;
};
#endif

View File

@ -54,7 +54,7 @@ insertc(Buffer_Insertion *insertion, char C){
insertion->at += 1;
}
static bool32
static b32
insert_line_from_buffer(Buffer_Insertion *insertion, Buffer_ID buffer_id, int32_t line, int32_t truncate_at){
Partition *part = &global_part;
Temp_Memory temp = begin_temp_memory(part);
@ -64,7 +64,7 @@ insert_line_from_buffer(Buffer_Insertion *insertion, Buffer_ID buffer_id, int32_
Buffer_Summary buffer = get_buffer(insertion->app, buffer_id, AccessAll);
bool32 success = false;
b32 success = false;
if (buffer_compute_cursor(insertion->app, &buffer, seek_line_char(line, 1), &begin)){
if (buffer_compute_cursor(insertion->app, &buffer, seek_line_char(line, -1), &end)){
if (begin.line == line){
@ -92,7 +92,7 @@ insert_line_from_buffer(Buffer_Insertion *insertion, Buffer_ID buffer_id, int32_
return(success);
}
static bool32
static b32
insert_line_from_buffer(Buffer_Insertion *insertion, Buffer_ID buffer_id, int32_t line){
return(insert_line_from_buffer(insertion, buffer_id, line, 0));
}

View File

@ -48,36 +48,36 @@ CUSTOM_DOC("If the cursor is found to be on a jump location, parses the jump loc
CUSTOM_COMMAND_SIG(goto_next_jump_direct)
CUSTOM_DOC("If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.")
{
bool32 skip_repeats = true;
bool32 skip_sub_errors = true;
int32_t dir = 1;
b32 skip_repeats = true;
b32 skip_sub_errors = true;
i32 dir = 1;
seek_jump(app, &global_part, skip_repeats, skip_sub_errors, dir);
}
CUSTOM_COMMAND_SIG(goto_prev_jump_direct)
CUSTOM_DOC("If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.")
{
bool32 skip_repeats = true;
bool32 skip_sub_errors = true;
int32_t dir = -1;
b32 skip_repeats = true;
b32 skip_sub_errors = true;
i32 dir = -1;
seek_jump(app, &global_part, skip_repeats, skip_sub_errors, dir);
}
CUSTOM_COMMAND_SIG(goto_next_jump_no_skips_direct)
CUSTOM_DOC("If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.")
{
bool32 skip_repeats = false;
bool32 skip_sub_errors = true;
int32_t dir = 1;
b32 skip_repeats = false;
b32 skip_sub_errors = true;
i32 dir = 1;
seek_jump(app, &global_part, skip_repeats, skip_sub_errors, dir);
}
CUSTOM_COMMAND_SIG(goto_prev_jump_no_skips_direct)
CUSTOM_DOC("If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.")
{
bool32 skip_repeats = false;
bool32 skip_sub_errors = true;
int32_t dir = -1;
b32 skip_repeats = false;
b32 skip_sub_errors = true;
i32 dir = -1;
seek_jump(app, &global_part, skip_repeats, skip_sub_errors, dir);
}

View File

@ -7,7 +7,7 @@
static void
activate_jump(Application_Links *app, Partition *scratch, Heap *heap,
View_Summary *view, struct Lister_State *state,
String text_field, void *user_data, bool32 activated_by_mouse){
String text_field, void *user_data, b32 activated_by_mouse){
Lister_Activation_Code result_code = ListerActivation_Finished;
int32_t list_index = (int32_t)PtrAsInt(user_data);
Jump_Lister_Parameters *params = (Jump_Lister_Parameters*)state->lister.data.user_data;

View File

@ -10,16 +10,16 @@ static Marker_List_Node *marker_list_last = 0;
////////////////////////////////
static uint32_t
binary_search(uint32_t *array, int32_t stride, int32_t count, uint32_t x){
static u32
binary_search(u32 *array, i32 stride, i32 count, u32 x){
uint8_t *raw = (uint8_t*)array;
uint32_t i = 0;
uint32_t first = 0;
uint32_t last = count;
u32 i = 0;
u32 first = 0;
u32 last = count;
if (first < last){
for (;;){
i = (first + last)/2;
uint32_t k = *(uint32_t*)(raw + stride*i);
u32 k = *(u32*)(raw + stride*i);
if (k < x){
first = i;
}
@ -43,12 +43,12 @@ parse_buffer_to_jump_array(Application_Links *app, Partition *arena, Buffer_Summ
Sticky_Jump_Array result = {};
result.jumps = push_array(arena, Sticky_Jump, 0);
for (int32_t line = 1;; line += 1){
bool32 output_jump = false;
int32_t colon_index = 0;
bool32 is_sub_error = false;
for (i32 line = 1;; line += 1){
b32 output_jump = false;
i32 colon_index = 0;
b32 is_sub_error = false;
Buffer_ID out_buffer_id = 0;
int32_t out_pos = 0;
i32 out_pos = 0;
Temp_Memory temp = begin_temp_memory(arena);
String line_str = {};
@ -86,18 +86,18 @@ parse_buffer_to_jump_array(Application_Links *app, Partition *arena, Buffer_Summ
}
}
result.count = (int32_t)(push_array(arena, Sticky_Jump, 0) - result.jumps);
result.count = (i32)(push_array(arena, Sticky_Jump, 0) - result.jumps);
return(result);
}
static char sticky_jump_marker_handle_var[] = "DEFAULT.sticky_jump_marker_handle";
static int32_t sticky_jump_marker_handle_loc;
static i32 sticky_jump_marker_handle_loc;
static void
init_marker_list(Application_Links *app, Partition *scratch, Heap *heap, Buffer_ID buffer_id,
Marker_List *list){
Buffer_Summary buffer = get_buffer(app, buffer_id, AccessAll);
bool32 is_compilation_buffer = match(make_string(buffer.buffer_name, buffer.buffer_name_len), "*compilation*");
b32 is_compilation_buffer = match(make_string(buffer.buffer_name, buffer.buffer_name_len), "*compilation*");
Temp_Memory temp = begin_temp_memory(scratch);
Sticky_Jump_Array jumps = parse_buffer_to_jump_array(app, scratch, buffer);
@ -105,7 +105,7 @@ init_marker_list(Application_Links *app, Partition *scratch, Heap *heap, Buffer_
&jumps.jumps->jump_buffer_id, sizeof(*jumps.jumps),
jumps.count);
Sort_Pair_i32 *range_index_buffer_id_pairs = push_array(scratch, Sort_Pair_i32, buffer_ranges.count);
for (int32_t i = 0; i < buffer_ranges.count; i += 1){
for (i32 i = 0; i < buffer_ranges.count; i += 1){
range_index_buffer_id_pairs[i].index = i;
range_index_buffer_id_pairs[i].key = jumps.jumps[buffer_ranges.ranges[i].first].jump_buffer_id;
}
@ -120,22 +120,22 @@ init_marker_list(Application_Links *app, Partition *scratch, Heap *heap, Buffer_
Managed_Scope scope_array[2] = {};
scope_array[0] = buffer_get_managed_scope(app, buffer_id);
for (int32_t i = 0; i < scoped_buffer_ranges.count; i += 1){
for (i32 i = 0; i < scoped_buffer_ranges.count; i += 1){
Range buffer_range_indices = scoped_buffer_ranges.ranges[i];
Temp_Memory marker_temp = begin_temp_memory(scratch);
Marker *markers = push_array(scratch, Marker, 0);
uint32_t total_jump_count = 0;
u32 total_jump_count = 0;
Buffer_ID target_buffer_id = 0;
for (int32_t j = buffer_range_indices.first;
for (i32 j = buffer_range_indices.first;
j < buffer_range_indices.one_past_last;
j += 1){
int32_t range_index = range_index_buffer_id_pairs[j].index;
i32 range_index = range_index_buffer_id_pairs[j].index;
Range range = buffer_ranges.ranges[range_index];
if (target_buffer_id == 0){
target_buffer_id = jumps.jumps[range.first].jump_buffer_id;
}
for (int32_t k = range.first; k < range.one_past_last; k += 1){
for (i32 k = range.first; k < range.one_past_last; k += 1){
Marker *new_marker = push_array(scratch, Marker, 1);
new_marker->pos = jumps.jumps[k].jump_pos;
new_marker->lean_right = false;
@ -190,7 +190,7 @@ delete_marker_list(Marker_List *list){
}
static Marker_List*
make_new_marker_list_for_buffer(Heap *heap, int32_t buffer_id){
make_new_marker_list_for_buffer(Heap *heap, i32 buffer_id){
Marker_List_Node *new_node = heap_array(heap, Marker_List_Node, 1);
zdll_push_back(marker_list_first, marker_list_last, new_node);
new_node->buffer_id = buffer_id;
@ -233,8 +233,8 @@ get_or_make_list_for_buffer(Application_Links *app, Partition *scratch, Heap *he
return(result);
}
static bool32
get_stored_jump_from_list(Application_Links *app, Marker_List *list, int32_t index,
static b32
get_stored_jump_from_list(Application_Links *app, Marker_List *list, i32 index,
Sticky_Jump_Stored *stored_out){
Sticky_Jump_Stored stored = {};
if (list != 0){
@ -262,9 +262,9 @@ get_all_stored_jumps_from_list(Application_Links *app, Partition *arena, Marker_
return(stored);
}
static bool32
get_jump_from_list(Application_Links *app, Marker_List *list, int32_t index, ID_Pos_Jump_Location *location){
bool32 result = false;
static b32
get_jump_from_list(Application_Links *app, Marker_List *list, i32 index, ID_Pos_Jump_Location *location){
b32 result = false;
Sticky_Jump_Stored stored = {};
if (get_stored_jump_from_list(app, list, index, &stored)){
Buffer_ID target_buffer_id = stored.jump_buffer_id;
@ -287,9 +287,9 @@ get_jump_from_list(Application_Links *app, Marker_List *list, int32_t index, ID_
return(result);
}
static int32_t
get_line_from_list(Application_Links *app, Marker_List *list, int32_t index){
int32_t result = 0;
static i32
get_line_from_list(Application_Links *app, Marker_List *list, i32 index){
i32 result = 0;
if (list != 0){
Sticky_Jump_Stored stored = {};
if (get_stored_jump_from_list(app, list, index, &stored)){
@ -299,9 +299,9 @@ get_line_from_list(Application_Links *app, Marker_List *list, int32_t index){
return(result);
}
static bool32
get_is_sub_error_from_list(Application_Links *app, Marker_List *list, int32_t index){
bool32 result = false;
static b32
get_is_sub_error_from_list(Application_Links *app, Marker_List *list, i32 index){
b32 result = false;
if (list != 0){
Sticky_Jump_Stored stored = {};
if (get_stored_jump_from_list(app, list, index, &stored)){
@ -311,28 +311,28 @@ get_is_sub_error_from_list(Application_Links *app, Marker_List *list, int32_t in
return(result);
}
static int32_t
get_index_nearest_from_list(Application_Links *app, Partition *scratch, Marker_List *list, int32_t line){
int32_t result = -1;
static i32
get_index_nearest_from_list(Application_Links *app, Partition *scratch, Marker_List *list, i32 line){
i32 result = -1;
if (list != 0){
Temp_Memory temp = begin_temp_memory(scratch);
Sticky_Jump_Stored *stored = get_all_stored_jumps_from_list(app, scratch, list);
if (stored != 0){
result = binary_search((uint32_t*)&stored->list_line, sizeof(*stored), list->jump_count, line);
result = binary_search((u32*)&stored->list_line, sizeof(*stored), list->jump_count, line);
}
end_temp_memory(temp);
}
return(result);
}
static int32_t
get_index_exact_from_list(Application_Links *app, Partition *scratch, Marker_List *list, int32_t line){
int32_t result = -1;
static i32
get_index_exact_from_list(Application_Links *app, Partition *scratch, Marker_List *list, i32 line){
i32 result = -1;
if (list != 0){
Temp_Memory temp = begin_temp_memory(scratch);
Sticky_Jump_Stored *stored = get_all_stored_jumps_from_list(app, scratch, list);
if (stored != 0){
int32_t index = binary_search((uint32_t*)&stored->list_line, sizeof(*stored), list->jump_count, line);
i32 index = binary_search((u32*)&stored->list_line, sizeof(*stored), list->jump_count, line);
if (stored[index].list_line == line){
result = index;
}
@ -352,7 +352,7 @@ CUSTOM_DOC("If the cursor is found to be on a jump location, parses the jump loc
View_Summary view = get_active_view(app, AccessProtected);
Marker_List *list = get_or_make_list_for_buffer(app, part, heap, view.buffer_id);
int32_t list_index = get_index_exact_from_list(app, part, list, view.cursor.line);
i32 list_index = get_index_exact_from_list(app, part, list, view.cursor.line);
if (list_index >= 0){
ID_Pos_Jump_Location location = {};
@ -379,7 +379,7 @@ CUSTOM_DOC("If the cursor is found to be on a jump location, parses the jump loc
Temp_Memory temp = begin_temp_memory(part);
View_Summary view = get_active_view(app, AccessProtected);
Marker_List *list = get_or_make_list_for_buffer(app, part, heap, view.buffer_id);
int32_t list_index = get_index_exact_from_list(app, part, list, view.cursor.line);
i32 list_index = get_index_exact_from_list(app, part, list, view.cursor.line);
if (list_index >= 0){
ID_Pos_Jump_Location location = {};
@ -412,9 +412,9 @@ goto_jump_in_order(Application_Links *app, Marker_List *list, View_Summary *jump
}
}
static bool32
static b32
jump_is_repeat(ID_Line_Column_Jump_Location prev, ID_Pos_Jump_Location location){
bool32 skip = false;
b32 skip = false;
// NOTE(allen): This looks wrong, but it is correct. The prev_location is a line column type
// because that is how the old-style direct jumps worked, and they are still supported. All code paths
// in the sticky jump system treat line as the field for pos and ignore column. When the time has
@ -426,14 +426,14 @@ jump_is_repeat(ID_Line_Column_Jump_Location prev, ID_Pos_Jump_Location location)
}
static void
goto_next_filtered_jump(Application_Links *app, Marker_List *list, View_Summary *jump_view, int32_t list_index, int32_t direction, bool32 skip_repeats, bool32 skip_sub_errors){
goto_next_filtered_jump(Application_Links *app, Marker_List *list, View_Summary *jump_view, i32 list_index, i32 direction, b32 skip_repeats, b32 skip_sub_errors){
Assert(direction == 1 || direction == -1);
if (list != 0){
for (;list_index >= 0 && list_index < list->jump_count;){
ID_Pos_Jump_Location location = {};
if (get_jump_from_list(app, list, list_index, &location)){
bool32 skip_this = false;
b32 skip_this = false;
if (skip_repeats && jump_is_repeat(prev_location, location)){
skip_this = true;
}
@ -443,7 +443,7 @@ goto_next_filtered_jump(Application_Links *app, Marker_List *list, View_Summary
if (!skip_this){
goto_jump_in_order(app, list, jump_view, location);
int32_t updated_line = get_line_from_list(app, list, list_index);
i32 updated_line = get_line_from_list(app, list, list_index);
view_set_cursor(app, jump_view, seek_line_char(updated_line, 1), true);
break;
}
@ -473,7 +473,7 @@ CUSTOM_DOC("If a buffer containing jump locations has been locked in, goes to th
Locked_Jump_State jump_state = get_locked_jump_state(app, part, heap);
if (jump_state.view.exists){
int32_t line = get_line_from_list(app, jump_state.list, jump_state.list_index);
i32 line = get_line_from_list(app, jump_state.list, jump_state.list_index);
if (line <= jump_state.view.cursor.line){
++jump_state.list_index;
}
@ -503,7 +503,7 @@ CUSTOM_DOC("If a buffer containing jump locations has been locked in, goes to th
Locked_Jump_State jump_state = get_locked_jump_state(app, part, heap);
if (jump_state.view.exists){
int32_t line = get_line_from_list(app, jump_state.list, jump_state.list_index);
i32 line = get_line_from_list(app, jump_state.list, jump_state.list_index);
if (line <= jump_state.view.cursor.line){
++jump_state.list_index;
}
@ -534,11 +534,11 @@ CUSTOM_DOC("If a buffer containing jump locations has been locked in, goes to th
Locked_Jump_State jump_state = get_locked_jump_state(app, part, heap);
if (jump_state.view.exists){
int32_t list_index = 0;
i32 list_index = 0;
ID_Pos_Jump_Location location = {};
if (get_jump_from_list(app, jump_state.list, list_index, &location)){
goto_jump_in_order(app, jump_state.list, &jump_state.view, location);
int32_t updated_line = get_line_from_list(app, jump_state.list, list_index);
i32 updated_line = get_line_from_list(app, jump_state.list, list_index);
view_set_cursor(app, &jump_state.view, seek_line_char(updated_line, 1), true);
}
}
@ -552,7 +552,7 @@ CUSTOM_DOC("If a buffer containing jump locations has been locked in, goes to th
Locked_Jump_State jump_state = get_locked_jump_state(app, part, heap);
if (jump_state.view.exists){
int32_t list_index = 0;
i32 list_index = 0;
ID_Pos_Jump_Location location = {};
if (get_jump_from_list(app, jump_state.list, list_index, &location)){
Buffer_Summary buffer = {};

View File

@ -8,31 +8,31 @@
#define FCODER_JUMP_STICKY_H
struct Sticky_Jump{
int32_t list_line;
int32_t list_colon_index;
bool32 is_sub_error;
i32 list_line;
i32 list_colon_index;
b32 is_sub_error;
Buffer_ID jump_buffer_id;
int32_t jump_pos;
i32 jump_pos;
};
struct Sticky_Jump_Stored{
int32_t list_line;
int32_t list_colon_index;
bool32 is_sub_error;
i32 list_line;
i32 list_colon_index;
b32 is_sub_error;
Buffer_ID jump_buffer_id;
int32_t index_into_marker_array;
i32 index_into_marker_array;
};
struct Sticky_Jump_Array{
Sticky_Jump *jumps;
int32_t count;
i32 count;
};
struct Sticky_Jump_Node_Header{
Managed_Object memory;
Managed_Object markers;
int32_t first_index;
int32_t count;
i32 first_index;
i32 count;
};
enum Jump_Location_Flag{
@ -41,8 +41,8 @@ enum Jump_Location_Flag{
struct Marker_List{
Managed_Object jump_array;
int32_t jump_count;
int32_t previous_size;
i32 jump_count;
i32 previous_size;
Buffer_ID buffer_id;
};
@ -56,7 +56,7 @@ struct Marker_List_Node{
struct Locked_Jump_State{
View_Summary view;
Marker_List *list;
int32_t list_index;
i32 list_index;
};
#endif

View File

@ -4,9 +4,9 @@
// TOP
static bool32
ms_style_verify(String line, int32_t left_paren_pos, int32_t right_paren_pos){
int32_t result = false;
static b32
ms_style_verify(String line, i32 left_paren_pos, i32 right_paren_pos){
i32 result = false;
String line_part = substr_tail(line, right_paren_pos);
if (match_part_sc(line_part, ") : ")){
result = true;
@ -18,7 +18,7 @@ ms_style_verify(String line, int32_t left_paren_pos, int32_t right_paren_pos){
String number = substr(line, left_paren_pos + 1, right_paren_pos - left_paren_pos - 2);
if (!str_is_int_s(number)){
result = false;
int32_t comma_pos = find_s_char(number, 0, ',');
i32 comma_pos = find_s_char(number, 0, ',');
if (comma_pos < number.size){
String sub_number0 = substr(number, 0, comma_pos);
String sub_number1 = substr(number, comma_pos + 1, number.size - comma_pos - 1);
@ -31,24 +31,24 @@ ms_style_verify(String line, int32_t left_paren_pos, int32_t right_paren_pos){
return(result);
}
static int32_t
static i32
try_skip_rust_arrow(String line){
int32_t pos = 0;
i32 pos = 0;
if (match_part(line, "-->")){
String sub = substr_tail(line, 3);
sub = skip_chop_whitespace(sub);
pos = (int32_t)(sub.str - line.str);
pos = (i32)(sub.str - line.str);
}
return(pos);
}
static bool32
check_is_note(String line, int32_t colon_pos){
bool32 is_note = false;
int32_t note_pos = find_substr(line, colon_pos, make_lit_string("note"));
static b32
check_is_note(String line, i32 colon_pos){
b32 is_note = false;
i32 note_pos = find_substr(line, colon_pos, make_lit_string("note"));
if (note_pos < line.size){
bool32 is_all_whitespace = true;
for (int32_t i = colon_pos + 1; i < note_pos; i += 1){
b32 is_all_whitespace = true;
for (i32 i = colon_pos + 1; i < note_pos; i += 1){
if (!char_is_whitespace(line.str[i])){
is_all_whitespace = false;
break;
@ -61,19 +61,19 @@ check_is_note(String line, int32_t colon_pos){
return(is_note);
}
static bool32
parse_jump_location(String line, Name_Line_Column_Location *location, int32_t *colon_char, bool32 *is_sub_error){
bool32 result = false;
static b32
parse_jump_location(String line, Name_Line_Column_Location *location, i32 *colon_char, b32 *is_sub_error){
b32 result = false;
*is_sub_error = (line.str[0] == ' ');
int32_t whitespace_length = 0;
i32 whitespace_length = 0;
line = skip_chop_whitespace(line, &whitespace_length);
int32_t colon_pos = 0;
bool32 is_ms_style = false;
i32 colon_pos = 0;
b32 is_ms_style = false;
int32_t left_paren_pos = find_s_char(line, 0, '(');
int32_t right_paren_pos = find_s_char(line, left_paren_pos, ')');
i32 left_paren_pos = find_s_char(line, 0, '(');
i32 right_paren_pos = find_s_char(line, left_paren_pos, ')');
while (!is_ms_style && right_paren_pos < line.size){
if (ms_style_verify(line, left_paren_pos, right_paren_pos)){
is_ms_style = true;
@ -87,8 +87,8 @@ parse_jump_location(String line, Name_Line_Column_Location *location, int32_t *c
location_str = skip_chop_whitespace(location_str);
int32_t close_pos = right_paren_pos;
int32_t open_pos = left_paren_pos;
i32 close_pos = right_paren_pos;
i32 open_pos = left_paren_pos;
if (0 < open_pos && open_pos < location_str.size){
String file = substr(location_str, 0, open_pos);
@ -103,9 +103,9 @@ parse_jump_location(String line, Name_Line_Column_Location *location, int32_t *c
if (line_number.size > 0){
location->file = file;
int32_t comma_pos = find_s_char(line_number, 0, ',');
i32 comma_pos = find_s_char(line_number, 0, ',');
if (comma_pos < line_number.size){
int32_t start = comma_pos+1;
i32 start = comma_pos+1;
String column_number = substr(line_number, start, line_number.size-start);
line_number = substr(line_number, 0, comma_pos);
@ -131,17 +131,17 @@ parse_jump_location(String line, Name_Line_Column_Location *location, int32_t *c
}
if (!is_ms_style){
int32_t start = try_skip_rust_arrow(line);
i32 start = try_skip_rust_arrow(line);
int32_t colon_pos1 = find_s_char(line, start, ':');
i32 colon_pos1 = find_s_char(line, start, ':');
if (line.size > colon_pos1 + 1){
if (char_is_slash(line.str[colon_pos1 + 1])){
colon_pos1 = find_s_char(line, colon_pos1 + 1, ':');
}
}
int32_t colon_pos2 = find_s_char(line, colon_pos1 + 1, ':');
int32_t colon_pos3 = find_s_char(line, colon_pos2 + 1, ':');
i32 colon_pos2 = find_s_char(line, colon_pos1 + 1, ':');
i32 colon_pos3 = find_s_char(line, colon_pos2 + 1, ':');
if (colon_pos3 < line.size){
if (check_is_note(line, colon_pos3)){
@ -191,25 +191,25 @@ parse_jump_location(String line, Name_Line_Column_Location *location, int32_t *c
return(result);
}
static bool32
parse_jump_location(String line, bool32 skip_sub_error, Name_Line_Column_Location *location, int32_t *colon_char){
bool32 is_sub_error = false;
bool32 result = parse_jump_location(line, location, colon_char, &is_sub_error);
static b32
parse_jump_location(String line, b32 skip_sub_error, Name_Line_Column_Location *location, i32 *colon_char){
b32 is_sub_error = false;
b32 result = parse_jump_location(line, location, colon_char, &is_sub_error);
if (is_sub_error && skip_sub_error){
result = false;
}
return(result);
}
static int32_t
static i32
parse_jump_from_buffer_line(Application_Links *app, Partition *arena,
int32_t buffer_id, int32_t line,
bool32 skip_sub_errors, Name_Line_Column_Location *location){
int32_t result = false;
i32 buffer_id, i32 line,
b32 skip_sub_errors, Name_Line_Column_Location *location){
i32 result = false;
String line_str = {};
Buffer_Summary buffer = get_buffer(app, buffer_id, AccessAll);
if (read_line(app, arena, &buffer, line, &line_str)){
int32_t colon_char = 0;
i32 colon_char = 0;
if (parse_jump_location(line_str, skip_sub_errors, location, &colon_char)){
result = true;
}
@ -219,18 +219,18 @@ parse_jump_from_buffer_line(Application_Links *app, Partition *arena,
////////////////////////////////
static bool32
static b32
get_jump_buffer(Application_Links *app, Buffer_Summary *buffer, Name_Line_Column_Location *location){
return(open_file(app, buffer, location->file.str, location->file.size, false, true));
}
static bool32
static b32
get_jump_buffer(Application_Links *app, Buffer_Summary *buffer, ID_Pos_Jump_Location *location, Access_Flag access){
*buffer = get_buffer(app, location->buffer_id, access);
return((bool32)buffer->exists);
return((b32)buffer->exists);
}
static bool32
static b32
get_jump_buffer(Application_Links *app, Buffer_Summary *buffer, ID_Pos_Jump_Location *location){
return(get_jump_buffer(app, buffer, location, AccessAll));
}
@ -273,16 +273,16 @@ jump_to_location(Application_Links *app, View_Summary *view, Buffer_Summary *buf
////////////////////////////////
static bool32
static b32
seek_next_jump_in_buffer(Application_Links *app, Partition *part,
int32_t buffer_id, int32_t first_line, bool32 skip_sub_errors,
int32_t direction,
int32_t *line_out, int32_t *colon_index_out, Name_Line_Column_Location *location_out){
i32 buffer_id, i32 first_line, b32 skip_sub_errors,
i32 direction,
i32 *line_out, i32 *colon_index_out, Name_Line_Column_Location *location_out){
Assert(direction == 1 || direction == -1);
bool32 result = false;
int32_t line = first_line;
b32 result = false;
i32 line = first_line;
String line_str = {};
Buffer_Summary buffer = get_buffer(app, buffer_id, AccessAll);
for (;;){
@ -321,13 +321,13 @@ convert_name_based_to_id_based(Application_Links *app, Name_Line_Column_Location
return(result);
}
static int32_t
seek_next_jump_in_view(Application_Links *app, Partition *part, View_Summary *view, int32_t skip_sub_errors, int32_t direction, int32_t *line_out, int32_t *colon_index_out, Name_Line_Column_Location *location_out){
int32_t result = false;
static i32
seek_next_jump_in_view(Application_Links *app, Partition *part, View_Summary *view, i32 skip_sub_errors, i32 direction, i32 *line_out, i32 *colon_index_out, Name_Line_Column_Location *location_out){
i32 result = false;
Name_Line_Column_Location location = {};
int32_t line = view->cursor.line;
int32_t colon_index = 0;
i32 line = view->cursor.line;
i32 colon_index = 0;
if (seek_next_jump_in_buffer(app, part, view->buffer_id, line+direction, skip_sub_errors, direction, &line, &colon_index, &location)){
result = true;
*line_out = line;
@ -338,23 +338,23 @@ seek_next_jump_in_view(Application_Links *app, Partition *part, View_Summary *vi
return(result);
}
static bool32
static b32
skip_this_jump(ID_Line_Column_Jump_Location prev, ID_Line_Column_Jump_Location jump){
bool32 result = false;
b32 result = false;
if (prev.buffer_id != 0 && prev.buffer_id == jump.buffer_id && prev.line == jump.line && prev.column <= jump.column){
result = true;
}
return(result);
}
static bool32
advance_cursor_in_jump_view(Application_Links *app, Partition *part, View_Summary *view, int32_t skip_repeats, int32_t skip_sub_error, int32_t direction, Name_Line_Column_Location *location_out){
bool32 result = true;
static b32
advance_cursor_in_jump_view(Application_Links *app, Partition *part, View_Summary *view, i32 skip_repeats, i32 skip_sub_error, i32 direction, Name_Line_Column_Location *location_out){
b32 result = true;
Name_Line_Column_Location location = {};
ID_Line_Column_Jump_Location jump = {};
int32_t line = 0;
int32_t colon_index = 0;
i32 line = 0;
i32 colon_index = 0;
do{
Temp_Memory temp = begin_temp_memory(part);
@ -380,9 +380,9 @@ advance_cursor_in_jump_view(Application_Links *app, Partition *part, View_Summar
return(result);
}
static bool32
seek_jump(Application_Links *app, Partition *part, bool32 skip_repeats, bool32 skip_sub_errors, int32_t direction){
bool32 result = false;
static b32
seek_jump(Application_Links *app, Partition *part, b32 skip_repeats, b32 skip_sub_errors, i32 direction){
b32 result = false;
View_Summary view = get_view_for_locked_jump_buffer(app);
if (view.exists){

View File

@ -131,7 +131,7 @@ CUSTOM_DOC("A lister mode command that inserts a new character to the text field
if (state->initialized){
User_Input in = get_command_input(app);
uint8_t character[4];
uint32_t length = to_writable_character(in, character);
u32 length = to_writable_character(in, character);
if (length > 0){
append(&state->lister.data.text_field, make_string(character, length));
append(&state->lister.data.key_string, make_string(character, length));
@ -198,7 +198,7 @@ CUSTOM_DOC("A lister mode command that inserts a character into the text field o
if (state->initialized){
User_Input in = get_command_input(app);
uint8_t character[4];
uint32_t length = to_writable_character(in, character);
u32 length = to_writable_character(in, character);
if (length > 0){
append(&state->lister.data.text_field, make_string(character, length));
copy(&state->lister.data.key_string, front_of_directory(state->lister.data.text_field));
@ -226,7 +226,7 @@ CUSTOM_DOC("A lister mode command that backspaces one character from the text fi
backspace_utf8(&state->lister.data.text_field);
if (last_char == '/' || last_char == '\\'){
User_Input input = get_command_input(app);
bool32 is_modified =
b32 is_modified =
input.key.modifiers[MDFR_SHIFT_INDEX] ||
input.key.modifiers[MDFR_CONTROL_INDEX] ||
input.key.modifiers[MDFR_ALT_INDEX] ||
@ -259,10 +259,10 @@ CUSTOM_DOC("A lister mode command that handles input for the fixed sure to kill
if (state->initialized){
User_Input in = get_command_input(app);
uint8_t character[4];
uint32_t length = to_writable_character(in, character);
u32 length = to_writable_character(in, character);
if (length > 0){
void *user_data = 0;
bool32 did_shortcut_key = false;
b32 did_shortcut_key = false;
for (Lister_Node *node = state->lister.data.options.first;
node != 0;
node = node->next){
@ -307,7 +307,7 @@ lister_get_fixed_list_handlers(void){
static void
begin_integrated_lister__with_refresh_handler(Application_Links *app, char *query_string,
Lister_Handlers handlers,
void *user_data, int32_t user_data_size,
void *user_data, i32 user_data_size,
View_Summary *view){
if (handlers.refresh != 0){
Partition *scratch = &global_part;
@ -332,21 +332,21 @@ begin_integrated_lister__with_refresh_handler(Application_Links *app, char *quer
}
}
static const int32_t default_string_size_estimation = 0;
static const i32 default_string_size_estimation = 0;
static int32_t
lister__get_arena_size_(int32_t option_count, int32_t user_data_size,
int32_t estimated_string_space_size){
int32_t arena_size = (user_data_size + 7 + option_count*sizeof(Lister_Node) + estimated_string_space_size);
static i32
lister__get_arena_size_(i32 option_count, i32 user_data_size,
i32 estimated_string_space_size){
i32 arena_size = (user_data_size + 7 + option_count*sizeof(Lister_Node) + estimated_string_space_size);
return(arena_size);
}
static void
begin_integrated_lister__basic_list(Application_Links *app, char *query_string,
Lister_Activation_Function_Type *activate,
void *user_data, int32_t user_data_size,
Lister_Option *options, int32_t option_count,
int32_t estimated_string_space_size,
void *user_data, i32 user_data_size,
Lister_Option *options, i32 option_count,
i32 estimated_string_space_size,
View_Summary *view){
Partition *scratch = &global_part;
Heap *heap = &global_heap;
@ -355,7 +355,7 @@ begin_integrated_lister__basic_list(Application_Links *app, char *query_string,
Lister_State *state = view_get_lister_state(view);
init_lister_state(app, state, heap);
lister_first_init(app, &state->lister, user_data, user_data_size);
for (int32_t i = 0; i < option_count; i += 1){
for (i32 i = 0; i < option_count; i += 1){
lister_add_item(&state->lister, options[i].string, options[i].status, options[i].user_data, 0);
}
lister_set_query_string(&state->lister.data, query_string);
@ -367,9 +367,9 @@ begin_integrated_lister__basic_list(Application_Links *app, char *query_string,
static void
begin_integrated_lister__with_fixed_options(Application_Links *app, char *query_string,
Lister_Handlers handlers,
void *user_data, int32_t user_data_size,
Lister_Fixed_Option *options, int32_t option_count,
int32_t estimated_string_space_size,
void *user_data, i32 user_data_size,
Lister_Fixed_Option *options, i32 option_count,
i32 estimated_string_space_size,
View_Summary *view){
Partition *scratch = &global_part;
Heap *heap = &global_heap;
@ -378,9 +378,9 @@ begin_integrated_lister__with_fixed_options(Application_Links *app, char *query_
Lister_State *state = view_get_lister_state(view);
init_lister_state(app, state, heap);
lister_first_init(app, &state->lister, user_data, user_data_size);
for (int32_t i = 0; i < option_count; i += 1){
for (i32 i = 0; i < option_count; i += 1){
char *shortcut_chars = options[i].shortcut_chars;
int32_t shortcut_chars_length = str_size(shortcut_chars);
i32 shortcut_chars_length = str_size(shortcut_chars);
void *extra = lister_add_item(&state->lister,
make_string_slowly(options[i].string),
make_string_slowly(options[i].status),
@ -397,9 +397,9 @@ begin_integrated_lister__with_fixed_options(Application_Links *app, char *query_
static void
begin_integrated_lister__with_fixed_options(Application_Links *app, char *query_string,
Lister_Activation_Function_Type *activate,
void *user_data, int32_t user_data_size,
Lister_Fixed_Option *options, int32_t option_count,
int32_t estimated_string_space_size,
void *user_data, i32 user_data_size,
Lister_Fixed_Option *options, i32 option_count,
i32 estimated_string_space_size,
View_Summary *view){
Lister_Handlers handlers = lister_get_fixed_list_handlers();
handlers.activate = activate;
@ -413,9 +413,9 @@ begin_integrated_lister__with_fixed_options(Application_Links *app, char *query_
static void
begin_integrated_lister__theme_list(Application_Links *app, char *query_string,
Lister_Handlers handlers,
void *user_data, int32_t user_data_size,
Lister_UI_Option *options, int32_t option_count,
int32_t estimated_string_space_size,
void *user_data, i32 user_data_size,
Lister_UI_Option *options, i32 option_count,
i32 estimated_string_space_size,
View_Summary *view){
Partition *scratch = &global_part;
Heap *heap = &global_heap;
@ -425,7 +425,7 @@ begin_integrated_lister__theme_list(Application_Links *app, char *query_string,
init_lister_state(app, state, heap);
lister_first_init(app, &state->lister, user_data, user_data_size);
state->lister.data.theme_list = true;
for (int32_t i = 0; i < option_count; i += 1){
for (i32 i = 0; i < option_count; i += 1){
lister_add_theme_item(&state->lister,
make_string_slowly(options[i].string),
options[i].index,
@ -440,9 +440,9 @@ begin_integrated_lister__theme_list(Application_Links *app, char *query_string,
static void
begin_integrated_lister__theme_list(Application_Links *app, char *query_string,
Lister_Activation_Function_Type *activate,
void *user_data, int32_t user_data_size,
Lister_UI_Option *options, int32_t option_count,
int32_t estimated_string_space_size,
void *user_data, i32 user_data_size,
Lister_UI_Option *options, i32 option_count,
i32 estimated_string_space_size,
View_Summary *view){
Lister_Handlers handlers = lister_get_default_handlers();
handlers.activate = activate;
@ -469,8 +469,8 @@ generate_all_buffers_list__output_buffer(Lister *lister, Buffer_Summary buffer){
static void
generate_all_buffers_list(Application_Links *app, Lister *lister){
int32_t buffer_count = get_buffer_count(app);
int32_t memory_size = 0;
i32 buffer_count = get_buffer_count(app);
i32 memory_size = 0;
memory_size += buffer_count*(sizeof(Lister_Node) + 3);
for (Buffer_Summary buffer = get_buffer_first(app, AccessAll);
buffer.exists;
@ -481,14 +481,14 @@ generate_all_buffers_list(Application_Links *app, Lister *lister){
lister_begin_new_item_set(app, lister, memory_size);
Buffer_ID buffers_currently_being_viewed[16];
int32_t currently_viewed_buffer_count = 0;
i32 currently_viewed_buffer_count = 0;
// List currently viewed buffers
for (View_Summary view = get_view_first(app, AccessAll);
view.exists;
get_view_next(app, &view, AccessAll)){
Buffer_ID new_buffer_id = view.buffer_id;
for (int32_t i = 0; i < currently_viewed_buffer_count; i += 1){
for (i32 i = 0; i < currently_viewed_buffer_count; i += 1){
if (new_buffer_id == buffers_currently_being_viewed[i]){
goto skip0;
}
@ -501,7 +501,7 @@ generate_all_buffers_list(Application_Links *app, Lister *lister){
for (Buffer_Summary buffer = get_buffer_first(app, AccessAll);
buffer.exists;
get_buffer_next(app, &buffer, AccessAll)){
for (int32_t i = 0; i < currently_viewed_buffer_count; i += 1){
for (i32 i = 0; i < currently_viewed_buffer_count; i += 1){
if (buffer.buffer_id == buffers_currently_being_viewed[i]){
goto skip1;
}
@ -515,7 +515,7 @@ generate_all_buffers_list(Application_Links *app, Lister *lister){
for (Buffer_Summary buffer = get_buffer_first(app, AccessAll);
buffer.exists;
get_buffer_next(app, &buffer, AccessAll)){
for (int32_t i = 0; i < currently_viewed_buffer_count; i += 1){
for (i32 i = 0; i < currently_viewed_buffer_count; i += 1){
if (buffer.buffer_id == buffers_currently_being_viewed[i]){
goto skip2;
}
@ -526,7 +526,7 @@ generate_all_buffers_list(Application_Links *app, Lister *lister){
skip2:;
}
// Buffers That Are Open in Views
for (int32_t i = 0; i < currently_viewed_buffer_count; i += 1){
for (i32 i = 0; i < currently_viewed_buffer_count; i += 1){
Buffer_Summary buffer = get_buffer(app, buffers_currently_being_viewed[i], AccessAll);
generate_all_buffers_list__output_buffer(lister, buffer);
}
@ -550,7 +550,7 @@ generate_hot_directory_file_list(Application_Links *app, Lister *lister){
File_Info *one_past_last = file_list.infos + file_list.count;
int32_t memory_requirement = 0;
i32 memory_requirement = 0;
memory_requirement += lister->data.user_data_size;
memory_requirement += file_list.count*(sizeof(Lister_Node) + 10);
memory_requirement += hot.size + 2;
@ -611,7 +611,7 @@ generate_hot_directory_file_list(Application_Links *app, Lister *lister){
case DirtyState_UnsavedChangesAndUnloadedChanges: status_flag = " *!"; break;
}
}
int32_t more_than_enough_memory = 32;
i32 more_than_enough_memory = 32;
String status = build_string(arena_use_as_part(&lister->arena, more_than_enough_memory), is_loaded, status_flag, "");
lister_add_item(lister, lister_prealloced(file_name), lister_prealloced(status), file_name.str, 0);
}
@ -622,7 +622,7 @@ generate_hot_directory_file_list(Application_Links *app, Lister *lister){
static void
begin_integrated_lister__buffer_list(Application_Links *app, char *query_string, Lister_Activation_Function_Type *activate_procedure,
void *user_data, int32_t user_data_size, View_Summary *target_view){
void *user_data, i32 user_data_size, View_Summary *target_view){
Lister_Handlers handlers = lister_get_default_handlers();
handlers.activate = activate_procedure;
handlers.refresh = generate_all_buffers_list;
@ -631,7 +631,7 @@ begin_integrated_lister__buffer_list(Application_Links *app, char *query_string,
static void
begin_integrated_lister__file_system_list(Application_Links *app, char *query_string, Lister_Activation_Function_Type *activate_procedure,
void *user_data, int32_t user_data_size, View_Summary *target_view){
void *user_data, i32 user_data_size, View_Summary *target_view){
Lister_Handlers handlers = lister_get_default_handlers();
handlers.activate = activate_procedure;
handlers.refresh = generate_hot_directory_file_list;
@ -651,8 +651,8 @@ enum{
static void
activate_confirm_kill(Application_Links *app, Partition *scratch, Heap *heap, View_Summary *view, Lister_State *state,
String text_field, void *user_data, bool32 clicked){
int32_t behavior = (int32_t)PtrAsInt(user_data);
String text_field, void *user_data, b32 clicked){
i32 behavior = (i32)PtrAsInt(user_data);
Buffer_ID buffer_id = *(Buffer_ID*)(state->lister.data.user_data);
switch (behavior){
case SureToKill_No:
@ -689,7 +689,7 @@ do_gui_sure_to_kill(Application_Links *app, Buffer_Summary *buffer, View_Summary
{"(Y)es" , "", "Yy", IntAsPtr(SureToKill_Yes) },
{"(S)ave and Kill", "", "Ss", IntAsPtr(SureToKill_Save)},
};
int32_t option_count = sizeof(options)/sizeof(options[0]);
i32 option_count = sizeof(options)/sizeof(options[0]);
begin_integrated_lister__with_fixed_options(app, "There are unsaved changes, close anyway?",
activate_confirm_kill,
&buffer->buffer_id, sizeof(buffer->buffer_id),
@ -700,8 +700,8 @@ do_gui_sure_to_kill(Application_Links *app, Buffer_Summary *buffer, View_Summary
static void
activate_confirm_close_4coder(Application_Links *app, Partition *scratch, Heap *heap,
View_Summary *view, Lister_State *state,
String text_field, void *user_data, bool32 clicked){
int32_t behavior = (int32_t)PtrAsInt(user_data);
String text_field, void *user_data, b32 clicked){
i32 behavior = (i32)PtrAsInt(user_data);
switch (behavior){
case SureToKill_No:
{}break;
@ -729,7 +729,7 @@ do_gui_sure_to_close_4coder(Application_Links *app, View_Summary *view){
{"(Y)es" , "", "Yy", (void*)SureToKill_Yes },
{"(S)ave All and Close", "", "Ss", (void*)SureToKill_Save},
};
int32_t option_count = sizeof(options)/sizeof(options[0]);
i32 option_count = sizeof(options)/sizeof(options[0]);
begin_integrated_lister__with_fixed_options(app,
"There are one or more buffers with unsave changes, close anyway?",
activate_confirm_close_4coder,
@ -744,7 +744,7 @@ do_gui_sure_to_close_4coder(Application_Links *app, View_Summary *view){
static void
activate_switch_buffer(Application_Links *app, Partition *scratch, Heap *heap,
View_Summary *view, Lister_State *state,
String text_field, void *user_data, bool32 activated_by_mouse){
String text_field, void *user_data, b32 activated_by_mouse){
if (user_data != 0){
Buffer_ID buffer_id = (Buffer_ID)(PtrAsInt(user_data));
view_set_buffer(app, view, buffer_id, SetBuffer_KeepOriginalGUI);
@ -763,7 +763,7 @@ CUSTOM_DOC("Interactively switch to an open buffer.")
static void
activate_kill_buffer(Application_Links *app, Partition *scratch, Heap *heap,
View_Summary *view, struct Lister_State *state,
String text_field, void *user_data, bool32 activated_by_mouse){
String text_field, void *user_data, b32 activated_by_mouse){
lister_default(app, scratch, heap, view, state, ListerActivation_Finished);
if (user_data != 0){
Buffer_ID buffer_id = (Buffer_ID)(PtrAsInt(user_data));
@ -781,7 +781,7 @@ CUSTOM_DOC("Interactively kill an open buffer.")
static Lister_Activation_Code
activate_open_or_new__generic(Application_Links *app, Partition *scratch, View_Summary *view,
String path, String file_name, bool32 is_folder,
String path, String file_name, b32 is_folder,
Buffer_Create_Flag flags){
Lister_Activation_Code result = 0;
@ -819,7 +819,7 @@ activate_open_or_new__generic(Application_Links *app, Partition *scratch, View_S
static void
activate_open_or_new(Application_Links *app, Partition *scratch, Heap *heap,
View_Summary *view, struct Lister_State *state,
String text_field, void *user_data, bool32 clicked){
String text_field, void *user_data, b32 clicked){
Lister_Activation_Code result = 0;
String file_name = {};
if (user_data == 0){
@ -836,7 +836,7 @@ activate_open_or_new(Application_Links *app, Partition *scratch, Heap *heap,
if (path.size > 0 && !char_is_slash(path.str[path.size - 1])){
path = path_of_directory(path);
}
bool32 is_folder = (file_name.str[file_name.size - 1] == '/' && user_data != 0);
b32 is_folder = (file_name.str[file_name.size - 1] == '/' && user_data != 0);
Buffer_Create_Flag flags = 0;
result = activate_open_or_new__generic(app, scratch, view, path, file_name, is_folder, flags);
}
@ -854,7 +854,7 @@ CUSTOM_DOC("Interactively open a file out of the file system.")
static void
activate_new(Application_Links *app, Partition *scratch, Heap *heap,
View_Summary *view, struct Lister_State *state,
String text_field, void *user_data, bool32 clicked){
String text_field, void *user_data, b32 clicked){
Lister_Activation_Code result = 0;
String file_name = front_of_directory(text_field);
if (user_data != 0){
@ -874,7 +874,7 @@ activate_new(Application_Links *app, Partition *scratch, Heap *heap,
if (path.size > 0 && !char_is_slash(path.str[path.size - 1])){
path = path_of_directory(path);
}
bool32 is_folder = (file_name.str[file_name.size - 1] == '/' && user_data != 0);
b32 is_folder = (file_name.str[file_name.size - 1] == '/' && user_data != 0);
Buffer_Create_Flag flags = BufferCreate_AlwaysNew;
result = activate_open_or_new__generic(app, scratch, view, path, file_name, is_folder, flags);
}
@ -892,7 +892,7 @@ CUSTOM_DOC("Interactively creates a new file.")
static void
activate_open(Application_Links *app, Partition *scratch, Heap *heap,
View_Summary *view, struct Lister_State *state,
String text_field, void *user_data, bool32 clicked){
String text_field, void *user_data, b32 clicked){
Lister_Activation_Code result = 0;
String file_name = {};
if (user_data != 0){
@ -906,7 +906,7 @@ activate_open(Application_Links *app, Partition *scratch, Heap *heap,
if (path.size > 0 && !char_is_slash(path.str[path.size - 1])){
path = path_of_directory(path);
}
bool32 is_folder = (file_name.str[file_name.size - 1] == '/' && user_data != 0);
b32 is_folder = (file_name.str[file_name.size - 1] == '/' && user_data != 0);
Buffer_Create_Flag flags = BufferCreate_NeverNew;
result = activate_open_or_new__generic(app, scratch, view, path, file_name, is_folder, flags);
}
@ -925,8 +925,8 @@ CUSTOM_DOC("Interactively opens a file.")
static void
activate_select_theme(Application_Links *app, Partition *scratch, Heap *heap,
View_Summary *view, struct Lister_State *state,
String text_field, void *user_data, bool32 clicked){
change_theme_by_index(app, (int32_t)PtrAsInt(user_data));
String text_field, void *user_data, b32 clicked){
change_theme_by_index(app, (i32)PtrAsInt(user_data));
lister_default(app, scratch, heap, view, state, ListerActivation_Finished);
}
@ -938,9 +938,9 @@ CUSTOM_DOC("Opens the 4coder theme selector list.")
View_Summary view = get_active_view(app, AccessAll);
view_end_ui_mode(app, &view);
int32_t theme_count = get_theme_count(app);
i32 theme_count = get_theme_count(app);
Lister_UI_Option *options = push_array(scratch, Lister_UI_Option, theme_count);
for (int32_t i = 0; i < theme_count; i += 1){
for (i32 i = 0; i < theme_count; i += 1){
String name = get_theme_name(app, scratch, i);
options[i].string = name.str;
options[i].index = i;
@ -962,7 +962,7 @@ CUSTOM_DOC("Opens the 4coder theme selector list.")
static void
activate_command(Application_Links *app, Partition *scratch, Heap *heap,
View_Summary *view, Lister_State *state,
String text_field, void *user_data, bool32 activated_by_mouse){
String text_field, void *user_data, b32 activated_by_mouse){
lister_default(app, scratch, heap, view, state, ListerActivation_Finished);
if (user_data != 0){
Custom_Command_Function *command = (Custom_Command_Function*)user_data;
@ -978,17 +978,14 @@ CUSTOM_DOC("Opens an interactive list of all registered commands.")
View_Summary view = get_active_view(app, AccessAll);
view_end_ui_mode(app, &view);
Temp_Memory temp = begin_temp_memory(arena);
int32_t option_count = command_one_past_last_id;
i32 option_count = command_one_past_last_id;
Lister_Option *options = push_array(arena, Lister_Option, option_count);
for (int32_t i = 0; i < command_one_past_last_id; i += 1){
for (i32 i = 0; i < command_one_past_last_id; i += 1){
options[i].string = make_string_slowly(fcoder_metacmd_table[i].name);
options[i].status = make_string_slowly(fcoder_metacmd_table[i].description);
options[i].user_data = (void*)fcoder_metacmd_table[i].proc;
}
begin_integrated_lister__basic_list(app, "Command:", activate_command, 0, 0,
options, option_count,
0,
&view);
begin_integrated_lister__basic_list(app, "Command:", activate_command, 0, 0, options, option_count, 0, &view);
end_temp_memory(temp);
}

View File

@ -8,7 +8,7 @@ compiler errors, sticking markers on jump locations, and jumping to them.
static Managed_Variable_ID mirror_root_loc = 0;
#define DefaultMirrorRootName "DEFAULT.mirror_root"
static bool32
static b32
mirror_edit_handler(Application_Links *app, Buffer_ID buffer_id, int32_t start, int32_t one_past_last, String text);
////////////////////////////////
@ -38,9 +38,9 @@ mirror__check_scope_for_mirror(Application_Links *app, Managed_Scope scope){
return(result);
}
static bool32
static b32
mirror_init__inner(Application_Links *app, Buffer_ID buffer, Mirror_Flags flags, Managed_Object *mirror_object_out){
bool32 result = false;
b32 result = false;
Managed_Scope scope = 0;
if (buffer_get_managed_scope(app, buffer, &scope)){
Managed_Object mirror = mirror__check_scope_for_mirror(app, scope);
@ -62,9 +62,9 @@ mirror_init__inner(Application_Links *app, Buffer_ID buffer, Mirror_Flags flags,
return(result);
}
static bool32
static b32
mirror_end__inner(Application_Links *app, Managed_Object mirror){
bool32 result = false;
b32 result = false;
Managed_Scope scope = managed_object_get_containing_scope(app, mirror);
Managed_Object mirror_check = mirror__check_scope_for_mirror(app, scope);
if (mirror_check == mirror){
@ -81,7 +81,7 @@ mirror_end__inner(Application_Links *app, Managed_Object mirror){
}
struct Mirror__Binary_Search_Result{
bool32 abutting;
b32 abutting;
int32_t index;
};
@ -166,9 +166,9 @@ mirror__hot_from_data(Application_Links *app, Arena *arena, Mirror mirror_data){
return(result);
}
static bool32
static b32
mirror__min_max_point_indices_not_intersecting(int32_t above_point, int32_t below_point, int32_t *range_index_out){
bool32 result = false;
b32 result = false;
if (below_point < above_point && (above_point%2) == 0 && ((below_point + 2)%2) == 1){
*range_index_out = above_point/2;
result = true;
@ -176,9 +176,9 @@ mirror__min_max_point_indices_not_intersecting(int32_t above_point, int32_t belo
return(result);
}
static bool32
static b32
mirror__min_max_point_indices_contained(int32_t above_point, int32_t below_point, int32_t *range_index_out){
bool32 result = false;
b32 result = false;
if (below_point < above_point && (above_point%2) == 1 && ((below_point + 2)%2) == 0){
*range_index_out = above_point/2;
result = true;
@ -187,14 +187,14 @@ mirror__min_max_point_indices_contained(int32_t above_point, int32_t below_point
}
struct Mirror__Check_Range_Result{
bool32 passed_checks;
b32 passed_checks;
int32_t insert_index;
};
static Mirror__Check_Range_Result
mirror__check_range_to_add(Application_Links *app, Arena *scratch, int32_t mirror_first, int32_t source_first, int32_t length,
Buffer_Summary *source_buffer, Buffer_Summary *mirror_buffer, Mirror_Hot *mirror_hot,
int32_t collidable_indices_first, bool32 auto_trust_text){
int32_t collidable_indices_first, b32 auto_trust_text){
// check the new range for the following rules and determine the insert index
Mirror__Check_Range_Result result = {};
result.insert_index = -1;
@ -207,7 +207,7 @@ mirror__check_range_to_add(Application_Links *app, Arena *scratch, int32_t mirro
0 <= mirror_first && mirror_one_past_last <= mirror_buffer->size){
// 2. the mirror range must not overlap or abut any existing mirror ranges
bool32 independent_range = false;
b32 independent_range = false;
if (mirror_hot->count == 0){
independent_range = true;
result.insert_index = 0;
@ -252,11 +252,11 @@ mirror__check_range_to_add(Application_Links *app, Arena *scratch, int32_t mirro
return(result);
}
static bool32
static b32
mirror_add_range__inner_check_optimization(Application_Links *app, Managed_Object mirror, Buffer_ID source,
int32_t mirror_first, int32_t source_first, int32_t length,
int32_t collidable_indices_first, bool32 auto_trust_text, int32_t *insert_index_out){
bool32 result = false;
int32_t collidable_indices_first, b32 auto_trust_text, int32_t *insert_index_out){
b32 result = false;
if (length > 0){
Buffer_Summary source_buffer = {};
if (get_buffer_summary(app, source, AccessAll, &source_buffer)){
@ -277,7 +277,7 @@ mirror_add_range__inner_check_optimization(Application_Links *app, Managed_Objec
mirror_hot.mirror_ranges = push_array(&arena, Marker, (mirror_hot.count)*2);
mirror_hot.source_ranges = push_array(&arena, Managed_Object, mirror_hot.count);
bool32 load_success = false;
b32 load_success = false;
if (mirror_hot.count == 0){
load_success = true;
}
@ -294,7 +294,7 @@ mirror_add_range__inner_check_optimization(Application_Links *app, Managed_Objec
if (check.passed_checks){
// insert the new range at the insert index
bool32 r = true;
b32 r = true;
int32_t insert_index = check.insert_index;
*insert_index_out = insert_index;
@ -379,16 +379,16 @@ mirror_add_range__inner_check_optimization(Application_Links *app, Managed_Objec
return(result);
}
static bool32
static b32
mirror_add_range__inner(Application_Links *app, Managed_Object mirror, Buffer_ID source,
int32_t mirror_first, int32_t source_first, int32_t length){
int32_t ignore = 0;
return(mirror_add_range__inner_check_optimization(app, mirror, source, mirror_first, source_first, length, 0, false, &ignore));
}
static bool32
static b32
mirror_set_mode__inner(Application_Links *app, Managed_Object mirror, Mirror_Mode mode){
bool32 result = false;
b32 result = false;
Managed_Scope scope = managed_object_get_containing_scope(app, mirror);
Managed_Object mirror_check = mirror__check_scope_for_mirror(app, scope);
if (mirror_check == mirror){
@ -403,9 +403,9 @@ mirror_set_mode__inner(Application_Links *app, Managed_Object mirror, Mirror_Mod
return(result);
}
static bool32
static b32
mirror_get_mode__inner(Application_Links *app, Managed_Object mirror, Mirror_Mode *mode_out){
bool32 result = false;
b32 result = false;
Managed_Scope scope = managed_object_get_containing_scope(app, mirror);
Managed_Object mirror_check = mirror__check_scope_for_mirror(app, scope);
if (mirror_check == mirror){
@ -418,9 +418,9 @@ mirror_get_mode__inner(Application_Links *app, Managed_Object mirror, Mirror_Mod
return(result);
}
static bool32
static b32
mirror_set_flags__inner(Application_Links *app, Managed_Object mirror, Mirror_Flags flags){
bool32 result = false;
b32 result = false;
Managed_Scope scope = managed_object_get_containing_scope(app, mirror);
Managed_Object mirror_check = mirror__check_scope_for_mirror(app, scope);
if (mirror_check == mirror){
@ -435,9 +435,9 @@ mirror_set_flags__inner(Application_Links *app, Managed_Object mirror, Mirror_Fl
return(result);
}
static bool32
static b32
mirror_get_flags__inner(Application_Links *app, Managed_Object mirror, Mirror_Flags *flags_out){
bool32 result = false;
b32 result = false;
Managed_Scope scope = managed_object_get_containing_scope(app, mirror);
Managed_Object mirror_check = mirror__check_scope_for_mirror(app, scope);
if (mirror_check == mirror){
@ -452,44 +452,44 @@ mirror_get_flags__inner(Application_Links *app, Managed_Object mirror, Mirror_Fl
////////////////////////////////
static bool32
static b32
mirror_init(Application_Links *app, Buffer_ID buffer, Mirror_Flags flags, Managed_Object *mirror_object_out){
mirror__global_init(app);
return(mirror_init__inner(app, buffer, flags, mirror_object_out));
}
static bool32
static b32
mirror_end(Application_Links *app, Managed_Object mirror){
mirror__global_init(app);
return(mirror_end__inner(app, mirror));
}
static bool32
static b32
mirror_add_range(Application_Links *app, Managed_Object mirror, Buffer_ID source,
int32_t mirror_first, int32_t source_first, int32_t length){
mirror__global_init(app);
return(mirror_add_range__inner(app, mirror, source, mirror_first, source_first, length));
}
static bool32
static b32
mirror_set_mode(Application_Links *app, Managed_Object mirror, Mirror_Mode mode){
mirror__global_init(app);
return(mirror_set_mode__inner(app, mirror, mode));
}
static bool32
static b32
mirror_get_mode(Application_Links *app, Managed_Object mirror, Mirror_Mode *mode_out){
mirror__global_init(app);
return(mirror_get_mode__inner(app, mirror, mode_out));
}
static bool32
static b32
mirror_set_flags(Application_Links *app, Managed_Object mirror, Mirror_Flags flags){
mirror__global_init(app);
return(mirror_set_flags__inner(app, mirror, flags));
}
static bool32
static b32
mirror_get_flags(Application_Links *app, Managed_Object mirror, Mirror_Flags *flags_out){
mirror__global_init(app);
return(mirror_get_flags__inner(app, mirror, flags_out));
@ -497,10 +497,10 @@ mirror_get_flags(Application_Links *app, Managed_Object mirror, Mirror_Flags *fl
////////////////////////////////
static bool32
static b32
mirror_buffer_create(Application_Links *app, String buffer_name, Mirror_Flags flags, Buffer_ID *mirror_buffer_id_out){
mirror__global_init(app);
bool32 result = false;
b32 result = false;
Buffer_ID new_buffer = 0;
if (!get_buffer_by_name(app, buffer_name, AccessAll, &new_buffer)){
if (new_buffer == 0){
@ -526,10 +526,10 @@ mirror__buffer_to_object(Application_Links *app, Buffer_ID buffer){
return(result);
}
static bool32
static b32
mirror_buffer_end(Application_Links *app, Buffer_ID mirror){
mirror__global_init(app);
bool32 result = false;
b32 result = false;
Managed_Object mirror_object = mirror__buffer_to_object(app, mirror);
if (mirror_object != 0){
result = mirror_end__inner(app, mirror_object);
@ -537,11 +537,11 @@ mirror_buffer_end(Application_Links *app, Buffer_ID mirror){
return(result);
}
static bool32
static b32
mirror_buffer_add_range_exact(Application_Links *app, Buffer_ID mirror, Buffer_ID source,
int32_t mirror_first, int32_t source_first, int32_t length){
mirror__global_init(app);
bool32 result = false;
b32 result = false;
Managed_Object mirror_object = mirror__buffer_to_object(app, mirror);
if (mirror_object != 0){
result = mirror_add_range__inner(app, mirror_object, source, mirror_first, source_first, length);
@ -570,11 +570,11 @@ mirror__range_loose_get_length(Application_Links *app, Buffer_ID mirror, Buffer_
return(result);
}
static bool32
static b32
mirror_buffer_add_range_loose(Application_Links *app, Buffer_ID mirror, Buffer_ID source,
int32_t mirror_first, int32_t source_first, int32_t max_length){
mirror__global_init(app);
bool32 result = false;
b32 result = false;
int32_t length = mirror__range_loose_get_length(app, mirror, source, mirror_first, source_first, max_length);
if (length > 0){
Managed_Object mirror_object = mirror__buffer_to_object(app, mirror);
@ -585,17 +585,17 @@ mirror_buffer_add_range_loose(Application_Links *app, Buffer_ID mirror, Buffer_I
return(result);
}
static bool32
static b32
mirror_buffer_insert_range(Application_Links *app, Buffer_ID mirror, Buffer_ID source,
int32_t mirror_insert_pos, int32_t source_first, int32_t length){
mirror__global_init(app);
bool32 result = false;
b32 result = false;
Managed_Object mirror_object = mirror__buffer_to_object(app, mirror);
if (mirror_object != 0){
Mirror_Mode mode = 0;
if (mirror_get_mode__inner(app, mirror_object, &mode)){
if (mode == MirrorMode_Constructing){
bool32 did_insert = false;
b32 did_insert = false;
{
Arena arena = make_arena(app, (8 << 10));
char *buffer = push_array(&arena, char, length);
@ -616,10 +616,10 @@ mirror_buffer_insert_range(Application_Links *app, Buffer_ID mirror, Buffer_ID s
return(result);
}
static bool32
static b32
mirror_buffer_set_mode(Application_Links *app, Buffer_ID mirror, Mirror_Mode mode){
mirror__global_init(app);
bool32 result = false;
b32 result = false;
Managed_Object mirror_object = mirror__buffer_to_object(app, mirror);
if (mirror_object != 0){
result = mirror_set_mode__inner(app, mirror_object, mode);
@ -627,10 +627,10 @@ mirror_buffer_set_mode(Application_Links *app, Buffer_ID mirror, Mirror_Mode mod
return(result);
}
static bool32
static b32
mirror_buffer_get_mode(Application_Links *app, Buffer_ID mirror, Mirror_Mode *mode_out){
mirror__global_init(app);
bool32 result = false;
b32 result = false;
Managed_Object mirror_object = mirror__buffer_to_object(app, mirror);
if (mirror_object != 0){
result = mirror_get_mode__inner(app, mirror_object, mode_out);
@ -638,10 +638,10 @@ mirror_buffer_get_mode(Application_Links *app, Buffer_ID mirror, Mirror_Mode *mo
return(result);
}
static bool32
static b32
mirror_buffer_set_flags(Application_Links *app, Buffer_ID mirror, Mirror_Flags flags){
mirror__global_init(app);
bool32 result = false;
b32 result = false;
Managed_Object mirror_object = mirror__buffer_to_object(app, mirror);
if (mirror_object != 0){
result = mirror_set_flags__inner(app, mirror_object, flags);
@ -649,10 +649,10 @@ mirror_buffer_set_flags(Application_Links *app, Buffer_ID mirror, Mirror_Flags f
return(result);
}
static bool32
static b32
mirror_buffer_get_flags(Application_Links *app, Buffer_ID mirror, Mirror_Flags *flags_out){
mirror__global_init(app);
bool32 result = false;
b32 result = false;
Managed_Object mirror_object = mirror__buffer_to_object(app, mirror);
if (mirror_object != 0){
result = mirror_get_flags__inner(app, mirror_object, flags_out);
@ -660,10 +660,10 @@ mirror_buffer_get_flags(Application_Links *app, Buffer_ID mirror, Mirror_Flags *
return(result);
}
static bool32
static b32
mirror_buffer_refresh(Application_Links *app, Buffer_ID mirror){
mirror__global_init(app);
bool32 result = false;
b32 result = false;
Managed_Object mirror_object = mirror__buffer_to_object(app, mirror);
if (mirror_object != 0){
// TODO(allen):
@ -699,9 +699,9 @@ mirror_quick_sort_mirror_ranges(Mirror_Range *ranges, int32_t first, int32_t one
}
}
static bool32
static b32
mirror__check_range_array_sorting(Mirror_Range *ranges, int32_t count){
bool32 result = true;
b32 result = true;
int32_t prev_pos = -1;
for (int32_t i = 0; i < count; i += 1){
int32_t first = ranges[i].mirror_first;
@ -717,14 +717,14 @@ mirror__check_range_array_sorting(Mirror_Range *ranges, int32_t count){
return(result);
}
static bool32
static b32
mirror_buffer_add_range_exact_array(Application_Links *app, Buffer_ID mirror, Mirror_Range *ranges, int32_t count){
mirror__global_init(app);
bool32 result = false;
b32 result = false;
Managed_Object mirror_object = mirror__buffer_to_object(app, mirror);
if (mirror_object != 0){
if (mirror__check_range_array_sorting(ranges, count)){
bool32 r = true;
b32 r = true;
Mirror_Range *range = ranges;
int32_t safe_to_ignore_index = 0;
for (int32_t i = 0; i < count; i += 1, range += 1){
@ -746,10 +746,10 @@ mirror_buffer_add_range_exact_array(Application_Links *app, Buffer_ID mirror, Mi
return(result);
}
static bool32
static b32
mirror_buffer_add_range_loose_array(Application_Links *app, Buffer_ID mirror, Mirror_Range *ranges, int32_t count){
mirror__global_init(app);
bool32 result = false;
b32 result = false;
Managed_Object mirror_object = mirror__buffer_to_object(app, mirror);
if (mirror_object != 0){
{
@ -759,7 +759,7 @@ mirror_buffer_add_range_loose_array(Application_Links *app, Buffer_ID mirror, Mi
}
}
if (mirror__check_range_array_sorting(ranges, count)){
bool32 r = true;
b32 r = true;
Mirror_Range *range = ranges;
int32_t safe_to_ignore_index = 0;
for (int32_t i = 0; i < count; i += 1, range += 1){
@ -781,24 +781,24 @@ mirror_buffer_add_range_loose_array(Application_Links *app, Buffer_ID mirror, Mi
return(result);
}
static bool32
static b32
mirror_buffer_insert_range_array(Application_Links *app, Buffer_ID mirror, Mirror_Range *ranges, int32_t count){
mirror__global_init(app);
bool32 result = false;
b32 result = false;
Managed_Object mirror_object = mirror__buffer_to_object(app, mirror);
if (mirror_object != 0){
Mirror_Mode mode = 0;
if (mirror_get_mode__inner(app, mirror_object, &mode)){
if (mode == MirrorMode_Constructing){
if (mirror__check_range_array_sorting(ranges, count)){
bool32 r = true;
b32 r = true;
Mirror_Range *range = ranges;
int32_t safe_to_ignore_index = 0;
int32_t total_shift = 0;
Arena arena = make_arena(app, (8 << 10));
for (int32_t i = 0; i < count; i += 1, range += 1){
int32_t mirror_first = range->mirror_first + total_shift;
bool32 did_insert = false;
b32 did_insert = false;
{
Temp_Memory_Arena temp = begin_temp_memory(&arena);
char *buffer = push_array(&arena, char, range->length);
@ -834,10 +834,10 @@ mirror_buffer_insert_range_array(Application_Links *app, Buffer_ID mirror, Mirro
////////////////////////////////
static bool32
static b32
mirror_edit_handler(Application_Links *app, Buffer_ID buffer_id, int32_t first, int32_t one_past_last, String text){
mirror__global_init(app);
bool32 result = false;
b32 result = false;
Buffer_Summary mirror_buffer = {};
if (get_buffer_summary(app, buffer_id, AccessAll, &mirror_buffer)){
Managed_Object mirror = mirror__buffer_to_object(app, buffer_id);
@ -852,7 +852,7 @@ mirror_edit_handler(Application_Links *app, Buffer_ID buffer_id, int32_t first,
switch (mode){
case MirrorMode_Constructing:
{
bool32 unreflected_range = false;
b32 unreflected_range = false;
if (mirror_hot.count == 0){
unreflected_range = true;
}
@ -877,9 +877,9 @@ mirror_edit_handler(Application_Links *app, Buffer_ID buffer_id, int32_t first,
case MirrorMode_Reflecting:
{
bool32 newlines_are_jumps = ((mirror_data.flags & MirrorFlag_NewlinesAreJumps) != 0);
b32 newlines_are_jumps = ((mirror_data.flags & MirrorFlag_NewlinesAreJumps) != 0);
bool32 blocked = false;
b32 blocked = false;
if (newlines_are_jumps){
if (has_substr(text, make_lit_string("\n"))){
blocked = true;
@ -897,7 +897,7 @@ mirror_edit_handler(Application_Links *app, Buffer_ID buffer_id, int32_t first,
}
if (!blocked){
bool32 reflected_range = false;
b32 reflected_range = false;
int32_t range_index = 0;
if (mirror_hot.count > 0){
int32_t fake_index = mirror_hot.count*2;

View File

@ -53,39 +53,39 @@ struct Mirror_Hot{
// The primary API for mirrors.
static bool32 mirror_init(Application_Links *app, Buffer_ID buffer, Mirror_Flags flags, Managed_Object *mirror_object_out);
static bool32 mirror_end(Application_Links *app, Managed_Object mirror);
static bool32 mirror_add_range(Application_Links *app, Managed_Object mirror, Buffer_ID source,
int32_t mirror_first, int32_t source_first, int32_t length);
static bool32 mirror_set_mode(Application_Links *app, Managed_Object mirror, Mirror_Mode mode);
static bool32 mirror_get_mode(Application_Links *app, Managed_Object mirror, Mirror_Mode *mode_out);
static bool32 mirror_set_flags(Application_Links *app, Managed_Object mirror, Mirror_Flags flags);
static bool32 mirror_get_flags(Application_Links *app, Managed_Object mirror, Mirror_Flags *flags_out);
static b32 mirror_init(Application_Links *app, Buffer_ID buffer, Mirror_Flags flags, Managed_Object *mirror_object_out);
static b32 mirror_end(Application_Links *app, Managed_Object mirror);
static b32 mirror_add_range(Application_Links *app, Managed_Object mirror, Buffer_ID source,
int32_t mirror_first, int32_t source_first, int32_t length);
static b32 mirror_set_mode(Application_Links *app, Managed_Object mirror, Mirror_Mode mode);
static b32 mirror_get_mode(Application_Links *app, Managed_Object mirror, Mirror_Mode *mode_out);
static b32 mirror_set_flags(Application_Links *app, Managed_Object mirror, Mirror_Flags flags);
static b32 mirror_get_flags(Application_Links *app, Managed_Object mirror, Mirror_Flags *flags_out);
////////////////////////////////
// Extra helpers for mirrors (all implemented on the primary API)
static bool32 mirror_buffer_create(Application_Links *app, String buffer_name, Mirror_Flags flags, Buffer_ID *mirror_buffer_id_out);
static bool32 mirror_buffer_end(Application_Links *app, Buffer_ID mirror);
static bool32 mirror_buffer_add_range_exact(Application_Links *app, Buffer_ID mirror, Buffer_ID source,
int32_t mirror_first, int32_t source_first, int32_t length);
static bool32 mirror_buffer_add_range_loose(Application_Links *app, Buffer_ID mirror, Buffer_ID source,
int32_t mirror_first, int32_t source_first, int32_t max_length);
static bool32 mirror_buffer_insert_range(Application_Links *app, Buffer_ID mirror, Buffer_ID source,
int32_t mirror_insert_pos, int32_t source_first, int32_t length);
static bool32 mirror_buffer_set_mode(Application_Links *app, Buffer_ID mirror, Mirror_Mode mode);
static bool32 mirror_buffer_get_mode(Application_Links *app, Buffer_ID mirror, Mirror_Mode *mode_out);
static bool32 mirror_buffer_set_flags(Application_Links *app, Buffer_ID mirror, Mirror_Flags flags);
static bool32 mirror_buffer_get_flags(Application_Links *app, Buffer_ID mirror, Mirror_Flags *flags_out);
static b32 mirror_buffer_create(Application_Links *app, String buffer_name, Mirror_Flags flags, Buffer_ID *mirror_buffer_id_out);
static b32 mirror_buffer_end(Application_Links *app, Buffer_ID mirror);
static b32 mirror_buffer_add_range_exact(Application_Links *app, Buffer_ID mirror, Buffer_ID source,
int32_t mirror_first, int32_t source_first, int32_t length);
static b32 mirror_buffer_add_range_loose(Application_Links *app, Buffer_ID mirror, Buffer_ID source,
int32_t mirror_first, int32_t source_first, int32_t max_length);
static b32 mirror_buffer_insert_range(Application_Links *app, Buffer_ID mirror, Buffer_ID source,
int32_t mirror_insert_pos, int32_t source_first, int32_t length);
static b32 mirror_buffer_set_mode(Application_Links *app, Buffer_ID mirror, Mirror_Mode mode);
static b32 mirror_buffer_get_mode(Application_Links *app, Buffer_ID mirror, Mirror_Mode *mode_out);
static b32 mirror_buffer_set_flags(Application_Links *app, Buffer_ID mirror, Mirror_Flags flags);
static b32 mirror_buffer_get_flags(Application_Links *app, Buffer_ID mirror, Mirror_Flags *flags_out);
static bool32 mirror_buffer_refresh(Application_Links *app, Buffer_ID mirror);
static b32 mirror_buffer_refresh(Application_Links *app, Buffer_ID mirror);
static void mirror_quick_sort_mirror_ranges(Mirror_Range *ranges, int32_t first, int32_t one_past_last);
static void mirror_quick_sort_mirror_ranges(Mirror_Range *ranges, int32_t first, int32_t one_past_last);
static bool32 mirror_buffer_add_range_exact_array(Application_Links *app, Buffer_ID mirror, Mirror_Range *ranges, int32_t count);
static bool32 mirror_buffer_add_range_loose_array(Application_Links *app, Buffer_ID mirror, Mirror_Range *ranges, int32_t count);
static bool32 mirror_buffer_insert_range_array(Application_Links *app, Buffer_ID mirror, Mirror_Range *ranges, int32_t count);
static b32 mirror_buffer_add_range_exact_array(Application_Links *app, Buffer_ID mirror, Mirror_Range *ranges, int32_t count);
static b32 mirror_buffer_add_range_loose_array(Application_Links *app, Buffer_ID mirror, Mirror_Range *ranges, int32_t count);
static b32 mirror_buffer_insert_range_array(Application_Links *app, Buffer_ID mirror, Mirror_Range *ranges, int32_t count);
#endif

View File

@ -12,10 +12,10 @@ static Partition current_project_arena = {};
static Project_File_Pattern_Array
get_pattern_array_from_cstring_array(Partition *arena, CString_Array list){
Project_File_Pattern_Array array = {};
int32_t count = list.count;
i32 count = list.count;
array.patterns = push_array(arena, Project_File_Pattern, count);
array.count = count;
for (int32_t i = 0; i < count; ++i){
for (i32 i = 0; i < count; ++i){
String base_str = make_string_slowly(list.strings[i]);
String str = string_push(arena, base_str.size + 3);
append(&str, "*.");
@ -41,27 +41,27 @@ close_all_files_with_extension(Application_Links *app, Partition *scratch_part,
CString_Array extension_array){
Temp_Memory temp = begin_temp_memory(scratch_part);
int32_t buffers_to_close_max = part_remaining(scratch_part)/sizeof(int32_t);
int32_t *buffers_to_close = push_array(scratch_part, int32_t, buffers_to_close_max);
i32 buffers_to_close_max = part_remaining(scratch_part)/sizeof(i32);
i32 *buffers_to_close = push_array(scratch_part, i32, buffers_to_close_max);
int32_t buffers_to_close_count = 0;
bool32 do_repeat = 0;
i32 buffers_to_close_count = 0;
b32 do_repeat = 0;
do{
buffers_to_close_count = 0;
do_repeat = 0;
uint32_t access = AccessAll;
u32 access = AccessAll;
Buffer_Summary buffer = {};
for (buffer = get_buffer_first(app, access);
buffer.exists;
get_buffer_next(app, &buffer, access)){
bool32 is_match = 1;
b32 is_match = 1;
if (extension_array.count > 0){
is_match = 0;
if (buffer.file_name != 0){
String extension = file_extension(make_string(buffer.file_name, buffer.file_name_len));
for (int32_t i = 0; i < extension_array.count; ++i){
for (i32 i = 0; i < extension_array.count; ++i){
if (match(extension, extension_array.strings[i])){
is_match = 1;
break;
@ -79,7 +79,7 @@ close_all_files_with_extension(Application_Links *app, Partition *scratch_part,
}
}
for (int32_t i = 0; i < buffers_to_close_count; ++i){
for (i32 i = 0; i < buffers_to_close_count; ++i){
kill_buffer(app, buffer_identifier(buffers_to_close[i]), true, 0);
}
}while(do_repeat);
@ -87,11 +87,11 @@ close_all_files_with_extension(Application_Links *app, Partition *scratch_part,
end_temp_memory(temp);
}
static bool32
static b32
match_in_pattern_array(char *str, Project_File_Pattern_Array array){
bool32 found_match = false;
b32 found_match = false;
Project_File_Pattern *pattern = array.patterns;
for (int32_t i = 0; i < array.count; ++i, ++pattern){
for (i32 i = 0; i < array.count; ++i, ++pattern){
if (wildcard_match_c(&pattern->absolutes, str, true)){
found_match = true;
break;
@ -104,12 +104,12 @@ static void
open_all_files_in_directory_pattern_match__inner(Application_Links *app, String space,
Project_File_Pattern_Array whitelist,
Project_File_Pattern_Array blacklist,
uint32_t flags){
u32 flags){
File_List list = get_file_list(app, space.str, space.size);
int32_t dir_size = space.size;
i32 dir_size = space.size;
File_Info *info = list.infos;
for (uint32_t i = 0; i < list.count; ++i, ++info){
for (u32 i = 0; i < list.count; ++i, ++info){
if (info->folder){
if ((flags & OpenAllFilesFlag_Recursive) == 0){
continue;
@ -156,9 +156,9 @@ open_all_files_in_directory_pattern_match(Application_Links *app, Partition *scr
String dir,
Project_File_Pattern_Array whitelist,
Project_File_Pattern_Array blacklist,
uint32_t flags){
u32 flags){
Temp_Memory temp = begin_temp_memory(scratch);
int32_t size = 32 << 10;
i32 size = 32 << 10;
char *mem = push_array(scratch, char, size);
String space = make_string_cap(mem, 0, size);
append(&space, dir);
@ -172,7 +172,7 @@ open_all_files_in_directory_pattern_match(Application_Links *app, Partition *scr
static void
open_all_files_in_directory_with_extension(Application_Links *app, Partition *scratch,
String dir, CString_Array array,
uint32_t flags){
u32 flags){
Temp_Memory temp = begin_temp_memory(scratch);
Project_File_Pattern_Array whitelist = get_pattern_array_from_cstring_array(scratch, array);
Project_File_Pattern_Array blacklist = get_standard_blacklist(scratch);
@ -183,9 +183,9 @@ open_all_files_in_directory_with_extension(Application_Links *app, Partition *sc
static void
open_all_files_in_hot_with_extension(Application_Links *app, Partition *scratch,
CString_Array array,
uint32_t flags){
u32 flags){
Temp_Memory temp = begin_temp_memory(scratch);
int32_t size = 32 << 10;
i32 size = 32 << 10;
char *mem = push_array(scratch, char, size);
String space = make_string_cap(mem, 0, size);
space.size = directory_get_hot(app, space.str, space.memory_size);
@ -217,7 +217,7 @@ parse_project__config_data__version_0(Partition *arena, String file_dir, Config
// Set new project directory
{
int32_t cap = file_dir.size + 1;
i32 cap = file_dir.size + 1;
char *mem = push_array(arena, char, cap);
project->dir = make_string(mem, 0, cap);
copy(&project->dir, file_dir);
@ -242,7 +242,7 @@ parse_project__config_data__version_0(Partition *arena, String file_dir, Config
project->blacklist_pattern_array = get_standard_blacklist(arena);
}
bool32 open_recursively = false;
b32 open_recursively = false;
if (config_bool_var(parsed, "open_recursively", 0, &open_recursively)){
project->load_path_array.paths[0].recursive = open_recursively;
}
@ -253,7 +253,7 @@ parse_project__config_data__version_0(Partition *arena, String file_dir, Config
project->command_array.count = 16;
Project_Command *command = project->command_array.commands;
for (int32_t j = 1; j <= 16; ++j, ++command){
for (i32 j = 1; j <= 16; ++j, ++command){
project->fkey_commands[j - 1] = j - 1;
memset(command, 0, sizeof(*command));
@ -273,12 +273,12 @@ parse_project__config_data__version_0(Partition *arena, String file_dir, Config
command->out = string_push_copy(arena, out);
}
bool32 footer_panel = false;
b32 footer_panel = false;
if (config_compound_bool_member(parsed, compound, "footer_panel", 2, &footer_panel)){
command->footer_panel = footer_panel;
}
bool32 save_dirty_files = false;
b32 save_dirty_files = false;
if (config_compound_bool_member(parsed, compound, "save_dirty_files", 3, &save_dirty_files)){
command->save_dirty_files = save_dirty_files;
}
@ -305,7 +305,7 @@ parse_project__extract_pattern_array(Partition *arena, Config *parsed,
array_out->patterns = push_array(arena, Project_File_Pattern, list.count);
array_out->count = list.count;
int32_t i = 0;
i32 i = 0;
for (Config_Get_Result_Node *node = list.first;
node != 0;
node = node->next, i += 1){
@ -336,7 +336,7 @@ parse_project__config_data__version_1(Partition *arena, String root_dir, Config
// Set new project directory
{
int32_t cap = root_dir.size + 1;
i32 cap = root_dir.size + 1;
project->dir = string_push(arena, cap);
copy(&project->dir, root_dir);
terminate_with_null(&project->dir);
@ -363,10 +363,10 @@ parse_project__config_data__version_1(Partition *arena, String root_dir, Config
{
Config_Compound *compound = 0;
if (config_compound_var(parsed, "load_paths", 0, &compound)){
bool32 found_match = false;
b32 found_match = false;
Config_Compound *best_paths = 0;
for (int32_t i = 0;; ++i){
for (i32 i = 0;; ++i){
Config_Iteration_Step_Result result = typed_array_iteration_step(parsed, compound, ConfigRValueType_Compound, i);
if (result.step == Iteration_Skip){
continue;
@ -440,7 +440,7 @@ parse_project__config_data__version_1(Partition *arena, String root_dir, Config
Config_Compound *src = node->result.compound;
memset(dst, 0, sizeof(*dst));
bool32 can_emit_command = true;
b32 can_emit_command = true;
String name = {};
Config_Get_Result cmd_result = {};
@ -448,9 +448,9 @@ parse_project__config_data__version_1(Partition *arena, String root_dir, Config
char *cmd_pos = 0;
String cmd_str = {};
String out = {};
bool32 footer_panel = false;
bool32 save_dirty_files = true;
bool32 cursor_at_end = false;
b32 footer_panel = false;
b32 save_dirty_files = true;
b32 cursor_at_end = false;
if (!config_compound_string_member(parsed, src, "name", 0, &name)){
can_emit_command = false;
@ -471,7 +471,7 @@ parse_project__config_data__version_1(Partition *arena, String root_dir, Config
}
can_emit_command = false;
for (int32_t j = 0;; ++j){
for (i32 j = 0;; ++j){
Config_Iteration_Step_Result result = typed_array_iteration_step(parsed, cmd_set, ConfigRValueType_Compound, j);
if (result.step == Iteration_Skip){
continue;
@ -527,13 +527,13 @@ parse_project__config_data__version_1(Partition *arena, String root_dir, Config
// fkey_command
{
for (int32_t i = 1; i <= 16; ++i){
for (i32 i = 1; i <= 16; ++i){
String name = {};
int32_t index = -1;
i32 index = -1;
if (config_string_var(parsed, "fkey_command", i, &name)){
int32_t count = project->command_array.count;
i32 count = project->command_array.count;
Project_Command *command_ptr = project->command_array.commands;
for (int32_t j = 0; j < count; ++j, ++command_ptr){
for (i32 j = 0; j < count; ++j, ++command_ptr){
if (match(command_ptr->name, name)){
index = j;
break;
@ -550,7 +550,7 @@ parse_project__config_data__version_1(Partition *arena, String root_dir, Config
static Project*
parse_project__config_data(Partition *arena, String file_dir, Config *parsed){
int32_t version = 0;
i32 version = 0;
if (parsed->version != 0){
version = *parsed->version;
}
@ -592,7 +592,7 @@ parse_project__nearest_file(Application_Links *app, Partition *arena){
Temp_Memory restore_point = begin_temp_memory(arena);
String project_path = {};
int32_t size = 32 << 10;
i32 size = 32 << 10;
char *space = push_array(arena, char, size);
if (space != 0){
project_path = make_string_cap(space, 0, size);
@ -636,10 +636,10 @@ parse_project__nearest_file(Application_Links *app, Partition *arena){
return(result);
}
static bool32
static b32
project_deep_copy__pattern_array(Partition *arena, Project_File_Pattern_Array *src_array,
Project_File_Pattern_Array *dst_array){
int32_t pattern_count = src_array->count;
i32 pattern_count = src_array->count;
dst_array->patterns = push_array(arena, Project_File_Pattern, pattern_count);
if (dst_array->patterns == 0){
return(false);
@ -648,10 +648,10 @@ project_deep_copy__pattern_array(Partition *arena, Project_File_Pattern_Array *s
Project_File_Pattern *dst = dst_array->patterns;
Project_File_Pattern *src = src_array->patterns;
for (int32_t i = 0; i < pattern_count; ++i, ++dst, ++src){
int32_t abs_count = src->absolutes.count;
for (i32 i = 0; i < pattern_count; ++i, ++dst, ++src){
i32 abs_count = src->absolutes.count;
dst->absolutes.count = abs_count;
for (int32_t j = 0; j < abs_count; ++j){
for (i32 j = 0; j < abs_count; ++j){
dst->absolutes.a[j] = string_push_copy(arena, src->absolutes.a[j]);
if (dst->absolutes.a[j].str == 0){
return(false);
@ -684,7 +684,7 @@ project_deep_copy__inner(Partition *arena, Project *project){
}
{
int32_t path_count = project->load_path_array.count;
i32 path_count = project->load_path_array.count;
result.load_path_array.paths = push_array(arena, Project_File_Load_Path, path_count);
if (result.load_path_array.paths == 0){
return(result);
@ -693,7 +693,7 @@ project_deep_copy__inner(Partition *arena, Project *project){
Project_File_Load_Path *dst = result.load_path_array.paths;
Project_File_Load_Path *src = project->load_path_array.paths;
for (int32_t i = 0; i < path_count; ++i, ++dst, ++src){
for (i32 i = 0; i < path_count; ++i, ++dst, ++src){
dst->path = string_push_copy(arena, src->path);
if (dst->path.str == 0){
return(result);
@ -704,7 +704,7 @@ project_deep_copy__inner(Partition *arena, Project *project){
}
{
int32_t command_count = project->command_array.count;
i32 command_count = project->command_array.count;
result.command_array.commands = push_array(arena, Project_Command, command_count);
if (result.command_array.commands == 0){
return(result);
@ -713,7 +713,7 @@ project_deep_copy__inner(Partition *arena, Project *project){
Project_Command *dst = result.command_array.commands;
Project_Command *src = project->command_array.commands;
for (int32_t i = 0; i < command_count; ++i, ++dst, ++src){
for (i32 i = 0; i < command_count; ++i, ++dst, ++src){
memset(dst, 0, sizeof(*dst));
if (src->name.str != 0){
dst->name = string_push_copy(arena, src->name);
@ -763,10 +763,10 @@ config_feedback_file_pattern_array(String *space, char *name, Project_File_Patte
append(space, name);
append(space, " = {\n");
Project_File_Pattern *pattern = array->patterns;
for (int32_t i = 0; i < array->count; ++i, ++pattern){
for (i32 i = 0; i < array->count; ++i, ++pattern){
append(space, "\"");
String *absolute = pattern->absolutes.a;
for (int32_t j = 0; j < pattern->absolutes.count; ++j, ++absolute){
for (i32 j = 0; j < pattern->absolutes.count; ++j, ++absolute){
if (j != 0){
append(space, "*");
}
@ -782,7 +782,7 @@ config_feedback_file_load_path_array(String *space, char *name, Project_File_Loa
append(space, name);
append(space, " = {\n");
Project_File_Load_Path *path = array->paths;
for (int32_t i = 0; i < array->count; ++i, ++path){
for (i32 i = 0; i < array->count; ++i, ++path){
append(space, "{ ");
append(space, ".path = \"");
append(space, path->path);
@ -803,7 +803,7 @@ config_feedback_command_array(String *space, char *name, Project_Command_Array *
append(space, name);
append(space, " = {\n");
Project_Command *command = array->commands;
for (int32_t i = 0; i < array->count; ++i, ++command){
for (i32 i = 0; i < array->count; ++i, ++command){
append(space, "{ ");
append(space, ".name = \"");
append(space, command->name);
@ -830,11 +830,11 @@ config_feedback_command_array(String *space, char *name, Project_Command_Array *
static void
set_current_project(Application_Links *app, Partition *scratch, Project *project, Config *parsed){
bool32 print_feedback = false;
b32 print_feedback = false;
if (parsed != 0 && project != 0){
if (current_project_arena.base == 0){
int32_t project_mem_size = (1 << 20);
i32 project_mem_size = (1 << 20);
void *project_mem = memory_allocate(app, project_mem_size);
current_project_arena = make_part(project_mem, project_mem_size);
}
@ -848,9 +848,9 @@ set_current_project(Application_Links *app, Partition *scratch, Project *project
print_feedback = true;
// Open all project files
for (int32_t i = 0; i < current_project.load_path_array.count; ++i){
for (i32 i = 0; i < current_project.load_path_array.count; ++i){
Project_File_Load_Path *load_path = &current_project.load_path_array.paths[i];
uint32_t flags = 0;
u32 flags = 0;
if (load_path->recursive){
flags |= OpenAllFilesFlag_Recursive;
}
@ -860,7 +860,7 @@ set_current_project(Application_Links *app, Partition *scratch, Project *project
String file_dir = path_str;
if (load_path->relative){
String project_dir = current_project.dir;
int32_t cap = path_str.size + project_dir.size + 2;
i32 cap = path_str.size + project_dir.size + 2;
char *mem = push_array(scratch, char, cap);
push_align(scratch, 8);
if (mem != 0){
@ -963,9 +963,9 @@ set_current_project_from_nearest_project_file(Application_Links *app, Partition
static void
exec_project_command(Application_Links *app, Project_Command *command){
if (command->cmd.size > 0){
bool32 footer_panel = command->footer_panel;
bool32 save_dirty_files = command->save_dirty_files;
bool32 cursor_at_end = command->cursor_at_end;
b32 footer_panel = command->footer_panel;
b32 save_dirty_files = command->save_dirty_files;
b32 cursor_at_end = command->cursor_at_end;
if (save_dirty_files){
save_all_dirty_buffers(app);
@ -974,12 +974,12 @@ exec_project_command(Application_Links *app, Project_Command *command){
View_Summary view = {};
View_Summary *view_ptr = 0;
Buffer_Identifier buffer_id = {};
uint32_t flags = CLI_OverlapWithConflict;
u32 flags = CLI_OverlapWithConflict;
if (cursor_at_end){
flags |= CLI_CursorAtEnd;
}
bool32 set_fancy_font = false;
b32 set_fancy_font = false;
if (command->out.size > 0){
buffer_id = buffer_identifier(command->out.str, command->out.size);
@ -1012,7 +1012,7 @@ exec_project_command(Application_Links *app, Project_Command *command){
}
static void
exec_project_command_by_index(Application_Links *app, int32_t command_index){
exec_project_command_by_index(Application_Links *app, i32 command_index){
if (!current_project.loaded){
return;
}
@ -1024,11 +1024,11 @@ exec_project_command_by_index(Application_Links *app, int32_t command_index){
}
static void
exec_project_fkey_command(Application_Links *app, int32_t fkey_index){
exec_project_fkey_command(Application_Links *app, i32 fkey_index){
if (!current_project.loaded){
return;
}
int32_t command_index = current_project.fkey_commands[fkey_index];
i32 command_index = current_project.fkey_commands[fkey_index];
if (command_index < 0 || command_index >= current_project.command_array.count){
return;
}
@ -1042,7 +1042,7 @@ exec_project_command_by_name(Application_Links *app, String name){
return;
}
Project_Command *command = current_project.command_array.commands;
for (int32_t i = 0; i < current_project.command_array.count; ++i, ++command){
for (i32 i = 0; i < current_project.command_array.count; ++i, ++command){
if (match(command->name, name)){
exec_project_command(app, command);
break;
@ -1091,8 +1091,8 @@ CUSTOM_COMMAND_SIG(project_fkey_command)
CUSTOM_DOC("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.")
{
User_Input input = get_command_input(app);
bool32 got_ind = false;
int32_t ind = 0;
b32 got_ind = false;
i32 ind = 0;
if (input.key.keycode >= key_f1 && input.key.keycode <= key_f16){
ind = (input.key.keycode - key_f1);
got_ind = true;
@ -1127,12 +1127,12 @@ project_is_setup(Application_Links *app, Partition *scratch, String script_path,
Temp_Memory temp = begin_temp_memory(scratch);
static int32_t needed_extra_space = 15;
static i32 needed_extra_space = 15;
char *space = push_array(&global_part, char, script_path.size + needed_extra_space);
String str = make_string_cap(space, 0, script_path.size + needed_extra_space);
copy(&str, script_path);
int32_t dir_len = str.size;
i32 dir_len = str.size;
append(&str, "/");
append(&str, script_file);
append(&str, ".bat");
@ -1157,11 +1157,11 @@ project_is_setup(Application_Links *app, Partition *scratch, String script_path,
static Project_Key_Strings
project_key_strings_query_user(Application_Links *app,
bool32 get_script_file, bool32 get_code_file,
char *script_file_space, int32_t script_file_cap,
char *code_file_space, int32_t code_file_cap,
char *output_dir_space, int32_t output_dir_cap,
char *binary_file_space, int32_t binary_file_cap){
b32 get_script_file, b32 get_code_file,
char *script_file_space, i32 script_file_cap,
char *code_file_space, i32 code_file_cap,
char *output_dir_space, i32 output_dir_cap,
char *binary_file_space, i32 binary_file_cap){
Project_Key_Strings keys = {};
Query_Bar script_file_bar = {};
@ -1210,11 +1210,11 @@ project_key_strings_query_user(Application_Links *app,
return(keys);
}
static bool32
static b32
project_generate_bat_script(Partition *scratch, String opts, String compiler,
String script_path, String script_file,
String code_file, String output_dir, String binary_file){
bool32 success = false;
b32 success = false;
Temp_Memory temp = begin_temp_memory(scratch);
@ -1226,7 +1226,7 @@ project_generate_bat_script(Partition *scratch, String opts, String compiler,
replace_char(&od, '/', '\\');
replace_char(&bf, '/', '\\');
int32_t space_cap = part_remaining(scratch);
i32 space_cap = part_remaining(scratch);
char *space = push_array(scratch, char, space_cap);
String file_name = make_string_cap(space, 0, space_cap);
append(&file_name, script_path);
@ -1255,11 +1255,11 @@ project_generate_bat_script(Partition *scratch, String opts, String compiler,
return(success);
}
static bool32
static b32
project_generate_sh_script(Partition *scratch, String opts, String compiler,
String script_path, String script_file,
String code_file, String output_dir, String binary_file){
bool32 success = false;
b32 success = false;
Temp_Memory temp = begin_temp_memory(scratch);
@ -1267,7 +1267,7 @@ project_generate_sh_script(Partition *scratch, String opts, String compiler,
String od = output_dir;
String bf = binary_file;
int32_t space_cap = part_remaining(scratch);
i32 space_cap = part_remaining(scratch);
char *space = push_array(scratch, char, space_cap);
String file_name = make_string_cap(space, 0, space_cap);
append(&file_name, script_path);
@ -1298,11 +1298,11 @@ project_generate_sh_script(Partition *scratch, String opts, String compiler,
return(success);
}
static bool32
static b32
project_generate_project_4coder_file(Partition *scratch,
String script_path, String script_file,
String output_dir, String binary_file){
bool32 success = false;
b32 success = false;
Temp_Memory temp = begin_temp_memory(scratch);
@ -1318,7 +1318,7 @@ project_generate_project_4coder_file(Partition *scratch,
replace_str(&od_win, "/", "\\\\");
replace_str(&bf_win, "/", "\\\\");
int32_t space_cap = part_remaining(scratch);
i32 space_cap = part_remaining(scratch);
char *space = push_array(scratch, char, space_cap);
String file_name = make_string_cap(space, 0, space_cap);
append(&file_name, script_path);
@ -1385,13 +1385,13 @@ project_generate_project_4coder_file(Partition *scratch,
static void
project_setup_scripts__generic(Application_Links *app, Partition *scratch,
bool32 do_project_file,
bool32 do_bat_script,
bool32 do_sh_script){
b32 do_project_file,
b32 do_bat_script,
b32 do_sh_script){
Temp_Memory temp = begin_temp_memory(scratch);
String script_path = get_hot_directory(app, scratch);
bool32 needs_to_do_work = false;
b32 needs_to_do_work = false;
Project_Setup_Status status = {};
if (do_project_file){
status = project_is_setup(app, scratch, script_path, make_lit_string("build"));
@ -1411,8 +1411,8 @@ project_setup_scripts__generic(Application_Links *app, Partition *scratch,
char output_dir_space [1024];
char binary_file_space[1024];
bool32 get_script_file = !do_project_file;
bool32 get_code_file =
b32 get_script_file = !do_project_file;
b32 get_code_file =
(do_bat_script && !status.bat_exists) ||
(do_sh_script && !status.sh_exists);
@ -1518,8 +1518,8 @@ CUSTOM_DOC("Queries the user for several configuration options and initializes a
static void
activate_project_command(Application_Links *app, Partition *scratch, Heap *heap,
View_Summary *view, Lister_State *state,
String text_field, void *user_data, bool32 activated_by_mouse){
int32_t command_index = (int32_t)PtrAsInt(user_data);
String text_field, void *user_data, b32 activated_by_mouse){
i32 command_index = (i32)PtrAsInt(user_data);
exec_project_command_by_index(app, command_index);
lister_default(app, scratch, heap, view, state, ListerActivation_Finished);
}
@ -1536,9 +1536,9 @@ CUSTOM_DOC("Open a lister of all commands in the currently loaded project.")
View_Summary view = get_active_view(app, AccessAll);
view_end_ui_mode(app, &view);
Temp_Memory temp = begin_temp_memory(arena);
int32_t option_count = current_project.command_array.count;
i32 option_count = current_project.command_array.count;
Lister_Option *options = push_array(arena, Lister_Option, option_count);
for (int32_t i = 0; i < current_project.command_array.count; i += 1){
for (i32 i = 0; i < current_project.command_array.count; i += 1){
options[i].string = string_push_copy(arena, current_project.command_array.commands[i].name);
options[i].status = string_push_copy(arena, current_project.command_array.commands[i].cmd);
options[i].user_data = IntAsPtr(i);

View File

@ -19,36 +19,36 @@ struct Project_File_Pattern{
struct Project_File_Pattern_Array{
Project_File_Pattern *patterns;
int32_t count;
i32 count;
};
struct Project_File_Load_Path{
String path;
bool32 recursive;
bool32 relative;
b32 recursive;
b32 relative;
};
struct Project_File_Load_Path_Array{
Project_File_Load_Path *paths;
int32_t count;
i32 count;
};
struct Project_Command{
String name;
String cmd;
String out;
bool32 footer_panel;
bool32 save_dirty_files;
bool32 cursor_at_end;
b32 footer_panel;
b32 save_dirty_files;
b32 cursor_at_end;
};
struct Project_Command_Array{
Project_Command *commands;
int32_t count;
i32 count;
};
struct Project{
bool32 loaded;
b32 loaded;
String dir;
String name;
@ -58,10 +58,10 @@ struct Project{
Project_File_Load_Path_Array load_path_array;
Project_Command_Array command_array;
int32_t fkey_commands[16];
i32 fkey_commands[16];
};
typedef int32_t Project_OS_Match_Level;
typedef i32 Project_OS_Match_Level;
enum{
ProjectOSMatchLevel_NoMatch = 0,
ProjectOSMatchLevel_PassiveMatch = 1,
@ -76,14 +76,14 @@ struct Project_Parse_Result{
///////////////////////////////
struct Project_Setup_Status{
bool32 bat_exists;
bool32 sh_exists;
bool32 project_exists;
bool32 everything_exists;
b32 bat_exists;
b32 sh_exists;
b32 project_exists;
b32 everything_exists;
};
struct Project_Key_Strings{
bool32 success;
b32 success;
String script_file;
String code_file;
String output_dir;

View File

@ -4,13 +4,13 @@
// TOP
static bool32 parse_statement_down(Application_Links *app, Statement_Parser *parser, Cpp_Token *token_out);
static float scope_center_threshold = 0.75f;
static b32 parse_statement_down(Application_Links *app, Statement_Parser *parser, Cpp_Token *token_out);
static f32 scope_center_threshold = 0.75f;
////////////////////////////////
static Find_Scope_Token_Type
find_scope_get_token_type(uint32_t flags, Cpp_Token_Type token_type){
find_scope_get_token_type(u32 flags, Cpp_Token_Type token_type){
Find_Scope_Token_Type type = FindScopeTokenType_None;
if (flags & FindScope_Brace){
switch (token_type){
@ -39,15 +39,15 @@ find_scope_get_token_type(uint32_t flags, Cpp_Token_Type token_type){
return(type);
}
static bool32
find_scope_top(Application_Links *app, Buffer_Summary *buffer, int32_t start_pos, uint32_t flags, int32_t *end_pos_out){
static b32
find_scope_top(Application_Links *app, Buffer_Summary *buffer, i32 start_pos, u32 flags, i32 *end_pos_out){
Cpp_Get_Token_Result get_result = {};
bool32 success = false;
int32_t position = 0;
b32 success = false;
i32 position = 0;
if (buffer_get_token_index(app, buffer, start_pos, &get_result)){
int32_t token_index = get_result.token_index;
i32 token_index = get_result.token_index;
if (flags & FindScope_Parent){
--token_index;
if (get_result.in_whitespace_after_token){
@ -61,7 +61,7 @@ find_scope_top(Application_Links *app, Buffer_Summary *buffer, int32_t start_pos
if (token_range.first != 0){
Token_Iterator token_it = make_token_iterator(token_range, token_index);
int32_t nest_level = 0;
i32 nest_level = 0;
for (Cpp_Token *token = token_iterator_current(&token_it);
token != 0;
token = token_iterator_goto_prev(&token_it)){
@ -96,15 +96,15 @@ find_scope_top(Application_Links *app, Buffer_Summary *buffer, int32_t start_pos
return(success);
}
static bool32
find_scope_bottom(Application_Links *app, Buffer_Summary *buffer, int32_t start_pos, uint32_t flags, int32_t *end_pos_out){
static b32
find_scope_bottom(Application_Links *app, Buffer_Summary *buffer, i32 start_pos, u32 flags, i32 *end_pos_out){
Cpp_Get_Token_Result get_result = {};
bool32 success = false;
int32_t position = 0;
b32 success = false;
i32 position = 0;
if (buffer_get_token_index(app, buffer, start_pos, &get_result)){
int32_t token_index = get_result.token_index + 1;
i32 token_index = get_result.token_index + 1;
if (flags & FindScope_Parent){
--token_index;
if (get_result.in_whitespace_after_token){
@ -118,7 +118,7 @@ find_scope_bottom(Application_Links *app, Buffer_Summary *buffer, int32_t start_
if (token_range.first != 0){
Token_Iterator token_it = make_token_iterator(token_range, token_index);
int32_t nest_level = 0;
i32 nest_level = 0;
for (Cpp_Token *token = token_iterator_current(&token_it);
token != 0;
token = token_iterator_goto_next(&token_it)){
@ -153,15 +153,15 @@ find_scope_bottom(Application_Links *app, Buffer_Summary *buffer, int32_t start_
return(success);
}
static bool32
find_next_scope(Application_Links *app, Buffer_Summary *buffer, int32_t start_pos, uint32_t flags, int32_t *end_pos_out){
static b32
find_next_scope(Application_Links *app, Buffer_Summary *buffer, i32 start_pos, u32 flags, i32 *end_pos_out){
Cpp_Get_Token_Result get_result = {};
bool32 success = 0;
int32_t position = 0;
b32 success = 0;
i32 position = 0;
if (buffer_get_token_index(app, buffer, start_pos, &get_result)){
int32_t token_index = get_result.token_index+1;
i32 token_index = get_result.token_index+1;
if (token_index >= 0){
Token_Range token_range = buffer_get_token_range(app, buffer->buffer_id);
@ -170,7 +170,7 @@ find_next_scope(Application_Links *app, Buffer_Summary *buffer, int32_t start_po
Token_Iterator token_it = make_token_iterator(token_range, token_index);
if ((flags & FindScope_NextSibling) != 0){
int32_t nest_level = 1;
i32 nest_level = 1;
for (Cpp_Token *token = token_iterator_current(&token_it);
token != 0;
token = token_iterator_goto_next(&token_it)){
@ -227,15 +227,15 @@ find_next_scope(Application_Links *app, Buffer_Summary *buffer, int32_t start_po
return(success);
}
static bool32
find_prev_scope(Application_Links *app, Buffer_Summary *buffer, int32_t start_pos, uint32_t flags, int32_t *end_pos_out){
static b32
find_prev_scope(Application_Links *app, Buffer_Summary *buffer, i32 start_pos, u32 flags, i32 *end_pos_out){
Cpp_Get_Token_Result get_result = {};
bool32 success = false;
int32_t position = 0;
b32 success = false;
i32 position = 0;
if (buffer_get_token_index(app, buffer, start_pos, &get_result)){
int32_t token_index = get_result.token_index-1;
i32 token_index = get_result.token_index-1;
if (token_index >= 0){
Token_Range token_range = buffer_get_token_range(app, buffer->buffer_id);
@ -244,7 +244,7 @@ find_prev_scope(Application_Links *app, Buffer_Summary *buffer, int32_t start_po
Token_Iterator token_it = make_token_iterator(token_range, token_index);
if (flags & FindScope_NextSibling){
int32_t nest_level = -1;
i32 nest_level = -1;
for (Cpp_Token *token = token_iterator_current(&token_it);
token != 0;
token = token_iterator_goto_prev(&token_it)){
@ -301,9 +301,9 @@ find_prev_scope(Application_Links *app, Buffer_Summary *buffer, int32_t start_po
return(success);
}
static bool32
find_scope_range(Application_Links *app, Buffer_Summary *buffer, int32_t start_pos, Range *range_out,
uint32_t flags){
static b32
find_scope_range(Application_Links *app, Buffer_Summary *buffer, i32 start_pos, Range *range_out,
u32 flags){
Range range = {};
if (find_scope_top(app, buffer, start_pos,
FindScope_Parent|flags,
@ -319,9 +319,9 @@ find_scope_range(Application_Links *app, Buffer_Summary *buffer, int32_t start_p
}
static void
view_set_to_region(Application_Links *app, View_Summary *view, int32_t major_pos, int32_t minor_pos, float normalized_threshold){
view_set_to_region(Application_Links *app, View_Summary *view, i32 major_pos, i32 minor_pos, f32 normalized_threshold){
Range range = make_range(major_pos, minor_pos);
bool32 bottom_major = false;
b32 bottom_major = false;
if (major_pos == range.max){
bottom_major = true;
}
@ -330,20 +330,20 @@ view_set_to_region(Application_Links *app, View_Summary *view, int32_t major_pos
Full_Cursor bottom = {};
if (view_compute_cursor(app, view, seek_pos(range.min), &top)){
if (view_compute_cursor(app, view, seek_pos(range.max), &bottom)){
float top_y = top.wrapped_y;
float bottom_y = bottom.wrapped_y;
f32 top_y = top.wrapped_y;
f32 bottom_y = bottom.wrapped_y;
if (view->unwrapped_lines){
top_y = top.unwrapped_y;
bottom_y = bottom.unwrapped_y;
}
GUI_Scroll_Vars scroll = view->scroll_vars;
float half_view_height = .5f*(float)(view->file_region.y1 - view->file_region.y0);
float threshold = normalized_threshold * half_view_height;
float current_center_y = ((float)scroll.target_y) + half_view_height;
f32 half_view_height = .5f*(f32)(view->file_region.y1 - view->file_region.y0);
f32 threshold = normalized_threshold * half_view_height;
f32 current_center_y = ((f32)scroll.target_y) + half_view_height;
if (top_y < current_center_y - threshold || bottom_y > current_center_y + threshold){
float center_target_y = .5f*(top_y + bottom_y);
f32 center_target_y = .5f*(top_y + bottom_y);
if (bottom_major){
if (center_target_y < bottom_y - half_view_height * .9f){
@ -356,12 +356,12 @@ view_set_to_region(Application_Links *app, View_Summary *view, int32_t major_pos
}
}
float target_y = center_target_y - half_view_height;
f32 target_y = center_target_y - half_view_height;
if (target_y < 0){
target_y = 0;
}
scroll.target_y = (int32_t)(target_y);
scroll.target_y = (i32)(target_y);
view_set_scroll(app, view, scroll);
}
}
@ -371,7 +371,7 @@ view_set_to_region(Application_Links *app, View_Summary *view, int32_t major_pos
CUSTOM_COMMAND_SIG(select_surrounding_scope)
CUSTOM_DOC("Finds the scope enclosed by '{' '}' surrounding the cursor and puts the cursor and mark on the '{' and '}'.")
{
uint32_t access = AccessProtected;
u32 access = AccessProtected;
View_Summary view = get_active_view(app, access);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
@ -387,13 +387,13 @@ CUSTOM_DOC("Finds the scope enclosed by '{' '}' surrounding the cursor and puts
CUSTOM_COMMAND_SIG(select_next_scope_absolute)
CUSTOM_DOC("Finds the first scope started by '{' after the cursor and puts the cursor and mark on the '{' and '}'.")
{
uint32_t access = AccessProtected;
u32 access = AccessProtected;
View_Summary view = get_active_view(app, access);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
int32_t start_pos = view.cursor.pos;
int32_t top = 0;
int32_t bottom = 0;
i32 start_pos = view.cursor.pos;
i32 top = 0;
i32 bottom = 0;
if (find_next_scope(app, &buffer, start_pos, FindScope_Brace, &top)){
if (find_scope_bottom(app, &buffer, top, FindScope_EndOfToken|FindScope_Brace, &bottom)){
view_set_cursor(app, &view, seek_pos(top), true);
@ -407,12 +407,12 @@ CUSTOM_DOC("Finds the first scope started by '{' after the cursor and puts the c
CUSTOM_COMMAND_SIG(select_prev_scope_absolute)
CUSTOM_DOC("Finds the first scope started by '{' before the cursor and puts the cursor and mark on the '{' and '}'.")
{
uint32_t access = AccessProtected;
u32 access = AccessProtected;
View_Summary view = get_active_view(app, access);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
int32_t start_pos = view.cursor.pos;
int32_t top = 0, bottom = 0;
i32 start_pos = view.cursor.pos;
i32 top = 0, bottom = 0;
if (find_prev_scope(app, &buffer, start_pos, FindScope_Brace, &top)){
if (find_scope_bottom(app, &buffer, top, FindScope_EndOfToken|FindScope_Brace, &bottom)){
view_set_cursor(app, &view, seek_pos(top), true);
@ -435,13 +435,13 @@ place_begin_and_end_on_own_lines(Application_Links *app, Partition *scratch, cha
range.min = buffer_get_line_start(app, &buffer, lines.min);
range.max = buffer_get_line_end(app, &buffer, lines.max);
bool32 do_full = (lines.min < lines.max) || (!buffer_line_is_blank(app, &buffer, lines.min));
b32 do_full = (lines.min < lines.max) || (!buffer_line_is_blank(app, &buffer, lines.min));
Temp_Memory temp = begin_temp_memory(scratch);
int32_t begin_len = str_size(begin);
int32_t end_len = str_size(end);
i32 begin_len = str_size(begin);
i32 end_len = str_size(end);
int32_t str_size = begin_len + end_len + 2;
i32 str_size = begin_len + end_len + 2;
char *str = push_array(scratch, char, str_size);
String builder = make_string_cap(str, 0, str_size);
append(&builder, begin);
@ -452,8 +452,8 @@ place_begin_and_end_on_own_lines(Application_Links *app, Partition *scratch, cha
if (do_full){
Buffer_Edit edits[2];
int32_t min_adjustment = 0;
int32_t max_adjustment = 4;
i32 min_adjustment = 0;
i32 max_adjustment = 4;
if (buffer_line_is_blank(app, &buffer, lines.min)){
memmove(str + 1, str, begin_len);
@ -467,11 +467,11 @@ place_begin_and_end_on_own_lines(Application_Links *app, Partition *scratch, cha
--max_adjustment;
}
int32_t min_pos = range.min + min_adjustment;
int32_t max_pos = range.max + max_adjustment;
i32 min_pos = range.min + min_adjustment;
i32 max_pos = range.max + max_adjustment;
int32_t cursor_pos = min_pos;
int32_t mark_pos = max_pos;
i32 cursor_pos = min_pos;
i32 mark_pos = max_pos;
if (view.cursor.pos > view.mark.pos){
cursor_pos = max_pos;
@ -495,7 +495,7 @@ place_begin_and_end_on_own_lines(Application_Links *app, Partition *scratch, cha
}
else{
buffer_replace_range(app, &buffer, range.min, range.max, str, str_size);
int32_t center_pos = range.min + begin_len + 1;
i32 center_pos = range.min + begin_len + 1;
view_set_cursor(app, &view, seek_pos(center_pos), true);
view_set_mark(app, &view, seek_pos(center_pos));
}
@ -512,22 +512,22 @@ CUSTOM_DOC("Wraps the code contained in the range between cursor and mark with a
CUSTOM_COMMAND_SIG(delete_current_scope)
CUSTOM_DOC("Deletes the braces surrounding the currently selected scope. Leaves the contents within the scope.")
{
uint32_t access = AccessOpen;
u32 access = AccessOpen;
View_Summary view = get_active_view(app, access);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
int32_t top = view.cursor.pos;
int32_t bottom = view.mark.pos;
i32 top = view.cursor.pos;
i32 bottom = view.mark.pos;
if (top > bottom){
int32_t x = top;
i32 x = top;
top = bottom;
bottom = x;
}
if (buffer_get_char(app, &buffer, top) == '{' && buffer_get_char(app, &buffer, bottom-1) == '}'){
int32_t top_len = 1;
int32_t bottom_len = 1;
i32 top_len = 1;
i32 bottom_len = 1;
if (buffer_get_char(app, &buffer, top-1) == '\n'){
top_len = 2;
}
@ -555,12 +555,12 @@ parser_next_token(Statement_Parser *parser){
return(token_iterator_goto_next(&parser->token_iterator));
}
static bool32
static b32
parse_for_down(Application_Links *app, Statement_Parser *parser, Cpp_Token *token_out){
bool32 success = false;
b32 success = false;
Cpp_Token *token = parser_next_token(parser);
int32_t paren_level = 0;
i32 paren_level = 0;
while (token != 0){
if (!(token->flags & CPP_TFLAG_PP_BODY)){
switch (token->type){
@ -591,9 +591,9 @@ parse_for_down(Application_Links *app, Statement_Parser *parser, Cpp_Token *toke
return(success);
}
static bool32
static b32
parse_if_down(Application_Links *app, Statement_Parser *parser, Cpp_Token *token_out){
bool32 success = false;
b32 success = false;
Cpp_Token *token = parser_next_token(parser);
if (token != 0){
@ -613,12 +613,12 @@ parse_if_down(Application_Links *app, Statement_Parser *parser, Cpp_Token *token
return(success);
}
static bool32
static b32
parse_block_down(Application_Links *app, Statement_Parser *parser, Cpp_Token *token_out){
bool32 success = false;
b32 success = false;
Cpp_Token *token = parser_next_token(parser);
int32_t nest_level = 0;
i32 nest_level = 0;
while (token != 0){
switch (token->type){
case CPP_TOKEN_BRACE_OPEN:
@ -643,13 +643,13 @@ parse_block_down(Application_Links *app, Statement_Parser *parser, Cpp_Token *to
return(success);
}
static bool32
static b32
parse_statement_down(Application_Links *app, Statement_Parser *parser, Cpp_Token *token_out){
bool32 success = false;
b32 success = false;
Cpp_Token *token = parser_next_token(parser);
if (token != 0){
bool32 not_getting_block = false;
b32 not_getting_block = false;
do{
switch (token->type){
@ -706,7 +706,7 @@ parse_statement_down(Application_Links *app, Statement_Parser *parser, Cpp_Token
}
static Statement_Parser
make_statement_parser(Application_Links *app, Buffer_Summary *buffer, int32_t token_index){
make_statement_parser(Application_Links *app, Buffer_Summary *buffer, i32 token_index){
Statement_Parser parser = {};
Token_Range token_range = buffer_get_token_range(app, buffer->buffer_id);
if (token_range.first != 0){
@ -716,11 +716,11 @@ make_statement_parser(Application_Links *app, Buffer_Summary *buffer, int32_t to
return(parser);
}
static bool32
find_whole_statement_down(Application_Links *app, Buffer_Summary *buffer, int32_t pos, int32_t *start_out, int32_t *end_out){
bool32 result = false;
int32_t start = pos;
int32_t end = start;
static b32
find_whole_statement_down(Application_Links *app, Buffer_Summary *buffer, i32 pos, i32 *start_out, i32 *end_out){
b32 result = false;
i32 start = pos;
i32 end = start;
Cpp_Get_Token_Result get_result = {};
@ -747,15 +747,15 @@ find_whole_statement_down(Application_Links *app, Buffer_Summary *buffer, int32_
CUSTOM_COMMAND_SIG(scope_absorb_down)
CUSTOM_DOC("If a scope is currently selected, and a statement or block statement is present below the current scope, the statement is moved into the scope.")
{
uint32_t access = AccessOpen;
u32 access = AccessOpen;
View_Summary view = get_active_view(app, access);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, access);
int32_t top = view.cursor.pos;
int32_t bottom = view.mark.pos;
i32 top = view.cursor.pos;
i32 bottom = view.mark.pos;
if (top > bottom){
int32_t x = top;
i32 x = top;
top = bottom;
bottom = x;
}
@ -772,19 +772,19 @@ CUSTOM_DOC("If a scope is currently selected, and a statement or block statement
String string = make_string(string_space, range.end - range.start);
string = skip_chop_whitespace(string);
int32_t newline_count = 0;
i32 newline_count = 0;
for (char *ptr = string_space; ptr < string.str; ++ptr){
if (*ptr == '\n'){
++newline_count;
}
}
bool32 extra_newline = false;
b32 extra_newline = false;
if (newline_count >= 2){
extra_newline = true;
}
int32_t edit_len = string.size + 1;
i32 edit_len = string.size + 1;
if (extra_newline){
edit_len += 1;
}

View File

@ -162,8 +162,8 @@ search_hit_add(Heap *heap, Table *hits, String_Space *space, char *str, int32_t
static void
seek_potential_match(Application_Links *app, Search_Range *range, Search_Key key, Search_Match *result, Seek_Potential_Match_Direction direction, int32_t start_pos, int32_t end_pos){
bool32 case_insensitive = ((range->flags & SearchFlag_CaseInsensitive) != 0);
bool32 forward = (direction == SeekPotentialMatch_Forward);
b32 case_insensitive = ((range->flags & SearchFlag_CaseInsensitive) != 0);
b32 forward = (direction == SeekPotentialMatch_Forward);
#define OptFlag(b,f) ((b)?(f):(0))
Buffer_Seek_String_Flags flags = 0
| OptFlag(case_insensitive, BufferSeekString_CaseInsensitive)
@ -517,7 +517,7 @@ initialize_generic_search_all_buffers(Application_Links *app, Heap *heap, String
int32_t j = 0;
if (buffer.exists){
bool32 skip = false;
b32 skip = false;
for (int32_t i = 0; i < skip_buffer_count; ++i){
if (buffer.buffer_id == skip_buffers[i]){
skip = true;
@ -542,7 +542,7 @@ initialize_generic_search_all_buffers(Application_Links *app, Heap *heap, String
continue;
}
bool32 skip = false;
b32 skip = false;
for (int32_t i = 0; i < skip_buffer_count; ++i){
if (buffer_it.buffer_id == skip_buffers[i]){
skip = true;
@ -577,7 +577,7 @@ buffered_print_flush(Application_Links *app, Partition *part, Temp_Memory temp,
}
static char*
buffered_memory_reserve(Application_Links *app, Partition *part, Temp_Memory temp, Buffer_Summary *output_buffer, int32_t length, bool32 *did_flush){
buffered_memory_reserve(Application_Links *app, Partition *part, Temp_Memory temp, Buffer_Summary *output_buffer, int32_t length, b32 *did_flush){
char *mem = push_array(part, char, length);
*did_flush = false;
if (mem == 0){
@ -592,7 +592,7 @@ buffered_memory_reserve(Application_Links *app, Partition *part, Temp_Memory tem
static char*
buffered_memory_reserve(Application_Links *app, Partition *part, Temp_Memory temp, Buffer_Summary *output_buffer, int32_t length){
bool32 ignore;
b32 ignore;
return(buffered_memory_reserve(app, part, temp, output_buffer, length, &ignore));
}
@ -638,7 +638,7 @@ buffered_print_match_jump_line(Application_Links *app, Partition *part, Temp_Mem
#endif
#if 0
static bool32
static b32
search_buffer_edit_handler(Application_Links *app, Buffer_ID buffer_id, int32_t start, int32_t one_past_last, String text);
#endif
@ -673,7 +673,7 @@ list__parameters_buffer(Application_Links *app, Heap *heap, Partition *scratch,
Temp_Memory temp = begin_temp_memory(scratch);
Buffer_ID prev_match_id = 0;
bool32 no_matches = true;
b32 no_matches = true;
for (Search_Match match = search_next_match(app, &set, &iter);
match.found_match;
match = search_next_match(app, &set, &iter)){
@ -710,7 +710,7 @@ list__parameters_buffer(Application_Links *app, Heap *heap, Partition *scratch,
mirror_range_count = 0;
Assert(out_pos == search_buffer.size);
}
bool32 flushed = false;
b32 flushed = false;
int32_t str_len = file_len + 1 + line_num_len + 1 + column_num_len + 1 + 1 + line_str.size + 1;
char *spare = buffered_memory_reserve(app, scratch, temp, &search_buffer, str_len, &flushed);
if (flushed){
@ -778,7 +778,7 @@ list__parameters(Application_Links *app, Heap *heap, Partition *scratch, String
static void
list_single__parameters(Application_Links *app, Heap *heap, Partition *scratch,
String str, bool32 substrings, bool32 case_insensitive,
String str, b32 substrings, b32 case_insensitive,
View_Summary default_target_view){
Search_Range_Flag flags = 0;
if (substrings){
@ -795,7 +795,7 @@ list_single__parameters(Application_Links *app, Heap *heap, Partition *scratch,
static void
list_query__parameters(Application_Links *app, Heap *heap, Partition *scratch,
bool32 substrings, bool32 case_insensitive,
b32 substrings, b32 case_insensitive,
View_Summary default_target_view){
char space[1024];
String str = get_query_string(app, "List Locations For: ", space, sizeof(space));
@ -807,7 +807,7 @@ list_query__parameters(Application_Links *app, Heap *heap, Partition *scratch,
static void
list_identifier__parameters(Application_Links *app, Heap *heap, Partition *scratch,
bool32 substrings, bool32 case_insensitive,
b32 substrings, b32 case_insensitive,
View_Summary default_target_view){
View_Summary view = get_active_view(app, AccessProtected);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessProtected);
@ -822,7 +822,7 @@ list_identifier__parameters(Application_Links *app, Heap *heap, Partition *scrat
static void
list_selected_range__parameters(Application_Links *app, Heap *heap, Partition *scratch,
bool32 substrings, bool32 case_insensitive,
b32 substrings, b32 case_insensitive,
View_Summary default_target_view){
View_Summary view = get_active_view(app, AccessProtected);
Temp_Memory temp = begin_temp_memory(scratch);

View File

@ -4,13 +4,13 @@
// TOP
static int32_t
seek_line_end(Application_Links *app, Buffer_Summary *buffer, int32_t pos){
static i32
seek_line_end(Application_Links *app, Buffer_Summary *buffer, i32 pos){
char chunk[1024];
int32_t chunk_size = sizeof(chunk);
i32 chunk_size = sizeof(chunk);
Stream_Chunk stream = {};
int32_t still_looping;
i32 still_looping;
char at_pos;
if (init_stream_chunk(&stream, app, buffer, pos, chunk, chunk_size)){
@ -34,13 +34,13 @@ seek_line_end(Application_Links *app, Buffer_Summary *buffer, int32_t pos){
return(pos);
}
static int32_t
seek_line_beginning(Application_Links *app, Buffer_Summary *buffer, int32_t pos){
static i32
seek_line_beginning(Application_Links *app, Buffer_Summary *buffer, i32 pos){
char chunk[1024];
int32_t chunk_size = sizeof(chunk);
i32 chunk_size = sizeof(chunk);
Stream_Chunk stream = {};
int32_t still_looping;
i32 still_looping;
char at_pos;
--pos;
@ -72,12 +72,12 @@ static void
move_past_lead_whitespace(Application_Links *app, View_Summary *view, Buffer_Summary *buffer){
refresh_view(app, view);
int32_t new_pos = seek_line_beginning(app, buffer, view->cursor.pos);
i32 new_pos = seek_line_beginning(app, buffer, view->cursor.pos);
char space[1024];
Stream_Chunk chunk = {};
int32_t still_looping = false;
i32 still_looping = false;
int32_t i = new_pos;
i32 i = new_pos;
if (init_stream_chunk(&chunk, app, buffer, i, space, sizeof(space))){
do{
for (; i < chunk.end; ++i){
@ -96,10 +96,10 @@ move_past_lead_whitespace(Application_Links *app, View_Summary *view, Buffer_Sum
}
}
static int32_t
buffer_seek_whitespace_up(Application_Links *app, Buffer_Summary *buffer, int32_t pos){
static i32
buffer_seek_whitespace_up(Application_Links *app, Buffer_Summary *buffer, i32 pos){
char chunk[1024];
int32_t chunk_size = sizeof(chunk);
i32 chunk_size = sizeof(chunk);
Stream_Chunk stream = {};
char at_pos;
@ -108,7 +108,7 @@ buffer_seek_whitespace_up(Application_Links *app, Buffer_Summary *buffer, int32_
if (init_stream_chunk(&stream, app, buffer, pos, chunk, chunk_size)){
// Step 1: Find the first non-whitespace character
// behind the current position.
int32_t still_looping = 1;
i32 still_looping = 1;
while (still_looping){
for (; pos >= stream.start; --pos){
at_pos = stream.data[pos];
@ -125,7 +125,7 @@ buffer_seek_whitespace_up(Application_Links *app, Buffer_Summary *buffer, int32_
// no_hard to true, set it back to false if a
// non-whitespace character is discovered before
// the next '\n'
int32_t no_hard = false;
i32 no_hard = false;
while (still_looping){
for (; pos >= stream.start; --pos){
at_pos = stream.data[pos];
@ -153,16 +153,16 @@ buffer_seek_whitespace_up(Application_Links *app, Buffer_Summary *buffer, int32_
return(pos);
}
static int32_t
buffer_seek_whitespace_down(Application_Links *app, Buffer_Summary *buffer, int32_t pos){
static i32
buffer_seek_whitespace_down(Application_Links *app, Buffer_Summary *buffer, i32 pos){
char chunk[1024];
int32_t chunk_size = sizeof(chunk);
i32 chunk_size = sizeof(chunk);
Stream_Chunk stream = {};
if (init_stream_chunk(&stream, app, buffer, pos, chunk, chunk_size)){
// step 1: find the first non-whitespace character
// ahead of the current position.
bool32 still_looping = true;
b32 still_looping = true;
do{
for (; pos < stream.end; ++pos){
char at_pos = stream.data[pos];
@ -179,8 +179,8 @@ buffer_seek_whitespace_down(Application_Links *app, Buffer_Summary *buffer, int3
// the prev_endline value. if another '\n' is found
// with non-whitespace then the previous line was
// all whitespace.
bool32 no_hard = false;
int32_t prev_endline = -1;
b32 no_hard = false;
i32 prev_endline = -1;
while(still_looping){
for (; pos < stream.end; ++pos){
char at_pos = stream.data[pos];
@ -212,9 +212,9 @@ buffer_seek_whitespace_down(Application_Links *app, Buffer_Summary *buffer, int3
return(pos);
}
static int32_t
buffer_seek_whitespace_right(Application_Links *app, Buffer_Summary *buffer, int32_t pos){
int32_t result = buffer->size + 1;
static i32
buffer_seek_whitespace_right(Application_Links *app, Buffer_Summary *buffer, i32 pos){
i32 result = buffer->size + 1;
if (pos < 0){
pos = 0;
}
@ -224,13 +224,13 @@ buffer_seek_whitespace_right(Application_Links *app, Buffer_Summary *buffer, int
Stream_Chunk stream = {};
stream.add_null = true;
if (init_stream_chunk(&stream, app, buffer, pos, data_chunk, sizeof(data_chunk))){
bool32 still_looping = true;
bool32 is_whitespace_1 = true;
b32 still_looping = true;
b32 is_whitespace_1 = true;
is_whitespace_1 = char_is_whitespace(buffer_get_char(app, buffer, pos - 1));
do{
for (; pos < stream.end; ++pos){
char c2 = stream.data[pos];
bool32 is_whitespace_2 = true;
b32 is_whitespace_2 = true;
if (c2 != 0){
is_whitespace_2 = char_is_whitespace(c2);
}
@ -248,9 +248,9 @@ buffer_seek_whitespace_right(Application_Links *app, Buffer_Summary *buffer, int
return(result);
}
static int32_t
buffer_seek_whitespace_left(Application_Links *app, Buffer_Summary *buffer, int32_t pos){
int32_t result = -1;
static i32
buffer_seek_whitespace_left(Application_Links *app, Buffer_Summary *buffer, i32 pos){
i32 result = -1;
if (pos > buffer->size){
pos = buffer->size;
}
@ -259,12 +259,12 @@ buffer_seek_whitespace_left(Application_Links *app, Buffer_Summary *buffer, int3
char data_chunk[1024];
Stream_Chunk stream = {};
if (init_stream_chunk(&stream, app, buffer, pos, data_chunk, sizeof(data_chunk))){
bool32 still_looping = true;
bool32 is_whitespace_2 = char_is_whitespace(buffer_get_char(app, buffer, pos + 1));
b32 still_looping = true;
b32 is_whitespace_2 = char_is_whitespace(buffer_get_char(app, buffer, pos + 1));
do{
for (; pos >= stream.start; --pos){
char c1 = stream.data[pos];
bool32 is_whitespace_1 = char_is_whitespace(c1);
b32 is_whitespace_1 = char_is_whitespace(c1);
if (is_whitespace_1 && !is_whitespace_2){
result = pos + 1;
goto double_break;
@ -284,14 +284,14 @@ buffer_seek_whitespace_left(Application_Links *app, Buffer_Summary *buffer, int3
return(result);
}
static int32_t
buffer_seek_alphanumeric_right(Application_Links *app, Buffer_Summary *buffer, int32_t pos){
static i32
buffer_seek_alphanumeric_right(Application_Links *app, Buffer_Summary *buffer, i32 pos){
char data_chunk[1024];
Stream_Chunk stream = {};
if (init_stream_chunk(&stream, app, buffer, pos, data_chunk, sizeof(data_chunk))){
bool32 still_looping = true;
b32 still_looping = true;
do{
for (; pos < stream.end; ++pos){
if (char_is_alpha_numeric_true_utf8(stream.data[pos])){
@ -317,15 +317,15 @@ buffer_seek_alphanumeric_right(Application_Links *app, Buffer_Summary *buffer, i
return(pos);
}
static int32_t
buffer_seek_alphanumeric_left(Application_Links *app, Buffer_Summary *buffer, int32_t pos){
static i32
buffer_seek_alphanumeric_left(Application_Links *app, Buffer_Summary *buffer, i32 pos){
char data_chunk[1024];
Stream_Chunk stream = {};
--pos;
if (pos > 0){
if (init_stream_chunk(&stream, app, buffer, pos, data_chunk, sizeof(data_chunk))){
bool32 still_looping = true;
b32 still_looping = true;
do{
for (; pos >= stream.start; --pos){
if (char_is_alpha_numeric_true_utf8(stream.data[pos])){
@ -356,13 +356,13 @@ buffer_seek_alphanumeric_left(Application_Links *app, Buffer_Summary *buffer, in
return(pos);
}
static int32_t
buffer_seek_alphanumeric_or_underscore_right(Application_Links *app, Buffer_Summary *buffer, int32_t pos){
static i32
buffer_seek_alphanumeric_or_underscore_right(Application_Links *app, Buffer_Summary *buffer, i32 pos){
char data_chunk[1024];
Stream_Chunk stream = {};
if (init_stream_chunk(&stream, app, buffer, pos, data_chunk, sizeof(data_chunk))){
bool32 still_looping = true;
b32 still_looping = true;
do{
for (; pos < stream.end; ++pos){
if (char_is_alpha_numeric_utf8(stream.data[pos])){
@ -388,8 +388,8 @@ buffer_seek_alphanumeric_or_underscore_right(Application_Links *app, Buffer_Summ
return(pos);
}
static int32_t
buffer_seek_alphanumeric_or_underscore_left(Application_Links *app, Buffer_Summary *buffer, int32_t pos){
static i32
buffer_seek_alphanumeric_or_underscore_left(Application_Links *app, Buffer_Summary *buffer, i32 pos){
char data_chunk[1024];
Stream_Chunk stream = {};
@ -397,7 +397,7 @@ buffer_seek_alphanumeric_or_underscore_left(Application_Links *app, Buffer_Summa
if (pos > 0){
if (init_stream_chunk(&stream, app, buffer, pos, data_chunk, sizeof(data_chunk))){
bool32 still_looping = true;
b32 still_looping = true;
do{
for (; pos >= stream.start; --pos){
if (char_is_alpha_numeric_utf8(stream.data[pos])){
@ -428,8 +428,8 @@ buffer_seek_alphanumeric_or_underscore_left(Application_Links *app, Buffer_Summa
return(pos);
}
static int32_t
buffer_seek_range_camel_right(Application_Links *app, Buffer_Summary *buffer, int32_t pos, int32_t an_pos){
static i32
buffer_seek_range_camel_right(Application_Links *app, Buffer_Summary *buffer, i32 pos, i32 an_pos){
char data_chunk[1024];
Stream_Chunk stream = {};
@ -441,7 +441,7 @@ buffer_seek_range_camel_right(Application_Links *app, Buffer_Summary *buffer, in
uint8_t c = 0, pc = stream.data[pos];
++pos;
bool32 still_looping = false;
b32 still_looping = false;
do{
for (; pos < stream.end; ++pos){
c = stream.data[pos];
@ -462,8 +462,8 @@ buffer_seek_range_camel_right(Application_Links *app, Buffer_Summary *buffer, in
return(pos);
}
static int32_t
buffer_seek_range_camel_left(Application_Links *app, Buffer_Summary *buffer, int32_t pos, int32_t an_pos){
static i32
buffer_seek_range_camel_left(Application_Links *app, Buffer_Summary *buffer, i32 pos, i32 an_pos){
char data_chunk[1024];
Stream_Chunk stream = {};
@ -474,7 +474,7 @@ buffer_seek_range_camel_left(Application_Links *app, Buffer_Summary *buffer, int
char c = 0, pc = stream.data[pos];
bool32 still_looping = false;
b32 still_looping = false;
do{
for (; pos >= stream.start; --pos){
c = stream.data[pos];
@ -495,24 +495,24 @@ buffer_seek_range_camel_left(Application_Links *app, Buffer_Summary *buffer, int
return(pos);
}
static int32_t
buffer_seek_alphanumeric_or_camel_right(Application_Links *app, Buffer_Summary *buffer, int32_t pos){
int32_t an_pos = buffer_seek_alphanumeric_right(app, buffer, pos);
int32_t result = buffer_seek_range_camel_right(app, buffer, pos, an_pos);
static i32
buffer_seek_alphanumeric_or_camel_right(Application_Links *app, Buffer_Summary *buffer, i32 pos){
i32 an_pos = buffer_seek_alphanumeric_right(app, buffer, pos);
i32 result = buffer_seek_range_camel_right(app, buffer, pos, an_pos);
return(result);
}
static int32_t
buffer_seek_alphanumeric_or_camel_left(Application_Links *app, Buffer_Summary *buffer, int32_t pos){
int32_t an_pos = buffer_seek_alphanumeric_left(app, buffer, pos);
int32_t result = buffer_seek_range_camel_left(app, buffer, pos, an_pos);
static i32
buffer_seek_alphanumeric_or_camel_left(Application_Links *app, Buffer_Summary *buffer, i32 pos){
i32 an_pos = buffer_seek_alphanumeric_left(app, buffer, pos);
i32 result = buffer_seek_range_camel_left(app, buffer, pos, an_pos);
return(result);
}
static int32_t
seek_token_left(Cpp_Token_Array *tokens, int32_t pos){
int32_t result = -1;
int32_t token_get_pos = pos - 1;
static i32
seek_token_left(Cpp_Token_Array *tokens, i32 pos){
i32 result = -1;
i32 token_get_pos = pos - 1;
Cpp_Get_Token_Result get = cpp_get_token(*tokens, token_get_pos);
if (get.token_index >= 0){
result = get.token_start;
@ -520,9 +520,9 @@ seek_token_left(Cpp_Token_Array *tokens, int32_t pos){
return(result);
}
static int32_t
seek_token_right(Cpp_Token_Array *tokens, int32_t pos, int32_t buffer_end){
int32_t result = buffer_end + 1;
static i32
seek_token_right(Cpp_Token_Array *tokens, i32 pos, i32 buffer_end){
i32 result = buffer_end + 1;
Cpp_Get_Token_Result get = cpp_get_token(*tokens, pos);
if (get.in_whitespace_after_token){
get.token_index += 1;
@ -551,8 +551,8 @@ buffer_get_all_tokens(Application_Links *app, Partition *part, Buffer_Summary *b
return(array);
}
static int32_t
buffer_boundary_seek(Application_Links *app, Buffer_Summary *buffer, Partition *part, int32_t start_pos, bool32 seek_forward, Seek_Boundary_Flag flags)/*
static i32
buffer_boundary_seek(Application_Links *app, Buffer_Summary *buffer, Partition *part, i32 start_pos, b32 seek_forward, Seek_Boundary_Flag flags)/*
DOC_PARAM(buffer, The buffer parameter specifies the buffer through which to seek.)
DOC_PARAM(start_pos, The beginning position of the seek is specified by start_pos measured in absolute position.)
DOC_PARAM(seek_forward, If this parameter is non-zero it indicates that the seek should move foward through the buffer.)
@ -565,14 +565,14 @@ If the seek goes past the end the returned value is the size of the buffer.)
DOC_SEE(Seek_Boundary_Flag)
DOC_SEE(4coder_Buffer_Positioning_System)
*/{
int32_t result = 0;
i32 result = 0;
// TODO(allen): reduce duplication?
Temp_Memory temp = begin_temp_memory(part);
if (buffer->exists){
int32_t pos[4];
int32_t size = buffer->size;
int32_t new_pos = 0;
i32 pos[4];
i32 size = buffer->size;
i32 new_pos = 0;
if (start_pos < 0){
start_pos = 0;
@ -582,7 +582,7 @@ DOC_SEE(4coder_Buffer_Positioning_System)
}
if (seek_forward){
for (int32_t i = 0; i < ArrayCount(pos); ++i){
for (i32 i = 0; i < ArrayCount(pos); ++i){
pos[i] = size + 1;
}
@ -613,14 +613,14 @@ DOC_SEE(4coder_Buffer_Positioning_System)
}
new_pos = size + 1;
for (int32_t i = 0; i < ArrayCount(pos); ++i){
for (i32 i = 0; i < ArrayCount(pos); ++i){
if (new_pos > pos[i]){
new_pos = pos[i];
}
}
}
else{
for (int32_t i = 0; i < ArrayCount(pos); ++i){
for (i32 i = 0; i < ArrayCount(pos); ++i){
pos[i] = -1;
}
@ -651,7 +651,7 @@ DOC_SEE(4coder_Buffer_Positioning_System)
}
new_pos = -1;
for (int32_t i = 0; i < ArrayCount(pos); ++i){
for (i32 i = 0; i < ArrayCount(pos); ++i){
if (new_pos < pos[i]){
new_pos = pos[i];
}
@ -667,14 +667,14 @@ DOC_SEE(4coder_Buffer_Positioning_System)
////////////////////////////////
void
buffer_seek_delimiter_forward(Application_Links *app, Buffer_Summary *buffer, int32_t pos, char delim, int32_t *result){
buffer_seek_delimiter_forward(Application_Links *app, Buffer_Summary *buffer, i32 pos, char delim, i32 *result){
if (buffer->exists){
char chunk[1024];
int32_t size = sizeof(chunk);
i32 size = sizeof(chunk);
Stream_Chunk stream = {};
if (init_stream_chunk(&stream, app, buffer, pos, chunk, size)){
int32_t still_looping = 1;
i32 still_looping = 1;
do{
for(; pos < stream.end; ++pos){
char at_pos = stream.data[pos];
@ -694,14 +694,14 @@ buffer_seek_delimiter_forward(Application_Links *app, Buffer_Summary *buffer, in
}
static void
buffer_seek_delimiter_backward(Application_Links *app, Buffer_Summary *buffer, int32_t pos, char delim, int32_t *result){
buffer_seek_delimiter_backward(Application_Links *app, Buffer_Summary *buffer, i32 pos, char delim, i32 *result){
if (buffer->exists){
char chunk[1024];
int32_t size = sizeof(chunk);
i32 size = sizeof(chunk);
Stream_Chunk stream = {};
if (init_stream_chunk(&stream, app, buffer, pos, chunk, size)){
int32_t still_looping = 1;
i32 still_looping = 1;
do{
for(; pos >= stream.start; --pos){
char at_pos = stream.data[pos];
@ -724,7 +724,7 @@ buffer_seek_delimiter_backward(Application_Links *app, Buffer_Summary *buffer, i
// You can push it up or do something more clever by just
// replacing char read_buffer[512]; with more memory.
static void
buffer_seek_string_forward(Application_Links *app, Buffer_Summary *buffer, int32_t pos, int32_t end, char *str, int32_t size, int32_t *result){
buffer_seek_string_forward(Application_Links *app, Buffer_Summary *buffer, i32 pos, i32 end, char *str, i32 size, i32 *result){
char read_buffer[512];
if (buffer->size > end){
@ -747,7 +747,7 @@ buffer_seek_string_forward(Application_Links *app, Buffer_Summary *buffer, int32
stream.max_end = end;
if (init_stream_chunk(&stream, app, buffer, pos, chunk, sizeof(chunk))){
int32_t still_looping = 1;
i32 still_looping = 1;
do{
for(; pos < stream.end; ++pos){
char at_pos = stream.data[pos];
@ -779,7 +779,7 @@ buffer_seek_string_forward(Application_Links *app, Buffer_Summary *buffer, int32
// You can push it up or do something more clever by just
// replacing char read_buffer[512]; with more memory.
static void
buffer_seek_string_backward(Application_Links *app, Buffer_Summary *buffer, int32_t pos, int32_t min, char *str, int32_t size, int32_t *result){
buffer_seek_string_backward(Application_Links *app, Buffer_Summary *buffer, i32 pos, i32 min, char *str, i32 size, i32 *result){
char read_buffer[512];
*result = min-1;
@ -796,7 +796,7 @@ buffer_seek_string_backward(Application_Links *app, Buffer_Summary *buffer, int3
stream.min_start = min;
if (init_stream_chunk(&stream, app, buffer, pos, chunk, sizeof(chunk))){
int32_t still_looping = 1;
i32 still_looping = 1;
do{
for(; pos >= stream.start; --pos){
char at_pos = stream.data[pos];
@ -821,10 +821,10 @@ buffer_seek_string_backward(Application_Links *app, Buffer_Summary *buffer, int3
// You can push it up or do something more clever by just
// replacing char read_buffer[512]; with more memory.
static void
buffer_seek_string_insensitive_forward(Application_Links *app, Buffer_Summary *buffer, int32_t pos, int32_t end, char *str, int32_t size, int32_t *result){
buffer_seek_string_insensitive_forward(Application_Links *app, Buffer_Summary *buffer, i32 pos, i32 end, char *str, i32 size, i32 *result){
char read_buffer[512];
char chunk[1024];
int32_t chunk_size = sizeof(chunk);
i32 chunk_size = sizeof(chunk);
Stream_Chunk stream = {};
stream.max_end = end;
@ -844,7 +844,7 @@ buffer_seek_string_insensitive_forward(Application_Links *app, Buffer_Summary *b
read_str.size = size;
if (init_stream_chunk(&stream, app, buffer, pos, chunk, chunk_size)){
int32_t still_looping = 1;
i32 still_looping = 1;
do{
for(; pos < stream.end; ++pos){
char at_pos = char_to_upper(stream.data[pos]);
@ -869,10 +869,10 @@ buffer_seek_string_insensitive_forward(Application_Links *app, Buffer_Summary *b
// You can push it up or do something more clever by just
// replacing char read_buffer[512]; with more memory.
static void
buffer_seek_string_insensitive_backward(Application_Links *app, Buffer_Summary *buffer, int32_t pos, int32_t min, char *str, int32_t size, int32_t *result){
buffer_seek_string_insensitive_backward(Application_Links *app, Buffer_Summary *buffer, i32 pos, i32 min, char *str, i32 size, i32 *result){
char read_buffer[512];
char chunk[1024];
int32_t chunk_size = sizeof(chunk);
i32 chunk_size = sizeof(chunk);
Stream_Chunk stream = {};
stream.min_start = min;
@ -886,7 +886,7 @@ buffer_seek_string_insensitive_backward(Application_Links *app, Buffer_Summary *
read_str.size = size;
if (init_stream_chunk(&stream, app, buffer, pos, chunk, chunk_size)){
int32_t still_looping = 1;
i32 still_looping = 1;
do{
for(; pos >= stream.start; --pos){
char at_pos = char_to_upper(stream.data[pos]);
@ -910,7 +910,7 @@ buffer_seek_string_insensitive_backward(Application_Links *app, Buffer_Summary *
////////////////////////////////
static void
buffer_seek_string(Application_Links *app, Buffer_Summary *buffer, int32_t pos, int32_t end, int32_t min, char *str, int32_t size, int32_t *result, Buffer_Seek_String_Flags flags){
buffer_seek_string(Application_Links *app, Buffer_Summary *buffer, i32 pos, i32 end, i32 min, char *str, i32 size, i32 *result, Buffer_Seek_String_Flags flags){
switch (flags & 3){
case 0:
{
@ -936,24 +936,24 @@ buffer_seek_string(Application_Links *app, Buffer_Summary *buffer, int32_t pos,
////////////////////////////////
static bool32
buffer_line_is_blank(Application_Links *app, Buffer_Summary *buffer, int32_t line){
static b32
buffer_line_is_blank(Application_Links *app, Buffer_Summary *buffer, i32 line){
Partial_Cursor start = {};
Partial_Cursor end = {};
bool32 result = false;
b32 result = false;
if (line <= buffer->line_count){
buffer_compute_cursor(app, buffer, seek_line_char(line, 1), &start);
buffer_compute_cursor(app, buffer, seek_line_char(line, -1), &end);
static const int32_t chunk_size = 1024;
static const i32 chunk_size = 1024;
char chunk[chunk_size];
Stream_Chunk stream = {};
int32_t i = start.pos;
i32 i = start.pos;
stream.max_end = end.pos;
result = true;
if (init_stream_chunk(&stream, app, buffer, i, chunk, chunk_size)){
bool32 still_looping = false;
b32 still_looping = false;
do{
for (;i < stream.end; ++i){
char c = stream.data[i];
@ -971,11 +971,11 @@ buffer_line_is_blank(Application_Links *app, Buffer_Summary *buffer, int32_t lin
}
static String
read_identifier_at_pos(Application_Links *app, Buffer_Summary *buffer, int32_t pos, char *space, int32_t max, Range *range_out){
read_identifier_at_pos(Application_Links *app, Buffer_Summary *buffer, i32 pos, char *space, i32 max, Range *range_out){
String query = {};
int32_t start = buffer_seek_alphanumeric_or_underscore_left(app, buffer, pos);
int32_t end = buffer_seek_alphanumeric_or_underscore_right(app, buffer, start);
i32 start = buffer_seek_alphanumeric_or_underscore_left(app, buffer, pos);
i32 end = buffer_seek_alphanumeric_or_underscore_right(app, buffer, start);
if (!(start <= pos && pos < end)){
end = buffer_seek_alphanumeric_or_underscore_right(app, buffer, pos);
@ -983,7 +983,7 @@ read_identifier_at_pos(Application_Links *app, Buffer_Summary *buffer, int32_t p
}
if (start <= pos && pos < end){
int32_t size = end - start;
i32 size = end - start;
if (size <= max){
if (range_out != 0){
*range_out = make_range(start, end);
@ -998,8 +998,8 @@ read_identifier_at_pos(Application_Links *app, Buffer_Summary *buffer, int32_t p
////////////////////////////////
static int32_t
flip_dir(int32_t dir){
static i32
flip_dir(i32 dir){
if (dir == DirLeft){
dir = DirRight;
}
@ -1009,45 +1009,45 @@ flip_dir(int32_t dir){
return(dir);
}
static int32_t
buffer_boundary_seek(Application_Links *app, Buffer_Summary *buffer, int32_t start_pos, int32_t dir, Seek_Boundary_Flag flags){
bool32 forward = (dir != DirLeft);
static i32
buffer_boundary_seek(Application_Links *app, Buffer_Summary *buffer, i32 start_pos, i32 dir, Seek_Boundary_Flag flags){
b32 forward = (dir != DirLeft);
return(buffer_boundary_seek(app, buffer, &global_part, start_pos, forward, flags));
}
static void
view_buffer_boundary_seek_set_pos(Application_Links *app, View_Summary *view, Buffer_Summary *buffer, int32_t dir, uint32_t flags){
int32_t pos = buffer_boundary_seek(app, buffer, &global_part, view->cursor.pos, dir, flags);
view_buffer_boundary_seek_set_pos(Application_Links *app, View_Summary *view, Buffer_Summary *buffer, i32 dir, u32 flags){
i32 pos = buffer_boundary_seek(app, buffer, &global_part, view->cursor.pos, dir, flags);
view_set_cursor(app, view, seek_pos(pos), true);
no_mark_snap_to_cursor_if_shift(app, view->view_id);
}
static void
view_boundary_seek_set_pos(Application_Links *app, View_Summary *view, int32_t dir, uint32_t flags){
view_boundary_seek_set_pos(Application_Links *app, View_Summary *view, i32 dir, u32 flags){
Buffer_Summary buffer = get_buffer(app, view->buffer_id, AccessProtected);
view_buffer_boundary_seek_set_pos(app, view, &buffer, dir, flags);
}
static void
current_view_boundary_seek_set_pos(Application_Links *app, int32_t dir, uint32_t flags){
current_view_boundary_seek_set_pos(Application_Links *app, i32 dir, u32 flags){
View_Summary view = get_active_view(app, AccessProtected);
view_boundary_seek_set_pos(app, &view, dir, flags);
}
static Range
view_buffer_boundary_range(Application_Links *app, View_Summary *view, Buffer_Summary *buffer, int32_t dir, uint32_t flags){
int32_t pos1 = view->cursor.pos;
int32_t pos2 = buffer_boundary_seek(app, buffer, pos1, dir, flags);
view_buffer_boundary_range(Application_Links *app, View_Summary *view, Buffer_Summary *buffer, i32 dir, u32 flags){
i32 pos1 = view->cursor.pos;
i32 pos2 = buffer_boundary_seek(app, buffer, pos1, dir, flags);
return(make_range(pos1, pos2));
}
static Range
view_buffer_snipe_range(Application_Links *app, View_Summary *view, Buffer_Summary *buffer, int32_t dir, uint32_t flags){
view_buffer_snipe_range(Application_Links *app, View_Summary *view, Buffer_Summary *buffer, i32 dir, u32 flags){
Range result = {};
int32_t pos0 = view->cursor.pos;
int32_t pos1 = buffer_boundary_seek(app, buffer, pos0, dir, flags);
i32 pos0 = view->cursor.pos;
i32 pos1 = buffer_boundary_seek(app, buffer, pos0, dir, flags);
if (0 <= pos1 && pos1 <= buffer->size){
int32_t pos2 = buffer_boundary_seek(app, buffer, pos1, flip_dir(dir), flags);
i32 pos2 = buffer_boundary_seek(app, buffer, pos1, flip_dir(dir), flags);
if (0 <= pos2 && pos2 <= buffer->size){
if (dir == DirLeft){
if (pos2 < pos0){
@ -1066,7 +1066,7 @@ view_buffer_snipe_range(Application_Links *app, View_Summary *view, Buffer_Summa
}
static void
current_view_boundary_delete(Application_Links *app, int32_t dir, uint32_t flags){
current_view_boundary_delete(Application_Links *app, i32 dir, u32 flags){
View_Summary view = get_active_view(app, AccessOpen);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessOpen);
if (buffer.exists){
@ -1076,7 +1076,7 @@ current_view_boundary_delete(Application_Links *app, int32_t dir, uint32_t flags
}
static void
current_view_snipe_delete(Application_Links *app, int32_t dir, uint32_t flags){
current_view_snipe_delete(Application_Links *app, i32 dir, u32 flags){
View_Summary view = get_active_view(app, AccessOpen);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessOpen);
if (buffer.exists){
@ -1092,7 +1092,7 @@ CUSTOM_DOC("Seeks the cursor up to the next blank line.")
{
View_Summary view = get_active_view(app, AccessProtected);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessProtected);
int32_t new_pos = buffer_seek_whitespace_up(app, &buffer, view.cursor.pos);
i32 new_pos = buffer_seek_whitespace_up(app, &buffer, view.cursor.pos);
view_set_cursor(app, &view, seek_pos(new_pos), true);
no_mark_snap_to_cursor_if_shift(app, view.view_id);
}
@ -1102,7 +1102,7 @@ CUSTOM_DOC("Seeks the cursor down to the next blank line.")
{
View_Summary view = get_active_view(app, AccessProtected);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessProtected);
int32_t new_pos = buffer_seek_whitespace_down(app, &buffer, view.cursor.pos);
i32 new_pos = buffer_seek_whitespace_down(app, &buffer, view.cursor.pos);
view_set_cursor(app, &view, seek_pos(new_pos), true);
no_mark_snap_to_cursor_if_shift(app, view.view_id);
}
@ -1112,7 +1112,7 @@ CUSTOM_DOC("Seeks the cursor to the beginning of the line across all text.")
{
View_Summary view = get_active_view(app, AccessProtected);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessProtected);
int32_t new_pos = seek_line_beginning(app, &buffer, view.cursor.pos);
i32 new_pos = seek_line_beginning(app, &buffer, view.cursor.pos);
view_set_cursor(app, &view, seek_pos(new_pos), true);
no_mark_snap_to_cursor_if_shift(app, view.view_id);
}
@ -1122,7 +1122,7 @@ CUSTOM_DOC("Seeks the cursor to the end of the line across all text.")
{
View_Summary view = get_active_view(app, AccessProtected);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessProtected);
int32_t new_pos = seek_line_end(app, &buffer, view.cursor.pos);
i32 new_pos = seek_line_end(app, &buffer, view.cursor.pos);
view_set_cursor(app, &view, seek_pos(new_pos), true);
no_mark_snap_to_cursor_if_shift(app, view.view_id);
}
@ -1156,7 +1156,7 @@ CUSTOM_DOC("Seeks the cursor up to the next blank line and places it at the end
{
View_Summary view = get_active_view(app, AccessProtected);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessProtected);
int32_t new_pos = buffer_seek_whitespace_up(app, &buffer, view.cursor.pos);
i32 new_pos = buffer_seek_whitespace_up(app, &buffer, view.cursor.pos);
new_pos = seek_line_end(app, &buffer, new_pos);
view_set_cursor(app, &view, seek_pos(new_pos), true);
no_mark_snap_to_cursor_if_shift(app, view.view_id);
@ -1167,7 +1167,7 @@ CUSTOM_DOC("Seeks the cursor down to the next blank line and places it at the en
{
View_Summary view = get_active_view(app, AccessProtected);
Buffer_Summary buffer = get_buffer(app, view.buffer_id, AccessProtected);
int32_t new_pos = buffer_seek_whitespace_down(app, &buffer, view.cursor.pos);
i32 new_pos = buffer_seek_whitespace_down(app, &buffer, view.cursor.pos);
new_pos = seek_line_end(app, &buffer, new_pos);
view_set_cursor(app, &view, seek_pos(new_pos), true);
no_mark_snap_to_cursor_if_shift(app, view.view_id);

View File

@ -113,7 +113,7 @@ ui_data_compute_bounding_boxes(UI_Data *ui_data){
neg_inf_rect.y0 = INT32_MAX;
neg_inf_rect.x1 = INT32_MIN;
neg_inf_rect.y1 = INT32_MIN;
for (uint32_t i = 0; i < UICoordinates_COUNT; ++i){
for (u32 i = 0; i < UICoordinates_COUNT; ++i){
ui_data->bounding_box[i] = neg_inf_rect;
}
for (UI_Item *item = ui_data->list.first;
@ -128,12 +128,12 @@ ui_data_compute_bounding_boxes(UI_Data *ui_data){
}
static void
ui_control_set_top(UI_Data *data, int32_t top_y){
ui_control_set_top(UI_Data *data, i32 top_y){
data->bounding_box[UICoordinates_ViewSpace].y0 = top_y;
}
static void
ui_control_set_bottom(UI_Data *data, int32_t bottom_y){
ui_control_set_bottom(UI_Data *data, i32 bottom_y){
data->bounding_box[UICoordinates_ViewSpace].y1 = bottom_y;
}
@ -163,7 +163,7 @@ ui_control_get_mouse_hit(UI_Data *data, Vec2_i32 view_p, Vec2_i32 panel_p){
}
static UI_Item*
ui_control_get_mouse_hit(UI_Data *data, int32_t mx_scrolled, int32_t my_scrolled, int32_t mx_unscrolled, int32_t my_unscrolled){
ui_control_get_mouse_hit(UI_Data *data, i32 mx_scrolled, i32 my_scrolled, i32 mx_unscrolled, i32 my_unscrolled){
return(ui_control_get_mouse_hit(data, V2i32(mx_scrolled, my_scrolled), V2i32(mx_unscrolled, my_unscrolled)));
}
@ -177,22 +177,22 @@ view_zero_scroll(Application_Links *app, View_Summary *view){
static void
view_set_vertical_focus(Application_Links *app, View_Summary *view,
int32_t y_top, int32_t y_bot){
i32 y_top, i32 y_bot){
GUI_Scroll_Vars scroll = view->scroll_vars;
int32_t view_y_top = scroll.target_y;
int32_t view_y_dim = view->file_region.y1 - view->file_region.y0;
int32_t view_y_bot = view_y_top + view_y_dim;
int32_t line_dim = (int32_t)view->line_height;
int32_t hot_y_top = view_y_top + line_dim*3;
int32_t hot_y_bot = view_y_bot - line_dim*3;
i32 view_y_top = scroll.target_y;
i32 view_y_dim = view->file_region.y1 - view->file_region.y0;
i32 view_y_bot = view_y_top + view_y_dim;
i32 line_dim = (i32)view->line_height;
i32 hot_y_top = view_y_top + line_dim*3;
i32 hot_y_bot = view_y_bot - line_dim*3;
if (hot_y_bot - hot_y_top < line_dim*6){
int32_t quarter_view_y_dim = view_y_dim/4;
i32 quarter_view_y_dim = view_y_dim/4;
hot_y_top = view_y_top + quarter_view_y_dim;
hot_y_bot = view_y_bot - quarter_view_y_dim;
}
int32_t hot_y_dim = hot_y_bot - hot_y_top;
int32_t skirt_dim = hot_y_top - view_y_top;
int32_t y_dim = y_bot - y_top;
i32 hot_y_dim = hot_y_bot - hot_y_top;
i32 skirt_dim = hot_y_top - view_y_top;
i32 y_dim = y_bot - y_top;
if (y_dim > hot_y_dim){
scroll.target_y = y_top - skirt_dim;
view_set_scroll(app, view, scroll);
@ -259,8 +259,8 @@ view_get_lister_state(View_Summary *view){
return(&global_lister_state[view->view_id]);
}
static int32_t
lister_standard_arena_size_round_up(int32_t arena_size){
static i32
lister_standard_arena_size_round_up(i32 arena_size){
if (arena_size < (64 << 10)){
arena_size = (64 << 10);
}
@ -310,19 +310,19 @@ lister_get_clicked_item(Application_Links *app, View_ID view_id, Partition *scra
return(result);
}
static int32_t
static i32
lister_get_line_height(View_Summary *view){
return((int32_t)view->line_height);
return((i32)view->line_height);
}
static int32_t
static i32
lister_get_text_field_height(View_Summary *view){
return((int32_t)view->line_height);
return((i32)view->line_height);
}
static int32_t
lister_get_block_height(int32_t line_height, bool32 is_theme_list){
int32_t block_height = 0;
static i32
lister_get_block_height(i32 line_height, b32 is_theme_list){
i32 block_height = 0;
if (is_theme_list){
block_height = line_height*3 + 6;
}
@ -334,13 +334,13 @@ lister_get_block_height(int32_t line_height, bool32 is_theme_list){
static void
lister_update_ui(Application_Links *app, Partition *scratch, View_Summary *view, Lister_State *state){
bool32 is_theme_list = state->lister.data.theme_list;
b32 is_theme_list = state->lister.data.theme_list;
int32_t x0 = 0;
int32_t x1 = view->view_region.x1 - view->view_region.x0;
int32_t line_height = lister_get_line_height(view);
int32_t block_height = lister_get_block_height(line_height, is_theme_list);
int32_t text_field_height = lister_get_text_field_height(view);
i32 x0 = 0;
i32 x1 = view->view_region.x1 - view->view_region.x0;
i32 line_height = lister_get_line_height(view);
i32 block_height = lister_get_block_height(line_height, is_theme_list);
i32 text_field_height = lister_get_text_field_height(view);
Temp_Memory full_temp = begin_temp_memory(scratch);
@ -348,11 +348,11 @@ lister_update_ui(Application_Links *app, Partition *scratch, View_Summary *view,
Vec2_i32 view_m = get_mouse_position_in_view_space(app, view->file_region.p0,
V2i32(view->scroll_vars.scroll_p));
int32_t y_pos = text_field_height;
i32 y_pos = text_field_height;
state->raw_item_index = -1;
int32_t node_count = state->lister.data.options.count;
i32 node_count = state->lister.data.options.count;
Lister_Node_Ptr_Array exact_matches = {};
exact_matches.node_ptrs = push_array(scratch, Lister_Node*, 1);
Lister_Node_Ptr_Array before_extension_matches = {};
@ -363,7 +363,7 @@ lister_update_ui(Application_Links *app, Partition *scratch, View_Summary *view,
String key = state->lister.data.key_string;
Absolutes absolutes = {};
get_absolutes(key, &absolutes, true, true);
bool32 has_wildcard = (absolutes.count > 3);
b32 has_wildcard = (absolutes.count > 3);
for (Lister_Node *node = state->lister.data.options.first;
node != 0;
@ -399,10 +399,10 @@ lister_update_ui(Application_Links *app, Partition *scratch, View_Summary *view,
UI_Item *highlighted_item = 0;
UI_Item *hot_item = 0;
UI_Item *hovered_item = 0;
int32_t item_index_counter = 0;
for (int32_t array_index = 0; array_index < ArrayCount(node_ptr_arrays); array_index += 1){
i32 item_index_counter = 0;
for (i32 array_index = 0; array_index < ArrayCount(node_ptr_arrays); array_index += 1){
Lister_Node_Ptr_Array node_ptr_array = node_ptr_arrays[array_index];
for (int32_t node_index = 0; node_index < node_ptr_array.count; node_index += 1){
for (i32 node_index = 0; node_index < node_ptr_array.count; node_index += 1){
Lister_Node *node = node_ptr_array.node_ptrs[node_index];
i32_Rect item_rect = {};
@ -531,7 +531,7 @@ lister_prealloced(String string){
}
static void
lister_first_init(Application_Links *app, Lister *lister, void *user_data, int32_t user_data_size){
lister_first_init(Application_Links *app, Lister *lister, void *user_data, i32 user_data_size){
memset(lister, 0, sizeof(*lister));
lister->arena = make_arena(app, (16 << 10));
lister->data.query = make_fixed_width_string(lister->data.query_space);
@ -546,14 +546,14 @@ lister_first_init(Application_Links *app, Lister *lister, void *user_data, int32
}
static void
lister_begin_new_item_set(Application_Links *app, Lister *lister, int32_t list_memory_size){
lister_begin_new_item_set(Application_Links *app, Lister *lister, i32 list_memory_size){
arena_release_all(&lister->arena);
memset(&lister->data.options, 0, sizeof(lister->data.options));
}
static void*
lister_add_item(Lister *lister, Lister_Prealloced_String string, Lister_Prealloced_String status,
void *user_data, int32_t extra_space){
void *user_data, i32 extra_space){
Lister_Node *node = push_array(&lister->arena, Lister_Node, 1);
node->string = string.string;
node->status = status.string;
@ -568,20 +568,20 @@ lister_add_item(Lister *lister, Lister_Prealloced_String string, Lister_Prealloc
static void*
lister_add_item(Lister *lister, Lister_Prealloced_String string, String status,
void *user_data, int32_t extra_space){
void *user_data, i32 extra_space){
return(lister_add_item(lister, string, lister_prealloced(string_push_copy(&lister->arena, status)),
user_data, extra_space));
}
static void*
lister_add_item(Lister *lister, String string, Lister_Prealloced_String status,
void *user_data, int32_t extra_space){
void *user_data, i32 extra_space){
return(lister_add_item(lister, lister_prealloced(string_push_copy(&lister->arena, string)), status,
user_data, extra_space));
}
static void*
lister_add_item(Lister *lister, String string, String status, void *user_data, int32_t extra_space){
lister_add_item(Lister *lister, String string, String status, void *user_data, i32 extra_space){
return(lister_add_item(lister,
lister_prealloced(string_push_copy(&lister->arena, string)),
lister_prealloced(string_push_copy(&lister->arena, status)),
@ -590,8 +590,8 @@ lister_add_item(Lister *lister, String string, String status, void *user_data, i
static void*
lister_add_theme_item(Lister *lister,
Lister_Prealloced_String string, int32_t index,
void *user_data, int32_t extra_space){
Lister_Prealloced_String string, i32 index,
void *user_data, i32 extra_space){
Lister_Node *node = push_array(&lister->arena, Lister_Node, 1);
node->string = string.string;
node->index = index;
@ -605,17 +605,17 @@ lister_add_theme_item(Lister *lister,
}
static void*
lister_add_theme_item(Lister *lister, String string, int32_t index,
void *user_data, int32_t extra_space){
lister_add_theme_item(Lister *lister, String string, i32 index,
void *user_data, i32 extra_space){
return(lister_add_theme_item(lister, lister_prealloced(string_push_copy(&lister->arena, string)), index,
user_data, extra_space));
}
static void*
lister_get_user_data(Lister_Data *lister_data, int32_t index){
lister_get_user_data(Lister_Data *lister_data, i32 index){
void *result = 0;
if (0 <= index && index < lister_data->options.count){
int32_t counter = 0;
i32 counter = 0;
for (Lister_Node *node = lister_data->options.first;
node != 0;
node = node->next, counter += 1){
@ -665,7 +665,7 @@ lister_default(Application_Links *app, Partition *scratch, Heap *heap,
static void
lister_call_activate_handler(Application_Links *app, Partition *scratch, Heap *heap,
View_Summary *view, Lister_State *state,
void *user_data, bool32 activated_by_mouse){
void *user_data, b32 activated_by_mouse){
Lister_Data *lister = &state->lister.data;
if (lister->handlers.activate != 0){
lister->handlers.activate(app, scratch, heap, view, state,

View File

@ -62,7 +62,7 @@ enum{
typedef void Lister_Activation_Function_Type(Application_Links *app, Partition *scratch, Heap *heap,
View_Summary *view, struct Lister_State *state,
String text_field, void *user_data, bool32 activated_by_mouse);
String text_field, void *user_data, b32 activated_by_mouse);
typedef void Lister_Regenerate_List_Function_Type(Application_Links *app, struct Lister *lister);
@ -112,7 +112,7 @@ struct Lister_Data{
char key_string_space[256];
String key_string;
Lister_Option_List options;
bool32 theme_list;
b32 theme_list;
};
struct Lister{
@ -121,11 +121,11 @@ struct Lister{
};
struct Lister_State{
bool32 initialized;
b32 initialized;
Lister lister;
// Action defered to next UI update
bool32 set_view_vertical_focus_to_item;
b32 set_view_vertical_focus_to_item;
// State set directly by input handlers
void *hot_user_data;

18
4ed.cpp
View File

@ -1438,11 +1438,21 @@ App_Step_Sig(app_step){
animation_dt = literal_dt;
}
Color_Table color_table = models->fallback_color_table;
if (models->modify_color_table != 0){
color_table = models->modify_color_table(&models->app_links, models->frame_counter, literal_dt, animation_dt);
{
Color_Table color_table = models->fallback_color_table;
if (models->modify_color_table != 0){
Frame_Info frame = {};
frame.index = models->frame_counter;
frame.literal_dt = literal_dt;
frame.animation_dt = animation_dt;
color_table = models->modify_color_table(&models->app_links, frame);
if (color_table.count < models->fallback_color_table.count){
block_copy(models->fallback_color_table.vals, color_table.vals, color_table.count*sizeof(*color_table.vals));
color_table = models->fallback_color_table;
}
}
models->color_table = color_table;
}
models->color_table = color_table;
begin_render_section(target, system, models->frame_counter, literal_dt, animation_dt);

File diff suppressed because it is too large Load Diff

View File

@ -138,7 +138,7 @@ layout_get_active_panel(Layout *layout){
return(layout->active_panel);
}
internal bool32
internal b32
layout_split_panel(Layout *layout, Panel *panel, b32 vertical_split, Panel **new_panel_out){
b32 result = false;
if (layout->open_panel_count < layout->open_panel_max_count){

View File

@ -202,14 +202,14 @@ typedef Sys_Release_Lock_Sig(System_Release_Lock);
#define Sys_Memory_Allocate_Sig(name) void* name(umem size)
typedef Sys_Memory_Allocate_Sig(System_Memory_Allocate);
#define Sys_Memory_Set_Protection_Sig(name) bool32 name(void *ptr, umem size, u32 flags)
#define Sys_Memory_Set_Protection_Sig(name) b32 name(void *ptr, umem size, u32 flags)
typedef Sys_Memory_Set_Protection_Sig(System_Memory_Set_Protection);
#define Sys_Memory_Free_Sig(name) void name(void *ptr, umem size)
typedef Sys_Memory_Free_Sig(System_Memory_Free);
// file system
#define Sys_Directory_CD_Sig(name) bool32 name(char *dir, i32 *len, i32 cap, char *rel_path, i32 rel_len)
#define Sys_Directory_CD_Sig(name) b32 name(char *dir, i32 *len, i32 cap, char *rel_path, i32 rel_len)
typedef Sys_Directory_CD_Sig(System_Directory_CD);
#define Sys_Get_Current_Path_Sig(name) int32_t name(char *out, i32 capacity)
@ -225,7 +225,7 @@ typedef Sys_Show_Mouse_Cursor_Sig(System_Show_Mouse_Cursor);
#define Sys_Set_Fullscreen_Sig(name) b32 name(b32 full_screen)
typedef Sys_Set_Fullscreen_Sig(System_Set_Fullscreen);
#define Sys_Is_Fullscreen_Sig(name) bool32 name()
#define Sys_Is_Fullscreen_Sig(name) b32 name()
typedef Sys_Is_Fullscreen_Sig(System_Is_Fullscreen);
// debug

View File

@ -1241,10 +1241,14 @@ view_call_render_caller(Models *models, Render_Target *target, View *view,
models->render_items = items;
models->render_item_count = item_count;
i32 frame_index = target->frame_index;
f32 literal_dt = target->literal_dt;
f32 animation_dt = target->animation_dt;
models->render_caller(&models->app_links, view_id, on_screen_range, frame_index, literal_dt, animation_dt, core_render);
Render_Parameters params = {};
params.view_id= view_id;
params.on_screen_range = on_screen_range;
params.frame.index = target->frame_index;
params.frame.literal_dt = target->literal_dt;
params.frame.animation_dt = target->animation_dt;
params.do_core_render = core_render;
models->render_caller(&models->app_links, params);
models->render_view = 0;
}
}

View File

@ -41,7 +41,7 @@ Sys_Memory_Allocate_Sig(system_memory_allocate){
internal
Sys_Memory_Set_Protection_Sig(system_memory_set_protection){
bool32 result = false;
b32 result = false;
DWORD old_protect = 0;
DWORD protect = 0;