From 7f5a4cb97faa26dbbcd61cbe1605292b494b27d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LAURENS=20J=C3=A9r=C3=B4me?= Date: Thu, 21 Mar 2024 16:47:47 +0100 Subject: [PATCH] Synch with TeXLive local dev --- synctex_main.c | 8 ++++---- synctex_parser.c | 15 ++++++++------- synctex_parser.h | 6 +++--- synctex_parser_advanced.h | 6 +++--- synctex_parser_c-auto.h | 4 ++-- synctex_parser_local.h | 6 +++--- synctex_parser_readme.md | 4 ++-- synctex_parser_readme.txt | 5 +++-- synctex_parser_utils.c | 10 ++++------ synctex_parser_utils.h | 14 +++++++------- synctex_version.h | 19 +++++++++++++++---- 11 files changed, 54 insertions(+), 43 deletions(-) diff --git a/synctex_main.c b/synctex_main.c index 31a0e56..4561ae9 100644 --- a/synctex_main.c +++ b/synctex_main.c @@ -3,9 +3,9 @@ This file is part of the __SyncTeX__ package. - [//]: # (Latest Revision: Tue Mar 5 21:16:33 UTC 2024) - [//]: # (Version: 1.30) - + Version: see synctex_version.h + Latest Revision: Thu Mar 21 14:12:58 UTC 2024 + See `synctex_parser_readme.md` for more details ## License @@ -328,7 +328,7 @@ static void synctex_usage(const char * error,va_list ap) { fprintf((error?stderr:stdout), "usage: synctex [global option] [options] [args]\n" "Synchronize TeXnology command-line client, version " SYNCTEX_VERSION_STRING "\n\n" - "The Synchronization TeXnology by Jérôme Laurens is a feature of recent TeX engines.\n" + "The Synchronization TeXnology by Jérôme Laurens is a feature of most TeX engines.\n" "It allows to synchronize between input and output, which means to\n" "navigate from the source document to the typeset material and vice versa.\n\n" ); diff --git a/synctex_parser.c b/synctex_parser.c index 3b38b5f..763b8d2 100644 --- a/synctex_parser.c +++ b/synctex_parser.c @@ -3,9 +3,9 @@ This file is part of the __SyncTeX__ package. - [//]: # (Latest Revision: Tue Mar 5 21:16:33 UTC 2024) - [//]: # (Version: 1.30) - + Version: see synctex_version.h + Latest Revision: Thu Mar 21 14:12:58 UTC 2024 + See `synctex_parser_readme.md` for more details ## License @@ -744,7 +744,7 @@ static void synctex_reader_free(synctex_reader_p reader) { } /* * Return reader on success. - * Return NULL on failure. + * Deallocate reader and return NULL on failure. */ static synctex_reader_p synctex_reader_init_with_output_file(synctex_reader_p reader, const char * output, const char * build_directory) { if (reader) { @@ -776,6 +776,7 @@ static synctex_reader_p synctex_reader_init_with_output_file(synctex_reader_p re #ifdef SYNCTEX_DEBUG return reader; #else + synctex_reader_free(reader); return NULL; #endif } @@ -1045,7 +1046,7 @@ static synctex_ss_s _synctex_decode_string(synctex_scanner_p scanner); * - parameter NODE: of type synctex_node_p */ # define SYNCTEX_DATA(NODE) ((*((((NODE)->class_))->info))(NODE)) -#if defined SYNCTEX_DEBUG > 1000 +#if SYNCTEX_DEBUG > 1000 # define DEFINE_SYNCTEX_DATA_HAS(WHAT) \ SYNCTEX_INLINE static synctex_bool_t __synctex_data_has_##WHAT(synctex_node_p node) {\ return (node && (node->class_->modelator->WHAT>=0));\ @@ -4181,7 +4182,7 @@ static synctex_is_s _synctex_decode_int_v(synctex_scanner_p scanner) { * A string is an array of characters from the current parser location * and before the next '\n' character. * If a string was properly decoded, it is returned in value_ref and - * the cursor points to the newline marker. + * the cursor points to the new line marker. * The returned string was alloced on the heap, the caller is the owner and * is responsible to free it in due time, * unless it transfers the ownership to another object. @@ -5966,7 +5967,7 @@ SYNCTEX_INLINE static synctex_status_t _synctex_post_process(synctex_scanner_p s } } #endif -#if SYNCTEX_DEBUG>10000 +#if SYNCTEX_DEBUG > 10000 { int i; for (i=0;inumber_of_lists;++i) { diff --git a/synctex_parser.h b/synctex_parser.h index 8964eae..e95f3a4 100644 --- a/synctex_parser.h +++ b/synctex_parser.h @@ -3,9 +3,9 @@ This file is part of the __SyncTeX__ package. - [//]: # (Latest Revision: Tue Mar 5 21:16:33 UTC 2024) - [//]: # (Version: 1.30) - + Version: see synctex_version.h + Latest Revision: Thu Mar 21 14:12:58 UTC 2024 + See `synctex_parser_readme.md` for more details ## License diff --git a/synctex_parser_advanced.h b/synctex_parser_advanced.h index b19d290..1f000fb 100644 --- a/synctex_parser_advanced.h +++ b/synctex_parser_advanced.h @@ -3,9 +3,9 @@ This file is part of the __SyncTeX__ package. - [//]: # (Latest Revision: Tue Mar 5 21:16:33 UTC 2024) - [//]: # (Version: 1.30) - + Version: see synctex_version.h + Latest Revision: Thu Mar 21 14:12:58 UTC 2024 + See `synctex_parser_readme.md` for more details ## License diff --git a/synctex_parser_c-auto.h b/synctex_parser_c-auto.h index d4510a4..f5ead14 100644 --- a/synctex_parser_c-auto.h +++ b/synctex_parser_c-auto.h @@ -3,8 +3,8 @@ Copyright (c) 2005 jerome DOT laurens AT u-bourgogne DOT fr This file is part of the SyncTeX package. -[//]: # (Version: 1.30) -[//]: # (Latest revision: Tue Mar 5 21:16:33 UTC 2024) +Version: see synctex_version.h +Latest Revision: Thu Mar 21 14:12:58 UTC 2024 See synctex_parser_readme.txt for more details diff --git a/synctex_parser_local.h b/synctex_parser_local.h index 662a2d8..6ace37c 100644 --- a/synctex_parser_local.h +++ b/synctex_parser_local.h @@ -3,9 +3,9 @@ This file is part of the SyncTeX package. -[//]: # (Version: 1.30) -[//]: # (Latest revision: Tue Mar 5 21:16:33 UTC 2024) - + Version: see synctex_version.h + Latest Revision: Thu Mar 21 14:12:58 UTC 2024 + See synctex_parser_readme.txt for more details License: diff --git a/synctex_parser_readme.md b/synctex_parser_readme.md index 751d82a..4ed6995 100644 --- a/synctex_parser_readme.md +++ b/synctex_parser_readme.md @@ -2,8 +2,8 @@ This file is part of the __SyncTeX__ package. -Version: 1.30 -Latest revision: Tue Mar 5 21:16:33 UTC 2024 +Version: see synctex_version.h +Latest Revision: Thu Mar 21 14:12:58 UTC 2024 ## Important diff --git a/synctex_parser_readme.txt b/synctex_parser_readme.txt index 0ffa661..9eba8d3 100644 --- a/synctex_parser_readme.txt +++ b/synctex_parser_readme.txt @@ -67,8 +67,9 @@ In order to help developers to automatically manage the version and build number and download the parser only when necessary, the synctex_parser.version is an ASCII text file just containing the current version and build numbers. -History: --------- +Old history: +------------ +See the ChangeLog 1.1: Thu Jul 17 09:28:13 UTC 2008 - First official version available in TeXLive 2008 DVD. Unfortunately, the backwards synchronization is not working properly mainly for ConTeXt users, see below. diff --git a/synctex_parser_utils.c b/synctex_parser_utils.c index 6b4c966..e82d1e3 100644 --- a/synctex_parser_utils.c +++ b/synctex_parser_utils.c @@ -3,9 +3,9 @@ This file is part of the __SyncTeX__ package. - [//]: # (Latest Revision: Tue Mar 5 21:16:33 UTC 2024) - [//]: # (Version: 1.30) - + Version: see synctex_version.h + Latest Revision: Thu Mar 21 14:12:58 UTC 2024 + See `synctex_parser_readme.md` for more details ## License @@ -77,9 +77,7 @@ void *_synctex_malloc(size_t size) { } void _synctex_free(void * ptr) { - if (ptr) { - free(ptr); - } + free(ptr); } #if !defined(_WIN32) diff --git a/synctex_parser_utils.h b/synctex_parser_utils.h index b3a5dd1..38074af 100644 --- a/synctex_parser_utils.h +++ b/synctex_parser_utils.h @@ -3,9 +3,9 @@ This file is part of the __SyncTeX__ package. - [//]: # (Latest Revision: Tue Mar 5 21:16:33 UTC 2024) - [//]: # (Version: 1.30) - + Version: see synctex_version.h + Latest Revision: Thu Mar 21 14:12:58 UTC 2024 + See `synctex_parser_readme.md` for more details ## License @@ -87,7 +87,7 @@ extern "C" { # endif # if defined(_MSC_VER) -# define SYNCTEX_ATTRIBUTE_FORMAT_PRINTF(STRING_INDEX, FIRST_TO_CHECK) +# define SYNCTEX_ATTRIBUTE_FORMAT_PRINTF(STRING_INDEX, FIRST_TO_CHECK) ATTRIBUTE_FORMAT_PRINTF(STRING_INDEX, FIRST_TO_CHECK) # else # define SYNCTEX_ATTRIBUTE_FORMAT_PRINTF(STRING_INDEX, FIRST_TO_CHECK) __attribute__((__format__ (__printf__, (STRING_INDEX), (FIRST_TO_CHECK)))) # endif @@ -103,8 +103,8 @@ void _synctex_free(void * ptr); /* This is used to log some informational message to the standard error stream. * On Windows, the stderr stream is not exposed and another method is used. * The return value is the number of characters printed. */ -int _synctex_error(const char * reason,...); -int _synctex_debug(const char * reason,...); + int _synctex_error(const char * reason,...); + int _synctex_debug(const char * reason,...); /* strip the last extension of the given string, this string is modified! * This function depends on the OS because the path separator may differ. @@ -165,7 +165,7 @@ int _synctex_get_name(const char * output, const char * build_directory, char ** const char * _synctex_get_io_mode_name(synctex_io_mode_t io_mode); synctex_bool_t synctex_ignore_leading_dot_slash_in_path(const char ** name); - + synctex_bool_t synctex_ignore_leading_dot_slash_in_path(const char ** name); int synctex_parse_int(char * ptr, char ** endptr); diff --git a/synctex_version.h b/synctex_version.h index 9e217a8..2ff2a4a 100644 --- a/synctex_version.h +++ b/synctex_version.h @@ -3,8 +3,7 @@ Copyright (c) 2008-2024 jerome DOT laurens AT u-bourgogne DOT fr This file is part of the __SyncTeX__ package. -[//]: # (Latest Revision: Tue Mar 5 21:16:33 UTC 2024) -[//]: # (Version: 1.30) +Latest Revision: Thu Mar 21 12:51:01 UTC 2024 See `synctex_parser_readme.md` for more details @@ -47,13 +46,25 @@ If you include or use a significant part of the __SyncTeX__ package into a softw I would appreciate to be listed as contributor and see "__SyncTeX__" highlighted. */ -#ifndef __SYNCTEX_VERSION__ -# define __SYNCTEX_VERSION__ +#ifndef __SYNCTEX_VERSION_H__ +# define __SYNCTEX_VERSION_H__ +/* The version of .synctex files contents. */ +# define SYNCTEX_VERSION 1 +# define SYNCTEX_FILE_VERSION SYNCTEX_VERSION + + +/* The version of the synctex parser library */ # define SYNCTEX_VERSION_MAJOR 1 +/* Keep next value in synch with `synctex_parser_version.txt` contents. */ # define SYNCTEX_VERSION_STRING "1.30" +/* The version of the synctex CLI tool */ # define SYNCTEX_CLI_VERSION_STRING "1.7" +/* The version of the synctex support, + * how synctex is embedded in various TeX engines. */ +# define SYNCTEX_SUPPORT_VERSION_STRING "1.0" + #endif