removed the completely unused backify loop system

master
Allen Webster 2016-09-19 15:50:43 -04:00
parent 1a987c6781
commit 7d081dd7f5
2 changed files with 0 additions and 85 deletions

View File

@ -12,7 +12,6 @@
#define Buffer_Init_Type cat_4tech(Buffer_Type, _Init)
#define Buffer_Stringify_Type cat_4tech(Buffer_Type, _Stringify_Loop)
#define Buffer_Backify_Type cat_4tech(Buffer_Type, _Backify_Loop)
inline_4tech void
buffer_stringify(Buffer_Type *buffer, i32 start, i32 end, char *out){

View File

@ -177,90 +177,6 @@ buffer_stringify_next(Gap_Buffer_Stringify_Loop *loop){
loop->data = loop->base + loop->pos;
}
typedef struct Gap_Buffer_Backify_Loop{
Gap_Buffer *buffer;
char *data, *base;
i32 pos, end;
i32 size;
i32 absolute_pos;
i32 separated;
} Gap_Buffer_Backify_Loop;
internal_4tech Gap_Buffer_Backify_Loop
buffer_backify_loop(Gap_Buffer *buffer, i32 start, i32 end){
Gap_Buffer_Backify_Loop result = {0};
++start;
if (0 <= end && end < start && start <= buffer->size1 + buffer->size2){
result.buffer = buffer;
result.base = buffer->data;
if (end < buffer->size1){
result.end = end;
}
else{
result.end = end + buffer->gap_size;
}
if (start <= buffer->size1){
result.separated = 0;
result.pos = 0;
}
else{
if (end < buffer->size1){
result.separated = 1;
}
else{
result.separated = 0;
}
result.pos = buffer->size1 + buffer->gap_size;
}
if (!result.separated && result.pos < result.end){
result.pos = result.end;
}
result.size = start - result.pos;
result.absolute_pos = result.pos;
if (result.absolute_pos > buffer->size1){
result.absolute_pos -= buffer->gap_size;
}
result.data = result.base + result.pos;
}
return(result);
}
inline_4tech i32
buffer_backify_good(Gap_Buffer_Backify_Loop *loop){
i32 result = (loop->buffer != 0);
return(result);
}
internal_4tech void
buffer_backify_next(Gap_Buffer_Backify_Loop *loop){
Gap_Buffer *buffer = loop->buffer;
i32 temp_end = 0;
if (loop->separated){
loop->separated = 0;
temp_end = buffer->size1;
loop->pos = 0;
loop->absolute_pos = 0;
if (loop->pos < loop->end){
loop->absolute_pos = loop->end;
loop->pos = loop->end;
}
}
else{
temp_end = 0;
loop->buffer = 0;
}
loop->size = temp_end - loop->pos;
loop->data = loop->base + loop->pos;
}
internal_4tech i32
buffer_replace_range(Gap_Buffer *buffer, i32 start, i32 end, char *str, i32 len, i32 *shift_amount,
void *scratch, i32 scratch_memory, i32 *request_amount){