From e02ab24488ffc5dcdb344e380a3cff2a632dbec5 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Wed, 13 Jul 2016 00:43:43 -0400 Subject: [PATCH] fix to make rendering change work on windows compile --- 4coder_API.html | 808 +++++++++++++++++++++++----------------------- 4ed_rendering.cpp | 4 +- 2 files changed, 407 insertions(+), 405 deletions(-) diff --git a/4coder_API.html b/4coder_API.html index 5d6e6b91..db75485a 100644 --- a/4coder_API.html +++ b/4coder_API.html @@ -137,8 +137,8 @@ Coming Soon

§3.3 Function Descriptions

-

§3.3.1: exec_command

-
bool32 app->exec_command( +

§3.3.1: exec_command

+
bool32 app->exec_command(
Application_Links *app,
Command_ID command_id
)
Parameters
@@ -148,8 +148,8 @@ Coming Soon
Return
This call returns non-zero if command_id named a valid internal command.
Description
A call to exec_command executes an internal command. If command_id is invalid a warning is posted to *messages*.
See Also

-

§3.3.2: exec_system_command

-
bool32 app->exec_system_command( +

§3.3.2: exec_system_command

+
bool32 app->exec_system_command(
Application_Links *app,
View_Summary *view,
Buffer_Identifier buffer,
char *path,
int32_t path_len,
char *command,
int32_t command_len,
Command_Line_Input_Flag flags
)
Parameters
@@ -190,8 +190,8 @@ then the provided view will display the output buffer. If the view parameter is NULL, no view will switch to the output.
See Also

-

§3.3.3: clipboard_post

-
void app->clipboard_post( +

§3.3.3: clipboard_post

+
void app->clipboard_post(
Application_Links *app,
int32_t clipboard_id,
char *str,
int32_t len
)
Parameters
@@ -210,8 +210,8 @@ If the view parameter is NULL, no view will switch to the output.

-

§3.3.4: clipboard_count

-
int32_t app->clipboard_count( +

§3.3.4: clipboard_count

+
int32_t app->clipboard_count(
Application_Links *app,
int32_t clipboard_id
)
Parameters
@@ -220,8 +220,8 @@ be pasted into other applications.
Description
This call returns the number of items in the clipboard.
See Also

-

§3.3.5: clipboard_index

-
int32_t app->clipboard_index( +

§3.3.5: clipboard_index

+
int32_t app->clipboard_index(
Application_Links *app,
int32_t clipboard_id,
int32_t item_index,
char *out,
int32_t len
)
Parameters
@@ -244,14 +244,14 @@ be pasted into other applications.
See Also

-

§3.3.6: get_buffer_count

-
int32_t app->get_buffer_count( +

§3.3.6: get_buffer_count

+
int32_t app->get_buffer_count(
Application_Links *app
)
Description
TODO

-

§3.3.7: get_buffer_first

-
Buffer_Summary app->get_buffer_first( +

§3.3.7: get_buffer_first

+
Buffer_Summary app->get_buffer_first(
Application_Links *app,
Access_Flag access
)
Parameters
@@ -263,8 +263,8 @@ first len character of the clipboard contents. The output string is not null te If the buffer returned does not exist, the loop is finished. Buffers should not be killed durring a buffer loop.
See Also

-

§3.3.8: get_buffer_next

-
void app->get_buffer_next( +

§3.3.8: get_buffer_next

+
void app->get_buffer_next(
Application_Links *app,
Buffer_Summary *buffer,
Access_Flag access
)
Parameters
@@ -281,8 +281,8 @@ The global buffer order is kept roughly in the order of most recently used to le If the buffer outputted does not exist, the loop is finished. Buffers should not be killed or created durring a buffer loop.
See Also

-

§3.3.9: get_buffer

-
Buffer_Summary app->get_buffer( +

§3.3.9: get_buffer

+
Buffer_Summary app->get_buffer(
Application_Links *app,
Buffer_ID buffer_id,
Access_Flag access
)
Parameters
@@ -295,8 +295,8 @@ Buffers should not be killed or created durring a buffer loop.
Return
This call returns a summary that describes the indicated buffer if it exists and is accessible.
See Also

-

§3.3.10: get_buffer_by_name

-
Buffer_Summary app->get_buffer_by_name( +

§3.3.10: get_buffer_by_name

+
Buffer_Summary app->get_buffer_by_name(
Application_Links *app,
char *name,
int32_t len,
Access_Flag access
)
Parameters
@@ -313,8 +313,8 @@ Buffers should not be killed or created durring a buffer loop.
Return
This call returns a summary that describes the indicated buffer if it exists and is accessible.
See Also

-

§3.3.11: buffer_boundary_seek

-
int32_t app->buffer_boundary_seek( +

§3.3.11: buffer_boundary_seek

+
int32_t app->buffer_boundary_seek(
Application_Links *app,
Buffer_Summary *buffer,
int32_t start_pos,
bool32 seek_forward,
Seek_Boundary_Flag flags
)
Parameters
@@ -337,8 +337,8 @@ Buffers should not be killed or created durring a buffer loop.
See Also

-

§3.3.12: buffer_read_range

-
bool32 app->buffer_read_range( +

§3.3.12: buffer_read_range

+
bool32 app->buffer_read_range(
Application_Links *app,
Buffer_Summary *buffer,
int32_t start,
int32_t end,
char *out
)
Parameters
@@ -363,8 +363,8 @@ The output is not null terminated. This call fails if the buffer does not exist, or if the read range is not within the bounds of the buffer.
See Also

-

§3.3.13: buffer_replace_range

-
bool32 app->buffer_replace_range( +

§3.3.13: buffer_replace_range

+
bool32 app->buffer_replace_range(
Application_Links *app,
Buffer_Summary *buffer,
int32_t start,
int32_t end,
char *str,
int32_t len
)
Parameters
@@ -396,8 +396,8 @@ from start to end. This call fails if the buffer does not exist, or if the replace range is not within the bounds of the buffer.
See Also

-

§3.3.14: buffer_compute_cursor

-
bool32 app->buffer_compute_cursor( +

§3.3.14: buffer_compute_cursor

+
bool32 app->buffer_compute_cursor(
Application_Links *app,
Buffer_Summary *buffer,
Buffer_Seek seek,
Partial_Cursor *cursor_out
)
Parameters
@@ -416,8 +416,8 @@ range is not within the bounds of the buffer.
See Also

-

§3.3.15: buffer_batch_edit

-
bool32 app->buffer_batch_edit( +

§3.3.15: buffer_batch_edit

+
bool32 app->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
)
Parameters
@@ -442,8 +442,8 @@ types are absolute position and line,column position.
Return
This call returns non-zero if the batch edit succeeds.
Description
TODO
See Also

-

§3.3.16: buffer_set_setting

-
bool32 app->buffer_set_setting( +

§3.3.16: buffer_set_setting

+
bool32 app->buffer_set_setting(
Application_Links *app,
Buffer_Summary *buffer,
Buffer_Setting_ID setting,
int32_t value
)
Parameters
@@ -460,8 +460,8 @@ types are absolute position and line,column position.
See Also

-

§3.3.17: buffer_auto_indent

-
bool32 app->buffer_auto_indent( +

§3.3.17: buffer_auto_indent

+
bool32 app->buffer_auto_indent(
Application_Links *app,
Buffer_Summary *buffer,
int32_t start,
int32_t end,
int32_t tab_width,
Auto_Indent_Flag flags
)
Parameters
@@ -489,8 +489,8 @@ start to end by inserting spaces or tabs at the beginning of the lines. If the buffer does not have lexing enabled or the lexing job has not completed this function will fail.
See Also

-

§3.3.18: create_buffer

-
Buffer_Summary app->create_buffer( +

§3.3.18: create_buffer

+
Buffer_Summary app->create_buffer(
Application_Links *app,
char *filename,
int32_t filename_len,
Buffer_Create_Flag flags
)
Parameters
@@ -511,8 +511,8 @@ If the buffer does not exist a new buffer is created and named after the given f the filename corresponds to a file on the disk that file is loaded and put into buffer, if the filename does not correspond to a file on disk the buffer is created empty.
See Also

-

§3.3.19: save_buffer

-
bool32 app->save_buffer( +

§3.3.19: save_buffer

+
bool32 app->save_buffer(
Application_Links *app,
Buffer_Summary *buffer,
char *filename,
int32_t filename_len,
uint32_t flags
)
Parameters
@@ -533,8 +533,8 @@ the filename does not correspond to a file on disk the buffer is created empty.<
Return
This call returns non-zero on success.

-

§3.3.20: kill_buffer

-
bool32 app->kill_buffer( +

§3.3.20: kill_buffer

+
bool32 app->kill_buffer(
Application_Links *app,
Buffer_Identifier buffer,
View_ID view_id,
Buffer_Kill_Flag flags
)
Parameters
@@ -553,8 +553,8 @@ the filename does not correspond to a file on disk the buffer is created empty.< dialogue needs to be displayed the provided view is used to show the dialogue. If the view is not open the kill fails.
See Also

-

§3.3.21: get_view_first

-
View_Summary app->get_view_first( +

§3.3.21: get_view_first

+
View_Summary app->get_view_first(
Application_Links *app,
Access_Flag access
)
Parameters
@@ -566,8 +566,8 @@ If the view is not open the kill fails.
See Also

-

§3.3.22: get_view_next

-
void app->get_view_next( +

§3.3.22: get_view_next

+
void app->get_view_next(
Application_Links *app,
View_Summary *view,
Access_Flag access
)
Parameters
@@ -583,8 +583,8 @@ Views should not be closed or opened durring a view loop.
See Also

-

§3.3.23: get_view

-
View_Summary app->get_view( +

§3.3.23: get_view

+
View_Summary app->get_view(
Application_Links *app,
View_ID view_id,
Access_Flag access
)
Parameters
@@ -597,8 +597,8 @@ Views should not be closed or opened durring a view loop.
Return
This call returns a summary that describes the indicated view if it is open and accessible.
See Also

-

§3.3.24: get_active_view

-
View_Summary app->get_active_view( +

§3.3.24: get_active_view

+
View_Summary app->get_active_view(
Application_Links *app,
Access_Flag access
)
Parameters
@@ -607,8 +607,8 @@ Views should not be closed or opened durring a view loop.
Return
This call returns a summary that describes the active view.
See Also

-

§3.3.25: open_view

-
View_Summary app->open_view( +

§3.3.25: open_view

+
View_Summary app->open_view(
Application_Links *app,
View_Summary *view_location,
View_Split_Position position
)
Parameters
@@ -623,8 +623,8 @@ Views should not be closed or opened durring a view loop.
Description
4coder is built with a limit of 16 views. If 16 views are already open when this is called the call will fail.
See Also

-

§3.3.26: close_view

-
bool32 app->close_view( +

§3.3.26: close_view

+
bool32 app->close_view(
Application_Links *app,
View_Summary *view
)
Parameters
@@ -636,8 +636,8 @@ If the given view is the active view, the next active view in the global order of view will be made active. If the given view is the last open view in the system, the call will fail.

-

§3.3.27: set_active_view

-
bool32 app->set_active_view( +

§3.3.27: set_active_view

+
bool32 app->set_active_view(
Application_Links *app,
View_Summary *view
)
Parameters
@@ -648,8 +648,8 @@ If the given view is the last open view in the system, the call will fail.
active view, and takes subsequent commands and is returned from get_active_view.
See Also

-

§3.3.28: view_set_setting

-
bool32 app->view_set_setting( +

§3.3.28: view_set_setting

+
bool32 app->view_set_setting(
Application_Links *app,
View_Summary *view,
View_Setting_ID setting,
int32_t value
)
Parameters
@@ -666,8 +666,8 @@ from get_active_view.
Return
This call returns non-zero on success.
See Also

-

§3.3.29: view_set_split_proportion

-
bool32 app->view_set_split_proportion( +

§3.3.29: view_set_split_proportion

+
bool32 app->view_set_split_proportion(
Application_Links *app,
View_Summary *view,
float t
)
Parameters
@@ -680,8 +680,8 @@ from get_active_view.
Return
This call returns non-zero on success.

-

§3.3.30: view_compute_cursor

-
bool32 app->view_compute_cursor( +

§3.3.30: view_compute_cursor

+
bool32 app->view_compute_cursor(
Application_Links *app,
View_Summary *view,
Buffer_Seek seek,
Full_Cursor *cursor_out
)
Parameters
@@ -698,8 +698,8 @@ from get_active_view.
Return
This call returns non-zero on success.
Description
Computes a Full_Cursor for the given seek position with no side effects.
See Also

-

§3.3.31: view_set_cursor

-
bool32 app->view_set_cursor( +

§3.3.31: view_set_cursor

+
bool32 app->view_set_cursor(
Application_Links *app,
View_Summary *view,
Buffer_Seek seek,
bool32 set_preferred_x
)
Parameters
@@ -718,14 +718,14 @@ from get_active_view.
See Also

-

§3.3.32: view_set_scroll

-
bool32 app->view_set_scroll( +

§3.3.32: view_set_scroll

+
bool32 app->view_set_scroll(
Application_Links *app,
View_Summary *view,
GUI_Scroll_Vars scroll
)
Description
TODO
See Also

-

§3.3.33: view_set_mark

-
bool32 app->view_set_mark( +

§3.3.33: view_set_mark

+
bool32 app->view_set_mark(
Application_Links *app,
View_Summary *view,
Buffer_Seek seek
)
Parameters
@@ -738,8 +738,8 @@ cursor in the same column or x position.
Return
This call returns non-zero on success.
Description
This call sets the the view's mark position.
See Also

-

§3.3.34: view_set_highlight

-
bool32 app->view_set_highlight( +

§3.3.34: view_set_highlight

+
bool32 app->view_set_highlight(
Application_Links *app,
View_Summary *view,
int32_t start,
int32_t end,
bool32 turn_on
)
Parameters
@@ -763,8 +763,8 @@ is set to true the highlight will be shown and the cursor will be hidden. After that either setting the with view_set_cursor or calling view_set_highlight and the turn_on set to false, will switch back to showing the cursor.

-

§3.3.35: view_set_buffer

-
bool32 app->view_set_buffer( +

§3.3.35: view_set_buffer

+
bool32 app->view_set_buffer(
Application_Links *app,
View_Summary *view,
Buffer_ID buffer_id,
Set_Buffer_Flag flags
)
Parameters
@@ -782,8 +782,8 @@ the turn_on set to false, will switch back to showing the cursor.

Return
This call returns non-zero on success.
Description
On success view_set_buffer sets the specified view's current buffer and cancels and dialogue shown in the view and displays the file.
See Also

-

§3.3.36: view_post_fade

-
bool32 app->view_post_fade( +

§3.3.36: view_post_fade

+
bool32 app->view_post_fade(
Application_Links *app,
View_Summary *view,
float seconds,
int32_t start,
int32_t end,
int_color color
)
Parameters
@@ -808,8 +808,8 @@ cancels and dialogue shown in the view and displays the file.
Return
This call returns non-zero on success.
See Also

-

§3.3.37: get_user_input

-
User_Input app->get_user_input( +

§3.3.37: get_user_input

+
User_Input app->get_user_input(
Application_Links *app,
Input_Type_Flag get_type,
Input_Type_Flag abort_type
)
Parameters
@@ -826,20 +826,20 @@ command is executed an abort signal is returned. If an abort signal is ever ret command should finish execution without any more calls that preempt the command. If a get condition is met the user input is returned.
See Also

-

§3.3.38: get_command_input

-
User_Input app->get_command_input( +

§3.3.38: get_command_input

+
User_Input app->get_command_input(
Application_Links *app
)
Return
This call returns the input that triggered the currently executing command.
See Also

-

§3.3.39: get_mouse_state

-
Mouse_State app->get_mouse_state( +

§3.3.39: get_mouse_state

+
Mouse_State app->get_mouse_state(
Application_Links *app
)
Return
This call returns the current mouse state as of the beginning of the frame.
See Also

-

§3.3.40: start_query_bar

-
bool32 app->start_query_bar( +

§3.3.40: start_query_bar

+
bool32 app->start_query_bar(
Application_Links *app,
Query_Bar *bar,
uint32_t flags
)
Parameters
@@ -858,8 +858,8 @@ can be changed after the call to start_query_bar and the query bar shown by 4cod will reflect the change. Since the bar stops showing when the command exits the only use for this call is in an interactive command that makes calls to get_user_input.

-

§3.3.41: end_query_bar

-
void app->end_query_bar( +

§3.3.41: end_query_bar

+
void app->end_query_bar(
Application_Links *app,
Query_Bar *bar,
uint32_t flags
)
Parameters
@@ -872,8 +872,8 @@ only use for this call is in an interactive command that makes calls to get_user
Description
Stops showing the particular query bar specified by the bar parameter.


-

§3.4.8: User_Input_Type_ID

-
enum User_Input_Type_ID;
+

§3.4.8: User_Input_Type_ID

+
enum User_Input_Type_ID;
Description
User_Input_Type_ID specifies a type of user input event.
Values
UserInputNone
UserInputNone indicates that no event has occurred.
@@ -1225,8 +1225,8 @@ the range [1,16].


-

§3.4.9: Event_Message_Type_ID

-
enum Event_Message_Type_ID;
+

§3.4.9: Event_Message_Type_ID

+
enum Event_Message_Type_ID;
Description
Event_Message_Type_ID is a part of an unfinished feature.
Values
EventMessage_NoMessage
TODO.
@@ -1245,8 +1245,8 @@ the range [1,16].


-

§3.4.10: Buffer_Batch_Edit_Type

-
enum Buffer_Batch_Edit_Type;
+

§3.4.10: Buffer_Batch_Edit_Type

+
enum Buffer_Batch_Edit_Type;
Description
A Buffer_Batch_Edit_Type is a type of batch operation.
Values
BatchEdit_Normal
The BatchEdit_Normal operation is always correct but does the most work.
@@ -1258,8 +1258,8 @@ the range [1,16].


-

§3.4.11: Buffer_Setting_ID

-
enum Buffer_Setting_ID;
+

§3.4.11: Buffer_Setting_ID

+
enum Buffer_Setting_ID;
Description
A Buffer_Setting_ID names a setting in a buffer.
Values
BufferSetting_Null
BufferSetting_Null is not a valid setting, it is reserved to detect errors.
@@ -1298,8 +1298,8 @@ the range [1,16].


-

§3.4.12: View_Setting_ID

-
enum View_Setting_ID;
+

§3.4.12: View_Setting_ID

+
enum View_Setting_ID;
Description
A View_Setting_ID names a setting in a view.
Values
ViewSetting_Null
ViewSetting_Null is not a valid setting, it is reserved to detect errors.
@@ -1322,8 +1322,8 @@ the range [1,16].


-

§3.4.13: Mouse_Cursor_Show_Type

-
enum Mouse_Cursor_Show_Type;
+

§3.4.13: Mouse_Cursor_Show_Type

+
enum Mouse_Cursor_Show_Type;
Description
A Mouse_Cursor_Show_Type value specifes a mode for 4coder to handle the mouse cursor.
Values
MouseCursorShow_Never
The MouseCursorShow_Never mode never shows the cursor.
@@ -1334,8 +1334,8 @@ the range [1,16].


-

§3.4.14: Buffer_Seek_Type

-
enum Buffer_Seek_Type;
+

§3.4.14: Buffer_Seek_Type

+
enum Buffer_Seek_Type;
Description
The Buffer_Seek_Type is is used in a Buffer_Seek to identify which coordinates are suppose to be used for the seek.
Values
buffer_seek_pos
@@ -1355,8 +1355,8 @@ coordinates are suppose to be used for the seek.
See Also

-

§3.4.15: View_Split_Position

-
enum View_Split_Position;
+

§3.4.15: View_Split_Position

+
enum View_Split_Position;
Description
A View_Split_Position specifies where a new view should be placed as a result of a view split operation.
Values
ViewSplit_Top
@@ -1376,8 +1376,8 @@ a view split operation.
-

§3.4.16: Key_Modifier_Flag

-
enum Key_Modifier_Flag;
+

§3.4.16: Key_Modifier_Flag

+
enum Key_Modifier_Flag;
Description
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.
Flags
MDFR_NONE = 0x0
@@ -1397,8 +1397,8 @@ Flags can be combined with bit or to specify a state with multiple modifiers.

-

§3.4.17: Memory_Protect_Flags

-
enum Memory_Protect_Flags;
+

§3.4.17: Memory_Protect_Flags

+
enum Memory_Protect_Flags;
Description
TODO
Flags
MemProtect_Read = 0x1
TODO
@@ -1413,8 +1413,8 @@ Flags can be combined with bit or to specify a state with multiple modifiers.

-

§3.4.18: Buffer_Create_Flag

-
enum Buffer_Create_Flag;
+

§3.4.18: Buffer_Create_Flag

+
enum Buffer_Create_Flag;
Description
A Buffer_Create_Flag field specifies how a buffer should be created.
Flags
BufferCreate_Background = 0x1
BufferCreate_Background is not currently implemented.
@@ -1426,8 +1426,8 @@ Flags can be combined with bit or to specify a state with multiple modifiers.

-

§3.4.19: Buffer_Kill_Flag

-
enum Buffer_Kill_Flag;
+

§3.4.19: Buffer_Kill_Flag

+
enum Buffer_Kill_Flag;
Description
A Buffer_Kill_Flag field specifies how a buffer should be killed.
Flags
BufferKill_Background = 0x1
BufferKill_Background is not currently implemented.
@@ -1439,8 +1439,8 @@ Flags can be combined with bit or to specify a state with multiple modifiers.

-

§3.4.20: Access_Flag

-
enum Access_Flag;
+

§3.4.20: Access_Flag

+
enum Access_Flag;
Description
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 @@ -1469,8 +1469,8 @@ that protection flag, the object is still returned from the access call.

-

§3.4.21: Seek_Boundary_Flag

-
enum Seek_Boundary_Flag;
+

§3.4.21: Seek_Boundary_Flag

+
enum Seek_Boundary_Flag;
Description
A Seek_Boundary_Flag field specifies a set of "boundary" types used in seeks for the beginning or end of different types of words.
Flags
BoundaryWhitespace = 0x1
@@ -1490,8 +1490,8 @@ beginning or end of different types of words.
-

§3.4.22: Command_Line_Input_Flag

-
enum Command_Line_Input_Flag;
+

§3.4.22: Command_Line_Input_Flag

+
enum Command_Line_Input_Flag;
Description
A Command_Line_Input_Flag field specifies the behavior of a call to a command line interface.
Flags
CLI_OverlapWithConflict = 0x1
If CLI_OverlapWithConflict is set if output buffer of the new command is already @@ -1511,8 +1511,8 @@ beginning or end of different types of words.
-

§3.4.23: Auto_Indent_Flag

-
enum Auto_Indent_Flag;
+

§3.4.23: Auto_Indent_Flag

+
enum Auto_Indent_Flag;
Description
An Auto_Indent_Flag field specifies the behavior of an auto indentation operation.
Flags
AutoIndent_ClearLine = 0x1
If AutoIndent_ClearLine is set, then any line that is only whitespace will @@ -1527,8 +1527,8 @@ beginning or end of different types of words.
-

§3.4.24: Set_Buffer_Flag

-
enum Set_Buffer_Flag;
+

§3.4.24: Set_Buffer_Flag

+
enum Set_Buffer_Flag;
Description
A Set_Buffer_Flag field specifies the behavior of an operation that sets the buffer of a view.
Flags
SetBuffer_KeepOriginalGUI = 0x1
If SetBuffer_KeepOriginalGUI then when the file is set, the view will not switch to it @@ -1537,8 +1537,8 @@ beginning or end of different types of words.
-

§3.4.25: Input_Type_Flag

-
enum Input_Type_Flag;
+

§3.4.25: Input_Type_Flag

+
enum Input_Type_Flag;
Description
A Input_Type_Flag field specifies a set of input event types.
Flags
EventOnAnyKey = 0x1
If EventOnAnyKey is set, all keyboard events are included in the set.
@@ -1577,8 +1577,8 @@ beginning or end of different types of words.
-

§3.4.26: Generic_Command

-
union Generic_Command {
+

§3.4.26: Generic_Command

+
union Generic_Command {
Command_ID cmdid;
Custom_Command_Function * command;
@@ -1598,8 +1598,8 @@ internal command or a custom command.
-

§3.4.27: Key_Event_Data

-
struct Key_Event_Data {
+

§3.4.27: Key_Event_Data

+
struct Key_Event_Data {
Key_Code keycode;
Key_Code character;
@@ -1632,8 +1632,8 @@ at the time of the event.
-

§3.4.28: Mouse_State

-
struct Mouse_State {
+

§3.4.28: Mouse_State

+
struct Mouse_State {
char l;
char r;
@@ -1692,8 +1692,8 @@ mouse if in the window.
-

§3.4.29: Range

-
union Range {
+

§3.4.29: Range

+
union Range {
struct {
@@ -1732,8 +1732,8 @@ Throughout the API ranges are thought of in the form [min,max
-

§3.4.30: File_Info

-
struct File_Info {
+

§3.4.30: File_Info

+
struct File_Info {
char * filename;
int filename_len;
@@ -1755,8 +1755,8 @@ int folder;
See Also

-

§3.4.31: File_List

-
struct File_List {
+

§3.4.31: File_List

+
struct File_List {
void * block;
File_Info * infos;
@@ -1783,8 +1783,8 @@ int block_size;

-

§3.4.32: Buffer_Identifier

-
struct Buffer_Identifier {
+

§3.4.32: Buffer_Identifier

+
struct Buffer_Identifier {
char * name;
int name_len;
@@ -1808,8 +1808,8 @@ can either be a name or an id. If the
-

§3.4.33: GUI_Scroll_Vars

-
struct GUI_Scroll_Vars {
+

§3.4.33: GUI_Scroll_Vars

+
struct GUI_Scroll_Vars {
float scroll_y;
int32_t target_y;
@@ -1846,8 +1846,8 @@ int32_t prev_target_x;

-

§3.4.34: Full_Cursor

-
struct Full_Cursor {
+

§3.4.34: Full_Cursor

+
struct Full_Cursor {
int32_t pos;
int32_t line;
@@ -1891,8 +1891,8 @@ the buffer is associated with a view to give the x/y values meaning.

-

§3.4.35: Partial_Cursor

-
struct Partial_Cursor {
+

§3.4.35: Partial_Cursor

+
struct Partial_Cursor {
int32_t pos;
int32_t line;
@@ -1917,8 +1917,8 @@ not currently associated with a View.
See Also

-

§3.4.36: Buffer_Seek

-
struct Buffer_Seek {
+

§3.4.36: Buffer_Seek

+
struct Buffer_Seek {
Buffer_Seek_Type type;
union {
@@ -1982,8 +1982,8 @@ for concisely creating Buffer_Seek structs. They can be found in 4coder_buffer_
See Also

-

§3.4.37: Buffer_Edit

-
struct Buffer_Edit {
+

§3.4.37: Buffer_Edit

+
struct Buffer_Edit {
int32_t str_start;
int32_t len;
@@ -2012,8 +2012,8 @@ will be replaced into the buffer.
-

§3.4.38: Buffer_Summary

-
struct Buffer_Summary {
+

§3.4.38: Buffer_Summary

+
struct Buffer_Summary {
bool32 exists;
bool32 ready;
@@ -2087,8 +2087,8 @@ bool32 unwrapped_lines;
See Also

-

§3.4.39: View_Summary

-
struct View_Summary {
+

§3.4.39: View_Summary

+
struct View_Summary {
bool32 exists;
int32_t view_id;
@@ -2157,8 +2157,8 @@ GUI_Scroll_Vars scroll_vars;
See Also

-

§3.4.40: User_Input

-
struct User_Input {
+

§3.4.40: User_Input

+
struct User_Input {
User_Input_Type_ID type;
bool32 abort;
@@ -2194,8 +2194,8 @@ Generic_Command command;
See Also

-

§3.4.41: Query_Bar

-
struct Query_Bar {
+

§3.4.41: Query_Bar

+
struct Query_Bar {
String prompt;
String string;
@@ -2213,8 +2213,8 @@ that will be displayed as a drop down bar durring an interactive command.
<

-

§3.4.42: Event_Message

-
struct Event_Message {
+

§3.4.42: Event_Message

+
struct Event_Message {
int type;
@@ -2226,8 +2226,8 @@ int type;

-

§3.4.43: Theme_Color

-
struct Theme_Color {
+

§3.4.43: Theme_Color

+
struct Theme_Color {
Style_Tag tag;
int_color color;
@@ -2318,74 +2318,74 @@ Coming Soon

§4.3 String Function Descriptions

    -

    §4.3.1: char_is_slash

    -
    +

    §4.3.1: char_is_slash

    +
    fstr_bool char_is_slash(
    char c
    )
    Description
    This call returns non-zero if c is \ or /.

    -

    §4.3.2: char_to_upper

    -
    +

    §4.3.2: char_to_upper

    +
    char char_to_upper(
    char c
    )
    Description
    If c is a lowercase letter this call returns the uppercase equivalent, otherwise it returns c.

    -

    §4.3.3: char_to_lower

    -
    +

    §4.3.3: char_to_lower

    +
    char char_to_lower(
    char c
    )
    Description
    If c is an uppercase letter this call returns the lowercase equivalent, otherwise it returns c.

    -

    §4.3.4: char_is_whitespace

    -
    +

    §4.3.4: char_is_whitespace

    +
    fstr_bool char_is_whitespace(
    char c
    )
    Description
    This call returns non-zero if c is whitespace.

    -

    §4.3.5: char_is_alpha_numeric

    -
    +

    §4.3.5: char_is_alpha_numeric

    +
    fstr_bool char_is_alpha_numeric(
    char c
    )
    Description
    This call returns non-zero if c is any alphanumeric character including underscore.

    -

    §4.3.6: char_is_alpha_numeric_true

    -
    +

    §4.3.6: char_is_alpha_numeric_true

    +
    fstr_bool char_is_alpha_numeric_true(
    char c
    )
    Description
    This call returns non-zero if c is any alphanumeric character no including underscore.

    -

    §4.3.7: char_is_alpha

    -
    +

    §4.3.7: char_is_alpha

    +
    fstr_bool char_is_alpha(
    char c
    )
    Description
    This call returns non-zero if c is any alphabetic character including underscore.

    -

    §4.3.8: char_is_alpha_true

    -
    +

    §4.3.8: char_is_alpha_true

    +
    fstr_bool char_is_alpha_true(
    char c
    )
    Description
    This call returns non-zero if c is any alphabetic character.

    -

    §4.3.9: char_is_hex

    -
    +

    §4.3.9: char_is_hex

    +
    fstr_bool char_is_hex(
    char c
    )
    Description
    This call returns non-zero if c is any valid hexadecimal digit.

    -

    §4.3.10: char_is_numeric

    -
    +

    §4.3.10: char_is_numeric

    +
    fstr_bool char_is_numeric(
    char c
    )
    Description
    This call returns non-zero if c is any valid decimal digit.

    -

    §4.3.11: string_zero

    -
    +

    §4.3.11: string_zero

    +
    String string_zero(

    )
    Description
    This call returns a String struct of zeroed members.

    -

    §4.3.12: make_string

    -
    +

    §4.3.12: make_string

    +
    String make_string(
    void *str,
    int32_t size,
    int32_t mem_size
    )
    @@ -2403,8 +2403,8 @@ If the memory does not already contain a useful string this should be zero.
    The mem_size parameter expresses the full size of the memory provided by str.
    Description
    This call returns the String created from the parameters.

    -

    §4.3.13: make_string

    -
    +

    §4.3.13: make_string

    +
    String make_string(
    void *str,
    int32_t size
    )
    @@ -2420,105 +2420,105 @@ does not specify the size of the memory it is also assumed that this size is the of the memory.
    Description
    This call returns the String created from the parameters.

    -

    §4.3.14: make_lit_string

    -
    +

    §4.3.14: make_lit_string

    +
    #define make_lit_string(s)
    Description
    This macro takes a literal string in quotes and uses it to create a String with the correct size and memory size. Strings created this way should usually not be mutated.

    -

    §4.3.15: make_fixed_width_string

    -
    +

    §4.3.15: make_fixed_width_string

    +
    #define make_fixed_width_string(s)
    Description
    This macro takes a local char array with a fixed width and uses it to create an empty String with the correct size and memory size to operate on the array.

    -

    §4.3.16: expand_str

    -
    +

    §4.3.16: expand_str

    +
    #define expand_str(s)
    Description
    This macro is a helper for any calls that take a char*,int pair to specify a string. This macro expands to both of those parameters from one String struct.

    -

    §4.3.17: str_size

    -
    +

    §4.3.17: str_size

    +
    int32_t str_size(
    char *str
    )
    Description
    This call returns the number of bytes before a null terminator starting at str.

    -

    §4.3.18: make_string_slowly

    -
    +

    §4.3.18: make_string_slowly

    +
    String make_string_slowly(
    void *str
    )
    Description
    This call makes a string by counting the number of bytes before a null terminator and treating that as the size and memory size of the string.

    -

    §4.3.19: substr

    -
    +

    §4.3.19: substr

    +
    String substr(
    String str,
    int32_t start
    )
    Description
    This call creates a substring of str that starts with an offset from str's base. The new string uses the same underlying memory so both strings will see changes. Usually strings created this way should only go through immutable calls.

    -

    §4.3.20: substr

    -
    +

    §4.3.20: substr

    +
    String substr(
    String str,
    int32_t start,
    int32_t size
    )
    Description
    This call creates a substring of str that starts with an offset from str's base, and has a fixed size. The new string uses the same underlying memory so both strings will see changes. Usually strings created this way should only go through immutable calls.

    -

    §4.3.21: skip_whitespace

    -
    +

    §4.3.21: skip_whitespace

    +
    String skip_whitespace(
    String str
    )
    Description
    This call creates a substring that starts with the first non-whitespace character of str. Like other substr calls, the new string uses the underlying memory and so should usually be considered immutable.
    See Also

    -

    §4.3.22: chop_whitespace

    -
    +

    §4.3.22: chop_whitespace

    +
    String chop_whitespace(
    String str
    )
    Description
    This call creates a substring that ends with the last non-whitespace character of str. Like other substr calls, the new string uses the underlying memory and so should usually be considered immutable.
    See Also

    -

    §4.3.23: skip_chop_whitespace

    -
    +

    §4.3.23: skip_chop_whitespace

    +
    String skip_chop_whitespace(
    String str
    )
    Description
    This call is equivalent to calling skip_whitespace and chop_whitespace together.
    See Also

    -

    §4.3.24: tailstr

    -
    +

    §4.3.24: tailstr

    +
    String tailstr(
    String str
    )
    Description
    This call returns an empty String with underlying memory taken from the portion of str's memory that is not used.

    -

    §4.3.25: match

    -
    +

    §4.3.25: match

    +
    fstr_bool match(
    char *a,
    char *b
    )
    Description
    This call returns non-zero if a and b are equivalent.

    -

    §4.3.26: match

    -
    +

    §4.3.26: match

    +
    fstr_bool match(
    String a,
    char *b
    )
    Description
    This call returns non-zero if a and b are equivalent.

    -

    §4.3.27: match

    -
    +

    §4.3.27: match

    +
    fstr_bool match(
    char *a,
    String b
    )
    Description
    This call returns non-zero if a and b are equivalent.

    -

    §4.3.28: match

    -
    +

    §4.3.28: match

    +
    fstr_bool match(
    String a,
    String b
    )
    Description
    This call returns non-zero if a and b are equivalent.

    -

    §4.3.29: match_part

    -
    +

    §4.3.29: match_part

    +
    fstr_bool match_part(
    char *a,
    char *b,
    int32_t *len
    )
    @@ -2528,8 +2528,8 @@ fstr_bool match_part(
    Description
    This call is similar to a match call, except that it is permitted for a to be longer than b. In other words this call returns non-zero if b is a prefix of a.

    -

    §4.3.30: match_part

    -
    +

    §4.3.30: match_part

    +
    fstr_bool match_part(
    String a,
    char *b,
    int32_t *len
    )
    @@ -2539,8 +2539,8 @@ fstr_bool match_part(
    Description
    This call is similar to a match call, except that it is permitted for a to be longer than b. In other words this call returns non-zero if b is a prefix of a.

    -

    §4.3.31: match_part

    -
    +

    §4.3.31: match_part

    +
    fstr_bool match_part(
    char *a,
    char *b
    )
    @@ -2550,53 +2550,53 @@ fstr_bool match_part(
    Description
    This call is similar to a match call, except that it is permitted for a to be longer than b. In other words this call returns non-zero if b is a prefix of a.

    -

    §4.3.32: match_part

    -
    +

    §4.3.32: match_part

    +
    fstr_bool match_part(
    String a,
    char *b
    )
    Description
    This call is similar to a match call, except that it is permitted for a to be longer than b. In other words this call returns non-zero if b is a prefix of a.

    -

    §4.3.33: match_part

    -
    +

    §4.3.33: match_part

    +
    fstr_bool match_part(
    char *a,
    String b
    )
    Description
    This call is similar to a match call, except that it is permitted for a to be longer than b. In other words this call returns non-zero if b is a prefix of a.

    -

    §4.3.34: match_part

    -
    +

    §4.3.34: match_part

    +
    fstr_bool match_part(
    String a,
    String b
    )
    Description
    This call is similar to a match call, except that it is permitted for a to be longer than b. In other words this call returns non-zero if b is a prefix of a.

    -

    §4.3.35: match_insensitive

    -
    +

    §4.3.35: match_insensitive

    +
    fstr_bool match_insensitive(
    char *a,
    char *b
    )
    Description
    This call returns non-zero if a and b are equivalent under case insensitive comparison.

    -

    §4.3.36: match_insensitive

    -
    +

    §4.3.36: match_insensitive

    +
    fstr_bool match_insensitive(
    String a,
    char *b
    )
    Description
    This call returns non-zero if a and b are equivalent under case insensitive comparison.

    -

    §4.3.37: match_insensitive

    -
    +

    §4.3.37: match_insensitive

    +
    fstr_bool match_insensitive(
    char *a,
    String b
    )
    Description
    This call returns non-zero if a and b are equivalent under case insensitive comparison.

    -

    §4.3.38: match_insensitive

    -
    +

    §4.3.38: match_insensitive

    +
    fstr_bool match_insensitive(
    String a,
    String b
    )
    Description
    This call returns non-zero if a and b are equivalent under case insensitive comparison.

    -

    §4.3.39: match_part_insensitive

    -
    +

    §4.3.39: match_part_insensitive

    +
    fstr_bool match_part_insensitive(
    char *a,
    char *b,
    int32_t *len
    )
    @@ -2605,8 +2605,8 @@ fstr_bool match_part_insensitive(
    If this call returns non-zero this parameter is used to output the length of b.
    Description
    This call performs the same partial matching rule as match_part under case insensitive comparison.
    See Also

    -

    §4.3.40: match_part_insensitive

    -
    +

    §4.3.40: match_part_insensitive

    +
    fstr_bool match_part_insensitive(
    String a,
    char *b,
    int32_t *len
    )
    @@ -2615,64 +2615,64 @@ fstr_bool match_part_insensitive(
    If this call returns non-zero this parameter is used to output the length of b.
    Description
    This call performs the same partial matching rule as match_part under case insensitive comparison.
    See Also

    -

    §4.3.41: match_part_insensitive

    -
    +

    §4.3.41: match_part_insensitive

    +
    fstr_bool match_part_insensitive(
    char *a,
    char *b
    )
    Description
    This call performs the same partial matching rule as match_part under case insensitive comparison.
    See Also

    -

    §4.3.42: match_part_insensitive

    -
    +

    §4.3.42: match_part_insensitive

    +
    fstr_bool match_part_insensitive(
    String a,
    char *b
    )
    Description
    This call performs the same partial matching rule as match_part under case insensitive comparison.
    See Also

    -

    §4.3.43: match_part_insensitive

    -
    +

    §4.3.43: match_part_insensitive

    +
    fstr_bool match_part_insensitive(
    char *a,
    String b
    )
    Description
    This call performs the same partial matching rule as match_part under case insensitive comparison.
    See Also

    -

    §4.3.44: match_part_insensitive

    -
    +

    §4.3.44: match_part_insensitive

    +
    fstr_bool match_part_insensitive(
    String a,
    String b
    )
    Description
    This call performs the same partial matching rule as match_part under case insensitive comparison.
    See Also

    -

    §4.3.45: compare

    -
    +

    §4.3.45: compare

    +
    int32_t compare(
    char *a,
    char *b
    )
    Description
    This call returns zero if a and b are equivalent, it returns negative if a sorts before b alphabetically, and positive if a sorts after b alphabetically.

    -

    §4.3.46: compare

    -
    +

    §4.3.46: compare

    +
    int32_t compare(
    String a,
    char *b
    )
    Description
    This call returns zero if a and b are equivalent, it returns negative if a sorts before b alphabetically, and positive if a sorts after b alphabetically.

    -

    §4.3.47: compare

    -
    +

    §4.3.47: compare

    +
    int32_t compare(
    char *a,
    String b
    )
    Description
    This call returns zero if a and b are equivalent, it returns negative if a sorts before b alphabetically, and positive if a sorts after b alphabetically.

    -

    §4.3.48: compare

    -
    +

    §4.3.48: compare

    +
    int32_t compare(
    String a,
    String b
    )
    Description
    This call returns zero if a and b are equivalent, it returns negative if a sorts before b alphabetically, and positive if a sorts after b alphabetically.

    -

    §4.3.49: find

    -
    +

    §4.3.49: find

    +
    int32_t find(
    char *str,
    int32_t start,
    char character
    )
    @@ -2690,8 +2690,8 @@ int32_t find(
    Description
    This call returns the index of the first occurance of character, or the size of the string if the character is not found.

    -

    §4.3.50: find

    -
    +

    §4.3.50: find

    +
    int32_t find(
    String str,
    int32_t start,
    char character
    )
    @@ -2709,8 +2709,8 @@ int32_t find(
    Description
    This call returns the index of the first occurance of character, or the size of the string if the character is not found.

    -

    §4.3.51: find

    -
    +

    §4.3.51: find

    +
    int32_t find(
    char *str,
    int32_t start,
    char *characters
    )
    @@ -2728,8 +2728,8 @@ int32_t find(
    Description
    This call returns the index of the first occurance of a character in the characters array, or the size of the string if no such character is not found.

    -

    §4.3.52: find

    -
    +

    §4.3.52: find

    +
    int32_t find(
    String str,
    int32_t start,
    char *characters
    )
    @@ -2747,8 +2747,8 @@ int32_t find(
    Description
    This call returns the index of the first occurance of a character in the characters array, or the size of the string if no such character is not found.

    -

    §4.3.53: find_substr

    -
    +

    §4.3.53: find_substr

    +
    int32_t find_substr(
    char *str,
    int32_t start,
    String seek
    )
    @@ -2766,8 +2766,8 @@ int32_t find_substr(
    Description
    This call returns the index of the first occurance of the seek substring in str or the size of str if no such substring in str is found.

    -

    §4.3.54: find_substr

    -
    +

    §4.3.54: find_substr

    +
    int32_t find_substr(
    String str,
    int32_t start,
    String seek
    )
    @@ -2785,8 +2785,8 @@ int32_t find_substr(
    Description
    This call returns the index of the first occurance of the seek substring in str or the size of str if no such substring in str is found.

    -

    §4.3.55: rfind_substr

    -
    +

    §4.3.55: rfind_substr

    +
    int32_t rfind_substr(
    String str,
    int32_t start,
    String seek
    )
    @@ -2804,8 +2804,8 @@ int32_t rfind_substr(
    Description
    This call returns the index of the last occurance of the seek substring in str or -1 if no such substring in str is found.

    -

    §4.3.56: find_substr_insensitive

    -
    +

    §4.3.56: find_substr_insensitive

    +
    int32_t find_substr_insensitive(
    char *str,
    int32_t start,
    String seek
    )
    @@ -2822,8 +2822,8 @@ int32_t find_substr_insensitive(
    The seek parameter provides a string to find in str.
    Description
    This call acts as find_substr under case insensitive comparison.
    See Also

    -

    §4.3.57: find_substr_insensitive

    -
    +

    §4.3.57: find_substr_insensitive

    +
    int32_t find_substr_insensitive(
    String str,
    int32_t start,
    String seek
    )
    @@ -2840,34 +2840,34 @@ int32_t find_substr_insensitive(
    The seek parameter provides a string to find in str.
    Description
    This call acts as find_substr under case insensitive comparison.
    See Also

    -

    §4.3.58: has_substr

    -
    +

    §4.3.58: has_substr

    +
    fstr_bool has_substr(
    char *s,
    String seek
    )
    Description
    This call returns non-zero if the string s contains a substring equivalent to seek.

    -

    §4.3.59: has_substr

    -
    +

    §4.3.59: has_substr

    +
    fstr_bool has_substr(
    String s,
    String seek
    )
    Description
    This call returns non-zero if the string s contains a substring equivalent to seek.

    -

    §4.3.60: has_substr_insensitive

    -
    +

    §4.3.60: has_substr_insensitive

    +
    fstr_bool has_substr_insensitive(
    char *s,
    String seek
    )
    Description
    This call returns non-zero if the string s contains a substring equivalent to seek under case insensitive comparison.

    -

    §4.3.61: has_substr_insensitive

    -
    +

    §4.3.61: has_substr_insensitive

    +
    fstr_bool has_substr_insensitive(
    String s,
    String seek
    )
    Description
    This call returns non-zero if the string s contains a substring equivalent to seek under case insensitive comparison.

    -

    §4.3.62: copy_fast_unsafe

    -
    +

    §4.3.62: copy_fast_unsafe

    +
    int32_t copy_fast_unsafe(
    char *dest,
    char *src
    )
    @@ -2876,8 +2876,8 @@ The copy does not stop until a null terminator is found in src. There is no safety against overrun so dest must be large enough to contain src. The null terminator is not written to dest. This call returns the number of bytes coppied to dest.

    -

    §4.3.63: copy_fast_unsafe

    -
    +

    §4.3.63: copy_fast_unsafe

    +
    int32_t copy_fast_unsafe(
    char *dest,
    String src
    )
    @@ -2886,16 +2886,16 @@ The copy does not stop until src.size characters are coppied. There is no safety against overrun so dest must be large enough to contain src. The null terminator is not written to dest. This call returns the number of bytes coppied to dest.

    -

    §4.3.64: copy_checked

    -
    +

    §4.3.64: copy_checked

    +
    fstr_bool copy_checked(
    String *dest,
    String src
    )
    Description
    This call performs a copy from the src string to the dest string. The memory_size of dest is checked before any coppying is done. This call returns non-zero on a successful copy.

    -

    §4.3.65: copy_partial

    -
    +

    §4.3.65: copy_partial

    +
    fstr_bool copy_partial(
    String *dest,
    char *src
    )
    @@ -2903,8 +2903,8 @@ fstr_bool copy_partial( The memory_size of dest is checked if the entire copy cannot be performed, as many bytes as possible are coppied to dest. This call returns non-zero if the entire string is coppied to dest.

    -

    §4.3.66: copy_partial

    -
    +

    §4.3.66: copy_partial

    +
    fstr_bool copy_partial(
    String *dest,
    String src
    )
    @@ -2912,66 +2912,66 @@ fstr_bool copy_partial( The memory_size of dest is checked if the entire copy cannot be performed, as many bytes as possible are coppied to dest. This call returns non-zero if the entire string is coppied to dest.

    -

    §4.3.67: copy

    -
    +

    §4.3.67: copy

    +
    int32_t copy(
    char *dest,
    char *src
    )
    Description
    This call performs a copy from src to dest equivalent to copy_fast_unsafe.
    See Also

    -

    §4.3.68: copy

    -
    +

    §4.3.68: copy

    +
    void copy(
    String *dest,
    String src
    )
    Description
    This call performs a copy from src to dest equivalent to copy_checked.
    See Also

    -

    §4.3.69: copy

    -
    +

    §4.3.69: copy

    +
    void copy(
    String *dest,
    char *src
    )
    Description
    This call performs a copy from src to dest equivalent to copy_partial.
    See Also

    -

    §4.3.70: append_checked

    -
    +

    §4.3.70: append_checked

    +
    fstr_bool append_checked(
    String *dest,
    String src
    )
    Description
    This call checks if there is enough space in dest's underlying memory to append src onto dest. If there is src is appended and the call returns non-zero.

    -

    §4.3.71: append_partial

    -
    +

    §4.3.71: append_partial

    +
    fstr_bool append_partial(
    String *dest,
    char *src
    )
    Description
    This call attemps to append as much of src into the space in dest's underlying memory as possible. If the entire string is appended the call returns non-zero.

    -

    §4.3.72: append_partial

    -
    +

    §4.3.72: append_partial

    +
    fstr_bool append_partial(
    String *dest,
    String src
    )
    Description
    This call attemps to append as much of src into the space in dest's underlying memory as possible. If the entire string is appended the call returns non-zero.

    -

    §4.3.73: append

    -
    +

    §4.3.73: append

    +
    fstr_bool append(
    String *dest,
    char c
    )
    Description
    This call attemps to append c onto dest. If there is space left in dest's underlying memory the character is appended and the call returns non-zero.

    -

    §4.3.74: append

    -
    +

    §4.3.74: append

    +
    fstr_bool append(
    String *dest,
    String src
    )
    Description
    This call is equivalent to append_partial.
    See Also

    -

    §4.3.75: append

    -
    +

    §4.3.75: append

    +
    fstr_bool append(
    String *dest,
    char *src
    )
    Description
    This call is equivalent to append_partial.
    See Also

    -

    §4.3.76: terminate_with_null

    -
    +

    §4.3.76: terminate_with_null

    +
    fstr_bool terminate_with_null(
    String *str
    )
    @@ -2979,16 +2979,16 @@ fstr_bool terminate_with_null( size of str. This is usually called when the time comes to pass the the string to an API that requires a null terminator. This call returns non-zero if there was a spare byte in the strings underlying memory.

    -

    §4.3.77: append_padding

    -
    +

    §4.3.77: append_padding

    +
    fstr_bool append_padding(
    String *dest,
    char c,
    int32_t target_size
    )
    Description
    This call pads out dest so that it has a size of target_size by appending the padding character c until the target size is achieved. This call returns non-zero if dest does not run out of space in the underlying memory.

    -

    §4.3.78: replace_char

    -
    +

    §4.3.78: replace_char

    +
    void replace_char(
    String *str,
    char replace,
    char with
    )
    @@ -3005,142 +3005,142 @@ void replace_char(
    The with character specifies what to write into the positions where replacement occurs.
    Description
    This call replaces all occurances of character in str with another character.

    -

    §4.3.79: int_to_str_size

    -
    +

    §4.3.79: int_to_str_size

    +
    int32_t int_to_str_size(
    int32_t x
    )
    Description
    This call returns the number of bytes required to represent x as a string.

    -

    §4.3.80: int_to_str

    -
    +

    §4.3.80: int_to_str

    +
    fstr_bool int_to_str(
    String *dest,
    int32_t x
    )
    Description
    This call writes a string representation of x into dest. If there is enough space in dest this call returns non-zero.

    -

    §4.3.81: append_int_to_str

    -
    +

    §4.3.81: append_int_to_str

    +
    fstr_bool append_int_to_str(
    String *dest,
    int32_t x
    )
    Description
    This call appends a string representation of x onto dest. If there is enough space in dest this call returns non-zero.

    -

    §4.3.82: u64_to_str_size

    -
    +

    §4.3.82: u64_to_str_size

    +
    int32_t u64_to_str_size(
    uint64_t x
    )
    Description
    This call returns the number of bytes required to represent x as a string.

    -

    §4.3.83: u64_to_str

    -
    +

    §4.3.83: u64_to_str

    +
    fstr_bool u64_to_str(
    String *dest,
    uint64_t x
    )
    Description
    This call writes a string representation of x into dest. If there is enough space in dest this call returns non-zero.

    -

    §4.3.84: append_u64_to_str

    -
    +

    §4.3.84: append_u64_to_str

    +
    fstr_bool append_u64_to_str(
    String *dest,
    uint64_t x
    )
    Description
    This call appends a string representation of x onto dest. If there is enough space in dest this call returns non-zero.

    -

    §4.3.85: float_to_str_size

    -
    +

    §4.3.85: float_to_str_size

    +
    int32_t float_to_str_size(
    float x
    )
    Description
    This call returns the number of bytes required to represent x as a string.

    -

    §4.3.86: append_float_to_str

    -
    +

    §4.3.86: append_float_to_str

    +
    fstr_bool append_float_to_str(
    String *dest,
    float x
    )
    Description
    This call writes a string representation of x into dest. If there is enough space in dest this call returns non-zero.

    -

    §4.3.87: float_to_str

    -
    +

    §4.3.87: float_to_str

    +
    fstr_bool float_to_str(
    String *dest,
    float x
    )
    Description
    This call appends a string representation of x onto dest. If there is enough space in dest this call returns non-zero.

    -

    §4.3.88: str_to_int

    -
    +

    §4.3.88: str_to_int

    +
    int32_t str_to_int(
    char *str
    )
    Description
    If str represents a valid string representation of an integer, this call will return the integer represented by the string. Otherwise this call returns zero.

    -

    §4.3.89: str_to_int

    -
    +

    §4.3.89: str_to_int

    +
    int32_t str_to_int(
    String str
    )
    Description
    If str represents a valid string representation of an integer, this call will return the integer represented by the string. Otherwise this call returns zero.

    -

    §4.3.90: hexchar_to_int

    -
    +

    §4.3.90: hexchar_to_int

    +
    int32_t hexchar_to_int(
    char c
    )
    Description
    If c is a valid hexadecimal digit [0-9a-fA-F] this call returns the value of the integer value of the digit. Otherwise the return is some nonsense value.

    -

    §4.3.91: int_to_hexchar

    -
    +

    §4.3.91: int_to_hexchar

    +
    char int_to_hexchar(
    int32_t x
    )
    Description
    If x is in the range [0,15] this call returns the equivalent lowercase hexadecimal digit. Otherwise the return is some nonsense value.

    -

    §4.3.92: hexstr_to_int

    -
    +

    §4.3.92: hexstr_to_int

    +
    uint32_t hexstr_to_int(
    String str
    )
    Description
    This call interprets str has a hexadecimal representation of an integer and returns the represented integer value.

    -

    §4.3.93: color_to_hexstr

    -
    +

    §4.3.93: color_to_hexstr

    +
    fstr_bool color_to_hexstr(
    String *s,
    uint32_t color
    )
    Description
    This call fills s with the hexadecimal representation of the color. If there is enough memory in s to represent the color this call returns non-zero.

    -

    §4.3.94: hexstr_to_color

    -
    +

    §4.3.94: hexstr_to_color

    +
    fstr_bool hexstr_to_color(
    String s,
    uint32_t *out
    )
    Description
    This call interprets s as a color and writes the 32-bit integer representation into out.

    -

    §4.3.95: reverse_seek_slash

    -
    +

    §4.3.95: reverse_seek_slash

    +
    int32_t reverse_seek_slash(
    String str,
    int32_t pos
    )
    Description
    This call searches for a slash in str by starting pos bytes from the end and going backwards.

    -

    §4.3.96: reverse_seek_slash

    -
    +

    §4.3.96: reverse_seek_slash

    +
    int32_t reverse_seek_slash(
    String str
    )
    Description
    This call searches for a slash in str by starting at the end and going backwards.

    -

    §4.3.97: front_of_directory

    -
    +

    §4.3.97: front_of_directory

    +
    String front_of_directory(
    String dir
    )
    Description
    This call returns a substring of dir containing only the file name or folder name furthest to the right in the directory.
    See Also

    -

    §4.3.98: path_of_directory

    -
    +

    §4.3.98: path_of_directory

    +
    String path_of_directory(
    String dir
    )
    Description
    This call returns a substring of dir containing the whole path except for the final file or folder name.
    See Also

    -

    §4.3.99: set_last_folder

    -
    +

    §4.3.99: set_last_folder

    +
    fstr_bool set_last_folder(
    String *dir,
    char *folder_name,
    char slash
    )
    @@ -3159,8 +3159,8 @@ at the end of the directory.
    Description
    This call deletes the last file name or folder name in the dir string and appends the new provided one. If there is enough memory in dir this call returns non-zero.

    -

    §4.3.100: set_last_folder

    -
    +

    §4.3.100: set_last_folder

    +
    fstr_bool set_last_folder(
    String *dir,
    String folder_name,
    char slash
    )
    @@ -3178,21 +3178,21 @@ fstr_bool set_last_folder(
    Description
    This call deletes the last file name or folder name in the dir string and appends the new provided one. If there is enough memory in dir this call returns non-zero.

    -

    §4.3.101: file_extension

    -
    +

    §4.3.101: file_extension

    +
    String file_extension(
    String str
    )
    Description
    This call returns a substring containing only the file extension of the provided filename.
    See Also

    -

    §4.3.102: remove_last_folder

    -
    +

    §4.3.102: remove_last_folder

    +
    fstr_bool remove_last_folder(
    String *str
    )
    Description
    This call attemps to delete a folder or filename off the end of a path string. This call returns non-zero on success.

    -

    §4.3.103: string_set_match

    -
    +

    §4.3.103: string_set_match

    +
    fstr_bool string_set_match(
    String *str_set,
    int32_t count,
    String str,
    int32_t *match_index
    )
    diff --git a/4ed_rendering.cpp b/4ed_rendering.cpp index b06f0ae5..b2ed7705 100644 --- a/4ed_rendering.cpp +++ b/4ed_rendering.cpp @@ -628,7 +628,9 @@ font_load_freetype(Partition *part, c->xoff2 = w + c->xoff; c->yoff2 = h + c->yoff + 1; - rf->advance_data[i] = CEIL32(face->glyph->advance.x / 64.0f); + // TODO(allen): maybe advance data should be integers for a while... + // I require the actual values to be integers anyway... hmm... + rf->advance_data[i] = (f32)CEIL32(face->glyph->advance.x / 64.0f); rf->glyphs[i].exists = 1;