4.0.19 new features fixed up to build on VS 2017

This commit is contained in:
Allen Webster 2017-04-22 22:28:41 -04:00
parent cabd90bcac
commit 4713733855
2 changed files with 10 additions and 7 deletions

View File

@ -16,7 +16,10 @@
# define IS_CL # define IS_CL
// NOTE(allen): I suspect snprintf is defined in VS 2015 (I test on 2017)
#if _MSC_VER <= 1800
# define snprintf _snprintf # define snprintf _snprintf
#endif
# if defined(_WIN32) # if defined(_WIN32)
# define IS_WINDOWS # define IS_WINDOWS

View File

@ -129,9 +129,9 @@ make_marker_list(Application_Links *app, Partition *part, General_Memory *genera
if (id_location.buffer_id != 0){ if (id_location.buffer_id != 0){
if (location_count > 0){ if (location_count > 0){
ID_Based_Jump_Location *prev_location = &location_list[location_count-1]; ID_Based_Jump_Location *prev_parsed_loc = &location_list[location_count-1];
if (prev_location->buffer_id != id_location.buffer_id){ if (prev_parsed_loc->buffer_id != id_location.buffer_id){
Buffer_Summary location_buffer = get_buffer(app, prev_location->buffer_id, AccessAll); Buffer_Summary location_buffer = get_buffer(app, prev_parsed_loc->buffer_id, AccessAll);
if (location_buffer.exists){ if (location_buffer.exists){
if (list.handle_count >= list.handle_max){ if (list.handle_count >= list.handle_max){
@ -148,9 +148,9 @@ make_marker_list(Application_Links *app, Partition *part, General_Memory *genera
Marker *markers = push_array(part, Marker, location_count); Marker *markers = push_array(part, Marker, location_count);
for (uint32_t i = 0; i < location_count; ++i){ for (uint32_t i = 0; i < location_count; ++i){
ID_Based_Jump_Location *location = &location_list[i]; ID_Based_Jump_Location *write_loc = &location_list[i];
Partial_Cursor cursor = {0}; Partial_Cursor cursor = {0};
Buffer_Seek seek = seek_line_char(location->line, location->column); Buffer_Seek seek = seek_line_char(write_loc->line, write_loc->column);
if (buffer_compute_cursor(app, &location_buffer, seek, &cursor)){ if (buffer_compute_cursor(app, &location_buffer, seek, &cursor)){
markers[i].pos = cursor.pos; markers[i].pos = cursor.pos;
markers[i].lean_right = false; markers[i].lean_right = false;
@ -190,8 +190,8 @@ make_marker_list(Application_Links *app, Partition *part, General_Memory *genera
} }
if (location_count > 0){ if (location_count > 0){
ID_Based_Jump_Location *prev_location = &location_list[location_count-1]; ID_Based_Jump_Location *prev_parsed_loc = &location_list[location_count-1];
Buffer_Summary location_buffer = get_buffer(app, prev_location->buffer_id, AccessAll); Buffer_Summary location_buffer = get_buffer(app, prev_parsed_loc->buffer_id, AccessAll);
if (list.handle_count >= list.handle_max){ if (list.handle_count >= list.handle_max){
double_handle_max(general, &list); double_handle_max(general, &list);