printing all types through same system

master
Allen Webster 2016-09-03 15:49:47 -04:00
parent 1c513033cd
commit 4a415a83ac
3 changed files with 321 additions and 383 deletions

View File

@ -101,17 +101,14 @@ Coming Soon</i><div>
<li><a href='#Buffer_ID_doc'>Buffer_ID</a></li>
<li><a href='#View_ID_doc'>View_ID</a></li>
<li><a href='#Key_Modifier_doc'>Key_Modifier</a></li>
<li><a href='#Key_Modifier_Flag_doc'>Key_Modifier_Flag</a></li>
<li><a href='#Command_ID_doc'>Command_ID</a></li>
<li><a href='#Memory_Protect_Flags_doc'>Memory_Protect_Flags</a></li>
<li><a href='#User_Input_Type_ID_doc'>User_Input_Type_ID</a></li>
<li><a href='#Event_Message_Type_ID_doc'>Event_Message_Type_ID</a></li>
<li><a href='#Buffer_Batch_Edit_Type_doc'>Buffer_Batch_Edit_Type</a></li>
<li><a href='#Buffer_Setting_ID_doc'>Buffer_Setting_ID</a></li>
<li><a href='#View_Setting_ID_doc'>View_Setting_ID</a></li>
<li><a href='#Mouse_Cursor_Show_Type_doc'>Mouse_Cursor_Show_Type</a></li>
<li><a href='#Buffer_Seek_Type_doc'>Buffer_Seek_Type</a></li>
<li><a href='#View_Split_Position_doc'>View_Split_Position</a></li>
<li><a href='#Key_Modifier_Flag_doc'>Key_Modifier_Flag</a></li>
<li><a href='#Memory_Protect_Flags_doc'>Memory_Protect_Flags</a></li>
<li><a href='#Buffer_Create_Flag_doc'>Buffer_Create_Flag</a></li>
<li><a href='#Buffer_Kill_Flag_doc'>Buffer_Kill_Flag</a></li>
<li><a href='#Access_Flag_doc'>Access_Flag</a></li>
@ -120,6 +117,9 @@ Coming Soon</i><div>
<li><a href='#Auto_Indent_Flag_doc'>Auto_Indent_Flag</a></li>
<li><a href='#Set_Buffer_Flag_doc'>Set_Buffer_Flag</a></li>
<li><a href='#Input_Type_Flag_doc'>Input_Type_Flag</a></li>
<li><a href='#Mouse_Cursor_Show_Type_doc'>Mouse_Cursor_Show_Type</a></li>
<li><a href='#Buffer_Seek_Type_doc'>Buffer_Seek_Type</a></li>
<li><a href='#View_Split_Position_doc'>View_Split_Position</a></li>
<li><a href='#Generic_Command_doc'>Generic_Command</a></li>
<li><a href='#Key_Event_Data_doc'>Key_Event_Data</a></li>
<li><a href='#Mouse_State_doc'>Mouse_State</a></li>
@ -1218,8 +1218,29 @@ the interval [1,16].</div></div><hr>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>MDFR_INDEX_COUNT is used to specify the number of modifiers supported.</div></div>
</div>
</div><hr>
<div id='Key_Modifier_Flag_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.7: Key_Modifier_Flag</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Key_Modifier_Flag;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>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.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>MDFR_NONE</span> = 0x0</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>MDFR_NONE specifies that no modifiers are pressed.</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>MDFR_CTRL</span> = 0x1</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'></div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>MDFR_ALT</span> = 0x2</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'></div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>MDFR_SHIFT</span> = 0x4</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'></div></div>
</div>
</div><hr>
<div id='Command_ID_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.7: Command_ID</h4>
<h4>&sect;3.4.8: Command_ID</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Command_ID;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>A Command_ID is used as a name for commands implemented internally in 4coder.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>cmdid_null</span></span></div>
@ -1294,8 +1315,24 @@ the interval [1,16].</div></div><hr>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'></div></div>
</div>
</div><hr>
<div id='Memory_Protect_Flags_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.9: Memory_Protect_Flags</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Memory_Protect_Flags;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>TODO</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>MemProtect_Read</span> = 0x1</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>TODO</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>MemProtect_Write</span> = 0x2</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>TODO</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>MemProtect_Execute</span> = 0x4</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>TODO</div></div>
</div>
</div><hr>
<div id='User_Input_Type_ID_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.8: User_Input_Type_ID</h4>
<h4>&sect;3.4.10: User_Input_Type_ID</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum User_Input_Type_ID;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>User_Input_Type_ID specifies a type of user input event.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>UserInputNone</span></span></div>
@ -1311,7 +1348,7 @@ the interval [1,16].</div></div><hr>
</div>
</div><hr>
<div id='Event_Message_Type_ID_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.9: Event_Message_Type_ID</h4>
<h4>&sect;3.4.11: Event_Message_Type_ID</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Event_Message_Type_ID;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>Event_Message_Type_ID is a part of an unfinished feature.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>EventMessage_NoMessage</span></span></div>
@ -1331,7 +1368,7 @@ the interval [1,16].</div></div><hr>
</div>
</div><hr>
<div id='Buffer_Batch_Edit_Type_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.10: Buffer_Batch_Edit_Type</h4>
<h4>&sect;3.4.12: Buffer_Batch_Edit_Type</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Buffer_Batch_Edit_Type;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>A Buffer_Batch_Edit_Type is a type of batch operation.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>BatchEdit_Normal</span></span></div>
@ -1344,7 +1381,7 @@ the interval [1,16].</div></div><hr>
</div>
</div><hr>
<div id='Buffer_Setting_ID_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.11: Buffer_Setting_ID</h4>
<h4>&sect;3.4.13: Buffer_Setting_ID</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Buffer_Setting_ID;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>A Buffer_Setting_ID names a setting in a buffer.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>BufferSetting_Null</span></span></div>
@ -1384,7 +1421,7 @@ the interval [1,16].</div></div><hr>
</div>
</div><hr>
<div id='View_Setting_ID_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.12: View_Setting_ID</h4>
<h4>&sect;3.4.14: View_Setting_ID</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum View_Setting_ID;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>A View_Setting_ID names a setting in a view.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>ViewSetting_Null</span></span></div>
@ -1407,101 +1444,10 @@ the interval [1,16].</div></div><hr>
attached to a view in it's scrollable section.</div></div>
</div>
</div><hr>
<div id='Mouse_Cursor_Show_Type_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.13: Mouse_Cursor_Show_Type</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Mouse_Cursor_Show_Type;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>A Mouse_Cursor_Show_Type value specifes a mode for 4coder to handle the mouse cursor.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>MouseCursorShow_Never</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>The MouseCursorShow_Never mode never shows the cursor.</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>MouseCursorShow_Always</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>The MouseCursorShow_Never mode always shows the cursor.</div></div>
</div>
</div><hr>
<div id='Buffer_Seek_Type_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.14: Buffer_Seek_Type</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Buffer_Seek_Type;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>The Buffer_Seek_Type is is used in a Buffer_Seek to identify which
coordinates are suppose to be used for the seek.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>buffer_seek_pos</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>This value indicates absolute positioning where positions are measured as the number of bytes from the start of the file.</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>buffer_seek_wrapped_xy</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>This value indicates xy positioning with wrapped lines where the x and y values are in pixels.</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>buffer_seek_unwrapped_xy</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>This value indicates xy positioning with unwrapped lines where the x and y values are in pixels.</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>buffer_seek_line_char</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>This value indicates line-character, or line-column positioning. These coordinates are 1 based to match standard line numbering.</div></div>
</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>See Also</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'><a href='#Buffer_Seek_doc'>Buffer_Seek</a></div><div style='margin-left: 5mm; margin-right: 5mm;'><a href='#4coder_Buffer_Positioning_System_doc'>4coder_Buffer_Positioning_System</a></div></div><hr>
<div id='View_Split_Position_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.15: View_Split_Position</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum View_Split_Position;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>A View_Split_Position specifies where a new view should be placed as a result of
a view split operation.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>ViewSplit_Top</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>This value indicates that the new view should be above the existing view.</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>ViewSplit_Bottom</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>This value indicates that the new view should be below the existing view.</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>ViewSplit_Left</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>This value indicates that the new view should be left of the existing view.</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>ViewSplit_Right</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>This value indicates that the new view should be right of the existing view.</div></div>
</div>
</div><hr>
<div id='Key_Modifier_Flag_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.16: Key_Modifier_Flag</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Key_Modifier_Flag;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>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.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Flags</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>MDFR_NONE</span> = 0x0</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>MDFR_NONE specifies that no modifiers are pressed.</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>MDFR_CTRL</span> = 0x1</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'></div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>MDFR_ALT</span> = 0x2</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'></div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>MDFR_SHIFT</span> = 0x4</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'></div></div>
</div>
</div><hr>
<div id='Memory_Protect_Flags_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.17: Memory_Protect_Flags</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Memory_Protect_Flags;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>TODO</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Flags</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>MemProtect_Read</span> = 0x1</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>TODO</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>MemProtect_Write</span> = 0x2</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>TODO</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>MemProtect_Execute</span> = 0x4</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>TODO</div></div>
</div>
</div><hr>
<div id='Buffer_Create_Flag_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.18: Buffer_Create_Flag</h4>
<h4>&sect;3.4.15: Buffer_Create_Flag</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Buffer_Create_Flag;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>A Buffer_Create_Flag field specifies how a buffer should be created.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Flags</i></b></div><div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>A Buffer_Create_Flag field specifies how a buffer should be created.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>BufferCreate_Background</span> = 0x1</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>BufferCreate_Background is not currently implemented.</div></div>
</div>
@ -1517,9 +1463,9 @@ Flags can be combined with bit or to specify a state with multiple modifiers.</d
</div>
</div><hr>
<div id='Buffer_Kill_Flag_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.19: Buffer_Kill_Flag</h4>
<h4>&sect;3.4.16: Buffer_Kill_Flag</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Buffer_Kill_Flag;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>A Buffer_Kill_Flag field specifies how a buffer should be killed.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Flags</i></b></div><div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>A Buffer_Kill_Flag field specifies how a buffer should be killed.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>BufferKill_Background</span> = 0x1</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>BufferKill_Background is not currently implemented.</div></div>
</div>
@ -1530,14 +1476,14 @@ Flags can be combined with bit or to specify a state with multiple modifiers.</d
</div>
</div><hr>
<div id='Access_Flag_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.20: Access_Flag</h4>
<h4>&sect;3.4.17: Access_Flag</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Access_Flag;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>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.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Flags</i></b></div><div>
that protection flag, the object is still returned from the access call.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>AccessOpen</span> = 0x0</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>AccessOpen does not include any bits, it indicates that the access should
only return objects that have no protection flags set.</div></div>
@ -1560,10 +1506,10 @@ that protection flag, the object is still returned from the access call.</div><d
</div>
</div><hr>
<div id='Seek_Boundary_Flag_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.21: Seek_Boundary_Flag</h4>
<h4>&sect;3.4.18: Seek_Boundary_Flag</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Seek_Boundary_Flag;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>A Seek_Boundary_Flag field specifies a set of "boundary" types used in seeks for the
beginning or end of different types of words.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Flags</i></b></div><div>
beginning or end of different types of words.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>BoundaryWhitespace</span> = 0x1</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'></div></div>
</div>
@ -1581,9 +1527,9 @@ beginning or end of different types of words.</div><div style='margin-top: 3mm;
</div>
</div><hr>
<div id='Command_Line_Input_Flag_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.22: Command_Line_Input_Flag</h4>
<h4>&sect;3.4.19: Command_Line_Input_Flag</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Command_Line_Input_Flag;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>A Command_Line_Input_Flag field specifies the behavior of a call to a command line interface.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Flags</i></b></div><div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>A Command_Line_Input_Flag field specifies the behavior of a call to a command line interface.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>CLI_OverlapWithConflict</span> = 0x1</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>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
@ -1602,9 +1548,9 @@ beginning or end of different types of words.</div><div style='margin-top: 3mm;
</div>
</div><hr>
<div id='Auto_Indent_Flag_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.23: Auto_Indent_Flag</h4>
<h4>&sect;3.4.20: Auto_Indent_Flag</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Auto_Indent_Flag;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>An Auto_Indent_Flag field specifies the behavior of an auto indentation operation.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Flags</i></b></div><div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>An Auto_Indent_Flag field specifies the behavior of an auto indentation operation.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>AutoIndent_ClearLine</span> = 0x1</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>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
@ -1618,9 +1564,9 @@ beginning or end of different types of words.</div><div style='margin-top: 3mm;
</div>
</div><hr>
<div id='Set_Buffer_Flag_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.24: Set_Buffer_Flag</h4>
<h4>&sect;3.4.21: Set_Buffer_Flag</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Set_Buffer_Flag;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>A Set_Buffer_Flag field specifies the behavior of an operation that sets the buffer of a view.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Flags</i></b></div><div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>A Set_Buffer_Flag field specifies the behavior of an operation that sets the buffer of a view.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>SetBuffer_KeepOriginalGUI</span> = 0x1</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>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
@ -1628,9 +1574,9 @@ beginning or end of different types of words.</div><div style='margin-top: 3mm;
</div>
</div><hr>
<div id='Input_Type_Flag_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.25: Input_Type_Flag</h4>
<h4>&sect;3.4.22: Input_Type_Flag</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Input_Type_Flag;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>A Input_Type_Flag field specifies a set of input event types.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Flags</i></b></div><div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>A Input_Type_Flag field specifies a set of input event types.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>EventOnAnyKey</span> = 0x1</span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>If EventOnAnyKey is set, all keyboard events are included in the set.</div></div>
</div>
@ -1667,6 +1613,60 @@ beginning or end of different types of words.</div><div style='margin-top: 3mm;
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>EventAll is a catch all name for including all possible events in the set.</div></div>
</div>
</div><hr>
<div id='Mouse_Cursor_Show_Type_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.23: Mouse_Cursor_Show_Type</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Mouse_Cursor_Show_Type;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>A Mouse_Cursor_Show_Type value specifes a mode for 4coder to handle the mouse cursor.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>MouseCursorShow_Never</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>The MouseCursorShow_Never mode never shows the cursor.</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>MouseCursorShow_Always</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>The MouseCursorShow_Never mode always shows the cursor.</div></div>
</div>
</div><hr>
<div id='Buffer_Seek_Type_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.24: Buffer_Seek_Type</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum Buffer_Seek_Type;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>The Buffer_Seek_Type is is used in a Buffer_Seek to identify which
coordinates are suppose to be used for the seek.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>buffer_seek_pos</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>This value indicates absolute positioning where positions are measured as the number of bytes from the start of the file.</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>buffer_seek_wrapped_xy</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>This value indicates xy positioning with wrapped lines where the x and y values are in pixels.</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>buffer_seek_unwrapped_xy</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>This value indicates xy positioning with unwrapped lines where the x and y values are in pixels.</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>buffer_seek_line_char</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>This value indicates line-character, or line-column positioning. These coordinates are 1 based to match standard line numbering.</div></div>
</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>See Also</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'><a href='#Buffer_Seek_doc'>Buffer_Seek</a></div><div style='margin-left: 5mm; margin-right: 5mm;'><a href='#4coder_Buffer_Positioning_System_doc'>4coder_Buffer_Positioning_System</a></div></div><hr>
<div id='View_Split_Position_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.25: View_Split_Position</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>enum View_Split_Position;</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>A View_Split_Position specifies where a new view should be placed as a result of
a view split operation.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Values</i></b></div><div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>ViewSplit_Top</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>This value indicates that the new view should be above the existing view.</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>ViewSplit_Bottom</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>This value indicates that the new view should be below the existing view.</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>ViewSplit_Left</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>This value indicates that the new view should be left of the existing view.</div></div>
</div>
<div>
<div><span style='font-family: "Courier New", Courier, monospace; text-align: left;'><span style='font-weight: 600;'>ViewSplit_Right</span></span></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>This value indicates that the new view should be right of the existing view.</div></div>
</div>
</div><hr>
<div id='Generic_Command_doc' style='margin-bottom: 1cm;'>
<h4>&sect;3.4.26: Generic_Command</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>union Generic_Command {<br>

View File

@ -1,7 +1,6 @@
#define ENUM(type,name) typedef type name; enum name##_
#define FLAGENUM(name) typedef uint32_t name; enum name##_
/* DOC(bool32 is an alias name to signal that an integer parameter or field is for
true/false vales.) */
@ -37,7 +36,7 @@ ENUM(int32_t, Key_Modifier){
/* 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.) */
FLAGENUM(Key_Modifier_Flag){
ENUM(uint32_t, Key_Modifier_Flag){
/* DOC(MDFR_NONE specifies that no modifiers are pressed.) */
MDFR_NONE = 0x0,
MDFR_CTRL = 0x1,
@ -91,7 +90,7 @@ ENUM(uint64_t, Command_ID){
};
/* DOC(TODO) */
FLAGENUM(Memory_Protect_Flags){
ENUM(uint32_t, Memory_Protect_Flags){
/* DOC(TODO) */
MemProtect_Read = 0x1,
/* DOC(TODO) */
@ -183,7 +182,7 @@ ENUM(int32_t, View_Setting_ID){
};
/* DOC(A Buffer_Create_Flag field specifies how a buffer should be created.) */
FLAGENUM(Buffer_Create_Flag){
ENUM(uint32_t, 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
@ -195,7 +194,7 @@ FLAGENUM(Buffer_Create_Flag){
};
/* DOC(A Buffer_Kill_Flag field specifies how a buffer should be killed.) */
FLAGENUM(Buffer_Kill_Flag){
ENUM(uint32_t, Buffer_Kill_Flag){
/* DOC(BufferKill_Background is not currently implemented.) */
BufferKill_Background = 0x1,
/* DOC(When BufferKill_AlwaysKill is set it indicates the buffer should be killed
@ -209,7 +208,7 @@ access call. An access call is usually one the returns a summary struct. If a
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.) TODO */
FLAGENUM(Access_Flag){
ENUM(uint32_t, 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,
@ -227,7 +226,7 @@ FLAGENUM(Access_Flag){
/* 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.) */
FLAGENUM(Seek_Boundary_Flag){
ENUM(uint32_t, Seek_Boundary_Flag){
BoundaryWhitespace = 0x1,
BoundaryToken = 0x2,
BoundaryAlphanumeric = 0x4,
@ -235,7 +234,7 @@ FLAGENUM(Seek_Boundary_Flag){
};
/* DOC(A Command_Line_Input_Flag field specifies the behavior of a call to a command line interface.) */
FLAGENUM(Command_Line_Input_Flag){
ENUM(uint32_t, Command_Line_Input_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
@ -250,7 +249,7 @@ FLAGENUM(Command_Line_Input_Flag){
};
/* DOC(An Auto_Indent_Flag field specifies the behavior of an auto indentation operation.) */
FLAGENUM(Auto_Indent_Flag){
ENUM(uint32_t, 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.) */
@ -262,7 +261,7 @@ FLAGENUM(Auto_Indent_Flag){
};
/* DOC(A Set_Buffer_Flag field specifies the behavior of an operation that sets the buffer of a view.) */
FLAGENUM(Set_Buffer_Flag){
ENUM(uint32_t, 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.) */
@ -270,7 +269,7 @@ FLAGENUM(Set_Buffer_Flag){
};
/* DOC(A Input_Type_Flag field specifies a set of input event types.) */
FLAGENUM(Input_Type_Flag){
ENUM(uint32_t, 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.) */

View File

@ -789,6 +789,11 @@ get_doc_string_from_prev(Parse_Context *context, String *doc_string){
return(result);
}
//
// Meta Parse Rules
//
static int32_t
struct_parse(Partition *part, int32_t is_struct,
Parse_Context *context, Item_Node *top_member);
@ -896,6 +901,7 @@ struct_parse_next_member(Partition *part, Parse_Context *context){
assert(!"unhandled error");
}
}
}
else if (token->type == CPP_TOKEN_BRACE_CLOSE){
break;
@ -989,7 +995,7 @@ struct_parse(Partition *part, int32_t is_struct,
}
static int32_t
typedef_parse(Parse_Context *context, Item_Set item_set, int32_t item_index){
typedef_parse(Parse_Context *context, Item_Node *item){
int32_t result = false;
Cpp_Token *token = get_token(context);
@ -1019,10 +1025,10 @@ typedef_parse(Parse_Context *context, Item_Set item_set, int32_t item_index){
get_string(context->data, start_token->start + start_token->size, token_j->start)
);
item_set.items[item_index].t = Item_Typedef;
item_set.items[item_index].type = type;
item_set.items[item_index].name = name;
item_set.items[item_index].doc_string = doc_string;
item->t = Item_Typedef;
item->type = type;
item->name = name;
item->doc_string = doc_string;
result = true;
}
@ -1032,8 +1038,7 @@ typedef_parse(Parse_Context *context, Item_Set item_set, int32_t item_index){
}
static int32_t
enum_parse(Partition *part, Parse_Context *context,
Item_Set item_set, int32_t item_index){
enum_parse(Partition *part, Parse_Context *context, Item_Node *item){
int32_t result = false;
@ -1133,10 +1138,10 @@ enum_parse(Partition *part, Parse_Context *context,
}
get_next_token(context);
item_set.items[item_index].t = Item_Enum;
item_set.items[item_index].name = name;
item_set.items[item_index].doc_string = doc_string;
item_set.items[item_index].first_child = first_member;
item->t = Item_Enum;
item->name = name;
item->doc_string = doc_string;
item->first_child = first_member;
result = true;
}
}
@ -1408,7 +1413,7 @@ Moves the context in the following way:
*/
static int32_t
macro_parse(Partition *part, Parse_Context *context,
char *data, Item_Set macro_set, int32_t sig_count){
char *data, Item_Set item_set, int32_t sig_count){
int32_t result = false;
Cpp_Token *token = 0;
@ -1425,7 +1430,7 @@ macro_parse(Partition *part, Parse_Context *context,
doc_string = get_lexeme(*doc_token, data);
if (check_and_fix_docs(&doc_string)){
macro_set.items[sig_count].doc_string = doc_string;
item_set.items[sig_count].doc_string = doc_string;
for (; (token = get_token(context)) != 0; get_next_token(context)){
if (token->type == CPP_TOKEN_IDENTIFIER){
@ -1434,7 +1439,7 @@ macro_parse(Partition *part, Parse_Context *context,
}
if (get_token(context) && (token->flags & CPP_TFLAG_PP_BODY)){
macro_set.items[sig_count].name = get_lexeme(*token, data);
item_set.items[sig_count].name = get_lexeme(*token, data);
if ((token = get_next_token(context)) != 0){
args_start_token = token;
@ -1447,9 +1452,9 @@ macro_parse(Partition *part, Parse_Context *context,
if (token){
int32_t start = args_start_token->start;
int32_t end = token->start + token->size;
macro_set.items[sig_count].args = make_string(data + start, end - start);
item_set.items[sig_count].args = make_string(data + start, end - start);
macro_set.items[sig_count].breakdown =
item_set.items[sig_count].breakdown =
parameter_parse(part, data, args_start_token, token);
if ((token = get_next_token(context)) != 0){
@ -1466,11 +1471,11 @@ macro_parse(Partition *part, Parse_Context *context,
start = body_start->start;
end = token->start + token->size;
macro_set.items[sig_count].body = make_string(data + start, end - start);
item_set.items[sig_count].body = make_string(data + start, end - start);
}
}
macro_set.items[sig_count].t = Item_Macro;
item_set.items[sig_count].t = Item_Macro;
result = true;
}
}
@ -1797,6 +1802,166 @@ print_function_docs(FILE *file, Partition *part, String name, String doc_string)
print_see_also(file, doc);
}
static void
print_item(Partition *part, FILE *file, Item_Node *item, char *section, int32_t I){
String name = item->name;
/* NOTE(allen):
Open a div for the whole item.
Put a heading in it with the name and section.
Open a "descriptive" box for the display of the code interface.
*/
fprintf(file,
"<div id='%.*s_doc' style='margin-bottom: 1cm;'>\n"
"<h4>&sect;%s.%d: %.*s</h4>\n"
"<div style='"CODE_STYLE" "DESCRIPT_SECTION_STYLE"'>",
name.size, name.str, section, I, name.size, name.str);
Temp_Memory temp = begin_temp_memory(part);
switch (item->t){
case Item_Typedef:
{
String type = item->type;
// NOTE(allen): Code box
{
fprintf(file,
"typedef %.*s %.*s;",
type.size, type.str,
name.size, name.str
);
}
// NOTE(allen): Close the descriptive box
fprintf(file, "</div>\n");
// NOTE(allen): Descriptive section
{
String doc_string = item->doc_string;
Documentation doc = {0};
perform_doc_parse(part, doc_string, &doc);
String main_doc = doc.main_doc;
if (main_doc.size != 0){
fprintf(file, DOC_HEAD_OPEN"Description"DOC_HEAD_CLOSE);
fprintf(file,
DOC_ITEM_OPEN"%.*s"DOC_ITEM_CLOSE,
main_doc.size, main_doc.str
);
}
print_see_also(file, &doc);
}
}break;
case Item_Enum:
{
// NOTE(allen): Code box
{
fprintf(file,
"enum %.*s;",
name.size, name.str);
}
// NOTE(allen): Close the descriptive box
fprintf(file, "</div>\n");
// NOTE(allen): Descriptive section
{
String doc_string = item->doc_string;
Documentation doc = {0};
perform_doc_parse(part, doc_string, &doc);
String main_doc = doc.main_doc;
if (main_doc.size != 0){
fprintf(file, DOC_HEAD_OPEN"Description"DOC_HEAD_CLOSE);
fprintf(file,
DOC_ITEM_OPEN"%.*s"DOC_ITEM_CLOSE,
main_doc.size, main_doc.str
);
}
if (item->first_child){
fprintf(file, DOC_HEAD_OPEN"Values"DOC_HEAD_CLOSE);
for (Item_Node *member = item->first_child;
member;
member = member->next_sibling){
Documentation doc = {0};
perform_doc_parse(part, member->doc_string, &doc);
if (member->value.str){
fprintf(file,
"<div>\n"
"<div><span style='"CODE_STYLE"'>"DOC_ITEM_HEAD_INL_OPEN
"%.*s"DOC_ITEM_HEAD_INL_CLOSE" = %.*s</span></div>\n"
"<div style='margin-bottom: 6mm;'>"DOC_ITEM_OPEN"%.*s"DOC_ITEM_CLOSE"</div>\n"
"</div>\n",
member->name.size, member->name.str,
member->value.size, member->value.str,
doc.main_doc.size, doc.main_doc.str
);
}
else{
fprintf(file,
"<div>\n"
"<div><span style='"CODE_STYLE"'>"DOC_ITEM_HEAD_INL_OPEN
"%.*s"DOC_ITEM_HEAD_INL_CLOSE"</span></div>\n"
"<div style='margin-bottom: 6mm;'>"DOC_ITEM_OPEN"%.*s"DOC_ITEM_CLOSE"</div>\n"
"</div>\n",
member->name.size, member->name.str,
doc.main_doc.size, doc.main_doc.str
);
}
}
}
print_see_also(file, &doc);
}
}break;
case Item_Struct: case Item_Union:
{
Item_Node *member = item;
// NOTE(allen): Code box
{
print_struct_html(file, member);
}
// NOTE(allen): Close the descriptive box
fprintf(file, "</div>\n");
// NOTE(allen): Descriptive section
{
String doc_string = member->doc_string;
Documentation doc = {0};
perform_doc_parse(part, doc_string, &doc);
String main_doc = doc.main_doc;
if (main_doc.size != 0){
fprintf(file, DOC_HEAD_OPEN"Description"DOC_HEAD_CLOSE);
fprintf(file,
DOC_ITEM_OPEN"%.*s"DOC_ITEM_CLOSE,
main_doc.size, main_doc.str
);
}
if (member->first_child){
fprintf(file, DOC_HEAD_OPEN"Fields"DOC_HEAD_CLOSE);
print_struct_docs(file, part, member);
}
print_see_also(file, &doc);
}
}break;
}
// NOTE(allen): Close the item box
fprintf(file, "</div><hr>\n");
end_temp_memory(temp);
}
typedef struct App_API_Name{
String macro;
String public_name;
@ -2095,7 +2260,6 @@ generate_custom_headers(){
{
Item_Set typedef_set = {0};
Item_Set struct_set = {0};
Item_Set flag_set = {0};
Item_Set enum_set = {0};
Parse type_parse[1];
@ -2105,15 +2269,13 @@ generate_custom_headers(){
int32_t typedef_count = 0;
int32_t struct_count = 0;
int32_t flag_count = 0;
int32_t enum_count = 0;
static String type_spec_keys[] = {
make_lit_string("typedef"),
make_lit_string("struct"),
make_lit_string("union"),
make_lit_string("ENUM"),
make_lit_string("FLAGENUM"),
make_lit_string("ENUM")
};
for (int32_t J = 0; J < file_count; ++J){
@ -2141,9 +2303,6 @@ generate_custom_headers(){
case 3: //ENUM
++enum_count; break;
case 4: //FLAGENUM
++flag_count; break;
}
}
}
@ -2162,13 +2321,8 @@ generate_custom_headers(){
enum_set = allocate_item_set(part, enum_count);
}
if (flag_count > 0){
flag_set = allocate_item_set(part, flag_count);
}
int32_t typedef_index = 0;
int32_t struct_index = 0;
int32_t flag_index = 0;
int32_t enum_index = 0;
for (int32_t J = 0; J < file_count; ++J){
@ -2193,7 +2347,8 @@ generate_custom_headers(){
case 0: //typedef
{
set_token(context, token);
if (typedef_parse(context, typedef_set, typedef_index)){
if (typedef_parse(context, typedef_set.items + typedef_index)){
Assert(typedef_set.items[typedef_index].t == Item_Typedef);
++typedef_index;
}
}break;
@ -2203,6 +2358,8 @@ generate_custom_headers(){
set_token(context, token);
if (struct_parse(part, (match_index == 1),
context, struct_set.items + struct_index)){
Assert(struct_set.items[struct_index].t == Item_Struct ||
struct_set.items[struct_index].t == Item_Union);
++struct_index;
}
}break;
@ -2210,18 +2367,11 @@ generate_custom_headers(){
case 3: //ENUM
{
set_token(context, token);
if (enum_parse(part, context, enum_set, enum_index)){
if (enum_parse(part, context, enum_set.items + enum_index)){
Assert(enum_set.items[enum_index].t == Item_Enum);
++enum_index;
}
}break;
case 4: //FLAGENUM
{
set_token(context, token);
if (enum_parse(part, context, flag_set, flag_index)){
++flag_index;
}
}break;
}
}
}
@ -2230,7 +2380,6 @@ generate_custom_headers(){
typedef_count = typedef_index;
struct_count = struct_index;
enum_count = enum_index;
flag_count = flag_index;
}
//
@ -2691,17 +2840,6 @@ generate_custom_headers(){
);
}
for (int32_t i = 0; i < flag_count; ++i){
String name = flag_set.items[i].name;
fprintf(file,
"<li>"
"<a href='#%.*s_doc'>%.*s</a>"
"</li>\n",
name.size, name.str,
name.size, name.str
);
}
for (int32_t i = 0; i < struct_count; ++i){
String name = struct_set.items[i].name;
fprintf(file,
@ -2744,214 +2882,15 @@ generate_custom_headers(){
fprintf(file, "<h3>&sect;"SECTION" Type Descriptions</h3>\n");
int32_t I = 1;
for (int32_t i = 0; i < typedef_count; ++i, ++I){
String name = typedef_set.items[i].name;
String type = typedef_set.items[i].type;
fprintf(file,
"<div id='%.*s_doc' style='margin-bottom: 1cm;'>\n"
"<h4>&sect;"SECTION".%d: %.*s</h4>\n"
"<div style='"CODE_STYLE" "DESCRIPT_SECTION_STYLE"'>",
name.size, name.str, I,
name.size, name.str
);
// NOTE(allen): Code box
{
fprintf(file,
"typedef %.*s %.*s;",
type.size, type.str,
name.size, name.str
);
}
fprintf(file, "</div>\n");
// NOTE(allen): Descriptive section
{
String doc_string = typedef_set.items[i].doc_string;
Documentation doc = {0};
perform_doc_parse(part, doc_string, &doc);
String main_doc = doc.main_doc;
if (main_doc.size != 0){
fprintf(file, DOC_HEAD_OPEN"Description"DOC_HEAD_CLOSE);
fprintf(file,
DOC_ITEM_OPEN"%.*s"DOC_ITEM_CLOSE,
main_doc.size, main_doc.str
);
}
print_see_also(file, &doc);
}
fprintf(file, "</div><hr>\n");
print_item(part, file, typedef_set.items + i, SECTION, I);
}
for (int32_t i = 0; i < enum_count; ++i, ++I){
String name = enum_set.items[i].name;
fprintf(file,
"<div id='%.*s_doc' style='margin-bottom: 1cm;'>\n"
"<h4>&sect;"SECTION".%d: %.*s</h4>\n"
"<div style='"CODE_STYLE" "DESCRIPT_SECTION_STYLE"'>",
name.size, name.str, I,
name.size, name.str
);
// NOTE(allen): Code box
{
fprintf(file,
"enum %.*s;",
name.size, name.str);
}
fprintf(file, "</div>\n");
// NOTE(allen): Descriptive section
{
String doc_string = enum_set.items[i].doc_string;
Documentation doc = {0};
perform_doc_parse(part, doc_string, &doc);
String main_doc = doc.main_doc;
if (main_doc.size != 0){
fprintf(file, DOC_HEAD_OPEN"Description"DOC_HEAD_CLOSE);
fprintf(file,
DOC_ITEM_OPEN"%.*s"DOC_ITEM_CLOSE,
main_doc.size, main_doc.str
);
}
if (enum_set.items[i].first_child){
fprintf(file, DOC_HEAD_OPEN"Values"DOC_HEAD_CLOSE);
for (Item_Node *member = enum_set.items[i].first_child;
member;
member = member->next_sibling){
Documentation doc = {0};
perform_doc_parse(part, member->doc_string, &doc);
fprintf(file,
"<div>\n"
"<div><span style='"CODE_STYLE"'>"DOC_ITEM_HEAD_INL_OPEN
"%.*s"DOC_ITEM_HEAD_INL_CLOSE"</span></div>\n"
"<div style='margin-bottom: 6mm;'>"DOC_ITEM_OPEN"%.*s"DOC_ITEM_CLOSE"</div>\n"
"</div>\n",
member->name.size, member->name.str,
doc.main_doc.size, doc.main_doc.str
);
}
}
print_see_also(file, &doc);
}
fprintf(file, "</div><hr>\n");
}
for (int32_t i = 0; i < flag_count; ++i, ++I){
String name = flag_set.items[i].name;
fprintf(file,
"<div id='%.*s_doc' style='margin-bottom: 1cm;'>\n"
"<h4>&sect;"SECTION".%d: %.*s</h4>\n"
"<div style='"CODE_STYLE" "DESCRIPT_SECTION_STYLE"'>",
name.size, name.str, I,
name.size, name.str
);
// NOTE(allen): Code box
{
fprintf(file,
"enum %.*s;",
name.size, name.str);
}
fprintf(file, "</div>\n");
// NOTE(allen): Descriptive section
{
String doc_string = flag_set.items[i].doc_string;
Documentation doc = {0};
perform_doc_parse(part, doc_string, &doc);
String main_doc = doc.main_doc;
if (main_doc.size != 0){
fprintf(file, DOC_HEAD_OPEN"Description"DOC_HEAD_CLOSE);
fprintf(file,
DOC_ITEM_OPEN"%.*s"DOC_ITEM_CLOSE,
main_doc.size, main_doc.str
);
}
if (flag_set.items[i].first_child){
fprintf(file, DOC_HEAD_OPEN"Flags"DOC_HEAD_CLOSE);
for (Item_Node *member = flag_set.items[i].first_child;
member;
member = member->next_sibling){
Documentation doc = {0};
perform_doc_parse(part, member->doc_string, &doc);
fprintf(file,
"<div>\n"
"<div><span style='"CODE_STYLE"'>"DOC_ITEM_HEAD_INL_OPEN
"%.*s"DOC_ITEM_HEAD_INL_CLOSE" = %.*s</span></div>\n"
"<div style='margin-bottom: 6mm;'>"DOC_ITEM_OPEN"%.*s"DOC_ITEM_CLOSE"</div>\n"
"</div>\n",
member->name.size, member->name.str,
member->value.size, member->value.str,
doc.main_doc.size, doc.main_doc.str
);
}
}
print_see_also(file, &doc);
}
fprintf(file, "</div><hr>\n");
print_item(part, file, enum_set.items + i, SECTION, I);
}
for (int32_t i = 0; i < struct_count; ++i, ++I){
Item_Node *member = &struct_set.items[i];
String name = member->name;
fprintf(file,
"<div id='%.*s_doc' style='margin-bottom: 1cm;'>\n"
"<h4>&sect;"SECTION".%d: %.*s</h4>\n"
"<div style='"CODE_STYLE" "DESCRIPT_SECTION_STYLE"'>",
name.size, name.str, I,
name.size, name.str
);
// NOTE(allen): Code box
{
print_struct_html(file, member);
}
fprintf(file, "</div>\n");
// NOTE(allen): Descriptive section
{
String doc_string = member->doc_string;
Documentation doc = {0};
perform_doc_parse(part, doc_string, &doc);
String main_doc = doc.main_doc;
if (main_doc.size != 0){
fprintf(file, DOC_HEAD_OPEN"Description"DOC_HEAD_CLOSE);
fprintf(file,
DOC_ITEM_OPEN"%.*s"DOC_ITEM_CLOSE,
main_doc.size, main_doc.str
);
}
if (member->first_child){
fprintf(file, DOC_HEAD_OPEN"Fields"DOC_HEAD_CLOSE);
print_struct_docs(file, part, member);
}
print_see_also(file, &doc);
}
fprintf(file, "</div><hr>\n");
print_item(part, file, struct_set.items + i, SECTION, I);
}
}