texlive[66080] Build/source/texk/web2c/synctexdir: synctexdir: update

commits+hironobu at tug.org commits+hironobu at tug.org
Thu Feb 23 15:01:33 CET 2023


Revision: 66080
          http://tug.org/svn/texlive?view=revision&revision=66080
Author:   hironobu
Date:     2023-02-23 15:01:33 +0100 (Thu, 23 Feb 2023)
Log Message:
-----------
synctexdir: update from GH

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/synctexdir/ChangeLog
    trunk/Build/source/texk/web2c/synctexdir/synctex_parser.c
    trunk/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c
    trunk/Build/source/texk/web2c/synctexdir/synctex_parser_utils.h

Modified: trunk/Build/source/texk/web2c/synctexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/synctexdir/ChangeLog	2023-02-23 12:07:20 UTC (rev 66079)
+++ trunk/Build/source/texk/web2c/synctexdir/ChangeLog	2023-02-23 14:01:33 UTC (rev 66080)
@@ -1,3 +1,17 @@
+2023-02-23  Hironobu Yamashita  <h.y.acetaminophen at gmail.com>
+
+	Sync with GH 2020 branch.
+
+	  * Changed files (on https://github.com/jlaurens/synctex):
+	    synctex_parser.c
+	    synctex_parser_utils.c
+	    synctex_parser_utils.h
+
+	  - Fix compilation on MSVC.
+	    https://github.com/jlaurens/synctex/pull/59
+	  - Fix some GCC warnings.
+	    https://github.com/jlaurens/synctex/pull/57
+
 2023-01-19  Hironobu Yamashita  <h.y.acetaminophen at gmail.com>
 
 	Comparing TL r55094 (by JL) and GH 2020 branch.

Modified: trunk/Build/source/texk/web2c/synctexdir/synctex_parser.c
===================================================================
--- trunk/Build/source/texk/web2c/synctexdir/synctex_parser.c	2023-02-23 12:07:20 UTC (rev 66079)
+++ trunk/Build/source/texk/web2c/synctexdir/synctex_parser.c	2023-02-23 14:01:33 UTC (rev 66080)
@@ -773,7 +773,6 @@
             (char *)_synctex_malloc(reader->size+1); /*  one more character for null termination */
         if (NULL == reader->start) {
             _synctex_error("!  malloc error in synctex_reader_init_with_output_file.");
-        bailey:
 #ifdef SYNCTEX_DEBUG
             return reader;
 #else
@@ -918,6 +917,7 @@
  *  It is not owned by its parent, unless it is its first child.
  *  This destructor is for all handles.
  */
+/*
 static void _synctex_free_handle_old(synctex_node_p handle) {
   if (handle) {
     _synctex_free_handle_old(__synctex_tree_sibling(handle));
@@ -926,6 +926,7 @@
   }
   return;
 }
+*/
 static void _synctex_free_handle(synctex_node_p handle) {
   if (handle) {
     synctex_node_p n = handle;
@@ -3658,7 +3659,7 @@
                synctex_node_line(node),
                _synctex_data_h(node),
                _synctex_data_v(node),
-               node,
+               (void*)node, // Fix GCC warning: %p expects a void* according to POSIX
                _synctex_node_abstract(N));
     }
     return abstract;
@@ -3742,7 +3743,7 @@
                synctex_node_width(node),
                synctex_node_height(node),
                synctex_node_depth(node),
-               node
+               (void*)node // Fix GCC warning: %p expects a void* according to POSIX
                SYNCTEX_PRINT_CHARINDEX_WHAT);
     }
     return abstract;
@@ -5490,7 +5491,6 @@
 #       pragma mark + SCAN KERN
 #   endif
             ns = _synctex_parse_new_kern(scanner);
-        continue_scan:
             if (ns.status == SYNCTEX_STATUS_OK) {
                 if (child) {
                     _synctex_node_set_sibling(child,ns.node);
@@ -7252,7 +7252,7 @@
         iterator->count0 = iterator->count = count;
     }
     return iterator;
-};
+}
 
 void synctex_iterator_free(synctex_iterator_p iterator) {
     if (iterator) {
@@ -8434,7 +8434,7 @@
     int length;             /*  the number of chars appended */
 };
 
-__attribute__((__format__ (__printf__, 2, 3)))
+SYNCTEX_ATTRIBUTE_FORMAT_PRINTF(2, 3)
 static int _synctex_updater_print(synctex_updater_p updater, const char * format, ...) {
     int result = 0;
     if (updater) {
@@ -8471,7 +8471,7 @@
 /**
  *  gzvprintf is not available until OSX 10.10
  */
-__attribute__((__format__ (__printf__, 2, 3)))
+SYNCTEX_ATTRIBUTE_FORMAT_PRINTF(2, 3)
 static int _synctex_updater_print_gz(synctex_updater_p updater, const char * format, ...) {
     int result = 0;
     if (updater) {

Modified: trunk/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c
===================================================================
--- trunk/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c	2023-02-23 12:07:20 UTC (rev 66079)
+++ trunk/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c	2023-02-23 14:01:33 UTC (rev 66080)
@@ -86,7 +86,7 @@
 #   include <syslog.h>
 #endif
 
-__attribute__((__format__ (__printf__, 3, 0)))
+SYNCTEX_ATTRIBUTE_FORMAT_PRINTF(3, 0)
 static int _synctex_log(int level, const char * prompt, const char * reason,va_list arg) {
 	int result;
 #	ifdef SYNCTEX_RECENT_WINDOWS
@@ -133,7 +133,7 @@
 	return result;
 }
 
-__attribute__((__format__ (__printf__, 1, 2)))
+SYNCTEX_ATTRIBUTE_FORMAT_PRINTF(1, 2)
 int _synctex_error(const char * reason,...) {
     va_list arg;
     int result;
@@ -147,7 +147,7 @@
     return result;
 }
 
-__attribute__((__format__ (__printf__, 1, 2)))
+SYNCTEX_ATTRIBUTE_FORMAT_PRINTF(1, 2)
 int _synctex_debug(const char * reason,...) {
     va_list arg;
     int result;

Modified: trunk/Build/source/texk/web2c/synctexdir/synctex_parser_utils.h
===================================================================
--- trunk/Build/source/texk/web2c/synctexdir/synctex_parser_utils.h	2023-02-23 12:07:20 UTC (rev 66079)
+++ trunk/Build/source/texk/web2c/synctexdir/synctex_parser_utils.h	2023-02-23 14:01:33 UTC (rev 66080)
@@ -85,6 +85,12 @@
 #	else
 #		define SYNCTEX_ARE_PATH_CHARACTERS_EQUAL(left,right) (toupper(left) != toupper(right))
 #	endif
+
+#	if defined(_MSC_VER)
+#		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
     
 /*  This custom malloc functions initializes to 0 the newly allocated memory.
  *  There is no bzero function on windows. */



More information about the tex-live-commits mailing list.