336 if(output && synctex_name_ref && io_mode_ref) {
343 if(strlen(base_name)>0) {
345 const char * temp = NULL;
346 char * core_name = NULL;
347 char * dir_name = NULL;
348 char * quoted_core_name = NULL;
349 char * basic_name = NULL;
350 char * gz_name = NULL;
351 char * quoted_name = NULL;
352 char * quoted_gz_name = NULL;
353 char * build_name = NULL;
354 char * build_gz_name = NULL;
355 char * build_quoted_name = NULL;
356 char * build_quoted_gz_name = NULL;
362 if((temp =
strrchr(base_name,
'.')) && (size = temp - base_name)>0) {
364 if(NULL == (core_name = (
char *)malloc(size+1))) {
368 if(core_name != strncpy(core_name,base_name,size)) {
374 core_name[size] =
'\0';
382 size = strlen(output)-strlen(base_name);
385 if(NULL == (dir_name = (
char *)malloc(size+1))) {
391 if(dir_name != strncpy(dir_name,output,size)) {
399 dir_name[size] =
'\0';
403 if(
strchr(core_name,
' ')) {
407 if(dir_name &&strlen(dir_name)>0) {
409 if(quoted_core_name && strlen(quoted_core_name)>0) {
414 if(quoted_core_name && strlen(quoted_core_name)>0) {
419 temp = build_directory + size - 1;
422 if(quoted_core_name && strlen(quoted_core_name)>0) {
427 if(quoted_core_name && strlen(quoted_core_name)>0) {
441 if(build_quoted_name) {
446 # define TEST(FILENAME,COMPRESS_MODE) \
448 if (stat(FILENAME, &buf)) { \
451 } else if (buf.st_mtime>the_time) { \
452 the_time=buf.st_mtime; \
453 synctex_name = FILENAME; \
454 if (COMPRESS_MODE) { \
455 io_mode |= synctex_io_gz_mask; \
457 io_mode &= ~synctex_io_gz_mask; \
471 # define CLEAN_AND_REMOVE(FILENAME) \
472 if(FILENAME && (FILENAME!=synctex_name)) {\
474 printf("synctex tool info: %s removed\n",FILENAME);\
486 # undef CLEAN_AND_REMOVE
488 * synctex_name_ref = synctex_name;
489 * io_mode_ref = io_mode;