From 1dbdaee023e47edba8dcc14ca6fced372b89c25b Mon Sep 17 00:00:00 2001 From: raveit65 Date: Fri, 24 Jun 2016 14:16:51 +0200 Subject: synctex: update to 1.18 --- cut-n-paste/synctex/synctex_parser.c | 237 ++++++++++++------------- cut-n-paste/synctex/synctex_parser.h | 9 +- cut-n-paste/synctex/synctex_parser_local.h | 3 +- cut-n-paste/synctex/synctex_parser_utils.c | 23 ++- cut-n-paste/synctex/synctex_parser_utils.h | 2 +- cut-n-paste/synctex/synctex_parser_version.txt | 2 +- cut-n-paste/synctex/update-synctex-from-TL.sh | 0 7 files changed, 135 insertions(+), 141 deletions(-) mode change 100644 => 100755 cut-n-paste/synctex/update-synctex-from-TL.sh (limited to 'cut-n-paste') diff --git a/cut-n-paste/synctex/synctex_parser.c b/cut-n-paste/synctex/synctex_parser.c index b0dbad26..5b28ace6 100644 --- a/cut-n-paste/synctex/synctex_parser.c +++ b/cut-n-paste/synctex/synctex_parser.c @@ -5,7 +5,7 @@ This file is part of the SyncTeX package. Latest Revision: Tue Jun 14 08:23:30 UTC 2011 -Version: 1.17 +Version: 1.18 See synctex_parser_readme.txt for more details @@ -240,14 +240,11 @@ struct __synctex_class_t { SYNCTEX_GETTER(NODE,next_hbox)[0]=NEXT_HBOX;\ } -void _synctex_free_node(synctex_node_t node); -void _synctex_free_leaf(synctex_node_t node); - /* A node is meant to own its child and sibling. * It is not owned by its parent, unless it is its first child. * This destructor is for all nodes with children. */ -void _synctex_free_node(synctex_node_t node) { +static void _synctex_free_node(synctex_node_t node) { if (node) { (*((node->class)->sibling))(node); SYNCTEX_FREE(SYNCTEX_SIBLING(node)); @@ -262,7 +259,7 @@ void _synctex_free_node(synctex_node_t node) { * This destructor is for nodes with no child. * The first sheet is onwned by the scanner. */ -void _synctex_free_leaf(synctex_node_t node) { +static void _synctex_free_leaf(synctex_node_t node) { if (node) { SYNCTEX_FREE(SYNCTEX_SIBLING(node)); free(node); @@ -345,8 +342,7 @@ struct __synctex_scanner_t { * It is only used for pointer values */ # define SYNCTEX_MAKE_GET(SYNCTEX_GETTER,OFFSET)\ -synctex_node_t * SYNCTEX_GETTER (synctex_node_t node);\ -synctex_node_t * SYNCTEX_GETTER (synctex_node_t node) {\ +static synctex_node_t * SYNCTEX_GETTER (synctex_node_t node) {\ return node?(synctex_node_t *)((&((node)->implementation))+OFFSET):NULL;\ } SYNCTEX_MAKE_GET(_synctex_implementation_0,0) @@ -363,29 +359,10 @@ typedef struct { * SYNCTEX_PAGE_IDX */ } synctex_node_sheet_t; -synctex_node_t _synctex_new_sheet(synctex_scanner_t scanner); -void _synctex_display_sheet(synctex_node_t node); -void _synctex_log_sheet(synctex_node_t node); - -static _synctex_class_t synctex_class_sheet = { - NULL, /* No scanner yet */ - synctex_node_type_sheet, /* Node type */ - &_synctex_new_sheet, /* creator */ - &_synctex_free_node, /* destructor */ - &_synctex_log_sheet, /* log */ - &_synctex_display_sheet, /* display */ - NULL, /* No parent */ - &_synctex_implementation_0, /* child */ - &_synctex_implementation_1, /* sibling */ - NULL, /* No friend */ - &_synctex_implementation_2, /* Next hbox */ - (_synctex_info_getter_t)&_synctex_implementation_3 /* info */ -}; - /* sheet node creator */ #define DEFINE_synctex_new_NODE(NAME)\ -synctex_node_t _synctex_new_##NAME(synctex_scanner_t scanner) {\ +static synctex_node_t _synctex_new_##NAME(synctex_scanner_t scanner) {\ if (scanner) {\ synctex_node_t node = _synctex_malloc(sizeof(synctex_node_##NAME##_t));\ if (node) {\ @@ -399,6 +376,24 @@ synctex_node_t _synctex_new_##NAME(synctex_scanner_t scanner) {\ } DEFINE_synctex_new_NODE(sheet) +static void _synctex_display_sheet(synctex_node_t node); +static void _synctex_log_sheet(synctex_node_t node); + +static _synctex_class_t synctex_class_sheet = { + NULL, /* No scanner yet */ + synctex_node_type_sheet, /* Node type */ + &_synctex_new_sheet, /* creator */ + &_synctex_free_node, /* destructor */ + &_synctex_log_sheet, /* log */ + &_synctex_display_sheet, /* display */ + NULL, /* No parent */ + &_synctex_implementation_0, /* child */ + &_synctex_implementation_1, /* sibling */ + NULL, /* No friend */ + &_synctex_implementation_2, /* Next hbox */ + (_synctex_info_getter_t)&_synctex_implementation_3 /* info */ +}; + /* A box node contains navigation and synctex information * There are different kind of boxes. * Only horizontal boxes are treated differently because of their visible size. @@ -432,9 +427,11 @@ typedef struct { * SYNCTEX_HORIZ,SYNCTEX_VERT,SYNCTEX_WIDTH,SYNCTEX_HEIGHT,SYNCTEX_DEPTH */ } synctex_node_vbox_t; -synctex_node_t _synctex_new_vbox(synctex_scanner_t scanner); -void _synctex_log_vbox(synctex_node_t node); -void _synctex_display_vbox(synctex_node_t node); +/* vertical box node creator */ +DEFINE_synctex_new_NODE(vbox) + +static void _synctex_log_vbox(synctex_node_t node); +static void _synctex_display_vbox(synctex_node_t node); /* These are static class objects, each scanner will make a copy of them and setup the scanner field. */ @@ -453,9 +450,6 @@ static _synctex_class_t synctex_class_vbox = { (_synctex_info_getter_t)&_synctex_implementation_5 }; -/* vertical box node creator */ -DEFINE_synctex_new_NODE(vbox) - /* Horizontal boxes must contain visible size, because 0 width does not mean emptiness. * They also contain an average of the line numbers of the containing nodes. */ # define SYNCTEX_MEAN_LINE_IDX (SYNCTEX_DEPTH_IDX+1) @@ -487,9 +481,11 @@ typedef struct { * SYNCTEX_HORIZ_V,SYNCTEX_VERT_V,SYNCTEX_WIDTH_V,SYNCTEX_HEIGHT_V,SYNCTEX_DEPTH_V*/ } synctex_node_hbox_t; -synctex_node_t _synctex_new_hbox(synctex_scanner_t scanner); -void _synctex_display_hbox(synctex_node_t node); -void _synctex_log_hbox(synctex_node_t node); +/* horizontal box node creator */ +DEFINE_synctex_new_NODE(hbox) + +static void _synctex_display_hbox(synctex_node_t node); +static void _synctex_log_hbox(synctex_node_t node); static _synctex_class_t synctex_class_hbox = { @@ -507,9 +503,6 @@ static _synctex_class_t synctex_class_hbox = { (_synctex_info_getter_t)&_synctex_implementation_5 }; -/* horizontal box node creator */ -DEFINE_synctex_new_NODE(hbox) - /* This void box node implementation is either horizontal or vertical * It does not contain a child field. */ @@ -521,9 +514,11 @@ typedef struct { * SYNCTEX_HORIZ,SYNCTEX_VERT,SYNCTEX_WIDTH,SYNCTEX_HEIGHT,SYNCTEX_DEPTH*/ } synctex_node_void_vbox_t; -synctex_node_t _synctex_new_void_vbox(synctex_scanner_t scanner); -void _synctex_log_void_box(synctex_node_t node); -void _synctex_display_void_vbox(synctex_node_t node); +/* vertical void box node creator */ +DEFINE_synctex_new_NODE(void_vbox) + +static void _synctex_log_void_box(synctex_node_t node); +static void _synctex_display_void_vbox(synctex_node_t node); static _synctex_class_t synctex_class_void_vbox = { NULL, /* No scanner yet */ @@ -540,13 +535,12 @@ static _synctex_class_t synctex_class_void_vbox = { (_synctex_info_getter_t)&_synctex_implementation_3 }; -/* vertical void box node creator */ -DEFINE_synctex_new_NODE(void_vbox) - typedef synctex_node_void_vbox_t synctex_node_void_hbox_t; -synctex_node_t _synctex_new_void_hbox(synctex_scanner_t scanner); -void _synctex_display_void_hbox(synctex_node_t node); +/* horizontal void box node creator */ +DEFINE_synctex_new_NODE(void_hbox) + +static void _synctex_display_void_hbox(synctex_node_t node); static _synctex_class_t synctex_class_void_hbox = { NULL, /* No scanner yet */ @@ -563,9 +557,6 @@ static _synctex_class_t synctex_class_void_hbox = { (_synctex_info_getter_t)&_synctex_implementation_3 }; -/* horizontal void box node creator */ -DEFINE_synctex_new_NODE(void_hbox) - /* The medium nodes correspond to kern, glue, penalty and math nodes. * In LuaTeX, the size of the nodes may have changed. */ typedef struct { @@ -584,13 +575,14 @@ typedef struct { #define SYNCTEX_HAS_CHILDREN(NODE) (NODE && SYNCTEX_CHILD(NODE)) -void _synctex_log_medium_node(synctex_node_t node); +static void _synctex_log_medium_node(synctex_node_t node); typedef synctex_node_medium_t synctex_node_math_t; /* math node creator */ -synctex_node_t _synctex_new_math(synctex_scanner_t scanner); -void _synctex_display_math(synctex_node_t node); +DEFINE_synctex_new_NODE(math) + +static void _synctex_display_math(synctex_node_t node); static _synctex_class_t synctex_class_math = { NULL, /* No scanner yet */ @@ -607,13 +599,12 @@ static _synctex_class_t synctex_class_math = { (_synctex_info_getter_t)&_synctex_implementation_3 }; -DEFINE_synctex_new_NODE(math) - typedef synctex_node_medium_t synctex_node_kern_t; /* kern node creator */ -synctex_node_t _synctex_new_kern(synctex_scanner_t scanner); -void _synctex_display_kern(synctex_node_t node); +DEFINE_synctex_new_NODE(kern) + +static void _synctex_display_kern(synctex_node_t node); static _synctex_class_t synctex_class_kern = { NULL, /* No scanner yet */ @@ -630,8 +621,6 @@ static _synctex_class_t synctex_class_kern = { (_synctex_info_getter_t)&_synctex_implementation_3 }; -DEFINE_synctex_new_NODE(kern) - /* The small nodes correspond to glue and boundary nodes. */ typedef struct { SYNCTEX_DECLARE_CHARINDEX @@ -641,12 +630,12 @@ typedef struct { * SYNCTEX_HORIZ,SYNCTEX_VERT */ } synctex_node_small_t; -void _synctex_log_small_node(synctex_node_t node); +static void _synctex_log_small_node(synctex_node_t node); /* glue node creator */ typedef synctex_node_small_t synctex_node_glue_t; -synctex_node_t _synctex_new_glue(synctex_scanner_t scanner); -void _synctex_display_glue(synctex_node_t node); +DEFINE_synctex_new_NODE(glue) +static void _synctex_display_glue(synctex_node_t node); static _synctex_class_t synctex_class_glue = { NULL, /* No scanner yet */ @@ -662,12 +651,12 @@ static _synctex_class_t synctex_class_glue = { NULL, /* No next hbox */ (_synctex_info_getter_t)&_synctex_implementation_3 }; -DEFINE_synctex_new_NODE(glue) /* boundary node creator */ typedef synctex_node_small_t synctex_node_boundary_t; -synctex_node_t _synctex_new_boundary(synctex_scanner_t scanner); -void _synctex_display_boundary(synctex_node_t node); +DEFINE_synctex_new_NODE(boundary) + +static void _synctex_display_boundary(synctex_node_t node); static _synctex_class_t synctex_class_boundary = { NULL, /* No scanner yet */ @@ -684,8 +673,6 @@ static _synctex_class_t synctex_class_boundary = { (_synctex_info_getter_t)&_synctex_implementation_3 }; -DEFINE_synctex_new_NODE(boundary) - # define SYNCTEX_NAME_IDX (SYNCTEX_TAG_IDX+1) # define SYNCTEX_NAME(NODE) SYNCTEX_INFO(NODE)[SYNCTEX_NAME_IDX].PTR @@ -698,29 +685,8 @@ typedef struct { * SYNCTEX_TAG,SYNCTEX_NAME */ } synctex_input_t; -synctex_node_t _synctex_new_input(synctex_scanner_t scanner); -void _synctex_free_input(synctex_node_t node); -void _synctex_display_input(synctex_node_t node); -void _synctex_log_input(synctex_node_t node); - -static _synctex_class_t synctex_class_input = { - NULL, /* No scanner yet */ - synctex_node_type_input, /* Node type */ - &_synctex_new_input, /* creator */ - &_synctex_free_input, /* destructor */ - &_synctex_log_input, /* log */ - &_synctex_display_input, /* display */ - NULL, /* No parent */ - NULL, /* No child */ - &_synctex_implementation_0, /* sibling */ - NULL, /* No friend */ - NULL, /* No next hbox */ - (_synctex_info_getter_t)&_synctex_implementation_1 -}; - # define SYNCTEX_INPUT_MARK "Input:" - -synctex_node_t _synctex_new_input(synctex_scanner_t scanner) { +static synctex_node_t _synctex_new_input(synctex_scanner_t scanner) { if (scanner) { synctex_node_t node = _synctex_malloc(sizeof(synctex_input_t)); if (node) { @@ -731,13 +697,33 @@ synctex_node_t _synctex_new_input(synctex_scanner_t scanner) { } return NULL; } -void _synctex_free_input(synctex_node_t node){ + +static void _synctex_free_input(synctex_node_t node){ if (node) { SYNCTEX_FREE(SYNCTEX_SIBLING(node)); free(SYNCTEX_NAME(node)); free(node); } } + +static void _synctex_display_input(synctex_node_t node); +static void _synctex_log_input(synctex_node_t node); + +static _synctex_class_t synctex_class_input = { + NULL, /* No scanner yet */ + synctex_node_type_input, /* Node type */ + &_synctex_new_input, /* creator */ + &_synctex_free_input, /* destructor */ + &_synctex_log_input, /* log */ + &_synctex_display_input, /* display */ + NULL, /* No parent */ + NULL, /* No child */ + &_synctex_implementation_0, /* sibling */ + NULL, /* No friend */ + NULL, /* No next hbox */ + (_synctex_info_getter_t)&_synctex_implementation_1 +}; + # ifdef SYNCTEX_NOTHING # pragma mark - # pragma mark Navigation @@ -810,14 +796,14 @@ void synctex_node_log(synctex_node_t node) { SYNCTEX_LOG(node); } -void _synctex_log_input(synctex_node_t node) { +static void _synctex_log_input(synctex_node_t node) { if (node) { printf("%s:%i,%s",synctex_node_isa(node),SYNCTEX_TAG(node),SYNCTEX_NAME(node)); printf(" SYNCTEX_SIBLING:%p",(void *)SYNCTEX_SIBLING(node)); } } -void _synctex_log_sheet(synctex_node_t node) { +static void _synctex_log_sheet(synctex_node_t node) { if (node) { printf("%s:%i",synctex_node_isa(node),SYNCTEX_PAGE(node)); SYNCTEX_PRINT_CHARINDEX; @@ -830,7 +816,7 @@ void _synctex_log_sheet(synctex_node_t node) { } } -void _synctex_log_small_node(synctex_node_t node) { +static void _synctex_log_small_node(synctex_node_t node) { if (node) { printf("%s:%i,%i:%i,%i", synctex_node_isa(node), @@ -847,7 +833,7 @@ void _synctex_log_small_node(synctex_node_t node) { } } -void _synctex_log_medium_node(synctex_node_t node) { +static void _synctex_log_medium_node(synctex_node_t node) { if (node) { printf("%s:%i,%i:%i,%i:%i", synctex_node_isa(node), @@ -865,7 +851,7 @@ void _synctex_log_medium_node(synctex_node_t node) { } } -void _synctex_log_void_box(synctex_node_t node) { +static void _synctex_log_void_box(synctex_node_t node) { if (node) { printf("%s",synctex_node_isa(node)); printf(":%i",SYNCTEX_TAG(node)); @@ -885,7 +871,7 @@ void _synctex_log_void_box(synctex_node_t node) { } } -void _synctex_log_vbox(synctex_node_t node) { +static void _synctex_log_vbox(synctex_node_t node) { if (node) { printf("%s",synctex_node_isa(node)); printf(":%i",SYNCTEX_TAG(node)); @@ -906,7 +892,7 @@ void _synctex_log_vbox(synctex_node_t node) { } } -void _synctex_log_hbox(synctex_node_t node) { +static void _synctex_log_hbox(synctex_node_t node) { if (node) { printf("%s",synctex_node_isa(node)); printf(":%i",SYNCTEX_TAG(node)); @@ -938,7 +924,7 @@ void synctex_node_display(synctex_node_t node) { SYNCTEX_DISPLAY(node); } -void _synctex_display_input(synctex_node_t node) { +static void _synctex_display_input(synctex_node_t node) { if (node) { printf("....Input:%i:%s", SYNCTEX_TAG(node), @@ -948,7 +934,7 @@ void _synctex_display_input(synctex_node_t node) { } } -void _synctex_display_sheet(synctex_node_t node) { +static void _synctex_display_sheet(synctex_node_t node) { if (node) { printf("....{%i",SYNCTEX_PAGE(node)); SYNCTEX_PRINT_CHARINDEX; @@ -958,7 +944,7 @@ void _synctex_display_sheet(synctex_node_t node) { } } -void _synctex_display_vbox(synctex_node_t node) { +static void _synctex_display_vbox(synctex_node_t node) { if (node) { printf("....[%i,%i:%i,%i:%i,%i,%i", SYNCTEX_TAG(node), @@ -975,7 +961,7 @@ void _synctex_display_vbox(synctex_node_t node) { } } -void _synctex_display_hbox(synctex_node_t node) { +static void _synctex_display_hbox(synctex_node_t node) { if (node) { printf("....(%i,%i~%i*%i:%i,%i:%i,%i,%i", SYNCTEX_TAG(node), @@ -994,7 +980,7 @@ void _synctex_display_hbox(synctex_node_t node) { } } -void _synctex_display_void_vbox(synctex_node_t node) { +static void _synctex_display_void_vbox(synctex_node_t node) { if (node) { printf("....v%i,%i;%i,%i:%i,%i,%i", SYNCTEX_TAG(node), @@ -1009,7 +995,7 @@ void _synctex_display_void_vbox(synctex_node_t node) { } } -void _synctex_display_void_hbox(synctex_node_t node) { +static void _synctex_display_void_hbox(synctex_node_t node) { if (node) { printf("....h%i,%i:%i,%i:%i,%i,%i", SYNCTEX_TAG(node), @@ -1024,7 +1010,7 @@ void _synctex_display_void_hbox(synctex_node_t node) { } } -void _synctex_display_glue(synctex_node_t node) { +static void _synctex_display_glue(synctex_node_t node) { if (node) { printf("....glue:%i,%i:%i,%i", SYNCTEX_TAG(node), @@ -1036,7 +1022,7 @@ void _synctex_display_glue(synctex_node_t node) { } } -void _synctex_display_math(synctex_node_t node) { +static void _synctex_display_math(synctex_node_t node) { if (node) { printf("....math:%i,%i:%i,%i", SYNCTEX_TAG(node), @@ -1048,7 +1034,7 @@ void _synctex_display_math(synctex_node_t node) { } } -void _synctex_display_kern(synctex_node_t node) { +static void _synctex_display_kern(synctex_node_t node) { if (node) { printf("....kern:%i,%i:%i,%i:%i", SYNCTEX_TAG(node), @@ -1061,7 +1047,7 @@ void _synctex_display_kern(synctex_node_t node) { } } -void _synctex_display_boundary(synctex_node_t node) { +static void _synctex_display_boundary(synctex_node_t node) { if (node) { printf("....boundary:%i,%i:%i,%i", SYNCTEX_TAG(node), @@ -1089,7 +1075,7 @@ void _synctex_display_boundary(synctex_node_t node) { * status == SYNCTEX_STATUS_EOF means the function did not work as expected and there is no more material. * statusfile) /* Actually, the minimum buffer size is driven by integer and float parsing. - * �0.123456789e123 + * ±0.123456789e123 */ # define SYNCTEX_BUFFER_MIN_SIZE 16 # define SYNCTEX_BUFFER_SIZE 32768 @@ -1122,7 +1108,7 @@ synctex_status_t _synctex_scan_input(synctex_scanner_t scanner); synctex_status_t _synctex_scan_preamble(synctex_scanner_t scanner); synctex_status_t _synctex_scan_float_and_dimension(synctex_scanner_t scanner, float * value_ref); synctex_status_t _synctex_scan_post_scriptum(synctex_scanner_t scanner); -int _synctex_scan_postamble(synctex_scanner_t scanner); +synctex_status_t _synctex_scan_postamble(synctex_scanner_t scanner); synctex_status_t _synctex_setup_visible_box(synctex_node_t box); synctex_status_t _synctex_hbox_setup_visible(synctex_node_t node,int h, int v); synctex_status_t _synctex_scan_sheet(synctex_scanner_t scanner, synctex_node_t parent); @@ -1132,7 +1118,6 @@ int synctex_scanner_pre_x_offset(synctex_scanner_t scanner); int synctex_scanner_pre_y_offset(synctex_scanner_t scanner); const char * synctex_scanner_get_output_fmt(synctex_scanner_t scanner); int _synctex_node_is_box(synctex_node_t node); -int _synctex_bail(void); /* Try to ensure that the buffer contains at least size bytes. * Passing a huge size argument means the whole buffer length. @@ -1171,7 +1156,7 @@ synctex_status_t _synctex_buffer_get_available_size(synctex_scanner_t scanner, s } SYNCTEX_CUR = SYNCTEX_START + available; /* the next character after the move, will change. */ /* Fill the buffer up to its end */ - already_read = gzread(SYNCTEX_FILE,(void *)SYNCTEX_CUR,SYNCTEX_BUFFER_SIZE - available); + already_read = gzread(SYNCTEX_FILE,(void *)SYNCTEX_CUR,(int)(SYNCTEX_BUFFER_SIZE - available)); if (already_read>0) { /* We assume that 0 /* for inline && HAVE_xxx */ /* No inlining for synctex tool in texlive. */ # define SYNCTEX_INLINE - diff --git a/cut-n-paste/synctex/synctex_parser_utils.c b/cut-n-paste/synctex/synctex_parser_utils.c index 70132bda..0e9fd0e5 100644 --- a/cut-n-paste/synctex/synctex_parser_utils.c +++ b/cut-n-paste/synctex/synctex_parser_utils.c @@ -5,7 +5,7 @@ This file is part of the SyncTeX package. Latest Revision: Tue Jun 14 08:23:30 UTC 2011 -Version: 1.17 +Version: 1.18 See synctex_parser_readme.txt for more details @@ -67,6 +67,7 @@ authorization from the copyright holder. #ifdef SYNCTEX_WINDOWS #include +#include /* Use shlwapi.lib */ #endif void *_synctex_malloc(size_t size) { @@ -115,6 +116,15 @@ void _synctex_strip_last_path_extension(char * string) { if(NULL != string){ char * last_component = NULL; char * last_extension = NULL; +# if defined(SYNCTEX_WINDOWS) + last_component = PathFindFileName(string); + last_extension = PathFindExtension(string); + if(last_extension == NULL)return; + if(last_component == NULL)last_component = string; + if(last_extension>last_component){/* filter out paths like "my/dir/.hidden" */ + last_extension[0] = '\0'; + } +# else char * next = NULL; /* first we find the last path component */ if(NULL == (last_component = strstr(string,"/"))){ @@ -125,12 +135,12 @@ void _synctex_strip_last_path_extension(char * string) { last_component = next+1; } } -# if defined(SYNCTEX_WINDOWS) || defined(SYNCTEX_OS2) - /* On Windows, the '\' is also a path separator. */ +# if defined(SYNCTEX_OS2) + /* On OS2, the '\' is also a path separator. */ while((next = strstr(last_component,"\\"))){ last_component = next+1; } -# endif +# endif /* SYNCTEX_OS2 */ /* then we find the last path extension */ if((last_extension = strstr(last_component,"."))){ ++last_extension; @@ -142,6 +152,7 @@ void _synctex_strip_last_path_extension(char * string) { last_extension[0] = '\0'; } } +# endif /* SYNCTEX_WINDOWS */ } } @@ -150,7 +161,7 @@ synctex_bool_t synctex_ignore_leading_dot_slash_in_path(const char ** name_ref) if (SYNCTEX_IS_DOT((*name_ref)[0]) && SYNCTEX_IS_PATH_SEPARATOR((*name_ref)[1])) { do { (*name_ref) += 2; - while (SYNCTEX_IS_PATH_SEPARATOR((*name_ref)[1])) { + while (SYNCTEX_IS_PATH_SEPARATOR((*name_ref)[0])) { ++(*name_ref); } } while(SYNCTEX_IS_DOT((*name_ref)[0]) && SYNCTEX_IS_PATH_SEPARATOR((*name_ref)[1])); @@ -292,7 +303,6 @@ char * _synctex_merge_strings(const char * first,...) { size_t len = strlen(temp); if(UINT_MAX-len