2019-02-08 10:03:48 +00:00
|
|
|
/*
|
|
|
|
* Mr. 4th Dimention - Allen Webster
|
|
|
|
*
|
|
|
|
* 24.03.2018
|
|
|
|
*
|
|
|
|
* History
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
// TOP
|
|
|
|
|
|
|
|
#if !defined(FRED_HISTORY_H)
|
|
|
|
#define FRED_HISTORY_H
|
|
|
|
|
|
|
|
struct Record_Batch_Slot{
|
2019-09-02 18:59:36 +00:00
|
|
|
i64 length_forward;
|
|
|
|
i64 length_backward;
|
2019-02-08 10:03:48 +00:00
|
|
|
i32 first;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Record{
|
|
|
|
Node node;
|
2019-06-01 23:58:28 +00:00
|
|
|
Temp_Memory restore_point;
|
2019-02-08 10:03:48 +00:00
|
|
|
i32 edit_number;
|
|
|
|
Record_Kind kind;
|
|
|
|
union{
|
|
|
|
struct{
|
2019-09-02 18:59:36 +00:00
|
|
|
String_Const_u8 forward_text;
|
|
|
|
String_Const_u8 backward_text;
|
|
|
|
i64 first;
|
2019-02-08 10:03:48 +00:00
|
|
|
} single;
|
|
|
|
struct{
|
|
|
|
Node children;
|
|
|
|
i32 count;
|
|
|
|
} group;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-02-09 07:52:15 +00:00
|
|
|
struct Record_Ptr_Lookup_Table{
|
|
|
|
Record **records;
|
|
|
|
i32 count;
|
|
|
|
i32 max;
|
|
|
|
};
|
|
|
|
|
2019-02-08 10:03:48 +00:00
|
|
|
struct History{
|
|
|
|
b32 activated;
|
|
|
|
Arena arena;
|
|
|
|
Memory_Bank bank;
|
|
|
|
Node free_records;
|
|
|
|
Node records;
|
|
|
|
i32 record_count;
|
2019-02-09 07:52:15 +00:00
|
|
|
Record_Ptr_Lookup_Table record_lookup;
|
2019-02-08 10:03:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Global_History{
|
|
|
|
i32 edit_number_counter;
|
|
|
|
i32 edit_grouping_counter;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// BOTTOM
|