summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/synctexdir
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
committerKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
commitad547a6b5986815fda458221149728d9d9ab1d87 (patch)
tree16296910eb3eca724371474ea9aea3994dc69614 /Build/source/texk/web2c/synctexdir
parent947b43de3dd21d58ccc2ffadefc4441ea1c2a813 (diff)
restore Build,TODO from r57911
git-svn-id: svn://tug.org/texlive/trunk@57915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/synctexdir')
-rw-r--r--Build/source/texk/web2c/synctexdir/ChangeLog464
-rw-r--r--Build/source/texk/web2c/synctexdir/README.txt1
-rw-r--r--Build/source/texk/web2c/synctexdir/ac/synctex.ac21
-rw-r--r--Build/source/texk/web2c/synctexdir/am/synctex.am354
-rw-r--r--Build/source/texk/web2c/synctexdir/man1/synctex.153
-rw-r--r--Build/source/texk/web2c/synctexdir/man5/synctex.5374
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-common.h51
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-def.ch063
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-e-mem.ch0165
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-e-mem.ch168
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-e-rec.ch0140
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-ep-mem.ch025
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-ep-mem.ch123
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-ep-rec.ch013
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-eptex.h57
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-etex.h51
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-euptex.h57
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-luatex.h87
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-mem.ch0307
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-mem.ch264
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-p-mem.ch025
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-p-mem.ch123
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-p-rec.ch031
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-p-rec.ch119
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-pdf-rec.ch2213
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-pdftex.h72
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-ptex.h57
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-rec.ch0430
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-rec.ch181
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-rec.ch266
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-tex.h52
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-uptex.h57
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-xe-def.ch063
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-xe-rec.ch382
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-xetex.h73
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex.c2155
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex.defines80
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex.h127
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex.pc.in12
-rwxr-xr-xBuild/source/texk/web2c/synctexdir/synctex.test8
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_main.c934
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser.c8924
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser.h429
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser_advanced.h554
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser_api_level.txt1
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser_c-auto.h44
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser_local.h45
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser_readme.md259
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser_readme.txt204
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser_utils.c571
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser_utils.h163
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser_version.txt1
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_version.h59
-rw-r--r--Build/source/texk/web2c/synctexdir/tests/LM-Volume-manuscript.tex1009
-rw-r--r--Build/source/texk/web2c/synctexdir/tests/bartest.synctex.gzbin0 -> 33531 bytes
-rw-r--r--Build/source/texk/web2c/synctexdir/tests/footest.synctex8587
-rw-r--r--Build/source/texk/web2c/synctexdir/tests/story-zapfino.tex24
-rwxr-xr-xBuild/source/texk/web2c/synctexdir/tests/test file.sh225
58 files changed, 28197 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/synctexdir/ChangeLog b/Build/source/texk/web2c/synctexdir/ChangeLog
new file mode 100644
index 00000000000..fd74522647e
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/ChangeLog
@@ -0,0 +1,464 @@
+2019-10-10 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * synctex-p-rec.ch0, synctex-ep-rec.ch0: Fix \meaning\synctex
+ for pTeX and upTeX.
+ * am/synctex.am: Adjusted.
+
+2019-08-07 Akira Kakuto <kakuto@w32tex.org>
+
+ * synctex.c: Improve support of non-ascii path names
+ (Windows only).
+
+2018-10-25 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex.c: Cleanup for non-ascii file names (w32 only).
+
+2018-07-27 Karl Berry <karl@freefriends.org>
+
+ * synctex_parser_api_level.txt: new file (contents "2.0.0").
+ * ac/synctex.ac: use it instead of synctex_parser_version.txt.
+ Per Debian.
+ https://github.com/jlaurens/synctex/issues/23
+ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895980
+
+2018-07-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex.c: Fix a bug that Magnification is not correctly
+ recorded. Report by Karel Horak:
+ https://tug.org/pipermail/tex-live/2018-July/042063.html
+
+2018-06-13 Karl Berry <karl@tug.org>
+
+ * man1/synctex.1: man page list syntax.
+ Report/patch from esr, 12 Jun 2018 15:16:13.
+
+2018-06-10 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * synctex.c: Allow non-ascii file names for pdfTeX
+ with UTF-8 source files (w32 only).
+
+2018-05-29 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex.c: Discard the changes on 2018-05-11, since
+ 'command_line_encoding=utf-8' is not so natural for
+ pdfTeX (w32 only).
+
+2018-05-11 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex.c: Allow non-ascii file names also for pdfTeX
+ (w32 only).
+
+2018-01-18 Karl Berry <karl@freefriends.org>
+
+ * man5/synctex.5: spacing, typos, per Debian.
+
+2017-07-18 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex_parser_utils.c: mingw32 also may not have syslog.h.
+
+2017-07-16 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex_parser_utils.h: Avoid to be included twice.
+
+2017-07-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex_parser.c: Remove double definition of synctex_iterator_s.
+
+2017-07-14 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex_parser.c, synctex_parser_util.c: Support
+ Visual Studio 2015.
+
+2017-04-24 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * synctex-ep-mem.ch0, synctex-p-mem.ch0,
+ synctex-ep-mem.ch1, synctex-p-mem.ch1:
+ Adapt to changes in ptexdir/ptex-base.ch (p\TeX -> \pTeX).
+
+2017-04-22 Jerome Laurens <jerome.laurens@u-bourgogne.fr>
+ * man5/synctex.1, man5/synctex.5, synctex-pdf-rec.ch2,
+ synctex-pdftex.h, synctex-rec.ch0, synctex.c, synctex.defines,
+ synctex.h: add support for \pdfxform
+
+2016-03-04 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * synctex-ep-mem.ch1, synctex-p-mem.ch1: Adapt to changes in
+ ptexdir/ptex-base.ch.
+
+2015-12-21 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex-luatex.h: update for the new texnode.h in LuaTeX beta-0.87.0.
+
+2015-07-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * am/synctex.am: Dependencies for 'make check'.
+
+2015-04-05 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex.c: Support file names with multi-byte characters in SyncTeX
+ for XeTeX in addition to for (e)upTeX (win32 only).
+
+2015-03-23 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * am/synctex.am [MinGW]: SyncTeX requires libshlwapi.a.
+ * synctex_parser_utils.c: Avoid an unused variable.
+
+2015-03-23 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex_parser_utils.c: Fix a bug in
+ synctex_bool_t synctex_ignore_leading_dot_slash_in_path().
+ From Noriyuki Abe (2015-03-23).
+
+2015-03-22 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex_parser_utils.c: Use WIN32API PathFindFileName() and
+ PathFindExtension() for last_component and last_extension, respectively,
+ in _synctex_strip_last_path_extension(), in order to support multi-byte
+ characters in SyncTeX applications (win32 only).
+ From Noriyuki Abe (2015-03-22).
+
+2015-03-19 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex.c: Avoid minor memory leaks (win32 only).
+
+2015-03-18 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex.c: Support multi-byte characters in file names in SyncTeX
+ for (e)upTeX (win32 only).
+
+2015-03-08 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * ac/synctex.a, am/synctex.am: Reorganize rules for libsynctex.
+
+2014-12-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex.c: Define SYNCTEX_YES as 1, not -1 (for bitfields).
+
+2014-08-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex_parser.c: Declare functions with file scope as static.
+ * synctex.test (new): Shell script for a simple test.
+ * am/synctex.am: Added the new test.
+
+2014-08-04 Sebastian Ramacher <sramacher@debian.org>
+
+ * synctex_parser.c (_synctex_open): Avoid memory leak,
+
+2014-07-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * am/synctex.am: Build libsynctex as possibly shared library.
+ From Sebastian Ramacher <sramacher@debian.org>.
+
+2014-07-22 Khaled Hosny <khaledhosny@eglug.org>
+
+ * am/synctex.am: Don't apply synctex-e-mem.ch0 to XeTeX, and replace
+ synctex-e-rec.ch0 with synctex-xe-rec.ch0, after TeX--XeT removal.
+ * synctex-xe-rec.ch0: New file (adapted from synctex-e-rec.ch0).
+
+2014-01-14 Sebastian Ramacher <sramacher@debian.org>
+
+ * synctex_main.c: Bug fix (segfault).
+
+2013-02-11 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Simplify SyncTeX change files.
+ * synctex-def.ch0, synctex-xe-def.ch0: New files defining
+ synctex_field_size (1 or 2) and field access macros.
+ * synctex-mem.ch0: Drop synctex_field_size.
+ * synctex-rec.ch0, synctex-e-rec.ch0: Use field access macros.
+ * synctex-rec.ch1: Drop obsolete explicit field access.
+ * synctex-mem.ch1, synctex-xe-rec.ch2, synctex-xe-mem.ch2,
+ synctex-e-rec.ch1 (removed): Now obsolete.
+ * am/synctex.am: Adapted.
+
+2012-11-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex-rec.ch0: Avoid conflict with xetexdir/xetex.web.
+
+2012-10-08 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex_parser_utils.h: Avoid definition of FALSE and TRUE
+ that may cause warnings.
+
+2012-09-06 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex_main.c: Define snprintf and getcwd for WIN32.
+
+2012-07-30 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex_main.c (TEST): Check values returned by snprintf().
+
+2012-06-30 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex.c: Remove "# warning ..." line, because MSVC fails to
+ interpret it.
+ From Akira Kakuto <kakuto@fuk.kindai.ac.jp> (W32TeX).
+
+2012-05-16 Vladimir Volovich <vvv@vsu.ru>
+
+ * synctex_parser.c (SYNCTEX_DECLARE_CHARINDEX): Bug fix, avoid
+ isolated semicolon.
+
+2012-02-03 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex_parser.c: Change struct __synctex_updater_t member
+ file from 'void *' to 'gzFile', they differ for zlib-1.2.6.
+
+2011-10-18 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex_parser.c: remove "# warning ..." lines, because MSVC fails to
+ interpret them.
+
+2011-10-14 Jérôme Laurens <jerome.laurens@u-bourgogne.fr>
+
+ These changes only affect the synctex command line utility
+ as well as 3rd parties developers. The various TeX engines are not affected.
+
+ * synctex_parser.c:
+ - cosmetic changes to enhance code readability
+ - Adding the notiong of mean line and weight to hbox nodes
+ in order to enhance forward synchronization
+ - function synctex_scanner_get_name:
+ + Adding support for the new file naming convention with './'
+ * synctex_parser_utils.c:
+ - Adding support for the new file naming convention with './'
+ + function synctex_ignore_leading_dot_slash_in_path replaces synctex_ignore_leading_dot_slash
+ + function _synctex_is_equivalent_file_name is more permissive
+
+ See the synctex_parser_readme.txt for more details
+
+2011-08-25 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex-e-rec.ch0: Shorten a change set to simplify e-pTeX.
+
+2011-08-22 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex-luatex.h, synctex-xetex.h: Define SYNCTEX_CURH and
+ SYNCTEX_CURH to yield correct coordinates in dvi and pdf mode.
+
+2011-08-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * am/synctex.am: Add upTeX and e-upTeX.
+ * synctex-euptex.h, synctex-uptex.h: New files.
+
+2011-07-25 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * am/synctex.am (eptex_ch_synctex): Bug fix:
+ use synctex-e-rec.ch[01] instead of ...
+ * synctex-ep-rec.ch1 (removed): ... this file.
+ Mail from Akira, Sat, 23 Jul 2011 23:02:45.
+
+2011-07-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ SyncTeX infrastructure for pTeX and e-pTeX.
+ * synctex-ptex.h, synctex-p-{mem,rec}.ch[01] (all new):
+ Additional files for pTeX.
+ * synctex-eptex.h, synctex-ep-{mem.ch[01],rec.ch1} (all new):
+ Additional files for e-pTeX.
+ * am/synctex.am: Adapt
+
+ * synctex.c: Drop `#warning These structures MUST be kept...'.
+
+2011-06-30 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex-{,e}tex.h: Drop the `#warning SyncTeX for *TeX'.
+ * synctex-{,e,pdf,xe}tex.h: Move the default definition of
+ SYNCTEX_GET_CURRENT_NAME for here ...
+ * synctex.c: ... to here.
+
+2011-06-11 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex_parser_utils.c: fix a typo.
+
+2011-05-13 Taco Hoekwater <taco@luatex.org>
+
+ * synctex-luatex.h: synchronization_field_size has to be 1 for luatex.
+
+2011-05-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex-etex.h, synctex-pdftex.h, synctex-tex.h, synctex-xetex.h:
+ Move generic_synctex_get_current_name() prototype to ../texmfmp.h.
+
+2011-05-11 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * synctex-etex.h, synctex-pdftex.h, synctex-tex.h, synctex-xetex.h:
+ define SYNCTEX_GET_CURRENT_NAME() as in LuaTeX, since SyncTeX name
+ should be full path when --output-directory option is given.
+
+2011-05-09 Taco Hoekwater <taco@luatex.org>
+
+ * synctex-luatex.h: use an actual function to find the current name.
+
+2011-04-16 Taco Hoekwater <taco@luatex.org>
+
+ * synctex.c: Rename flags member output => output_p to avoid
+ conflict with macro defined for MinGW32.
+
+2011-04-16 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex-luatex.h (new): moved from ../luatexdir/utils to here.
+
+ * synctex.c (synctexstartinput): When SYNCTEX_GET_CURRENT_NAME()
+ returns "", don't assign "texput" which might later get freed
+ but rather xrealloc and strcpy.
+
+2011-04-03 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex-e-mem.ch0: Adapt to ../etexdir/etex.ch.
+
+2011-03-28 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * am/synctex.am: Use AM_CFLAGS instead of synctex_CFLAGS.
+
+2011-03-14 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex.c: Instead of sed-substituting TEX-OR-MF-OR-MP in
+ #include "synctex-TEX-OR-MF-OR-MP.h", #include SYNCTEX_ENGINE_H
+ and add -DSYNCTEX_ENGINE_H=\"synctex-tex.h\" to CPPFLAGS for TeX
+ and similarly for e-TeX, pdfTeX, and XeTeX.
+ * am/synctex.am: Adapt.
+
+2011-03-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Avoid compiler warnings (redo changes from 2010-01-22).
+
+ * synctex_parser_utils.h: Declare synctex_suffix{,_gz} extern ...
+ * synctex_parser.c: ... and instantiate here.
+ * synctex_parser_utils.[ch]: Constify _synctex_last_path_component()
+ return type.
+ * synctex_parser.c (__synctex_scanner_t): Change type of struct
+ members buffer_{cur,start,end} from 'unsigned char *' to 'char *'
+ and remove the casts.
+ (_synctex_class_t synctex_class_*): Declare as non-const.
+ (_synctex_scan_named): Constify string param `name'.
+
+2010-06-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Reorganize web2c headers.
+ * synctex_main.c, synctex_parser_local.h:
+ #include <w2c/config.h> instead of "config.h".
+
+2010-05-13 Jerome Laurens <jerome.laurens@u-bourgogne.fr>
+
+ * synctex.c, very minor change in code design to remove wrong warnings when building xetex.
+
+2010-05-13 Jerome Laurens <jerome.laurens@u-bourgogne.fr>
+
+ * synctex.c, change in code design.
+ The macro layer is enhanced to take luatex into account.
+ Luatex can now safely use this file instead of luatexdir/utils/synctex.c,
+ provided luatexdir/utils/synctex-luatex.h is updated accordingly.
+ No change for pdftex nor xetex.
+
+ * synctex.c, typos fixed, some wrong "size_t" causing false warnings replaced by "int".
+
+2010-04-23 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex_main.c, synctex_parser_local.h: #include "c-auto.h"
+ instead of "web2c/c-auto.h".
+
+2010-01-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * am/synctex.am (synctex_CFLAGS): Enable compiler warnings.
+
+ Avoid compiler warnings:
+
+ * synctex_main.c: Define _ISOC99_SOURCE to get fmax() prototype
+ FIXME: Linux only?
+ * synctex_parser_utils.h: Move declaration of synctex_io_modes ...
+ * synctex_parser.c: ... to here.
+ * synctex_parser_utils.h: Declare synctex_suffix{,_gz} extern ...
+ * synctex_parser.c: ... and instantiate here.
+ * synctex_parser_utils.[ch]: Constify _synctex_last_path_component()
+ return type.
+ * synctex_parser.c (__synctex_scanner_t): Change type of struct
+ members buffer_{cur,start,end} from 'unsigned char *' to 'char *'
+ and remove the casts.
+ (_synctex_class_t synctex_class_*): Declare as non-const.
+ (_synctex_scan_named): Constify string param `name'.
+
+2010-01-10 Jérôme Laurens <jerome.laurens@u-bourgogne.fr>
+
+ * synctex_parser.c: in the _synctex_smallest_container() function,
+ SYNCTEX_WIDTH is replaced with SYNCTEX_ABS_WIDTH
+ to take into account h boxes with negative width.
+ Solves a problem with amsmath's gather environment
+ * synctex_parser.c: enhancements in comments to better explain the code
+
+2009-12-30 Jérôme Laurens <jerome.laurens@u-bourgogne.fr>
+
+ * synctex_parser_utils.c: in the _synctex_malloc() function,
+ memset() is used unconditionally (suggested by J. Kew).
+ * synctex_parser_utils.c: in the _synctex_error() function,
+ - all 3 instances of OutputDebugString() replaced with OutputDebugStringA()
+ such that unicode is ignored (also suggested by J. Kew).
+ - _WIN32 flag replaced by SYNCTEX_RECENT_WINDOWS because older windows systems
+ may have _WIN32 defined but no OutputDebugString().
+
+2009-12-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex.c: Remove extern declaration of gettexstring(),
+ now in ../web2c/coerce.h.
+
+2009-10-07 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ synctex-e-mem.ch0 (just_reverse): Drop unused label found.
+
+2009-09-06 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex.c (synctex_suffix*): Constify strings.
+ Add #include "synctex.h" for prototypes.
+ * synctex.h (synctexabort): Add prototype.
+ * synctex_main.c (synctex_help*): Constify string params.
+ (synctex_edit_proceed): Add a prototype (was a duplicate for
+ synctex_view_proceed). Drop cast.
+ * synctex_parser_utils.[ch] (_synctex_error): Constify string
+ param.
+
+2009-09-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * am/synctex.am: Prepare compiler warnings.
+
+2009-08-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * am/synctex.am: SyncTeX now integrated into ../texmfmp.h.
+ * synctex-convert.sh (removed): Obsolete.
+
+2009-07-16 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex_main.c: re-#include "web2c/c-auto.h", needed for AIX.
+
+2009-07-13 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * am/synctex.am: remove INSTALL.
+
+2009-07-13 Jerome Laurens <jerome.laurens@u-bourgogne.fr>
+
+ No need to rebuild the binaries with these changes.
+ * INSTALL: the content has no meaning with the new building architecture, file removed.
+ * synctex_parser*: version number changed to 1.8
+ * synctex_main.c: version number updated to 1.2 (2 typos)
+
+2009-07-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * am/synctex.am: remove unused files Makefile, Makefile.in.
+
+2009-07-09 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex_main.c: make 'synctex help update' work as advertised.
+ * tests/LM-Volume-manuscript.tex: Mac -> native line ends.
+
+2009-07-08 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * am/synctex.am: distribute new files.
+ * synctex_parser_local.h: add newline at end of file.
+ * synctex_parser_readme.txt: Mac -> native line ends.
+
+2009-07-08 Jerome Laurens <jerome.laurens@u-bourgogne.fr>
+
+ Updated version.
+
+2009-03-19 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Adapt to TL2009 build system.
+
diff --git a/Build/source/texk/web2c/synctexdir/README.txt b/Build/source/texk/web2c/synctexdir/README.txt
new file mode 100644
index 00000000000..6c7df4a7544
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/README.txt
@@ -0,0 +1 @@
+The .synctex file specifications is now available as a man page with `man 5 synctex`.
diff --git a/Build/source/texk/web2c/synctexdir/ac/synctex.ac b/Build/source/texk/web2c/synctexdir/ac/synctex.ac
new file mode 100644
index 00000000000..97d5c0945be
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/ac/synctex.ac
@@ -0,0 +1,21 @@
+## texk/web2c/synctexdir/ac/synctex.ac: configure.ac fragment for the TeX Live subdirectory texk/web2c/
+dnl Copyright 2018 Karl Berry <tex-live@tug.org>
+dnl Copyright 2014, 2015 Peter Breitenlohner <tex-live@tug.org>
+dnl You may freely use, modify and/or distribute this file.
+dnl
+dnl Additional code for synctex
+dnl
+m4_define([synctex_version],
+ m4_chomp(m4_include([synctexdir/synctex_parser_api_level.txt])))
+AC_SUBST([SYNCTEXVERSION], [synctex_version])
+KPSE_LT_VERSION([synctex])
+
+AM_CONDITIONAL([SYNCTEX], [test "x$enable_synctex" != xno])
+
+dnl Building libsynctex as shared library requires a system zlib
+AS_IF([test "x$with_system_zlib" = xyes],
+ [AC_SUBST([LTLIBSYNCTEX], [libsynctex.la])],
+ [AC_SUBST([LIBSYNCTEX], [libsynctex.a])])
+
+AC_CONFIG_FILES([synctexdir/synctex.pc])
+
diff --git a/Build/source/texk/web2c/synctexdir/am/synctex.am b/Build/source/texk/web2c/synctexdir/am/synctex.am
new file mode 100644
index 00000000000..0ecc601f304
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/am/synctex.am
@@ -0,0 +1,354 @@
+## texk/web2c/synctexdir/am/synctex.am: Makefile fragment for SyncTeX.
+##
+## Copyright (C) 2009-2015 Peter Breitenlohner <tex-live@tug.org>
+## You may freely use, modify and/or distribute this file.
+
+## The SyncTeX tool
+
+if SYNCTEX
+bin_PROGRAMS += synctex
+lib_LTLIBRARIES += $(LTLIBSYNCTEX)
+lib_LIBRARIES += $(LIBSYNCTEX)
+endif SYNCTEX
+EXTRA_PROGRAMS += synctex
+EXTRA_LTLIBRARIES += libsynctex.la
+EXTRA_LIBRARIES += libsynctex.a
+
+synctex_SOURCES = \
+ synctexdir/synctex_main.c
+
+synctex_CPPFLAGS = -I$(srcdir)/synctexdir
+
+synctex_LDADD = $(libsynctex) $(ZLIB_LIBS)
+if MINGW32
+synctex_LDADD += -lshlwapi
+endif MINGW32
+
+$(synctex_OBJECTS): $(libsynctex)
+
+## The (shared or nonshared) SyncTeX parser library
+libsynctex = $(LTLIBSYNCTEX) $(LIBSYNCTEX)
+
+libsynctex_la_CPPFLAGS = -I$(srcdir)/synctexdir $(ZLIB_INCLUDES) -DSYNCTEX_USE_LOCAL_HEADER
+libsynctex_a_CPPFLAGS = $(libsynctex_la_CPPFLAGS)
+
+libsynctex_la_LDFLAGS = -rpath @libdir@ -bindir @bindir@ -no-undefined -version-info $(SYNCTEX_LT_VERSINFO)
+
+libsynctex_la_LIBADD = $(ZLIB_LIBS)
+if MINGW32
+libsynctex_la_LIBADD += -lshlwapi
+endif MINGW32
+
+libsynctex_la_SOURCES = \
+ synctexdir/synctex_parser.c \
+ synctexdir/synctex_parser_local.h \
+ synctexdir/synctex_parser_utils.c
+nodist_libsynctex_a_SOURCES = $(libsynctex_la_SOURCES)
+
+$(libsynctex_la_OBJECTS): $(ZLIB_DEPEND)
+$(libsynctex_a_OBJECTS): $(ZLIB_DEPEND)
+
+syncincludedir = ${includedir}/synctex
+
+pkgconfigdir = ${libdir}/pkgconfig
+
+if SYNCTEX
+syncinclude_HEADERS = \
+ synctexdir/synctex_parser.h \
+ synctexdir/synctex_version.h \
+ synctexdir/synctex_parser_utils.h
+
+pkgconfig_DATA = synctexdir/synctex.pc
+endif SYNCTEX
+
+dist_man_MANS += synctexdir/man1/synctex.1 synctexdir/man5/synctex.5
+
+EXTRA_DIST += \
+ synctexdir/synctex_parser_c-auto.h \
+ synctexdir/ChangeLog \
+ synctexdir/README.txt \
+ synctexdir/synctex_parser_readme.txt \
+ synctexdir/synctex_parser_version.txt \
+ synctexdir/tests
+
+## SyncTeX infrastructure: common for all engines
+
+EXTRA_DIST += \
+ synctexdir/synctex-common.h \
+ synctexdir/synctex.c \
+ synctexdir/synctex.defines \
+ synctexdir/synctex.h
+
+## SyncTeX infrastructure: TeX
+
+if TEX_SYNCTEX
+
+tex_CPPFLAGS += -I$(srcdir)/synctexdir $(ZLIB_INCLUDES)
+
+tex_LDADD += $(ZLIB_LIBS)
+tex_prereq += $(ZLIB_DEPEND)
+
+tex_ch_synctex = \
+ synctexdir/synctex-def.ch0 \
+ synctexdir/synctex-mem.ch0 \
+ synctexdir/synctex-mem.ch2 \
+ synctexdir/synctex-rec.ch0 \
+ synctexdir/synctex-rec.ch1 \
+ synctexdir/synctex-rec.ch2
+
+dist_tex_SOURCES += \
+ synctexdir/synctex.c \
+ synctexdir/synctex.h \
+ synctexdir/synctex-common.h \
+ synctexdir/synctex-tex.h
+
+tex_CPPFLAGS += -D__SyncTeX__ -DSYNCTEX_ENGINE_H=\"synctex-tex.h\"
+
+endif TEX_SYNCTEX
+
+EXTRA_DIST += \
+ synctexdir/synctex-def.ch0 \
+ synctexdir/synctex-mem.ch0 \
+ synctexdir/synctex-mem.ch2 \
+ synctexdir/synctex-rec.ch0 \
+ synctexdir/synctex-rec.ch1 \
+ synctexdir/synctex-rec.ch2
+
+## SyncTeX infrastructure: e-TeX
+
+if ETEX_SYNCTEX
+
+etex_CPPFLAGS += -I$(srcdir)/synctexdir $(ZLIB_INCLUDES)
+
+etex_LDADD += $(ZLIB_LIBS)
+etex_prereq += $(ZLIB_DEPEND)
+
+etex_ch_synctex = \
+ synctexdir/synctex-def.ch0 \
+ synctexdir/synctex-mem.ch0 \
+ synctexdir/synctex-e-mem.ch0 \
+ synctexdir/synctex-e-mem.ch1 \
+ synctexdir/synctex-rec.ch0 \
+ synctexdir/synctex-rec.ch1 \
+ synctexdir/synctex-e-rec.ch0
+
+dist_etex_SOURCES += \
+ synctexdir/synctex.c \
+ synctexdir/synctex.h \
+ synctexdir/synctex-common.h \
+ synctexdir/synctex-etex.h
+
+etex_CPPFLAGS += -D__SyncTeX__ -DSYNCTEX_ENGINE_H=\"synctex-etex.h\"
+
+endif ETEX_SYNCTEX
+
+EXTRA_DIST += \
+ synctexdir/synctex-e-mem.ch0 \
+ synctexdir/synctex-e-mem.ch1 \
+ synctexdir/synctex-e-rec.ch0
+
+## SyncTeX infrastructure: pTeX
+
+if PTEX_SYNCTEX
+
+ptex_CPPFLAGS += -I$(srcdir)/synctexdir $(ZLIB_INCLUDES)
+
+ptex_LDADD += $(ZLIB_LIBS)
+ptex_prereq += $(ZLIB_DEPEND)
+
+ptex_ch_synctex = \
+ synctexdir/synctex-def.ch0 \
+ synctexdir/synctex-p-mem.ch0 \
+ synctexdir/synctex-mem.ch0 \
+ synctexdir/synctex-p-mem.ch1 \
+ synctexdir/synctex-p-rec.ch0 \
+ synctexdir/synctex-rec.ch0 \
+ synctexdir/synctex-rec.ch1 \
+ synctexdir/synctex-rec.ch2 \
+ synctexdir/synctex-p-rec.ch1
+
+dist_ptex_SOURCES += \
+ synctexdir/synctex.c \
+ synctexdir/synctex.h \
+ synctexdir/synctex-common.h \
+ synctexdir/synctex-ptex.h
+
+ptex_CPPFLAGS += -D__SyncTeX__ -DSYNCTEX_ENGINE_H=\"synctex-ptex.h\"
+
+endif PTEX_SYNCTEX
+
+EXTRA_DIST += \
+ synctexdir/synctex-p-mem.ch0 \
+ synctexdir/synctex-p-mem.ch1 \
+ synctexdir/synctex-p-rec.ch0 \
+ synctexdir/synctex-p-rec.ch1
+
+## SyncTeX infrastructure: upTeX
+
+if UPTEX_SYNCTEX
+
+uptex_CPPFLAGS += -I$(srcdir)/synctexdir $(ZLIB_INCLUDES)
+
+uptex_LDADD += $(ZLIB_LIBS)
+uptex_prereq += $(ZLIB_DEPEND)
+
+uptex_ch_synctex = \
+ synctexdir/synctex-def.ch0 \
+ synctexdir/synctex-p-mem.ch0 \
+ synctexdir/synctex-mem.ch0 \
+ synctexdir/synctex-p-mem.ch1 \
+ synctexdir/synctex-p-rec.ch0 \
+ synctexdir/synctex-rec.ch0 \
+ synctexdir/synctex-rec.ch1 \
+ synctexdir/synctex-rec.ch2 \
+ synctexdir/synctex-p-rec.ch1
+
+dist_uptex_SOURCES += \
+ synctexdir/synctex.c \
+ synctexdir/synctex.h \
+ synctexdir/synctex-common.h \
+ synctexdir/synctex-uptex.h
+
+uptex_CPPFLAGS += -D__SyncTeX__ -DSYNCTEX_ENGINE_H=\"synctex-uptex.h\"
+
+endif UPTEX_SYNCTEX
+
+## SyncTeX infrastructure: e-pTeX
+
+if EPTEX_SYNCTEX
+
+eptex_CPPFLAGS += -I$(srcdir)/synctexdir $(ZLIB_INCLUDES)
+
+eptex_LDADD += $(ZLIB_LIBS)
+eptex_prereq += $(ZLIB_DEPEND)
+
+eptex_ch_synctex = \
+ synctexdir/synctex-def.ch0 \
+ synctexdir/synctex-ep-mem.ch0 \
+ synctexdir/synctex-mem.ch0 \
+ synctexdir/synctex-e-mem.ch0 \
+ synctexdir/synctex-ep-mem.ch1 \
+ synctexdir/synctex-p-rec.ch0 \
+ synctexdir/synctex-rec.ch0 \
+ synctexdir/synctex-rec.ch1 \
+ synctexdir/synctex-ep-rec.ch0 \
+ synctexdir/synctex-e-rec.ch0 \
+ synctexdir/synctex-p-rec.ch1
+
+dist_eptex_SOURCES += \
+ synctexdir/synctex.c \
+ synctexdir/synctex.h \
+ synctexdir/synctex-common.h \
+ synctexdir/synctex-eptex.h
+
+eptex_CPPFLAGS += -D__SyncTeX__ -DSYNCTEX_ENGINE_H=\"synctex-eptex.h\"
+
+endif EPTEX_SYNCTEX
+
+EXTRA_DIST += \
+ synctexdir/synctex-ep-mem.ch0 \
+ synctexdir/synctex-ep-mem.ch1 \
+ synctexdir/synctex-ep-rec.ch0
+
+## SyncTeX infrastructure: e-upTeX
+
+if EUPTEX_SYNCTEX
+
+euptex_CPPFLAGS += -I$(srcdir)/synctexdir $(ZLIB_INCLUDES)
+
+euptex_LDADD += $(ZLIB_LIBS)
+euptex_prereq += $(ZLIB_DEPEND)
+
+euptex_ch_synctex = \
+ synctexdir/synctex-def.ch0 \
+ synctexdir/synctex-ep-mem.ch0 \
+ synctexdir/synctex-mem.ch0 \
+ synctexdir/synctex-e-mem.ch0 \
+ synctexdir/synctex-ep-mem.ch1 \
+ synctexdir/synctex-p-rec.ch0 \
+ synctexdir/synctex-rec.ch0 \
+ synctexdir/synctex-rec.ch1 \
+ synctexdir/synctex-ep-rec.ch0 \
+ synctexdir/synctex-e-rec.ch0 \
+ synctexdir/synctex-p-rec.ch1
+
+dist_euptex_SOURCES += \
+ synctexdir/synctex.c \
+ synctexdir/synctex.h \
+ synctexdir/synctex-common.h \
+ synctexdir/synctex-euptex.h
+
+euptex_CPPFLAGS += -D__SyncTeX__ -DSYNCTEX_ENGINE_H=\"synctex-euptex.h\"
+
+endif EUPTEX_SYNCTEX
+
+## SyncTeX infrastructure: pdfTeX
+
+if PDFTEX_SYNCTEX
+
+pdftex_CPPFLAGS += -I$(srcdir)/synctexdir
+
+pdftex_ch_synctex = \
+ synctexdir/synctex-def.ch0 \
+ synctexdir/synctex-mem.ch0 \
+ synctexdir/synctex-e-mem.ch0 \
+ synctexdir/synctex-e-mem.ch1 \
+ synctexdir/synctex-rec.ch0 \
+ synctexdir/synctex-rec.ch1 \
+ synctexdir/synctex-e-rec.ch0 \
+ synctexdir/synctex-pdf-rec.ch2
+
+dist_pdftex_SOURCES += \
+ synctexdir/synctex.c \
+ synctexdir/synctex.h \
+ synctexdir/synctex-common.h \
+ synctexdir/synctex-pdftex.h
+
+pdftex_CPPFLAGS += -D__SyncTeX__ -DSYNCTEX_ENGINE_H=\"synctex-pdftex.h\"
+
+endif PDFTEX_SYNCTEX
+
+EXTRA_DIST += \
+ synctexdir/synctex-pdf-rec.ch2
+
+## SyncTeX infrastructure: XeTeX
+
+if XETEX_SYNCTEX
+
+xetex_CPPFLAGS += -I$(srcdir)/synctexdir
+
+xetex_ch_synctex = \
+ synctexdir/synctex-xe-def.ch0 \
+ synctexdir/synctex-mem.ch0 \
+ synctexdir/synctex-e-mem.ch0 \
+ synctexdir/synctex-e-mem.ch1 \
+ synctexdir/synctex-rec.ch0 \
+ synctexdir/synctex-e-rec.ch0
+
+xetex_post_ch_synctex = \
+ synctexdir/synctex-xe-rec.ch3
+
+dist_xetex_SOURCES += \
+ synctexdir/synctex.c \
+ synctexdir/synctex.h \
+ synctexdir/synctex-common.h \
+ synctexdir/synctex-xetex.h
+
+xetex_CPPFLAGS += -D__SyncTeX__ -DSYNCTEX_ENGINE_H=\"synctex-xetex.h\"
+
+endif XETEX_SYNCTEX
+
+EXTRA_DIST += \
+ synctexdir/synctex-xe-rec.ch3
+
+# SyncTeX Tests
+#
+synctex_tests = synctexdir/synctex.test
+synctexdir/synctex.log: synctex$(EXEEXT)
+
+EXTRA_DIST += $(synctex_tests)
+
+if SYNCTEX
+TESTS += $(synctex_tests)
+endif SYNCTEX
+
diff --git a/Build/source/texk/web2c/synctexdir/man1/synctex.1 b/Build/source/texk/web2c/synctexdir/man1/synctex.1
new file mode 100644
index 00000000000..2fc6d747e9d
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/man1/synctex.1
@@ -0,0 +1,53 @@
+.Dd 06/13/2018 \" DATE
+.Dt synctex 1 \" Program name and manual section number
+.Sh NAME
+.Nm synctex
+.Nd command line client tool to support the Synchronize TeXnology available in most TeX engines.
+.Sh SYNOPSIS
+.Nm
+\fIcommand\fP [\fIoptions\fP] [\fIargs\fP]
+.Sh OVERVIEW
+The Synchronization TeXnology is a feature of recent TeX engines.
+It allows to synchronize between input and output,
+which means to navigate from the source document to the typeset material
+and vice versa.
+.Pp
+Run `synctex help' to access the built-in tool documentation.
+.Sh TEX ENGINE OPTION -synctex=NUMBER
+.Bl -bullet
+.It
+If NUMBER=0 or no option is given, no synctex file is created.
+.It
+If NUMBER<0, synctex files are text files.
+.It
+If NUMBER>0, synctex files are compressed with gz.
+.It
+If NUMBER&2, no .gz extension is used.
+.It
+If NUMBER&4, activate form support, useful for pdftex.
+.It
+If NUMBER&8, better file compression.
+.El
+.Pp
+Use for example `pdftex -synctex=15 foo.tex' to activate all the options.
+.Pp
+Notice that LuaTeX option is `--synctex=NUMBER' with two dashes.
+.Sh SEE ALSO
+.\" List links in ascending order by section, alphabetically within a section.
+.\" Please do not reference files that do not exist without filing a bug report
+.Xr synctex 5
+.Xr tex 1
+.Sh AUTHOR
+The Synchronize TeXnology is essentially due to Jerome Laurens,
+with useful suggestions by some well known actors of the TeX world.
+.\" .Sh BUGS \" Document known, unremedied bugs
+.Sh HISTORY \" Document history if command behaves in a unique manner
+Revised on Sun Apr 23 09:54:20 UTC 2017.
+.\" nroff -man synctex.1 | less
+.\"groff -man -Tascii synctex.1 | less
+.\"To convert a man page to plain pre-formatted text (e.g for spell checking) use:
+.\"nroff -man synctex.1 | col -b > synctex.1.txt
+.\"To convert it to Postscript (for printing or further conversion to pdf) use:
+.\"groff -man -Tps synctex.1 > synctex.1.ps
+.\"To convert the man page to html use:
+.\"man2html synctex.1
diff --git a/Build/source/texk/web2c/synctexdir/man5/synctex.5 b/Build/source/texk/web2c/synctexdir/man5/synctex.5
new file mode 100644
index 00000000000..4ec12f39ef3
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/man5/synctex.5
@@ -0,0 +1,374 @@
+.Dd Jan 17, 2018
+.Dt SYNCTEX 5
+.Os "Independent"
+.\"
+.\"
+.Sh NAME
+.Nm synctex
+.Nd Synchronize TeXnology help file
+.\"
+.\"
+.Sh DESCRIPTION
+Synchronize TeXnology help file
+.Pq synctexs
+are text files that help input/output synchronization during document preparation with the TeX typesetting system.
+.Sh BASICS
+The structure of this file should not be considered public, in the sense that no one should need to parse its contents, except the synctex command line utility, and the synctex_parser library which are both publicly available. Unless it is absolutely not avoidable, access to the contents of the synctex file should only be made through requests made to the synctex command line utility.
+.\"
+.Sh STRUCTURE
+The element structure of a synctex file is a list of text line records as follows.
+.Sq \&* ,
+.Sq \&+ ,
+and
+.Sq \&?
+have their usual EBNF meanings:
+.Sq \&*
+means zero or more,
+.Sq \&+
+means one or more, and
+.Sq \&?
+means zero or one
+.Pq i.e., optional .
+.Pp
+.Bl -item -offset indent
+.\"
+.It
+.Li <SyncTeX> ::=
+.Pq The whole contents in 4 sections
+.Bl -item -offset indent
+.It
+.Li <Preamble>
+.It
+.Li <Content>
+.It
+.Li <Postamble>
+.It
+.Li <Post Scriptum>
+.El
+.\"
+.El
+.Pp
+Each section starts with the first occurrence of a sectioning line, and ends with the next section, if any.
+In the following definitions, we do not mention the section ending condition.
+.Sh The preamble
+.Bl -item -offset indent
+.\"
+.It
+.Li <Preamble> ::=
+.Bl -item -offset indent
+.It
+.Qq SyncTeX Version:
+<Version Number> <EOL>
+.It
+.Li <Input Line>*
+.It
+.Qq Magnification:
+<TeX magnification> <EOL>
+.It
+.Qq Unit:
+<unit in scaled point> <EOL>
+.It
+.Qq X Offset:
+<horizontal offset in scaled point> <EOL>
+.It
+.Qq Y Offset:
+<vertical offset in scaled point> <EOL>
+.El
+.It
+.Li <Input Line> ::=
+.Qq Input:
+<tag>
+.Qq \&:
+<File Name> <EOL>
+.\"
+.El
+.Sh The content
+.Bl -item -offset indent
+.It
+.Li <Content> ::=
+.Bl -item -offset indent
+.It
+.Li <byte offset record>
+.It
+.Qq Content:
+<EOL>
+.It
+.Li (<Form(k)>|<Input Line>)*
+.It
+.Li <sheet(1)>
+.It
+.Li (<Form(k)>|<Input Line>)*
+.It
+.Li <sheet(2)>
+.It
+.Li (<Form(k)>|<Input Line>)*
+.It
+.Li ...
+.It
+.Li <sheet(N)>
+.It
+.Li (<Form(k)>|<Input Line>)*
+.El
+.It
+.Li <byte offset record> ::=
+.Qq \&!
+<byte offset> <end of record>
+.Pp
+.El
+.Pp
+.Bl -item -offset indent
+.It
+.Li <sheet(n)> ::=
+.Bl -item -offset indent
+.It
+.Li <byte offset record>
+.It
+.Qq \&{
+<the integer n> <end of record>
+.It
+.Li <vbox section>|<hbox section>
+.It
+.Li <byte offset record>
+.It
+.Qq \&}
+<the integer n> <end of record>
+.El
+.It
+.Li <Form> ::=
+.Bl -item -offset indent
+.It
+.Li <byte offset record>
+.It
+.Qq \&<
+<form tag> <end of record>
+.It
+.Li <vbox section>|<hbox section>
+.It
+.Li <byte offset record>
+.It
+.Qq \&>
+<end of record>
+.El
+.It
+.Li <form tag> ::= <integer>
+.El
+.Pp
+Forms are available with pdfTeX.
+All the numbers are integers encoded using the decimal representation with "C" locale.
+The <box content> describes what is inside a box.
+It is either a vertical or horizontal box,
+with some records related to glue, kern or math nodes.
+.Bl -item -offset indent
+.It
+.Li <box content> ::=
+.Bl -item -offset indent
+.It
+.Li <vbox section>|<hbox section>
+.It
+.Li |<void vbox record>|<void hbox record>
+.It
+.Li |<current record>|<glue record>|<kern record>
+.It
+.Li |<math record>|<form ref record>|<Form>
+.El
+.It
+.Li <vbox section> ::=
+.Bl -item -offset indent
+.It
+.Qq \&[
+<link>
+.Qq \&:
+<point>
+.Qq \&:
+<size> <end of record>
+.It
+.Li <box content>*
+.It
+.Qq \&]
+<end of record>
+.El
+.It
+.Li <hbox section> ::=
+.Bl -item -offset indent
+.It
+.Li \&(
+<link>
+.Qq \&:
+<point>
+.Qq \&:
+<size> <end of record>
+.It
+.Li <box content>*
+.It
+.Qq \&)
+<end of record>
+.El
+.El
+.Pp
+Void boxes:
+.Bl -item -offset indent
+.It
+.Li <void vbox record> ::=
+.Qq v
+<link>
+.Qq \&:
+<point>
+.Qq \&:
+<size> <end of record>
+.It
+.Li <void hbox record> ::=
+.Qq h
+<link>
+.Qq \&:
+<point>
+.Qq \&:
+<size> <end of record>
+.It
+.Li <link> ::= <tag>
+.Qq \&,
+<line>(
+.Qq \&,
+<column>)?
+.It
+.Li <point> ::= <full point>|<compressed point>
+.It
+.Li <full point> ::=
+<integer>
+.Qq \&,
+<integer>
+.It
+.Li <compressed point> ::=
+<integer>
+.Qq \&,=
+.It
+.Li <line> ::= <integer>
+.It
+.Li <column> ::= <integer>
+.It
+.Li <size> ::= <Width>
+.Qq \&,
+<Height>
+.Qq \&,
+<Depth>
+.It
+.Li <Width> ::= <integer>
+.It
+.Li <Height> ::= <integer>
+.It
+.Li <Depth> ::= <integer>
+.El
+.Pp
+The forthcoming records are basic one liners.
+.Bl -item -offset indent
+.It
+.Li <current record> ::=
+.Qq x
+<link>
+.Qq \&:
+<point> <end of record>
+.It
+.Li <kern record> ::=
+.Qq k
+<link>
+.Qq \&:
+<point>
+.Qq \&:
+<Width> <end of record>
+.It
+.Li <glue record> ::=
+.Qq g
+<link>
+.Qq \&:
+<point> <end of record>
+.It
+.Li <math record> ::=
+.Qq $
+<link>
+.Qq \&:
+<point> <end of record>
+.It
+.Li <form ref record> ::=
+.Qq f
+<form tag>
+.Qq \&:
+<point> <end of record>
+.El
+.Pp
+.\" .Sx underline, .Dq double quotes, .Pq enclosed in parenthesis
+.Sh The postamble
+The postamble closes the file
+If there is no postamble, it means that the typesetting process did not end correctly.
+.Bl -item -offset indent
+.\"
+.It
+.Li <Postamble>::=
+.Bl -item -offset indent
+.It
+.Li <byte offset record>
+.It
+.Qq Count:
+<Number of records> <EOL>
+.El
+.El
+.Sh The post scriptum
+The post scriptum contains material possibly added by 3rd parties.
+It allows to append some transformation (shift and magnify).
+Typically, one applies a dvi to pdf filter with offset options and magnification,
+then he appends the same options to the synctex file, for example
+.Bd -literal -offset indent
+synctex update -o foo.pdf -m 0.486 -x 9472573sp -y 13.3dd source.dvi
+.Ed
+.Bl -item -offset indent
+.\"
+.It
+.Li <Post Scriptum>::=
+.\"
+.Bl -item -offset indent
+.It
+.Li <byte offset record>
+.It
+.Qq Post Scriptum:
+<EOL>
+.It
+.Qq Magnification:
+<number> <EOL>
+.Pq Set additional magnification
+.It
+.Qq X Offset:
+<dimension> <EOL>
+.Pq Set horizontal offset
+.It
+.Qq Y Offset:
+<dimension> <EOL>
+.Pq Set vertical offset
+.El
+.El
+This second information will override the offset and magnification previously available in the preamble section.
+All the numbers are encoded using the decimal representation with "C" locale.
+.Sh USAGE
+.Pp
+The <current record> is used to compute the visible size of hbox's.
+The byte offset is an implicit anchor to navigate the synctex file from sheet to sheet. The second coordinate of
+a compressed point has been replaced by a
+.Qq =
+character which means that it is the second coordinate of the
+last full point available above.
+.Sh SEE ALSO
+.\" List links in ascending order by section, alphabetically within a section.
+.\" Please do not reference files that do not exist without filing a bug report
+.Xr synctex 1
+.Xr tex 1
+.Sh AUTHOR
+The Synchronize TeXnology is essentially due to Jerome Laurens,
+with useful suggestions by some well known actors of the TeX world.
+.\" .Sh BUGS \" Document known, unremedied bugs
+.Sh HISTORY \" Document history if command behaves in a unique manner
+This document has been updated on Sat Apr 22 09:57:20 UTC 2017 to include \\pdfxform support.
+.\" nroff -man synctex.5 | less
+.\"groff -man -Tascii synctex.5 | less
+.\"To convert a man page to plain pre-formatted text (e.g. for spell checking) use:
+.\"nroff -man synctex.5 | col -b > synctex.5.txt
+.\"To convert it to PostScript (for printing or further conversion to pdf) use:
+.\"groff -man -Tps synctex.5 > synctex.5.ps
+.\"To convert the man page to html use:
+.\"man2html synctex.5
diff --git a/Build/source/texk/web2c/synctexdir/synctex-common.h b/Build/source/texk/web2c/synctexdir/synctex-common.h
new file mode 100644
index 00000000000..41057363d4c
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-common.h
@@ -0,0 +1,51 @@
+/* synctex-common.h
+
+This file is part of the SyncTeX package.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Version 1
+Latest Revision: Wed Jul 1 08:07:50 UTC 2009
+
+*/
+
+# ifndef __SYNCTEX_COMMON_HEADER__
+# define __SYNCTEX_COMMON_HEADER__
+
+/* Send this message to init the synctex command value to the command line option.
+ * Sending this message too early will cause a bus error. */
+extern void synctexinitcommand(void);
+
+/* Send this message to clean memory, and close the file. */
+extern void synctexterminate(int log_opened);
+
+# endif
diff --git a/Build/source/texk/web2c/synctexdir/synctex-def.ch0 b/Build/source/texk/web2c/synctexdir/synctex-def.ch0
new file mode 100644
index 00000000000..7b9828dfbc7
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-def.ch0
@@ -0,0 +1,63 @@
+Copyright (c) 2013 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Latest Revision: Wed Jul 1 11:16:57 UTC 2009
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Version 1
+Thu Jun 19 09:39:21 UTC 2008
+
+Notice:
+-------
+This file contains TeX changes for synctex support.
+It defines the SyncTeX fields for TeX like engines.
+It must apply first
+
+@x tex.web l.2897
+@d hlist_node=0 {|type| of hlist nodes}
+@y
+@d synctex_field_size=2 {Declare the {\sl Sync\TeX} field size to store the {\sl Sync\TeX} information:
+ 2 integers for file tag and line}
+@d sync_tag(#) == mem[#-synctex_field_size].int {The tag subfield}
+@d sync_line(#) == mem[#-synctex_field_size+1].int {The line subfield}
+@#
+@d hlist_node=0 {|type| of hlist nodes}
+@z
diff --git a/Build/source/texk/web2c/synctexdir/synctex-e-mem.ch0 b/Build/source/texk/web2c/synctexdir/synctex-e-mem.ch0
new file mode 100644
index 00000000000..25a8e17db70
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-e-mem.ch0
@@ -0,0 +1,165 @@
+Copyright (c) 2008, 2009 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Latest Revision: Wed Jul 1 11:17:16 UTC 2009
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Version 1
+Thu Jun 19 09:39:21 UTC 2008
+
+Notice:
+-------
+This file contains TeX changes for core synctex support.
+It is missing some implementation details that are deferred to either
+sync-pdftex.ch or sync-xetex.ch
+synctex.ch is based on tex.web after the eTeX changes have been applied.
+So it might not apply as is to pdftex.web due to some typographical changes.
+In the building process, one may have to apply some suitable tex.ch0 first.
+See pdftexdir for details.
+
+@x etex.ch l.3976
+@<Reverse an hlist segment...@>=
+begin save_h:=cur_h; temp_ptr:=link(p); rule_wd:=width(p);
+free_node(p,small_node_size);
+@y
+@<Reverse an hlist segment...@>=
+begin save_h:=cur_h; temp_ptr:=link(p); rule_wd:=width(p);
+free_node(p,medium_node_size); {{\sl Sync\TeX}: p is a |math_node|}
+@z
+
+@x etex.ch l.4036
+if type(p)=kern_node then if (rule_wd=0)or(l=null) then
+ begin free_node(p,small_node_size); p:=l;
+ end;
+@y
+if type(p)=kern_node then if (rule_wd=0)or(l=null) then
+ begin free_node(p,medium_node_size); p:=l;
+ end;
+@z
+
+@x etex.ch l.4088
+@<Finish the reversed...@>=
+begin free_node(p,small_node_size);
+link(t):=q; width(t):=rule_wd; edge_dist(t):=-cur_h-rule_wd; goto done;
+end
+@y
+@<Finish the reversed...@>=
+begin free_node(p,medium_node_size); {{\sl Sync\TeX}: p is a |kern_node|}
+link(t):=q; width(t):=rule_wd; edge_dist(t):=-cur_h-rule_wd; goto done;
+end
+@z
+
+@x etex.ch l.4137
+ kern_node,math_node: begin r:=get_node(small_node_size);
+ words:=small_node_size;
+ end;
+ glue_node: begin r:=get_node(small_node_size); add_glue_ref(glue_ptr(p));
+ glue_ptr(r):=glue_ptr(p); leader_ptr(r):=null;
+ end;
+@y
+ kern_node,math_node: begin
+ words:=medium_node_size; {{\sl Sync\TeX}: proper size for math and kern}
+ r:=get_node(words);
+ end;
+ glue_node: begin r:=get_node(medium_node_size); add_glue_ref(glue_ptr(p));
+ {{\sl Sync\TeX}: proper size for glue}
+ glue_ptr(r):=glue_ptr(p); leader_ptr(r):=null;
+ end;
+@z
+
+@x etex.ch l.4211 - Drop unused label
+procedure just_reverse(@!p:pointer);
+label found,done;
+@y
+procedure just_reverse(@!p:pointer);
+label done;
+@z
+
+@x etex.ch l.4234
+found:width(t):=width(p); link(t):=q; free_node(p,small_node_size);
+@y
+width(t):=width(p); link(t):=q; free_node(p,small_node_size);
+@z
+
+@x etex.ch l.4241
+ begin type(p):=kern_node; incr(LR_problems);
+ end
+ else begin pop_LR;
+ if n>min_halfword then
+ begin decr(n); decr(subtype(p)); {change |after| into |before|}
+ end
+ else begin if m>min_halfword then decr(m)@+else goto found;
+ type(p):=kern_node;
+ end;
+ end
+else begin push_LR(p);
+ if (n>min_halfword)or(LR_dir(p)<>cur_dir) then
+ begin incr(n); incr(subtype(p)); {change |before| into |after|}
+ end
+ else begin type(p):=kern_node; incr(m);
+ end;
+ end
+@y
+ begin type(p):=kern_node; incr(LR_problems);
+ {{\sl Sync\TeX} node size watch point: |math_node| size == |kern_node| size}
+ end
+ else begin pop_LR;
+ if n>min_halfword then
+ begin decr(n); decr(subtype(p)); {change |after| into |before|}
+ end
+ else begin if m>min_halfword then decr(m)@+else begin
+ width(t):=width(p); link(t):=q; free_node(p,medium_node_size);
+{{\sl Sync\TeX}: no more "goto found", and proper node size}
+ goto done;
+ end;
+ type(p):=kern_node;
+ {{\sl Sync\TeX} node size watch point: |math_node| size == |kern_node| size}
+ end;
+ end
+else begin push_LR(p);
+ if (n>min_halfword)or(LR_dir(p)<>cur_dir) then
+ begin incr(n); incr(subtype(p)); {change |before| into |after|}
+ end
+ else begin type(p):=kern_node; incr(m);
+ {{\sl Sync\TeX} node size watch point: |math_node| size == |kern_node| size}
+ end;
+ end
+@z
diff --git a/Build/source/texk/web2c/synctexdir/synctex-e-mem.ch1 b/Build/source/texk/web2c/synctexdir/synctex-e-mem.ch1
new file mode 100644
index 00000000000..159f74d4ab5
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-e-mem.ch1
@@ -0,0 +1,68 @@
+Copyright (c) 2008, 2009 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Latest Revision: Wed Jul 1 11:17:23 UTC 2009
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Version 1
+Thu Jun 19 09:39:21 UTC 2008
+
+Notice:
+-------
+This file contains TeX changes for core synctex support.
+It is missing some implementation details that are deferred to either
+sync-pdftex.ch or sync-xetex.ch
+synctex.ch is based on tex.web after the eTeX changes have been applied.
+So it might not apply as is to pdftex.web due to some typographical changes.
+In the building process, one may have to apply some suitable tex.ch0 first.
+See pdftexdir for details.
+
+@x synctex-mem.ch0 l.147
+@d REMOVE ME IF synctex_code is properly defined
+@y
+@z
+
+@x etex.ch l.514
+@d int_pars=etex_int_pars {total number of integer parameters}
+@y
+@d synctex_code=etex_int_pars
+@d int_pars=synctex_code+1 {total number of integer parameters}
+@z
diff --git a/Build/source/texk/web2c/synctexdir/synctex-e-rec.ch0 b/Build/source/texk/web2c/synctexdir/synctex-e-rec.ch0
new file mode 100644
index 00000000000..1ff6f1ae953
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-e-rec.ch0
@@ -0,0 +1,140 @@
+Copyright (c) 2008-2011 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Latest Revision: Wed Jul 1 11:17:29 UTC 2009
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Version 1
+Thu Jun 19 09:39:21 UTC 2008
+
+Notice:
+-------
+Description forthcoming
+
+@x srcdir/etex.ch l.536
+@/@<Cases for |print_param|@>@/
+othercases print("[unknown integer parameter!]")
+@y
+@/@<synctex case for |print_param|@>@/
+@/@<Cases for |print_param|@>@/
+othercases print("[unknown integer parameter!]")
+@z
+
+@x etex.ch l.1568
+kern_node:cur_h:=cur_h+width(p);
+math_node: @<Handle a math node in |hlist_out|@>;
+@y
+kern_node: begin
+ @<Record |kern_node| {\sl Sync\TeX} information@>;
+ cur_h:=cur_h+width(p);
+end;
+math_node: begin
+ @<Record |math_node| {\sl Sync\TeX} information@>;
+ @<Handle a math node in |hlist_out|@>;
+end;
+@z
+
+@x etex.ch l.3965
+@<Reverse the complete hlist...@>=
+begin save_h:=cur_h; temp_ptr:=p; p:=new_kern(0); link(prev_p):=p;
+@y
+@<Reverse the complete hlist...@>=
+begin save_h:=cur_h; temp_ptr:=p; p:=new_kern(0);
+sync_tag(p+medium_node_size):=0; {{\sl Sync\TeX}: do nothing, it is too late}
+link(prev_p):=p;
+@z
+
+@x etex.ch l.4186
+ hlist_node,vlist_node: begin r:=get_node(box_node_size);
+@y
+ hlist_node,vlist_node: begin r:=get_node(box_node_size);
+ @<Copy the box {\sl Sync\TeX} information@>;
+@z
+
+@x synctex-e-mem.ch0 l.100
+ glue_node: begin r:=get_node(medium_node_size); add_glue_ref(glue_ptr(p));
+ {{\sl Sync\TeX}: proper size for glue}
+ glue_ptr(r):=glue_ptr(p); leader_ptr(r):=null;
+ end;
+@y
+ glue_node: begin r:=get_node(medium_node_size); add_glue_ref(glue_ptr(p));
+ {{\sl Sync\TeX}: proper size for glue}
+ @<Copy the medium sized node {\sl Sync\TeX} information@>;
+ glue_ptr(r):=glue_ptr(p); leader_ptr(r):=null;
+ end;
+@z
+
+@x etex.ch l.4459
+ name:=19; print("( "); incr(open_parens); update_terminal;
+ end
+else name:=18
+@y
+ name:=19; print("( "); incr(open_parens); update_terminal;
+ end
+else begin
+ name:=18;
+ @<Prepare pseudo file {\sl Sync\TeX} information@>;
+end
+@z
+
+@x synctex-mem.ch0 l.236
+@ @<Put each...@>=
+primitive("synctex",assign_int,int_base+synctex_code);@/
+@!@:synctex_}{\.{\\synctex} primitive@>
+@y
+@ @<Put each...@>=
+primitive("synctex",assign_int,int_base+synctex_code);@/
+@!@:synctex_}{\.{\\synctex} primitive@>
+
+@ @<synctex case for |print_param|@>=
+synctex_code: print_esc("synctex");
+@z
+
+@x synctex-rec.ch0 l.267
+@ @<Prepare terminal input {\sl Sync\TeX} information@>=
+synctex_tag:=0;
+@y
+@ @<Prepare terminal input {\sl Sync\TeX} information@>=
+synctex_tag:=0;
+
+@ @<Prepare pseudo file {\sl Sync\TeX} information@>=
+synctex_tag:=0;
+@z
diff --git a/Build/source/texk/web2c/synctexdir/synctex-ep-mem.ch0 b/Build/source/texk/web2c/synctexdir/synctex-ep-mem.ch0
new file mode 100644
index 00000000000..aea5c142b85
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-ep-mem.ch0
@@ -0,0 +1,25 @@
+@x tex.web l.2897
+@d box_node_size=8 {number of words to allocate for a box node}
+@y
+@d box_node_size=7 {number of words to allocate for a box node}
+@z
+
+@x tex.web l.3937
+ disp_node,
+@y
+ disp_node: do_nothing;
+@z
+
+@x tex.web l.4021:
+disp_node,
+@y
+disp_node: begin r:=get_node(small_node_size);
+ words:=small_node_size;
+ end;
+@z
+
+@x tex.web l. 24956
+@* \[54/\pTeX] System-dependent changes for \pTeX.
+@y
+@* \[54] System-dependent changes.
+@z
diff --git a/Build/source/texk/web2c/synctexdir/synctex-ep-mem.ch1 b/Build/source/texk/web2c/synctexdir/synctex-ep-mem.ch1
new file mode 100644
index 00000000000..e05a29c5130
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-ep-mem.ch1
@@ -0,0 +1,23 @@
+@x tex.web l.2897
+@d box_node_size=7+synctex_field_size {number of words to allocate for a box node}
+@y
+@d box_node_size=8+synctex_field_size {number of words to allocate for a box node}
+@z
+
+@x tex.web l.4912 + synctex-mem.ch0
+@d REMOVE ME IF synctex_code is properly defined
+@y
+@z
+
+@x tex.web l.4960 + tex.ch
+@d etex_int_base=web2c_int_pars {base for \eTeX's integer parameters}
+@y
+@d synctex_code=web2c_int_pars
+@d etex_int_base=synctex_code+1 {base for \eTeX's integer parameters}
+@z
+
+@x tex.web l. 24956
+@* \[54] System-dependent changes.
+@y
+@* \[54/\pTeX] System-dependent changes for \pTeX.
+@z
diff --git a/Build/source/texk/web2c/synctexdir/synctex-ep-rec.ch0 b/Build/source/texk/web2c/synctexdir/synctex-ep-rec.ch0
new file mode 100644
index 00000000000..61444b9214b
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-ep-rec.ch0
@@ -0,0 +1,13 @@
+@x srcdir/etex.ch l.536
+@/@<synctex case for |print_param|@>@/
+othercases print("[unknown integer parameter!]")
+@y
+othercases print("[unknown integer parameter!]")
+@z
+
+@x
+@ @<synctex case for |print_param|@>=
+synctex_code: print_esc("synctex");
+
+@y
+@z
diff --git a/Build/source/texk/web2c/synctexdir/synctex-eptex.h b/Build/source/texk/web2c/synctexdir/synctex-eptex.h
new file mode 100644
index 00000000000..dbc9c872798
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-eptex.h
@@ -0,0 +1,57 @@
+/*
+Copyright (c) 2011 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Latest Revision: Wed Jun 30 11:00:00 UTC 2011
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Version 1
+Thu Jun 30 11:00:00 UTC 2011
+
+*/
+
+#include "eptexd.h"
+
+#define box_node_size (8+synchronization_field_size)
+
+#define rule_node 3
+#define glue_node 12
+#define kern_node 13
diff --git a/Build/source/texk/web2c/synctexdir/synctex-etex.h b/Build/source/texk/web2c/synctexdir/synctex-etex.h
new file mode 100644
index 00000000000..faca1be7a2d
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-etex.h
@@ -0,0 +1,51 @@
+/*
+Copyright (c) 2008, 2009 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Latest Revision: Wed Jul 1 11:16:46 UTC 2009
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Version 1
+Thu Jun 19 09:39:21 UTC 2008
+
+*/
+
+#include "etexd.h"
diff --git a/Build/source/texk/web2c/synctexdir/synctex-euptex.h b/Build/source/texk/web2c/synctexdir/synctex-euptex.h
new file mode 100644
index 00000000000..a1a9e1c712d
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-euptex.h
@@ -0,0 +1,57 @@
+/*
+Copyright (c) 2011 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Latest Revision: Wed Jun 30 11:00:00 UTC 2011
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Version 1
+Thu Jun 30 11:00:00 UTC 2011
+
+*/
+
+#include "euptexd.h"
+
+#define box_node_size (8+synchronization_field_size)
+
+#define rule_node 3
+#define glue_node 12
+#define kern_node 13
diff --git a/Build/source/texk/web2c/synctexdir/synctex-luatex.h b/Build/source/texk/web2c/synctexdir/synctex-luatex.h
new file mode 100644
index 00000000000..6142bcc99d5
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-luatex.h
@@ -0,0 +1,87 @@
+/* synctex-luatex.h
+
+ Copyright (c) 2010, 2011 Taco Hoekwater <taco@luatex.org>
+
+ This file is part of LuaTeX.
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+*/
+
+/* $Id: synctex-luatex.h 4064 2011-01-12 22:12:22Z hhenkel $ */
+
+# define synchronization_field_size 1
+
+#define SYNCTEX_TAG_MODEL(NODE,TYPE)\
+ vinfo(NODE+TYPE##_node_size-synchronization_field_size)
+#define SYNCTEX_LINE_MODEL(NODE,TYPE)\
+ vlink(NODE+TYPE##_node_size-synchronization_field_size)
+
+#define SYNCTEX_TYPE(NODE) type(NODE)
+#define SYNCTEX_SUBTYPE(NODE) subtype(NODE)
+#define SYNCTEX_WIDTH(NODE) width(NODE)
+#define SYNCTEX_DEPTH(NODE) depth(NODE)
+#define SYNCTEX_HEIGHT(NODE) height(NODE)
+#define SYNCTEX_VALUE int_par(synctex_code)
+
+#define SYNCTEX_CURVV (dimen_par(page_height_code)-static_pdf->posstruct->pos.v)
+#define SYNCTEX_CURHH static_pdf->posstruct->pos.h
+
+#define SYNCTEX_CURV (static_pdf->o_mode==OMODE_PDF?SYNCTEX_CURVV:SYNCTEX_CURVV-4736287)
+#define SYNCTEX_CURH (static_pdf->o_mode==OMODE_PDF?SYNCTEX_CURHH:SYNCTEX_CURHH-4736287)
+
+#define SYNCTEX_GET_JOB_NAME() makecstring(job_name)
+#define SYNCTEX_GET_LOG_NAME() get_full_log_name()
+
+#define SYNCTEX_RULE_WD width(p)
+#define SYNCTEX_RULE_HT height(p)
+#define SYNCTEX_RULE_DP depth(p)
+
+#define SYNCTEX_CURRENT_TAG (cur_input.synctex_tag_field)
+#define SYNCTEX_GET_CURRENT_NAME() luatex_synctex_get_current_name()
+#define SYNCTEX_GET_TOTAL_PAGES() (total_pages)
+
+#include "ptexlib.h"
+
+/* We observe static_pdf->o_mode in order to determine whether output mode is
+ * pdf or dvi.
+ * We will assume that pdf->o_mode is set before entering
+ * the synctex_sheet function below. */
+#define SYNCTEX_OFFSET_IS_PDF (static_pdf->o_mode==OMODE_PDF)
+#define SYNCTEX_OUTPUT ((static_pdf->o_mode==OMODE_PDF)?"pdf":"dvi")
+
+#define __SyncTeX__ 1
+#define SYNCTEX_DO_NOT_LOG_OUTPUT_DIRECTORY 1
+
+/* New LuaTeX (0.87.0) or later */
+#define glue_node 12
+#define kern_node 13
+
+# define SYNCTEX_PRE_NL ""
+# define SYNCTEX_POST_NL "\n"
diff --git a/Build/source/texk/web2c/synctexdir/synctex-mem.ch0 b/Build/source/texk/web2c/synctexdir/synctex-mem.ch0
new file mode 100644
index 00000000000..02eb659d651
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-mem.ch0
@@ -0,0 +1,307 @@
+Copyright (c) 2008, 2009 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Latest Revision: Wed Jul 1 11:17:37 UTC 2009
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Notice:
+-------
+
+- Fixing the bug pointed out by Hahn The Thanh during the discussion started by Reinhard Kotucha at
+ http://www.ntg.nl/pipermail/ntg-pdftex/2009-May/003786.html.
+
+The |synctex_field_size| depends on the TeX implementation.
+pdfTeX uses 2 additional words whereas XeTeX will only use one,
+because it naturally has bigger words of memory.
+@x tex.web l.2898
+@d box_node_size=7 {number of words to allocate for a box node}
+@y
+@d box_node_size=7+synctex_field_size {number of words to allocate for a box node}
+@z
+
+@x tex.web l.2944
+@d rule_node_size=4 {number of words to allocate for a rule node}
+@y
+@d rule_node_size=4+synctex_field_size {number of words to allocate for a rule node}
+@z
+
+@x tex.web l.2985
+@d small_node_size=2 {number of words to allocate for most node types}
+@y
+@d small_node_size=2 {number of words to allocate for most node types}
+@d medium_node_size=small_node_size+synctex_field_size {number of words to
+ allocate for synchronized node types like math, kern, glue and penalty nodes}
+@z
+
+@x tex.web l.3090
+@p function new_math(@!w:scaled;@!s:small_number):pointer;
+@y
+@p function new_math(@!w:scaled;@!s:small_number):pointer;
+@z
+
+@x
+begin p:=get_node(small_node_size); type(p):=math_node;
+@y
+begin p:=get_node(medium_node_size); type(p):=math_node;
+@z
+
+@x tex.web l.3185
+@p function new_param_glue(@!n:small_number):pointer;
+@y
+@p function new_param_glue(@!n:small_number):pointer;
+@z
+
+@x
+begin p:=get_node(small_node_size); type(p):=glue_node; subtype(p):=n+1;
+@y
+begin p:=get_node(medium_node_size); type(p):=glue_node; subtype(p):=n+1;
+@z
+
+@x tex.web l.3198
+@p function new_glue(@!q:pointer):pointer;
+@y
+@p function new_glue(@!q:pointer):pointer;
+@z
+
+@x
+begin p:=get_node(small_node_size); type(p):=glue_node; subtype(p):=normal;
+@y
+begin p:=get_node(medium_node_size); type(p):=glue_node; subtype(p):=normal;
+@z
+
+
+@x tex.web l.3236
+@p function new_kern(@!w:scaled):pointer;
+@y
+@p function new_kern(@!w:scaled):pointer;
+@z
+
+@x
+begin p:=get_node(small_node_size); type(p):=kern_node;
+@y
+begin p:=get_node(medium_node_size); type(p):=kern_node;
+@z
+
+@x tex.web l.3259
+@p function new_penalty(@!m:integer):pointer;
+@y
+@p function new_penalty(@!m:integer):pointer;
+@z
+
+@x
+begin p:=get_node(small_node_size); type(p):=penalty_node;
+@y
+begin p:=get_node(medium_node_size); type(p):=penalty_node;
+@z
+
+@x
+@p procedure flush_node_list(@!p:pointer); {erase list of nodes starting at |p|}
+@y
+@p procedure flush_node_list(@!p:pointer); {erase list of nodes starting at |p|}
+@z
+
+@x tex.web l.3934: free nodes with proper size
+ glue_node: begin fast_delete_glue_ref(glue_ptr(p));
+ if leader_ptr(p)<>null then flush_node_list(leader_ptr(p));
+ end;
+@y
+ glue_node: begin fast_delete_glue_ref(glue_ptr(p));
+ if leader_ptr(p)<>null then flush_node_list(leader_ptr(p));
+ free_node(p, medium_node_size);
+ goto done;
+ end;
+@z
+
+@x tex.web l.3937: free nodes with proper size
+ kern_node,math_node,penalty_node: do_nothing;
+@y
+ kern_node,math_node,penalty_node:begin
+ free_node(p, medium_node_size);
+ goto done;
+ end;
+@z
+
+@x tex.web l.4002:
+@ @<Case statement to copy...@>=
+@y
+@ @<Case statement to copy...@>=
+@z
+
+@x tex.web l.4018:
+glue_node: begin r:=get_node(small_node_size); add_glue_ref(glue_ptr(p));
+@y
+glue_node: begin r:=get_node(medium_node_size); add_glue_ref(glue_ptr(p));
+@z
+
+@x tex.web l.4021:
+kern_node,math_node,penalty_node: begin r:=get_node(small_node_size);
+ words:=small_node_size;
+ end;
+@y
+kern_node,math_node,penalty_node: begin r:=get_node(medium_node_size);
+ words:=medium_node_size;
+ end;
+@z
+
+@x tex.web l.4912
+@d pretolerance_code=0 {badness tolerance before hyphenation}
+@y
+@d REMOVE ME IF synctex_code is properly defined
+
+@d pretolerance_code=0 {badness tolerance before hyphenation}
+@z
+
+@x tex.web l.5031
+@d error_context_lines==int_par(error_context_lines_code)
+@y
+@d error_context_lines==int_par(error_context_lines_code)
+@#
+@d synctex == int_par(synctex_code)
+@z
+
+@x In the second "@<Types...@>="
+@!in_state_record = record
+ @!state_field, @!index_field: quarterword;
+ @!start_field,@!loc_field, @!limit_field, @!name_field: halfword;
+ end;
+@y
+@!in_state_record = record
+ @!state_field, @!index_field: quarterword;
+ @!start_field,@!loc_field, @!limit_field, @!name_field: halfword;
+ @!synctex_tag_field: integer; {stack the tag of the current file}
+ end;
+@z
+
+@x tex.web l.6461
+@d name==cur_input.name_field {name of the current file}
+@y
+@d name==cur_input.name_field {name of the current file}
+@d synctex_tag==cur_input.synctex_tag_field {{\sl Sync\TeX} tag of the current file}
+@z
+
+@x tex.web l. 14185
+@<Simplify a trivial box@>=
+@y
+@<Simplify a trivial box@>=
+@z
+
+@x tex.web l. 14191
+ begin free_node(r,small_node_size); link(q):=null;
+@y
+ begin free_node(r,medium_node_size); link(q):=null;
+@z
+
+@x tex.web l. 24274
+history:=spotless; {ready to go!}
+@y
+history:=spotless; {ready to go!}
+@<Initialize synctex primitive@>
+@z
+
+@x tex.web l. 24956
+@* \[54] System-dependent changes.
+@y
+@* \[54/SyncTeX] The {\sl Synchronize \TeX nology}.
+This section is devoted to the {\sl Synchronize \TeX nology}
+- or simply {\sl Sync\TeX} - used to synchronize between input and output.
+This section explains how synchronization basics are implemented.
+Before we enter into more technical details,
+let us recall in a few words what is synchronization.
+
+\TeX\ typesetting system clearly separates the input and the output material,
+and synchronization will provide a new link between both that can help
+text editors and viewers to work together.
+More precisely, forwards synchronization is the ability,
+given a location in the input source file,
+to find what is the corresponding place in the output.
+Backwards synchronization just performs the opposite:
+given a location in the output,
+retrieve the corresponding material in the input source file.
+
+For better code management and maintainance, we adopt a naming convention.
+Throughout this program, code related to the {\sl Synchronize \TeX nology} is tagged
+with the ``{\sl synctex}'' key word. Any code extract where {\sl Sync\TeX} plays
+its part, either explicitly or implicitly, (should) contain the string ``{\sl synctex}''.
+This naming convention also holds for external files.
+Moreover, all the code related to {\sl Sync\TeX} is gathered in this section,
+except the definitions.
+
+@ Enabling synchronization should be performed from the command line,
+|synctexoption| is used for that purpose.
+This global integer variable is declared here but it is not used here.
+This is just a placeholder where the command line controller will put
+the {\sl Sync\TeX} related options, and the {\sl Sync\TeX} controller will read them.
+
+@ @<Glob...@>=
+@!synctexoption:integer;
+
+@ A convenient primitive is provided:
+\.{\\synctex=1} in the input source file enables synchronization whereas
+\.{\\synctex=0} disables it.
+Its memory address is |synctex_code|.
+It is initialized by the {\sl Sync\TeX} controller to the command-line option if given.
+The controller may filter some reserved bits.
+
+@ @<Put each...@>=
+primitive("synctex",assign_int,int_base+synctex_code);@/
+@!@:synctex_}{\.{\\synctex} primitive@>
+
+@ In order to give the {\sl Sync\TeX} controller read and write access to
+the contents of the \.{\\synctex} primitive, we declare |synctexoffset|,
+such that |mem[synctexoffset]| and \.{\\synctex} correspond to
+the same memory storage. |synctexoffset| is initialized to
+the correct value when quite everything is initialized.
+
+@ @<Glob...@>=
+@!synctexoffset:integer; {holds the true value of |synctex_code|}
+
+@ @<Initialize whatever...@>=
+synctexoffset:=int_base+synctex_code;
+
+@ @<Initialize synctex primitive@>=
+synctex_init_command;
+
+@ Synchronization is achieved with the help of an auxiliary file...
+@^synctex@>
+@^synchronization@>
+
+@* \[54] System-dependent changes.
+@z
diff --git a/Build/source/texk/web2c/synctexdir/synctex-mem.ch2 b/Build/source/texk/web2c/synctexdir/synctex-mem.ch2
new file mode 100644
index 00000000000..d6e227bc618
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-mem.ch2
@@ -0,0 +1,64 @@
+Copyright (c) 2008, 2009 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Latest Revision: Wed Jul 1 11:17:41 UTC 2009
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Version 1
+Thu Jun 19 09:39:21 UTC 2008
+
+Notice:
+-------
+This file contains TeX changes for synctex support.
+It implements the memory management for TeX like engines.
+It must apply after synctex-mem.ch? and synctex-act.ch?
+
+@x tex.web l.4912 + synctex-mem.ch0
+@d REMOVE ME IF synctex_code is properly defined
+@y
+@z
+
+@x tex.web l.4960 + tex.ch
+@d int_pars=web2c_int_pars {total number of integer parameters}
+@y
+@d synctex_code=web2c_int_pars
+@d int_pars=synctex_code+1 {total number of integer parameters}
+@z
diff --git a/Build/source/texk/web2c/synctexdir/synctex-p-mem.ch0 b/Build/source/texk/web2c/synctexdir/synctex-p-mem.ch0
new file mode 100644
index 00000000000..ad7cfa5825c
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-p-mem.ch0
@@ -0,0 +1,25 @@
+@x tex.web l.2897
+@d box_node_size=8 {number of words to allocate for a box node}
+@y
+@d box_node_size=7 {number of words to allocate for a box node}
+@z
+
+@x tex.web l.3937
+ disp_node,
+@y
+ disp_node: do_nothing;
+@z
+
+@x tex.web l.4021:
+disp_node,
+@y
+disp_node: begin r:=get_node(small_node_size);
+ words:=small_node_size;
+ end;
+@z
+
+@x tex.web l. 24956
+@* \[55/\pTeX] System-dependent changes for \pTeX.
+@y
+@* \[54] System-dependent changes.
+@z
diff --git a/Build/source/texk/web2c/synctexdir/synctex-p-mem.ch1 b/Build/source/texk/web2c/synctexdir/synctex-p-mem.ch1
new file mode 100644
index 00000000000..33a1212bb1c
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-p-mem.ch1
@@ -0,0 +1,23 @@
+@x tex.web l.2897
+@d box_node_size=7+synctex_field_size {number of words to allocate for a box node}
+@y
+@d box_node_size=8+synctex_field_size {number of words to allocate for a box node}
+@z
+
+@x tex.web l.4912 + synctex-mem.ch0
+@d REMOVE ME IF synctex_code is properly defined
+@y
+@z
+
+@x tex.web l.4960 + tex.ch
+@d int_pars=web2c_int_pars {total number of integer parameters}
+@y
+@d synctex_code=web2c_int_pars
+@d int_pars=synctex_code+1 {total number of integer parameters}
+@z
+
+@x tex.web l. 24956
+@* \[54] System-dependent changes.
+@y
+@* \[55/\pTeX] System-dependent changes for \pTeX.
+@z
diff --git a/Build/source/texk/web2c/synctexdir/synctex-p-rec.ch0 b/Build/source/texk/web2c/synctexdir/synctex-p-rec.ch0
new file mode 100644
index 00000000000..410d762428a
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-p-rec.ch0
@@ -0,0 +1,31 @@
+@x srcdir/etex.ch l.536
+othercases print("[unknown integer parameter!]")
+@y
+@/@<synctex case for |print_param|@>@/
+othercases print("[unknown integer parameter!]")
+@z
+
+@x tex.web l.12533
+left_edge:=cur_h; cur_v:=cur_v-height(this_box);
+@y
+save_loc:=dvi_offset+dvi_ptr; left_edge:=cur_h; cur_v:=cur_v-height(this_box);
+@z
+
+@x synctex-mem.ch0 l.236
+It is initialized by the {\sl Sync\TeX} controller to the command-line option if given.
+The controller may filter some reserved bits.
+
+@ @<Put each...@>=
+primitive("synctex",assign_int,int_base+synctex_code);@/
+@!@:synctex_}{\.{\\synctex} primitive@>
+@y
+It is initialized by the {\sl Sync\TeX} controller to the command-line option if given.
+The controller may filter some reserved bits.
+
+@ @<Put each...@>=
+primitive("synctex",assign_int,int_base+synctex_code);@/
+@!@:synctex_}{\.{\\synctex} primitive@>
+
+@ @<synctex case for |print_param|@>=
+synctex_code: print_esc("synctex");
+@z
diff --git a/Build/source/texk/web2c/synctexdir/synctex-p-rec.ch1 b/Build/source/texk/web2c/synctexdir/synctex-p-rec.ch1
new file mode 100644
index 00000000000..56a63cec885
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-p-rec.ch1
@@ -0,0 +1,19 @@
+@x tex.web l.12394
+ @<Record void list {\sl Sync\TeX} information@>;
+@y
+ if type(p)<>dir_node then
+ @<Record void list {\sl Sync\TeX} information@>;
+@z
+
+@x tex.web l.12533
+save_loc:=dvi_offset+dvi_ptr; left_edge:=cur_h;
+@y
+left_edge:=cur_h;
+@z
+
+@x tex.web l.12569
+ @<Record void list {\sl Sync\TeX} information@>;
+@y
+ if type(p)<>dir_node then
+ @<Record void list {\sl Sync\TeX} information@>;
+@z
diff --git a/Build/source/texk/web2c/synctexdir/synctex-pdf-rec.ch2 b/Build/source/texk/web2c/synctexdir/synctex-pdf-rec.ch2
new file mode 100644
index 00000000000..41142b786b8
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-pdf-rec.ch2
@@ -0,0 +1,213 @@
+Copyright (c) 2008-2017 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Version 1
+Latest Revision: Sat Apr 22 10:07:05 UTC 2017
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+History:
+--------
+
+- the synctex hooks are changed to encapsulate Ship box |p| out
+- if the pdf file is removed, the synctex file is removed too.
+
+@x pdftex.web l.14550
+@ @<Output the non-|char_node| |p| for |hlist_out|...@>=
+@y
+@ @<Output the non-|char_node| |p| for |hlist_out|...@>=
+@z
+@x
+margin_kern_node,
+kern_node: begin
+@y
+margin_kern_node:cur_h:=cur_h+width(p); {separate the |margin_kern_node| case in |hlist_out|}
+kern_node: begin
+@z
+
+@x pdftex.web l.18491
+procedure pdf_hlist_out; {output an |hlist_node| box}
+@y
+procedure pdf_hlist_out; {output an |hlist_node| box}
+@z
+
+@x pdftex.web l.18519
+while p<>null do
+ @<Output node |p| for |pdf_hlist_out| and move to the next node,
+ maintaining the condition |cur_v=base_line|@>;
+@y
+@<Start hlist {\sl Sync\TeX} information record@>;
+while p<>null do
+ @<Output node |p| for |pdf_hlist_out| and move to the next node,
+ maintaining the condition |cur_v=base_line|@>;
+@<Finish hlist {\sl Sync\TeX} information record@>;
+@z
+
+@x pdftex.web l.18533
+@ @<Output node |p| for |pdf_hlist_out|...@>=
+@y
+@ @<Output node |p| for |pdf_hlist_out|...@>=
+@z
+
+@x pdftex.web l.18544
+ until not is_char_node(p);
+@y
+ until not is_char_node(p);
+ @<Record current point {\sl Sync\TeX} information@>;
+@z
+
+@x
+@ @<Output the non-|char_node| |p| for |pdf_hlist_out|...@>=
+@y
+@ @<Output the non-|char_node| |p| for |pdf_hlist_out|...@>=
+@z
+
+@x pdftex.web l.18557
+margin_kern_node,
+kern_node:cur_h:=cur_h+width(p);
+@y
+margin_kern_node:cur_h:=cur_h+width(p);
+kern_node: begin
+ @<Record |kern_node| {\sl Sync\TeX} information@>;
+ cur_h:=cur_h+width(p);
+end;
+@z
+
+@x
+math_node: @<Handle a math node in |hlist_out|@>;
+@y
+math_node: begin
+ @<Record |math_node| {\sl Sync\TeX} information@>;
+ @<Handle a math node in |hlist_out|@>;
+end;
+@z
+
+@x pdftex.web l.18566
+move_past: cur_h:=cur_h+rule_wd;
+@y
+move_past: begin
+ cur_h:=cur_h+rule_wd;
+ @<Record horizontal |rule_node| or |glue_node| {\sl Sync\TeX} information@>;
+end;
+@z
+
+@x
+@ @<(\pdfTeX) Output a box in an hlist@>=
+@y
+@ @<(\pdfTeX) Output a box in an hlist@>=
+@z
+
+@x
+if list_ptr(p)=null then cur_h:=cur_h+width(p)
+@y
+if list_ptr(p)=null then
+ begin
+ @<Record void list {\sl Sync\TeX} information@>;
+ cur_h:=cur_h+width(p);
+ end
+@z
+
+@x
+@p procedure pdf_vlist_out; {output a |pdf_vlist_node| box}
+@y
+@p procedure pdf_vlist_out; {output a |pdf_vlist_node| box}
+@z
+
+@x pdftex.web l.18670
+left_edge:=cur_h; cur_v:=cur_v-height(this_box); top_edge:=cur_v;
+@y
+left_edge:=cur_h;
+@<Start vlist {\sl Sync\TeX} information record@>;
+cur_v:=cur_v-height(this_box); top_edge:=cur_v;
+@z
+
+@x pdftex.web l.18673
+while p<>null do
+ @<Output node |p| for |pdf_vlist_out| and move to the next node,
+ maintaining the condition |cur_h=left_edge|@>;
+@y
+while p<>null do
+ @<Output node |p| for |pdf_vlist_out| and move to the next node,
+ maintaining the condition |cur_h=left_edge|@>;
+@<Finish vlist {\sl Sync\TeX} information record@>;
+@z
+
+@x pdftex.web l.18706
+@ @<(\pdfTeX) Output a box in a vlist@>=
+if list_ptr(p)=null then cur_v:=cur_v+height(p)+depth(p)
+@y
+@ @<(\pdfTeX) Output a box in a vlist@>=
+if list_ptr(p)=null then begin
+ cur_v:=cur_v+height(p);
+ @<Record void list {\sl Sync\TeX} information@>;
+ cur_v:=cur_v+depth(p);
+end
+@z
+
+@x pdftex.web l.18879
+@<(\pdfTeX) Ship box |p| out@>;
+@y
+pdf_output_value:=pdf_output; {{\sl Sync\TeX}: we assume that |pdf_output| is properly set up}
+if shipping_page then synctex_sheet(mag) @+else synctex_pdfxform(p);
+@<(\pdfTeX) Ship box |p| out@>;
+if shipping_page then synctex_teehs @+else synctex_mrofxfdp;
+@z
+
+@x
+procedure close_files_and_terminate;
+@y
+procedure close_files_and_terminate;
+@z
+
+@x pdftex.web l.33072
+ remove_pdffile;
+@y
+ remove_pdffile;
+ synctex_abort(log_opened);
+@z
+
+@x pdftex.web l.36224
+procedure out_form(p: pointer);
+begin
+@y
+procedure out_form(p: pointer);
+begin
+ synctexpdfrefxform(pdf_xform_objnum(p));
+@z
diff --git a/Build/source/texk/web2c/synctexdir/synctex-pdftex.h b/Build/source/texk/web2c/synctexdir/synctex-pdftex.h
new file mode 100644
index 00000000000..42638a11ce5
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-pdftex.h
@@ -0,0 +1,72 @@
+/*
+Copyright (c) 2008-2017 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Version 1
+Latest Revision: Sat Apr 22 10:07:05 UTC 2017
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+*/
+
+# include "pdftexd.h"
+
+/* We observe pdfoutputvalue in order to determine whether output mode is
+ * pdf or dvi.
+ * We will assume that pdf_output_value equals pdf_output entering
+ * the synctex_sheet function below, in the including synctex.c file.
+ */
+# define SYNCTEX_OFFSET_IS_PDF (pdfoutputvalue>0)
+# define SYNCTEX_OUTPUT ((pdfoutputvalue>0)?"pdf":"dvi")
+
+/* Adding support for pdf forms
+ */
+# define SYNCTEX_SUPPORT_PDF_FORM (1)
+# define SYNCTEX_PDF_CUR_FORM (pdfcurform)
+
+/* these messages should be sent to record information
+ * for a form node (\pdfrefxform).
+ * No engine discrimination.
+ */
+extern void synctexpdfxform(halfword p);
+extern void synctexmrofxfdp();
+extern void synctexpdfrefxform(int objnum);
+
+#define SYNCTEX_interaction interaction
diff --git a/Build/source/texk/web2c/synctexdir/synctex-ptex.h b/Build/source/texk/web2c/synctexdir/synctex-ptex.h
new file mode 100644
index 00000000000..3a67d9f210c
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-ptex.h
@@ -0,0 +1,57 @@
+/*
+Copyright (c) 2011 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Latest Revision: Wed Jun 30 11:00:00 UTC 2011
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Version 1
+Thu Jun 30 11:00:00 UTC 2011
+
+*/
+
+#include "ptexd.h"
+
+#define box_node_size (8+synchronization_field_size)
+
+#define rule_node 3
+#define glue_node 12
+#define kern_node 13
diff --git a/Build/source/texk/web2c/synctexdir/synctex-rec.ch0 b/Build/source/texk/web2c/synctexdir/synctex-rec.ch0
new file mode 100644
index 00000000000..56f8ec0abd6
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-rec.ch0
@@ -0,0 +1,430 @@
+Copyright (c) 2008, 2009 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Latest Revision: Wed Jul 1 11:17:04 UTC 2009
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Version 1
+Thu Jun 19 09:39:21 UTC 2008
+
+Notice:
+-------
+
+@x
+@p function get_node(@!s:integer):pointer; {variable-size node allocation}
+@y
+@p function get_node(@!s:integer):pointer; {variable-size node allocation}
+@z
+
+@x tex.web l.2716
+get_node:=r;
+@y
+@<Initialize bigger nodes with {\sl Sync\TeX} information@>;
+get_node:=r;
+@z
+
+@x tex.web l.4002: Copy
+@ @<Case statement to copy...@>=
+@y
+@ @<Case statement to copy...@>=
+@z
+
+@x
+hlist_node,vlist_node,unset_node: begin r:=get_node(box_node_size);
+@y
+hlist_node,vlist_node,unset_node: begin r:=get_node(box_node_size);
+ @<Copy the box {\sl Sync\TeX} information@>;
+@z
+
+@x
+rule_node: begin r:=get_node(rule_node_size); words:=rule_node_size;
+@y
+rule_node: begin r:=get_node(rule_node_size); words:=rule_node_size-synctex_field_size;{{\sl Sync\TeX}: do not let \TeX\ copy the {\sl Sync\TeX} information}
+ @<Copy the rule {\sl Sync\TeX} information@>;
+@z
+
+@x
+glue_node: begin r:=get_node(medium_node_size); add_glue_ref(glue_ptr(p));
+@y
+glue_node: begin r:=get_node(medium_node_size); add_glue_ref(glue_ptr(p));
+ @<Copy the medium sized node {\sl Sync\TeX} information@>;
+@z
+
+@x
+@p procedure begin_file_reading;
+@y
+@p procedure begin_file_reading;
+@z
+
+@x
+name:=0; {|terminal_input| is now |true|}
+@y
+name:=0; {|terminal_input| is now |true|}
+@<Prepare terminal input {\sl Sync\TeX} information@>;
+@z
+
+@x
+@p procedure start_input; {\TeX\ will \.{\\input} something}
+@y
+@p procedure start_input; {\TeX\ will \.{\\input} something}
+@z
+
+@x tex.web l.10380
+@<Read the first line of the new file@>;
+@y
+@<Prepare new file {\sl Sync\TeX} information@>;
+@<Read the first line of the new file@>;
+@z
+
+@x
+procedure hlist_out; {output an |hlist_node| box}
+@y
+procedure hlist_out; {output an |hlist_node| box}
+@z
+
+@x tex.web l.12338
+while p<>null do @<Output node |p| for |hlist_out| and move to the next node,
+ maintaining the condition |cur_v=base_line|@>;
+@y
+@<Start hlist {\sl Sync\TeX} information record@>;
+while p<>null do @<Output node |p| for |hlist_out| and move to the next node,
+ maintaining the condition |cur_v=base_line|@>;
+@<Finish hlist {\sl Sync\TeX} information record@>;
+@z
+
+@x
+@<Output node |p| for |hlist_out|...@>=
+@y
+@<Output node |p| for |hlist_out|...@>=
+@z
+
+@x
+ until not is_char_node(p);
+@y
+ until not is_char_node(p);
+ @<Record current point {\sl Sync\TeX} information@>;
+@z
+
+@x
+@ @<Output the non-|char_node| |p| for |hlist_out|...@>=
+@y
+@ @<Output the non-|char_node| |p| for |hlist_out|...@>=
+@z
+
+@x tex.web l.12390
+move_past: cur_h:=cur_h+rule_wd;
+@y
+move_past: begin
+ cur_h:=cur_h+rule_wd;
+ @<Record horizontal |rule_node| or |glue_node| {\sl Sync\TeX} information@>;
+end;
+@z
+
+@x tex.web l.12394
+@ @<Output a box in an hlist@>=
+if list_ptr(p)=null then cur_h:=cur_h+width(p)
+@y
+@ @<Output a box in an hlist@>=
+if list_ptr(p)=null then begin
+ @<Record void list {\sl Sync\TeX} information@>;
+ cur_h:=cur_h+width(p);
+end
+@z
+
+@x
+@p procedure vlist_out; {output a |vlist_node| box}
+@y
+@p procedure vlist_out; {output a |vlist_node| box}
+@z
+
+@x tex.web l.12534
+top_edge:=cur_v;
+@y
+MISSING @<Start vlist {\sl Sync\TeX} information record@> before cur_v:=cur_v-height(this_box);
+top_edge:=cur_v;
+@z
+
+@x tex.web l.12535
+while p<>null do @<Output node |p| for |vlist_out| and move to the next node,
+ maintaining the condition |cur_h=left_edge|@>;
+@y
+while p<>null do @<Output node |p| for |vlist_out| and move to the next node,
+ maintaining the condition |cur_h=left_edge|@>;
+@<Finish vlist {\sl Sync\TeX} information record@>;
+@z
+
+@x tex.web l.12569
+@<Output a box in a vlist@>=
+if list_ptr(p)=null then cur_v:=cur_v+height(p)+depth(p)
+@y
+@<Output a box in a vlist@>=
+if list_ptr(p)=null then cur_v:=cur_v+height(p)+depth(p)
+MISSING @<Record void list {\sl Sync\TeX} information@>;
+@z
+
+@x tex.web l.12669
+@!old_setting:0..max_selector; {saved |selector| setting}
+@y
+@!old_setting:0..max_selector; {saved |selector| setting}
+begin @<Start sheet {\sl Sync\TeX} information record@>;
+@z
+
+@x tex.web l.12692
+@<Flush the box from memory, showing statistics if requested@>;
+end;
+@y
+@<Flush the box from memory, showing statistics if requested@>;
+end;
+@<Finish sheet {\sl Sync\TeX} information record@>;
+end;
+@z
+
+@x
+@<Append a ligature and/or kern to the translation...@>=
+@y
+@<Append a ligature and/or kern to the translation...@>=
+@z
+
+@x tex.web l.17887
+if w<>0 then
+ begin link(t):=new_kern(w); t:=link(t); w:=0;
+@y
+if w<>0 then
+ begin link(t):=new_kern(w); t:=link(t); w:=0;
+ sync_tag(t+medium_node_size):=0; {{\sl Sync\TeX}: do nothing, it is too late}
+@z
+
+@x tex.web l.19335
+@<Initialize the special list...@>=
+type(page_head):=glue_node; subtype(page_head):=normal;
+@y
+@<Initialize the special list...@>=
+type(page_head):=glue_node; subtype(page_head):=normal;
+ {{\sl Sync\TeX} watch point: box(|page_head|) size >= |glue_node| size}
+@z
+
+@x
+@<Move the cursor past a pseudo-ligature...@>=
+@y
+@<Move the cursor past a pseudo-ligature...@>=
+@z
+
+@x tex.web l.20188
+free_node(temp_ptr,small_node_size);
+@y
+free_node(temp_ptr,small_node_size); {{\sl Sync\TeX} watch point: proper size!}
+@z
+
+@x
+procedure close_files_and_terminate;
+@y
+procedure close_files_and_terminate;
+@z
+
+@x tex.web l.24301
+if log_opened then
+@y
+@<Close {\sl Sync\TeX} file and write status@>;
+if log_opened then
+@z
+
+@x tex.web + synctex-mem.ch0
+@ Synchronization is achieved with the help of an auxiliary file...
+@y
+@ Synchronization is achieved with the help of an auxiliary file named
+`\.{{\sl jobname}.synctex}' ({\sl jobname} is the contents of the
+\.{\\jobname} macro), where a {\sl Sync\TeX} controller implemented
+in the external |synctex.c| file will store geometrical information.
+This {\sl Sync\TeX} controller will take care of every technical details
+concerning the {\sl Sync\TeX} file, we will only focus on the messages
+the controller will receive from the \TeX\ program.
+
+The most accurate synchronization information should allow to map
+any character of the input source file to the corresponding location
+in the output, if relevant.
+Ideally, the synchronization information of the input material consists of
+the file name, the line and column numbers of every character.
+The synchronization information in the output is simply the page number and
+either point coordinates, or box dimensions and position.
+The problem is that the mapping between these informations is only known at
+ship out time, which means that we must keep track of the input
+synchronization information until the pages ship out.
+
+As \TeX\ only knows about file names and line numbers,
+but forgets the column numbers, we only consider a
+restricted input synchronization information called {\sl Sync\TeX\ information}.
+It consists of a unique file name identifier, the {\sl Sync\TeX\ file tag},
+and the line number.
+
+Keeping track of such information,
+should be different whether characters or nodes are involved.
+Actually, only certain nodes are involved in {\sl Sync\TeX},
+we call them {\sl synchronized nodes}.
+Synchronized nodes store the {\sl Sync\TeX} information in their last two words:
+the first one contains a {\sl Sync\TeX\ file tag} uniquely identifying
+the input file, and the second one contains the current line number,
+as returned by the \.{\\inputlineno} primitive.
+The |synctex_field_size| macro contains the necessary size to store
+the {\sl Sync\TeX} information in a node.
+
+When declaring the size of a new node, it is recommanded to use the following
+convention: if the node is synchronized, use a definition similar to
+|my_synchronized_node_size|={\sl xxx}+|synctex_field_size|.
+Moreover, one should expect that the {\sl Sync\TeX} information is always stored
+in the last two words of a synchronized node.
+
+@ By default, every node with a sufficiently big size is initialized
+at creation time in the |get_node| routine with the current
+{\sl Sync\TeX} information, whether or not the node is synchronized.
+One purpose is to set this information very early in order to minimize code
+dependencies, including forthcoming extensions.
+Another purpose is to avoid the assumption that every node type has a dedicated getter,
+where initialization should take place. Actually, it appears that some nodes are created
+using directly the |get_node| routine and not the dedicated constructor.
+And finally, initializing the node at only one place is less error prone.
+
+@ @<Initialize bigger nodes with {\sl Sync\TeX} information@>=
+if s>=medium_node_size then
+begin
+ sync_tag(r+s):=synctex_tag;
+ sync_line(r+s):=line;
+end;
+
+@ Instead of storing the input file name, it is better to store just an identifier.
+Each time \TeX\ opens a new file, it notifies the {\sl Sync\TeX} controller with
+a |synctex_start_input| message.
+This controller will create a new {\sl Sync\TeX} file tag and
+will update the current input state record accordingly.
+If the input comes from the terminal or a pseudo file, the |synctex_tag| is set to 0.
+It results in automatically disabling synchronization for material
+input from the terminal or pseudo files.
+
+@ @<Prepare new file {\sl Sync\TeX} information@>=
+synctex_start_input; {Give control to the {\sl Sync\TeX} controller}
+
+@ @<Prepare terminal input {\sl Sync\TeX} information@>=
+synctex_tag:=0;
+
+@ @<Close {\sl Sync\TeX} file and write status@>=
+synctex_terminate(log_opened); {Let the {\sl Sync\TeX} controller close its files.}
+
+@ Synchronized nodes are boxes, math, kern and glue nodes.
+Other nodes should be synchronized too, in particular math noads.
+\TeX\ assumes that math, kern and glue nodes have the same size,
+this is why both are synchronized.
+{\sl In fine}, only horizontal lists are really used in {\sl Sync\TeX},
+but all box nodes are considered the same with respect to synchronization,
+because a box node type is allowed to change at execution time.
+
+The next sections are the various messages sent to the {\sl Sync\TeX} controller.
+The argument is either the box or the node currently shipped out.
+The vertical boxes are not recorded, but the code is available for clients.
+
+@ @<Start sheet {\sl Sync\TeX} information record@>=
+synctex_sheet(mag);
+
+@ @<Finish sheet {\sl Sync\TeX} information record@>=
+synctex_teehs;
+
+@ @<Start vlist {\sl Sync\TeX} information record@>=
+synctex_vlist(this_box);
+
+@ @<Finish vlist {\sl Sync\TeX} information record@>=
+synctex_tsilv(this_box);
+
+@ @<Start hlist {\sl Sync\TeX} information record@>=
+synctex_hlist(this_box);
+
+@ @<Finish hlist {\sl Sync\TeX} information record@>=
+synctex_tsilh(this_box);
+
+@ @<Record void list {\sl Sync\TeX} information@>=
+ if type(p)=vlist_node then begin
+ synctex_void_vlist(p,this_box);
+ end
+ else begin
+ synctex_void_hlist(p,this_box);
+ end;
+
+@ @<Record current point {\sl Sync\TeX} information@>=
+synctex_current;
+
+@ @<Record horizontal |rule_node| or |glue_node| {\sl Sync\TeX} information@>=
+synctex_horizontal_rule_or_glue(p,this_box);
+
+@ @<Record |kern_node| {\sl Sync\TeX} information@>=
+synctex_kern(p,this_box);
+
+@ @<Record |math_node| {\sl Sync\TeX} information@>=
+synctex_math(p,this_box);
+
+@ When making a copy of a synchronized node, we might also have to duplicate
+the {\sl Sync\TeX} information by copying the two last words.
+This is the case for a |box_node| and for a |glue_node|,
+but not for a |math_node| nor a |kern_node|. These last two nodes always keep
+the {\sl Sync\TeX} information they received at creation time.
+
+@ @<Copy the box {\sl Sync\TeX} information@>=
+sync_tag(r+box_node_size):=sync_tag(p+box_node_size);
+sync_line(r+box_node_size):=sync_line(p+box_node_size);
+
+@ @<Copy the rule {\sl Sync\TeX} information@>=
+{|sync_tag(r+rule_node_size):=sync_tag(p+rule_node_size);|
+|sync_line(r+rule_node_size):=sync_line(p+rule_node_size);|}
+
+@ @<Copy the medium sized node {\sl Sync\TeX} information@>=
+sync_tag(r+medium_node_size):=sync_tag(p+medium_node_size);
+sync_line(r+medium_node_size):=sync_line(p+medium_node_size);
+
+@ {\sl Nota Bene:}
+The {\sl Sync\TeX} code is very close to the memory model.
+It is not connected to any other part of the code,
+except for memory management. It is possible to neutralize the {\sl Sync\TeX} code
+rather simply. The first step is to define a null |synctex_field_size|.
+The second step is to comment out the code in ``Initialize bigger nodes...'' and every
+``Copy ... {\sl Sync\TeX} information''.
+The last step will be to comment out the |synctex_tag_field| related code in the
+definition of |synctex_tag| and the various ``Prepare ... {\sl Sync\TeX} information''.
+Then all the remaining code should be just harmless.
+The resulting program would behave exactly the same as if absolutely no {\sl Sync\TeX}
+related code was there, including memory management.
+Of course, all this assumes that {\sl Sync\TeX} is turned off from the command line.
+@z
diff --git a/Build/source/texk/web2c/synctexdir/synctex-rec.ch1 b/Build/source/texk/web2c/synctexdir/synctex-rec.ch1
new file mode 100644
index 00000000000..2f9c6b0b327
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-rec.ch1
@@ -0,0 +1,81 @@
+Copyright (c) 2008, 2009 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Latest Revision: Wed Jul 1 11:17:50 UTC 2009
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Version 1
+Thu Jun 19 09:39:21 UTC 2008
+
+Notice:
+-------
+This file contains TeX changes for synctex support.
+It implements the memory management for TeX like engines.
+It must apply after synctex-rec.ch0
+
+@x
+@p procedure vlist_out; {output a |vlist_node| box}
+@y
+@p procedure vlist_out; {output a |vlist_node| box}
+@z
+
+@x tex.web l.12533
+save_loc:=dvi_offset+dvi_ptr; left_edge:=cur_h; cur_v:=cur_v-height(this_box);
+MISSING @<Start vlist {\sl Sync\TeX} information record@> before cur_v:=cur_v-height(this_box);
+@y
+save_loc:=dvi_offset+dvi_ptr; left_edge:=cur_h;
+@<Start vlist {\sl Sync\TeX} information record@>;
+cur_v:=cur_v-height(this_box);
+@z
+
+@x tex.web l.12569
+@<Output a box in a vlist@>=
+if list_ptr(p)=null then cur_v:=cur_v+height(p)+depth(p)
+MISSING @<Record void list {\sl Sync\TeX} information@>;
+@y
+@<Output a box in a vlist@>=
+if list_ptr(p)=null then begin
+ cur_v:=cur_v+height(p);
+ @<Record void list {\sl Sync\TeX} information@>;
+ cur_v:=cur_v+depth(p);
+end
+@z
+
diff --git a/Build/source/texk/web2c/synctexdir/synctex-rec.ch2 b/Build/source/texk/web2c/synctexdir/synctex-rec.ch2
new file mode 100644
index 00000000000..5ba9854c8bc
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-rec.ch2
@@ -0,0 +1,66 @@
+Copyright (c) 2008, 2009 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Latest Revision: Wed Jul 1 11:17:54 UTC 2009
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Version 1
+Thu Jun 19 09:39:21 UTC 2008
+
+Notice:
+-------
+This file contains TeX changes for synctex support.
+It implements the memory management for TeX like engines.
+It must apply after synctex-mem.ch? and synctex-rec.ch?
+
+@x tex.web l.12378
+kern_node,math_node:cur_h:=cur_h+width(p);
+@y
+kern_node: begin
+ @<Record |kern_node| {\sl Sync\TeX} information@>;
+ cur_h:=cur_h+width(p);
+end;
+math_node: begin
+ @<Record |math_node| {\sl Sync\TeX} information@>;
+ cur_h:=cur_h+width(p);
+end;
+@z
+
diff --git a/Build/source/texk/web2c/synctexdir/synctex-tex.h b/Build/source/texk/web2c/synctexdir/synctex-tex.h
new file mode 100644
index 00000000000..d20143e8c94
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-tex.h
@@ -0,0 +1,52 @@
+/*
+Copyright (c) 2008, 2009 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Latest Revision: Wed Jul 1 11:16:36 UTC 2009
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Version 1
+Thu Jun 19 09:39:21 UTC 2008
+
+*/
+
+#include "texd.h"
+#define SYNCTEX_interaction interaction
diff --git a/Build/source/texk/web2c/synctexdir/synctex-uptex.h b/Build/source/texk/web2c/synctexdir/synctex-uptex.h
new file mode 100644
index 00000000000..86a82d205b1
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-uptex.h
@@ -0,0 +1,57 @@
+/*
+Copyright (c) 2011 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Latest Revision: Wed Jun 30 11:00:00 UTC 2011
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Version 1
+Thu Jun 30 11:00:00 UTC 2011
+
+*/
+
+#include "uptexd.h"
+
+#define box_node_size (8+synchronization_field_size)
+
+#define rule_node 3
+#define glue_node 12
+#define kern_node 13
diff --git a/Build/source/texk/web2c/synctexdir/synctex-xe-def.ch0 b/Build/source/texk/web2c/synctexdir/synctex-xe-def.ch0
new file mode 100644
index 00000000000..667070dc43e
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-xe-def.ch0
@@ -0,0 +1,63 @@
+Copyright (c) 2013 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Latest Revision: Wed Jul 1 11:16:57 UTC 2009
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Version 1
+Thu Jun 19 09:39:21 UTC 2008
+
+Notice:
+-------
+This file contains TeX changes for synctex support.
+It defines the SyncTeX fields for the XeTeX engine.
+It must apply first
+
+@x tex.web l.2897
+@d hlist_node=0 {|type| of hlist nodes}
+@y
+@d synctex_field_size=1 {Declare the {\sl Sync\TeX} field size to store the {\sl Sync\TeX} information:
+ we will put file tag and line into lh and rh fields of one word}
+@d sync_tag(#) == mem[#-synctex_field_size].hh.lh {The tag subfield}
+@d sync_line(#) == mem[#-synctex_field_size].hh.rh {The line subfield}
+@#
+@d hlist_node=0 {|type| of hlist nodes}
+@z
diff --git a/Build/source/texk/web2c/synctexdir/synctex-xe-rec.ch3 b/Build/source/texk/web2c/synctexdir/synctex-xe-rec.ch3
new file mode 100644
index 00000000000..a83faa07648
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-xe-rec.ch3
@@ -0,0 +1,82 @@
+Copyright (c) 2008, 2009 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Latest Revision: Wed Jul 1 11:17:59 UTC 2009
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Version 1
+Thu Jun 19 09:39:21 UTC 2008
+
+Notice:
+-------
+This file contains TeX changes for SyncTeX support.
+It implements the memory management for XeTeX like engines.
+It must apply after synctex.ch0 and synctex-e.ch1
+
+@x
+@p procedure vlist_out; {output a |vlist_node| box}
+@y
+@p procedure vlist_out; {output a |vlist_node| box}
+@z
+
+@x
+if upwards then cur_v:=cur_v+depth(this_box) else cur_v:=cur_v-height(this_box);
+MISSING @<Start vlist {\sl Sync\TeX} information record@> before cur_v:=cur_v-height(this_box);
+@y
+@<Start vlist {\sl Sync\TeX} information record@>;
+if upwards then cur_v:=cur_v+depth(this_box) else cur_v:=cur_v-height(this_box);
+@z
+
+@x
+@<Output a box in a vlist@>=
+if list_ptr(p)=null then begin
+ if upwards then cur_v:=cur_v-depth(p)-height(p) else cur_v:=cur_v+height(p)+depth(p);
+ end
+MISSING @<Record void list {\sl Sync\TeX} information@>;
+@y
+@<Output a box in a vlist@>=
+if list_ptr(p)=null then begin
+ if upwards then cur_v:=cur_v-depth(p) else cur_v:=cur_v+height(p);
+ @<Record void list {\sl Sync\TeX} information@>;
+ if upwards then cur_v:=cur_v-height(p) else cur_v:=cur_v+depth(p);
+end
+@z
+
diff --git a/Build/source/texk/web2c/synctexdir/synctex-xetex.h b/Build/source/texk/web2c/synctexdir/synctex-xetex.h
new file mode 100644
index 00000000000..a6204282de5
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex-xetex.h
@@ -0,0 +1,73 @@
+/*
+Copyright (c) 2008-2011 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Latest Revision: Wed Aug 22 07:20:29 UTC 2011
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Version 1
+Thu Jun 19 09:39:21 UTC 2008
+
+*/
+
+# include "xetexd.h"
+/* this will define XeTeX, which we can use in later conditionals */
+
+# include <xetexdir/xetexextra.h>
+
+/* We observe nopdfoutput in order to determine whether output mode is
+ * pdf or xdv. */
+# define SYNCTEX_OFFSET_IS_PDF (nopdfoutput==0)
+# define SYNCTEX_OUTPUT (nopdfoutput!=0?"xdv":"pdf")
+
+#define SYNCTEX_CURH ((nopdfoutput==0)?(curh+4736287):curh)
+#define SYNCTEX_CURV ((nopdfoutput==0)?(curv+4736287):curv)
+
+/* WARNING:
+ The definition below must be in sync with their eponym declarations in synctex-xetex.ch1
+*/
+# define synchronization_field_size 1
+
+/* in XeTeX, "halfword" fields are at least 32 bits, so we'll use those for
+ * tag and line so that the sync field size is only one memory_word. */
+# define SYNCTEX_TAG_MODEL(NODE,TYPE)\
+ mem[NODE+TYPE##_node_size-synchronization_field_size].hh.lhfield
+# define SYNCTEX_LINE_MODEL(NODE,TYPE)\
+ mem[NODE+TYPE##_node_size-synchronization_field_size].hh.rh
diff --git a/Build/source/texk/web2c/synctexdir/synctex.c b/Build/source/texk/web2c/synctexdir/synctex.c
new file mode 100644
index 00000000000..ae1334d61e2
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex.c
@@ -0,0 +1,2155 @@
+/*
+ Copyright (c) 2008-2017 jerome DOT laurens AT u-bourgogne DOT fr
+
+ This file is part of the SyncTeX package.
+
+ Version 1
+ Latest Revision: Tue Apr 25 14:46:32 UTC 2017
+
+ License:
+ --------
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE
+
+ Except as contained in this notice, the name of the copyright holder
+ shall not be used in advertising or otherwise to promote the sale,
+ use or other dealings in this Software without prior written
+ authorization from the copyright holder.
+
+ Important notice:
+ -----------------
+ This file is named "synctex.c", it may or may not have a header counterpart
+ depending on its use. It aims to provide basic components useful for the
+ input/output synchronization technology for TeX.
+ The purpose of the implementation is threefold
+ - firstly, it defines a new input/output synchronization technology named
+ "synchronize texnology", "SyncTeX" or "synctex"
+ - secondly, it defines the naming convention and format of the auxiliary file
+ used by this technology
+ - thirdly, it defines the API of a controller and a controller, used in
+ particular by the pdfTeX and XeTeX programs to prepare synchronization.
+
+ All these are up to a great extent de facto definitions, which means that they
+ are partly defined by the implementation itself.
+
+ This technology was first designed for pdfTeX, an extension of TeX managing the
+ pdf output file format, but it can certainly be adapted to other programs built
+ from TeX as long as the extensions do not break too much the core design.
+ Moreover, the synchronize texnology only relies on code concept and not
+ implementation details, so it can be ported to other TeX systems. In order to
+ support SyncTeX, one can start reading the dedicated section in synctex.ch,
+ sync-pdftex.ch and sync-xetex.ch. Actually, support is provided for TeX, e-TeX,
+ pdfTeX and XeTeX.
+
+ Other existing public synchronization technologies are defined by srcltx.sty -
+ also used by source specials - and pdfsync.sty. Like them, the synchronize
+ texnology is meant to be shared by various text editors, viewers and TeX
+ engines. A centralized reference and source of information is available in TeX-Live.
+
+ Versioning:
+ -----------
+ As synctex is embedded into different TeX implementation, there is an independent
+ versionning system.
+ For TeX implementations, the actual version is: 3
+ For .synctex file format, the actual version is SYNCTEX_VERSION below
+
+ Please, do not remove these explanations.
+
+ Acknowledgments:
+ ----------------
+ The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+ and significant help from XeTeX developer Jonathan Kew
+
+ Nota Bene:
+ ----------
+ If you include or use a significant part of the synctex package into a software,
+ I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+ History:
+ --------
+ Version 1.14
+ Fri Apr 15 19:10:57 UTC 2011
+ - taking output_directory into account
+ - Replaced FOPEN_WBIN_MODE by FOPEN_W_MODE when opening the text version of the .synctex file.
+ - Merging with LuaTeX's version of synctex.c
+
+ Version 3
+ - very minor design change to take luatex into account
+ - typo fixed
+ - some size_t replaced by int
+ - very minor code design change to remove wrong xetex specific warnings
+
+ Version 2
+ Fri Sep 19 14:55:31 UTC 2008
+ - support for file names containing spaces.
+ This is one thing that xetex and pdftex do not manage the same way.
+ When the input file name contains a space character ' ',
+ pdftex will automatically enclose this name between two quote characters '"',
+ making programs believe that these quotes are really part of the name.
+ xetex does nothing special.
+ For that reason, running the command line
+ xetex --synctex=-1 "my file.tex"
+ is producing the expected file named <my file.synctex>, (the '<' and '>' are not part of the name)
+ whereas running the command line
+ pdftex --synctex=-1 "my file.tex"
+ was producing the unexpected file named <"my file".synctex> where the two '"' characters were part of the name.
+ Of course, that was breaking the typesetting mechanism when pdftex was involved.
+ To solve this problem, we prefer to rely on the output_file_name instead of the jobname.
+ In the case when no output_file_name is available, we use jobname and test if the file name
+ starts and ends with a quote character. Every synctex output file is removed because we consider
+ TeX encontered a problem.
+ There is some conditional coding.
+
+ Version 1
+ Latest Revision: Sat Apr 22 09:10:30 UTC 2017
+
+ */
+
+# define SYNCTEX_VERSION 1
+
+# define SYNCTEX_DEBUG 0
+
+/* Debugging: define the next macro to "return;" in order to disable the synctex code
+ * only suplemental function calls will be used. The compiler may optimize them. */
+# define SYNCTEX_RETURN_IF_DISABLED ;
+
+# define SYNCTEX_NOERR 0
+
+# define EXTERN extern
+
+# ifdef xfree
+# define SYNCTEX_FREE xfree
+# else
+# define SYNCTEX_FREE(x) free(x)
+# endif
+
+/* The header file SYNCTEX_ENGINE_H below is "synctex-tex.h" for TeX, ...
+ * Some macros are defined and additional headers will be imported.
+ * The macros below can be defined there, prior to their default definition given afterwards. */
+# include SYNCTEX_ENGINE_H
+
+/* the macros defined below do the same job than their almost eponym
+ * counterparts of *tex.web, the memory access is sometimes more direct
+ * because *tex.web won't share its own constants the main purpose is to
+ * maintain very few hook points into *tex.web in order both to ensure
+ * portability and not modifying to much the original code. see texmfmem.h
+ * and *tex.web for details, the synctex_ prefix prevents name conflicts, it
+ * is some kind of namespace
+ */
+/* synctexoption is a global integer variable defined in *tex.web
+ * it is set to 1 by texmfmp.c if the command line has the '-synctex=1'
+ * option. */
+# if !defined(synctex_options)
+# define synctex_options synctexoption
+# endif
+# if !defined(SYNCTEX_NO_OPTION)
+# define SYNCTEX_NO_OPTION INT_MAX
+# endif
+/* if synctex_options is set to SYNCTEX_NO_OPTION, no command line option was provided. */
+
+/* glue code: really define the main memory,
+ * this is exactly the same "mem" as in *tex.web. */
+# if !defined(mem)
+# define mem zmem
+# endif
+/* glue code: synctexoffset is a global integer variable defined in *tex.web
+ * it is set to the offset where the primitive \synctex reads and writes its
+ * value. */
+# if !defined(SYNCTEX_VALUE)
+# define SYNCTEX_VALUE zeqtb[synctexoffset].cint
+# endif
+/* if there were a mean to share the value of synctex_code between *tex.web
+ * and this file, it would be great. */
+
+/* WARNING:
+ The 9 definitions below must be in sync with their eponym declarations in
+ the proper synctex-*.ch* file or equivalent.
+ Since version 1.14, the definitions are moved after the include directive above
+ and we adopted a conservative policy. The forthcoming definitions apply only if
+ when the macros are not already defined in SYNCTEX_ENGINE_H.
+ If the default values below do not fit with your requirements,
+ you can define them in the above mentionned header file.
+ */
+# if !defined(synchronization_field_size)
+# define synchronization_field_size 2
+# endif
+/* The default value is 2, it is suitable for original TeX and alike,
+ * but it is too big for XeTeX.
+ * The tag and the line are just the two last words of the node. This is a
+ * very handy design but this is not strictly required by the concept. If
+ * really necessary, one can define other storage rules.
+ * XeTeX already defined synchronization_field_size,
+ * SYNCTEX_TAG_MODEL and SYNCTEX_LINE_MODEL
+ * All the default values are targeted to TeX or e-TeX. */
+# if !defined(SYNCTEX_TAG_MODEL)
+# define SYNCTEX_TAG_MODEL(NODE,TYPE)\
+mem[NODE+TYPE##_node_size-synchronization_field_size].cint
+# endif
+# if !defined(SYNCTEX_LINE_MODEL)
+# define SYNCTEX_LINE_MODEL(NODE,TYPE)\
+mem[NODE+TYPE##_node_size-synchronization_field_size+1].cint
+# endif
+/* SYNCTEX_TAG_MODEL and SYNCTEX_LINE_MODEL are used to define
+ * SYNCTEX_TAG and SYNCTEX_LINE in a model independant way
+ * Both are tag and line accessors.
+ * TYPE takes one of the prefixes in the ???_node_size definition below. */
+/* see: @d box_node_size=...
+ * There should be an automatic process here because these definitions
+ * are redundant. However, this process would certainly be overcomplicated
+ * (building then parsing the *tex.web file would be a pain) */
+# if !defined(box_node_size)
+# define box_node_size (7+synchronization_field_size)
+# endif
+/* glue code: node sizes */
+# if !defined(small_node_size)
+# define small_node_size 2
+# endif
+/* see: @d small_node_size=2 {number of words to allocate for most node types} */
+# if !defined(medium_node_size)
+# define medium_node_size (small_node_size+synchronization_field_size)
+# endif
+/* see: @d rule_node_size=4 */
+# if !defined(rule_node_size)
+# define rule_node_size (4+synchronization_field_size)
+# endif
+/* see: luatex */
+# if !defined(glue_node_size)
+# define glue_node_size medium_node_size
+# endif
+# if !defined(kern_node_size)
+# define kern_node_size medium_node_size
+# endif
+# if !defined(math_node_size)
+# define math_node_size medium_node_size
+# endif
+# if !defined(width_offset)
+# define width_offset 1
+# endif
+/* see: @d width_offset=... */
+# if !defined( depth_offset)
+# define depth_offset 2
+# endif
+/* see: @d depth_offset=... */
+# if !defined(height_offset)
+# define height_offset 3
+# endif
+/* see: @d height_offset=... */
+
+/* Now define the local version of width(##), height(##) and depth(##) macros
+ These only depend on the 3 macros above. */
+# if !defined(SYNCTEX_TYPE)
+# define SYNCTEX_TYPE(NODE) mem[NODE].hh.b0
+# endif
+# if !defined(SYNCTEX_SUBTYPE)
+# define SYNCTEX_SUBTYPE(NODE) mem[NODE].hh.b1
+# endif
+# if !defined(SYNCTEX_WIDTH)
+# define SYNCTEX_WIDTH(NODE) mem[NODE+width_offset].cint
+# endif
+# if !defined(SYNCTEX_DEPTH)
+# define SYNCTEX_DEPTH(NODE) mem[NODE+depth_offset].cint
+# endif
+# if !defined(SYNCTEX_HEIGHT)
+# define SYNCTEX_HEIGHT(NODE) mem[NODE+height_offset].cint
+# endif
+# if !defined(rule_node)
+# define rule_node 2
+# endif
+# if !defined(glue_node)
+# define glue_node 10
+# endif
+# if !defined(kern_node)
+# define kern_node 11
+# endif
+
+/* Some parts of the code may differ depending on the ouput mode,
+ * dvi or xdv vs pdf, in particular the management of magnification.
+ * The default is dvi mode.
+ * Also, if pdftex is used, the origin of the coordinates is at 0, not at 1in
+ * Default values are suitable for TeX */
+# if !defined(SYNCTEX_OUTPUT)
+# define SYNCTEX_OUTPUT "dvi"
+# endif
+# if !defined(SYNCTEX_OFFSET_IS_PDF)
+# define SYNCTEX_OFFSET_IS_PDF 0
+# endif
+
+#if defined(_WIN32)
+#if defined(pdfTeX) || defined(upTeX) || defined(eupTeX) || defined(XeTeX) || defined(LuaTeX) || defined(LuajitTeX)
+#define W32UPTEXSYNCTEX 1
+#include <wchar.h>
+static char *chgto_oem(char *src);
+static int fsyscp_remove(char *name);
+#endif /* pdfTeX ... */
+#endif /* _WIN32 */
+
+/* This macro layer was added to take luatex into account as suggested by T. Hoekwater. */
+# if !defined(SYNCTEX_GET_JOB_NAME)
+# define SYNCTEX_GET_JOB_NAME() (gettexstring(jobname))
+# endif
+# if !defined(SYNCTEX_GET_LOG_NAME)
+# define SYNCTEX_GET_LOG_NAME() (gettexstring(texmflogname))
+# endif
+# if !defined(SYNCTEX_CURRENT_TAG)
+# define SYNCTEX_CURRENT_TAG (curinput.synctextagfield)
+# endif
+# if !defined(SYNCTEX_GET_CURRENT_NAME)
+# define SYNCTEX_GET_CURRENT_NAME() generic_synctex_get_current_name()
+# endif
+# if !defined(SYNCTEX_GET_TOTAL_PAGES)
+# define SYNCTEX_GET_TOTAL_PAGES() (totalpages)
+# endif
+# if !defined(SYNCTEX_CURH)
+# define SYNCTEX_CURH curh
+# endif
+# if !defined(SYNCTEX_CURV)
+# define SYNCTEX_CURV curv
+# endif
+# if !defined(SYNCTEX_RULE_WD)
+# define SYNCTEX_RULE_WD rulewd
+# endif
+# if !defined(SYNCTEX_RULE_HT)
+# define SYNCTEX_RULE_HT ruleht
+# endif
+# if !defined(SYNCTEX_RULE_DP)
+# define SYNCTEX_RULE_DP ruledp
+# endif
+
+/* For non-GCC compilation. */
+# if !defined(__GNUC__) || (__GNUC__ < 2)
+# define __attribute__(A)
+# endif
+
+# include "synctex.h"
+
+# if !defined(SYNCTEX_SUPPORT_PDF_FORM)
+# define SYNCTEX_SUPPORT_PDF_FORM 0
+# endif
+
+# define SYNCTEX_YES (1)
+# define SYNCTEX_NO (0)
+# define SYNCTEX_NO_ERROR (0)
+
+# define SYNCTEX_UNIT_FACTOR 1
+# define UNIT / synctex_ctxt.unit
+/* UNIT is the scale. TeX coordinates are very accurate and client won't need
+ * that, at leat in a first step. 1.0 <-> 2^16 = 65536.
+ * The TeX unit is sp (scaled point) or pt/65536 which means that the scale
+ * factor to retrieve a bp unit (a postscript) is 72/72.27/65536 =
+ * 1/4096/16.06 = 1/8192/8.03
+ * Here we use 1/SYNCTEX_UNIT_FACTOR as scale factor, then we can limit ourselves to
+ * integers. This default value assumes that TeX magnification factor is 1000.
+ * The real TeX magnification factor is used to fine tune the synctex context
+ * scale in the synctex_dot_open function.
+ * IMPORTANT: We can say that the natural unit of .synctex files is SYNCTEX_UNIT_FACTOR sp.
+ * To retrieve the proper bp unit, we'll have to divide by 8.03. To reduce
+ * rounding errors, we'll certainly have to add 0.5 for non negative integers
+ * and 0.5 for negative integers. This trick is mainly to gain speed and
+ * size. A binary file would be more appropriate in that respect, but I guess
+ * that some clients like auctex would not like it very much. we cannot use
+ * "<<13" instead of "/SYNCTEX_UNIT_FACTOR" because the integers are signed and we do not
+ * want the sign bit to be propagated. The origin of the coordinates is at
+ * the top left corner of the page. For pdf mode, it is straightforward, but
+ * for dvi mode, we'll have to record the 1in offset in both directions,
+ * eventually modified by the magnification.
+ */
+
+# if defined(__SyncTeX__)
+
+# include <stdio.h>
+# include <stdarg.h>
+# include "zlib.h"
+
+typedef void (*synctex_recorder_t) (halfword); /* recorders know how to record a node */
+typedef int (*synctex_fprintf_t) (void *, const char *, ...); /* print formatted to either FILE * or gzFile */
+
+# define SYNCTEX_BITS_PER_BYTE 8
+
+/* Here are all the local variables gathered in one "synchronization context" */
+static struct {
+ void *file; /* the foo.synctex or foo.synctex.gz I/O identifier */
+ synctex_fprintf_t fprintf; /* either fprintf or gzprintf */
+ char *busy_name; /* the real "foo.synctex(busy)" or "foo.synctex.gz(busy)" name, with output_directory */
+ char *root_name; /* in general jobname.tex */
+ integer count; /* The number of interesting records in "foo.synctex" */
+ /* next concern the last sync record encountered */
+ halfword node; /* the last synchronized node, must be set
+ * before the recorder */
+ synctex_recorder_t recorder;/* the recorder of the node above, the
+ * routine that knows how to record the
+ * node to the .synctex file */
+ integer tag, line; /* current tag and line */
+ integer curh, curv; /* current point */
+ integer magnification; /* The magnification as given by \mag */
+ integer unit; /* The unit, defaults to 1, use 8192 to produce shorter but less accurate info */
+ integer total_length; /* The total length of the bytes written since the last check point */
+ integer options; /* unsigned options */
+ integer lastv; /* compression trick if
+ |synctex_options&4|>0. */
+ integer form_depth; /* pdf forms are an example of nested sheets */
+ struct _flags {
+ unsigned int option_read:1; /* Command line option read (in case of problem or at the end) */
+ unsigned int content_ready:1; /* Command line option read (in case of problem or at the end) */
+ unsigned int off:1; /* Definitely turn off synctex, corresponds to cli option -synctex=0 */
+ unsigned int no_gz:1; /* Whether zlib is used or not */
+ unsigned int not_void:1; /* Whether it really contains synchronization material */
+ unsigned int warn:1; /* One shot warning flag */
+ unsigned int quoted:1; /* Whether the input file name was quoted by tex or not, for example "\"my input file.tex\"", unused by XeTeX */
+ unsigned int output_p:1; /* Whether the output_directory is used */
+ unsigned int reserved:SYNCTEX_BITS_PER_BYTE*sizeof(int)-8; /* Align */
+ } flags;
+} synctex_ctxt = {
+ NULL, NULL, NULL, NULL, 0, 0, NULL, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, {0,0,0,0,0,0,0,0,0}}; /* last_v_recorded is initialized to -1. */
+
+# define SYNCTEX_FILE synctex_ctxt.file
+# define SYNCTEX_CONTENT_READY (synctex_ctxt.flags.content_ready)
+# define SYNCTEX_IS_OFF (synctex_ctxt.flags.off)
+# define SYNCTEX_NO_GZ (synctex_ctxt.flags.no_gz)
+# define SYNCTEX_NOT_VOID (synctex_ctxt.flags.not_void)
+# define SYNCTEX_WARNING_DISABLE (synctex_ctxt.flags.warn)
+# define SYNCTEX_fprintf (*synctex_ctxt.fprintf)
+
+# define SYNCTEX_IS_READY (synctex_ctxt.flags.ready)
+
+# define SYNCTEX_NO_GZ_AUX_NAME\
+ (SYNCTEX_NO_GZ||((synctex_ctxt.options)&2)!=0)
+# define SYNCTEX_WITH_FORMS (((synctex_ctxt.options)&4)!=0)
+# define SYNCTEX_H_COMPRESS (((synctex_ctxt.options)&8)!=0)
+
+static inline void _synctex_read_command_line_option(void) {
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: _synctex_read_command_line_option\n");
+# endif
+ /* This is a one shot function, any subsequent call is void */
+ if (synctex_ctxt.flags.option_read) {
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: skipped\n");
+# endif
+ return;
+ }
+ if (SYNCTEX_NO_OPTION == synctex_options) {
+ /* No option given from the command line */
+ SYNCTEX_VALUE = 0;
+ } else if (synctex_options == 0) {
+ /* -synctex=0 was given: SyncTeX must be definitely disabled,
+ * any subsequent \synctex=N will have no effect at all */
+ SYNCTEX_IS_OFF = SYNCTEX_YES;
+ SYNCTEX_VALUE = 0;
+ } else {
+ /* the command line options are not ignored */
+ if (synctex_options < 0) {
+ SYNCTEX_NO_GZ = SYNCTEX_YES;
+ synctex_ctxt.options = -synctex_options;
+ } else {
+ SYNCTEX_NO_GZ = SYNCTEX_NO;
+ synctex_ctxt.options = synctex_options;
+ }
+ synctex_options|=1; /* Do it when positive */
+ /* Initialize the content of the \synctex primitive */
+ SYNCTEX_VALUE = synctex_options;
+ }
+ synctex_ctxt.flags.option_read = SYNCTEX_YES;
+ return;
+}
+/* Initialize the options, synchronize the variables.
+ * This is sent by *tex.web before any TeX macro is used.
+ * */
+void synctexinitcommand(void)
+{
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexinitcommand\n");
+# endif
+ _synctex_read_command_line_option();
+ return;
+}
+
+/* Free all memory used, close and remove the file if any,
+ * It is sent locally when there is a problem with synctex output.
+ * It is sent by pdftex when a fatal error occurred in pdftex.web. */
+void synctexabort(boolean log_opened __attribute__ ((unused)))
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctex_abort\n");
+# endif
+ if (SYNCTEX_FILE) {
+ if (SYNCTEX_NO_GZ) {
+ xfclose((FILE *) SYNCTEX_FILE, synctex_ctxt.busy_name);
+ } else {
+ gzclose((gzFile) SYNCTEX_FILE);
+ }
+ SYNCTEX_FILE = NULL;
+#if defined(W32UPTEXSYNCTEX)
+ fsyscp_remove(synctex_ctxt.busy_name);
+#else
+ remove(synctex_ctxt.busy_name);
+#endif /* W32UPTEXSYNCTEX */
+ SYNCTEX_FREE(synctex_ctxt.busy_name);
+ synctex_ctxt.busy_name = NULL;
+ }
+ if (NULL != synctex_ctxt.root_name) {
+ SYNCTEX_FREE(synctex_ctxt.root_name);
+ synctex_ctxt.root_name = NULL;
+ }
+ SYNCTEX_IS_OFF = SYNCTEX_YES; /* disable synctex */
+}
+
+static inline int synctex_record_preamble(void);
+static inline int synctex_record_input(integer tag, char *name);
+
+static const char *synctex_suffix = ".synctex";
+static const char *synctex_suffix_gz = ".gz";
+static const char *synctex_suffix_busy = "(busy)";
+
+/* for DIR_SEP_STRING */
+# include <kpathsea/c-pathch.h>
+/* for kpse_absolute_p */
+# include <kpathsea/absolute.h>
+
+#ifdef W32UPTEXSYNCTEX
+static char *chgto_oem(char *src)
+{
+ wchar_t *sw = NULL;
+ char *dst = NULL;
+ static int f_codepage = 0;
+
+ if(f_codepage == 0) {
+ f_codepage = AreFileApisANSI() ? GetACP() : GetOEMCP();
+ }
+
+ if(file_system_codepage == 0 || f_codepage == file_system_codepage) {
+ dst = xstrdup(src);
+ return dst;
+ }
+
+ sw = get_wstring_from_mbstring(file_system_codepage, src, sw);
+ dst = get_mbstring_from_wstring(f_codepage, sw, dst);
+ if(sw) free(sw);
+ return dst;
+}
+
+static gzFile fsyscp_gzopen(const char *path, const char *mode)
+{
+ gzFile gzf;
+ wchar_t *pathw = NULL;
+
+ if(!file_system_codepage)
+ return gzopen(path, mode);
+
+ pathw = get_wstring_from_fsyscp(path, pathw);
+ gzf = gzopen_w(pathw, mode);
+ free(pathw);
+ return gzf;
+}
+
+static int fsyscp_remove(char *s)
+{
+ wchar_t *sw = NULL;
+ int ret;
+
+ if(!file_system_codepage)
+ return remove(s);
+
+ sw = get_wstring_from_fsyscp(s, sw);
+ ret = _wremove(sw);
+ if(sw) free(sw);
+ return ret;
+}
+
+static int fsyscp_rename(char *s1, char *s2)
+{
+ wchar_t *sw1 = NULL, *sw2 = NULL;
+ int ret;
+
+ if(!file_system_codepage)
+ return rename(s1, s2);
+
+ sw1 = get_wstring_from_fsyscp(s1, sw1);
+ sw2 = get_wstring_from_fsyscp(s2, sw2);
+ ret = _wrename(sw1, sw2);
+ if(sw1) free(sw1);
+ if(sw2) free(sw2);
+ return ret;
+}
+
+#undef fopen
+extern FILE *f_fsyscp_fopen(const char *filename, const char *mode);
+#define fopen f_fsyscp_fopen
+#define gzopen fsyscp_gzopen
+#define rename fsyscp_rename
+#define remove fsyscp_remove
+#endif /* W32UPTEXSYNCTEX */
+
+/* synctex_dot_open ensures that the foo.synctex file is open.
+ * In case of problem, it definitely disables synchronization.
+ * Now all the output synchronization info is gathered in only one file.
+ * It is possible to split this info into as many different output files as sheets
+ * plus 1 for the control but the overall benefits are not so clear.
+ * For example foo-i.synctex would contain input synchronization
+ * information for page i alone.
+ * Options given through \synctex=Number are managed here too.
+ */
+static void *synctex_dot_open(void)
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nwarning: Synchronize DEBUG: synctex_dot_open\n");
+ printf("\nwarning: SYNCTEX_VALUE=%0X\n", SYNCTEX_VALUE);
+ printf("\nwarning: synctex_options=%0X\n", synctex_ctxt.options);
+# endif
+ if (SYNCTEX_IS_OFF || !SYNCTEX_VALUE) {
+ return NULL; /* synchronization is disabled: do nothing */
+ }
+ if (SYNCTEX_FILE) {
+ return SYNCTEX_FILE; /* synchronization is already enabled */
+ }
+ _synctex_read_command_line_option();
+# if SYNCTEX_DEBUG
+ printf("\nwarning: Synchronize DEBUG: synctex_dot_open 1\n");
+# endif
+ /* this is the first time we are asked to open the file
+ this part of code is executed only once:
+ either SYNCTEX_FILE is nonnegative or synchronization is
+ definitely disabled. */
+ {
+ char *tmp = SYNCTEX_GET_JOB_NAME();
+ size_t len = strlen(tmp);
+ if (len>0) {
+ /* jobname was set by the \jobname command on the *TeX side */
+ char *the_busy_name = xmalloc((size_t)
+ ( len
+ + strlen(synctex_suffix)
+ + strlen(synctex_suffix_busy)
+ + 1
+ + (output_directory?strlen(output_directory) + strlen(DIR_SEP_STRING):0)));
+ if (!the_busy_name) {
+ SYNCTEX_FREE(tmp);
+ tmp = NULL;
+ synctexabort(0);
+ return NULL;
+ }
+ /* Initialize the_busy_name to the void string */
+ the_busy_name[0] = (char)0;
+ /* If an output directory was specified, use it instead of cwd. */
+ if (output_directory && !kpse_absolute_p(tmp, false)) {
+ synctex_ctxt.flags.output_p = 1;
+ strcat(the_busy_name, output_directory);
+ strcat(the_busy_name, DIR_SEP_STRING);
+ }
+# if defined(XeTeX)
+ synctex_ctxt.flags.quoted = 0;
+ strcat(the_busy_name, tmp);
+# else
+ if (tmp[0] == '"' && tmp[len - 1] == '"') {
+ /* We are certainly on a pdftex like engine and the input file name did contain spaces inside.
+ Quotes where added around that file name. We prefer to remove the quotes to have a human readable name.
+ As of Fri Sep 19 14:00:01 UTC 2008, the file names containing quotes are not supported by pdfTeX
+ nor SyncTeX. */
+ synctex_ctxt.flags.quoted = 1; /* we will have to add quotes around the file name in the log file. */
+ tmp[len - 1] = (char)0; /* Remove the trailing " in order not to copy it */
+ strcat(the_busy_name, tmp + 1); /* only copy what follows the leading " character */
+ } else {
+ synctex_ctxt.flags.quoted = 0;
+ strcat(the_busy_name, tmp);
+ }
+# endif
+ SYNCTEX_FREE(tmp);
+ tmp = NULL;
+ strcat(the_busy_name, synctex_suffix);
+ /* Initialize SYNCTEX_NO_GZ with the content of \synctex to let the user choose the format. */
+ strcat(the_busy_name, synctex_suffix_busy);
+ if (SYNCTEX_NO_GZ) {
+ SYNCTEX_FILE = fopen(the_busy_name, FOPEN_W_MODE);
+ synctex_ctxt.fprintf = (synctex_fprintf_t) (&fprintf);
+ } else {
+ SYNCTEX_FILE = gzopen(the_busy_name, FOPEN_WBIN_MODE);
+ synctex_ctxt.fprintf = (synctex_fprintf_t) (&gzprintf);
+ }
+# if SYNCTEX_DEBUG
+ printf("\nwarning: Synchronize DEBUG: synctex_dot_open 2\n");
+# endif
+ if (SYNCTEX_FILE) {
+ if (SYNCTEX_NO_ERROR == synctex_record_preamble()) {
+ /* Initialization of the context */
+ if (synctex_ctxt.magnification == 0)
+ synctex_ctxt.magnification = 1000;
+ synctex_ctxt.unit = SYNCTEX_UNIT_FACTOR;
+ /* synctex_ctxt.busy_name was NULL before, it now owns the_busy_name */
+ synctex_ctxt.busy_name = the_busy_name;
+ the_busy_name = NULL;
+ /* print the preamble, this is quite an UTF8 file */
+ if (NULL != synctex_ctxt.root_name) {
+ synctex_record_input(1, synctex_ctxt.root_name);
+ SYNCTEX_FREE(synctex_ctxt.root_name);
+ synctex_ctxt.root_name = NULL;
+ }
+ synctex_ctxt.count = 0;
+# if SYNCTEX_DEBUG
+ fprintf(stdout,
+ "\nwarning: Synchronize DEBUG: synctex_dot_open SYNCTEX AVAILABLE\n");
+# endif
+ SYNCTEX_FREE(the_busy_name);
+ the_busy_name = NULL;
+ return SYNCTEX_FILE;
+ } else {
+ printf("\nSyncTeX warning: no synchronization, problem with %s\n",
+ the_busy_name);
+ }
+ }
+ SYNCTEX_FREE(the_busy_name);
+ the_busy_name = NULL;
+ } else {
+ printf("\nSyncTeX information: no synchronization with keyboard input\n");
+ }
+ /* no .synctex file available, so disable synchronization */
+ SYNCTEX_FREE(tmp);
+ tmp = NULL;
+ synctexabort(0);
+ return NULL;
+# if SYNCTEX_DEBUG
+ fprintf(stdout,
+ "\nwarning: Synchronize DEBUG: synctex_dot_open SYNCTEX DISABLED\n");
+# endif
+ }
+ return SYNCTEX_FILE;
+}
+
+static inline int synctex_record_content(void);
+static inline int synctex_record_settings(void);
+
+/**
+ * synctex_record_settings must be called very late,
+ * only once there is an opportunity to know whether
+ * in pdf or dvi mode.
+ */
+static void * synctex_prepare_content(void)
+{
+# if SYNCTEX_DEBUG
+ printf("\nwarning: Synchronize DEBUG: synctex_prepare_content\n");
+ printf("\nwarning: SYNCTEX_VALUE=%0X\n", SYNCTEX_VALUE);
+ printf("\nwarning: synctex_options=%0X\n", synctex_ctxt.options);
+# endif
+ if (SYNCTEX_CONTENT_READY) {
+ return SYNCTEX_FILE;
+ }
+ if ((NULL != synctex_dot_open())
+ && (SYNCTEX_NO_ERROR == synctex_record_settings())
+ && (SYNCTEX_NO_ERROR == synctex_record_content())) {
+ SYNCTEX_CONTENT_READY = SYNCTEX_YES;
+# if SYNCTEX_DEBUG
+ printf("\nwarning: DONE");
+# endif
+ return SYNCTEX_FILE;
+ }
+ synctexabort(0);
+ return NULL;
+}
+
+/* Each time TeX opens a file, it sends a synctexstartinput message and enters
+ * this function. Here, a new synchronization tag is created and stored in
+ * the synctex_tag_field of the TeX current input context. Each synchronized
+ * TeX node will record this tag instead of the file name. synctexstartinput
+ * writes the mapping synctag <-> file name to the .synctex (or .synctex.gz) file. A client
+ * will read the .synctex file and retrieve this mapping, it will be able to
+ * open the correct file just knowing its tag. If the same file is read
+ * multiple times, it might be associated to different tags. Synchronization
+ * controllers, either in viewers, editors or standalone should be prepared to
+ * handle this situation and take the appropriate action if they want to
+ * optimize memory. No two different files will have the same positive tag.
+ * It is not advisable to definitely store the file names here. If the file
+ * names ever have to be stored, it should definitely be done at the TeX level
+ * just like src-specials do, such that other components of the program can use
+ * it. This function does not make any difference between the files, it
+ * treats the same way .tex, .aux, .sty ... files, even if many of them do not
+ * contain any material meant to be typeset.
+ */
+void synctexstartinput(void)
+{
+ static unsigned int synctex_tag_counter = 0;
+
+ _synctex_read_command_line_option();
+
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nwarning: Synchronize DEBUG: synctexstartinput %i",
+ synctex_tag_counter);
+ printf("\nwarning: SYNCTEX_VALUE=%i", SYNCTEX_VALUE);
+ printf("\nwarning: synctex_options=%0X\n", synctex_ctxt.options);
+# endif
+
+ if (SYNCTEX_IS_OFF) {
+ return;
+ }
+ /* synctex_tag_counter is a counter uniquely identifying the file actually
+ * open. Each time tex opens a new file, synctexstartinput will increment this
+ * counter */
+ if (~synctex_tag_counter > 0) {
+ ++synctex_tag_counter;
+ } else {
+ /* we have reached the limit, subsequent files will be softly ignored
+ * this makes a lot of files... even in 32 bits
+ * Maybe we will limit this to 16bits and
+ * use the 16 other bits to store the column number */
+ SYNCTEX_CURRENT_TAG = 0;
+ return;
+ }
+ SYNCTEX_CURRENT_TAG = (int) synctex_tag_counter; /* -> *TeX.web */
+ if (synctex_tag_counter == 1) {
+ /* this is the first file TeX ever opens, in general \jobname.tex we
+ * do not know yet if synchronization will ever be enabled so we have
+ * to store the file name, because we will need it later.
+ * This is necessary because \jobname can be different */
+#ifdef W32UPTEXSYNCTEX
+ char *tmpa = SYNCTEX_GET_CURRENT_NAME();
+ synctex_ctxt.root_name = chgto_oem(tmpa);
+ free(tmpa);
+#else
+ synctex_ctxt.root_name = SYNCTEX_GET_CURRENT_NAME();
+#endif
+ if (!strlen(synctex_ctxt.root_name)) {
+ synctex_ctxt.root_name = xrealloc(synctex_ctxt.root_name, strlen("texput") + 1);
+ strcpy(synctex_ctxt.root_name, "texput");
+ }
+# if SYNCTEX_DEBUG
+ printf("\nwarning: Synchronize DEBUG: synctexstartinput first END\n");
+# endif
+ return;
+ }
+ if (SYNCTEX_FILE
+ || (NULL != synctex_dot_open())) {
+#ifdef W32UPTEXSYNCTEX
+ char *tmpb = SYNCTEX_GET_CURRENT_NAME();
+ char *tmp = chgto_oem(tmpb);
+ free(tmpb);
+#else
+ char *tmp = SYNCTEX_GET_CURRENT_NAME();
+#endif
+ /* Always record the input, even if SYNCTEX_VALUE is 0.
+ * It may happen when \synctex=0 was given temporarily
+ * in the source file.
+ */
+ synctex_record_input(SYNCTEX_CURRENT_TAG,tmp);
+ SYNCTEX_FREE(tmp);
+ }
+# if SYNCTEX_DEBUG
+ printf("\nwarning: Synchronize DEBUG: synctexstartinput END\n");
+# endif
+ return;
+}
+
+/* All the synctex... functions below have the smallest set of parameters. It
+ * appears to be either the address of a node, or nothing at all. Using zmem,
+ * which is the place where all the nodes are stored, one can retrieve every
+ * information about a node. The other information is obtained through the
+ * global context variable.
+ */
+
+static inline int synctex_record_postamble(void);
+
+
+/* Free all memory used and close the file,
+ * sent by close_files_and_terminate in tex.web.
+ * synctexterminate() is called when the TeX run terminates.
+ * If synchronization was active, the working synctex file is moved to
+ * the final synctex file name.
+ * If synchronization was not active of if there is no output,
+ * the synctex file is removed if any.
+ * That way we can be sure that any synctex file is in sync with a tex run.
+ * However, it does not mean that it will be in sync with the pdf, especially
+ * when the output is dvi or xdv and the dvi (or xdv) to pdf driver has not been applied.
+ */
+void synctexterminate(boolean log_opened)
+{
+ char *tmp = NULL;
+ char *the_real_syncname = NULL;
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexterminate\n");
+# endif
+ if (log_opened && (tmp = SYNCTEX_GET_LOG_NAME())) {
+ /* In version 1, the jobname was used but it caused problems regarding spaces in file names. */
+ the_real_syncname =
+ xmalloc((unsigned)(strlen(tmp)
+ + strlen(synctex_suffix)
+ + strlen(synctex_suffix_gz)
+ + 1));
+ if (!the_real_syncname) {
+ SYNCTEX_FREE(tmp);
+ synctexabort(0);
+ return;
+ }
+ strcpy(the_real_syncname, tmp);
+ SYNCTEX_FREE(tmp);
+ tmp = NULL;
+ /* now remove the last path extension which is in general log */
+ tmp = the_real_syncname + strlen(the_real_syncname);
+ while (tmp > the_real_syncname) {
+ --tmp;
+ if (*tmp == '.') {
+ *tmp = (char)0; /* end the string here */
+ break;
+ }
+ }
+ strcat(the_real_syncname, synctex_suffix);
+ if (!SYNCTEX_NO_GZ) {
+ /* Remove any uncompressed synctex file, from a previous build. */
+ remove(the_real_syncname);
+ if (!SYNCTEX_NO_GZ_AUX_NAME) {
+ strcat(the_real_syncname, synctex_suffix_gz);
+ }
+ }
+ /* allways remove the synctex output file before renaming it, windows requires it. */
+ if (0 != remove(the_real_syncname) && errno == EACCES) {
+ fprintf(stderr,
+ "SyncTeX: Can't remove %s (file is open or read only)\n",
+ the_real_syncname);
+ }
+ if (SYNCTEX_FILE) {
+ if (SYNCTEX_NOT_VOID) {
+ synctex_record_postamble();
+ /* close the synctex file */
+ if (SYNCTEX_NO_GZ) {
+ xfclose((FILE *) SYNCTEX_FILE, synctex_ctxt.busy_name);
+ } else {
+ gzclose((gzFile) SYNCTEX_FILE);
+ }
+ SYNCTEX_FILE = NULL;
+ /* renaming the working synctex file */
+ if (0 == rename(synctex_ctxt.busy_name, the_real_syncname)) {
+ if (log_opened) {
+ tmp = the_real_syncname;
+# if SYNCTEX_DO_NOT_LOG_OUTPUT_DIRECTORY
+ if (synctex_ctxt.flags.output_p) {
+ tmp += strlen(output_directory) + strlen(DIR_SEP_STRING);
+ }
+# endif
+#ifndef SYNCTEX_interaction
+# define SYNCTEX_interaction 1
+#endif
+ if (SYNCTEX_interaction>0) {
+#ifdef W32UPTEXSYNCTEX
+ {
+ char *stmp = chgto_oem(tmp);
+ printf((synctex_ctxt.flags.quoted ? "SyncTeX written on \"%s\"\n" : "\nSyncTeX written on %s.\n"),
+ stmp);
+ free(stmp);
+ }
+#else
+#ifndef SYNCTEX_PRE_NL
+# define SYNCTEX_PRE_NL "\n"
+#endif
+#ifndef SYNCTEX_POST_NL
+# define SYNCTEX_POST_NL ""
+#endif
+ printf((synctex_ctxt.flags.quoted ?
+ SYNCTEX_PRE_NL
+ "SyncTeX written on \"%s\""
+ SYNCTEX_POST_NL :
+ SYNCTEX_PRE_NL
+ "SyncTeX written on %s."
+ SYNCTEX_POST_NL
+ ),
+ tmp);
+#endif
+ }
+ tmp = NULL;
+ }
+ } else {
+ fprintf(stderr, "SyncTeX: Can't rename %s to %s\n",
+ synctex_ctxt.busy_name, the_real_syncname);
+ remove(synctex_ctxt.busy_name);
+ }
+ } else {
+ /* close and remove the synctex file because there are no pages of output */
+ if (SYNCTEX_NO_GZ) {
+ xfclose((FILE *) SYNCTEX_FILE, synctex_ctxt.busy_name);
+ } else {
+ gzclose((gzFile) SYNCTEX_FILE);
+ }
+ SYNCTEX_FILE = NULL;
+ remove(synctex_ctxt.busy_name);
+ }
+ }
+ if (SYNCTEX_NO_GZ || SYNCTEX_NO_GZ_AUX_NAME) {
+ /* Remove any compressed synctex file, from a previous build. */
+ strcat(the_real_syncname, synctex_suffix_gz);
+ remove(the_real_syncname);
+ }
+ } else if ((tmp = SYNCTEX_GET_JOB_NAME())) {
+ size_t len = strlen(tmp);
+ /* There was a problem with the output.
+ We just try to remove existing synctex output files
+ including the busy one. */
+ the_real_syncname = xmalloc((size_t)
+ (len
+ + strlen(synctex_suffix)
+ + strlen(synctex_suffix_gz)
+ + 1));
+ if (!the_real_syncname) {
+ SYNCTEX_FREE(tmp);
+ synctexabort(0);
+ return;
+ }
+# if defined(XeTeX)
+ strcpy(the_real_syncname, tmp);
+# else
+ if (len > 0 && tmp[0] == '"' && tmp[len - 1] == '"') {
+ /* See above a similar situation. */
+ strcpy(the_real_syncname, tmp + 1); /* only copy what follows the leading " character */
+ len = strlen(the_real_syncname);
+ if ((len > 0) && (the_real_syncname[len - 1] == '"')) {
+ the_real_syncname[len - 1] = '\0';
+ }
+ } else {
+ strcpy(the_real_syncname, tmp);
+ }
+# endif
+ SYNCTEX_FREE(tmp);
+ tmp = NULL;
+ strcat(the_real_syncname, synctex_suffix);
+ remove(the_real_syncname);
+ strcat(the_real_syncname, synctex_suffix_gz);
+ remove(the_real_syncname);
+ if (SYNCTEX_FILE) {
+ /* close the synctex file */
+ if (SYNCTEX_NO_GZ) {
+ xfclose((FILE *) SYNCTEX_FILE, synctex_ctxt.busy_name);
+ } else {
+ gzclose((gzFile) SYNCTEX_FILE);
+ }
+ SYNCTEX_FILE = NULL;
+ /* removing the working synctex file */
+ remove(synctex_ctxt.busy_name);
+ }
+ }
+ SYNCTEX_FREE(synctex_ctxt.busy_name);
+ synctex_ctxt.busy_name = NULL;
+ SYNCTEX_FREE(the_real_syncname);
+ the_real_syncname = NULL;
+ synctexabort(0);
+}
+
+static inline int synctex_record_sheet(integer sheet);
+
+/* Recording the "{..." line. In *tex.web, use synctex_sheet(pdf_output) at
+ * the very beginning of the ship_out procedure.
+ */
+void synctexsheet(integer mag)
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexsheet %i\n", mag);
+# endif
+ if (SYNCTEX_IS_OFF) {
+ if (SYNCTEX_VALUE && !SYNCTEX_WARNING_DISABLE) {
+ SYNCTEX_WARNING_DISABLE = SYNCTEX_YES;
+ printf
+ ("\nSyncTeX warning: Synchronization was disabled from\nthe command line with -synctex=0\nChanging the value of \\synctex has no effect.");
+ }
+ return;
+ }
+ if (SYNCTEX_GET_TOTAL_PAGES() == 0) {
+ /* Now it is time to properly set up the scale factor. */
+ if (mag > 0) {
+ synctex_ctxt.magnification = mag;
+ }
+ }
+ if (NULL != synctex_prepare_content()) {
+ /* First possibility: the .synctex file is already open because SyncTeX was activated on the CLI
+ * or it was activated with the \synctex macro and the first page is already shipped out.
+ * Second possibility: tries to open the .synctex, useful if synchronization was enabled
+ * from the source file and not from the CLI. */
+ synctex_record_sheet(SYNCTEX_GET_TOTAL_PAGES()+1);
+ }
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexsheet END\n");
+# endif
+ return;
+}
+
+static inline int synctex_record_anchor(void);
+static inline int synctex_record_teehs(integer sheet);
+
+/* Recording the "}..." line. In *tex.web, use synctex_teehs at
+ * the very end of the ship_out procedure.
+ */
+void synctexteehs(void)
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexteehs\n");
+# endif
+ if (SYNCTEX_IS_OFF || !SYNCTEX_FILE) {
+ return;
+ }
+ synctex_record_teehs(SYNCTEX_GET_TOTAL_PAGES());/* not SYNCTEX_GET_TOTAL_PAGES()+1*/
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexteehs END\n");
+# endif
+ return;
+}
+
+/* The SYNCTEX_IGNORE macro is used to detect unproperly initialized nodes. See
+ * details in the implementation of the functions below. */
+# define SYNCTEX_IGNORE(NODE) SYNCTEX_IS_OFF || !SYNCTEX_VALUE || !SYNCTEX_FILE || (synctex_ctxt.form_depth>0 && !SYNCTEX_WITH_FORMS)
+#define SYNCTEX_RECORD_LEN_OR_RETURN_ERR do {\
+ if (len > 0) {\
+ synctex_ctxt.total_length += len;\
+ ++synctex_ctxt.count;\
+ } else {\
+ return -1;\
+ } } while(false)
+#define SYNCTEX_RECORD_LEN_AND_RETURN_NOERR do {\
+ if (len > 0) {\
+ synctex_ctxt.total_length += len;\
+ ++synctex_ctxt.count;\
+ return SYNCTEX_NOERR;\
+ } } while(false)
+
+/* Recording a "}..." or a ">" line */
+static inline int synctex_record_teehs(integer sheet)
+{
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_teehs\n");
+# endif
+ if (SYNCTEX_NOERR == synctex_record_anchor()) {
+ int len = SYNCTEX_fprintf(SYNCTEX_FILE, "}%i\n", sheet);
+ SYNCTEX_RECORD_LEN_AND_RETURN_NOERR;
+ }
+ synctexabort(0);
+ return -1;
+}
+
+# define SYNCTEX_CTXT_CURH \
+(synctex_ctxt.curh)
+# define SYNCTEX_CTXT_CURV \
+(synctex_ctxt.curv)
+# define SYNCTEX_SHOULD_COMPRESS_V \
+SYNCTEX_H_COMPRESS && (synctex_ctxt.lastv == SYNCTEX_CTXT_CURV)
+
+#if SYNCTEX_SUPPORT_PDF_FORM
+
+static inline int synctex_record_pdfxform(halfword form);
+
+/* glue code, this message is sent whenever a pdf form will ship out
+ See pdftex.web: procedure out_form(p: pointer); */
+void synctexpdfxform(halfword p)
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexpdfxform\n");
+# endif
+ if (SYNCTEX_IS_OFF) {
+ if (SYNCTEX_VALUE && !SYNCTEX_WARNING_DISABLE) {
+ SYNCTEX_WARNING_DISABLE = SYNCTEX_YES;
+ printf
+ ("\nSyncTeX warning: Synchronization was disabled from\nthe command line with -synctex=0\nChanging the value of \\synctex has no effect.");
+ }
+ return;
+ }
+ if (NULL != synctex_prepare_content()) {
+ synctex_record_pdfxform(p);
+ }
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexpdfxform END\n");
+# endif
+ return;
+}
+
+static inline int synctex_record_mrofxfdp(void);
+
+/* glue code, this message is sent whenever a pdf form did ship out */
+void synctexmrofxfdp(void)
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexmrofxfdp\n");
+# endif
+ if (SYNCTEX_FILE) {
+ synctex_record_mrofxfdp();
+ }
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexmrofxfdp END\n");
+# endif
+ return;
+}
+
+static inline int synctex_record_node_pdfrefxform(int formout);
+
+/* glue code, this message is sent whenever a pdf form ref will ship out
+ See pdftex.web: procedure out_form(p: pointer); */
+void synctexpdfrefxform(int objnum)
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexpdfrefxform\n");
+# endif
+ if (SYNCTEX_FILE) {
+ synctex_record_node_pdfrefxform(objnum);
+ }
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexpdfrefxform END\n");
+# endif
+ return;
+}
+
+/* Recording a "<..." line */
+static inline int synctex_record_pdfxform(halfword form)
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctex_record_pdfxform\n");
+# endif
+ if (SYNCTEX_IGNORE(nothing)) {
+ return SYNCTEX_NO_ERROR;
+ } else {
+ ++synctex_ctxt.form_depth;
+ if (SYNCTEX_WITH_FORMS) {
+ int len = SYNCTEX_fprintf(SYNCTEX_FILE, "<%i\n",
+ SYNCTEX_PDF_CUR_FORM);
+ SYNCTEX_RECORD_LEN_AND_RETURN_NOERR;
+ } else {
+ return SYNCTEX_NO_ERROR;
+ }
+ }
+ synctexabort(0);
+ return -1;
+}
+
+/* Recording a ">" line */
+static inline int synctex_record_mrofxfdp(void)
+{
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_mrofxfpd\n");
+# endif
+ if (SYNCTEX_NOERR == synctex_record_anchor()) {
+ --synctex_ctxt.form_depth;
+ if (SYNCTEX_WITH_FORMS) {
+ int len = SYNCTEX_fprintf(SYNCTEX_FILE, ">\n",
+ SYNCTEX_PDF_CUR_FORM);
+ SYNCTEX_RECORD_LEN_AND_RETURN_NOERR;
+ } else {
+ return SYNCTEX_NO_ERROR;
+ }
+ }
+ synctexabort(0);
+ return -1;
+}
+
+/* Recording a "f..." line */
+static inline int synctex_record_node_pdfrefxform(int objnum)//UNUSED form JL
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctex_record_node_pdfrefxform\n");
+# endif
+ synctex_ctxt.curh = SYNCTEX_CURH;
+ synctex_ctxt.curv = SYNCTEX_CURV;
+ if (SYNCTEX_IGNORE(nothing)) {
+ return SYNCTEX_NO_ERROR;
+ } else if (synctex_ctxt.form_depth>0 && !SYNCTEX_WITH_FORMS) {
+ return SYNCTEX_NO_ERROR;
+ } else {
+ int len = 0;
+ if (SYNCTEX_SHOULD_COMPRESS_V) {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "f%i:%i,=\n",
+ objnum,
+ SYNCTEX_CURH UNIT);
+ } else {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "f%i:%i,%i\n",
+ objnum,
+ SYNCTEX_CURH UNIT,
+ SYNCTEX_CURV UNIT);
+ synctex_ctxt.lastv = SYNCTEX_CURV;
+ }
+ SYNCTEX_RECORD_LEN_AND_RETURN_NOERR;
+ }
+ synctexabort(0);
+ return -1;
+}
+#else
+/* DO NOTHING functions.
+ Any engine will have these functions, even when not using pdf xforms.
+ One shoud be able to replace these void implementaions with an alternation in the header file.
+ */
+void synctexpdfxform(halfword p)
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: DO NOTHING synctexpdfxform\n");
+# endif
+ return;
+}
+void synctexmrofxfdp(void)
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: DO NOTHING synctexmrofxfdp END\n");
+# endif
+ return;
+}
+void synctexpdfrefxform(int objnum)
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: DO NOTHING synctexpdfrefxform\n");
+# endif
+ return;
+}
+#endif
+/*#if SYNCTEX_SUPPORT_PDF_FORM*/
+
+static inline void synctex_record_node_vlist(halfword p);
+
+/* When an hlist ships out, it can contain many different kern/glue nodes with
+ * exactly the same sync tag and line. To reduce the size of the .synctex
+ * file, we only display a kern node sync info when either the sync tag or the
+ * line changes. Also, we try ro reduce the distance between the chosen nodes
+ * in order to improve accuracy. It means that we display information for
+ * consecutive nodes, as far as possible. This tricky part uses a "recorder",
+ * which is the address of the routine that knows how to write the
+ * synchronization info to the .synctex file. It also uses criteria to detect
+ * a change in the context, this is the macro SYNCTEX_???_CONTEXT_DID_CHANGE.*/
+
+/* This message is sent when a vlist will be shipped out, more precisely at
+ * the beginning of the vlist_out procedure in *TeX.web. It will be balanced
+ * by a synctex_tsilv, sent at the end of the vlist_out procedure. p is the
+ * address of the vlist. We assume that p is really a vlist node! */
+void synctexvlist(halfword this_box)
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexhlist\n");
+# endif
+ if (SYNCTEX_IGNORE(this_box)) {
+ return;
+ }
+ synctex_ctxt.node = this_box; /* 0 to reset */
+ synctex_ctxt.recorder = NULL; /* reset */
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(this_box,box);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(this_box,box);
+ synctex_ctxt.curh = SYNCTEX_CURH;
+ synctex_ctxt.curv = SYNCTEX_CURV;
+ synctex_record_node_vlist(this_box);
+}
+
+static inline void synctex_record_node_tsilv(halfword p);
+
+/* Recording a "f" line ending a vbox: this message is sent whenever a vlist
+ * has been shipped out. It is used to close the vlist nesting level. It is
+ * sent at the end of the vlist_out procedure in *TeX.web to balance a former
+ * synctex_vlist sent at the beginning of that procedure. */
+void synctextsilv(halfword this_box)
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctextsilv\n");
+# endif
+ if (SYNCTEX_IGNORE(this_box)) {
+ return;
+ }
+ /* Ignoring any pending info to be recorded */
+ synctex_ctxt.node = this_box; /* 0 to reset */
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(this_box,box);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(this_box,box);
+ synctex_ctxt.curh = SYNCTEX_CURH;
+ synctex_ctxt.curv = SYNCTEX_CURV;
+ synctex_ctxt.recorder = NULL;
+ synctex_record_node_tsilv(this_box);
+}
+
+static inline void synctex_record_node_void_vlist(halfword p);
+
+/* This message is sent when a void vlist will be shipped out.
+ * There is no need to balance a void vlist. */
+void synctexvoidvlist(halfword p, halfword this_box __attribute__ ((unused)))
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexvoidvlist\n");
+# endif
+ if (SYNCTEX_IGNORE(p)) {
+ return;
+ }
+ synctex_ctxt.node = p; /* reset */
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p,box);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(p,box);
+ synctex_ctxt.curh = SYNCTEX_CURH;
+ synctex_ctxt.curv = SYNCTEX_CURV;
+ synctex_ctxt.recorder = NULL; /* reset */
+ synctex_record_node_void_vlist(p);
+}
+
+static inline void synctex_record_hlist(halfword p);
+
+/* This message is sent when an hlist will be shipped out, more precisely at
+ * the beginning of the hlist_out procedure in *TeX.web. It will be balanced
+ * by a synctex_tsilh, sent at the end of the hlist_out procedure. p is the
+ * address of the hlist We assume that p is really an hlist node! */
+void synctexhlist(halfword this_box)
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexhlist\n");
+# endif
+ if (SYNCTEX_IGNORE(this_box)) {
+ return;
+ }
+ synctex_ctxt.node = this_box; /* 0 to reset */
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(this_box,box);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(this_box,box);
+ synctex_ctxt.curh = SYNCTEX_CURH;
+ synctex_ctxt.curv = SYNCTEX_CURV;
+ synctex_ctxt.recorder = NULL; /* reset */
+ synctex_record_hlist(this_box);
+}
+
+static inline void synctex_record_node_tsilh(halfword p);
+
+/* Recording a ")" line ending an hbox this message is sent whenever an hlist
+ * has been shipped out it is used to close the hlist nesting level. It is
+ * sent at the end of the hlist_out procedure in *TeX.web to balance a former
+ * synctex_hlist sent at the beginning of that procedure. */
+void synctextsilh(halfword this_box)
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctextsilh\n");
+# endif
+ if (SYNCTEX_IGNORE(this_box)) {
+ return;
+ }
+ /* Ignoring any pending info to be recorded */
+ synctex_ctxt.node = this_box; /* 0 to force next node to be recorded! */
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(this_box,box);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(this_box,box);
+ synctex_ctxt.curh = SYNCTEX_CURH;
+ synctex_ctxt.curv = SYNCTEX_CURV;
+ synctex_ctxt.recorder = NULL; /* reset */
+ synctex_record_node_tsilh(this_box);
+}
+
+static inline void synctex_record_node_void_hlist(halfword p);
+
+/* This message is sent when a void hlist will be shipped out.
+ * There is no need to balance a void hlist. */
+void synctexvoidhlist(halfword p, halfword this_box __attribute__ ((unused)))
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexvoidhlist\n");
+# endif
+ if (SYNCTEX_IGNORE(p)) {
+ return;
+ }
+ /* the sync context has changed */
+ if (synctex_ctxt.recorder != NULL) {
+ /* but was not yet recorded */
+ (*synctex_ctxt.recorder) (synctex_ctxt.node);
+ }
+ synctex_ctxt.node = p; /* 0 to reset */
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p,box);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(p,box);
+ synctex_ctxt.curh = SYNCTEX_CURH;
+ synctex_ctxt.curv = SYNCTEX_CURV;
+ synctex_ctxt.recorder = NULL; /* reset */
+ synctex_record_node_void_hlist(p);
+}
+
+/* With LuaTeX we have to consider other node sizes than medium ones */
+# define SYNCTEX_IGNORE_NODE(NODE,TYPE) SYNCTEX_IS_OFF || !SYNCTEX_VALUE \
+|| (synctex_ctxt.form_depth>0 && !SYNCTEX_WITH_FORMS) \
+|| (0 >= SYNCTEX_TAG_MODEL(NODE,TYPE)) \
+|| (0 >= SYNCTEX_LINE_MODEL(NODE,TYPE))
+/* This macro will detect a change in the synchronization context. As long as
+ * the synchronization context remains the same, there is no need to write
+ * synchronization info: it would not help more. The synchronization context
+ * has changed when either the line number or the file tag has changed. */
+# define SYNCTEX_CONTEXT_DID_CHANGE(NODE,TYPE) ((0 == synctex_ctxt.node)\
+|| (SYNCTEX_TAG_MODEL(NODE,TYPE) != synctex_ctxt.tag)\
+|| (SYNCTEX_LINE_MODEL(NODE,TYPE) != synctex_ctxt.line))
+
+void synctex_record_node_math(halfword p);
+
+/* glue code, this message is sent whenever an inline math node will ship out
+ See: @ @<Output the non-|char_node| |p| for... */
+void synctexmath(halfword p, halfword this_box __attribute__ ((unused)))
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexmath\n");
+# endif
+ if (SYNCTEX_IGNORE(p)) {
+ return;
+ }
+ if ((synctex_ctxt.recorder != NULL) && SYNCTEX_CONTEXT_DID_CHANGE(p,math)) {
+ /* the sync context did change */
+ (*synctex_ctxt.recorder) (synctex_ctxt.node);
+ }
+ synctex_ctxt.node = p;
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p,math);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(p,math);
+ synctex_ctxt.curh = SYNCTEX_CURH;
+ synctex_ctxt.curv = SYNCTEX_CURV;
+ synctex_ctxt.recorder = NULL;/* no need to record once more */
+ synctex_record_node_math(p);/* always record synchronously */
+}
+
+static inline void synctex_record_node_glue(halfword p);
+static inline void synctex_record_node_rule(halfword p);
+static inline void synctex_record_node_kern(halfword p);
+
+/* this message is sent whenever an horizontal glue node or rule node ships out
+ See: move_past:... */
+# undef SYNCTEX_IGNORE
+# define SYNCTEX_IGNORE(NODE,TYPE) SYNCTEX_IS_OFF || !SYNCTEX_VALUE \
+|| (0 >= SYNCTEX_TAG_MODEL(NODE,TYPE)) \
+|| (0 >= SYNCTEX_LINE_MODEL(NODE,TYPE))
+void synctexhorizontalruleorglue(halfword p, halfword this_box
+ __attribute__ ((unused)))
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexhorizontalruleorglue\n");
+# endif
+ switch (SYNCTEX_TYPE(p)) {
+ case rule_node:
+ if (SYNCTEX_IGNORE(p,rule)) {
+ return;
+ }
+ break;
+ case glue_node:
+ if (SYNCTEX_IGNORE(p,glue)) {
+ return;
+ }
+ break;
+ case kern_node:
+ if (SYNCTEX_IGNORE(p,kern)) {
+ return;
+ }
+ break;
+ default:
+ printf("\nSynchronize ERROR: unknown node type %i\n", SYNCTEX_TYPE(p));
+ }
+ synctex_ctxt.node = p;
+ synctex_ctxt.curh = SYNCTEX_CURH;
+ synctex_ctxt.curv = SYNCTEX_CURV;
+ synctex_ctxt.recorder = NULL;
+ switch (SYNCTEX_TYPE(p)) {
+ case rule_node:
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p,rule);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(p,rule);
+ synctex_record_node_rule(p); /* always record synchronously: maybe some text is outside the box */
+ break;
+ case glue_node:
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p,glue);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(p,glue);
+ synctex_record_node_glue(p); /* always record synchronously: maybe some text is outside the box */
+ break;
+ case kern_node:
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p,kern);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(p,kern);
+ synctex_record_node_kern(p); /* always record synchronously: maybe some text is outside the box */
+ break;
+ default:
+ printf("\nSynchronize ERROR: unknown node type %i\n", SYNCTEX_TYPE(p));
+ }
+}
+
+/* this message is sent whenever a kern node ships out
+ See: @ @<Output the non-|char_node| |p| for... */
+void synctexkern(halfword p, halfword this_box)
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexkern\n");
+# endif
+ if (SYNCTEX_IGNORE(p,kern)) {
+ return;
+ }
+ if (SYNCTEX_CONTEXT_DID_CHANGE(p,kern)) {
+ /* the sync context has changed */
+ if (synctex_ctxt.recorder != NULL) {
+ /* but was not yet recorded */
+ (*synctex_ctxt.recorder) (synctex_ctxt.node);
+ }
+ if (synctex_ctxt.node == this_box) {
+ /* first node in the list */
+ synctex_ctxt.node = p;
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p,kern);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(p,kern);
+ synctex_ctxt.recorder = &synctex_record_node_kern;
+ } else {
+ synctex_ctxt.node = p;
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p,kern);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(p,kern);
+ synctex_ctxt.recorder = NULL;
+ /* always record when the context has just changed
+ * and when not the first node */
+ synctex_record_node_kern(p);
+ }
+ } else {
+ /* just update the geometry and type (for future improvements) */
+ synctex_ctxt.node = p;
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p,kern);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(p,kern);
+ synctex_ctxt.recorder = &synctex_record_node_kern;
+ }
+}
+
+/* This last part is used as a tool to infer TeX behaviour,
+ * but not for direct synchronization. */
+# undef SYNCTEX_IGNORE
+# define SYNCTEX_IGNORE(NODE) SYNCTEX_IS_OFF || !SYNCTEX_VALUE || !SYNCTEX_FILE \
+|| (synctex_ctxt.count>2000)
+
+void synctex_record_node_char(halfword p);
+
+/* this message is sent whenever a char node ships out */
+void synctexchar(halfword p, halfword this_box __attribute__ ((unused)))
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexchar\n");
+# endif
+ if (SYNCTEX_IGNORE(p)) {
+ return;
+ }
+ if (synctex_ctxt.recorder != NULL) {
+ /* but was not yet recorded */
+ (*synctex_ctxt.recorder) (synctex_ctxt.node);
+ }
+ synctex_ctxt.node = p;
+ synctex_ctxt.tag = 0;
+ synctex_ctxt.line = 0;
+ synctex_ctxt.recorder = NULL;
+ /* always record when the context has just changed */
+ synctex_record_node_char(p);
+}
+
+void synctex_record_node_unknown(halfword p);
+
+# undef SYNCTEX_IGNORE
+# define SYNCTEX_IGNORE(NODE) (SYNCTEX_IS_OFF || !SYNCTEX_VALUE || !SYNCTEX_FILE)
+
+/* this message should be sent to record information
+ for a node of an unknown type */
+void synctexnode(halfword p, halfword this_box __attribute__ ((unused)))
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexnode\n");
+# endif
+ if (SYNCTEX_IGNORE(p)) {
+ return;
+ }
+ /* always record, not very usefull yet */
+ synctex_record_node_unknown(p);
+}
+
+/* this message should be sent to record information
+ synchronously for the current location */
+void synctexcurrent(void)
+{
+ SYNCTEX_RETURN_IF_DISABLED;
+# if SYNCTEX_DEBUG
+ printf("\nSynchronize DEBUG: synctexcurrent\n");
+# endif
+ if (SYNCTEX_IGNORE(nothing)) {
+ return;
+ } else {
+ int len = 0;
+ if (SYNCTEX_SHOULD_COMPRESS_V) {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "x%i,%i:%i,=\n",
+ synctex_ctxt.tag,synctex_ctxt.line,
+ SYNCTEX_CURH UNIT);
+ } else {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "x%i,%i:%i,%i\n",
+ synctex_ctxt.tag,synctex_ctxt.line,
+ SYNCTEX_CURH UNIT,
+ SYNCTEX_CURV UNIT);
+ synctex_ctxt.lastv = SYNCTEX_CURV;
+ }
+ if (len > 0) {
+ synctex_ctxt.total_length += len;
+ return;
+ }
+ }
+ synctexabort(0);
+ return;
+}
+
+/* Recording the settings */
+static inline int synctex_record_settings(void)
+{
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_settings\n");
+# endif
+ if (NULL == SYNCTEX_FILE) {
+ return SYNCTEX_NOERR;
+ }
+ if (SYNCTEX_FILE) {
+ int len = SYNCTEX_fprintf(SYNCTEX_FILE, "Output:%s\nMagnification:%i\nUnit:%i\nX Offset:%i\nY Offset:%i\n",
+ SYNCTEX_OUTPUT,synctex_ctxt.magnification,synctex_ctxt.unit,
+ ((SYNCTEX_OFFSET_IS_PDF != 0) ? 0 : 4736287 UNIT),
+ ((SYNCTEX_OFFSET_IS_PDF != 0) ? 0 : 4736287 UNIT));
+ if (len > 0) {
+ synctex_ctxt.total_length += len;
+ return SYNCTEX_NOERR;
+ }
+ }
+ synctexabort(0);
+ return -1;
+}
+
+/* Recording a "SyncTeX..." line */
+static inline int synctex_record_preamble(void)
+{
+ int len = 0;
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_preamble\n");
+# endif
+ len =
+ SYNCTEX_fprintf(SYNCTEX_FILE, "SyncTeX Version:%i\n",
+ synctex_ctxt.options>SYNCTEX_VERSION?
+ synctex_ctxt.options:SYNCTEX_VERSION);
+ if (len > 0) {
+ synctex_ctxt.total_length = len;
+ return SYNCTEX_NOERR;
+ }
+ synctexabort(0);
+ return -1;
+}
+
+/* Recording a "Input:..." line */
+static inline int synctex_record_input(integer tag, char *name)
+{
+ int len = 0;
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_input\n");
+# endif
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "Input:%i:%s\n", tag, name);
+ if (len > 0) {
+ synctex_ctxt.total_length += len;
+ return SYNCTEX_NOERR;
+ }
+ synctexabort(0);
+ return -1;
+}
+
+/* Recording a "!..." line */
+static inline int synctex_record_anchor(void)
+{
+ int len = 0;
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_anchor\n");
+ printf("\nSYNCTEX_FILE:%p\n",SYNCTEX_FILE);
+ printf("\ntotal_length:%i\n",synctex_ctxt.total_length);
+# endif
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "!%i\n", synctex_ctxt.total_length);
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_anchor 1\n");
+# endif
+ if (len > 0) {
+ synctex_ctxt.total_length = len;
+ ++synctex_ctxt.count;
+ return SYNCTEX_NOERR;
+ }
+ synctexabort(0);
+ return -1;
+}
+
+/* Recording a "Content" line */
+static inline int synctex_record_content(void)
+{
+ int len = 0;
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_content\n");
+# endif
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "Content:\n");
+ if (len > 0) {
+ synctex_ctxt.total_length += len;
+ return SYNCTEX_NOERR;
+ }
+ synctexabort(0);
+ return -1;
+}
+
+/* Recording a "{..." line */
+static inline int synctex_record_sheet(integer sheet)
+{
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_sheet\n");
+# endif
+ if (SYNCTEX_NOERR == synctex_record_anchor()) {
+ int len = SYNCTEX_fprintf(SYNCTEX_FILE, "{%i\n", sheet);
+ SYNCTEX_RECORD_LEN_AND_RETURN_NOERR;
+ }
+ synctexabort(0);
+ return -1;
+}
+
+/* Recording a "v..." line */
+static inline void synctex_record_node_void_vlist(halfword p)
+{
+ int len = 0;
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_node_void_vlist\n");
+# endif
+ if (SYNCTEX_SHOULD_COMPRESS_V) {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "v%i,%i:%i,=:%i,%i,%i\n",
+ SYNCTEX_TAG_MODEL(p,box),
+ SYNCTEX_LINE_MODEL(p,box),
+ SYNCTEX_CTXT_CURH UNIT,
+ SYNCTEX_WIDTH(p) UNIT,
+ SYNCTEX_HEIGHT(p) UNIT,
+ SYNCTEX_DEPTH(p) UNIT);
+ } else {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "v%i,%i:%i,%i:%i,%i,%i\n",
+ SYNCTEX_TAG_MODEL(p,box),
+ SYNCTEX_LINE_MODEL(p,box),
+ SYNCTEX_CTXT_CURH UNIT,
+ SYNCTEX_CTXT_CURV UNIT,
+ SYNCTEX_WIDTH(p) UNIT,
+ SYNCTEX_HEIGHT(p) UNIT,
+ SYNCTEX_DEPTH(p) UNIT);
+ synctex_ctxt.lastv = SYNCTEX_CTXT_CURV;
+ }
+# define SYNCTEX_RECORD_LEN_AND_RETURN do {\
+ if (len > 0) {\
+ synctex_ctxt.total_length += len;\
+ ++synctex_ctxt.count;\
+ return;\
+ } } while(false)
+ SYNCTEX_RECORD_LEN_AND_RETURN;
+ synctexabort(0);
+ return;
+}
+
+/* Recording a "[..." line */
+static inline void synctex_record_node_vlist(halfword p)
+{
+ int len = 0;
+ SYNCTEX_NOT_VOID = SYNCTEX_YES;
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_node_vlist\n");
+# endif
+ if (SYNCTEX_SHOULD_COMPRESS_V) {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "[%i,%i:%i,=:%i,%i,%i\n",
+ SYNCTEX_TAG_MODEL(p,box),
+ SYNCTEX_LINE_MODEL(p,box),
+ SYNCTEX_CTXT_CURH UNIT,
+ SYNCTEX_WIDTH(p) UNIT,
+ SYNCTEX_HEIGHT(p) UNIT,
+ SYNCTEX_DEPTH(p) UNIT);
+ } else {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "[%i,%i:%i,%i:%i,%i,%i\n",
+ SYNCTEX_TAG_MODEL(p,box),
+ SYNCTEX_LINE_MODEL(p,box),
+ SYNCTEX_CTXT_CURH UNIT,
+ SYNCTEX_CTXT_CURV UNIT,
+ SYNCTEX_WIDTH(p) UNIT,
+ SYNCTEX_HEIGHT(p) UNIT,
+ SYNCTEX_DEPTH(p) UNIT);
+ synctex_ctxt.lastv = SYNCTEX_CTXT_CURV;
+ }
+ SYNCTEX_RECORD_LEN_AND_RETURN;
+ synctexabort(0);
+ return;
+}
+
+/* Recording a "]..." line */
+static inline void synctex_record_node_tsilv(halfword p __attribute__ ((unused)))
+{
+ int len = 0;
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_node_tsilv\n");
+# endif
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "]\n");
+ SYNCTEX_RECORD_LEN_AND_RETURN;
+ synctexabort(0);
+ return;
+}
+
+/* Recording a "h..." line */
+static inline void synctex_record_node_void_hlist(halfword p)
+{
+ int len = 0;
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_node_void_hlist\n");
+# endif
+ if (SYNCTEX_SHOULD_COMPRESS_V) {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "h%i,%i:%i,=:%i,%i,%i\n",
+ SYNCTEX_TAG_MODEL(p,box),
+ SYNCTEX_LINE_MODEL(p,box),
+ SYNCTEX_CTXT_CURH UNIT,
+ SYNCTEX_WIDTH(p) UNIT,
+ SYNCTEX_HEIGHT(p) UNIT,
+ SYNCTEX_DEPTH(p) UNIT);
+ } else {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "h%i,%i:%i,%i:%i,%i,%i\n",
+ SYNCTEX_TAG_MODEL(p,box),
+ SYNCTEX_LINE_MODEL(p,box),
+ SYNCTEX_CTXT_CURH UNIT,
+ SYNCTEX_CTXT_CURV UNIT,
+ SYNCTEX_WIDTH(p) UNIT,
+ SYNCTEX_HEIGHT(p) UNIT,
+ SYNCTEX_DEPTH(p) UNIT);
+ synctex_ctxt.lastv = SYNCTEX_CTXT_CURV;
+ }
+ SYNCTEX_RECORD_LEN_AND_RETURN;
+ synctexabort(0);
+ return;
+}
+
+/* Recording a "(..." line */
+static inline void synctex_record_hlist(halfword p)
+{
+ int len = 0;
+ SYNCTEX_NOT_VOID = SYNCTEX_YES;
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_hlist\n");
+# endif
+ if (SYNCTEX_SHOULD_COMPRESS_V) {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "(%i,%i:%i,=:%i,%i,%i\n",
+ SYNCTEX_TAG_MODEL(p,box),
+ SYNCTEX_LINE_MODEL(p,box),
+ SYNCTEX_CTXT_CURH UNIT,
+ SYNCTEX_WIDTH(p) UNIT,
+ SYNCTEX_HEIGHT(p) UNIT,
+ SYNCTEX_DEPTH(p) UNIT);
+ } else {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "(%i,%i:%i,%i:%i,%i,%i\n",
+ SYNCTEX_TAG_MODEL(p,box),
+ SYNCTEX_LINE_MODEL(p,box),
+ SYNCTEX_CTXT_CURH UNIT,
+ SYNCTEX_CTXT_CURV UNIT,
+ SYNCTEX_WIDTH(p) UNIT,
+ SYNCTEX_HEIGHT(p) UNIT,
+ SYNCTEX_DEPTH(p) UNIT);
+ synctex_ctxt.lastv = SYNCTEX_CTXT_CURV;
+ }
+ SYNCTEX_RECORD_LEN_AND_RETURN;
+ synctexabort(0);
+ return;
+}
+
+/* Recording a ")..." line */
+static inline void synctex_record_node_tsilh(halfword p __attribute__ ((unused)))
+{
+ int len = 0;
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_node_tsilh\n");
+# endif
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, ")\n");
+ SYNCTEX_RECORD_LEN_AND_RETURN;
+ synctexabort(0);
+ return;
+}
+
+/* Recording a "Count..." line */
+static inline int synctex_record_count(void)
+{
+ int len = 0;
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_count\n");
+# endif
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "Count:%i\n", synctex_ctxt.count);
+ if (len > 0) {
+ synctex_ctxt.total_length += len;
+ return SYNCTEX_NOERR;
+ }
+ synctexabort(0);
+ return -1;
+}
+
+/* Recording a "Postamble" section */
+static inline int synctex_record_postamble(void)
+{
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_postamble\n");
+# endif
+ if (SYNCTEX_NOERR == synctex_record_anchor()) {
+ int len = SYNCTEX_fprintf(SYNCTEX_FILE, "Postamble:\n");
+ if (len > 0) {
+ synctex_ctxt.total_length += len;
+ if (synctex_record_count() || synctex_record_anchor()) {
+ } else {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "Post scriptum:\n");
+ if (len > 0) {
+ synctex_ctxt.total_length += len;
+ return SYNCTEX_NOERR;
+ }
+ }
+ }
+ }
+ synctexabort(0);
+ return -1;
+}
+
+/* Recording a "g..." line */
+static inline void synctex_record_node_glue(halfword p)
+{
+ int len = 0;
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_node_glue\n");
+# endif
+ if (SYNCTEX_SHOULD_COMPRESS_V) {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "g%i,%i:%i,=\n",
+ SYNCTEX_TAG_MODEL(p,glue),
+ SYNCTEX_LINE_MODEL(p,glue),
+ SYNCTEX_CTXT_CURH UNIT);
+ } else {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "g%i,%i:%i,%i\n",
+ SYNCTEX_TAG_MODEL(p,glue),
+ SYNCTEX_LINE_MODEL(p,glue),
+ SYNCTEX_CTXT_CURH UNIT,
+ SYNCTEX_CTXT_CURV UNIT);
+ synctex_ctxt.lastv = SYNCTEX_CTXT_CURV;
+ }
+ SYNCTEX_RECORD_LEN_AND_RETURN;
+ synctexabort(0);
+ return;
+}
+
+/* Recording a "k..." line */
+static inline void synctex_record_node_kern(halfword p)
+{
+ int len = 0;
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_node_kern\n");
+# endif
+ if (SYNCTEX_SHOULD_COMPRESS_V) {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "k%i,%i:%i,=:%i\n",
+ SYNCTEX_TAG_MODEL(p,glue),
+ SYNCTEX_LINE_MODEL(p,glue),
+ SYNCTEX_CTXT_CURH UNIT,
+ SYNCTEX_WIDTH(p) UNIT);
+ } else {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "k%i,%i:%i,%i:%i\n",
+ SYNCTEX_TAG_MODEL(p,glue),
+ SYNCTEX_LINE_MODEL(p,glue),
+ SYNCTEX_CTXT_CURH UNIT,
+ SYNCTEX_CTXT_CURV UNIT,
+ SYNCTEX_WIDTH(p) UNIT);
+ synctex_ctxt.lastv = SYNCTEX_CTXT_CURV;
+ }
+ SYNCTEX_RECORD_LEN_AND_RETURN;
+ synctexabort(0);
+ return;
+}
+
+/* Recording a "r..." line */
+static inline void synctex_record_node_rule(halfword p)
+{
+ int len = 0;
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_node_tsilh\n");
+# endif
+ if (SYNCTEX_SHOULD_COMPRESS_V) {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "r%i,%i:%i,=:%i,%i,%i\n",
+ SYNCTEX_TAG_MODEL(p,rule),
+ SYNCTEX_LINE_MODEL(p,rule),
+ SYNCTEX_CTXT_CURH UNIT,
+ SYNCTEX_RULE_WD UNIT, SYNCTEX_RULE_HT UNIT, SYNCTEX_RULE_DP UNIT);
+ } else {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "r%i,%i:%i,%i:%i,%i,%i\n",
+ SYNCTEX_TAG_MODEL(p,rule),
+ SYNCTEX_LINE_MODEL(p,rule),
+ SYNCTEX_CTXT_CURH UNIT,
+ SYNCTEX_CTXT_CURV UNIT,
+ SYNCTEX_RULE_WD UNIT, SYNCTEX_RULE_HT UNIT, SYNCTEX_RULE_DP UNIT);
+ synctex_ctxt.lastv = SYNCTEX_CTXT_CURV;
+ }
+ SYNCTEX_RECORD_LEN_AND_RETURN;
+ synctexabort(0);
+ return;
+}
+
+/* Recording a "$..." line */
+void synctex_record_node_math(halfword p)
+{
+ int len = 0;
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_node_math\n");
+# endif
+ if (SYNCTEX_SHOULD_COMPRESS_V) {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "$%i,%i:%i,=\n",
+ SYNCTEX_TAG_MODEL(p, math),
+ SYNCTEX_LINE_MODEL(p, math),
+ SYNCTEX_CTXT_CURH UNIT);
+ } else {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "$%i,%i:%i,%i\n",
+ SYNCTEX_TAG_MODEL(p, math),
+ SYNCTEX_LINE_MODEL(p, math),
+ SYNCTEX_CTXT_CURH UNIT,
+ SYNCTEX_CTXT_CURV UNIT);
+ synctex_ctxt.lastv = SYNCTEX_CTXT_CURV;
+ }
+ SYNCTEX_RECORD_LEN_AND_RETURN;
+ synctexabort(0);
+ return;
+}
+
+/* Recording a "c..." line */
+void synctex_record_node_char(halfword p __attribute__ ((unused)))
+{
+ int len = 0;
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_node_char\n");
+# endif
+ if (SYNCTEX_SHOULD_COMPRESS_V) {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "c%i,=\n",
+ SYNCTEX_CTXT_CURH UNIT);
+ } else {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "c%i,%i\n",
+ SYNCTEX_CTXT_CURH UNIT,
+ SYNCTEX_CTXT_CURV UNIT);
+ synctex_ctxt.lastv = SYNCTEX_CTXT_CURV;
+ }
+ SYNCTEX_RECORD_LEN_AND_RETURN;
+ synctexabort(0);
+ return;
+}
+
+/* Recording a "?..." line, type, subtype and position */
+void synctex_record_node_unknown(halfword p)
+{
+ int len = 0;
+# if SYNCTEX_DEBUG > 999
+ printf("\nSynchronize DEBUG: synctex_record_node_unknown(0x%x)\n", p);
+# endif
+ if (SYNCTEX_SHOULD_COMPRESS_V) {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "?%i,=:%i,%i\n",
+ SYNCTEX_CTXT_CURH UNIT,
+ SYNCTEX_TYPE(p), SYNCTEX_SUBTYPE(p));
+ } else {
+ len = SYNCTEX_fprintf(SYNCTEX_FILE, "?%i,%i:%i,%i\n",
+ SYNCTEX_CTXT_CURH UNIT,
+ SYNCTEX_CTXT_CURV UNIT,
+ SYNCTEX_TYPE(p), SYNCTEX_SUBTYPE(p));
+ synctex_ctxt.lastv = SYNCTEX_CTXT_CURV;
+ }
+ SYNCTEX_RECORD_LEN_AND_RETURN;
+ synctexabort(0);
+ return;
+}
+# endif
diff --git a/Build/source/texk/web2c/synctexdir/synctex.defines b/Build/source/texk/web2c/synctexdir/synctex.defines
new file mode 100644
index 00000000000..159861b0f3a
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex.defines
@@ -0,0 +1,80 @@
+{
+Copyright (c) 2008-2017 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Version 1
+Latest Revision: Sat Apr 22 10:07:05 UTC 2017
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Notice:
+-------
+This file is an interface to the synctex system for web2c.
+It declares the public functions API of synctex.c.
+It is always embedded as common definitions when convert'ing
+from web to c (See the convert shell script).
+}
+
+{ functions from the synctex controller in synctex.c }
+@define procedure synctexinitcommand;
+@define procedure synctexstartinput;
+@define procedure synctexterminate();
+@define procedure synctexabort();
+@define procedure synctexsheet();
+@define procedure synctexteehs;
+@define procedure synctexvlist();
+@define procedure synctextsilv();
+@define procedure synctexvoidvlist();
+@define procedure synctexhlist();
+@define procedure synctextsilh();
+@define procedure synctexvoidhlist();
+@define procedure synctexmath();
+@define procedure synctexkern();
+@define procedure synctexchar();
+@define procedure synctexnode();
+@define procedure synctexcurrent;
+@define procedure synctexhorizontalruleorglue();
+
+@define procedure synctexpdfxform();
+@define procedure synctexmrofxfdp;
+@define procedure synctexpdfrefxform();
+
+{ end of synctex.defines }
+{ vim: set syntax=web : }
diff --git a/Build/source/texk/web2c/synctexdir/synctex.h b/Build/source/texk/web2c/synctexdir/synctex.h
new file mode 100644
index 00000000000..4fcf5d65c42
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex.h
@@ -0,0 +1,127 @@
+/* synctex.h
+
+Copyright (c) 2008-2017 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Version 1
+Lates Revision: Sat Apr 22 10:07:05 UTC 2017
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+*/
+
+# ifndef __SYNCTEX_HEADER__
+# define __SYNCTEX_HEADER__
+
+#include "synctex-common.h"
+
+/* Free all memory used, close and remove the file if any. */
+void synctexabort(boolean log_opened);
+
+/* Send this message when starting a new input. */
+extern void synctexstartinput(void);
+
+/* Recording the "{..." line. In *tex.web, use synctex_sheet(pdf_output) at
+ * the very beginning of the ship_out procedure.
+ */
+extern void synctexsheet(integer mag);
+
+/* Recording the "}..." line. In *tex.web, use synctex_teehs at
+ * the very end of the ship_out procedure.
+ */
+extern void synctexteehs(void);
+
+/* Recording the "<..." line. In pdftex.web, use synctex_pdfxform(p) at
+ * the very beginning of the pdf_ship_out procedure.
+ */
+extern void synctexpdfxform(halfword p);
+
+/* Recording the ">" line. In pdftex.web, use synctex_mrofxfdp at
+ * the very end of the ship_out procedure.
+ */
+extern void synctexmrofxfdp(void);
+
+/* This message is sent when a vlist will be shipped out, more precisely at
+ * the beginning of the vlist_out procedure in *TeX.web. It will be balanced
+ * by a synctex_tsilv, sent at the end of the vlist_out procedure. p is the
+ * address of the vlist We assume that p is really a vlist node! */
+extern void synctexvlist(halfword this_box);
+
+/* Recording a "}" line ending a vbox: this message is sent whenever a vlist
+ * has been shipped out. It is used to close the vlist nesting level. It is
+ * sent at the end of each vlist_out procedure in *TeX.web to balance a former
+ * synctex_vlist sent at the beginning of that procedure. */
+extern void synctextsilv(halfword this_box);
+
+/* This message is sent when a void vlist will be shipped out.
+ * There is no need to balance a void vlist. */
+extern void synctexvoidvlist(halfword p, halfword this_box);
+
+/* Send this message when an hlist will be shipped out, more precisely at
+ * the beginning of the hlist_out procedure in *TeX.web. It must be balanced
+ * by a synctex_tsilh, sent at the end of the hlist_out procedure. p is the
+ * address of the hlist. */
+extern void synctexhlist(halfword this_box);
+
+/* Send this message at the end of the various hlist_out procedure in *TeX.web
+ * to balance a former synctex_hlist. */
+extern void synctextsilh(halfword this_box);
+
+/* This message is sent when a void hlist will be shipped out.
+ * There is no need to balance a void hlist. */
+extern void synctexvoidhlist(halfword p, halfword this_box);
+
+/* Send this message whenever an inline math node will ship out. */
+extern void synctexmath(halfword p, halfword this_box);
+
+/* Send this message whenever an horizontal rule or glue node will ship out. */
+extern void synctexhorizontalruleorglue(halfword p, halfword this_box);
+
+/* Send this message whenever a kern node will ship out. */
+extern void synctexkern(halfword p, halfword this_box);
+
+/* Recording the "f" line. In pdftex.web, use synctex_pdfrefxform when \pfdrefxform si used.
+ */
+extern void synctexpdfrefxform(int objnum);
+
+/* this message is sent whenever a char node ships out */
+extern void synctexchar(halfword p, halfword this_box);
+
+/* this message should be sent to record information
+ for a node of an unknown type */
+extern void synctexnode(halfword p, halfword this_box);
+
+/* For debugging purpose only */
+extern void synctexcurrent(void);
+
+# endif
diff --git a/Build/source/texk/web2c/synctexdir/synctex.pc.in b/Build/source/texk/web2c/synctexdir/synctex.pc.in
new file mode 100644
index 00000000000..7da4eead618
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: synctex
+Description: SyncTeX parser library
+Version: @SYNCTEXVERSION@
+Requires.private: zlib
+Libs: -L${libdir} -lsynctex
+Cflags: -I${includedir}/synctex
+
diff --git a/Build/source/texk/web2c/synctexdir/synctex.test b/Build/source/texk/web2c/synctexdir/synctex.test
new file mode 100755
index 00000000000..c97618cf192
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex.test
@@ -0,0 +1,8 @@
+#! /bin/sh -vx
+# $Id$
+# Copyright 2017 Karl Berry <tex-live@tug.org>
+# Copyright 2014 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+./synctex help || exit 1
+
diff --git a/Build/source/texk/web2c/synctexdir/synctex_main.c b/Build/source/texk/web2c/synctexdir/synctex_main.c
new file mode 100644
index 00000000000..ea676eacc1a
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex_main.c
@@ -0,0 +1,934 @@
+/*
+ Copyright (c) 2008-2017 jerome DOT laurens AT u-bourgogne DOT fr
+
+ This file is part of the __SyncTeX__ package.
+
+ [//]: # (Latest Revision: Fri Jul 14 16:20:41 UTC 2017)
+ [//]: # (Version: 1.21)
+
+ See `synctex_parser_readme.md` for more details
+
+ ## License
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE
+
+ Except as contained in this notice, the name of the copyright holder
+ shall not be used in advertising or otherwise to promote the sale,
+ use or other dealings in this Software without prior written
+ authorization from the copyright holder.
+
+ Acknowledgments:
+ ----------------
+ The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+ and significant help from XeTeX developer Jonathan Kew
+
+ Nota Bene:
+ ----------
+ If you include or use a significant part of the synctex package into a software,
+ I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+ Version 1.2
+ Thu Jun 19 09:39:21 UTC 2008
+
+ History:
+ --------
+
+ - the -d option for an input directory
+
+ Important notice:
+ -----------------
+ This file is named "synctex_main.c".
+ This is the command line interface to the synctex_parser.c.
+ */
+
+# ifdef __linux__
+# define _ISOC99_SOURCE /* to get the fmax() prototype */
+# endif
+
+# ifdef __SYNCTEX_WORK__
+# include <synctex_parser_c-auto.h>
+/* for inline && HAVE_xxx */
+# else
+# include <w2c/c-auto.h>
+/* for inline && HAVE_xxx */
+# endif
+
+# include <stdlib.h>
+# include <stdio.h>
+# include <string.h>
+# include <stdarg.h>
+# include <math.h>
+# include "synctex_version.h"
+# include "synctex_parser_advanced.h"
+# include "synctex_parser_utils.h"
+
+/* The code below uses strlcat and strlcpy, which avoids security warnings with some compilers.
+ However, if these are not available we simply use the old, unchecked versions;
+ this is OK because all the uses in this code are working with a buffer that's been
+ allocated based on measuring the strings involved.
+ */
+#ifndef HAVE_STRLCAT
+# define strlcat(dst, src, size) strcat((dst), (src))
+#endif
+#ifndef HAVE_STRLCPY
+# define strlcpy(dst, src, size) strcpy((dst), (src))
+#endif
+#ifndef HAVE_FMAX
+# define fmax my_fmax
+inline static double my_fmax(double x, double y) { return (x < y) ? y : x; }
+#endif
+
+#ifdef WIN32
+# define snprintf _snprintf
+#endif
+
+#if SYNCTEX_DEBUG
+# ifdef WIN32
+# include <direct.h>
+# define getcwd _getcwd
+# else
+# include <unistd.h>
+# endif
+#endif
+
+int main(int argc, char *argv[]);
+
+void synctex_help(const char * error,...);
+void synctex_help_view(const char * error,...);
+void synctex_help_edit(const char * error,...);
+void synctex_help_update(const char * error,...);
+
+int synctex_view(int argc, char *argv[]);
+int synctex_edit(int argc, char *argv[]);
+int synctex_update(int argc, char *argv[]);
+int synctex_test(int argc, char *argv[]);
+
+int main(int argc, char *argv[])
+{
+ int arg_index = 1;
+ printf("This is SyncTeX command line utility, version " SYNCTEX_CLI_VERSION_STRING "\n");
+ if(arg_index<argc) {
+ if(0==strcmp("help",argv[arg_index])) {
+ if(++arg_index<argc) {
+ if(0==strcmp("view",argv[arg_index])) {
+ synctex_help_view(NULL);
+ return 0;
+ } else if(0==strcmp("edit",argv[arg_index])) {
+ synctex_help_edit(NULL);
+ return 0;
+ } else if(0==strcmp("update",argv[arg_index])) {
+ synctex_help_update(NULL);
+ return 0;
+ }
+ }
+ synctex_help(NULL);
+ return 0;
+ } else if(0==strcmp("view",argv[arg_index])) {
+ return synctex_view(argc-arg_index-1,argv+arg_index+1);
+ } else if(0==strcmp("edit",argv[arg_index])) {
+ return synctex_edit(argc-arg_index-1,argv+arg_index+1);
+ } else if(0==strcmp("update",argv[arg_index])) {
+ return synctex_update(argc-arg_index-1,argv+arg_index+1);
+ } else if(0==strcmp("test",argv[arg_index])) {
+ return synctex_test(argc-arg_index-1,argv+arg_index+1);
+ }
+ }
+ synctex_help("Missing options");
+ return 0;
+}
+
+static void synctex_usage(const char * error,va_list ap) {
+ if(error) {
+ fprintf(stderr,"SyncTeX ERROR: ");
+ vfprintf(stderr,error,ap);
+ fprintf(stderr,"\n");
+ }
+ fprintf((error?stderr:stdout),
+ "usage: synctex <subcommand> [options] [args]\n"
+ "Synchronize TeXnology command-line client, version " SYNCTEX_VERSION_STRING "\n\n"
+ "The Synchronization TeXnology by Jérôme Laurens is a rather new feature of recent 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"
+ );
+ return;
+}
+
+void synctex_help(const char * error,...) {
+ va_list v;
+ va_start(v, error);
+ synctex_usage(error, v);
+ va_end(v);
+ fprintf((error?stderr:stdout),
+ "Available subcommands:\n"
+ " view to perform forwards synchronization\n"
+ " edit to perform backwards synchronization\n"
+ " update to update a synctex file after a dvi/xdv to pdf filter\n"
+ " help this help\n\n"
+ "Type 'synctex help <subcommand>' for help on a specific subcommand.\n"
+ "There is also an undocumented test subcommand.\n"
+ );
+ return;
+}
+
+void synctex_help_view(const char * error,...) {
+ va_list v;
+ va_start(v, error);
+ synctex_usage(error, v);
+ va_end(v);
+ fputs("synctex view: forwards or direct synchronization,\n"
+ "command sent by the editor to view the output corresponding to the position under the mouse\n"
+ "\n"
+ "usage: synctex view -i line:column:[page_hint:]input -o output [-d directory] [-x viewer-command] [-h before/offset:middle/after]\n"
+ "\n"
+ "-i line:column:[page_hint:]input\n"
+ " specify the line, column, optional page hint and input file.\n"
+ " The line and column are 1 based integers,\n"
+ " they allow to identify every character in a file.\n"
+ " column is the offset of a character relative to the containing line.\n"
+ " Pass 0 if this information is not relevant.\n"
+ " page_hint is the currently displayed page number.\n"
+ " If there is an answer on that page, it will be returned.\n"
+ " Pass 0 if this information is not available to you.\n"
+ " input is either the name of the main source file or an included document.\n"
+ " It must be the very name as understood by TeX, id est the name exactly as it appears in the log file.\n"
+ " It does not matter if the file actually exists or not, except that the command is not really useful.\n"
+ " \n"
+ "-o output\n"
+ " is the full or relative path of the output file (with any relevant path extension).\n"
+ " This file must exist.\n"
+ " \n"
+ "-d directory\n"
+ " is the directory containing the synctex file, in case it is different from the directory of the output.\n"
+ " This directory must exist.\n"
+ " An example will explain how things work: for synctex -o ...:bar.tex -d foo,\n"
+ " the chosen synctex file is the most recent among bar.synctex, bar.synctex.gz, foo/bar.synctex and foo/bar.synctex.gz.\n"
+ " The other ones are simply removed, if the authorization is granted\n"
+ " \n"
+ "-x viewer-command\n"
+ " Normally the synctex tool outputs its result to the stdout.\n"
+ " It is possible to launch an external tool with the result.\n"
+ " The viewer-command is a printf like format string with following specifiers.\n"
+ " %{output} is the name specifier of the main document, without path extension.\n"
+ " %{page} is the 0 based page number specifier, %{page+1} is the 1 based page number specifier.\n"
+ " To synchronize by point, %{x} is the x coordinate specifier, %{y} is the y coordinate specifier,\n"
+ " both in dots and relative to the top left corner of the page.\n"
+ " To synchronize by box,\n"
+ " %{h} is the horizontal coordinate specifier of the origin of the enclosing box,\n"
+ " %{v} is the vertical coordinate specifier of the origin of the enclosing box,\n"
+ " both in dots and relative to the upper left corner of the page.\n"
+ " They may be different from the preceding pair of coordinates.\n"
+ " %{width} is the width specifier, %{height} is the height specifier of the enclosing box.\n"
+ " The latter dimension is naturally counted from bottom to top.\n"
+ " There is no notion of depth for such a box.\n"
+ " To synchronize by content, %{before} is the word before,\n"
+ " %{offset} is the offset specifier, %{middle} is the middle word, and %{after} is the word after.\n"
+ "\n"
+ " If no viewer command is provided, the content of the SYNCTEX_VIEWER environment variable is used instead.\n"
+ "\n"
+ "-h before/offset:middle/after\n"
+ " This hint allows a forwards synchronization by contents.\n"
+ " Instead of giving a character offset in a line, you can give full words.\n"
+ " A full word is a sequence of characters (excepting '/').\n"
+ " You will choose full words in the source document that will certainly appear unaltered in the output.\n"
+ " The \"middle\" word contains the character under the mouse at position offset.\n"
+ " \"before\" is a full word preceding middle and \"after\" is following it.\n"
+ " The before or after word can be missing, they are then considered as void strings.\n"
+ " \n"
+ "The result is a list of records. In general the first one is the most accurate but\n"
+ "it is the responsibility of the client to decide which one best fits the user needs.\n",
+ (error?stderr:stdout)
+ );
+ return;
+}
+
+typedef struct {
+ int line;
+ int column;
+ int page;
+ unsigned int offset;
+ char * input;
+ char * output;
+ char * directory;
+ char * viewer;
+ char * before;
+ char * middle;
+ char * after;
+} synctex_view_params_t;
+
+int synctex_view_proceed(synctex_view_params_t * paramsRef);
+
+/* "usage: synctex view -i line:column:input -o output [-d directory] [-x viewer-command] [-h before/offset:middle/after]\n" */
+int synctex_view(int argc, char *argv[]) {
+ int arg_index = 0;
+ char * start = NULL;
+ char * end = NULL;
+ synctex_view_params_t Ps = {-1,0,0,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
+
+ /* required */
+ if((arg_index>=argc) || strcmp("-i",argv[arg_index]) || (++arg_index>=argc)) {
+ synctex_help_view("Missing -i required argument");
+ return -1;
+ }
+ start = argv[arg_index];
+ Ps.line = (int)strtol(start,&end,10);
+ if(end>start && strlen(end)>0 && *end==':') {
+ start = end+1;
+ Ps.column = (int)strtol(start,&end,10);
+ if(end == start || Ps.column < 0) {
+ Ps.column = 0;
+ }
+ if(strlen(end)>1 && *end==':') {
+ Ps.input = end+1;
+ goto scan_output;
+ }
+ }
+ synctex_help_view("Bad -i argument");
+ return -1;
+scan_output:
+ if((++arg_index>=argc) || strcmp("-o",argv[arg_index]) || (++arg_index>=argc)) {
+ synctex_help_view("Missing -o required argument");
+ return -1;
+ }
+ Ps.output = argv[arg_index];
+ /* now scan the optional arguments */
+ if(++arg_index<argc) {
+ if(0 == strcmp("-d",argv[arg_index])) {
+ if(++arg_index<argc) {
+ Ps.directory = argv[arg_index];
+ if(++arg_index<argc) {
+ goto option_command;
+ } else {
+ return synctex_view_proceed(&Ps);
+ }
+ } else {
+ Ps.directory = getenv("SYNCTEX_BUILD_DIRECTORY");
+ return synctex_view_proceed(&Ps);
+ }
+ }
+option_command:
+ if(0 == strcmp("-x",argv[arg_index])) {
+ if(++arg_index<argc) {
+ if(strcmp("-",argv[arg_index])) {
+ /* next option does not start with '-', this is a command */
+ Ps.viewer = argv[arg_index];
+ if(++arg_index<argc) {
+ goto option_hint;
+ } else {
+ return synctex_view_proceed(&Ps);
+ }
+ } else {
+ /* retrieve the environment variable */
+ Ps.viewer = getenv("SYNCTEX_VIEWER");
+ goto option_hint;
+ }
+ } else {
+ Ps.viewer = getenv("SYNCTEX_VIEWER");
+ return synctex_view_proceed(&Ps);
+ }
+ }
+option_hint:
+ if(0 == strcmp("-h",argv[arg_index]) && ++arg_index<argc) {
+ /* modify the argument */;
+ Ps.after = strstr(argv[arg_index],"/");
+ if(NULL != Ps.after) {
+ Ps.before = argv[arg_index];
+ *Ps.after = '\0';
+ ++Ps.after;
+ Ps.offset = (int)strtoul(Ps.after,&Ps.middle,10);
+ if(Ps.middle>Ps.after && strlen(Ps.middle)>2) {
+ Ps.after = strstr(++Ps.middle,"/");
+ if(NULL != Ps.after) {
+ *Ps.after = '\0';
+ if(Ps.offset<strlen(Ps.middle)) {
+ ++Ps.after;
+ return synctex_view_proceed(&Ps);
+ }
+ }
+ }
+ }
+ synctex_help_view("Bad hint");
+ return -1;
+ }
+ }
+ return synctex_view_proceed(&Ps);
+}
+
+int synctex_view_proceed(synctex_view_params_t * Ps) {
+ synctex_scanner_p scanner = NULL;
+ size_t size = 0;
+#if SYNCTEX_DEBUG
+ printf("line:%i\n",Ps->line);
+ printf("column:%i\n",Ps->column);
+ printf("page:%i\n",Ps->page);
+ printf("input:%s\n",Ps->input);
+ printf("viewer:%s\n",Ps->viewer);
+ printf("before:%s\n",Ps->before);
+ printf("offset:%u\n",Ps->offset);
+ printf("middle:%s\n",Ps->middle);
+ printf("after:%s\n",Ps->after);
+ printf("output:%s\n",Ps->output);
+ printf("cwd:%s\n",getcwd(NULL,0));
+#endif
+ /* We assume that viewer is not so big: */
+# define SYNCTEX_STR_SIZE 65536
+ if(Ps->viewer && strlen(Ps->viewer)>=SYNCTEX_STR_SIZE) {
+ synctex_help_view("Viewer command is too long");
+ return -1;
+ }
+ scanner = synctex_scanner_new_with_output_file(Ps->output,Ps->directory,1);
+ if(scanner && synctex_display_query(scanner,Ps->input,Ps->line,Ps->column,Ps->page)) {
+ synctex_node_p node = NULL;
+ if((node = synctex_scanner_next_result(scanner)) != NULL) {
+ /* filtering the command */
+ if(Ps->viewer && strlen(Ps->viewer)) {
+ char * viewer = Ps->viewer;
+ char * where = NULL;
+ char * buffer = NULL;
+ char * buffer_cur = NULL;
+ int status = 0;
+ /* Preparing the buffer where everything will be printed */
+ size = strlen(viewer)+3*sizeof(int)+6*sizeof(float)+4*(SYNCTEX_STR_SIZE);
+ buffer = malloc(size+1);
+ if(NULL == buffer) {
+ synctex_help_view("No memory available");
+ return -1;
+ }
+ /* Properly terminate the buffer, no bad access for string related functions. */
+ buffer[size] = '\0';
+ /* Replace %{ by &{, then remove all unescaped '%'*/
+ while((where = strstr(viewer,"%{")) != NULL) {
+ *where = '&';
+ }
+ /* find all the unescaped '%', change to a safe character */
+ where = viewer;
+ while(where && (where = strstr(where,"%"))) {
+ /* Find the next occurrence of a "%",
+ * if it is not followed by another "%",
+ * replace it by a "&" */
+ if(strlen(++where)) {
+ if(*where == '%') {
+ ++where;
+ } else {
+ *(where-1)='&';
+ }
+ }
+ }
+ buffer_cur = buffer;
+ /* find the next occurrence of a format key */
+ where = viewer;
+ while(viewer && (where = strstr(viewer,"&{"))) {
+# define TEST(KEY,FORMAT,WHAT)\
+ if(!strncmp(where,KEY,strlen(KEY))) {\
+ size_t printed = where-viewer;\
+ if(buffer_cur != memcpy(buffer_cur,viewer,(size_t)printed)) {\
+ synctex_help_view("Memory copy problem");\
+ free(buffer);\
+ return -1;\
+ }\
+ buffer_cur += printed;size-=printed;\
+ printed = snprintf(buffer_cur,size,FORMAT,WHAT);\
+ if((unsigned)printed >= (unsigned)size) {\
+ synctex_help_view("Snprintf problem");\
+ free(buffer);\
+ return -1;\
+ }\
+ buffer_cur += printed;size-=printed;\
+ *buffer_cur='\0';\
+ viewer = where+strlen(KEY);\
+ continue;\
+ }
+ TEST("&{output}","%s",synctex_scanner_get_output(scanner));
+ TEST("&{page}", "%i",synctex_node_page(node)-1);
+ TEST("&{page+1}","%i",synctex_node_page(node));
+ TEST("&{x}", "%f",synctex_node_visible_h(node));
+ TEST("&{y}", "%f",synctex_node_visible_v(node));
+ TEST("&{h}", "%f",synctex_node_box_visible_h(node));
+ TEST("&{v}", "%f",synctex_node_box_visible_v(node)+synctex_node_box_visible_depth(node));
+ TEST("&{width}", "%f",fabs(synctex_node_box_visible_width(node)));
+ TEST("&{height}","%f",fmax(synctex_node_box_visible_height(node)+synctex_node_box_visible_depth(node),1));
+ TEST("&{before}","%s",(Ps->before && strlen(Ps->before)<SYNCTEX_STR_SIZE?Ps->before:""));
+ TEST("&{offset}","%u",Ps->offset);
+ TEST("&{middle}","%s",(Ps->middle && strlen(Ps->middle)<SYNCTEX_STR_SIZE?Ps->middle:""));
+ TEST("&{after}", "%s",(Ps->after && strlen(Ps->after)<SYNCTEX_STR_SIZE?Ps->after:""));
+# undef TEST
+ break;
+ }
+ /* copy the rest of viewer into the buffer */
+ if(buffer_cur != strncpy(buffer_cur,viewer,size + 1)) {
+ synctex_help_view("Memory copy problem");
+ free(buffer);
+ return -1;
+ }
+ buffer_cur[size] = '\0';
+ printf("SyncTeX: Executing\n%s\n",buffer);
+ status = system(buffer);
+ free(buffer);
+ buffer = NULL;
+ return status;
+ } else {
+ /* just print out the results */
+ puts("SyncTeX result begin");
+ do {
+ printf("Output:%s\n"
+ "Page:%i\n"
+ "x:%f\n"
+ "y:%f\n"
+ "h:%f\n"
+ "v:%f\n"
+ "W:%f\n"
+ "H:%f\n"
+ "before:%s\n"
+ "offset:%i\n"
+ "middle:%s\n"
+ "after:%s\n",
+ Ps->output,
+ synctex_node_page(node),
+ synctex_node_visible_h(node),
+ synctex_node_visible_v(node),
+ synctex_node_box_visible_h(node),
+ synctex_node_box_visible_v(node)+synctex_node_box_visible_depth(node),
+ synctex_node_box_visible_width(node),
+ synctex_node_box_visible_height(node)+synctex_node_box_visible_depth(node),
+ (Ps->before?Ps->before:""),
+ Ps->offset,
+ (Ps->middle?Ps->middle:""),
+ (Ps->after?Ps->after:""));
+ } while((node = synctex_scanner_next_result(scanner)) != NULL);
+ puts("SyncTeX result end");
+ }
+ }
+ }
+ return 0;
+}
+
+void synctex_help_edit(const char * error,...) {
+ va_list v;
+ va_start(v, error);
+ synctex_usage(error, v);
+ va_end(v);
+ fputs(
+ "synctex edit: backwards or reverse synchronization,\n"
+ "command sent by the viewer to edit the source corresponding to the position under the mouse\n\n"
+ "\n"
+ "usage: synctex edit -o page:x:y:file [-d directory] [-x editor-command] [-h offset:context]\n"
+ "\n"
+ "-o page:x:y:file\n"
+ " specify the page and coordinates of the point under the mouse.\n"
+ " page is 1 based.\n"
+ " Coordinates x and y are counted from the top left corner of the page.\n"
+ " Their unit is the big point (72 dpi).\n"
+ " \n"
+ " file is in general the path of a pdf or dvi file.\n"
+ " It can be either absolute or relative to the current directory.\n"
+ " This named file must always exist.\n"
+ " \n"
+ "-d directory\n"
+ " is the directory containing the synctex file, in case it is different from the directory of the output.\n"
+ " This directory must exist.\n"
+ " An example will explain how things work: for synctex -o ...:bar.tex -d foo,\n"
+ " the chosen synctex file is the most recent among bar.synctex, bar.synctex.gz, foo/bar.synctex and foo/bar.synctex.gz.\n"
+ " The other ones are simply removed, if the authorization is granted\n"
+ " \n"
+ "-x editor-command\n"
+ " Normally the synctex tool outputs its result to the stdout.\n"
+ " It is possible to execute an external tool with the result of the query.\n"
+ " The editor-command is a printf like format string with following specifiers.\n"
+ " They will be replaced by their value before the command is executed.\n"
+ " %{output} is the full path specifier of the output document, with no extension.\n"
+ " %{input} is the name specifier of the input document.\n"
+ " %{line} is the 0 based line number specifier. %{line+1} is the 1 based line number specifier.\n"
+ " %{column} is the 0 based column number specifier or -1. %{column+1} is the 1 based column number or -1.\n"
+ " %{offset} is the 0 based offset specifier and %{context} is the context specifier of the hint.\n"
+ " \n"
+ " If no editor-command is provided, the content of the SYNCTEX_EDITOR environment variable is used instead.\n"
+ " \n"
+ "-h offset:context\n"
+ " This hint allows a backwards or reverse synchronization by contents.\n"
+ " You give a context including the character at the mouse location, and\n"
+ " the offset of this character relative to the beginning of this bunch of text.\n"
+ " \n",
+ (error?stderr:stdout)
+ );
+ return;
+}
+
+typedef struct {
+ int page;
+ float x;
+ float y;
+ unsigned int offset;
+ char * output;
+ char * directory;
+ char * editor;
+ char * context;
+} synctex_edit_params_t;
+
+int synctex_edit_proceed(synctex_edit_params_t * Ps);
+
+/* "usage: synctex edit -o page:x:y:output [-d directory] [-x editor-command] [-h offset:context]\n" */
+int synctex_edit(int argc, char *argv[]) {
+ int arg_index = 0;
+ char * start = NULL;
+ char * end = NULL;
+ synctex_edit_params_t Ps = {0,0,0,0,NULL,NULL,NULL,NULL};
+ /* required */
+ if((arg_index>=argc) || strcmp("-o",argv[arg_index]) || (++arg_index>=argc)) {
+ synctex_help_edit("Missing -o required argument");
+ return -1;
+ }
+ start = argv[arg_index];
+ Ps.page = (int)strtol(start,&end,10);
+ if(end>start && strlen(end)>1 && *end==':') {
+ start = end+1;
+ Ps.x = strtod(start,&end);
+ if(end>start && strlen(end)>1 && *end==':') {
+ start = end+1;
+ Ps.y = strtod(start,&end);
+ if(end>start && strlen(end)>1 && *end==':') {
+ Ps.output = ++end;
+ goto scan_execute;
+ }
+ }
+ }
+ synctex_help_edit("Bad -o argument");
+ return -1;
+scan_execute:
+ /* now scan the optional arguments */
+ if(++arg_index<argc) {
+ if(0 == strcmp("-d",argv[arg_index])) {
+ if(++arg_index<argc) {
+ Ps.directory = argv[arg_index];
+ if(++arg_index<argc) {
+ goto option_command;
+ } else {
+ return synctex_edit_proceed(&Ps);
+ }
+ } else {
+ Ps.directory = getenv("SYNCTEX_BUILD_DIRECTORY");
+ return synctex_edit_proceed(&Ps);
+ }
+ }
+option_command:
+ if(0 == strcmp("-x",argv[arg_index])) {
+ if(++arg_index<argc) {
+ if(strcmp("-",argv[arg_index])) {
+ /* next option does not start with '-', this is a command */
+ Ps.editor = argv[arg_index];
+ if(++arg_index<argc) {
+ goto option_hint;
+ } else {
+ return synctex_edit_proceed(&Ps);
+ }
+ } else {
+ /* retrieve the environment variable */
+ Ps.editor = getenv("SYNCTEX_EDITOR");
+ goto option_hint;
+ }
+ } else {
+ Ps.editor = getenv("SYNCTEX_EDITOR");
+ return synctex_edit_proceed(&Ps);
+ }
+ }
+ option_hint:
+ if(0 == strcmp("-h",argv[arg_index]) && ++arg_index<argc) {
+
+ start = argv[arg_index];
+ end = NULL;
+ Ps.offset = (int)strtol(start,&end,10);
+ if(end>start && strlen(end)>1 && *end==':') {
+ Ps.context = end+1;
+ return synctex_edit_proceed(&Ps);
+ }
+ synctex_help_edit("Bad -h argument");
+ return -1;
+ }
+ }
+ return synctex_edit_proceed(&Ps);
+}
+
+int synctex_edit_proceed(synctex_edit_params_t * Ps) {
+ synctex_scanner_p scanner = NULL;
+#if SYNCTEX_DEBUG
+ printf("page:%i\n",Ps->page);
+ printf("x:%f\n",Ps->x);
+ printf("y:%f\n",Ps->y);
+ printf("almost output:%s\n",Ps->output);
+ printf("editor:%s\n",Ps->editor);
+ printf("offset:%u\n",Ps->offset);
+ printf("context:%s\n",Ps->context);
+ printf("cwd:%s\n",getcwd(NULL,0));
+#endif
+ scanner = synctex_scanner_new_with_output_file(Ps->output,Ps->directory,1);
+ if(NULL == scanner) {
+ synctex_help_edit("No SyncTeX available for %s",Ps->output);
+ return -1;
+ }
+ if(synctex_edit_query(scanner,Ps->page,Ps->x,Ps->y)) {
+ synctex_node_p node = NULL;
+ const char * input = NULL;
+ if(NULL != (node = synctex_scanner_next_result(scanner))
+ && NULL != (input = synctex_scanner_get_name(scanner,synctex_node_tag(node)))) {
+ /* filtering the command */
+ if(Ps->editor && strlen(Ps->editor)) {
+ size_t size = 0;
+ char * where = NULL;
+ char * buffer = NULL;
+ char * buffer_cur = NULL;
+ int status;
+ size = strlen(Ps->editor)+3*sizeof(int)+3*SYNCTEX_STR_SIZE;
+ buffer = malloc(size+1);
+ if(NULL == buffer) {
+ printf("SyncTeX ERROR: No memory available\n");
+ return -1;
+ }
+ buffer[size]='\0';
+ /* Replace %{ by &{, then remove all unescaped '%'*/
+ while((where = strstr(Ps->editor,"%{")) != NULL) {
+ *where = '&';
+ }
+ where = Ps->editor;
+ while(where &&(where = strstr(where,"%"))) {
+ if(strlen(++where)) {
+ if(*where == '%') {
+ ++where;
+ } else {
+ *(where-1)='&';
+ }
+ }
+ }
+ buffer_cur = buffer;
+ /* find the next occurrence of a format key */
+ where = Ps->editor;
+ while(Ps->editor && (where = strstr(Ps->editor,"&{"))) {
+# define TEST(KEY,FORMAT,WHAT)\
+ if(!strncmp(where,KEY,strlen(KEY))) {\
+ size_t printed = where-Ps->editor;\
+ if(buffer_cur != memcpy(buffer_cur,Ps->editor,(size_t)printed)) {\
+ synctex_help_edit("Memory copy problem");\
+ free(buffer);\
+ return -1;\
+ }\
+ buffer_cur += printed;size-=printed;\
+ printed = snprintf(buffer_cur,size,FORMAT,WHAT);\
+ if((unsigned)printed >= (unsigned)size) {\
+ synctex_help_edit("Snprintf problem");\
+ free(buffer);\
+ return -1;\
+ }\
+ buffer_cur += printed;size-=printed;\
+ *buffer_cur='\0';\
+ Ps->editor = where+strlen(KEY);\
+ continue;\
+ }
+ TEST("&{output}", "%s",Ps->output);
+ TEST("&{input}", "%s",input);
+ TEST("&{line}", "%i",synctex_node_line(node));
+ TEST("&{column}", "%i",-1);
+ TEST("&{offset}", "%u",Ps->offset);
+ TEST("&{context}","%s",Ps->context);
+# undef TEST
+ break;
+ }
+ /* copy the rest of editor into the buffer */
+ if(buffer_cur != memcpy(buffer_cur,Ps->editor,strlen(Ps->editor))) {
+ fputs("! synctex_edit: Memory copy problem",stderr);
+ free(buffer);
+ return -1;
+ }\
+ printf("SyncTeX: Executing\n%s\n",buffer);
+ status = system(buffer);
+ free(buffer);
+ buffer = NULL;
+ return status;
+ } else {
+ /* just print out the results */
+ puts("SyncTeX result begin");
+ do {
+ printf( "Output:%s\n"
+ "Input:%s\n"
+ "Line:%i\n"
+ "Column:%i\n"
+ "Offset:%i\n"
+ "Context:%s\n",
+ Ps->output,
+ input,
+ synctex_node_line(node),
+ synctex_node_column(node),
+ Ps->offset,
+ (Ps->context?Ps->context:""));
+ } while((node = synctex_scanner_next_result(scanner)) != NULL);
+ puts("SyncTeX result end");
+ }
+ }
+ }
+ return 0;
+}
+
+void synctex_help_update(const char * error,...) {
+ va_list v;
+ va_start(v, error);
+ synctex_usage(error, v);
+ va_end(v);
+ fputs(
+ "synctex update: up to date synctex file,\n"
+ "Use this command to update the synctex file once a dvi/xdv to pdf filter is applied.\n\n"
+ "\n"
+ "usage: synctex update -o output [-d directory] [-m number] [-x dimension] [-y dimension]\n"
+ "\n"
+ "-o output is the full or relative path of an existing file,\n"
+ " either the real synctex file you wish to update\n"
+ " or a related file: foo.tex, foo.pdf, foo.dvi...\n"
+ "-d directory is the directory containing the synctex file, in case it is different from the directory of the output.\n"
+ " This directory must exist.\n"
+ " An example will explain how things work: for synctex -o ...:bar.tex -d foo,\n"
+ " the chosen synctex file is the most recent among bar.synctex, bar.synctex.gz, foo/bar.synctex and foo/bar.synctex.gz.\n"
+ " The other ones are simply removed, if the authorization is granted\n"
+ " \n"
+ "-m number Set additional magnification\n"
+ "-x dimension Set horizontal offset\n"
+ "-y dimension Set vertical offset\n"
+ "In general, these are exactly the same options provided to the dvi/xdv to pdf filter.\n",
+ (error?stderr:stdout)
+ );
+ return;
+}
+
+/* "usage: synctex update -o output [-d directory] [-m number] [-x dimension] [-y dimension]\n" */
+int synctex_update(int argc, char *argv[]) {
+ int arg_index = 0;
+ synctex_updater_p updater = NULL;
+ char * magnification = NULL;
+ char * x = NULL;
+ char * y = NULL;
+ char * output = NULL;
+ char * directory = NULL;
+#define SYNCTEX_fprintf (*synctex_fprintf)
+ if(arg_index>=argc) {
+ synctex_help_update("Bad update command");
+ return -1;
+ }
+ /* required */
+ if((arg_index>=argc) || strcmp("-o",argv[arg_index]) || (++arg_index>=argc)) {
+ synctex_help_update("Missing -o required argument");
+ return -1;
+ }
+ output = argv[arg_index];
+ if(++arg_index>=argc) {
+ return 0;
+ }
+next_argument:
+ if(0 == strcmp("-m",argv[arg_index])) {
+ if(++arg_index>=argc) {
+ synctex_help_update("Missing magnification");
+ return -1;
+ }
+ magnification = argv[arg_index];
+ prepare_next_argument:
+ if(++arg_index<argc) {
+ goto next_argument;
+ }
+ } else if(0 == strcmp("-x",argv[arg_index])) {
+ if(++arg_index>=argc) {
+ synctex_help_update("Missing x offset");
+ return -1;
+ }
+ x = argv[arg_index];
+ goto prepare_next_argument;
+ } else if(0 == strcmp("-y",argv[arg_index])) {
+ if(++arg_index>=argc) {
+ synctex_help_update("Missing y offset");
+ return -1;
+ }
+ y = argv[arg_index];
+ goto prepare_next_argument;
+ } else if(0 == strcmp("-d",argv[arg_index])) {
+ if(++arg_index<argc) {
+ directory = argv[arg_index];
+ } else {
+ directory = getenv("SYNCTEX_BUILD_DIRECTORY");
+ }
+ goto prepare_next_argument;
+ }
+
+ /* Arguments parsed */
+ updater = synctex_updater_new_with_output_file(output,directory);
+ synctex_updater_append_magnification(updater,magnification);
+ synctex_updater_append_x_offset(updater,x);
+ synctex_updater_append_y_offset(updater,y);
+ synctex_updater_free(updater);
+ return 0;
+}
+
+int synctex_test_file (int argc, char *argv[]);
+
+/* "usage: synctex test subcommand options\n" */
+int synctex_test(int argc, char *argv[]) {
+ if(argc) {
+ if(0==strcmp("file",argv[0])) {
+ return synctex_test_file(argc-1,argv+1);
+ }
+ }
+ return 0;
+}
+
+int synctex_test_file (int argc, char *argv[])
+{
+ int arg_index = 0;
+ char * output = NULL;
+ char * directory = NULL;
+ char * synctex_name = NULL;
+ synctex_compress_mode_t mode = synctex_compress_mode_none;
+ if(arg_index>=argc) {
+ _synctex_error("! usage: synctex test file -o output [-d directory]\n");
+ return -1;
+ }
+ /* required */
+ if((arg_index>=argc) || strcmp("-o",argv[arg_index]) || (++arg_index>=argc)) {
+ _synctex_error("! usage: synctex test file -o output [-d directory]\n");
+ return -1;
+ }
+ output = argv[arg_index];
+ /* optional */
+ if(++arg_index<argc) {
+ if(0 == strcmp("-d",argv[arg_index])) {
+ if(++arg_index<argc) {
+ directory = argv[arg_index];
+ } else {
+ directory = getenv("SYNCTEX_BUILD_DIRECTORY");
+ }
+ }
+ }
+ /* Arguments parsed */
+ if(_synctex_get_name(output, directory, &synctex_name, &mode)) {
+ _synctex_error("! TEST FAILED\n");
+ } else {
+ printf("output:%s\n"
+ "directory:%s\n"
+ "file name:%s\n"
+ "compression mode:%s\n",
+ output,
+ directory,
+ synctex_name,
+ (mode?"gz":"none"));
+ }
+ return 0;
+}
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser.c b/Build/source/texk/web2c/synctexdir/synctex_parser.c
new file mode 100644
index 00000000000..7fcbe0ce3a9
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser.c
@@ -0,0 +1,8924 @@
+/*
+ Copyright (c) 2008-2017 jerome DOT laurens AT u-bourgogne DOT fr
+
+ This file is part of the __SyncTeX__ package.
+
+ [//]: # (Latest Revision: Sun Oct 15 15:09:55 UTC 2017)
+ [//]: # (Version: 1.21)
+
+ See `synctex_parser_readme.md` for more details
+
+ ## License
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE
+
+ Except as contained in this notice, the name of the copyright holder
+ shall not be used in advertising or otherwise to promote the sale,
+ use or other dealings in this Software without prior written
+ authorization from the copyright holder.
+
+ Acknowledgments:
+ ----------------
+ The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+ and significant help from XeTeX developer Jonathan Kew
+
+ Nota Bene:
+ ----------
+ If you include or use a significant part of the synctex package into a software,
+ I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+ */
+
+/* We assume that high level application like pdf viewers will want
+ * to embed this code as is. We assume that they also have locale.h and setlocale.
+ * For other tools such as TeXLive tools, you must define SYNCTEX_USE_LOCAL_HEADER,
+ * when building. You also have to create and customize synctex_parser_local.h to fit your system.
+ * In particular, the HAVE_LOCALE_H and HAVE_SETLOCALE macros should be properly defined.
+ * With this design, you should not need to edit this file. */
+
+/**
+ * \file synctex_parser.c
+ * \brief SyncTeX file parser and controller.
+ * - author: Jérôme LAURENS
+ * \version 1.21
+ * \date Sun Oct 15 15:09:55 UTC 2017
+ *
+ * Reads and parse *.synctex[.gz] files,
+ * performs edit and display queries.
+ *
+ * See
+ * - synctex_scanner_new_with_output_file
+ * - synctex_scanner_parse
+ * - synctex_scanner_free
+ * - synctex_display_query
+ * - synctex_edit_query
+ * - synctex_scanner_next_result
+ * - synctex_scanner_reset_result
+ *
+ * The data is organized in a graph with multiple entries.
+ * The root object is a scanner, it is created with the contents on a synctex file.
+ * Each node of the tree is a synctex_node_t object.
+ * There are 3 subtrees, two of them sharing the same leaves.
+ * The first tree is the list of input records, where input file names are associated with tags.
+ * The second tree is the box tree as given by TeX when shipping pages out.
+ * First level objects are sheets and forms, containing boxes, glues, kerns...
+ * The third tree allows to browse leaves according to tag and line.
+ */
+# if defined(SYNCTEX_USE_LOCAL_HEADER)
+# include "synctex_parser_local.h"
+# else
+# define HAVE_LOCALE_H 1
+# define HAVE_SETLOCALE 1
+# if defined(_MSC_VER)
+# define SYNCTEX_INLINE __inline
+# else
+# define SYNCTEX_INLINE inline
+# endif
+# endif
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <limits.h>
+
+#if defined(HAVE_LOCALE_H)
+#include <locale.h>
+#endif
+
+/* Mark unused parameters, so that there will be no compile warnings. */
+#ifdef __DARWIN_UNIX03
+# define SYNCTEX_UNUSED(x) SYNCTEX_PRAGMA(unused(x))
+# define SYNCTEX_PRAGMA(x) _Pragma ( #x )
+#else
+# define SYNCTEX_UNUSED(x) (void)(x);
+#endif
+
+#include "synctex_parser_advanced.h"
+
+SYNCTEX_INLINE static int _synctex_abs(int x) {
+ return x>0? x: -x;
+}
+/* These are the possible extensions of the synctex file */
+const char * synctex_suffix = ".synctex";
+const char * synctex_suffix_gz = ".gz";
+
+typedef synctex_node_p(*synctex_node_new_f)(synctex_scanner_p);
+typedef void(*synctex_node_fld_f)(synctex_node_p);
+typedef char *(*synctex_node_str_f)(synctex_node_p);
+
+/**
+ * Pseudo class.
+ * - author: J. Laurens
+ *
+ * Each nodes has a class, it is therefore called an object.
+ * Each class has a unique scanner.
+ * Each class has a type which is a unique identifier.
+ * The class points to various methods,
+ * each of them vary amongst objects.
+ * Each class has a data model which stores node's attributes.
+ * Each class has an tree model which stores children and parent.
+ * Inspectors give access to data and tree elements.
+ */
+
+/* 8 fields + size: spcflnat */
+typedef struct synctex_tree_model_t {
+ int sibling;
+ int parent;
+ int child;
+ int friend;
+ int last;
+ int next_hbox;
+ int arg_sibling;
+ int target;
+ int size;
+} synctex_tree_model_s;
+typedef const synctex_tree_model_s * synctex_tree_model_p;
+
+typedef struct synctex_data_model_t {
+ int tag;
+ int line;
+ int column;
+ int h;
+ int v;
+ int width;
+ int height;
+ int depth;
+ int mean_line;
+ int weight;
+ int h_V;
+ int v_V;
+ int width_V;
+ int height_V;
+ int depth_V;
+ int name;
+ int page;
+ int size;
+} synctex_data_model_s;
+
+typedef const synctex_data_model_s * synctex_data_model_p;
+
+typedef int (*synctex_int_getter_f)(synctex_node_p);
+typedef struct synctex_tlcpector_t {
+ synctex_int_getter_f tag;
+ synctex_int_getter_f line;
+ synctex_int_getter_f column;
+} synctex_tlcpector_s;
+typedef const synctex_tlcpector_s * synctex_tlcpector_p;
+static int _synctex_int_none(synctex_node_p node) {
+ SYNCTEX_UNUSED(node)
+ return 0;
+}
+static const synctex_tlcpector_s synctex_tlcpector_none = {
+ &_synctex_int_none, /* tag */
+ &_synctex_int_none, /* line */
+ &_synctex_int_none, /* column */
+};
+
+typedef struct synctex_inspector_t {
+ synctex_int_getter_f h;
+ synctex_int_getter_f v;
+ synctex_int_getter_f width;
+ synctex_int_getter_f height;
+ synctex_int_getter_f depth;
+} synctex_inspector_s;
+typedef const synctex_inspector_s * synctex_inspector_p;
+static const synctex_inspector_s synctex_inspector_none = {
+ &_synctex_int_none, /* h */
+ &_synctex_int_none, /* v */
+ &_synctex_int_none, /* width */
+ &_synctex_int_none, /* height */
+ &_synctex_int_none, /* depth */
+};
+
+typedef float (*synctex_float_getter_f)(synctex_node_p);
+typedef struct synctex_vispector_t {
+ synctex_float_getter_f h;
+ synctex_float_getter_f v;
+ synctex_float_getter_f width;
+ synctex_float_getter_f height;
+ synctex_float_getter_f depth;
+} synctex_vispector_s;
+static float _synctex_float_none(synctex_node_p node) {
+ SYNCTEX_UNUSED(node)
+ return 0;
+}
+static const synctex_vispector_s synctex_vispector_none = {
+ &_synctex_float_none, /* h */
+ &_synctex_float_none, /* v */
+ &_synctex_float_none, /* width */
+ &_synctex_float_none, /* height */
+ &_synctex_float_none, /* depth */
+};
+typedef const synctex_vispector_s * synctex_vispector_p;
+
+struct synctex_class_t {
+ synctex_scanner_p scanner;
+ synctex_node_type_t type;
+ synctex_node_new_f new;
+ synctex_node_fld_f free;
+ synctex_node_fld_f log;
+ synctex_node_fld_f display;
+ synctex_node_str_f abstract;
+ synctex_tree_model_p navigator;
+ synctex_data_model_p modelator;
+ synctex_tlcpector_p tlcpector;
+ synctex_inspector_p inspector;
+ synctex_vispector_p vispector;
+};
+
+/**
+ * Nota bene: naming convention.
+ * For static API, when the name contains "proxy", it applies to proxies.
+ * When the name contains "noxy", it applies to non proxies only.
+ * When the name contains "node", well it depends...
+ */
+
+typedef synctex_node_p synctex_proxy_p;
+typedef synctex_node_p synctex_noxy_p;
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark Abstract OBJECTS and METHODS
+# endif
+
+/**
+ * \def SYNCTEX_MSG_SEND
+ * \brief Takes care of sending the given message if possible.
+ * - parameter NODE: of type synctex_node_p
+ * - parameter SELECTOR: one of the class_ pointer properties
+ */
+# define SYNCTEX_MSG_SEND(NODE,SELECTOR) do {\
+ synctex_node_p N__ = NODE;\
+ if (N__ && N__->class_->SELECTOR) {\
+ (*(N__->class_->SELECTOR))(N__);\
+ }\
+} while (synctex_NO)
+
+/**
+ * Free the given node by sending the free message.
+ * - parameter NODE: of type synctex_node_p
+ */
+static void synctex_node_free(synctex_node_p node) {
+ SYNCTEX_MSG_SEND(node,free);
+}
+# if defined(SYNCTEX_TESTING)
+# if !defined(SYNCTEX_USE_HANDLE)
+# define SYNCTEX_USE_HANDLE 1
+# endif
+# if !defined(SYNCTEX_USE_CHARINDEX)
+# define SYNCTEX_USE_CHARINDEX 1
+# endif
+# endif
+SYNCTEX_INLINE static synctex_node_p _synctex_new_handle_with_target(synctex_node_p target);
+# if defined(SYNCTEX_USE_HANDLE)
+# define SYNCTEX_SCANNER_FREE_HANDLE(SCANR) \
+__synctex_scanner_free_handle(SCANR)
+# define SYNCTEX_SCANNER_REMOVE_HANDLE_TO(WHAT) \
+__synctex_scanner_remove_handle_to(WHAT)
+# define SYNCTEX_REGISTER_HANDLE_TO(NODE) \
+__synctex_scanner_register_handle_to(NODE)
+# else
+# define SYNCTEX_SCANNER_FREE_HANDLE(SCANR)
+# define SYNCTEX_SCANNER_REMOVE_HANDLE_TO(WHAT)
+# define SYNCTEX_REGISTER_HANDLE_TO(NODE)
+# endif
+
+# if defined(SYNCTEX_USE_CHARINDEX)
+# define SYNCTEX_CHARINDEX(NODE) (NODE->char_index)
+# define SYNCTEX_LINEINDEX(NODE) (NODE->line_index)
+# define SYNCTEX_PRINT_CHARINDEX_FMT "#%i"
+# define SYNCTEX_PRINT_CHARINDEX_WHAT ,SYNCTEX_CHARINDEX(node)
+# define SYNCTEX_PRINT_CHARINDEX \
+ printf(SYNCTEX_PRINT_CHARINDEX_FMT SYNCTEX_PRINT_CHARINDEX_WHAT)
+# define SYNCTEX_PRINT_LINEINDEX_FMT "L#%i"
+# define SYNCTEX_PRINT_LINEINDEX_WHAT ,SYNCTEX_LINEINDEX(node)
+# define SYNCTEX_PRINT_LINEINDEX \
+ printf(SYNCTEX_PRINT_LINEINDEX_FMT SYNCTEX_PRINT_LINEINDEX_WHAT)
+# define SYNCTEX_PRINT_CHARINDEX_NL \
+ printf(SYNCTEX_PRINT_CHARINDEX_FMT "\n" SYNCTEX_PRINT_CHARINDEX_WHAT)
+# define SYNCTEX_PRINT_LINEINDEX_NL \
+ printf(SYNCTEX_PRINT_CHARINDEX_FMT "\n"SYNCTEX_PRINT_LINEINDEX_WHAT)
+# define SYNCTEX_IMPLEMENT_CHARINDEX(NODE,CORRECTION)\
+ NODE->char_index = (synctex_charindex_t)(scanner->reader->charindex_offset+SYNCTEX_CUR-SYNCTEX_START+(CORRECTION)); \
+ NODE->line_index = scanner->reader->line_number;
+# else
+# define SYNCTEX_CHARINDEX(NODE) 0
+# define SYNCTEX_LINEINDEX(NODE) 0
+# define SYNCTEX_PRINT_CHARINDEX_FMT
+# define SYNCTEX_PRINT_CHARINDEX_WHAT
+# define SYNCTEX_PRINT_CHARINDEX
+# define SYNCTEX_PRINT_CHARINDEX
+# define SYNCTEX_PRINT_LINEINDEX_FMT
+# define SYNCTEX_PRINT_LINEINDEX_WHAT
+# define SYNCTEX_PRINT_LINEINDEX
+# define SYNCTEX_PRINT_CHARINDEX_NL printf("\n")
+# define SYNCTEX_PRINT_LINEINDEX_NL printf("\n")
+# define SYNCTEX_IMPLEMENT_CHARINDEX(NODE,CORRECTION)
+# endif
+
+/**
+ * The next macros are used to access the node tree info
+ * SYNCTEX_DATA(node) points to the first synctex integer or pointer data of node
+ * SYNCTEX_DATA(node)[index] is the information at index
+ * for example, the page of a sheet is stored in SYNCTEX_DATA(sheet)[_synctex_data_page_idx]
+ * - parameter NODE: of type synctex_node_p
+ * If the name starts with "__", the argument is nonullable
+ */
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark Tree SETGET
+# endif
+
+#if SYNCTEX_DEBUG > 1000
+#define SYNCTEX_PARAMETER_ASSERT(WHAT) \
+ do { \
+ if (!(WHAT)) { \
+ printf("! Parameter failure: %s\n",#WHAT); \
+ } \
+ } while (synctex_NO)
+#define DEFINE_SYNCTEX_TREE_HAS(WHAT)\
+static synctex_bool_t _synctex_tree_has_##WHAT(synctex_node_p node) {\
+ if (node) {\
+ if (node->class_->navigator->WHAT>=0) {\
+ return synctex_YES; \
+ } else {\
+ printf("WARNING: NO tree %s for %s\n", #WHAT, synctex_node_isa(node));\
+ }\
+ }\
+ return synctex_NO;\
+}
+#else
+#define SYNCTEX_PARAMETER_ASSERT(WHAT)
+#define DEFINE_SYNCTEX_TREE_HAS(WHAT) \
+static synctex_bool_t _synctex_tree_has_##WHAT(synctex_node_p node) {\
+ return (node && (node->class_->navigator->WHAT>=0));\
+}
+#endif
+
+# define DEFINE_SYNCTEX_TREE__GET(WHAT) \
+SYNCTEX_INLINE static synctex_node_p __synctex_tree_##WHAT(synctex_non_null_node_p node) {\
+ return node->data[node->class_->navigator->WHAT].as_node;\
+}
+# define DEFINE_SYNCTEX_TREE_GET(WHAT) \
+DEFINE_SYNCTEX_TREE__GET(WHAT) \
+static synctex_node_p _synctex_tree_##WHAT(synctex_node_p node) {\
+ if (_synctex_tree_has_##WHAT(node)) {\
+ return __synctex_tree_##WHAT(node);\
+ }\
+ return 0;\
+}
+# define DEFINE_SYNCTEX_TREE__RESET(WHAT) \
+SYNCTEX_INLINE static synctex_node_p __synctex_tree_reset_##WHAT(synctex_non_null_node_p node) {\
+ synctex_node_p old = node->data[node->class_->navigator->WHAT].as_node;\
+ node->data[node->class_->navigator->WHAT].as_node=NULL;\
+ return old;\
+}
+# define DEFINE_SYNCTEX_TREE_RESET(WHAT) \
+DEFINE_SYNCTEX_TREE__RESET(WHAT) \
+SYNCTEX_INLINE static synctex_node_p _synctex_tree_reset_##WHAT(synctex_node_p node) {\
+ return _synctex_tree_has_##WHAT(node)? \
+ __synctex_tree_reset_##WHAT(node): NULL; \
+}
+# define DEFINE_SYNCTEX_TREE__SET(WHAT) \
+SYNCTEX_INLINE static synctex_node_p __synctex_tree_set_##WHAT(synctex_non_null_node_p node, synctex_node_p new_value) {\
+ synctex_node_p old = __synctex_tree_##WHAT(node);\
+ node->data[node->class_->navigator->WHAT].as_node=new_value;\
+ return old;\
+}
+# define DEFINE_SYNCTEX_TREE_SET(WHAT) \
+DEFINE_SYNCTEX_TREE__SET(WHAT) \
+SYNCTEX_INLINE static synctex_node_p _synctex_tree_set_##WHAT(synctex_node_p node, synctex_node_p new_value) {\
+ return _synctex_tree_has_##WHAT(node)?\
+ __synctex_tree_set_##WHAT(node,new_value):NULL;\
+}
+# define DEFINE_SYNCTEX_TREE__GETSETRESET(WHAT) \
+DEFINE_SYNCTEX_TREE__GET(WHAT) \
+DEFINE_SYNCTEX_TREE__SET(WHAT) \
+DEFINE_SYNCTEX_TREE__RESET(WHAT)
+
+# define DEFINE_SYNCTEX_TREE_GETSET(WHAT) \
+DEFINE_SYNCTEX_TREE_HAS(WHAT) \
+DEFINE_SYNCTEX_TREE_GET(WHAT) \
+DEFINE_SYNCTEX_TREE_SET(WHAT)
+
+# define DEFINE_SYNCTEX_TREE_GETRESET(WHAT) \
+DEFINE_SYNCTEX_TREE_HAS(WHAT) \
+DEFINE_SYNCTEX_TREE_GET(WHAT) \
+DEFINE_SYNCTEX_TREE_RESET(WHAT)
+
+# define DEFINE_SYNCTEX_TREE_GETSETRESET(WHAT) \
+DEFINE_SYNCTEX_TREE_HAS(WHAT) \
+DEFINE_SYNCTEX_TREE_GET(WHAT) \
+DEFINE_SYNCTEX_TREE_SET(WHAT) \
+DEFINE_SYNCTEX_TREE_RESET(WHAT)
+
+/*
+ * _synctex_tree_set_... methods return the old value.
+ * The return value of _synctex_tree_set_child and
+ * _synctex_tree_set_sibling must be released somehow.
+ */
+DEFINE_SYNCTEX_TREE__GETSETRESET(sibling)
+DEFINE_SYNCTEX_TREE_GETSETRESET(parent)
+DEFINE_SYNCTEX_TREE_GETSETRESET(child)
+DEFINE_SYNCTEX_TREE_GETSETRESET(friend)
+DEFINE_SYNCTEX_TREE_GETSET(last)
+DEFINE_SYNCTEX_TREE_GETSET(next_hbox)
+DEFINE_SYNCTEX_TREE_GETSET(arg_sibling)
+DEFINE_SYNCTEX_TREE_GETSETRESET(target)
+
+#if SYNCTEX_DEBUG>1000
+# undef SYNCTEX_USE_NODE_COUNT
+# define SYNCTEX_USE_NODE_COUNT 1
+#endif
+#if SYNCTEX_USE_NODE_COUNT>0
+# define SYNCTEX_DECLARE_NODE_COUNT int node_count;
+# define SYNCTEX_INIT_NODE_COUNT \
+ do { node_count = 0; } while(synctex_NO)
+#else
+# define SYNCTEX_DECLARE_NODE_COUNT
+# define SYNCTEX_INIT_NODE_COUNT
+#endif
+
+#if SYNCTEX_USE_NODE_COUNT>10
+# define SYNCTEX_DID_NEW(N) _synctex_did_new(N)
+# define SYNCTEX_WILL_FREE(N) _synctex_will_free(N)
+#else
+# define SYNCTEX_DID_NEW(N)
+# define SYNCTEX_WILL_FREE(N)
+#endif
+
+#define SYNCTEX_HAS_CHILDREN(NODE) (NODE && _synctex_tree_child(NODE))
+# ifdef __SYNCTEX_WORK__
+# include "/usr/include/zlib.h"
+# else
+# include <zlib.h>
+# endif
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark STATUS
+# endif
+/* When the end of the synctex file has been reached: */
+# define SYNCTEX_STATUS_EOF 0
+/* When the function could not return the value it was asked for: */
+# define SYNCTEX_STATUS_NOT_OK (SYNCTEX_STATUS_EOF+1)
+/* When the function returns the value it was asked for:
+ It must be the biggest one */
+# define SYNCTEX_STATUS_OK (SYNCTEX_STATUS_NOT_OK+1)
+/* Generic error: */
+# define SYNCTEX_STATUS_ERROR (SYNCTEX_STATUS_EOF-1)
+/* Parameter error: */
+# define SYNCTEX_STATUS_BAD_ARGUMENT (SYNCTEX_STATUS_ERROR-1)
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark File reader
+# endif
+
+/* We ensure that SYNCTEX_BUFFER_SIZE < UINT_MAX, I don't know if it makes sense... */
+/* Actually, the minimum buffer size is driven by integer and float parsing, including the unit.
+ * ±0.123456789e123??
+ */
+# define SYNCTEX_BUFFER_MIN_SIZE 32
+# define SYNCTEX_BUFFER_SIZE 32768
+
+#if SYNCTEX_BUFFER_SIZE >= UINT_MAX
+# error BAD BUFFER SIZE(1)
+#endif
+#if SYNCTEX_BUFFER_SIZE < SYNCTEX_BUFFER_MIN_SIZE
+# error BAD BUFFER SIZE(2)
+#endif
+
+typedef struct synctex_reader_t {
+ gzFile file; /* The (possibly compressed) file */
+ char * output;
+ char * synctex;
+ char * current; /* current location in the buffer */
+ char * start; /* start of the buffer */
+ char * end; /* end of the buffer */
+ size_t min_size;
+ size_t size;
+ int lastv;
+ int line_number;
+ SYNCTEX_DECLARE_CHAR_OFFSET
+} synctex_reader_s;
+
+typedef synctex_reader_s * synctex_reader_p;
+
+typedef struct {
+ synctex_status_t status;
+ char * synctex;
+ gzFile file;
+ synctex_io_mode_t io_mode;
+} synctex_open_s;
+
+/* This functions opens the file at the "output" given location.
+ * It manages the problem of quoted filenames that appear with pdftex and filenames containing the space character.
+ * In TeXLive 2008, the synctex file created with pdftex did contain unexpected quotes.
+ * This function will remove them if possible.
+ * All the reference arguments will take a value on return. They must be non NULL.
+ * - returns: an open structure which status is
+ * SYNCTEX_STATUS_OK on success,
+ * SYNCTEX_STATUS_ERROR on failure.
+ * - note: on success, the caller is the owner
+ * of the fields of the returned open structure.
+ */
+static synctex_open_s __synctex_open_v2(const char * output, synctex_io_mode_t io_mode, synctex_bool_t add_quotes) {
+ synctex_open_s open = {SYNCTEX_STATUS_ERROR, NULL, NULL, io_mode};
+ char * quoteless_synctex_name = NULL;
+ const char * mode = _synctex_get_io_mode_name(open.io_mode);
+ size_t size = strlen(output)+strlen(synctex_suffix)+strlen(synctex_suffix_gz)+1;
+ if (NULL == (open.synctex = (char *)malloc(size))) {
+ _synctex_error("! __synctex_open_v2: Memory problem (1)\n");
+ return open;
+ }
+ /* we have reserved for synctex enough memory to copy output (including its 2 eventual quotes), both suffices,
+ * including the terminating character. size is free now. */
+ if (open.synctex != strcpy(open.synctex,output)) {
+ _synctex_error("! __synctex_open_v2: Copy problem\n");
+ return_on_error:
+ free(open.synctex);
+ open.synctex = NULL;
+ free(quoteless_synctex_name);/* We MUST have quoteless_synctex_name<>synctex_name */
+ return open;
+ }
+ /* remove the last path extension if any */
+ _synctex_strip_last_path_extension(open.synctex);
+ if (!strlen(open.synctex)) {
+ goto return_on_error;
+ }
+ /* now insert quotes. */
+ if (add_quotes) {
+ char * quoted = NULL;
+ if (_synctex_copy_with_quoting_last_path_component(open.synctex,&quoted,size) || quoted == NULL) {
+ /* There was an error or quoting does not make sense: */
+ goto return_on_error;
+ }
+ quoteless_synctex_name = open.synctex;
+ open.synctex = quoted;
+ }
+ /* Now add to open.synctex the first path extension. */
+ if (open.synctex != strcat(open.synctex,synctex_suffix)){
+ _synctex_error("! __synctex_open_v2: Concatenation problem (can't add suffix '%s')\n",synctex_suffix);
+ goto return_on_error;
+ }
+ /* Add to quoteless_synctex_name as well, if relevant. */
+ if (quoteless_synctex_name && (quoteless_synctex_name != strcat(quoteless_synctex_name,synctex_suffix))){
+ free(quoteless_synctex_name);
+ quoteless_synctex_name = NULL;
+ }
+ if (NULL == (open.file = gzopen(open.synctex,mode))) {
+ /* Could not open this file */
+ if (errno != ENOENT) {
+ /* The file does exist, this is a lower level error, I can't do anything. */
+ _synctex_error("could not open %s, error %i\n",open.synctex,errno);
+ goto return_on_error;
+ }
+ /* Apparently, there is no uncompressed synctex file. Try the compressed version */
+ if (open.synctex != strcat(open.synctex,synctex_suffix_gz)){
+ _synctex_error("! __synctex_open_v2: Concatenation problem (can't add suffix '%s')\n",synctex_suffix_gz);
+ goto return_on_error;
+ }
+ open.io_mode |= synctex_io_gz_mask;
+ mode = _synctex_get_io_mode_name(open.io_mode); /* the file is a compressed and is a binary file, this caused errors on Windows */
+ /* Add the suffix to the quoteless_synctex_name as well. */
+ if (quoteless_synctex_name && (quoteless_synctex_name != strcat(quoteless_synctex_name,synctex_suffix_gz))){
+ free(quoteless_synctex_name);
+ quoteless_synctex_name = NULL;
+ }
+ if (NULL == (open.file = gzopen(open.synctex,mode))) {
+ /* Could not open this file */
+ if (errno != ENOENT) {
+ /* The file does exist, this is a lower level error, I can't do anything. */
+ _synctex_error("Could not open %s, error %i\n",open.synctex,errno);
+ }
+ goto return_on_error;
+ }
+ }
+ /* At this point, the file is properly open.
+ * If we are in the add_quotes mode, we change the file name by removing the quotes. */
+ if (quoteless_synctex_name) {
+ gzclose(open.file);
+ if (rename(open.synctex,quoteless_synctex_name)) {
+ _synctex_error("Could not rename %s to %s, error %i\n",open.synctex,quoteless_synctex_name,errno);
+ /* We could not rename, reopen the file with the quoted name. */
+ if (NULL == (open.file = gzopen(open.synctex,mode))) {
+ /* No luck, could not re open this file, something has happened meanwhile */
+ if (errno != ENOENT) {
+ /* The file does not exist any more, it has certainly be removed somehow
+ * this is a lower level error, I can't do anything. */
+ _synctex_error("Could not open again %s, error %i\n",open.synctex,errno);
+ }
+ goto return_on_error;
+ }
+ } else {
+ /* The file has been successfully renamed */
+ if (NULL == (open.file = gzopen(quoteless_synctex_name,mode))) {
+ /* Could not open this file */
+ if (errno != ENOENT) {
+ /* The file does exist, this is a lower level error, I can't do anything. */
+ _synctex_error("Could not open renamed %s, error %i\n",quoteless_synctex_name,errno);
+ }
+ goto return_on_error;
+ }
+ /* The quote free file name should replace the old one:*/
+ free(open.synctex);
+ open.synctex = quoteless_synctex_name;
+ quoteless_synctex_name = NULL;
+ }
+ }
+ /* The operation is successful, return the arguments by value. */
+ open.status = SYNCTEX_STATUS_OK;
+ return open;
+}
+
+/* Opens the output file, taking into account the eventual build_directory.
+ * - returns: an open structure which status is
+ * SYNCTEX_STATUS_OK on success,
+ * SYNCTEX_STATUS_ERROR on failure.
+ * - note: on success, the caller is the owner
+ * of the fields of the returned open structure.
+ */
+static synctex_open_s _synctex_open_v2(const char * output, const char * build_directory, synctex_io_mode_t io_mode, synctex_bool_t add_quotes) {
+ synctex_open_s open = __synctex_open_v2(output,io_mode,add_quotes);
+ if (open.status == SYNCTEX_STATUS_OK) {
+ return open;
+ }
+ if (build_directory && strlen(build_directory)) {
+ char * build_output;
+ const char *lpc;
+ size_t size;
+ synctex_bool_t is_absolute;
+ build_output = NULL;
+ lpc = _synctex_last_path_component(output);
+ size = strlen(build_directory)+strlen(lpc)+2; /* One for the '/' and one for the '\0'. */
+ is_absolute = _synctex_path_is_absolute(build_directory);
+ if (!is_absolute) {
+ size += strlen(output);
+ }
+ if ((build_output = (char *)_synctex_malloc(size))) {
+ if (is_absolute) {
+ build_output[0] = '\0';
+ } else {
+ if (build_output != strcpy(build_output,output)) {
+ _synctex_free(build_output);
+ return open;
+ }
+ build_output[lpc-output]='\0';
+ }
+ if (build_output == strcat(build_output,build_directory)) {
+ /* Append a path separator if necessary. */
+ if (!SYNCTEX_IS_PATH_SEPARATOR(build_output[strlen(build_directory)-1])) {
+ if (build_output != strcat(build_output,"/")) {
+ _synctex_free(build_output);
+ return open;
+ }
+ }
+ /* Append the last path component of the output. */
+ if (build_output != strcat(build_output,lpc)) {
+ _synctex_free(build_output);
+ return open;
+ }
+ open = __synctex_open_v2(build_output,io_mode,add_quotes);
+ }
+ _synctex_free(build_output);
+ } /* if ((build_output... */
+ } /* if (build_directory...) */
+ return open;
+}
+static void synctex_reader_free(synctex_reader_p reader) {
+ if (reader) {
+ _synctex_free(reader->output);
+ _synctex_free(reader->synctex);
+ _synctex_free(reader->start);
+ gzclose(reader->file);
+ _synctex_free(reader);
+ }
+}
+/*
+ * Return reader on success.
+ * 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) {
+ /* now open the synctex file */
+ synctex_open_s open = _synctex_open_v2(output,build_directory,0,synctex_ADD_QUOTES);
+ if (open.status<SYNCTEX_STATUS_OK) {
+ open = _synctex_open_v2(output,build_directory,0,synctex_DONT_ADD_QUOTES);
+ if (open.status<SYNCTEX_STATUS_OK) {
+ return NULL;
+ }
+ }
+ reader->synctex = open.synctex;
+ reader->file = open.file;
+ /* make a private copy of output */
+ if (NULL == (reader->output = (char *)_synctex_malloc(strlen(output)+1))){
+ _synctex_error("! synctex_scanner_new_with_output_file: Memory problem (2), reader's output is not reliable.");
+ } else if (reader->output != strcpy(reader->output,output)) {
+ _synctex_free(reader->output);
+ reader->output = NULL;
+ _synctex_error("! synctex_scanner_new_with_output_file: Copy problem, reader's output is not reliable.");
+ }
+ reader->start = reader->end = reader->current = NULL;
+ reader->min_size = SYNCTEX_BUFFER_MIN_SIZE;
+ reader->size = SYNCTEX_BUFFER_SIZE;
+ reader->start = reader->current =
+ (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
+ synctex_reader_free(reader);
+ return NULL;
+#endif
+ }
+ reader->end = reader->start+reader->size;
+ /* reader->end always points to a null terminating character.
+ * Maybe there is another null terminating character between reader->current and reader->end-1.
+ * At least, we are sure that reader->current points to a string covering a valid part of the memory. */
+# if defined(SYNCTEX_USE_CHARINDEX)
+ reader->charindex_offset = -reader->size;
+# endif
+ }
+ return reader;
+}
+
+# if defined(SYNCTEX_USE_HANDLE)
+# define SYNCTEX_DECLARE_HANDLE synctex_node_p handle;
+# else
+# define SYNCTEX_DECLARE_HANDLE
+# endif
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark SCANNER
+# endif
+/**
+ * The synctex scanner is the root object.
+ * Is is initialized with the contents of a text file or a gzipped file.
+ * The buffer_.* are first used to parse the text.
+ */
+struct synctex_scanner_t {
+ synctex_reader_p reader;
+ SYNCTEX_DECLARE_NODE_COUNT
+ SYNCTEX_DECLARE_HANDLE
+ char * output_fmt; /* dvi or pdf, not yet used */
+ synctex_iterator_p iterator;/* result iterator */
+ int version; /* 1, not yet used */
+ struct {
+ unsigned has_parsed:1; /* Whether the scanner has parsed its underlying synctex file. */
+ unsigned postamble:1; /* Whether the scanner has parsed its underlying synctex file. */
+ unsigned reserved:sizeof(unsigned)-2; /* alignment */
+ } flags;
+ int pre_magnification; /* magnification from the synctex preamble */
+ int pre_unit; /* unit from the synctex preamble */
+ int pre_x_offset; /* X offset from the synctex preamble */
+ int pre_y_offset; /* Y offset from the synctex preamble */
+ int count; /* Number of records, from the synctex postamble */
+ float unit; /* real unit, from synctex preamble or post scriptum */
+ float x_offset; /* X offset, from synctex preamble or post scriptum */
+ float y_offset; /* Y Offset, from synctex preamble or post scriptum */
+ synctex_node_p input; /* The first input node, its siblings are the other input nodes */
+ synctex_node_p sheet; /* The first sheet node, its siblings are the other sheet nodes */
+ synctex_node_p form; /* The first form, its siblings are the other forms */
+ synctex_node_p ref_in_sheet; /* The first form ref node in sheet, its friends are the other form ref nodes */
+ synctex_node_p ref_in_form; /* The first form ref node, its friends are the other form ref nodes in sheet */
+ int number_of_lists; /* The number of friend lists */
+ synctex_node_r lists_of_friends;/* The friend lists */
+ synctex_class_s class_[synctex_node_number_of_types]; /* The classes of the nodes of the scanner */
+ int display_switcher;
+ char * display_prompt;
+};
+
+/**
+ * Create a new node of the given type.
+ * - parameter scanner: of type synctex_node_p
+ * - parameter type: a type, the client is responsible
+ * to ask for an acceptable type.
+ */
+synctex_node_p synctex_node_new(synctex_scanner_p scanner, synctex_node_type_t type) {
+ return scanner? scanner->class_[type].new(scanner):NULL;
+}
+# if defined(SYNCTEX_USE_HANDLE)
+SYNCTEX_INLINE static void __synctex_scanner_free_handle(synctex_scanner_p scanner) {
+ synctex_node_free(scanner->handle);
+}
+SYNCTEX_INLINE static void __synctex_scanner_remove_handle_to(synctex_node_p node) {
+ synctex_node_p arg_sibling = NULL;
+ synctex_node_p handle = node->class_->scanner->handle;
+ while (handle) {
+ synctex_node_p sibling;
+ if (node == _synctex_tree_target(handle)) {
+ sibling = __synctex_tree_reset_sibling(handle);
+ if (arg_sibling) {
+ __synctex_tree_set_sibling(arg_sibling, sibling);
+ } else {
+ node->class_->scanner->handle = sibling;
+ }
+ synctex_node_free(handle);
+ break;
+ } else {
+ sibling = __synctex_tree_sibling(handle);
+ }
+ arg_sibling = handle;
+ handle = sibling;
+ }
+}
+SYNCTEX_INLINE static void __synctex_scanner_register_handle_to(synctex_node_p node) {
+ synctex_node_p NNN = _synctex_new_handle_with_target(node);
+ __synctex_tree_set_sibling(NNN,node->class_->scanner->handle);
+ node->class_->scanner->handle = NNN;
+}
+#endif
+#if SYNCTEX_USE_NODE_COUNT>10
+SYNCTEX_INLINE static void _synctex_did_new(synctex_node_p node) {
+ printf("NODE CREATED # %i, %s, %p\n",
+ (node->class_->scanner->node_count)++,
+ synctex_node_isa(node),
+ node);
+}
+SYNCTEX_INLINE static void _synctex_will_free(synctex_node_p node) {
+ printf("NODE DELETED # %i, %s, %p\n",
+ --(node->class_->scanner->node_count),
+ synctex_node_isa(node),
+ node);
+}
+#endif
+
+/**
+ * Free the given node.
+ * - parameter node: of type synctex_node_p
+ * - note: 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.
+ */
+static void _synctex_free_node(synctex_node_p node) {
+ if (node) {
+ SYNCTEX_SCANNER_REMOVE_HANDLE_TO(node);
+ SYNCTEX_WILL_FREE(node);
+ synctex_node_free(__synctex_tree_sibling(node));
+ synctex_node_free(_synctex_tree_child(node));
+ _synctex_free(node);
+ }
+ return;
+}
+/**
+ * Free the given handle.
+ * - parameter node: of type synctex_node_p
+ * - note: 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 handles.
+ */
+static void _synctex_free_handle(synctex_node_p handle) {
+ if (handle) {
+ _synctex_free_handle(__synctex_tree_sibling(handle));
+ _synctex_free_handle(_synctex_tree_child(handle));
+ _synctex_free(handle);
+ }
+ return;
+}
+
+/**
+ * Free the given leaf node.
+ * - parameter node: of type synctex_node_p, with no child nor sibling.
+ * - note: 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 no children.
+ */
+static void _synctex_free_leaf(synctex_node_p node) {
+ if (node) {
+ SYNCTEX_SCANNER_REMOVE_HANDLE_TO(node);
+ SYNCTEX_WILL_FREE(node);
+ synctex_node_free(__synctex_tree_sibling(node));
+ _synctex_free(node);
+ }
+ return;
+}
+
+/**
+ SYNCTEX_CUR, SYNCTEX_START and SYNCTEX_END are convenient shortcuts
+ */
+# define SYNCTEX_CUR (scanner->reader->current)
+# define SYNCTEX_START (scanner->reader->start)
+# define SYNCTEX_END (scanner->reader->end)
+
+/* Here are gathered all the possible status that the next scanning functions will return.
+ * All these functions return a status, and pass their result through pointers.
+ * Negative values correspond to errors.
+ * The management of the buffer is causing some significant overhead.
+ * Every function that may access the buffer returns a status related to the buffer and file state.
+ * status >= SYNCTEX_STATUS_OK means the function worked as expected
+ * status < SYNCTEX_STATUS_OK means the function did not work as expected
+ * status == SYNCTEX_STATUS_NOT_OK means the function did not work as expected but there is still some material to parse.
+ * status == SYNCTEX_STATUS_EOF means the function did not work as expected and there is no more material.
+ * status<SYNCTEX_STATUS_EOF means an error
+ */
+#if defined(SYNCTEX_USE_CHARINDEX)
+synctex_node_p synctex_scanner_handle(synctex_scanner_p scanner) {
+ return scanner? scanner->handle:NULL;
+}
+#endif
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark Decoding prototypes
+# endif
+
+typedef struct {
+ int integer;
+ synctex_status_t status;
+} synctex_is_s;
+
+static synctex_is_s _synctex_decode_int(synctex_scanner_p scanner);
+static synctex_is_s _synctex_decode_int_opt(synctex_scanner_p scanner, int default_value);
+static synctex_is_s _synctex_decode_int_v(synctex_scanner_p scanner);
+
+typedef struct {
+ char * string;
+ synctex_status_t status;
+} synctex_ss_s;
+
+static synctex_ss_s _synctex_decode_string(synctex_scanner_p scanner);
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark Data SETGET
+# endif
+
+/**
+ * The next macros are used to access the node data info
+ * through the class modelator integer fields.
+ * - parameter NODE: of type synctex_node_p
+ */
+# define SYNCTEX_DATA(NODE) ((*((((NODE)->class_))->info))(NODE))
+#if defined 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));\
+}\
+SYNCTEX_INLINE static synctex_bool_t _synctex_data_has_##WHAT(synctex_node_p node) {\
+ if (node && (node->class_->modelator->WHAT<0)) {\
+ printf("WARNING: NO %s for %s\n", #WHAT, synctex_node_isa(node));\
+ }\
+ return __synctex_data_has_##WHAT(node);\
+}
+#else
+# 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));\
+}\
+SYNCTEX_INLINE static synctex_bool_t _synctex_data_has_##WHAT(synctex_node_p node) {\
+ return __synctex_data_has_##WHAT(node);\
+}
+#endif
+
+SYNCTEX_INLINE static synctex_data_p __synctex_data(synctex_node_p node) {
+ return node->data+node->class_->navigator->size;
+}
+# define DEFINE_SYNCTEX_DATA_INT_GETSET(WHAT) \
+DEFINE_SYNCTEX_DATA_HAS(WHAT)\
+static int _synctex_data_##WHAT(synctex_node_p node) {\
+ if (_synctex_data_has_##WHAT(node)) {\
+ return __synctex_data(node)[node->class_->modelator->WHAT].as_integer;\
+ }\
+ return 0;\
+}\
+static int _synctex_data_set_##WHAT(synctex_node_p node, int new_value) {\
+ int old = 0;\
+ if (_synctex_data_has_##WHAT(node)) {\
+ old = __synctex_data(node)[node->class_->modelator->WHAT].as_integer;\
+ __synctex_data(node)[node->class_->modelator->WHAT].as_integer=new_value;\
+ }\
+ return old;\
+}
+#define DEFINE_SYNCTEX_DATA_INT_DECODE(WHAT) \
+static synctex_status_t _synctex_data_decode_##WHAT(synctex_node_p node) {\
+ if (_synctex_data_has_##WHAT(node)) {\
+ synctex_is_s is = _synctex_decode_int(node->class_->scanner);\
+ if (is.status == SYNCTEX_STATUS_OK) {\
+ _synctex_data_set_##WHAT(node,is.integer);\
+ } \
+ return is.status;\
+ }\
+ return SYNCTEX_STATUS_BAD_ARGUMENT;\
+}
+# define DEFINE_SYNCTEX_DATA_INT_DECODE_v(WHAT) \
+static synctex_status_t _synctex_data_decode_##WHAT##_v(synctex_node_p node) {\
+ if (_synctex_data_has_##WHAT(node)) {\
+ synctex_is_s is = _synctex_decode_int_v(node->class_->scanner);\
+ if (is.status == SYNCTEX_STATUS_OK) {\
+ _synctex_data_set_##WHAT(node,is.integer);\
+ } \
+ return is.status;\
+ }\
+ return SYNCTEX_STATUS_BAD_ARGUMENT;\
+}
+#define DEFINE_SYNCTEX_DATA_STR_GETSET(WHAT) \
+DEFINE_SYNCTEX_DATA_HAS(WHAT)\
+static char * _synctex_data_##WHAT(synctex_node_p node) {\
+ if (_synctex_data_has_##WHAT(node)) {\
+ return node->data[node->class_->navigator->size+node->class_->modelator->WHAT].as_string;\
+ }\
+ return NULL;\
+}\
+static char * _synctex_data_set_##WHAT(synctex_node_p node, char * new_value) {\
+ char * old = "";\
+ if (_synctex_data_has_##WHAT(node)) {\
+ old = node->data[node->class_->navigator->size+node->class_->modelator->WHAT].as_string;\
+ node->data[node->class_->navigator->size+node->class_->modelator->WHAT].as_string =new_value;\
+ }\
+ return old;\
+}
+#define DEFINE_SYNCTEX_DATA_STR_DECODE(WHAT) \
+static synctex_status_t _synctex_data_decode_##WHAT(synctex_node_p node) {\
+ if (_synctex_data_has_##WHAT(node)) {\
+ synctex_ss_s ss = _synctex_decode_string(node->class_->scanner);\
+ if (ss.status == SYNCTEX_STATUS_OK) {\
+ _synctex_data_set_##WHAT(node,ss.string);\
+ } \
+ return ss.status;\
+ }\
+ return SYNCTEX_STATUS_BAD_ARGUMENT;\
+}
+#define DEFINE_SYNCTEX_DATA_INT_GETSET_DECODE(WHAT) \
+DEFINE_SYNCTEX_DATA_INT_GETSET(WHAT) \
+DEFINE_SYNCTEX_DATA_INT_DECODE(WHAT)
+#define DEFINE_SYNCTEX_DATA_INT_GETSET_DECODE_v(WHAT) \
+DEFINE_SYNCTEX_DATA_INT_GETSET(WHAT) \
+DEFINE_SYNCTEX_DATA_INT_DECODE_v(WHAT)
+#define DEFINE_SYNCTEX_DATA_STR_GETSET_DECODE(WHAT) \
+DEFINE_SYNCTEX_DATA_STR_GETSET(WHAT) \
+DEFINE_SYNCTEX_DATA_STR_DECODE(WHAT)
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark OBJECTS, their creators and destructors.
+# endif
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark input.
+# endif
+
+DEFINE_SYNCTEX_DATA_INT_GETSET_DECODE(tag)
+DEFINE_SYNCTEX_DATA_INT_GETSET_DECODE(line)
+DEFINE_SYNCTEX_DATA_STR_GETSET_DECODE(name)
+
+/* Input nodes only know about their sibling, which is another input node.
+ * The synctex information is the _synctex_data_tag and _synctex_data_name
+ * note: the input owns its name. */
+
+# define SYNCTEX_INPUT_MARK "Input:"
+
+static const synctex_tree_model_s synctex_tree_model_input = {
+ synctex_tree_sibling_idx, /* sibling */
+ -1, /* parent */
+ -1, /* child */
+ -1, /* friend */
+ -1, /* last */
+ -1, /* next_hbox */
+ -1, /* arg_sibling */
+ -1, /* target */
+ synctex_tree_s_input_max
+};
+static const synctex_data_model_s synctex_data_model_input = {
+ synctex_data_input_tag_idx, /* tag */
+ synctex_data_input_line_idx,/* line */
+ -1, /* column */
+ -1, /* h */
+ -1, /* v */
+ -1, /* width */
+ -1, /* height */
+ -1, /* depth */
+ -1, /* mean_line */
+ -1, /* weight */
+ -1, /* h_V */
+ -1, /* v_V */
+ -1, /* width_V */
+ -1, /* height_V */
+ -1, /* depth_V */
+ synctex_data_input_name_idx, /* name */
+ -1, /* page */
+ synctex_data_input_tln_max
+};
+
+#define SYNCTEX_INSPECTOR_GETTER_F(WHAT)\
+&_synctex_data_##WHAT, &_synctex_data_set_##WHAT
+
+static synctex_node_p _synctex_new_input(synctex_scanner_p scanner);
+static void _synctex_free_input(synctex_node_p node);
+static void _synctex_log_input(synctex_node_p node);
+static char * _synctex_abstract_input(synctex_node_p node);
+static void _synctex_display_input(synctex_node_p node);
+
+static const synctex_tlcpector_s synctex_tlcpector_input = {
+ &_synctex_data_tag, /* tag */
+ &_synctex_int_none, /* line */
+ &_synctex_int_none, /* column */
+};
+
+static synctex_class_s 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 */
+ &_synctex_abstract_input, /* abstract */
+ &synctex_tree_model_input, /* tree model */
+ &synctex_data_model_input, /* data model */
+ &synctex_tlcpector_input, /* inspector */
+ &synctex_inspector_none, /* inspector */
+ &synctex_vispector_none, /* vispector */
+};
+
+typedef struct {
+ SYNCTEX_DECLARE_CHARINDEX
+ synctex_class_p class_;
+ synctex_data_u data[synctex_tree_s_input_max+synctex_data_input_tln_max];
+} synctex_input_s;
+
+static synctex_node_p _synctex_new_input(synctex_scanner_p scanner) {
+ if (scanner) {
+ synctex_node_p node = _synctex_malloc(sizeof(synctex_input_s));
+ if (node) {
+ node->class_ = scanner->class_+synctex_node_type_input;
+ SYNCTEX_DID_NEW(node);
+ SYNCTEX_IMPLEMENT_CHARINDEX(node,0);
+ SYNCTEX_REGISTER_HANDLE_TO(node);
+ }
+ return node;
+ }
+ return NULL;
+}
+
+static void _synctex_free_input(synctex_node_p node){
+ if (node) {
+ SYNCTEX_SCANNER_REMOVE_HANDLE_TO(node);
+ SYNCTEX_WILL_FREE(node);
+ synctex_node_free(__synctex_tree_sibling(node));
+ _synctex_free(_synctex_data_name(node));
+ _synctex_free(node);
+ }
+}
+
+/* The sheet is a first level node.
+ * It has no parent (the owner is the scanner itself)
+ * Its sibling points to another sheet.
+ * Its child points to its first child, in general a box.
+ * A sheet node contains only one synctex information: the page.
+ * This is the 1 based page index as given by TeX.
+ */
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark sheet.
+# endif
+/**
+ * Every node has the same structure, but not the same size.
+ */
+
+DEFINE_SYNCTEX_DATA_INT_GETSET_DECODE(page)
+
+typedef struct {
+ SYNCTEX_DECLARE_CHARINDEX
+ synctex_class_p class_;
+ synctex_data_u data[synctex_tree_scn_sheet_max+synctex_data_p_sheet_max];
+} synctex_node_sheet_s;
+
+/* sheet node creator */
+
+#define DEFINE_synctex_new_scanned_NODE(NAME)\
+static synctex_node_p _synctex_new_##NAME(synctex_scanner_p scanner) {\
+ if (scanner) {\
+ ++SYNCTEX_CUR;\
+ synctex_node_p node = _synctex_malloc(sizeof(synctex_node_##NAME##_s));\
+ if (node) {\
+ node->class_ = scanner->class_+synctex_node_type_##NAME;\
+ SYNCTEX_DID_NEW(node); \
+ SYNCTEX_IMPLEMENT_CHARINDEX(node,-1);\
+ SYNCTEX_REGISTER_HANDLE_TO(node); \
+ }\
+ return node;\
+ }\
+ return NULL;\
+}
+/* NB: -1 in SYNCTEX_IMPLEMENT_CHARINDEX above because
+ * the first char of the line has been scanned
+ */
+DEFINE_synctex_new_scanned_NODE(sheet)
+static void _synctex_log_sheet(synctex_node_p node);
+static char * _synctex_abstract_sheet(synctex_node_p node);
+static void _synctex_display_sheet(synctex_node_p node);
+
+static const synctex_tree_model_s synctex_tree_model_sheet = {
+ synctex_tree_sibling_idx, /* sibling */
+ -1, /* parent */
+ synctex_tree_s_child_idx, /* child */
+ -1, /* friend */
+ -1, /* last */
+ synctex_tree_sc_next_hbox_idx, /* next_hbox */
+ -1, /* arg_sibling */
+ -1, /* target */
+ synctex_tree_scn_sheet_max
+};
+static const synctex_data_model_s synctex_data_model_sheet = {
+ -1, /* tag */
+ -1, /* line */
+ -1, /* column */
+ -1, /* h */
+ -1, /* v */
+ -1, /* width */
+ -1, /* height */
+ -1, /* depth */
+ -1, /* mean_line */
+ -1, /* weight */
+ -1, /* h_V */
+ -1, /* v_V */
+ -1, /* width_V */
+ -1, /* height_V */
+ -1, /* depth_V */
+ -1, /* name */
+ synctex_data_sheet_page_idx, /* page */
+ synctex_data_p_sheet_max
+};
+static synctex_class_s 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 */
+ &_synctex_abstract_sheet, /* abstract */
+ &synctex_tree_model_sheet, /* tree model */
+ &synctex_data_model_sheet, /* data model */
+ &synctex_tlcpector_none, /* tlcpector */
+ &synctex_inspector_none, /* inspector */
+ &synctex_vispector_none, /* vispector */
+};
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark form.
+# endif
+/**
+ * Every node has the same structure, but not the same size.
+ */
+typedef struct {
+ SYNCTEX_DECLARE_CHARINDEX
+ synctex_class_p class_;
+ synctex_data_u data[synctex_tree_sct_form_max+synctex_data_t_form_max];
+} synctex_node_form_s;
+
+DEFINE_synctex_new_scanned_NODE(form)
+
+static char * _synctex_abstract_form(synctex_node_p node);
+static void _synctex_display_form(synctex_node_p node);
+static void _synctex_log_form(synctex_node_p node);
+
+static const synctex_tree_model_s synctex_tree_model_form = {
+ synctex_tree_sibling_idx, /* sibling */
+ -1, /* parent */
+ synctex_tree_s_child_idx, /* child */
+ -1, /* friend */
+ -1, /* last */
+ -1, /* next_hbox */
+ -1, /* arg_sibling */
+ synctex_tree_sc_target_idx, /* target */
+ synctex_tree_sct_form_max
+};
+static const synctex_data_model_s synctex_data_model_form = {
+ synctex_data_form_tag_idx, /* tag */
+ -1, /* line */
+ -1, /* column */
+ -1, /* h */
+ -1, /* v */
+ -1, /* width */
+ -1, /* height */
+ -1, /* depth */
+ -1, /* mean_line */
+ -1, /* weight */
+ -1, /* h_V */
+ -1, /* v_V */
+ -1, /* width_V */
+ -1, /* height_V */
+ -1, /* depth_V */
+ -1, /* name */
+ -1, /* page */
+ synctex_data_t_form_max
+};
+static synctex_class_s synctex_class_form = {
+ NULL, /* No scanner yet */
+ synctex_node_type_form, /* Node type */
+ &_synctex_new_form, /* creator */
+ &_synctex_free_node, /* destructor */
+ &_synctex_log_form, /* log */
+ &_synctex_display_form, /* display */
+ &_synctex_abstract_form, /* abstract */
+ &synctex_tree_model_form, /* tree model */
+ &synctex_data_model_form, /* data model */
+ &synctex_tlcpector_none, /* tlcpector */
+ &synctex_inspector_none, /* inspector */
+ &synctex_vispector_none, /* vispector */
+};
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark vbox.
+# endif
+
+/* A box node contains navigation and synctex information
+ * There are different kinds of boxes.
+ * Only horizontal boxes are treated differently because of their visible size.
+ */
+typedef struct {
+ SYNCTEX_DECLARE_CHARINDEX
+ synctex_class_p class_;
+ synctex_data_u data[synctex_tree_spcfl_vbox_max+synctex_data_box_max];
+} synctex_node_vbox_s;
+
+/* vertical box node creator */
+DEFINE_synctex_new_scanned_NODE(vbox)
+
+static char * _synctex_abstract_vbox(synctex_node_p node);
+static void _synctex_display_vbox(synctex_node_p node);
+static void _synctex_log_vbox(synctex_node_p node);
+
+static const synctex_tree_model_s synctex_tree_model_vbox = {
+ synctex_tree_sibling_idx, /* sibling */
+ synctex_tree_s_parent_idx, /* parent */
+ synctex_tree_sp_child_idx, /* child */
+ synctex_tree_spc_friend_idx, /* friend */
+ synctex_tree_spcf_last_idx, /* last */
+ -1, /* next_hbox */
+ -1, /* arg_sibling */
+ -1, /* target */
+ synctex_tree_spcfl_vbox_max
+};
+
+#define SYNCTEX_DFLT_COLUMN -1
+
+DEFINE_SYNCTEX_DATA_INT_GETSET(column)
+static synctex_status_t _synctex_data_decode_column(synctex_node_p node) {
+ if (_synctex_data_has_column(node)) {
+ synctex_is_s is = _synctex_decode_int_opt(node->class_->scanner,
+ SYNCTEX_DFLT_COLUMN);
+ if (is.status == SYNCTEX_STATUS_OK) {
+ _synctex_data_set_column(node,is.integer);
+ }
+ return is.status;
+ }
+ return SYNCTEX_STATUS_BAD_ARGUMENT;
+}
+DEFINE_SYNCTEX_DATA_INT_GETSET_DECODE(h)
+DEFINE_SYNCTEX_DATA_INT_GETSET_DECODE_v(v)
+DEFINE_SYNCTEX_DATA_INT_GETSET_DECODE(width)
+DEFINE_SYNCTEX_DATA_INT_GETSET_DECODE(height)
+DEFINE_SYNCTEX_DATA_INT_GETSET_DECODE(depth)
+
+SYNCTEX_INLINE static void _synctex_data_set_tlc(synctex_node_p node, synctex_node_p model) {
+ _synctex_data_set_tag(node, _synctex_data_tag(model));
+ _synctex_data_set_line(node, _synctex_data_line(model));
+ _synctex_data_set_column(node, _synctex_data_column(model));
+}
+SYNCTEX_INLINE static void _synctex_data_set_tlchv(synctex_node_p node, synctex_node_p model) {
+ _synctex_data_set_tlc(node,model);
+ _synctex_data_set_h(node, _synctex_data_h(model));
+ _synctex_data_set_v(node, _synctex_data_v(model));
+}
+
+static const synctex_data_model_s synctex_data_model_box = {
+ synctex_data_tag_idx, /* tag */
+ synctex_data_line_idx, /* line */
+ synctex_data_column_idx,/* column */
+ synctex_data_h_idx, /* h */
+ synctex_data_v_idx, /* v */
+ synctex_data_width_idx, /* width */
+ synctex_data_height_idx,/* height */
+ synctex_data_depth_idx, /* depth */
+ -1, /* mean_line */
+ -1, /* weight */
+ -1, /* h_V */
+ -1, /* v_V */
+ -1, /* width_V */
+ -1, /* height_V */
+ -1, /* depth_V */
+ -1, /* name */
+ -1, /* page */
+ synctex_data_box_max
+};
+static const synctex_tlcpector_s synctex_tlcpector_default = {
+ &_synctex_data_tag, /* tag */
+ &_synctex_data_line, /* line */
+ &_synctex_data_column, /* column */
+};
+static const synctex_inspector_s synctex_inspector_box = {
+ &_synctex_data_h,
+ &_synctex_data_v,
+ &_synctex_data_width,
+ &_synctex_data_height,
+ &_synctex_data_depth,
+};
+static float __synctex_node_visible_h(synctex_node_p node);
+static float __synctex_node_visible_v(synctex_node_p node);
+static float __synctex_node_visible_width(synctex_node_p node);
+static float __synctex_node_visible_height(synctex_node_p node);
+static float __synctex_node_visible_depth(synctex_node_p node);
+static synctex_vispector_s synctex_vispector_box = {
+ &__synctex_node_visible_h,
+ &__synctex_node_visible_v,
+ &__synctex_node_visible_width,
+ &__synctex_node_visible_height,
+ &__synctex_node_visible_depth,
+};
+/* These are static class objects, each scanner will make a copy of them and setup the scanner field.
+ */
+static synctex_class_s synctex_class_vbox = {
+ NULL, /* No scanner yet */
+ synctex_node_type_vbox, /* Node type */
+ &_synctex_new_vbox, /* creator */
+ &_synctex_free_node, /* destructor */
+ &_synctex_log_vbox, /* log */
+ &_synctex_display_vbox, /* display */
+ &_synctex_abstract_vbox, /* abstract */
+ &synctex_tree_model_vbox, /* tree model */
+ &synctex_data_model_box, /* data model */
+ &synctex_tlcpector_default, /* tlcpector */
+ &synctex_inspector_box, /* inspector */
+ &synctex_vispector_box, /* vispector */
+};
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark hbox.
+# endif
+
+/* 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. */
+
+static const synctex_tree_model_s synctex_tree_model_hbox = {
+ synctex_tree_sibling_idx, /* sibling */
+ synctex_tree_s_parent_idx, /* parent */
+ synctex_tree_sp_child_idx, /* child */
+ synctex_tree_spc_friend_idx, /* friend */
+ synctex_tree_spcf_last_idx, /* last */
+ synctex_tree_spcfl_next_hbox_idx, /* next_hbox */
+ -1, /* arg_sibling */
+ -1, /* target */
+ synctex_tree_spcfln_hbox_max
+};
+
+DEFINE_SYNCTEX_DATA_INT_GETSET(mean_line)
+DEFINE_SYNCTEX_DATA_INT_GETSET(weight)
+DEFINE_SYNCTEX_DATA_INT_GETSET(h_V)
+DEFINE_SYNCTEX_DATA_INT_GETSET(v_V)
+DEFINE_SYNCTEX_DATA_INT_GETSET(width_V)
+DEFINE_SYNCTEX_DATA_INT_GETSET(height_V)
+DEFINE_SYNCTEX_DATA_INT_GETSET(depth_V)
+
+/**
+ * The hbox model.
+ * It contains V variants of geometrical information.
+ * It happens that hboxes contain material that is not used to compute
+ * the bounding box. Some letters may appear out of the box given by TeX.
+ * In such a situation, the visible bouding box is bigger ence the V variant.
+ * Only hboxes have such variant. It does not make sense for void boxes
+ * and it is not used here for vboxes.
+ * - author: JL
+ */
+
+static const synctex_data_model_s synctex_data_model_hbox = {
+ synctex_data_tag_idx, /* tag */
+ synctex_data_line_idx, /* line */
+ synctex_data_column_idx,/* column */
+ synctex_data_h_idx, /* h */
+ synctex_data_v_idx, /* v */
+ synctex_data_width_idx, /* width */
+ synctex_data_height_idx,/* height */
+ synctex_data_depth_idx, /* depth */
+ synctex_data_mean_line_idx, /* mean_line */
+ synctex_data_weight_idx, /* weight */
+ synctex_data_h_V_idx, /* h_V */
+ synctex_data_v_V_idx, /* v_V */
+ synctex_data_width_V_idx, /* width_V */
+ synctex_data_height_V_idx, /* height_V */
+ synctex_data_depth_V_idx, /* depth_V */
+ -1, /* name */
+ -1, /* page */
+ synctex_data_hbox_max
+};
+
+typedef struct {
+ SYNCTEX_DECLARE_CHARINDEX
+ synctex_class_p class_;
+ synctex_data_u data[synctex_tree_spcfln_hbox_max+synctex_data_hbox_max];
+} synctex_node_hbox_s;
+
+/* horizontal box node creator */
+DEFINE_synctex_new_scanned_NODE(hbox)
+
+static void _synctex_log_hbox(synctex_node_p node);
+static char * _synctex_abstract_hbox(synctex_node_p node);
+static void _synctex_display_hbox(synctex_node_p node);
+
+static synctex_class_s synctex_class_hbox = {
+ NULL, /* No scanner yet */
+ synctex_node_type_hbox, /* Node type */
+ &_synctex_new_hbox, /* creator */
+ &_synctex_free_node, /* destructor */
+ &_synctex_log_hbox, /* log */
+ &_synctex_display_hbox, /* display */
+ &_synctex_abstract_hbox, /* abstract */
+ &synctex_tree_model_hbox, /* tree model */
+ &synctex_data_model_hbox, /* data model */
+ &synctex_tlcpector_default, /* tlcpector */
+ &synctex_inspector_box, /* inspector */
+ &synctex_vispector_box, /* vispector */
+};
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark void vbox.
+# endif
+
+/* This void box node implementation is either horizontal or vertical
+ * It does not contain a child field.
+ */
+static const synctex_tree_model_s synctex_tree_model_spf = {
+ synctex_tree_sibling_idx, /* sibling */
+ synctex_tree_s_parent_idx, /* parent */
+ -1, /* child */
+ synctex_tree_sp_friend_idx, /* friend */
+ -1, /* last */
+ -1, /* next_hbox */
+ -1, /* arg_sibling */
+ -1, /* target */
+ synctex_tree_spf_max
+};
+typedef struct {
+ SYNCTEX_DECLARE_CHARINDEX
+ synctex_class_p class_;
+ synctex_data_u data[synctex_tree_spf_max+synctex_data_box_max];
+} synctex_node_void_vbox_s;
+
+/* vertical void box node creator */
+DEFINE_synctex_new_scanned_NODE(void_vbox)
+
+static void _synctex_log_void_box(synctex_node_p node);
+static char * _synctex_abstract_void_vbox(synctex_node_p node);
+static void _synctex_display_void_vbox(synctex_node_p node);
+
+static synctex_class_s synctex_class_void_vbox = {
+ NULL, /* No scanner yet */
+ synctex_node_type_void_vbox,/* Node type */
+ &_synctex_new_void_vbox, /* creator */
+ &_synctex_free_leaf, /* destructor */
+ &_synctex_log_void_box, /* log */
+ &_synctex_display_void_vbox,/* display */
+ &_synctex_abstract_void_vbox,/* abstract */
+ &synctex_tree_model_spf, /* tree model */
+ &synctex_data_model_box, /* data model */
+ &synctex_tlcpector_default, /* tlcpector */
+ &synctex_inspector_box, /* inspector */
+ &synctex_vispector_box, /* vispector */
+};
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark void hbox.
+# endif
+
+typedef synctex_node_void_vbox_s synctex_node_void_hbox_s;
+
+/* horizontal void box node creator */
+DEFINE_synctex_new_scanned_NODE(void_hbox)
+
+static char * _synctex_abstract_void_hbox(synctex_node_p node);
+static void _synctex_display_void_hbox(synctex_node_p node);
+
+static synctex_class_s synctex_class_void_hbox = {
+ NULL, /* No scanner yet */
+ synctex_node_type_void_hbox,/* Node type */
+ &_synctex_new_void_hbox, /* creator */
+ &_synctex_free_leaf, /* destructor */
+ &_synctex_log_void_box, /* log */
+ &_synctex_display_void_hbox,/* display */
+ &_synctex_abstract_void_hbox,/* abstract */
+ &synctex_tree_model_spf, /* tree model */
+ &synctex_data_model_box, /* data model */
+ &synctex_tlcpector_default, /* tlcpector */
+ &synctex_inspector_box, /* inspector */
+ &synctex_vispector_box, /* vispector */
+};
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark form ref.
+# endif
+
+/* The form ref node. */
+typedef struct {
+ SYNCTEX_DECLARE_CHARINDEX
+ synctex_class_p class_;
+ synctex_data_u data[synctex_tree_spfa_max+synctex_data_ref_thv_max];
+} synctex_node_ref_s;
+
+/* form ref node creator */
+DEFINE_synctex_new_scanned_NODE(ref)
+
+static void _synctex_log_ref(synctex_node_p node);
+static char * _synctex_abstract_ref(synctex_node_p node);
+static void _synctex_display_ref(synctex_node_p node);
+
+static const synctex_tree_model_s synctex_tree_model_spfa = {
+ synctex_tree_sibling_idx, /* sibling */
+ synctex_tree_s_parent_idx, /* parent */
+ -1, /* child */
+ synctex_tree_sp_friend_idx, /* friend */
+ -1, /* last */
+ -1, /* next_hbox */
+ synctex_tree_spf_arg_sibling_idx, /* arg_sibling */
+ -1, /* target */
+ synctex_tree_spfa_max
+};
+static const synctex_data_model_s synctex_data_model_ref = {
+ synctex_data_tag_idx, /* tag */
+ -1, /* line */
+ -1, /* column */
+ synctex_data_ref_h_idx, /* h */
+ synctex_data_ref_v_idx, /* v */
+ -1, /* width */
+ -1, /* height */
+ -1, /* depth */
+ -1, /* mean_line */
+ -1, /* weight */
+ -1, /* h_V */
+ -1, /* v_V */
+ -1, /* width_V */
+ -1, /* height_V */
+ -1, /* depth_V */
+ -1, /* name */
+ -1, /* page */
+ synctex_data_ref_thv_max /* size */
+};
+static synctex_class_s synctex_class_ref = {
+ NULL, /* No scanner yet */
+ synctex_node_type_ref, /* Node type */
+ &_synctex_new_ref, /* creator */
+ &_synctex_free_leaf, /* destructor */
+ &_synctex_log_ref, /* log */
+ &_synctex_display_ref, /* display */
+ &_synctex_abstract_ref, /* abstract */
+ &synctex_tree_model_spfa, /* navigator */
+ &synctex_data_model_ref, /* data model */
+ &synctex_tlcpector_none, /* tlcpector */
+ &synctex_inspector_none, /* inspector */
+ &synctex_vispector_none, /* vispector */
+};
+# ifdef SYNCTEX_NOTHING
+# pragma mark small node.
+# endif
+
+/* The small nodes correspond to glue, penalty, math and boundary nodes. */
+static const synctex_data_model_s synctex_data_model_tlchv = {
+ synctex_data_tag_idx, /* tag */
+ synctex_data_line_idx, /* line */
+ synctex_data_column_idx, /* column */
+ synctex_data_h_idx, /* h */
+ synctex_data_v_idx, /* v */
+ -1, /* width */
+ -1, /* height */
+ -1, /* depth */
+ -1, /* mean_line */
+ -1, /* weight */
+ -1, /* h_V */
+ -1, /* v_V */
+ -1, /* width_V */
+ -1, /* height_V */
+ -1, /* depth_V */
+ -1, /* name */
+ -1, /* page */
+ synctex_data_tlchv_max
+};
+
+typedef struct {
+ SYNCTEX_DECLARE_CHARINDEX
+ synctex_class_p class_;
+ synctex_data_u data[synctex_tree_spf_max+synctex_data_tlchv_max];
+} synctex_node_tlchv_s;
+
+static void _synctex_log_tlchv_node(synctex_node_p node);
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark math.
+# endif
+
+typedef synctex_node_tlchv_s synctex_node_math_s;
+
+/* math node creator */
+DEFINE_synctex_new_scanned_NODE(math)
+
+static char * _synctex_abstract_math(synctex_node_p node);
+static void _synctex_display_math(synctex_node_p node);
+static synctex_inspector_s synctex_inspector_hv = {
+ &_synctex_data_h,
+ &_synctex_data_v,
+ &_synctex_int_none,
+ &_synctex_int_none,
+ &_synctex_int_none,
+};
+static synctex_vispector_s synctex_vispector_hv = {
+ &__synctex_node_visible_h,
+ &__synctex_node_visible_v,
+ &_synctex_float_none,
+ &_synctex_float_none,
+ &_synctex_float_none,
+};
+
+static synctex_class_s synctex_class_math = {
+ NULL, /* No scanner yet */
+ synctex_node_type_math, /* Node type */
+ &_synctex_new_math, /* creator */
+ &_synctex_free_leaf, /* destructor */
+ &_synctex_log_tlchv_node, /* log */
+ &_synctex_display_math, /* display */
+ &_synctex_abstract_math, /* abstract */
+ &synctex_tree_model_spf, /* tree model */
+ &synctex_data_model_tlchv, /* data model */
+ &synctex_tlcpector_default, /* tlcpector */
+ &synctex_inspector_hv, /* inspector */
+ &synctex_vispector_hv, /* vispector */
+};
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark kern node.
+# endif
+
+static const synctex_data_model_s synctex_data_model_tlchvw = {
+ synctex_data_tag_idx, /* tag */
+ synctex_data_line_idx, /* line */
+ synctex_data_column_idx,/* column */
+ synctex_data_h_idx, /* h */
+ synctex_data_v_idx, /* v */
+ synctex_data_width_idx, /* width */
+ -1, /* height */
+ -1, /* depth */
+ -1, /* mean_line */
+ -1, /* weight */
+ -1, /* h_V */
+ -1, /* v_V */
+ -1, /* width_V */
+ -1, /* height_V */
+ -1, /* depth_V */
+ -1, /* name */
+ -1, /* page */
+ synctex_data_tlchvw_max
+};
+typedef struct {
+ SYNCTEX_DECLARE_CHARINDEX
+ synctex_class_p class_;
+ synctex_data_u data[synctex_tree_spf_max+synctex_data_tlchvw_max];
+} synctex_node_kern_s;
+
+/* kern node creator */
+DEFINE_synctex_new_scanned_NODE(kern)
+
+static void _synctex_log_kern_node(synctex_node_p node);
+static char * _synctex_abstract_kern(synctex_node_p node);
+static void _synctex_display_kern(synctex_node_p node);
+
+static synctex_inspector_s synctex_inspector_kern = {
+ &_synctex_data_h,
+ &_synctex_data_v,
+ &_synctex_data_width,
+ &_synctex_int_none,
+ &_synctex_int_none,
+};
+static float __synctex_kern_visible_h(synctex_node_p node);
+static float __synctex_kern_visible_width(synctex_node_p node);
+static synctex_vispector_s synctex_vispector_kern = {
+ &__synctex_kern_visible_h,
+ &__synctex_node_visible_v,
+ &__synctex_kern_visible_width,
+ &_synctex_float_none,
+ &_synctex_float_none,
+};
+
+static synctex_class_s synctex_class_kern = {
+ NULL, /* No scanner yet */
+ synctex_node_type_kern, /* Node type */
+ &_synctex_new_kern, /* creator */
+ &_synctex_free_leaf, /* destructor */
+ &_synctex_log_kern_node, /* log */
+ &_synctex_display_kern, /* display */
+ &_synctex_abstract_kern, /* abstract */
+ &synctex_tree_model_spf, /* tree model */
+ &synctex_data_model_tlchvw, /* data model */
+ &synctex_tlcpector_default, /* tlcpector */
+ &synctex_inspector_kern, /* inspector */
+ &synctex_vispector_kern, /* vispector */
+};
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark glue.
+# endif
+
+/* glue node creator */
+typedef synctex_node_tlchv_s synctex_node_glue_s;
+DEFINE_synctex_new_scanned_NODE(glue)
+
+static char * _synctex_abstract_glue(synctex_node_p node);
+static void _synctex_display_glue(synctex_node_p node);
+
+static synctex_class_s synctex_class_glue = {
+ NULL, /* No scanner yet */
+ synctex_node_type_glue, /* Node type */
+ &_synctex_new_glue, /* creator */
+ &_synctex_free_leaf, /* destructor */
+ &_synctex_log_tlchv_node, /* log */
+ &_synctex_display_glue, /* display */
+ &_synctex_abstract_glue, /* abstract */
+ &synctex_tree_model_spf, /* tree model */
+ &synctex_data_model_tlchv, /* data model */
+ &synctex_tlcpector_default, /* tlcpector */
+ &synctex_inspector_hv, /* inspector */
+ &synctex_vispector_hv, /* vispector */
+};
+
+/* The small nodes correspond to glue and boundary nodes. */
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark rule.
+# endif
+
+typedef struct {
+ SYNCTEX_DECLARE_CHARINDEX
+ synctex_class_p class_;
+ synctex_data_u data[synctex_tree_spf_max+synctex_data_box_max];
+} synctex_node_rule_s;
+
+DEFINE_synctex_new_scanned_NODE(rule)
+
+static void _synctex_log_rule(synctex_node_p node);
+static char * _synctex_abstract_rule(synctex_node_p node);
+static void _synctex_display_rule(synctex_node_p node);
+
+static float __synctex_rule_visible_h(synctex_node_p node);
+static float __synctex_rule_visible_v(synctex_node_p node);
+static float __synctex_rule_visible_width(synctex_node_p node);
+static float __synctex_rule_visible_height(synctex_node_p node);
+static float __synctex_rule_visible_depth(synctex_node_p node);
+static synctex_vispector_s synctex_vispector_rule = {
+ &__synctex_rule_visible_h,
+ &__synctex_rule_visible_v,
+ &__synctex_rule_visible_width,
+ &__synctex_rule_visible_height,
+ &__synctex_rule_visible_depth,
+};
+
+static synctex_class_s synctex_class_rule = {
+ NULL, /* No scanner yet */
+ synctex_node_type_rule, /* Node type */
+ &_synctex_new_rule, /* creator */
+ &_synctex_free_leaf, /* destructor */
+ &_synctex_log_rule, /* log */
+ &_synctex_display_rule, /* display */
+ &_synctex_abstract_rule, /* abstract */
+ &synctex_tree_model_spf, /* tree model */
+ &synctex_data_model_box, /* data model */
+ &synctex_tlcpector_default, /* tlcpector */
+ &synctex_inspector_box, /* inspector */
+ &synctex_vispector_rule, /* vispector */
+};
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark boundary.
+# endif
+
+/* boundary node creator */
+typedef synctex_node_tlchv_s synctex_node_boundary_s;
+DEFINE_synctex_new_scanned_NODE(boundary)
+
+static char * _synctex_abstract_boundary(synctex_node_p node);
+static void _synctex_display_boundary(synctex_node_p node);
+
+static synctex_class_s synctex_class_boundary = {
+ NULL, /* No scanner yet */
+ synctex_node_type_boundary, /* Node type */
+ &_synctex_new_boundary, /* creator */
+ &_synctex_free_leaf, /* destructor */
+ &_synctex_log_tlchv_node, /* log */
+ &_synctex_display_boundary, /* display */
+ &_synctex_abstract_boundary,/* abstract */
+ &synctex_tree_model_spf, /* tree model */
+ &synctex_data_model_tlchv, /* data model */
+ &synctex_tlcpector_default, /* tlcpector */
+ &synctex_inspector_hv, /* inspector */
+ &synctex_vispector_hv, /* vispector */
+};
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark box boundary.
+# endif
+
+typedef struct {
+ SYNCTEX_DECLARE_CHARINDEX
+ synctex_class_p class_;
+ synctex_data_u data[synctex_tree_spfa_max+synctex_data_tlchv_max];
+} synctex_node_box_bdry_s;
+
+#define DEFINE_synctex_new_unscanned_NODE(NAME)\
+SYNCTEX_INLINE static synctex_node_p _synctex_new_##NAME(synctex_scanner_p scanner) {\
+ if (scanner) {\
+ synctex_node_p node = _synctex_malloc(sizeof(synctex_node_##NAME##_s));\
+ if (node) {\
+ node->class_ = scanner->class_+synctex_node_type_##NAME;\
+ SYNCTEX_DID_NEW(node); \
+ }\
+ return node;\
+ }\
+ return NULL;\
+}
+DEFINE_synctex_new_unscanned_NODE(box_bdry)
+
+static char * _synctex_abstract_box_bdry(synctex_node_p node);
+static void _synctex_display_box_bdry(synctex_node_p node);
+
+static synctex_class_s synctex_class_box_bdry = {
+ NULL, /* No scanner yet */
+ synctex_node_type_box_bdry, /* Node type */
+ &_synctex_new_box_bdry, /* creator */
+ &_synctex_free_leaf, /* destructor */
+ &_synctex_log_tlchv_node, /* log */
+ &_synctex_display_box_bdry, /* display */
+ &_synctex_abstract_box_bdry,/* display */
+ &synctex_tree_model_spfa, /* tree model */
+ &synctex_data_model_tlchv, /* data model */
+ &synctex_tlcpector_default, /* tlcpector */
+ &synctex_inspector_hv, /* inspector */
+ &synctex_vispector_hv, /* vispector */
+};
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark hbox proxy.
+# endif
+
+/**
+ * Standard nodes refer to TeX nodes: math, kern, boxes...
+ * Proxy nodes are used to support forms.
+ * A form is parsed as a tree of standard nodes starting
+ * at the top left position.
+ * When a reference is used, the form is duplicated
+ * to the location specified by the reference.
+ * As the same form can be duplicated at different locations,
+ * the geometrical information is relative to its own top left point.
+ * As we need absolute locations, we use proxy nodes.
+ * A proxy node records an offset and the target node.
+ * The target partly acts as a delegate.
+ * The h and v position of the proxy node is the h and v
+ * position of the target shifted by the proxy's offset.
+ * The width, height and depth are not sensitive to offsets.
+ * When are proxies created ?
+ * 1) when the synctex file has been parsed, all the form refs
+ * are replaced by proxies to the content of a form.
+ * This content is a node with siblings (actually none).
+ * Those root proxies have the parent of the ref they replace,
+ * so their parents exist and are no proxy.
+ * Moreover, if they have no sibling, it means that their target have no
+ * sibling as well.
+ * Such nodes are called root proxies.
+ * 2) On the fly, when a proxy is asked for its child
+ * (or sibling) and has none, a proxy to its target's child
+ * (or sibling) is created if any. There are only 2 possible situations:
+ * either the newly created proxy is the child of a proxy,
+ * or it is the sibling of a proxy created on the fly.
+ * In both cases, the parent is a proxy with children.
+ * Such nodes are called child proxies.
+ * How to compute the offset of a proxy ?
+ * The offset of root proxy objects is exactly
+ * the offset of the ref they replace.
+ * The offset of other proxies is their owner's,
+ * except when pointing to a root proxy.
+ * What happens for cascading forms ?
+ * Here is an example diagram
+ *
+ * At parse time, the arrow means "owns":
+ * sheet0 -> ref_to1
+ *
+ * target1 -> ref_to2
+ *
+ * target2 -> child22
+ *
+ * After replacing the refs:
+ * sheet0 -> proxy00 -> proxy01 -> proxy02
+ * | | |
+ * target1 -> proxy11 -> proxy12
+ * | |
+ * target2 -> proxy22
+ *
+ * proxy00, proxy11 and proxy22 are root proxies.
+ * Their offset is the one of the ref they replace
+ * proxy01, proxy02 and proxy12 are child proxies.
+ * Their proxy is the one of their parent.
+ * Optimization.
+ * After all the refs are replaced, there are only root nodes
+ * targeting standard node. We make sure that each child proxy
+ * also targets a standard node.
+ * It is possible for a proxy to have a standard sibling
+ * whereas its target has no sibling at all. Root proxies
+ * are such nodes, and are the only ones.
+ * The consequence is that proxies created on the fly
+ * must take into account this situation.
+ */
+
+/* A proxy to a hbox.
+ * A proxy do have a target, which can be a proxy
+ */
+
+static const synctex_tree_model_s synctex_tree_model_proxy_hbox = {
+ synctex_tree_sibling_idx, /* sibling */
+ synctex_tree_s_parent_idx, /* parent */
+ synctex_tree_sp_child_idx, /* child */
+ synctex_tree_spc_friend_idx, /* friend */
+ synctex_tree_spcf_last_idx, /* last */
+ synctex_tree_spcfl_next_hbox_idx, /* next_hbox */
+ -1, /* arg_sibling */
+ synctex_tree_spcfln_target_idx, /* target */
+ synctex_tree_spcflnt_proxy_hbox_max
+};
+static const synctex_data_model_s synctex_data_model_proxy = {
+ -1, /* tag */
+ -1, /* line */
+ -1, /* column */
+ synctex_data_proxy_h_idx, /* h */
+ synctex_data_proxy_v_idx, /* v */
+ -1, /* width */
+ -1, /* height */
+ -1, /* depth */
+ -1, /* mean_line */
+ -1, /* weight */
+ -1, /* h_V */
+ -1, /* v_V */
+ -1, /* width_V */
+ -1, /* height_V */
+ -1, /* depth_V */
+ -1, /* name */
+ -1, /* page */
+ synctex_data_proxy_hv_max
+};
+typedef struct {
+ SYNCTEX_DECLARE_CHARINDEX
+ synctex_class_p class_;
+ synctex_data_u data[synctex_tree_spcflnt_proxy_hbox_max+synctex_data_proxy_hv_max];
+} synctex_node_proxy_hbox_s;
+
+/* box proxy node creator */
+DEFINE_synctex_new_unscanned_NODE(proxy_hbox)
+
+static void _synctex_log_proxy(synctex_node_p node);
+static char * _synctex_abstract_proxy_hbox(synctex_node_p node);
+static void _synctex_display_proxy_hbox(synctex_node_p node);
+
+static int _synctex_proxy_tag(synctex_node_p);
+static int _synctex_proxy_line(synctex_node_p);
+static int _synctex_proxy_column(synctex_node_p);
+
+static synctex_tlcpector_s synctex_tlcpector_proxy = {
+ &_synctex_proxy_tag,
+ &_synctex_proxy_line,
+ &_synctex_proxy_column,
+};
+static int _synctex_proxy_h(synctex_node_p);
+static int _synctex_proxy_v(synctex_node_p);
+static int _synctex_proxy_width(synctex_node_p);
+static int _synctex_proxy_height(synctex_node_p);
+static int _synctex_proxy_depth(synctex_node_p);
+static synctex_inspector_s synctex_inspector_proxy_box = {
+ &_synctex_proxy_h,
+ &_synctex_proxy_v,
+ &_synctex_proxy_width,
+ &_synctex_proxy_height,
+ &_synctex_proxy_depth,
+};
+
+static float __synctex_proxy_visible_h(synctex_node_p);
+static float __synctex_proxy_visible_v(synctex_node_p);
+static float __synctex_proxy_visible_width(synctex_node_p);
+static float __synctex_proxy_visible_height(synctex_node_p);
+static float __synctex_proxy_visible_depth(synctex_node_p);
+
+static synctex_vispector_s synctex_vispector_proxy_box = {
+ &__synctex_proxy_visible_h,
+ &__synctex_proxy_visible_v,
+ &__synctex_proxy_visible_width,
+ &__synctex_proxy_visible_height,
+ &__synctex_proxy_visible_depth,
+};
+
+static synctex_class_s synctex_class_proxy_hbox = {
+ NULL, /* No scanner yet */
+ synctex_node_type_proxy_hbox, /* Node type */
+ &_synctex_new_proxy_hbox, /* creator */
+ &_synctex_free_node, /* destructor */
+ &_synctex_log_proxy, /* log */
+ &_synctex_display_proxy_hbox, /* display */
+ &_synctex_abstract_proxy_hbox, /* abstract */
+ &synctex_tree_model_proxy_hbox, /* tree model */
+ &synctex_data_model_proxy, /* data model */
+ &synctex_tlcpector_proxy, /* tlcpector */
+ &synctex_inspector_proxy_box, /* inspector */
+ &synctex_vispector_proxy_box, /* vispector */
+};
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark vbox proxy.
+# endif
+
+/* A proxy to a vbox. */
+
+static const synctex_tree_model_s synctex_tree_model_proxy_vbox = {
+ synctex_tree_sibling_idx, /* sibling */
+ synctex_tree_s_parent_idx, /* parent */
+ synctex_tree_sp_child_idx, /* child */
+ synctex_tree_spc_friend_idx, /* friend */
+ synctex_tree_spcf_last_idx, /* last */
+ -1, /* next_hbox */
+ -1, /* arg_sibling */
+ synctex_tree_spcfl_target_idx, /* target */
+ synctex_tree_spcflt_proxy_vbox_max
+};
+
+typedef struct {
+ SYNCTEX_DECLARE_CHARINDEX
+ synctex_class_p class_;
+ synctex_data_u data[synctex_tree_spcflt_proxy_vbox_max+synctex_data_proxy_hv_max];
+} synctex_node_proxy_vbox_s;
+
+/* box proxy node creator */
+DEFINE_synctex_new_unscanned_NODE(proxy_vbox)
+
+static void _synctex_log_proxy(synctex_node_p node);
+static char * _synctex_abstract_proxy_vbox(synctex_node_p node);
+static void _synctex_display_proxy_vbox(synctex_node_p node);
+
+static synctex_class_s synctex_class_proxy_vbox = {
+ NULL, /* No scanner yet */
+ synctex_node_type_proxy_vbox, /* Node type */
+ &_synctex_new_proxy_vbox, /* creator */
+ &_synctex_free_node, /* destructor */
+ &_synctex_log_proxy, /* log */
+ &_synctex_display_proxy_vbox, /* display */
+ &_synctex_abstract_proxy_vbox, /* abstract */
+ &synctex_tree_model_proxy_vbox, /* tree model */
+ &synctex_data_model_proxy, /* data model */
+ &synctex_tlcpector_proxy, /* tlcpector */
+ &synctex_inspector_proxy_box, /* inspector */
+ &synctex_vispector_proxy_box, /* vispector */
+};
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark proxy.
+# endif
+
+/**
+ * A proxy to a node but a box.
+ */
+
+static const synctex_tree_model_s synctex_tree_model_proxy = {
+ synctex_tree_sibling_idx, /* sibling */
+ synctex_tree_s_parent_idx, /* parent */
+ -1, /* child */
+ synctex_tree_sp_friend_idx, /* friend */
+ -1, /* last */
+ -1, /* next_hbox */
+ -1, /* arg_sibling */
+ synctex_tree_spf_target_idx,/* target */
+ synctex_tree_spft_proxy_max
+};
+
+typedef struct {
+ SYNCTEX_DECLARE_CHARINDEX
+ synctex_class_p class_;
+ synctex_data_u data[synctex_tree_spft_proxy_max+synctex_data_proxy_hv_max];
+} synctex_node_proxy_s;
+
+/* proxy node creator */
+DEFINE_synctex_new_unscanned_NODE(proxy)
+
+static void _synctex_log_proxy(synctex_node_p node);
+static char * _synctex_abstract_proxy(synctex_node_p node);
+static void _synctex_display_proxy(synctex_node_p node);
+
+static synctex_vispector_s synctex_vispector_proxy = {
+ &__synctex_proxy_visible_h,
+ &__synctex_proxy_visible_v,
+ &__synctex_proxy_visible_width,
+ &_synctex_float_none,
+ &_synctex_float_none,
+};
+
+static synctex_class_s synctex_class_proxy = {
+ NULL, /* No scanner yet */
+ synctex_node_type_proxy, /* Node type */
+ &_synctex_new_proxy, /* creator */
+ &_synctex_free_leaf, /* destructor */
+ &_synctex_log_proxy, /* log */
+ &_synctex_display_proxy, /* display */
+ &_synctex_abstract_proxy, /* abstract */
+ &synctex_tree_model_proxy, /* tree model */
+ &synctex_data_model_proxy, /* data model */
+ &synctex_tlcpector_proxy, /* tlcpector */
+ &synctex_inspector_proxy_box, /* inspector */
+ &synctex_vispector_proxy, /* vispector */
+};
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark last proxy.
+# endif
+
+/**
+ * A proxy to the last proxy/box boundary.
+ */
+
+static const synctex_tree_model_s synctex_tree_model_proxy_last = {
+ synctex_tree_sibling_idx, /* sibling */
+ synctex_tree_s_parent_idx, /* parent */
+ -1, /* child */
+ synctex_tree_sp_friend_idx, /* friend */
+ -1, /* last */
+ -1, /* next_hbox */
+ synctex_tree_spf_arg_sibling_idx, /* arg_sibling */
+ synctex_tree_spfa_target_idx, /* target */
+ synctex_tree_spfat_proxy_last_max
+};
+
+typedef struct {
+ SYNCTEX_DECLARE_CHARINDEX
+ synctex_class_p class_;
+ synctex_data_u data[synctex_tree_spfat_proxy_last_max+synctex_data_proxy_hv_max];
+} synctex_node_proxy_last_s;
+
+/* proxy node creator */
+DEFINE_synctex_new_unscanned_NODE(proxy_last)
+
+static void _synctex_log_proxy(synctex_node_p node);
+static char * _synctex_abstract_proxy(synctex_node_p node);
+static void _synctex_display_proxy(synctex_node_p node);
+
+static synctex_class_s synctex_class_proxy_last = {
+ NULL, /* No scanner yet */
+ synctex_node_type_proxy_last, /* Node type */
+ &_synctex_new_proxy, /* creator */
+ &_synctex_free_leaf, /* destructor */
+ &_synctex_log_proxy, /* log */
+ &_synctex_display_proxy, /* display */
+ &_synctex_abstract_proxy, /* abstract */
+ &synctex_tree_model_proxy_last, /* tree model */
+ &synctex_data_model_proxy, /* data model */
+ &synctex_tlcpector_proxy, /* tlcpector */
+ &synctex_inspector_proxy_box, /* inspector */
+ &synctex_vispector_proxy, /* vispector */
+};
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark handle.
+# endif
+
+/**
+ * A handle node.
+ * A handle is never the target of a proxy
+ * or another handle.
+ * The child of a handle is always a handle if any.
+ * The sibling of a handle is always a handle if any.
+ * The parent of a handle is always a handle if any.
+ */
+
+static const synctex_tree_model_s synctex_tree_model_handle = {
+ synctex_tree_sibling_idx, /* sibling */
+ synctex_tree_s_parent_idx, /* parent */
+ synctex_tree_sp_child_idx, /* child */
+ -1, /* friend */
+ -1, /* last */
+ -1, /* next_hbox */
+ -1, /* arg_sibling */
+ synctex_tree_spc_target_idx,/* target */
+ synctex_tree_spct_handle_max
+};
+
+static const synctex_data_model_s synctex_data_model_handle = {
+ -1, /* tag */
+ -1, /* line */
+ -1, /* column */
+ -1, /* h */
+ -1, /* v */
+ -1, /* width */
+ -1, /* height */
+ -1, /* depth */
+ -1, /* mean_line */
+ synctex_data_handle_w_idx, /* weight */
+ -1, /* h_V */
+ -1, /* v_V */
+ -1, /* width_V */
+ -1, /* height_V */
+ -1, /* depth_V */
+ -1, /* name */
+ -1, /* page */
+ synctex_data_handle_w_max
+};
+
+typedef struct {
+ SYNCTEX_DECLARE_CHARINDEX
+ synctex_class_p class_;
+ synctex_data_u data[synctex_tree_spct_handle_max+synctex_data_handle_w_max];
+} synctex_node_handle_s;
+
+/* handle node creator */
+DEFINE_synctex_new_unscanned_NODE(handle)
+
+static void _synctex_log_handle(synctex_node_p node);
+static char * _synctex_abstract_handle(synctex_node_p node);
+static void _synctex_display_handle(synctex_node_p node);
+
+static synctex_class_s synctex_class_handle = {
+ NULL, /* No scanner yet */
+ synctex_node_type_handle, /* Node type */
+ &_synctex_new_handle, /* creator */
+ &_synctex_free_handle, /* destructor */
+ &_synctex_log_handle, /* log */
+ &_synctex_display_handle, /* display */
+ &_synctex_abstract_handle, /* abstract */
+ &synctex_tree_model_handle, /* tree model */
+ &synctex_data_model_handle, /* data model */
+ &synctex_tlcpector_proxy, /* tlcpector */
+ &synctex_inspector_proxy_box, /* inspector */
+ &synctex_vispector_proxy_box, /* vispector */
+};
+
+SYNCTEX_INLINE static synctex_node_p _synctex_new_handle_with_target(synctex_node_p target) {
+ if (target) {
+ synctex_node_p result = _synctex_new_handle(target->class_->scanner);
+ if (result) {
+ _synctex_tree_set_target(result,target);
+ return result;
+ }
+ }
+ return NULL;
+}
+SYNCTEX_INLINE static synctex_node_p _synctex_new_handle_with_child(synctex_node_p child) {
+ if (child) {
+ synctex_node_p result = _synctex_new_handle(child->class_->scanner);
+ if (result) {
+ _synctex_tree_set_child(result,child);
+ return result;
+ }
+ }
+ return NULL;
+}
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark Navigation
+# endif
+synctex_node_p synctex_node_parent(synctex_node_p node)
+{
+ return _synctex_tree_parent(node);
+}
+synctex_node_p synctex_node_parent_sheet(synctex_node_p node)
+{
+ while(node && synctex_node_type(node) != synctex_node_type_sheet) {
+ node = _synctex_tree_parent(node);
+ }
+ /* exit the while loop either when node is NULL or node is a sheet */
+ return node;
+}
+synctex_node_p synctex_node_parent_form(synctex_node_p node)
+{
+ while(node && synctex_node_type(node) != synctex_node_type_form) {
+ node = _synctex_tree_parent(node);
+ }
+ /* exit the while loop either when node is NULL or node is a form */
+ return node;
+}
+
+/**
+ * The returned proxy will be the child or a sibling of source.
+ * The returned proxy has no parent, child nor sibling.
+ * Used only by __synctex_replace_ref.
+ * argument to_node: a box, not a proxy nor anything else.
+ */
+SYNCTEX_INLINE static synctex_node_p __synctex_new_proxy_from_ref_to(synctex_node_p ref, synctex_node_p to_node) {
+ synctex_node_p proxy = NULL;
+ if (!ref || !to_node) {
+ return NULL;
+ }
+ switch(synctex_node_type(to_node)) {
+ case synctex_node_type_vbox:
+ proxy = _synctex_new_proxy_vbox(ref->class_->scanner);
+ break;
+ case synctex_node_type_hbox:
+ proxy = _synctex_new_proxy_hbox(ref->class_->scanner);
+ break;
+ default:
+ _synctex_error("! __synctex_new_proxy_from_ref_to. Unexpected form child (%s). Please report.", synctex_node_isa(to_node));
+ return NULL;
+ }
+ if (!proxy) {
+ _synctex_error("! __synctex_new_proxy_from_ref_to. Internal error. Please report.");
+ return NULL;
+ }
+ _synctex_data_set_h(proxy, _synctex_data_h(ref));
+ _synctex_data_set_v(proxy, _synctex_data_v(ref)-_synctex_data_height(to_node));
+ _synctex_tree_set_target(proxy,to_node);
+# if defined(SYNCTEX_USE_CHARINDEX)
+ proxy->line_index=to_node?to_node->line_index:0;
+ proxy->char_index=to_node?to_node->char_index:0;
+# endif
+ return proxy;
+}
+/**
+ * The returned proxy will be the child or a sibling of owning_proxy.
+ * The returned proxy has no parent, nor child.
+ * Used only by synctex_node_child and synctex_node_sibling
+ * to create proxies on the fly.
+ * If the to_node has an already computed sibling,
+ * then the returned proxy has itself a sibling
+ * pointing to that already computed sibling.
+ */
+SYNCTEX_INLINE static synctex_node_p __synctex_new_child_proxy_to(synctex_node_p owner, synctex_node_p to_node) {
+ synctex_node_p proxy = NULL;
+ synctex_node_p target = to_node;
+ if (!owner) {
+ return NULL;
+ }
+ switch(synctex_node_type(target)) {
+ case synctex_node_type_vbox:
+ if ((proxy = _synctex_new_proxy_vbox(owner->class_->scanner))) {
+ exit_standard:
+ _synctex_data_set_h(proxy, _synctex_data_h(owner));
+ _synctex_data_set_v(proxy, _synctex_data_v(owner));
+ exit0:
+ _synctex_tree_set_target(proxy,target);
+# if defined(SYNCTEX_USE_CHARINDEX)
+ proxy->line_index=to_node?to_node->line_index:0;
+ proxy->char_index=to_node?to_node->char_index:0;
+# endif
+ return proxy;
+ };
+ break;
+ case synctex_node_type_proxy_vbox:
+ if ((proxy = _synctex_new_proxy_vbox(owner->class_->scanner))) {
+ exit_proxy:
+ target = _synctex_tree_target(to_node);
+ _synctex_data_set_h(proxy, _synctex_data_h(owner)+_synctex_data_h(to_node));
+ _synctex_data_set_v(proxy, _synctex_data_v(owner)+_synctex_data_v(to_node));
+ goto exit0;
+ };
+ break;
+ case synctex_node_type_hbox:
+ if ((proxy = _synctex_new_proxy_hbox(owner->class_->scanner))) {
+ goto exit_standard;
+ };
+ break;
+ case synctex_node_type_proxy_hbox:
+ if ((proxy = _synctex_new_proxy_hbox(owner->class_->scanner))) {
+ goto exit_proxy;
+ };
+ break;
+ case synctex_node_type_proxy:
+ case synctex_node_type_proxy_last:
+ if ((proxy = _synctex_new_proxy(owner->class_->scanner))) {
+ goto exit_proxy;
+ };
+ break;
+ default:
+ if ((proxy = _synctex_new_proxy(owner->class_->scanner))) {
+ goto exit_standard;
+ };
+ break;
+ }
+ _synctex_error("! __synctex_new_child_proxy_to. "
+ "Internal error. "
+ "Please report.");
+ return NULL;
+}
+SYNCTEX_INLINE static synctex_node_p _synctex_tree_set_sibling(synctex_node_p node, synctex_node_p new_sibling);
+typedef struct synctex_nns_t {
+ synctex_node_p first;
+ synctex_node_p last;
+ synctex_status_t status;
+} synctex_nns_s;
+/**
+ * Given a target node, create a list of proxies.
+ * The first proxy points to the target node,
+ * its sibling points to the target's sibling and so on.
+ * Returns the first created proxy, the last one and
+ * an error status.
+ */
+SYNCTEX_INLINE static synctex_nns_s _synctex_new_child_proxies_to(synctex_node_p owner, synctex_node_p to_node) {
+ synctex_nns_s nns = {NULL,NULL,SYNCTEX_STATUS_OK};
+ if ((nns.first = nns.last = __synctex_new_child_proxy_to(owner,to_node))) {
+ synctex_node_p to_next_sibling = __synctex_tree_sibling(to_node);
+ synctex_node_p to_sibling;
+ while ((to_sibling = to_next_sibling)) {
+ synctex_node_p sibling;
+ if ((to_next_sibling = __synctex_tree_sibling(to_sibling))) {
+ /* This is not the last sibling */
+ if((sibling = __synctex_new_child_proxy_to(owner,to_sibling))) {
+ _synctex_tree_set_sibling(nns.last,sibling);
+ nns.last = sibling;
+ continue;
+ } else {
+ _synctex_error("! _synctex_new_child_proxy_to. "
+ "Internal error (1). "
+ "Please report.");
+ nns.status = SYNCTEX_STATUS_ERROR;
+ }
+ } else if((sibling = _synctex_new_proxy_last(owner->class_->scanner))) {
+ _synctex_tree_set_sibling(nns.last,sibling);
+ nns.last = sibling;
+ _synctex_data_set_h(nns.last, _synctex_data_h(nns.first));
+ _synctex_data_set_v(nns.last, _synctex_data_v(nns.first));
+ _synctex_tree_set_target(nns.last,to_sibling);
+# if defined(SYNCTEX_USE_CHARINDEX)
+ nns.last->line_index=to_sibling->line_index;
+ nns.last->char_index=to_sibling->char_index;
+# endif
+ } else {
+ _synctex_error("! _synctex_new_child_proxy_to. "
+ "Internal error (2). "
+ "Please report.");
+ nns.status = SYNCTEX_STATUS_ERROR;
+ }
+ break;
+ }
+ }
+ return nns;
+}
+static char * _synctex_node_abstract(synctex_node_p node);
+SYNCTEX_INLINE static synctex_node_p synctex_tree_set_friend(synctex_node_p node,synctex_node_p new_friend) {
+#if SYNCTEX_DEBUG
+ synctex_node_p F = new_friend;
+ while (F) {
+ if (node == F) {
+ printf("THIS IS AN ERROR\n");
+ F = new_friend;
+ while (F) {
+ printf("%s\n",_synctex_node_abstract(F));
+ if (node == F) {
+ return NULL;
+ }
+ F = _synctex_tree_friend(F);
+ }
+ return NULL;
+ }
+ F = _synctex_tree_friend(F);
+ }
+#endif
+ return new_friend?_synctex_tree_set_friend(node,new_friend):_synctex_tree_reset_friend(node);
+}
+/**
+ *
+ */
+SYNCTEX_INLINE static synctex_node_p __synctex_node_make_friend(synctex_node_p node, int i) {
+ synctex_node_p old = NULL;
+ if (i>=0) {
+ i = i%(node->class_->scanner->number_of_lists);
+ old = synctex_tree_set_friend(node,(node->class_->scanner->lists_of_friends)[i]);
+ (node->class_->scanner->lists_of_friends)[i] = node;
+#if SYNCTEX_DEBUG>500
+ printf("tl(%i)=>",i);
+ synctex_node_log(node);
+ if (synctex_node_parent_form(node)) {
+ printf("! ERROR. No registration expected!\n");
+ }
+#endif
+ }
+ return old;
+}
+/**
+ * All proxies have tlc attributes, on behalf of their target.
+ * The purpose is to register all af them.
+ * - argument node: is the proxy, must not be NULL
+ */
+SYNCTEX_INLINE static synctex_node_p __synctex_proxy_make_friend_and_next_hbox(synctex_node_p node) {
+ synctex_node_p old = NULL;
+ synctex_node_p target = _synctex_tree_target(node);
+ if (target) {
+ int i = _synctex_data_tag(target)+_synctex_data_line(target);
+ old = __synctex_node_make_friend(node,i);
+ } else {
+ old = __synctex_tree_reset_friend(node);
+ }
+ if (synctex_node_type(node) == synctex_node_type_proxy_hbox) {
+ synctex_node_p sheet = synctex_node_parent_sheet(node);
+ if (sheet) {
+ _synctex_tree_set_next_hbox(node,_synctex_tree_next_hbox(sheet));
+ _synctex_tree_set_next_hbox(sheet,node);
+ }
+ }
+ return old;
+}
+/**
+ * Register a node which have tag, line and column.
+ * - argument node: the node
+ */
+SYNCTEX_INLINE static synctex_node_p __synctex_node_make_friend_tlc(synctex_node_p node) {
+ int i = synctex_node_tag(node)+synctex_node_line(node);
+ return __synctex_node_make_friend(node,i);
+}
+/**
+ * Register a node which have tag, line and column.
+ * Does nothing if the argument is NULL.
+ * Calls __synctex_node_make_friend_tlc.
+ * - argument node: the node
+ */
+SYNCTEX_INLINE static void _synctex_node_make_friend_tlc(synctex_node_p node) {
+ if (node) {
+ __synctex_node_make_friend_tlc(node);
+ }
+}
+static synctex_node_p _synctex_node_set_child(synctex_node_p node, synctex_node_p new_child);
+/**
+ * The (first) child of the node, if any, NULL otherwise.
+ * At parse time, non void box nodes have children.
+ * All other nodes have no children.
+ * In order to support pdf forms, proxies are created
+ * to place form nodes at real locations.
+ * Ref nodes are replaced by root proxies targeting
+ * form contents. If root proxies have no children,
+ * they are created on the fly as proxies to the
+ * children of the targeted box.
+ * As such, proxies created here are targeting a
+ * node that belongs to a form.
+ * This is the only place where child proxies are created.
+ */
+synctex_node_p synctex_node_child(synctex_node_p node) {
+ synctex_node_p child = NULL;
+ synctex_node_p target = NULL;
+ if ((child = _synctex_tree_child(node))) {
+ return child;
+ } else if ((target = _synctex_tree_target(node))) {
+ if ((child = synctex_node_child(target))) {
+ /* This is a proxy with no child
+ * which target does have a child. */
+ synctex_nns_s nns = _synctex_new_child_proxies_to(node, child);
+ if (nns.first) {
+ _synctex_node_set_child(node,nns.first);
+ return nns.first;
+ } else {
+ _synctex_error("! synctex_node_child. Internal inconsistency. Please report.");
+ }
+ }
+ }
+ return NULL;
+}
+/*
+ * Set the parent/child bound.
+ * Things get complicated when new_child has siblings.
+ * The caller is responsible for releasing the returned value.
+ */
+static synctex_node_p _synctex_node_set_child(synctex_node_p parent, synctex_node_p new_child) {
+ if (parent) {
+ synctex_node_p old = _synctex_tree_set_child(parent,new_child);
+ synctex_node_p last_child = NULL;
+ synctex_node_p child;
+ if ((child = old)) {
+ do {
+ _synctex_tree_reset_parent(child);
+ } while ((child = __synctex_tree_sibling(child)));
+ }
+ if ((child = new_child)) {
+ do {
+ _synctex_tree_set_parent(child,parent);
+ last_child = child;
+ } while ((child = __synctex_tree_sibling(child)));
+ }
+ _synctex_tree_set_last(parent,last_child);
+ return old;
+ }
+ return NULL;
+}
+
+/* The last child of the given node, or NULL.
+ */
+synctex_node_p synctex_node_last_child(synctex_node_p node) {
+ return _synctex_tree_last(node);
+}
+/**
+ * All nodes siblings are properly set up at parse time
+ * except for non root proxies.
+ */
+synctex_node_p synctex_node_sibling(synctex_node_p node) {
+ return node? __synctex_tree_sibling(node): NULL;
+}
+/**
+ * All the _synctex_tree_... methods refer to the tree model.
+ * __synctex_tree_... methods are low level.
+ */
+/**
+ * Replace the sibling.
+ * Connect to the arg_sibling of the new_sibling if relevant.
+ * - returns the old sibling.
+ * The caller is responsible for releasing the old sibling.
+ * The bound to the parent is managed below.
+ */
+SYNCTEX_INLINE static synctex_node_p _synctex_tree_set_sibling(synctex_node_p node, synctex_node_p new_sibling) {
+ if (node == new_sibling) {
+ printf("BOF\n");
+ }
+ synctex_node_p old = node? __synctex_tree_set_sibling(node,new_sibling): NULL;
+ _synctex_tree_set_arg_sibling(new_sibling,node);
+ return old;
+}
+/**
+ * Replace the sibling.
+ * Set the parent of the new sibling (and further siblings)
+ * to the parent of the receiver.
+ * Also set the last sibling of parent.
+ * - argument new_sibling: must not be NULL.
+ * - returns the old sibling.
+ * The caller is responsible for releasing the old sibling.
+ */
+static synctex_node_p _synctex_node_set_sibling(synctex_node_p node, synctex_node_p new_sibling) {
+ if (node && new_sibling) {
+ synctex_node_p old = _synctex_tree_set_sibling(node,new_sibling);
+ if (_synctex_tree_has_parent(node)) {
+ synctex_node_p parent = __synctex_tree_parent(node);
+ if (parent) {
+ synctex_node_p N = new_sibling;
+ while (synctex_YES) {
+ if (_synctex_tree_has_parent(N)) {
+ __synctex_tree_set_parent(N,parent);
+ _synctex_tree_set_last(parent,N);
+ N = __synctex_tree_sibling(N);
+ continue;
+ } else if (N) {
+ _synctex_error("! synctex_node_sibling. "
+ "Internal inconsistency. "
+ "Please report.");
+ }
+ break;
+ }
+ }
+ }
+ return old;
+ }
+ return NULL;
+}
+/**
+ * The last sibling of the given node, or NULL with node.
+ */
+synctex_node_p synctex_node_last_sibling(synctex_node_p node) {
+ synctex_node_p sibling;
+ do {
+ sibling = node;
+ } while((node = synctex_node_sibling(node)));
+ return sibling;
+}
+/**
+ * The next nodes corresponds to a deep first tree traversal.
+ * Does not create child proxies as side effect contrary to
+ * the synctex_node_next method above.
+ * May loop infinitely many times if the tree
+ * is not properly built (contains loops).
+ */
+SYNCTEX_INLINE static synctex_node_p _synctex_node_sibling_or_parents(synctex_node_p node) {
+ while (node) {
+ synctex_node_p N;
+ if ((N = __synctex_tree_sibling(node))) {
+ return N;
+ } else if ((node = _synctex_tree_parent(node))) {
+ if (synctex_node_type(node) == synctex_node_type_sheet) {/* EXC_BAD_ACCESS? */
+ return NULL;
+ } else if (synctex_node_type(node) == synctex_node_type_form) {
+ return NULL;
+ }
+ } else {
+ return NULL;
+ }
+ }
+ return NULL;
+}
+/**
+ * The next nodes corresponds to a deep first tree traversal.
+ * Creates child proxies as side effect.
+ * May loop infinitely many times if the tree
+ * is not properly built (contains loops).
+ */
+synctex_node_p synctex_node_next(synctex_node_p node) {
+ synctex_node_p N = synctex_node_child(node);
+ if (N) {
+ return N;
+ }
+ return _synctex_node_sibling_or_parents(node);
+}
+/**
+ * The node which argument is the sibling.
+ * - return: NULL if the argument has no parent or
+ * is the first child of its parent.
+ * - Input nodes have no arg siblings
+ */
+synctex_node_p synctex_node_arg_sibling(synctex_node_p node) {
+#if 1
+ return _synctex_tree_arg_sibling(node);
+#else
+ synctex_node_p N = _synctex_tree_parent(node);
+ if ((N = _synctex_tree_child(N))) {
+ do {
+ synctex_node_p NN = __synctex_tree_sibling(N);
+ if (NN == node) {
+ return N;
+ }
+ N = NN;
+ } while (N);
+ }
+ return N;
+#endif
+}
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark CLASS
+# endif
+
+/* Public node accessor: the type */
+synctex_node_type_t synctex_node_type(synctex_node_p node) {
+ return node? node->class_->type: synctex_node_type_none;
+}
+
+/* Public node accessor: the type */
+synctex_node_type_t synctex_node_target_type(synctex_node_p node) {
+ synctex_node_p target = _synctex_tree_target(node);
+ if (target) {
+ return (((target)->class_))->type;
+ } else if (node) {
+ return (((node)->class_))->type;
+ }
+ return synctex_node_type_none;
+}
+
+/* Public node accessor: the human readable type */
+const char * synctex_node_isa(synctex_node_p node) {
+ static const char * isa[synctex_node_number_of_types] =
+ {"Not a node",
+ "input",
+ "sheet",
+ "form",
+ "ref",
+ "vbox",
+ "void vbox",
+ "hbox",
+ "void hbox",
+ "kern",
+ "glue",
+ "rule",
+ "math",
+ "boundary",
+ "box_bdry",
+ "proxy",
+ "last proxy",
+ "vbox proxy",
+ "hbox proxy",
+ "handle"};
+ return isa[synctex_node_type(node)];
+}
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark LOG
+# endif
+
+/* Public node logger */
+void synctex_node_log(synctex_node_p node) {
+ SYNCTEX_MSG_SEND(node,log);
+}
+
+static void _synctex_log_input(synctex_node_p node) {
+ if (node) {
+ printf("%s:%i,%s(%i)\n",synctex_node_isa(node),
+ _synctex_data_tag(node),
+ _synctex_data_name(node),
+ _synctex_data_line(node));
+ printf("SELF:%p\n",(void *)node);
+ printf(" SIBLING:%p\n",
+ (void *)__synctex_tree_sibling(node));
+ }
+}
+
+static void _synctex_log_sheet(synctex_node_p node) {
+ if (node) {
+ printf("%s:%i",synctex_node_isa(node),_synctex_data_page(node));
+ SYNCTEX_PRINT_CHARINDEX_NL;
+ printf("SELF:%p\n",(void *)node);
+ printf(" SIBLING:%p\n",(void *)__synctex_tree_sibling(node));
+ printf(" PARENT:%p\n",(void *)_synctex_tree_parent(node));
+ printf(" CHILD:%p\n",(void *)_synctex_tree_child(node));
+ printf(" LEFT:%p\n",(void *)_synctex_tree_friend(node));
+ printf(" NEXT_hbox:%p\n",(void *)_synctex_tree_next_hbox(node));
+ }
+}
+
+static void _synctex_log_form(synctex_node_p node) {
+ if (node) {
+ printf("%s:%i",synctex_node_isa(node),_synctex_data_tag(node));
+ SYNCTEX_PRINT_CHARINDEX_NL;
+ printf("SELF:%p\n",(void *)node);
+ printf(" SIBLING:%p\n",(void *)__synctex_tree_sibling(node));
+ printf(" PARENT:%p\n",(void *)_synctex_tree_parent(node));
+ printf(" CHILD:%p\n",(void *)_synctex_tree_child(node));
+ printf(" LEFT:%p\n",(void *)_synctex_tree_friend(node));
+ }
+}
+
+static void _synctex_log_ref(synctex_node_p node) {
+ if (node) {
+ printf("%s:%i:%i,%i",
+ synctex_node_isa(node),
+ _synctex_data_tag(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node));
+ SYNCTEX_PRINT_CHARINDEX_NL;
+ printf("SELF:%p\n",(void *)node);
+ printf(" SIBLING:%p\n",(void *)__synctex_tree_sibling(node));
+ printf(" PARENT:%p\n",(void *)_synctex_tree_parent(node));
+ }
+}
+
+static void _synctex_log_tlchv_node(synctex_node_p node) {
+ if (node) {
+ printf("%s:%i,%i,%i:%i,%i",
+ synctex_node_isa(node),
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_column(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node));
+ SYNCTEX_PRINT_CHARINDEX_NL;
+ printf("SELF:%p\n",(void *)node);
+ printf(" SIBLING:%p\n",(void *)__synctex_tree_sibling(node));
+ printf(" PARENT:%p\n",(void *)_synctex_tree_parent(node));
+ printf(" CHILD:%p\n",(void *)_synctex_tree_child(node));
+ printf(" LEFT:%p\n",(void *)_synctex_tree_friend(node));
+ }
+}
+
+static void _synctex_log_kern_node(synctex_node_p node) {
+ if (node) {
+ printf("%s:%i,%i,%i:%i,%i:%i",
+ synctex_node_isa(node),
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_column(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node),
+ _synctex_data_width(node));
+ SYNCTEX_PRINT_CHARINDEX_NL;
+ printf("SELF:%p\n",(void *)node);
+ printf(" SIBLING:%p\n",(void *)__synctex_tree_sibling(node));
+ printf(" PARENT:%p\n",(void *)_synctex_tree_parent(node));
+ printf(" CHILD:%p\n",(void *)_synctex_tree_child(node));
+ printf(" LEFT:%p\n",(void *)_synctex_tree_friend(node));
+ }
+}
+
+static void _synctex_log_rule(synctex_node_p node) {
+ if (node) {
+ printf("%s:%i,%i,%i:%i,%i",
+ synctex_node_isa(node),
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_column(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node));
+ printf(":%i",_synctex_data_width(node));
+ printf(",%i",_synctex_data_height(node));
+ printf(",%i",_synctex_data_depth(node));
+ SYNCTEX_PRINT_CHARINDEX_NL;
+ printf("SELF:%p\n",(void *)node);
+ printf(" SIBLING:%p\n",(void *)__synctex_tree_sibling(node));
+ printf(" PARENT:%p\n",(void *)_synctex_tree_parent(node));
+ printf(" LEFT:%p\n",(void *)_synctex_tree_friend(node));
+ }
+}
+
+static void _synctex_log_void_box(synctex_node_p node) {
+ if (node) {
+ printf("%s",synctex_node_isa(node));
+ printf(":%i",_synctex_data_tag(node));
+ printf(",%i",_synctex_data_line(node));
+ printf(",%i",_synctex_data_column(node));
+ printf(":%i",_synctex_data_h(node));
+ printf(",%i",_synctex_data_v(node));
+ printf(":%i",_synctex_data_width(node));
+ printf(",%i",_synctex_data_height(node));
+ printf(",%i",_synctex_data_depth(node));
+ SYNCTEX_PRINT_CHARINDEX_NL;
+ printf("SELF:%p\n",(void *)node);
+ printf(" SIBLING:%p\n",(void *)__synctex_tree_sibling(node));
+ printf(" PARENT:%p\n",(void *)_synctex_tree_parent(node));
+ printf(" CHILD:%p\n",(void *)_synctex_tree_child(node));
+ printf(" LEFT:%p\n",(void *)_synctex_tree_friend(node));
+ }
+}
+
+static void _synctex_log_vbox(synctex_node_p node) {
+ if (node) {
+ printf("%s",synctex_node_isa(node));
+ printf(":%i",_synctex_data_tag(node));
+ printf(",%i",_synctex_data_line(node));
+ printf(",%i",_synctex_data_column(node));
+ printf(":%i",_synctex_data_h(node));
+ printf(",%i",_synctex_data_v(node));
+ printf(":%i",_synctex_data_width(node));
+ printf(",%i",_synctex_data_height(node));
+ printf(",%i",_synctex_data_depth(node));
+ SYNCTEX_PRINT_CHARINDEX_NL;
+ printf("SELF:%p\n",(void *)node);
+ printf(" SIBLING:%p\n",(void *)__synctex_tree_sibling(node));
+ printf(" PARENT:%p\n",(void *)_synctex_tree_parent(node));
+ printf(" CHILD:%p\n",(void *)_synctex_tree_child(node));
+ printf(" LEFT:%p\n",(void *)_synctex_tree_friend(node));
+ printf(" NEXT_hbox:%p\n",(void *)_synctex_tree_next_hbox(node));
+ }
+}
+
+static void _synctex_log_hbox(synctex_node_p node) {
+ if (node) {
+ printf("%s",synctex_node_isa(node));
+ printf(":%i",_synctex_data_tag(node));
+ printf(",%i~%i*%i",_synctex_data_line(node),_synctex_data_mean_line(node),_synctex_data_weight(node));
+ printf(",%i",_synctex_data_column(node));
+ printf(":%i",_synctex_data_h(node));
+ printf(",%i",_synctex_data_v(node));
+ printf(":%i",_synctex_data_width(node));
+ printf(",%i",_synctex_data_height(node));
+ printf(",%i",_synctex_data_depth(node));
+ printf("/%i",_synctex_data_h_V(node));
+ printf(",%i",_synctex_data_v_V(node));
+ printf(":%i",_synctex_data_width_V(node));
+ printf(",%i",_synctex_data_height_V(node));
+ printf(",%i",_synctex_data_depth_V(node));
+ SYNCTEX_PRINT_CHARINDEX_NL;
+ printf("SELF:%p\n",(void *)node);
+ printf(" SIBLING:%p\n",(void *)__synctex_tree_sibling(node));
+ printf(" PARENT:%p\n",(void *)_synctex_tree_parent(node));
+ printf(" CHILD:%p\n",(void *)_synctex_tree_child(node));
+ printf(" LEFT:%p\n",(void *)_synctex_tree_friend(node));
+ printf(" NEXT_hbox:%p\n",(void *)_synctex_tree_next_hbox(node));
+ }
+}
+static void _synctex_log_proxy(synctex_node_p node) {
+ if (node) {
+ synctex_node_p N = _synctex_tree_target(node);
+ printf("%s",synctex_node_isa(node));
+ printf(":%i",_synctex_data_h(node));
+ printf(",%i",_synctex_data_v(node));
+ SYNCTEX_PRINT_CHARINDEX_NL;
+ printf("SELF:%p\n",(void *)node);
+ printf(" SIBLING:%p\n",(void *)__synctex_tree_sibling(node));
+ printf(" LEFT:%p\n",(void *)_synctex_tree_friend(node));
+ printf(" ->%s\n",_synctex_node_abstract(N));
+ }
+}
+static void _synctex_log_handle(synctex_node_p node) {
+ if (node) {
+ synctex_node_p N = _synctex_tree_target(node);
+ printf("%s",synctex_node_isa(node));
+ SYNCTEX_PRINT_CHARINDEX_NL;
+ printf("SELF:%p\n",(void *)node);
+ printf(" SIBLING:%p\n",(void *)__synctex_tree_sibling(node));
+ printf(" ->%s\n",_synctex_node_abstract(N));
+ }
+}
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark SYNCTEX_DISPLAY
+# endif
+
+int synctex_scanner_display_switcher(synctex_scanner_p scanR) {
+ return scanR->display_switcher;
+}
+void synctex_scanner_set_display_switcher(synctex_scanner_p scanR, int switcher) {
+ scanR->display_switcher = switcher;
+}
+static const char * const _synctex_display_prompt = "................................";
+
+static char * _synctex_scanner_display_prompt_down(synctex_scanner_p scanR) {
+ if (scanR->display_prompt>_synctex_display_prompt) {
+ --scanR->display_prompt;
+ }
+ return scanR->display_prompt;
+}
+static char * _synctex_scanner_display_prompt_up(synctex_scanner_p scanR) {
+ if (scanR->display_prompt+1<_synctex_display_prompt+strlen(_synctex_display_prompt)) {
+ ++scanR->display_prompt;
+ }
+ return scanR->display_prompt;
+}
+
+void synctex_node_display(synctex_node_p node) {
+ if (node) {
+ synctex_scanner_p scanR = node->class_->scanner;
+ if (scanR) {
+ if (scanR->display_switcher<0) {
+ SYNCTEX_MSG_SEND(node, display);
+ } else if (scanR->display_switcher>0 && --scanR->display_switcher>0) {
+ SYNCTEX_MSG_SEND(node, display);
+ } else if (scanR->display_switcher-->=0) {
+ printf("%s Next display skipped. Reset display switcher.\n",node->class_->scanner->display_prompt);
+ }
+ } else {
+ SYNCTEX_MSG_SEND(node, display);
+ }
+ }
+}
+static char * _synctex_node_abstract(synctex_node_p node) {
+ SYNCTEX_PARAMETER_ASSERT(node || node->class_);
+ return (node && node->class_->abstract)? node->class_->abstract(node):"none";
+}
+
+SYNCTEX_INLINE static void _synctex_display_child(synctex_node_p node) {
+ synctex_node_p N = _synctex_tree_child(node);
+ if (N) {
+ _synctex_scanner_display_prompt_down(N->class_->scanner);
+ synctex_node_display(N);
+ _synctex_scanner_display_prompt_up(N->class_->scanner);
+ }
+}
+
+SYNCTEX_INLINE static void _synctex_display_sibling(synctex_node_p node) {
+ synctex_node_display(__synctex_tree_sibling(node));
+}
+#define SYNCTEX_ABSTRACT_MAX 128
+static char * _synctex_abstract_input(synctex_node_p node) {
+ static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
+ if (node) {
+ snprintf(abstract,SYNCTEX_ABSTRACT_MAX,"Input:%i:%s(%i)" SYNCTEX_PRINT_CHARINDEX_FMT,
+ _synctex_data_tag(node),
+ _synctex_data_name(node),
+ _synctex_data_line(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ }
+ return abstract;
+}
+
+static void _synctex_display_input(synctex_node_p node) {
+ if (node) {
+ printf("Input:%i:%s(%i)"
+ SYNCTEX_PRINT_CHARINDEX_FMT
+ "\n",
+ _synctex_data_tag(node),
+ _synctex_data_name(node),
+ _synctex_data_line(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ synctex_node_display(__synctex_tree_sibling(node));
+ }
+}
+
+static char * _synctex_abstract_sheet(synctex_node_p node) {
+ static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
+ if (node) {
+ snprintf(abstract,SYNCTEX_ABSTRACT_MAX,"{%i...}" SYNCTEX_PRINT_CHARINDEX_FMT,
+ _synctex_data_page(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ }
+ return abstract;
+}
+
+static void _synctex_display_sheet(synctex_node_p node) {
+ if (node) {
+ printf("%s{%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT
+ "\n",
+ node->class_->scanner->display_prompt,
+ _synctex_data_page(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ _synctex_display_child(node);
+ printf("%s}\n",node->class_->scanner->display_prompt);
+ _synctex_display_sibling(node);
+ }
+}
+
+static char * _synctex_abstract_form(synctex_node_p node) {
+ static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
+ if (node) {
+ snprintf(abstract,SYNCTEX_ABSTRACT_MAX,"<%i...>" SYNCTEX_PRINT_CHARINDEX_FMT,
+ _synctex_data_tag(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ SYNCTEX_PRINT_CHARINDEX;
+ }
+ return abstract;
+}
+
+static void _synctex_display_form(synctex_node_p node) {
+ if (node) {
+ printf("%s<%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT
+ "\n",
+ node->class_->scanner->display_prompt,
+ _synctex_data_tag(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ _synctex_display_child(node);
+ printf("%s>\n",node->class_->scanner->display_prompt);
+ _synctex_display_sibling(node);
+ }
+}
+
+static char * _synctex_abstract_vbox(synctex_node_p node) {
+ static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
+ if (node) {
+ snprintf(abstract,SYNCTEX_ABSTRACT_MAX,"[%i,%i:%i,%i:%i,%i,%i...]"
+ SYNCTEX_PRINT_CHARINDEX_FMT,
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node),
+ _synctex_data_width(node),
+ _synctex_data_height(node),
+ _synctex_data_depth(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ }
+ return abstract;
+}
+
+static void _synctex_display_vbox(synctex_node_p node) {
+ if (node) {
+ printf("%s[%i,%i:%i,%i:%i,%i,%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT
+ "\n",
+ node->class_->scanner->display_prompt,
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node),
+ _synctex_data_width(node),
+ _synctex_data_height(node),
+ _synctex_data_depth(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ _synctex_display_child(node);
+ printf("%s]\n%slast:%s\n",
+ node->class_->scanner->display_prompt,
+ node->class_->scanner->display_prompt,
+ _synctex_node_abstract(_synctex_tree_last(node)));
+ _synctex_display_sibling(node);
+ }
+}
+
+static char * _synctex_abstract_hbox(synctex_node_p node) {
+ static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
+ if (node) {
+ snprintf(abstract,SYNCTEX_ABSTRACT_MAX,"(%i,%i~%i*%i:%i,%i:%i,%i,%i...)"
+ SYNCTEX_PRINT_CHARINDEX_FMT,
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_mean_line(node),
+ _synctex_data_weight(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node),
+ _synctex_data_width(node),
+ _synctex_data_height(node),
+ _synctex_data_depth(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ }
+ return abstract;
+}
+
+static void _synctex_display_hbox(synctex_node_p node) {
+ if (node) {
+ printf("%s(%i,%i~%i*%i:%i,%i:%i,%i,%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT
+ "\n",
+ node->class_->scanner->display_prompt,
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_mean_line(node),
+ _synctex_data_weight(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node),
+ _synctex_data_width(node),
+ _synctex_data_height(node),
+ _synctex_data_depth(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ _synctex_display_child(node);
+ printf("%s)\n%slast:%s\n",
+ node->class_->scanner->display_prompt,
+ node->class_->scanner->display_prompt,
+ _synctex_node_abstract(_synctex_tree_last(node)));
+ _synctex_display_sibling(node);
+ }
+}
+
+static char * _synctex_abstract_void_vbox(synctex_node_p node) {
+ static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
+ if (node) {
+ snprintf(abstract,SYNCTEX_ABSTRACT_MAX,"v%i,%i;%i,%i:%i,%i,%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT
+ "\n",
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node),
+ _synctex_data_width(node),
+ _synctex_data_height(node),
+ _synctex_data_depth(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ }
+ return abstract;
+}
+
+static void _synctex_display_void_vbox(synctex_node_p node) {
+ if (node) {
+ printf("%sv%i,%i;%i,%i:%i,%i,%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT
+ "\n",
+ node->class_->scanner->display_prompt,
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node),
+ _synctex_data_width(node),
+ _synctex_data_height(node),
+ _synctex_data_depth(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ _synctex_display_sibling(node);
+ }
+}
+
+static char * _synctex_abstract_void_hbox(synctex_node_p node) {
+ static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
+ if (node) {
+ snprintf(abstract,SYNCTEX_ABSTRACT_MAX,"h%i,%i:%i,%i:%i,%i,%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT,
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node),
+ _synctex_data_width(node),
+ _synctex_data_height(node),
+ _synctex_data_depth(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ }
+ return abstract;
+}
+
+static void _synctex_display_void_hbox(synctex_node_p node) {
+ if (node) {
+ printf("%sh%i,%i:%i,%i:%i,%i,%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT
+ "\n",
+ node->class_->scanner->display_prompt,
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node),
+ _synctex_data_width(node),
+ _synctex_data_height(node),
+ _synctex_data_depth(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ _synctex_display_sibling(node);
+ }
+}
+
+static char * _synctex_abstract_glue(synctex_node_p node) {
+ static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
+ if (node) {
+ snprintf(abstract,SYNCTEX_ABSTRACT_MAX,"glue:%i,%i:%i,%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT,
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ }
+ return abstract;
+}
+
+static void _synctex_display_glue(synctex_node_p node) {
+ if (node) {
+ printf("%sglue:%i,%i:%i,%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT
+ "\n",
+ node->class_->scanner->display_prompt,
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ _synctex_display_sibling(node);
+ }
+}
+
+static char * _synctex_abstract_rule(synctex_node_p node) {
+ static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
+ if (node) {
+ snprintf(abstract,SYNCTEX_ABSTRACT_MAX,"rule:%i,%i:%i,%i:%i,%i,%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT,
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node),
+ _synctex_data_width(node),
+ _synctex_data_height(node),
+ _synctex_data_depth(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ }
+ return abstract;
+}
+
+static void _synctex_display_rule(synctex_node_p node) {
+ if (node) {
+ printf("%srule:%i,%i:%i,%i:%i,%i,%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT
+ "\n",
+ node->class_->scanner->display_prompt,
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node),
+ _synctex_data_width(node),
+ _synctex_data_height(node),
+ _synctex_data_depth(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ _synctex_display_sibling(node);
+ }
+}
+
+static char * _synctex_abstract_math(synctex_node_p node) {
+ static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
+ if (node) {
+ snprintf(abstract,SYNCTEX_ABSTRACT_MAX,"math:%i,%i:%i,%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT,
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ }
+ return abstract;
+}
+
+static void _synctex_display_math(synctex_node_p node) {
+ if (node) {
+ printf("%smath:%i,%i:%i,%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT
+ "\n",
+ node->class_->scanner->display_prompt,
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ _synctex_display_sibling(node);
+ }
+}
+
+static char * _synctex_abstract_kern(synctex_node_p node) {
+ static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
+ if (node) {
+ snprintf(abstract,SYNCTEX_ABSTRACT_MAX,"kern:%i,%i:%i,%i:%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT,
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node),
+ _synctex_data_width(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ }
+ return abstract;
+}
+
+static void _synctex_display_kern(synctex_node_p node) {
+ if (node) {
+ printf("%skern:%i,%i:%i,%i:%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT
+ "\n",
+ node->class_->scanner->display_prompt,
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node),
+ _synctex_data_width(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ _synctex_display_sibling(node);
+ }
+}
+
+static char * _synctex_abstract_boundary(synctex_node_p node) {
+ static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
+ if (node) {
+ snprintf(abstract,SYNCTEX_ABSTRACT_MAX,"boundary:%i,%i:%i,%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT,
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ }
+ return abstract;
+}
+
+static void _synctex_display_boundary(synctex_node_p node) {
+ if (node) {
+ printf("%sboundary:%i,%i:%i,%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT
+ "\n",
+ node->class_->scanner->display_prompt,
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ _synctex_display_sibling(node);
+ }
+}
+
+static char * _synctex_abstract_box_bdry(synctex_node_p node) {
+ static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
+ if (node) {
+ snprintf(abstract,SYNCTEX_ABSTRACT_MAX,"box bdry:%i,%i:%i,%i" SYNCTEX_PRINT_CHARINDEX_FMT,
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ }
+ return abstract;
+}
+
+static void _synctex_display_box_bdry(synctex_node_p node) {
+ if (node) {
+ printf("%sbox bdry:%i,%i:%i,%i",
+ node->class_->scanner->display_prompt,
+ _synctex_data_tag(node),
+ _synctex_data_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node));
+ SYNCTEX_PRINT_CHARINDEX_NL;
+ _synctex_display_sibling(node);
+ }
+}
+
+static char * _synctex_abstract_ref(synctex_node_p node) {
+ static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
+ if (node) {
+ snprintf(abstract,SYNCTEX_ABSTRACT_MAX,"form ref:%i:%i,%i" SYNCTEX_PRINT_CHARINDEX_FMT,
+ _synctex_data_tag(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ }
+ return abstract;
+}
+
+static void _synctex_display_ref(synctex_node_p node) {
+ if (node) {
+ printf("%sform ref:%i:%i,%i",
+ node->class_->scanner->display_prompt,
+ _synctex_data_tag(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node));
+ SYNCTEX_PRINT_CHARINDEX_NL;
+ _synctex_display_sibling(node);
+ }
+}
+static char * _synctex_abstract_proxy(synctex_node_p node) {
+ static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
+ if (node) {
+ synctex_node_p N = _synctex_tree_target(node);
+ snprintf(abstract,SYNCTEX_ABSTRACT_MAX,"%s:%i,%i:%i,%i/%p%s",
+ synctex_node_isa(node),
+ synctex_node_tag(node),
+ synctex_node_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node),
+ node,
+ _synctex_node_abstract(N));
+ }
+ return abstract;
+}
+static void _synctex_display_proxy(synctex_node_p node) {
+ if (node) {
+ synctex_node_p N = _synctex_tree_target(node);
+ printf("%s%s:%i,%i:%i,%i",
+ node->class_->scanner->display_prompt,
+ synctex_node_isa(node),
+ synctex_node_tag(node),
+ synctex_node_line(node),
+ _synctex_data_h(node),
+ _synctex_data_v(node));
+ if (N) {
+ printf("=%i,%i:%i,%i,%i->%s",
+ synctex_node_h(node),
+ synctex_node_v(node),
+ synctex_node_width(node),
+ synctex_node_height(node),
+ synctex_node_depth(node),
+ _synctex_node_abstract(N));
+ }
+ printf("\n");
+ _synctex_display_child(node);
+ _synctex_display_sibling(node);
+ }
+}
+static char * _synctex_abstract_proxy_vbox(synctex_node_p node) {
+ static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
+ if (node) {
+ snprintf(abstract,SYNCTEX_ABSTRACT_MAX,
+ "[*%i,%i:%i,%i:%i,%i,%i...*]"
+ SYNCTEX_PRINT_CHARINDEX_FMT,
+ synctex_node_tag(node),
+ synctex_node_line(node),
+ synctex_node_h(node),
+ synctex_node_v(node),
+ synctex_node_width(node),
+ synctex_node_height(node),
+ synctex_node_depth(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ }
+ return abstract;
+}
+
+static void _synctex_display_proxy_vbox(synctex_node_p node) {
+ if (node) {
+ printf("%s[*%i,%i:%i,%i:%i,%i,%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT
+ "\n",
+ node->class_->scanner->display_prompt,
+ synctex_node_tag(node),
+ synctex_node_line(node),
+ synctex_node_h(node),
+ synctex_node_v(node),
+ synctex_node_width(node),
+ synctex_node_height(node),
+ synctex_node_depth(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ _synctex_display_child(node);
+ printf("%s*]\n%slast:%s\n",
+ node->class_->scanner->display_prompt,
+ node->class_->scanner->display_prompt,
+ _synctex_node_abstract(_synctex_tree_last(node)));
+ _synctex_display_sibling(node);
+ }
+}
+
+static char * _synctex_abstract_proxy_hbox(synctex_node_p node) {
+ static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
+ if (node) {
+ snprintf(abstract,SYNCTEX_ABSTRACT_MAX,"(*%i,%i~%i*%i:%i,%i:%i,%i,%i...*)/%p"
+ SYNCTEX_PRINT_CHARINDEX_FMT,
+ synctex_node_tag(node),
+ synctex_node_line(node),
+ synctex_node_mean_line(node),
+ synctex_node_weight(node),
+ synctex_node_h(node),
+ synctex_node_v(node),
+ synctex_node_width(node),
+ synctex_node_height(node),
+ synctex_node_depth(node),
+ node
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ }
+ return abstract;
+}
+
+static void _synctex_display_proxy_hbox(synctex_node_p node) {
+ if (node) {
+ printf("%s(*%i,%i~%i*%i:%i,%i:%i,%i,%i"
+ SYNCTEX_PRINT_CHARINDEX_FMT
+ "\n",
+ node->class_->scanner->display_prompt,
+ synctex_node_tag(node),
+ synctex_node_line(node),
+ synctex_node_mean_line(node),
+ synctex_node_weight(node),
+ synctex_node_h(node),
+ synctex_node_v(node),
+ synctex_node_width(node),
+ synctex_node_height(node),
+ synctex_node_depth(node)
+ SYNCTEX_PRINT_CHARINDEX_WHAT);
+ _synctex_display_child(node);
+ printf("%s*)\n%slast:%s\n",
+ node->class_->scanner->display_prompt,
+ node->class_->scanner->display_prompt,
+ _synctex_node_abstract(_synctex_tree_last(node)));
+ _synctex_display_sibling(node);
+ }
+}
+
+static char * _synctex_abstract_handle(synctex_node_p node) {
+ static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
+ if (node) {
+ synctex_node_p N = _synctex_tree_target(node);
+ if (N && !N->class_) {
+ exit(1);
+ }
+ snprintf(abstract,SYNCTEX_ABSTRACT_MAX,"%s:%s",
+ synctex_node_isa(node),
+ (N?_synctex_node_abstract(N):""));
+ }
+ return abstract;
+}
+static void _synctex_display_handle(synctex_node_p node) {
+ if (node) {
+ synctex_node_p N = _synctex_tree_target(node);
+ printf("%s%s(%i):->%s\n",
+ node->class_->scanner->display_prompt,
+ synctex_node_isa(node),
+ _synctex_data_weight(N),
+ _synctex_node_abstract(N));
+ _synctex_display_child(node);
+ _synctex_display_sibling(node);
+ }
+}
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark STATUS
+# endif
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark Prototypes
+# endif
+typedef struct {
+ size_t size;
+ synctex_status_t status;
+} synctex_zs_s;
+static synctex_zs_s _synctex_buffer_get_available_size(synctex_scanner_p scanner, size_t size);
+static synctex_status_t _synctex_next_line(synctex_scanner_p scanner);
+static synctex_status_t _synctex_match_string(synctex_scanner_p scanner, const char * the_string);
+
+typedef struct synctex_ns_t {
+ synctex_node_p node;
+ synctex_status_t status;
+} synctex_ns_s;
+static synctex_ns_s __synctex_parse_new_input(synctex_scanner_p scanner);
+static synctex_status_t _synctex_scan_preamble(synctex_scanner_p scanner);
+typedef struct {
+ float value;
+ synctex_status_t status;
+} synctex_fs_s;
+static synctex_fs_s _synctex_scan_float_and_dimension(synctex_scanner_p scanner);
+static synctex_status_t _synctex_scan_post_scriptum(synctex_scanner_p scanner);
+static synctex_status_t _synctex_scan_postamble(synctex_scanner_p scanner);
+static synctex_status_t _synctex_setup_visible_hbox(synctex_node_p box);
+static synctex_status_t _synctex_scan_content(synctex_scanner_p scanner);
+int synctex_scanner_pre_x_offset(synctex_scanner_p scanner);
+int synctex_scanner_pre_y_offset(synctex_scanner_p scanner);
+const char * synctex_scanner_get_output_fmt(synctex_scanner_p scanner);
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark SCANNER UTILITIES
+# endif
+
+# define SYNCTEX_FILE (scanner->reader->file)
+
+/**
+ * Try to ensure that the buffer contains at least size bytes.
+ * Passing a huge size argument means the whole buffer length.
+ * Passing a 0 size argument means return the available buffer length, without reading the file.
+ * In that case, the return status is always SYNCTEX_STATUS_OK unless the given scanner is NULL.
+ * The size_t value returned is the number of bytes now available in the buffer. This is a nonnegative integer, it may take the value 0.
+ * It is the responsibility of the caller to test whether this size is conforming to its needs.
+ * Negative values may return in case of error, actually
+ * when there was an error reading the synctex file.
+ * - parameter scanner: The owning scanner. When NULL, returns SYNCTEX_STATUS_BAD_ARGUMENT.
+ * - parameter expected: expected number of bytes.
+ * - returns: a size and a status.
+ */
+static synctex_zs_s _synctex_buffer_get_available_size(synctex_scanner_p scanner, size_t expected) {
+ size_t size = 0;
+ if (NULL == scanner) {
+ return (synctex_zs_s){0,SYNCTEX_STATUS_BAD_ARGUMENT};
+ }
+ if (expected>scanner->reader->size){
+ expected = scanner->reader->size;
+ }
+ size = SYNCTEX_END - SYNCTEX_CUR; /* available is the number of unparsed chars in the buffer */
+ if (expected<=size) {
+ /* There are already sufficiently many characters in the buffer */
+ return (synctex_zs_s){size,SYNCTEX_STATUS_OK};
+ }
+ if (SYNCTEX_FILE) {
+ /* Copy the remaining part of the buffer to the beginning,
+ * then read the next part of the file */
+ int already_read = 0;
+# if defined(SYNCTEX_USE_CHARINDEX)
+ scanner->reader->charindex_offset += SYNCTEX_CUR - SYNCTEX_START;
+# endif
+ if (size) {
+ memmove(SYNCTEX_START, SYNCTEX_CUR, size);
+ }
+ SYNCTEX_CUR = SYNCTEX_START + size; /* the next character after the move, will change. */
+ /* Fill the buffer up to its end */
+ already_read = gzread(SYNCTEX_FILE,(void *)SYNCTEX_CUR,(int)(SYNCTEX_BUFFER_SIZE - size));
+ if (already_read>0) {
+ /* We assume that 0<already_read<=SYNCTEX_BUFFER_SIZE - size, such that
+ * SYNCTEX_CUR + already_read = SYNCTEX_START + size + already_read <= SYNCTEX_START + SYNCTEX_BUFFER_SIZE */
+ SYNCTEX_END = SYNCTEX_CUR + already_read;
+ /* If the end of the file was reached, all the required SYNCTEX_BUFFER_SIZE - available
+ * may not be filled with values from the file.
+ * In that case, the buffer should stop properly after already_read characters. */
+ * SYNCTEX_END = '\0'; /* there is enough room */
+ SYNCTEX_CUR = SYNCTEX_START;
+ /* May be available is less than size, the caller will have to test. */
+ return (synctex_zs_s){SYNCTEX_END - SYNCTEX_CUR,SYNCTEX_STATUS_OK};
+ } else if (0>already_read) {
+ /* There is a possible error in reading the file */
+ int errnum = 0;
+ const char * error_string = gzerror(SYNCTEX_FILE, &errnum);
+ if (Z_ERRNO == errnum) {
+ /* There is an error in zlib caused by the file system */
+ _synctex_error("gzread error from the file system (%i)",errno);
+ return (synctex_zs_s){0,SYNCTEX_STATUS_ERROR};
+ } else if (errnum) {
+ _synctex_error("gzread error (%i:%i,%s)",already_read,errnum,error_string);
+ return (synctex_zs_s){0,SYNCTEX_STATUS_ERROR};
+ }
+ }
+ /* Nothing was read, we are at the end of the file. */
+ gzclose(SYNCTEX_FILE);
+ SYNCTEX_FILE = NULL;
+ SYNCTEX_END = SYNCTEX_CUR;
+ SYNCTEX_CUR = SYNCTEX_START;
+ * SYNCTEX_END = '\0';/* Terminate the string properly.*/
+ /* there might be a bit of text left */
+ return (synctex_zs_s){SYNCTEX_END - SYNCTEX_CUR,SYNCTEX_STATUS_EOF};
+ }
+ /* We cannot enlarge the buffer because the end of the file was reached. */
+ return (synctex_zs_s){size,SYNCTEX_STATUS_EOF};
+}
+
+/* Used when parsing the synctex file.
+ * Advance to the next character starting a line.
+ * Actually, only '\n' is recognized as end of line marker.
+ * On normal completion, the returned value is the number of unparsed characters available in the buffer.
+ * In general, it is a positive value, 0 meaning that the end of file was reached.
+ * -1 is returned in case of error, actually because there was an error while feeding the buffer.
+ * When the function returns with no error, SYNCTEX_CUR points to the first character of the next line, if any.
+ * J. Laurens: Sat May 10 07:52:31 UTC 2008
+ */
+static synctex_status_t _synctex_next_line(synctex_scanner_p scanner) {
+ synctex_status_t status = SYNCTEX_STATUS_OK;
+ if (NULL == scanner) {
+ return SYNCTEX_STATUS_BAD_ARGUMENT;
+ }
+infinite_loop:
+ while(SYNCTEX_CUR<SYNCTEX_END) {
+ if (*SYNCTEX_CUR == '\n') {
+ ++SYNCTEX_CUR;
+ ++scanner->reader->line_number;
+ return _synctex_buffer_get_available_size(scanner, 1).status;
+ }
+ ++SYNCTEX_CUR;
+ }
+ /* Here, we have SYNCTEX_CUR == SYNCTEX_END, such that the next call to _synctex_buffer_get_available_size
+ * will read another bunch of synctex file. Little by little, we advance to the end of the file. */
+ status = _synctex_buffer_get_available_size(scanner, 1).status;
+ if (status<=SYNCTEX_STATUS_EOF) {
+ return status;
+ }
+ goto infinite_loop;
+}
+
+/* Scan the given string.
+ * Both scanner and the_string must not be NULL, and the_string must not be 0 length.
+ * SYNCTEX_STATUS_OK is returned if the string is found,
+ * SYNCTEX_STATUS_EOF is returned when the EOF is reached,
+ * SYNCTEX_STATUS_NOT_OK is returned is the string is not found,
+ * an error status is returned otherwise.
+ * This is a critical method because buffering renders things more difficult.
+ * The given string might be as long as the maximum size_t value.
+ * As side effect, the buffer state may have changed if the given argument string can't fit into the buffer.
+ */
+static synctex_status_t _synctex_match_string(synctex_scanner_p scanner, const char * the_string) {
+ size_t tested_len = 0; /* the number of characters at the beginning of the_string that match */
+ size_t remaining_len = 0; /* the number of remaining characters of the_string that should match */
+ size_t available = 0;
+ synctex_zs_s zs = {0,0};
+ if (NULL == scanner || NULL == the_string) {
+ return SYNCTEX_STATUS_BAD_ARGUMENT;
+ }
+ remaining_len = strlen(the_string); /* All the_string should match */
+ if (0 == remaining_len) {
+ return SYNCTEX_STATUS_BAD_ARGUMENT;
+ }
+ /* How many characters available in the buffer? */
+ zs = _synctex_buffer_get_available_size(scanner,remaining_len);
+ if (zs.status<SYNCTEX_STATUS_EOF) {
+ return zs.status;
+ }
+ /* Maybe we have less characters than expected because the buffer is too small. */
+ if (zs.size>=remaining_len) {
+ /* The buffer is sufficiently big to hold the expected number of characters. */
+ if (strncmp((char *)SYNCTEX_CUR,the_string,remaining_len)) {
+ return SYNCTEX_STATUS_NOT_OK;
+ }
+ return_OK:
+ /* Advance SYNCTEX_CUR to the next character after the_string. */
+ SYNCTEX_CUR += remaining_len;
+ return SYNCTEX_STATUS_OK;
+ } else if (strncmp((char *)SYNCTEX_CUR,the_string,zs.size)) {
+ /* No need to go further, this is not the expected string in the buffer. */
+ return SYNCTEX_STATUS_NOT_OK;
+ } else if (SYNCTEX_FILE) {
+ /* The buffer was too small to contain remaining_len characters.
+ * We have to cut the string into pieces. */
+ z_off_t offset = 0L;
+ /* the first part of the string is found, advance the_string to the next untested character. */
+ the_string += zs.size;
+ /* update the remaining length and the parsed length. */
+ remaining_len -= zs.size;
+ tested_len += zs.size;
+ SYNCTEX_CUR += zs.size; /* We validate the tested characters. */
+ if (0 == remaining_len) {
+ /* Nothing left to test, we have found the given string. */
+ return SYNCTEX_STATUS_OK;
+ }
+ /* We also have to record the current state of the file cursor because
+ * if the_string does not match, all this should be a totally blank operation,
+ * for which the file and buffer states should not be modified at all.
+ * In fact, the states of the buffer before and after this function are in general different
+ * but they are totally equivalent as long as the values of the buffer before SYNCTEX_CUR
+ * can be safely discarded. */
+ offset = gztell(SYNCTEX_FILE);
+ /* offset now corresponds to the first character of the file that was not buffered. */
+ /* SYNCTEX_CUR - SYNCTEX_START is the number of chars that where already buffered and
+ * that match the head of the_string. If in fine the_string does not match, all these chars must be recovered
+ * because the whole buffer contents is replaced in _synctex_buffer_get_available_size.
+ * They were buffered from offset-len location in the file. */
+ offset -= SYNCTEX_CUR - SYNCTEX_START;
+ more_characters:
+ /* There is still some work to be done, so read another bunch of file.
+ * This is the second call to _synctex_buffer_get_available_size,
+ * which means that the actual contents of the buffer will be discarded.
+ * We will definitely have to recover the previous state in case we do not find the expected string. */
+ zs = _synctex_buffer_get_available_size(scanner,remaining_len);
+ if (zs.status<SYNCTEX_STATUS_EOF) {
+ return zs.status; /* This is an error, no need to go further. */
+ }
+ if (zs.size==0) {
+ /* Missing characters: recover the initial state of the file and return. */
+ return_NOT_OK:
+ if (offset != gzseek(SYNCTEX_FILE,offset,SEEK_SET)) {
+ /* This is a critical error, we could not recover the previous state. */
+ _synctex_error("Can't seek file");
+ return SYNCTEX_STATUS_ERROR;
+ }
+ /* Next time we are asked to fill the buffer,
+ * we will read a complete bunch of text from the file. */
+ SYNCTEX_CUR = SYNCTEX_END;
+ return SYNCTEX_STATUS_NOT_OK;
+ }
+ if (zs.size<remaining_len) {
+ /* We'll have to loop one more time. */
+ if (strncmp((char *)SYNCTEX_CUR,the_string,zs.size)) {
+ /* This is not the expected string, recover the previous state and return. */
+ goto return_NOT_OK;
+ }
+ /* Advance the_string to the first untested character. */
+ the_string += available;
+ /* update the remaining length and the parsed length. */
+ remaining_len -= zs.size;
+ tested_len += zs.size;
+ SYNCTEX_CUR += zs.size; /* We validate the tested characters. */
+ goto more_characters;
+ }
+ /* This is the last step. */
+ if (strncmp((char *)SYNCTEX_CUR,the_string,remaining_len)) {
+ /* This is not the expected string, recover the previous state and return. */
+ goto return_NOT_OK;
+ }
+ goto return_OK;
+ } else {
+ /* The buffer can't contain the given string argument, and the EOF was reached */
+ return SYNCTEX_STATUS_EOF;
+ }
+}
+
+/* Used when parsing the synctex file.
+ * Decode an integer.
+ * First, field separators, namely ':' and ',' characters are skipped
+ * The returned value is negative if there is an unrecoverable error.
+ * It is SYNCTEX_STATUS_NOT_OK if an integer could not be parsed, for example
+ * if the characters at the current cursor position are not digits or
+ * if the end of the file has been reached.
+ * It is SYNCTEX_STATUS_OK if an int has been successfully parsed.
+ * The given scanner argument must not be NULL, on the contrary, value_ref may be NULL.
+ */
+static synctex_is_s _synctex_decode_int(synctex_scanner_p scanner) {
+ char * ptr = NULL;
+ char * end = NULL;
+ synctex_zs_s zs = {0,0};
+ int result;
+ if (NULL == scanner) {
+ return (synctex_is_s){0, SYNCTEX_STATUS_BAD_ARGUMENT};
+ }
+ zs = _synctex_buffer_get_available_size(scanner, SYNCTEX_BUFFER_MIN_SIZE);
+ if (zs.status<SYNCTEX_STATUS_EOF) {
+ return (synctex_is_s){0,zs.status};
+ }
+ if (zs.size==0) {
+ return (synctex_is_s){0,SYNCTEX_STATUS_NOT_OK};
+ }
+ ptr = SYNCTEX_CUR;
+ /* Optionally parse the separator */
+ if (*ptr==':' || *ptr==',') {
+ ++ptr;
+ --zs.size;
+ if (zs.size==0) {
+ return (synctex_is_s){0,SYNCTEX_STATUS_NOT_OK};
+ }
+ }
+ result = (int)strtol(ptr, &end, 10);
+ if (end>ptr) {
+ SYNCTEX_CUR = end;
+ return (synctex_is_s){result,SYNCTEX_STATUS_OK};
+ }
+ return (synctex_is_s){result,SYNCTEX_STATUS_NOT_OK};
+}
+static synctex_is_s _synctex_decode_int_opt(synctex_scanner_p scanner, int default_value) {
+ char * ptr = NULL;
+ char * end = NULL;
+ synctex_zs_s zs = {0, 0};
+ if (NULL == scanner) {
+ return (synctex_is_s){default_value, SYNCTEX_STATUS_BAD_ARGUMENT};
+ }
+ zs = _synctex_buffer_get_available_size(scanner, SYNCTEX_BUFFER_MIN_SIZE);
+ if (zs.status<SYNCTEX_STATUS_EOF) {
+ return (synctex_is_s){default_value,zs.status};
+ }
+ if (zs.size==0) {
+ return (synctex_is_s){default_value,SYNCTEX_STATUS_OK};
+ }
+ ptr = SYNCTEX_CUR;
+ /* Comma separator required */
+ if (*ptr==',') {
+ int result;
+ ++ptr;
+ --zs.size;
+ if (zs.size==0) {
+ return (synctex_is_s){default_value,SYNCTEX_STATUS_NOT_OK};
+ }
+ result = (int)strtol(ptr, &end, 10);
+ if (end>ptr) {
+ SYNCTEX_CUR = end;
+ return (synctex_is_s){result,SYNCTEX_STATUS_OK};
+ }
+ return (synctex_is_s){default_value,SYNCTEX_STATUS_NOT_OK};
+ }
+ return (synctex_is_s){default_value,SYNCTEX_STATUS_OK};
+}
+/* Used when parsing the synctex file.
+ * Decode an integer for a v field.
+ * Try the _synctex_decode_int version and set the last v field scanned.
+ * If it does not succeed, tries to match an '=' sign,
+ * which is a shortcut for the last v field scanned.
+ */
+# define SYNCTEX_INPUT_COMEQUALS ",="
+static synctex_is_s _synctex_decode_int_v(synctex_scanner_p scanner) {
+ synctex_is_s is = _synctex_decode_int(scanner);
+ if (SYNCTEX_STATUS_OK == is.status) {
+ scanner->reader->lastv = is.integer;
+ return is;
+ }
+ is.status = _synctex_match_string(scanner,SYNCTEX_INPUT_COMEQUALS);
+ if (is.status<SYNCTEX_STATUS_OK) {
+ return is;
+ }
+ is.integer = scanner->reader->lastv;
+ return is;
+}
+
+/* The purpose of this function is to read a string.
+ * 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 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.
+ * If no string is parsed, * value_ref is undefined.
+ * The maximum length of a string that a scanner can decode is platform dependent, namely UINT_MAX.
+ * If you just want to blindly parse the file up to the end of the current line,
+ * use _synctex_next_line instead.
+ * On return, the scanner cursor is unchanged if a string could not be scanned or
+ * points to the terminating '\n' character otherwise. As a consequence,
+ * _synctex_next_line is necessary after.
+ * If either scanner or value_ref is NULL, it is considered as an error and
+ * SYNCTEX_STATUS_BAD_ARGUMENT is returned.
+ */
+static synctex_ss_s _synctex_decode_string(synctex_scanner_p scanner) {
+ char * end = NULL;
+ size_t len = 0;/* The number of bytes to copy */
+ size_t already_len = 0;
+ synctex_zs_s zs = {0,0};
+ char * string = NULL;
+ if (NULL == scanner) {
+ return (synctex_ss_s){NULL,SYNCTEX_STATUS_BAD_ARGUMENT};
+ }
+ /* The buffer must at least contain one character: the '\n' end of line marker */
+ if (SYNCTEX_CUR>=SYNCTEX_END) {
+more_characters:
+ zs = _synctex_buffer_get_available_size(scanner,1);
+ if (zs.status < SYNCTEX_STATUS_EOF) {
+ return (synctex_ss_s){NULL,zs.status};
+ } else if (0 == zs.size) {
+ return (synctex_ss_s){NULL,SYNCTEX_STATUS_EOF};
+ }
+ }
+ /* Now we are sure that there is at least one available character, either because
+ * SYNCTEX_CUR was already < SYNCTEX_END, or because the buffer has been properly filled. */
+ /* end will point to the next unparsed '\n' character in the file, when mapped to the buffer. */
+ end = SYNCTEX_CUR;
+ /* We scan all the characters up to the next '\n' */
+ while (end<SYNCTEX_END && *end != '\n') {
+ ++end;
+ }
+ /* OK, we found where to stop:
+ * either end == SYNCTEX_END
+ * or *end == '\n' */
+ len = end - SYNCTEX_CUR;
+ if (len<UINT_MAX-already_len) {
+ if ((string = realloc(string,len+already_len+1)) != NULL) {
+ if (memcpy(string+already_len,SYNCTEX_CUR,len)) {
+ already_len += len;
+ string[already_len]='\0'; /* Terminate the string */
+ SYNCTEX_CUR += len;/* Eventually advance to the terminating '\n' */
+ if (SYNCTEX_CUR==SYNCTEX_END) {
+ /* No \n found*/
+ goto more_characters;
+ }
+ /* trim the trailing whites */
+ len = already_len;
+ while (len>0) {
+ already_len = len--;
+ if (string[len]!=' ') {
+ break;
+ }
+ }
+ string[already_len] = '\0';
+ return (synctex_ss_s){string,SYNCTEX_STATUS_OK};
+ }
+ free(string);
+ _synctex_error("could not copy memory (1).");
+ return (synctex_ss_s){NULL,SYNCTEX_STATUS_ERROR};
+ }
+ }
+ _synctex_error("could not (re)allocate memory (1).");
+ return (synctex_ss_s){NULL,SYNCTEX_STATUS_ERROR};
+}
+
+/* Used when parsing the synctex file.
+ * Read an Input record.
+ * - parameter scanner: non NULL scanner
+ * - returns SYNCTEX_STATUS_OK on successful completions, others values otherwise.
+ */
+static synctex_ns_s __synctex_parse_new_input(synctex_scanner_p scanner) {
+ synctex_node_p input = NULL;
+ synctex_status_t status = SYNCTEX_STATUS_BAD_ARGUMENT;
+ synctex_zs_s zs = {0,0};
+ if (NULL == scanner) {
+ return (synctex_ns_s){NULL,status};
+ }
+ if ((status=_synctex_match_string(scanner,SYNCTEX_INPUT_MARK))<SYNCTEX_STATUS_OK) {
+ return (synctex_ns_s){NULL,status};
+ }
+ /* Create a node */
+ if (NULL == (input = _synctex_new_input(scanner))) {
+ _synctex_error("Could not create an input node.");
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+ }
+ /* Decode the tag */
+ if ((status=_synctex_data_decode_tag(input))<SYNCTEX_STATUS_OK) {
+ _synctex_error("Bad format of input node.");
+ synctex_node_free(input);
+ return (synctex_ns_s){NULL,status};
+ }
+ /* The next character is a field separator, we expect one character in the buffer. */
+ zs = _synctex_buffer_get_available_size(scanner, 1);
+ if (zs.status<=SYNCTEX_STATUS_ERROR) {
+ return (synctex_ns_s){NULL,status};
+ }
+ if (0 == zs.size) {
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_EOF};
+ }
+ /* We can now safely advance to the next character, stepping over the field separator. */
+ ++SYNCTEX_CUR;
+ --zs.size;
+ /* Then we scan the file name */
+ if ((status=_synctex_data_decode_name(input))<SYNCTEX_STATUS_OK) {
+ synctex_node_free(input);
+ _synctex_next_line(scanner);/* Ignore this whole line */
+ return (synctex_ns_s){NULL,status};
+ }
+ /* Prepend this input node to the input linked list of the scanner */
+ __synctex_tree_set_sibling(input,scanner->input);/* input has no parent */
+ scanner->input = input;
+# if SYNCTEX_VERBOSE
+ synctex_node_log(input);
+# endif
+ return (synctex_ns_s){input,_synctex_next_line(scanner)};/* read the line termination character, if any */
+}
+
+typedef synctex_is_s (*synctex_decoder_t)(synctex_scanner_p);
+
+/* Used when parsing the synctex file.
+ * Read one of the settings.
+ * On normal completion, returns SYNCTEX_STATUS_OK.
+ * On error, returns SYNCTEX_STATUS_ERROR.
+ * Both arguments must not be NULL.
+ * On return, the scanner points to the next character after the decoded object whatever it is.
+ * It is the responsibility of the caller to prepare the scanner for the next line.
+ */
+static synctex_status_t _synctex_scan_named(synctex_scanner_p scanner,const char * name) {
+ synctex_status_t status = 0;
+ if (NULL == scanner || NULL == name) {
+ return SYNCTEX_STATUS_BAD_ARGUMENT;
+ }
+not_found:
+ status = _synctex_match_string(scanner,name);
+ if (status<SYNCTEX_STATUS_NOT_OK) {
+ return status;
+ } else if (status == SYNCTEX_STATUS_NOT_OK) {
+ status = _synctex_next_line(scanner);
+ if (status<SYNCTEX_STATUS_OK) {
+ return status;
+ }
+ goto not_found;
+ }
+ return SYNCTEX_STATUS_OK;
+}
+
+/* Used when parsing the synctex file.
+ * Read the preamble.
+ */
+static synctex_status_t _synctex_scan_preamble(synctex_scanner_p scanner) {
+ synctex_status_t status = 0;
+ synctex_is_s is = {0,0};
+ synctex_ss_s ss = {NULL,0};
+ if (NULL == scanner) {
+ return SYNCTEX_STATUS_BAD_ARGUMENT;
+ }
+ status = _synctex_scan_named(scanner,"SyncTeX Version:");
+ if (status<SYNCTEX_STATUS_OK) {
+ return status;
+ }
+ is = _synctex_decode_int(scanner);
+ if (is.status<SYNCTEX_STATUS_OK) {
+ return is.status;
+ }
+ status = _synctex_next_line(scanner);
+ if (status<SYNCTEX_STATUS_OK) {
+ return status;
+ }
+ scanner->version = is.integer;
+ /* Read all the input records */
+ do {
+ status = __synctex_parse_new_input(scanner).status;
+ if (status<SYNCTEX_STATUS_NOT_OK) {
+ return status;
+ }
+ } while(status == SYNCTEX_STATUS_OK);
+ /* the loop exits when status == SYNCTEX_STATUS_NOT_OK */
+ /* Now read all the required settings. */
+ if ((status=_synctex_scan_named(scanner,"Output:"))<SYNCTEX_STATUS_OK) {
+ return status;
+ }
+ if ((ss=_synctex_decode_string(scanner)).status<SYNCTEX_STATUS_OK) {
+ return is.status;
+ }
+ if ((status=_synctex_next_line(scanner))<SYNCTEX_STATUS_OK) {
+ return status;
+ }
+ scanner->output_fmt = ss.string;
+ if ((status=_synctex_scan_named(scanner,"Magnification:"))<SYNCTEX_STATUS_OK) {
+ return status;
+ }
+ if ((is=_synctex_decode_int(scanner)).status<SYNCTEX_STATUS_OK) {
+ return is.status;
+ }
+ if ((status=_synctex_next_line(scanner))<SYNCTEX_STATUS_OK) {
+ return status;
+ }
+ scanner->pre_magnification = is.integer;
+ if ((status=_synctex_scan_named(scanner,"Unit:"))<SYNCTEX_STATUS_OK) {
+ return status;
+ }
+ if ((is=_synctex_decode_int(scanner)).status<SYNCTEX_STATUS_OK) {
+ return is.status;
+ }
+ if ((status=_synctex_next_line(scanner))<SYNCTEX_STATUS_OK) {
+ return status;
+ }
+ scanner->pre_unit = is.integer;
+ if ((status=_synctex_scan_named(scanner,"X Offset:"))<SYNCTEX_STATUS_OK) {
+ return status;
+ }
+ if ((is=_synctex_decode_int(scanner)).status<SYNCTEX_STATUS_OK) {
+ return is.status;
+ }
+ if ((status=_synctex_next_line(scanner))<SYNCTEX_STATUS_OK) {
+ return status;
+ }
+ scanner->pre_x_offset = is.integer;
+ if ((status=_synctex_scan_named(scanner,"Y Offset:"))<SYNCTEX_STATUS_OK) {
+ return status;
+ }
+ if ((is=_synctex_decode_int(scanner)).status<SYNCTEX_STATUS_OK) {
+ return is.status;
+ }
+ if ((status=_synctex_next_line(scanner))<SYNCTEX_STATUS_OK) {
+ return status;
+ }
+ scanner->pre_y_offset = is.integer;
+ return SYNCTEX_STATUS_OK;
+}
+
+/* parse a float with a dimension */
+static synctex_fs_s _synctex_scan_float_and_dimension(synctex_scanner_p scanner) {
+ synctex_fs_s fs = {0,0};
+ synctex_zs_s zs = {0,0};
+ char * endptr = NULL;
+#ifdef HAVE_SETLOCALE
+ char * loc = setlocale(LC_NUMERIC, NULL);
+#endif
+ if (NULL == scanner) {
+ return (synctex_fs_s){0,SYNCTEX_STATUS_BAD_ARGUMENT};
+ }
+ zs = _synctex_buffer_get_available_size(scanner, SYNCTEX_BUFFER_MIN_SIZE);
+ if (zs.status<SYNCTEX_STATUS_EOF) {
+ _synctex_error("Problem with float.");
+ return (synctex_fs_s){0,zs.status};
+ }
+#ifdef HAVE_SETLOCALE
+ setlocale(LC_NUMERIC, "C");
+#endif
+ fs.value = strtod(SYNCTEX_CUR,&endptr);
+#ifdef HAVE_SETLOCALE
+ setlocale(LC_NUMERIC, loc);
+#endif
+ if (endptr == SYNCTEX_CUR) {
+ _synctex_error("A float was expected.");
+ return (synctex_fs_s){0,SYNCTEX_STATUS_ERROR};
+ }
+ SYNCTEX_CUR = endptr;
+ if ((fs.status = _synctex_match_string(scanner,"in")) >= SYNCTEX_STATUS_OK) {
+ fs.value *= 72.27f*65536;
+ } else if (fs.status<SYNCTEX_STATUS_EOF) {
+ report_unit_error:
+ _synctex_error("problem with unit.");
+ return fs;
+ } else if ((fs.status = _synctex_match_string(scanner,"cm")) >= SYNCTEX_STATUS_OK) {
+ fs.value *= 72.27f*65536/2.54f;
+ } else if (fs.status<SYNCTEX_STATUS_EOF) {
+ goto report_unit_error;
+ } else if ((fs.status = _synctex_match_string(scanner,"mm")) >= SYNCTEX_STATUS_OK) {
+ fs.value *= 72.27f*65536/25.4f;
+ } else if (fs.status<SYNCTEX_STATUS_EOF) {
+ goto report_unit_error;
+ } else if ((fs.status = _synctex_match_string(scanner,"pt")) >= SYNCTEX_STATUS_OK) {
+ fs.value *= 65536.0f;
+ } else if (fs.status<SYNCTEX_STATUS_EOF) {
+ goto report_unit_error;
+ } else if ((fs.status = _synctex_match_string(scanner,"bp")) >= SYNCTEX_STATUS_OK) {
+ fs.value *= 72.27f/72*65536.0f;
+ } else if (fs.status<SYNCTEX_STATUS_EOF) {
+ goto report_unit_error;
+ } else if ((fs.status = _synctex_match_string(scanner,"pc")) >= SYNCTEX_STATUS_OK) {
+ fs.value *= 12.0*65536.0f;
+ } else if (fs.status<SYNCTEX_STATUS_EOF) {
+ goto report_unit_error;
+ } else if ((fs.status = _synctex_match_string(scanner,"sp")) >= SYNCTEX_STATUS_OK) {
+ fs.value *= 1.0f;
+ } else if (fs.status<SYNCTEX_STATUS_EOF) {
+ goto report_unit_error;
+ } else if ((fs.status = _synctex_match_string(scanner,"dd")) >= SYNCTEX_STATUS_OK) {
+ fs.value *= 1238.0f/1157*65536.0f;
+ } else if (fs.status<SYNCTEX_STATUS_EOF) {
+ goto report_unit_error;
+ } else if ((fs.status = _synctex_match_string(scanner,"cc")) >= SYNCTEX_STATUS_OK) {
+ fs.value *= 14856.0f/1157*65536;
+ } else if (fs.status<SYNCTEX_STATUS_EOF) {
+ goto report_unit_error;
+ } else if ((fs.status = _synctex_match_string(scanner,"nd")) >= SYNCTEX_STATUS_OK) {
+ fs.value *= 685.0f/642*65536;
+ } else if (fs.status<SYNCTEX_STATUS_EOF) {
+ goto report_unit_error;
+ } else if ((fs.status = _synctex_match_string(scanner,"nc")) >= SYNCTEX_STATUS_OK) {
+ fs.value *= 1370.0f/107*65536;
+ } else if (fs.status<SYNCTEX_STATUS_EOF) {
+ goto report_unit_error;
+ }
+ return fs;
+}
+
+/* parse the post scriptum
+ * SYNCTEX_STATUS_OK is returned on completion
+ * a negative error is returned otherwise */
+static synctex_status_t _synctex_scan_post_scriptum(synctex_scanner_p scanner) {
+ synctex_status_t status = 0;
+ synctex_fs_s fs = {0,0};
+ char * endptr = NULL;
+#ifdef HAVE_SETLOCALE
+ char * loc = setlocale(LC_NUMERIC, NULL);
+#endif
+ if (NULL == scanner) {
+ return SYNCTEX_STATUS_BAD_ARGUMENT;
+ }
+ /* Scan the file until a post scriptum line is found */
+post_scriptum_not_found:
+ status = _synctex_match_string(scanner,"Post scriptum:");
+ if (status<SYNCTEX_STATUS_NOT_OK) {
+ return status;
+ }
+ if (status == SYNCTEX_STATUS_NOT_OK) {
+ status = _synctex_next_line(scanner);
+ if (status<SYNCTEX_STATUS_EOF) {
+ return status;
+ } else if (status<SYNCTEX_STATUS_OK) {
+ return SYNCTEX_STATUS_OK;/* The EOF is found, we have properly scanned the file */
+ }
+ goto post_scriptum_not_found;
+ }
+ /* We found the name, advance to the next line. */
+next_line:
+ status = _synctex_next_line(scanner);
+ if (status<SYNCTEX_STATUS_EOF) {
+ return status;
+ } else if (status<SYNCTEX_STATUS_OK) {
+ return SYNCTEX_STATUS_OK;/* The EOF is found, we have properly scanned the file */
+ }
+ /* Scanning the information */
+ status = _synctex_match_string(scanner,"Magnification:");
+ if (status == SYNCTEX_STATUS_OK ) {
+#ifdef HAVE_SETLOCALE
+ setlocale(LC_NUMERIC, "C");
+#endif
+ scanner->unit = strtod(SYNCTEX_CUR,&endptr);
+#ifdef HAVE_SETLOCALE
+ setlocale(LC_NUMERIC, loc);
+#endif
+ if (endptr == SYNCTEX_CUR) {
+ _synctex_error("bad magnification in the post scriptum, a float was expected.");
+ return SYNCTEX_STATUS_ERROR;
+ }
+ if (scanner->unit<=0) {
+ _synctex_error("bad magnification in the post scriptum, a positive float was expected.");
+ return SYNCTEX_STATUS_ERROR;
+ }
+ SYNCTEX_CUR = endptr;
+ goto next_line;
+ }
+ if (status<SYNCTEX_STATUS_EOF){
+ report_record_problem:
+ _synctex_error("Problem reading the Post Scriptum records");
+ return status; /* echo the error. */
+ }
+ status = _synctex_match_string(scanner,"X Offset:");
+ if (status == SYNCTEX_STATUS_OK) {
+ fs = _synctex_scan_float_and_dimension(scanner);
+ if (fs.status<SYNCTEX_STATUS_OK) {
+ _synctex_error("Problem with X offset in the Post Scriptum.");
+ return fs.status;
+ }
+ scanner->x_offset = fs.value;
+ goto next_line;
+ } else if (status<SYNCTEX_STATUS_EOF){
+ goto report_record_problem;
+ }
+ status = _synctex_match_string(scanner,"Y Offset:");
+ if (status==SYNCTEX_STATUS_OK) {
+ fs = _synctex_scan_float_and_dimension(scanner);
+ if (fs.status<SYNCTEX_STATUS_OK) {
+ _synctex_error("Problem with Y offset in the Post Scriptum.");
+ return fs.status;
+ }
+ scanner->x_offset = fs.value;
+ goto next_line;
+ } else if (status<SYNCTEX_STATUS_EOF){
+ goto report_record_problem;
+ }
+ goto next_line;
+}
+
+/* SYNCTEX_STATUS_OK is returned if the postamble is read
+ * SYNCTEX_STATUS_NOT_OK is returned if the postamble is not at the current location
+ * a negative error otherwise
+ * The postamble comprises the post scriptum section.
+ */
+static synctex_status_t _synctex_scan_postamble(synctex_scanner_p scanner) {
+ synctex_status_t status = 0;
+ synctex_is_s is = {0,0};
+ if (NULL == scanner) {
+ return SYNCTEX_STATUS_BAD_ARGUMENT;
+ }
+ if (!scanner->flags.postamble && (status=_synctex_match_string(scanner,"Postamble:"))<SYNCTEX_STATUS_OK) {
+ return status;
+ }
+count_again:
+ if ((status=_synctex_next_line(scanner))<SYNCTEX_STATUS_OK) {
+ return status;
+ }
+ if ((status=_synctex_scan_named(scanner,"Count:"))< SYNCTEX_STATUS_EOF) {
+ return status; /* forward the error */
+ } else if (status < SYNCTEX_STATUS_OK) { /* No Count record found */
+ goto count_again;
+ }
+ if ((is=_synctex_decode_int(scanner)).status<SYNCTEX_STATUS_OK) {
+ return is.status;
+ }
+ if ((status=_synctex_next_line(scanner))<SYNCTEX_STATUS_OK) {
+ return status;
+ }
+ scanner->count = is.integer;
+ /* Now we scan the last part of the SyncTeX file: the Post Scriptum section. */
+ return _synctex_scan_post_scriptum(scanner);
+}
+
+/* Horizontal boxes also have visible size.
+ * Visible size are bigger than real size.
+ * For example 0 width boxes may contain text.
+ * At creation time, the visible size is set to the values of the real size.
+ */
+static synctex_status_t _synctex_setup_visible_hbox(synctex_node_p box) {
+ if (box) {
+ switch(synctex_node_type(box)) {
+ case synctex_node_type_hbox:
+ _synctex_data_set_h_V(box,_synctex_data_h(box));
+ _synctex_data_set_v_V(box,_synctex_data_v(box));
+ _synctex_data_set_width_V(box,_synctex_data_width(box));
+ _synctex_data_set_height_V(box,_synctex_data_height(box));
+ _synctex_data_set_depth_V(box,_synctex_data_depth(box));
+ return SYNCTEX_STATUS_OK;
+ default:
+ break;
+ }
+ }
+ return SYNCTEX_STATUS_BAD_ARGUMENT;
+}
+
+/* This method is sent to an horizontal box to setup the visible size
+ * Some box have 0 width but do contain text material.
+ * With this method, one can enlarge the box to contain the given point (h,v).
+ */
+static synctex_status_t _synctex_make_hbox_contain_point(synctex_node_p node,synctex_point_s point) {
+ int min, max, n;
+ if (NULL == node || synctex_node_type(node) != synctex_node_type_hbox) {
+ return SYNCTEX_STATUS_BAD_ARGUMENT;
+ }
+ if ((n = _synctex_data_width_V(node))<0) {
+ max = _synctex_data_h_V(node);
+ min = max+n;
+ if (point.h<min) {
+ _synctex_data_set_width_V(node,point.h-max);
+ } else if (point.h>max) {
+ _synctex_data_set_h_V(node,point.h);
+ _synctex_data_set_width_V(node,min-point.h);
+ }
+ } else {
+ min = _synctex_data_h_V(node);
+ max = min+n;
+ if (point.h<min) {
+ _synctex_data_set_h_V(node,point.h);
+ _synctex_data_set_width_V(node,max - point.h);
+ } else if (point.h>max) {
+ _synctex_data_set_width_V(node,point.h - min);
+ }
+ }
+ n = _synctex_data_v_V(node);
+ min = n - _synctex_data_height_V(node);
+ max = n + _synctex_data_depth_V(node);
+ if (point.v<min) {
+ _synctex_data_set_height_V(node,n-point.v);
+ } else if (point.v>max) {
+ _synctex_data_set_depth_V(node,point.v-n);
+ }
+ return SYNCTEX_STATUS_OK;
+}
+static synctex_status_t _synctex_make_hbox_contain_box(synctex_node_p node,synctex_box_s box) {
+ int min, max, n;
+ if (NULL == node || synctex_node_type(node) != synctex_node_type_hbox) {
+ return SYNCTEX_STATUS_BAD_ARGUMENT;
+ }
+ if ((n = _synctex_data_width_V(node))<0) {
+ max = _synctex_data_h_V(node);
+ min = max+n;
+ if (box.min.h <min) {
+ _synctex_data_set_width_V(node,box.min.h-max);
+ } else if (box.max.h>max) {
+ _synctex_data_set_h_V(node,box.max.h);
+ _synctex_data_set_width_V(node,min-box.max.h);
+ }
+ } else {
+ min = _synctex_data_h_V(node);
+ max = min+n;
+ if (box.min.h<min) {
+ _synctex_data_set_h_V(node,box.min.h);
+ _synctex_data_set_width_V(node,max - box.min.h);
+ } else if (box.max.h>max) {
+ _synctex_data_set_width_V(node,box.max.h - min);
+ }
+ }
+ n = _synctex_data_v_V(node);
+ min = n - _synctex_data_height_V(node);
+ max = n + _synctex_data_depth_V(node);
+ if (box.min.v<min) {
+ _synctex_data_set_height_V(node,n-box.min.v);
+ } else if (box.max.v>max) {
+ _synctex_data_set_depth_V(node,box.max.v-n);
+ }
+ return SYNCTEX_STATUS_OK;
+}
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark SPECIAL CHARACTERS
+# endif
+
+
+/* Here are the control characters that strat each line of the synctex output file.
+ * Their values define the meaning of the line.
+ */
+# define SYNCTEX_CHAR_BEGIN_SHEET '{'
+# define SYNCTEX_CHAR_END_SHEET '}'
+# define SYNCTEX_CHAR_BEGIN_FORM '<'
+# define SYNCTEX_CHAR_END_FORM '>'
+# define SYNCTEX_CHAR_BEGIN_VBOX '['
+# define SYNCTEX_CHAR_END_VBOX ']'
+# define SYNCTEX_CHAR_BEGIN_HBOX '('
+# define SYNCTEX_CHAR_END_HBOX ')'
+# define SYNCTEX_CHAR_ANCHOR '!'
+# define SYNCTEX_CHAR_VOID_VBOX 'v'
+# define SYNCTEX_CHAR_VOID_HBOX 'h'
+# define SYNCTEX_CHAR_KERN 'k'
+# define SYNCTEX_CHAR_GLUE 'g'
+# define SYNCTEX_CHAR_RULE 'r'
+# define SYNCTEX_CHAR_MATH '$'
+# define SYNCTEX_CHAR_FORM_REF 'f'
+# define SYNCTEX_CHAR_BOUNDARY 'x'
+# define SYNCTEX_CHAR_CHARACTER 'c'
+# define SYNCTEX_CHAR_COMMENT '%'
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark SCANNERS & PARSERS
+# endif
+
+# define SYNCTEX_DECODE_FAILED(NODE,WHAT) \
+(_synctex_data_decode_##WHAT(NODE)<SYNCTEX_STATUS_OK)
+# define SYNCTEX_DECODE_FAILED_V(NODE,WHAT) \
+(_synctex_data_decode_##WHAT##_v(NODE)<SYNCTEX_STATUS_OK)
+
+#define SYNCTEX_NS_NULL (synctex_ns_s){NULL,SYNCTEX_STATUS_NOT_OK}
+static synctex_ns_s _synctex_parse_new_sheet(synctex_scanner_p scanner) {
+ synctex_node_p node;
+ if ((node = _synctex_new_sheet(scanner))) {
+ if (
+ SYNCTEX_DECODE_FAILED(node,page)) {
+ _synctex_error("Bad sheet record.");
+ } else if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Missing end of sheet.");
+ } else {
+ /* Now set the owner */
+ if (scanner->sheet) {
+ synctex_node_p last_sheet = scanner->sheet;
+ synctex_node_p next_sheet = NULL;
+ while ((next_sheet = __synctex_tree_sibling(last_sheet))) {
+ last_sheet = next_sheet;
+ }
+ /* sheets have no parent */
+ __synctex_tree_set_sibling(last_sheet,node);
+ } else {
+ scanner->sheet = node;
+ }
+ return (synctex_ns_s){node,SYNCTEX_STATUS_OK};
+ }
+ _synctex_free_node(node);
+ }
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+}
+/**
+ * - requirement: scanner != NULL
+ */
+static synctex_ns_s _synctex_parse_new_form(synctex_scanner_p scanner) {
+ synctex_node_p node;
+ if ((node = _synctex_new_form(scanner))) {
+ if (
+ SYNCTEX_DECODE_FAILED(node,tag)) {
+ _synctex_error("Bad sheet record.");
+ } else if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Missing end of form.");
+ } else {
+ /* Now set the owner */
+ if (scanner->form) {
+ synctex_node_p last_form = scanner->form;
+ synctex_node_p next_form = NULL;
+ while ((next_form = __synctex_tree_sibling(last_form))) {
+ last_form = next_form;
+ }
+ __synctex_tree_set_sibling(last_form,node);
+ } else {
+ scanner->form = node;
+ }
+ return (synctex_ns_s){node,SYNCTEX_STATUS_OK};
+ }
+ _synctex_free_node(node);
+ }
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+}
+# define SYNCTEX_SHOULD_DECODE_FAILED(NODE,WHAT) \
+(_synctex_data_has_##WHAT(NODE) &&(_synctex_data_decode_##WHAT(NODE)<SYNCTEX_STATUS_OK))
+# define SYNCTEX_SHOULD_DECODE_FAILED_V(NODE,WHAT) \
+(_synctex_data_has_##WHAT(NODE) &&(_synctex_data_decode_##WHAT##_v(NODE)<SYNCTEX_STATUS_OK))
+
+static synctex_status_t _synctex_data_decode_tlchvwhd(synctex_node_p node) {
+ return SYNCTEX_SHOULD_DECODE_FAILED(node,tag)
+ || SYNCTEX_SHOULD_DECODE_FAILED(node,line)
+ || SYNCTEX_SHOULD_DECODE_FAILED(node,column)
+ || SYNCTEX_SHOULD_DECODE_FAILED(node,h)
+ || SYNCTEX_SHOULD_DECODE_FAILED_V(node,v)
+ || SYNCTEX_SHOULD_DECODE_FAILED(node,width)
+ || SYNCTEX_SHOULD_DECODE_FAILED(node,height)
+ || SYNCTEX_SHOULD_DECODE_FAILED(node,depth);
+}
+static synctex_ns_s _synctex_parse_new_vbox(synctex_scanner_p scanner) {
+ synctex_node_p node;
+ if ((node = _synctex_new_vbox(scanner))) {
+ if (_synctex_data_decode_tlchvwhd(node)) {
+ _synctex_error("Bad vbox record.");
+ _synctex_next_line(scanner);
+ out:
+ _synctex_free_node(node);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+ }
+ if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Missing end of vbox.");
+ goto out;
+ }
+ return (synctex_ns_s){node,SYNCTEX_STATUS_OK};
+ }
+ _synctex_next_line(scanner);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+}
+SYNCTEX_INLINE static synctex_node_p __synctex_node_make_friend_tlc(synctex_node_p node);
+static synctex_ns_s _synctex_parse_new_hbox(synctex_scanner_p scanner) {
+ synctex_node_p node;
+ if ((node = _synctex_new_hbox(scanner))) {
+ if (_synctex_data_decode_tlchvwhd(node)) {
+ _synctex_error("Bad hbox record.");
+ _synctex_next_line(scanner);
+ out:
+ _synctex_free_node(node);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+ }
+ if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Missing end of hbox.");
+ goto out;
+ }
+ if (_synctex_setup_visible_hbox(node)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Unexpected error (_synctex_parse_new_hbox).");
+ goto out;
+ }
+ return (synctex_ns_s){node,SYNCTEX_STATUS_OK};
+ }
+ _synctex_next_line(scanner);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+}
+static synctex_ns_s _synctex_parse_new_void_vbox(synctex_scanner_p scanner) {
+ synctex_node_p node;
+ if ((node = _synctex_new_void_vbox(scanner))) {
+ if (_synctex_data_decode_tlchvwhd(node)) {
+ _synctex_error("Bad void vbox record.");
+ _synctex_next_line(scanner);
+ out:
+ _synctex_free_node(node);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+ }
+ if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Missing end of container.");
+ goto out;
+ }
+ return (synctex_ns_s){node,SYNCTEX_STATUS_OK};
+ }
+ _synctex_next_line(scanner);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+}
+static synctex_ns_s _synctex_parse_new_void_hbox(synctex_scanner_p scanner) {
+ synctex_node_p node;
+ if ((node = _synctex_new_void_hbox(scanner))) {
+ if (_synctex_data_decode_tlchvwhd(node)) {
+ _synctex_error("Bad void hbox record.");
+ _synctex_next_line(scanner);
+ out:
+ _synctex_free_node(node);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+ }
+ if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Missing end of container.");
+ goto out;
+ }
+ return (synctex_ns_s){node,SYNCTEX_STATUS_OK};
+ }
+ _synctex_next_line(scanner);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+}
+static synctex_ns_s _synctex_parse_new_kern(synctex_scanner_p scanner) {
+ synctex_node_p node;
+ if ((node = _synctex_new_kern(scanner))) {
+ if (_synctex_data_decode_tlchvwhd(node)) {
+ _synctex_error("Bad kern record.");
+ _synctex_next_line(scanner);
+ out:
+ _synctex_free_node(node);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+ }
+ if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Missing end of container.");
+ goto out;
+ }
+ return (synctex_ns_s){node,SYNCTEX_STATUS_OK};
+ }
+ _synctex_next_line(scanner);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+}
+static synctex_ns_s _synctex_parse_new_glue(synctex_scanner_p scanner) {
+ synctex_node_p node;
+ if ((node = _synctex_new_glue(scanner))) {
+ if (_synctex_data_decode_tlchvwhd(node)) {
+ _synctex_error("Bad glue record.");
+ _synctex_next_line(scanner);
+ out:
+ _synctex_free_node(node);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+ }
+ if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Missing end of container.");
+ goto out;
+ }
+ return (synctex_ns_s){node,SYNCTEX_STATUS_OK};
+ }
+ _synctex_next_line(scanner);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+}
+static synctex_ns_s _synctex_parse_new_rule(synctex_scanner_p scanner) {
+ synctex_node_p node;
+ if ((node = _synctex_new_rule(scanner))) {
+ if (_synctex_data_decode_tlchvwhd(node)) {
+ _synctex_error("Bad rule record.");
+ _synctex_next_line(scanner);
+ out:
+ _synctex_free_node(node);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+ }
+ if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Missing end of container.");
+ goto out;
+ }
+ return (synctex_ns_s){node,SYNCTEX_STATUS_OK};
+ }
+ _synctex_next_line(scanner);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+}
+static synctex_ns_s _synctex_parse_new_math(synctex_scanner_p scanner) {
+ synctex_node_p node;
+ if ((node = _synctex_new_math(scanner))) {
+ if (_synctex_data_decode_tlchvwhd(node)) {
+ _synctex_error("Bad math record.");
+ _synctex_next_line(scanner);
+ out:
+ _synctex_free_node(node);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+ }
+ if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Missing end of container.");
+ goto out;
+ }
+ return (synctex_ns_s){node,SYNCTEX_STATUS_OK};
+ }
+ _synctex_next_line(scanner);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+}
+static synctex_ns_s _synctex_parse_new_boundary(synctex_scanner_p scanner) {
+ synctex_node_p node;
+ if ((node = _synctex_new_boundary(scanner))) {
+ if (_synctex_data_decode_tlchvwhd(node)) {
+ _synctex_error("Bad boundary record.");
+ _synctex_next_line(scanner);
+ out:
+ _synctex_free_node(node);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+ }
+ if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Missing end of container.");
+ goto out;
+ }
+ return (synctex_ns_s){node,SYNCTEX_STATUS_OK};
+ }
+ _synctex_next_line(scanner);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+}
+SYNCTEX_INLINE static synctex_ns_s _synctex_parse_new_ref(synctex_scanner_p scanner) {
+ synctex_node_p node;
+ if ((node = _synctex_new_ref(scanner))) {
+ if (SYNCTEX_DECODE_FAILED(node,tag)
+ || SYNCTEX_DECODE_FAILED(node,h)
+ || SYNCTEX_DECODE_FAILED_V(node,v)) {
+ _synctex_error("Bad form ref record.");
+ _synctex_next_line(scanner);
+ out:
+ _synctex_free_node(node);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+ }
+ if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Missing end of container.");
+ goto out;
+ }
+ return (synctex_ns_s){node,SYNCTEX_STATUS_OK};
+ }
+ _synctex_next_line(scanner);
+ return (synctex_ns_s){NULL,SYNCTEX_STATUS_ERROR};
+}
+# undef SYNCTEX_DECODE_FAILED
+# undef SYNCTEX_DECODE_FAILED_V
+
+SYNCTEX_INLINE static synctex_point_s _synctex_data_point(synctex_node_p node);
+SYNCTEX_INLINE static synctex_point_s _synctex_data_point_V(synctex_node_p node);
+SYNCTEX_INLINE static synctex_point_s _synctex_data_set_point(synctex_node_p node, synctex_point_s point);
+SYNCTEX_INLINE static synctex_box_s _synctex_data_box(synctex_node_p node);
+SYNCTEX_INLINE static synctex_box_s _synctex_data_xob(synctex_node_p node);
+SYNCTEX_INLINE static synctex_box_s _synctex_data_box_V(synctex_node_p node);
+
+SYNCTEX_INLINE static synctex_node_p _synctex_input_register_line(synctex_node_p input,synctex_node_p node) {
+ if (node && _synctex_data_tag(input) != _synctex_data_tag(node)) {
+ input = synctex_scanner_input_with_tag(node->class_->scanner,_synctex_data_tag(node));
+ }
+ if (_synctex_data_line(node)>_synctex_data_line(input)) {
+ _synctex_data_set_line(input,_synctex_data_line(node));
+ }
+ return input;
+}
+/**
+ * Free node and its siblings and return its detached child.
+ */
+SYNCTEX_INLINE static synctex_node_p _synctex_handle_pop_child(synctex_node_p handle) {
+ synctex_node_p child = _synctex_tree_reset_child(handle);
+ synctex_node_free(handle);
+ return child;
+}
+/**
+ * Set the tlc of all the x nodes that are targets of
+ * x_handle and its sibling.
+ * Reset the target of x_handle and deletes its siblings.
+ * child is a node that has just been parsed and is not a boundary node.
+ */
+SYNCTEX_INLINE static void _synctex_handle_set_tlc(synctex_node_p x_handle, synctex_node_p child, synctex_bool_t make_friend) {
+ if (x_handle) {
+ synctex_node_p sibling = x_handle;
+ if (child) {
+ synctex_node_p target;
+ while ((target = synctex_node_target(sibling))) {
+ _synctex_data_set_tlc(target,child);
+ if (make_friend) {
+ _synctex_node_make_friend_tlc(target);
+ }
+ if ((sibling = __synctex_tree_sibling(sibling))) {
+ continue;
+ } else {
+ break;
+ }
+ }
+ }
+ _synctex_tree_reset_target(x_handle);
+ sibling = __synctex_tree_reset_sibling(x_handle);
+ synctex_node_free(sibling);
+ }
+}
+/**
+ * When we have parsed a box, we must register
+ * all the contained heading boundary nodes
+ * that have not yet been registered.
+ * Those handles will be deleted when poping.
+ */
+SYNCTEX_INLINE static void _synctex_handle_make_friend_tlc(synctex_node_p node) {
+ while (node) {
+ synctex_node_p target = _synctex_tree_reset_target(node);
+ _synctex_node_make_friend_tlc(target);
+ node = __synctex_tree_sibling(node);
+ }
+}
+/**
+ * Scan sheets, forms and input records.
+ * - parameter scanner: owning scanner
+ * - returns: status
+ */
+static synctex_status_t __synctex_parse_sfi(synctex_scanner_p scanner) {
+ synctex_status_t status = SYNCTEX_STATUS_OK;
+ synctex_zs_s zs = {0,0};
+ synctex_ns_s input = SYNCTEX_NS_NULL;
+ synctex_node_p sheet = NULL;
+ synctex_node_p form = NULL;
+ synctex_node_p parent = NULL;
+ synctex_node_p child = NULL;
+ /*
+ * Experimentations lead to the forthcoming conclusion:
+ * Sometimes, the first nodes of a box have the wrong line number.
+ * These are only boundary (x) nodes.
+ * We observed that boundary nodes do have the proper line number
+ * if they follow a node with a different type.
+ * We keep track of these leading x nodes in a handle tree.
+ */
+ synctex_node_p x_handle = NULL;
+# define SYNCTEX_RETURN(STATUS) \
+ synctex_node_free(x_handle);\
+ return STATUS
+ synctex_node_p last_k = NULL;
+ synctex_node_p last_g = NULL;
+ synctex_ns_s ns = SYNCTEX_NS_NULL;
+ int form_depth = 0;
+ int ignored_form_depth = 0;
+ synctex_bool_t try_input = synctex_YES;
+ if (!(x_handle = _synctex_new_handle(scanner))) {
+ SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR);
+ }
+# ifdef SYNCTEX_NOTHING
+# pragma mark MAIN LOOP
+# endif
+main_loop:
+ status = SYNCTEX_STATUS_OK;
+ sheet = form = parent = child = NULL;
+# define SYNCTEX_START_SCAN(WHAT)\
+(*SYNCTEX_CUR == SYNCTEX_CHAR_##WHAT)
+ if (SYNCTEX_CUR<SYNCTEX_END) {
+ if (SYNCTEX_START_SCAN(BEGIN_FORM)) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN FORM
+# endif
+ scan_form:
+ ns = _synctex_parse_new_form(scanner);
+ if (ns.status == SYNCTEX_STATUS_OK) {
+ ++form_depth;
+ if (_synctex_tree_parent(form)) {
+ /* This form is already being parsed */
+ ++ignored_form_depth;
+ goto ignore_loop;
+ }
+ _synctex_tree_set_parent(ns.node,form);
+ form = ns.node;
+ parent = form;
+ child = NULL;
+ last_k = last_g = NULL;
+ goto content_loop;
+ }
+ if (form || sheet) {
+ last_k = last_g = NULL;
+ goto content_loop;
+ }
+ try_input = synctex_YES;
+ goto main_loop;
+ } else if (SYNCTEX_START_SCAN(BEGIN_SHEET)) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN SHEET
+# endif
+ try_input = synctex_YES;
+ ns = _synctex_parse_new_sheet(scanner);
+ if (ns.status == SYNCTEX_STATUS_OK) {
+ sheet = ns.node;
+ parent = sheet;
+ last_k = last_g = NULL;
+ goto content_loop;
+ }
+ goto main_loop;
+ } else if (SYNCTEX_START_SCAN(ANCHOR)) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN ANCHOR
+# endif
+ scan_anchor:
+ ++SYNCTEX_CUR;
+ if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Missing anchor.");
+ SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR);
+ }
+ if (form || sheet) {
+ last_k = last_g = NULL;
+ goto content_loop;
+ }
+ try_input = synctex_YES;
+ goto main_loop;
+ } else if (SYNCTEX_START_SCAN(ANCHOR)) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN COMMENT
+# endif
+ ++SYNCTEX_CUR;
+ _synctex_next_line(scanner);
+ try_input = synctex_YES;
+ goto main_loop;
+ } else if (try_input) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN INPUT
+# endif
+ try_input = synctex_NO;
+ do {
+ input = __synctex_parse_new_input(scanner);
+ } while (input.status == SYNCTEX_STATUS_OK);
+ goto main_loop;
+ }
+ status = _synctex_match_string(scanner,"Postamble:");
+ if (status==SYNCTEX_STATUS_OK) {
+ scanner->flags.postamble = 1;
+ SYNCTEX_RETURN(status);
+ }
+ status = _synctex_next_line(scanner);
+ if (status<SYNCTEX_STATUS_OK) {
+ SYNCTEX_RETURN(status);
+ }
+ }
+ /* At least 1 more character */
+ zs = _synctex_buffer_get_available_size(scanner,1);
+ if (zs.size == 0){
+ _synctex_error("Incomplete synctex file, postamble missing.");
+ SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR);
+ }
+ goto main_loop;
+ /* Unreachable. */
+# ifdef SYNCTEX_NOTHING
+# pragma mark IGNORE LOOP
+# endif
+ignore_loop:
+ ns = SYNCTEX_NS_NULL;
+ if (SYNCTEX_CUR<SYNCTEX_END) {
+ if (SYNCTEX_START_SCAN(BEGIN_FORM)) {
+ ++ignored_form_depth;
+ } else if (SYNCTEX_START_SCAN(END_FORM)) {
+ --ignored_form_depth;
+ }
+ if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Incomplete container.");
+ SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR);
+ }
+ } else {
+ zs = _synctex_buffer_get_available_size(scanner,1);
+ if (zs.size == 0){
+ _synctex_error("Incomplete synctex file, postamble missing.");
+ SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR);
+ }
+ }
+ if (ignored_form_depth) {
+ goto ignore_loop;
+ } else {
+ last_k = last_g = NULL;
+ goto content_loop;
+ }
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark CONTENT LOOP
+# endif
+content_loop:
+ /* Either in a form, a sheet or a box.
+ * - in a sheet, "{" is not possible, only boxes and "}" at top level.
+ * - in a form, "{" is not possible, only boxes, "<" and ">" at top level.
+ * - in a box, the unique possibility is '<', '[', '(' or ">".
+ * We still keep the '(' for a sheet, because that dos not cost too much.
+ * We must also consider void boxes as children.
+ */
+ /* forms are everywhere */
+ ns = SYNCTEX_NS_NULL;
+#if SYNCTEX_VERBOSE
+ synctex_scanner_set_display_switcher(scanner,-1);
+ printf("NEW CONTENT LOOP\n");
+#if SYNCTEX_DEBUG>500
+ synctex_node_display(sheet);
+#endif
+#endif
+ if (SYNCTEX_CUR<SYNCTEX_END) {
+ if (SYNCTEX_START_SCAN(BEGIN_FORM)) {
+ goto scan_form;
+ } else if (SYNCTEX_START_SCAN(BEGIN_VBOX)) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN VBOX
+# endif
+ ns = _synctex_parse_new_vbox(scanner);
+ if (ns.status == SYNCTEX_STATUS_OK) {
+ x_handle = _synctex_new_handle_with_child(x_handle);
+ if (child) {
+ _synctex_node_set_sibling(child,ns.node);
+ } else {
+ _synctex_node_set_child(parent,ns.node);
+ }
+ parent = ns.node;
+ child = _synctex_tree_last(parent);
+# if SYNCTEX_VERBOSE
+ synctex_node_log(parent);
+# endif
+ input.node = _synctex_input_register_line(input.node,parent);
+ last_k = last_g = NULL;
+ goto content_loop;
+ }
+ } else if (SYNCTEX_START_SCAN(END_VBOX)) {
+ if (synctex_node_type(parent) == synctex_node_type_vbox) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN XOBV
+# endif
+ ++SYNCTEX_CUR;
+ if (NULL == _synctex_tree_child(parent) && !form) {
+ /* only void v boxes are friends */
+ _synctex_node_make_friend_tlc(parent);
+ }
+ child = parent;
+ parent = _synctex_tree_parent(child);
+ if (!form) {
+ _synctex_handle_make_friend_tlc(x_handle);
+ }
+ x_handle = _synctex_handle_pop_child(x_handle);
+ _synctex_handle_set_tlc(x_handle,child,!form);
+# if SYNCTEX_VERBOSE
+ synctex_node_log(child);
+# endif
+ if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Incomplete container.");
+ SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR);
+ }
+ last_k = last_g = NULL;
+ goto content_loop;
+ }
+ } else if (SYNCTEX_START_SCAN(BEGIN_HBOX)) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN HBOX
+# endif
+# if defined(SYNCTEX_USE_CHARINDEX)
+ synctex_charindex_t char_index = (synctex_charindex_t)(scanner->reader->charindex_offset+SYNCTEX_CUR-SYNCTEX_START);
+ synctex_lineindex_t line_index = scanner->reader->line_number;
+# endif
+ ns = _synctex_parse_new_hbox(scanner);
+ if (ns.status == SYNCTEX_STATUS_OK) {
+ x_handle = _synctex_new_handle_with_child(x_handle);
+ if (child) {
+ _synctex_node_set_sibling(child,ns.node);
+ } else {
+ _synctex_node_set_child(parent,ns.node);
+ }
+ parent = ns.node;
+ /* add a box boundary node at the start */
+ if ((child = _synctex_new_box_bdry(scanner))) {
+# if defined(SYNCTEX_USE_CHARINDEX)
+ child->line_index=line_index;
+ child->char_index=char_index;
+# endif
+ _synctex_node_set_child(parent,child);
+ _synctex_data_set_tlchv(child,parent);
+ if (!form) {
+ __synctex_node_make_friend_tlc(child);
+ }
+ } else {
+ _synctex_error("Can't create box bdry record.");
+ }
+# if SYNCTEX_VERBOSE
+ synctex_node_log(parent);
+# endif
+ input.node = _synctex_input_register_line(input.node,parent);
+ last_k = last_g = NULL;
+ goto content_loop;
+ }
+ } else if (SYNCTEX_START_SCAN(END_HBOX)) {
+ if (synctex_node_type(parent) == synctex_node_type_hbox) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN XOBH
+# endif
+ ++SYNCTEX_CUR;
+ /* setting the next horizontal box at the end ensures
+ * that a child is recorded before any of its ancestors.
+ */
+ if (form == NULL /* && sheet != NULL*/ ) {
+ _synctex_tree_set_next_hbox(parent,_synctex_tree_next_hbox(sheet));
+ _synctex_tree_set_next_hbox(sheet,parent);
+ }
+ {
+ /* Update the mean line number */
+ synctex_node_p node = _synctex_tree_child(parent);
+ synctex_node_p sibling = NULL;
+ /* Ignore the first node (a box_bdry) */
+ if (node && (sibling = __synctex_tree_sibling(node))) {
+ unsigned int node_weight = 0;
+ unsigned int cumulated_line_numbers = 0;
+ _synctex_data_set_line(node, _synctex_data_line(sibling));
+ node = sibling;
+ do {
+ if (synctex_node_type(node)==synctex_node_type_hbox) {
+ if (_synctex_data_weight(node)) {
+ node_weight += _synctex_data_weight(node);
+ cumulated_line_numbers += _synctex_data_mean_line(node)*_synctex_data_weight(node);
+ } else {
+ ++node_weight;
+ cumulated_line_numbers += _synctex_data_mean_line(node);
+ }
+ } else {
+ ++node_weight;
+ cumulated_line_numbers += synctex_node_line(node);
+ }
+ } while ((node = __synctex_tree_sibling(node)));
+ _synctex_data_set_mean_line(parent,(cumulated_line_numbers + node_weight/2)/node_weight);
+ _synctex_data_set_weight(parent,node_weight);
+ } else {
+ _synctex_data_set_mean_line(parent,_synctex_data_line(parent));
+ _synctex_data_set_weight(parent,1);
+ }
+ if ((sibling = _synctex_new_box_bdry(scanner))) {
+# if defined(SYNCTEX_USE_CHARINDEX)
+ sibling->line_index=child->line_index;
+ sibling->char_index=child->char_index;
+# endif
+ _synctex_node_set_sibling(child,sibling);
+ {
+ synctex_node_p N = child;
+ while (synctex_node_type(N) == synctex_node_type_ref) {
+ N = _synctex_tree_arg_sibling(N);
+ }
+ _synctex_data_set_tlc(sibling,N);
+ }
+ _synctex_data_set_h(sibling,_synctex_data_h_V(parent)+_synctex_data_width_V(parent));
+ _synctex_data_set_v(sibling,_synctex_data_v_V(parent));
+ child = sibling;
+ } else {
+ _synctex_error("Can't create box bdry record.");
+ }
+ sibling = _synctex_tree_child(parent);
+ _synctex_data_set_point(sibling,_synctex_data_point_V(parent));
+ if (last_k && last_g && (child = synctex_node_child(parent))) {
+ /* Find the node preceding last_k */
+ synctex_node_p next;
+ while ((next = __synctex_tree_sibling(child))) {
+ if (next == last_k) {
+ _synctex_data_set_tlc(last_k,child);
+ _synctex_data_set_tlc(last_g,child);
+ break;
+ }
+ child = next;
+ }
+ }
+ child = parent;
+ parent = _synctex_tree_parent(child);
+ if (!form) {
+ _synctex_handle_make_friend_tlc(x_handle);
+ }
+ x_handle = _synctex_handle_pop_child(x_handle);
+ _synctex_handle_set_tlc(x_handle,child,!form);
+ _synctex_make_hbox_contain_box(parent, _synctex_data_box_V(child));
+# if SYNCTEX_VERBOSE
+ synctex_node_log(child);
+# endif
+ }
+ if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Incomplete container.");
+ SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR);
+ }
+ last_k = last_g = NULL;
+ goto content_loop;
+ }
+ } else if (SYNCTEX_START_SCAN(VOID_VBOX)) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN VOID VBOX
+# endif
+ ns = _synctex_parse_new_void_vbox(scanner);
+ if (ns.status == SYNCTEX_STATUS_OK) {
+ if (child) {
+ _synctex_node_set_sibling(child,ns.node);
+ } else {
+ _synctex_node_set_child(parent,ns.node);
+ }
+ child = ns.node;
+ _synctex_handle_set_tlc(x_handle, child,!form);
+# if SYNCTEX_VERBOSE
+ synctex_node_log(child);
+# endif
+ input.node = _synctex_input_register_line(input.node,child);
+ last_k = last_g = NULL;
+ goto content_loop;
+ }
+ } else if (SYNCTEX_START_SCAN(VOID_HBOX)) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN VOID HBOX
+# endif
+ ns = _synctex_parse_new_void_hbox(scanner);
+ if (ns.status == SYNCTEX_STATUS_OK) {
+ if (_synctex_data_width(ns.node)<0) {
+ printf("Negative width\n");
+ }
+ if (child) {
+ _synctex_node_set_sibling(child,ns.node);
+ } else {
+ _synctex_node_set_child(parent,ns.node);
+ }
+ child = ns.node;
+ _synctex_handle_set_tlc(x_handle, child,!form);
+ _synctex_make_hbox_contain_box(parent,_synctex_data_box(child));
+# if SYNCTEX_VERBOSE
+ synctex_node_log(child);
+# endif
+ input.node = _synctex_input_register_line(input.node,child);
+ last_k = last_g = NULL;
+ goto content_loop;
+ }
+ } else if (SYNCTEX_START_SCAN(KERN)) {
+# ifdef SYNCTEX_NOTHING
+# 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);
+ } else {
+ _synctex_node_set_child(parent,ns.node);
+ }
+ child = ns.node;
+ if (!form) {
+ __synctex_node_make_friend_tlc(child);
+ }
+ _synctex_handle_set_tlc(x_handle, child,!form);
+ _synctex_make_hbox_contain_box(parent,_synctex_data_xob(child));
+# if SYNCTEX_VERBOSE
+ synctex_node_log(child);
+# endif
+ input.node = _synctex_input_register_line(input.node,child);
+ last_k = child;
+ last_g = NULL;
+ goto content_loop;
+ }
+ } else if (SYNCTEX_START_SCAN(GLUE)) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN GLUE
+# endif
+ ns = _synctex_parse_new_glue(scanner);
+ if (ns.status == SYNCTEX_STATUS_OK) {
+ if (child) {
+ _synctex_node_set_sibling(child,ns.node);
+ } else {
+ _synctex_node_set_child(parent,ns.node);
+ }
+ child = ns.node;
+ if (!form) {
+ __synctex_node_make_friend_tlc(child);
+ }
+ _synctex_handle_set_tlc(x_handle, child,!form);
+ _synctex_make_hbox_contain_point(parent,_synctex_data_point(child));
+# if SYNCTEX_VERBOSE
+ synctex_node_log(child);
+# endif
+ input.node = _synctex_input_register_line(input.node,child);
+ if (last_k) {
+ last_g = child;
+ } else {
+ last_k = last_g = NULL;
+ }
+ goto content_loop;
+ }
+ } else if (SYNCTEX_START_SCAN(RULE)) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN RULE
+# endif
+ ns = _synctex_parse_new_rule(scanner);
+ if (ns.status == SYNCTEX_STATUS_OK) {
+ if (child) {
+ _synctex_node_set_sibling(child,ns.node);
+ } else {
+ _synctex_node_set_child(parent,ns.node);
+ }
+ child = ns.node;
+ if (!form) {
+ __synctex_node_make_friend_tlc(child);
+ }
+ _synctex_handle_set_tlc(x_handle, child,!form);
+ /* Rules are sometimes far too big
+_synctex_make_hbox_contain_box(parent,_synctex_data_box(child));
+ */
+# if SYNCTEX_VERBOSE
+ synctex_node_log(child);
+# endif
+ input.node = _synctex_input_register_line(input.node,child);
+ last_k = last_g = NULL;
+ goto content_loop;
+ }
+ } else if (SYNCTEX_START_SCAN(MATH)) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN MATH
+# endif
+ ns = _synctex_parse_new_math(scanner);
+ if (ns.status == SYNCTEX_STATUS_OK) {
+ if (child) {
+ _synctex_node_set_sibling(child,ns.node);
+ } else {
+ _synctex_node_set_child(parent,ns.node);
+ }
+ child = ns.node;
+ if (!form) {
+ __synctex_node_make_friend_tlc(child);
+ }
+ _synctex_handle_set_tlc(x_handle, child,!form);
+ _synctex_make_hbox_contain_point(parent,_synctex_data_point(child));
+# if SYNCTEX_VERBOSE
+ synctex_node_log(child);
+# endif
+ input.node = _synctex_input_register_line(input.node,child);
+ last_k = last_g = NULL;
+ goto content_loop;
+ }
+ } else if (SYNCTEX_START_SCAN(FORM_REF)) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN FORM REF
+# endif
+#if SYNCTEX_DEBUG>500
+ synctex_node_display(parent);
+ synctex_node_display(child);
+#endif
+ ns = _synctex_parse_new_ref(scanner);
+ if (ns.status == SYNCTEX_STATUS_OK) {
+ if (child) {
+ _synctex_node_set_sibling(child,ns.node);
+ } else {
+ _synctex_node_set_child(parent,ns.node);
+ }
+ child = ns.node;
+ if (form) {
+ if (scanner->ref_in_form) {
+ synctex_tree_set_friend(child,scanner->ref_in_form);
+ }
+ scanner->ref_in_form = child;
+ } else {
+ if (scanner->ref_in_sheet) {
+ synctex_tree_set_friend(child,scanner->ref_in_sheet);
+ }
+ scanner->ref_in_sheet = child;
+ }
+# if SYNCTEX_VERBOSE
+ synctex_node_log(child);
+# endif
+ last_k = last_g = NULL;
+ goto content_loop;
+ }
+ } else if (SYNCTEX_START_SCAN(BOUNDARY)) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN BOUNDARY
+# endif
+ ns = _synctex_parse_new_boundary(scanner);
+ if (ns.status == SYNCTEX_STATUS_OK) {
+ if (child) {
+ _synctex_node_set_sibling(child,ns.node);
+ } else {
+ _synctex_node_set_child(parent,ns.node);
+ }
+ if (synctex_node_type(child)==synctex_node_type_box_bdry
+ || _synctex_tree_target(x_handle)) {
+ child = _synctex_tree_reset_child(x_handle);
+ child = _synctex_new_handle_with_child(child);
+ __synctex_tree_set_sibling(child, x_handle);
+ x_handle = child;
+ _synctex_tree_set_target(x_handle,ns.node);
+ } else if (!form) {
+ __synctex_node_make_friend_tlc(ns.node);
+ }
+ child = ns.node;
+ _synctex_make_hbox_contain_point(parent,_synctex_data_point(child));
+# if SYNCTEX_VERBOSE
+ synctex_node_log(child);
+# endif
+ input.node = _synctex_input_register_line(input.node,child);
+ last_k = last_g = NULL;
+ goto content_loop;
+ }
+ } else if (SYNCTEX_START_SCAN(CHARACTER)) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN CHARACTER
+# endif
+ ++SYNCTEX_CUR;
+ if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Missing end of container.");
+ SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR);
+ }
+ last_k = last_g = NULL;
+ goto content_loop;
+ } else if (SYNCTEX_START_SCAN(ANCHOR)) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN ANCHOR
+# endif
+ goto scan_anchor;
+ } else if (SYNCTEX_START_SCAN(END_SHEET)) {
+ if (sheet && parent == sheet) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN TEEHS
+# endif
+ ++SYNCTEX_CUR;
+ if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Missing anchor.");
+ }
+ parent = sheet = NULL;
+ goto main_loop;
+ }
+ } else if (SYNCTEX_START_SCAN(END_FORM)) {
+ if (parent == form && form_depth > 0) {
+# ifdef SYNCTEX_NOTHING
+# pragma mark + SCAN MROF
+# endif
+ ++SYNCTEX_CUR;
+ --form_depth;
+ if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK
+ && (form_depth || sheet)) {
+ _synctex_error("Missing end of container.");
+ SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR);
+ }
+ if ((parent = _synctex_tree_parent(form))) {
+ _synctex_tree_reset_parent(form);
+ child = form;
+ form = parent;
+ goto content_loop;
+ } else if (sheet) {
+ form = NULL;
+ parent = sheet;
+ child = synctex_node_last_sibling(child);
+ goto content_loop;
+ }
+ goto main_loop;
+ }
+ }
+ _synctex_error("Ignored record <%.20s...>(line %i)\n",SYNCTEX_CUR, scanner->reader->line_number+1);
+ if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Missing end of sheet/form.");
+ SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR);
+ }
+ last_k = last_g = NULL;
+ goto content_loop;
+ }
+ zs = _synctex_buffer_get_available_size(scanner,1);
+ if (zs.size == 0){
+ _synctex_error("Incomplete synctex file, postamble missing.");
+ SYNCTEX_RETURN(SYNCTEX_STATUS_ERROR);
+ }
+ last_k = last_g = NULL;
+ goto content_loop;
+}
+#undef SYNCTEX_RETURN
+/**
+ * Replace ref in its tree hierarchy by a single box
+ * proxy to the contents of the associated form.
+ * - argument ref: a ref node with no friend
+ * - return the proxy created.
+ * - note: Does nothing if ref is not owned.
+ * - note: On return, ref will have no parent nor sibling.
+ * The caller is responsible for releasing ref.
+ * - note: this is where root proxies are created.
+ * - note: the target of the root proxy is the content
+ * of a form.
+ */
+SYNCTEX_INLINE static synctex_ns_s __synctex_replace_ref(synctex_node_p ref) {
+ synctex_ns_s ns = {NULL,SYNCTEX_STATUS_OK};
+ synctex_node_p parent;
+ if ((parent = _synctex_tree_parent(ref))) {
+ synctex_node_p sibling = __synctex_tree_reset_sibling(ref);
+ synctex_node_p arg_sibling = synctex_node_arg_sibling(ref);
+ /* arg_sibling != NULL because the child of a box
+ * is always a box boundary, not a ref. */
+ synctex_node_p target = synctex_form_content(ref->class_->scanner, _synctex_data_tag(ref));
+ /* The target is a single node (box)
+ * with children and no siblings. */
+ if ((ns.node = __synctex_new_proxy_from_ref_to(ref, target))) {
+ /* Insert this proxy instead of ref. */
+ _synctex_node_set_sibling(arg_sibling,ns.node);
+ /* Then append the original sibling of ref. */
+ _synctex_node_set_sibling(ns.node,sibling);
+# if defined(SYNCTEX_USE_CHARINDEX)
+ if (synctex_node_type(sibling) == synctex_node_type_box_bdry) {
+ /* The sibling is the last box boundary
+ * which may have a less accurate information */
+ sibling->char_index = arg_sibling->char_index;
+ sibling->line_index = arg_sibling->line_index;
+ }
+#endif
+#if SYNCTEX_DEBUG>500
+ printf("! Ref replacement:\n");
+ synctex_node_log(ref);
+ synctex_node_display(synctex_node_sibling(ref));
+#endif
+ } else /* simply remove ref */ {
+ _synctex_tree_set_sibling(arg_sibling,sibling);
+ }
+ __synctex_tree_reset_parent(ref);
+ } else {
+ _synctex_error("! Missing parent in __synctex_replace_ref. "
+ "Please report.");
+ ns.status = SYNCTEX_STATUS_BAD_ARGUMENT;
+ }
+ return ns;
+}
+/**
+ * - argument ref: is the starting point of a linked list
+ * of refs. The link is made through the friend field.
+ * - returns: the status and the list of all the proxies
+ * created. The link is made through the friend field.
+ * - note: All refs are freed
+ */
+SYNCTEX_INLINE static synctex_ns_s _synctex_post_process_ref(synctex_node_p ref) {
+ synctex_ns_s ns = {NULL, SYNCTEX_STATUS_OK};
+ while (ref) {
+ synctex_node_p next_ref = _synctex_tree_reset_friend(ref);
+ synctex_ns_s sub_ns = __synctex_replace_ref(ref);
+ if (sub_ns.status < ns.status) {
+ ns.status = sub_ns.status;
+ } else {
+ /* Insert all the created proxies in the list
+ * sub_ns.node is the last friend,
+ */
+ synctex_tree_set_friend(sub_ns.node,ns.node);
+ ns.node = sub_ns.node;
+ }
+ synctex_node_free(ref);
+ ref = next_ref;
+ }
+ return ns;
+}
+typedef synctex_node_p (* synctex_processor_f)(synctex_node_p node);
+/**
+ * Apply the processor f to the tree hierarchy rooted at proxy.
+ * proxy has replaced a form ref, no children yet.
+ * As a side effect all the hierarchy of nodes will be created.
+ */
+SYNCTEX_INLINE static synctex_status_t _synctex_post_process_proxy(synctex_node_p proxy, synctex_processor_f f) {
+ while(proxy) {
+ synctex_node_p next_proxy = _synctex_tree_friend(proxy);
+ synctex_node_p halt = __synctex_tree_sibling(proxy);
+ /* if proxy is the last sibling, halt is NULL.
+ * Find what should be a next node,
+ * without creating new nodes. */
+ if (!halt) {
+ synctex_node_p parent = _synctex_tree_parent(proxy);
+ halt = __synctex_tree_sibling(parent);
+ while (!halt && parent) {
+ parent = _synctex_tree_parent(parent);
+ halt = __synctex_tree_sibling(parent);
+ }
+ }
+ do {
+#if SYNCTEX_DEBUG>500
+ printf("POST PROCESSING %s\n",_synctex_node_abstract(proxy));
+ {
+ int i,j = 0;
+ for (i=0;i<proxy->class_->scanner->number_of_lists;++i) {
+ synctex_node_p N = proxy->class_->scanner->lists_of_friends[i];
+ do {
+ if (N==proxy) {
+ ++j;
+ printf("%s",_synctex_node_abstract(N));
+ }
+ } while ((N = _synctex_tree_friend(N)));
+ }
+ if (j) {
+ printf("\nBeforehand %i match\n",j);
+ }
+ }
+#endif
+ f(proxy);
+#if SYNCTEX_DEBUG>500
+ {
+ int i,j = 0;
+ for (i=0;i<proxy->class_->scanner->number_of_lists;++i) {
+ synctex_node_p N = proxy->class_->scanner->lists_of_friends[i];
+ do {
+ if (N==proxy) {
+ ++j;
+ printf("%s",_synctex_node_abstract(N));
+ }
+ } while ((N = _synctex_tree_friend(N)));
+ }
+ if (j) {
+ printf("\n%i match\n",j);
+ }
+ }
+#endif
+ /* Side effect: create the hierarchy on the fly */
+ proxy = synctex_node_next(proxy); /* Change is here */
+#if SYNCTEX_DEBUG>500
+ if (proxy) {
+ int i,j = 0;
+ for (i=0;i<proxy->class_->scanner->number_of_lists;++i) {
+ synctex_node_p N = proxy->class_->scanner->lists_of_friends[i];
+ do {
+ if (N==proxy) {
+ ++j;
+ printf("%s",_synctex_node_abstract(N));
+ }
+ } while ((N = _synctex_tree_friend(N)));
+ }
+ if (j) {
+ printf("\nnext %i match\n",j);
+ }
+ }
+#endif
+ } while (proxy && proxy != halt);
+ proxy = next_proxy;
+ }
+ return SYNCTEX_STATUS_OK;
+}
+/**
+ * Replace all the form refs by root box proxies.
+ * Create the node hierarchy and update the friends.
+ * On entry, the refs are collected as a friend list
+ * in either a form or a sheet
+ * - parameter: the owning scanner
+ */
+SYNCTEX_INLINE static synctex_status_t _synctex_post_process(synctex_scanner_p scanner) {
+ synctex_status_t status = SYNCTEX_STATUS_OK;
+ synctex_ns_s ns = {NULL,SYNCTEX_STATUS_NOT_OK};
+#if SYNCTEX_DEBUG>500
+ printf("! entering _synctex_post_process.\n");
+ synctex_node_display(scanner->sheet);
+ synctex_node_display(scanner->form);
+#endif
+ /* replace form refs inside forms by box proxies */
+ ns = _synctex_post_process_ref(scanner->ref_in_form);
+ scanner->ref_in_form = NULL;/* it was just released */
+ if (ns.status<status) {
+ status = ns.status;
+ }
+#if SYNCTEX_DEBUG>500
+ printf("! ref replaced in form _synctex_post_process.\n");
+ synctex_node_display(scanner->form);
+#endif
+ /* Create all the form proxy nodes on the fly.
+ * ns.node is the root of the list of
+ * newly created proxies.
+ * There might be a problem with cascading proxies.
+ * In order to be properly managed, the data must
+ * be organized in the right way.
+ * The inserted form must be defined before
+ * the inserting one. *TeX will take care of that. */
+ ns.status = _synctex_post_process_proxy(ns.node,&_synctex_tree_reset_friend);
+ if (ns.status<status) {
+ status = ns.status;
+ }
+ /* replace form refs inside sheets by box proxies */
+ ns = _synctex_post_process_ref(scanner->ref_in_sheet);
+ if (ns.status<status) {
+ status = ns.status;
+ }
+ scanner->ref_in_sheet = NULL;
+#if SYNCTEX_DEBUG>500
+ printf("! ref replaced in sheet _synctex_post_process.\n");
+ synctex_node_display(scanner->sheet);
+#endif
+#if 0
+ {
+ int i;
+ for (i=0;i<scanner->number_of_lists;++i) {
+ synctex_node_p P = ns.node;
+ do {
+ synctex_node_p N = scanner->lists_of_friends[i];
+ do {
+ if (P == N) {
+ printf("Already registered.\n");
+ synctex_node_display(N);
+ break;
+ }
+ } while ((N = _synctex_tree_friend(N)));
+ } while((P = _synctex_tree_friend(P)));
+ }
+ }
+#endif
+#if SYNCTEX_DEBUG>10000
+ {
+ int i;
+ for (i=0;i<scanner->number_of_lists;++i) {
+ synctex_node_p P = scanner->lists_of_friends[i];
+ int j = 0;
+ while (P) {
+ ++j;
+ synctex_node_log(P);
+ P = _synctex_tree_friend(P);
+ }
+ if (j) {
+ printf("friends %i -> # %i\n",i,j);
+ }
+ }
+ }
+#endif
+ ns.status = _synctex_post_process_proxy(ns.node,&__synctex_proxy_make_friend_and_next_hbox);
+ if (ns.status<status) {
+ status = ns.status;
+ }
+#if SYNCTEX_DEBUG>500
+ printf("! exiting _synctex_post_process.\n");
+ synctex_node_display(scanner->sheet);
+ synctex_node_display(scanner->form);
+ printf("! display all.\n");
+ synctex_node_display(scanner->sheet);
+ synctex_node_display(scanner->form);
+#endif
+ return status;
+}
+/* Used when parsing the synctex file
+ */
+static synctex_status_t _synctex_scan_content(synctex_scanner_p scanner) {
+ if (NULL == scanner) {
+ return SYNCTEX_STATUS_BAD_ARGUMENT;
+ }
+ scanner->reader->lastv = -1;
+ synctex_status_t status = 0;
+ /* Find where this section starts */
+content_not_found:
+ status = _synctex_match_string(scanner,"Content:");
+ if (status<SYNCTEX_STATUS_EOF) {
+ return status;
+ }
+ if (_synctex_next_line(scanner)<SYNCTEX_STATUS_OK) {
+ _synctex_error("Incomplete Content.");
+ return SYNCTEX_STATUS_ERROR;
+ }
+ if (status == SYNCTEX_STATUS_NOT_OK) {
+ goto content_not_found;
+ }
+ status = __synctex_parse_sfi(scanner);
+ if (status == SYNCTEX_STATUS_OK) {
+ status = _synctex_post_process(scanner);
+ }
+ return status;
+}
+synctex_scanner_p synctex_scanner_new() {
+ synctex_scanner_p scanner =(synctex_scanner_p)_synctex_malloc(sizeof(synctex_scanner_s));
+ if (scanner) {
+ if (!(scanner->reader = _synctex_malloc(sizeof(synctex_reader_s)))) {
+ _synctex_free(scanner);
+ return NULL;
+ }
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# endif
+# define DEFINE_synctex_scanner_class(NAME)\
+ scanner->class_[synctex_node_type_##NAME] = synctex_class_##NAME;\
+(scanner->class_[synctex_node_type_##NAME]).scanner = scanner
+ DEFINE_synctex_scanner_class(input);
+ DEFINE_synctex_scanner_class(sheet);
+ DEFINE_synctex_scanner_class(form);
+ DEFINE_synctex_scanner_class(hbox);
+ DEFINE_synctex_scanner_class(void_hbox);
+ DEFINE_synctex_scanner_class(vbox);
+ DEFINE_synctex_scanner_class(void_vbox);
+ DEFINE_synctex_scanner_class(kern);
+ DEFINE_synctex_scanner_class(glue);
+ DEFINE_synctex_scanner_class(rule);
+ DEFINE_synctex_scanner_class(math);
+ DEFINE_synctex_scanner_class(boundary);
+ DEFINE_synctex_scanner_class(box_bdry);
+ DEFINE_synctex_scanner_class(ref);
+ DEFINE_synctex_scanner_class(proxy_hbox);
+ DEFINE_synctex_scanner_class(proxy_vbox);
+ DEFINE_synctex_scanner_class(proxy);
+ DEFINE_synctex_scanner_class(proxy_last);
+ DEFINE_synctex_scanner_class(handle);
+ /* set up the lists of friends */
+ scanner->number_of_lists = 1024;
+ scanner->lists_of_friends = (synctex_node_r)_synctex_malloc(scanner->number_of_lists*sizeof(synctex_node_p));
+ if (NULL == scanner->lists_of_friends) {
+ synctex_scanner_free(scanner);
+ _synctex_error("malloc:2");
+ return NULL;
+ }
+ scanner->display_switcher = 100;
+ scanner->display_prompt = (char *)_synctex_display_prompt+strlen(_synctex_display_prompt)-1;
+ }
+ return scanner;
+}
+/* Where the synctex scanner is created. */
+synctex_scanner_p synctex_scanner_new_with_output_file(const char * output, const char * build_directory, int parse) {
+ synctex_scanner_p scanner = synctex_scanner_new();
+ if (NULL == scanner) {
+ _synctex_error("malloc problem");
+ return NULL;
+ }
+ if ((scanner->reader = synctex_reader_init_with_output_file(scanner->reader, output, build_directory))) {
+ return parse? synctex_scanner_parse(scanner):scanner;
+ }
+ _synctex_error("No file?");
+ return NULL;
+}
+
+/* The scanner destructor
+ */
+int synctex_scanner_free(synctex_scanner_p scanner) {
+ int node_count = 0;
+ if (scanner) {
+ if (SYNCTEX_FILE) {
+ gzclose(SYNCTEX_FILE);
+ SYNCTEX_FILE = NULL;
+ }
+ synctex_node_free(scanner->sheet);
+ synctex_node_free(scanner->form);
+ synctex_node_free(scanner->input);
+ synctex_reader_free(scanner->reader);
+ SYNCTEX_SCANNER_FREE_HANDLE(scanner);
+ synctex_iterator_free(scanner->iterator);
+ free(scanner->output_fmt);
+ free(scanner->lists_of_friends);
+#if SYNCTEX_USE_NODE_COUNT>0
+ node_count = scanner->node_count;
+#endif
+ free(scanner);
+ }
+ return node_count;
+}
+
+/* Where the synctex scanner parses the contents of the file. */
+synctex_scanner_p synctex_scanner_parse(synctex_scanner_p scanner) {
+ synctex_status_t status = 0;
+ if (!scanner || scanner->flags.has_parsed) {
+ return scanner;
+ }
+ scanner->flags.has_parsed=1;
+ scanner->pre_magnification = 1000;
+ scanner->pre_unit = 8192;
+ scanner->pre_x_offset = scanner->pre_y_offset = 578;
+ /* initialize the offset with a fake improbable value,
+ * If there is a post scriptum section, this value will be overridden by the real life value */
+ scanner->x_offset = scanner->y_offset = 6.027e23f;
+ scanner->reader->line_number = 1;
+
+ SYNCTEX_START = (char *)malloc(SYNCTEX_BUFFER_SIZE+1); /* one more character for null termination */
+ if (NULL == SYNCTEX_START) {
+ _synctex_error("! malloc error in synctex_scanner_parse.");
+ bailey:
+#ifdef SYNCTEX_DEBUG
+ return scanner;
+#else
+ synctex_scanner_free(scanner);
+ return NULL;
+#endif
+ }
+ synctex_scanner_set_display_switcher(scanner, 1000);
+ SYNCTEX_END = SYNCTEX_START+SYNCTEX_BUFFER_SIZE;
+ /* SYNCTEX_END always points to a null terminating character.
+ * Maybe there is another null terminating character between SYNCTEX_CUR and SYNCTEX_END-1.
+ * At least, we are sure that SYNCTEX_CUR points to a string covering a valid part of the memory. */
+ *SYNCTEX_END = '\0';
+ SYNCTEX_CUR = SYNCTEX_END;
+# if defined(SYNCTEX_USE_CHARINDEX)
+ scanner->reader->charindex_offset = -SYNCTEX_BUFFER_SIZE;
+# endif
+ status = _synctex_scan_preamble(scanner);
+ if (status<SYNCTEX_STATUS_OK) {
+ _synctex_error("Bad preamble\n");
+ goto bailey;
+ }
+ status = _synctex_scan_content(scanner);
+ if (status<SYNCTEX_STATUS_OK) {
+ _synctex_error("Bad content\n");
+ goto bailey;
+ }
+ status = _synctex_scan_postamble(scanner);
+ if (status<SYNCTEX_STATUS_OK) {
+ _synctex_error("Bad postamble. Ignored\n");
+ }
+#if SYNCTEX_DEBUG>500
+ synctex_scanner_set_display_switcher(scanner, 100);
+ synctex_node_display(scanner->sheet);
+ synctex_node_display(scanner->form);
+#endif
+ synctex_scanner_set_display_switcher(scanner, 1000);
+ /* Everything is finished, free the buffer, close the file */
+ free((void *)SYNCTEX_START);
+ SYNCTEX_START = SYNCTEX_CUR = SYNCTEX_END = NULL;
+ gzclose(SYNCTEX_FILE);
+ SYNCTEX_FILE = NULL;
+ /* Final tuning: set the default values for various parameters */
+ /* 1 pre_unit = (scanner->pre_unit)/65536 pt = (scanner->pre_unit)/65781.76 bp
+ * 1 pt = 65536 sp */
+ if (scanner->pre_unit<=0) {
+ scanner->pre_unit = 8192;
+ }
+ if (scanner->pre_magnification<=0) {
+ scanner->pre_magnification = 1000;
+ }
+ if (scanner->unit <= 0) {
+ /* no post magnification */
+ scanner->unit = scanner->pre_unit / 65781.76;/* 65781.76 or 65536.0*/
+ } else {
+ /* post magnification */
+ scanner->unit *= scanner->pre_unit / 65781.76;
+ }
+ scanner->unit *= scanner->pre_magnification / 1000.0;
+ if (scanner->x_offset > 6e23) {
+ /* no post offset */
+ scanner->x_offset = scanner->pre_x_offset * (scanner->pre_unit / 65781.76);
+ scanner->y_offset = scanner->pre_y_offset * (scanner->pre_unit / 65781.76);
+ } else {
+ /* post offset */
+ scanner->x_offset /= 65781.76f;
+ scanner->y_offset /= 65781.76f;
+ }
+ return scanner;
+#undef SYNCTEX_FILE
+}
+
+/* Scanner accessors.
+ */
+int synctex_scanner_pre_x_offset(synctex_scanner_p scanner){
+ return scanner?scanner->pre_x_offset:0;
+}
+int synctex_scanner_pre_y_offset(synctex_scanner_p scanner){
+ return scanner?scanner->pre_y_offset:0;
+}
+int synctex_scanner_x_offset(synctex_scanner_p scanner){
+ return scanner?scanner->x_offset:0;
+}
+int synctex_scanner_y_offset(synctex_scanner_p scanner){
+ return scanner?scanner->y_offset:0;
+}
+float synctex_scanner_magnification(synctex_scanner_p scanner){
+ return scanner?scanner->unit:1;
+}
+void synctex_scanner_display(synctex_scanner_p scanner) {
+ if (NULL == scanner) {
+ return;
+ }
+ printf("The scanner:\noutput:%s\noutput_fmt:%s\nversion:%i\n",scanner->reader->output,scanner->output_fmt,scanner->version);
+ printf("pre_unit:%i\nx_offset:%i\ny_offset:%i\n",scanner->pre_unit,scanner->pre_x_offset,scanner->pre_y_offset);
+ printf("count:%i\npost_magnification:%f\npost_x_offset:%f\npost_y_offset:%f\n",
+ scanner->count,scanner->unit,scanner->x_offset,scanner->y_offset);
+ printf("The input:\n");
+ synctex_node_display(scanner->input);
+ if (scanner->count<1000) {
+ printf("The sheets:\n");
+ synctex_node_display(scanner->sheet);
+ printf("The friends:\n");
+ if (scanner->lists_of_friends) {
+ int i = scanner->number_of_lists;
+ synctex_node_p node;
+ while(i--) {
+ printf("Friend index:%i\n",i);
+ node = (scanner->lists_of_friends)[i];
+ while(node) {
+ printf("%s:%i,%i\n",
+ synctex_node_isa(node),
+ _synctex_data_tag(node),
+ _synctex_data_line(node)
+ );
+ node = _synctex_tree_friend(node);
+ }
+ }
+ }
+ } else {
+ printf("SyncTeX Warning: Too many objects\n");
+ }
+}
+/* Public */
+const char * synctex_scanner_get_name(synctex_scanner_p scanner,int tag) {
+ synctex_node_p input = NULL;
+ if (NULL == scanner) {
+ return NULL;
+ }
+ if ((input = scanner->input)) {;
+ do {
+ if (tag == _synctex_data_tag(input)) {
+ return (_synctex_data_name(input));
+ }
+ } while((input = __synctex_tree_sibling(input)));
+ }
+ return NULL;
+}
+const char * synctex_node_get_name(synctex_node_p node) {
+ if (node) {
+ return synctex_scanner_get_name(node->class_->scanner,_synctex_data_tag(node));
+ }
+ return NULL;
+}
+
+static int _synctex_scanner_get_tag(synctex_scanner_p scanner,const char * name);
+static int _synctex_scanner_get_tag(synctex_scanner_p scanner,const char * name) {
+ synctex_node_p input = NULL;
+ if (NULL == scanner) {
+ return 0;
+ }
+ if ((input = scanner->input)) {
+ do {
+ if (_synctex_is_equivalent_file_name(name,(_synctex_data_name(input)))) {
+ return _synctex_data_tag(input);
+ }
+ } while((input = __synctex_tree_sibling(input)));
+ }
+ // 2011 version
+ name = _synctex_base_name(name);
+ if ((input = scanner->input)) {
+ do {
+ if (_synctex_is_equivalent_file_name(name,_synctex_base_name(_synctex_data_name(input)))) {
+ synctex_node_p other_input = input;
+ while((other_input = __synctex_tree_sibling(other_input))) {
+ if (_synctex_is_equivalent_file_name(name,_synctex_base_name(_synctex_data_name(other_input)))
+ && (strlen(_synctex_data_name(input))!=strlen(_synctex_data_name(other_input))
+ || strncmp(_synctex_data_name(other_input),_synctex_data_name(input),strlen(_synctex_data_name(input))))) {
+ // There is a second possible candidate
+ return 0;
+ }
+ }
+ return _synctex_data_tag(input);
+ }
+ } while((input = __synctex_tree_sibling(input)));
+ }
+ return 0;
+}
+
+int synctex_scanner_get_tag(synctex_scanner_p scanner,const char * name) {
+ size_t char_index = strlen(name);
+ if ((scanner = synctex_scanner_parse(scanner)) && (0 < char_index)) {
+ /* the name is not void */
+ char_index -= 1;
+ if (!SYNCTEX_IS_PATH_SEPARATOR(name[char_index])) {
+ /* the last character of name is not a path separator */
+ int result = _synctex_scanner_get_tag(scanner,name);
+ if (result) {
+ return result;
+ } else {
+ /* the given name was not the one known by TeX
+ * try a name relative to the enclosing directory of the scanner->output file */
+ const char * relative = name;
+ const char * ptr = scanner->reader->output;
+ while((strlen(relative) > 0) && (strlen(ptr) > 0) && (*relative == *ptr))
+ {
+ relative += 1;
+ ptr += 1;
+ }
+ /* Find the last path separator before relative */
+ while(relative > name) {
+ if (SYNCTEX_IS_PATH_SEPARATOR(*(relative-1))) {
+ break;
+ }
+ relative -= 1;
+ }
+ if ((relative > name) && (result = _synctex_scanner_get_tag(scanner,relative))) {
+ return result;
+ }
+ if (SYNCTEX_IS_PATH_SEPARATOR(name[0])) {
+ /* No tag found for the given absolute name,
+ * Try each relative path starting from the shortest one */
+ while(0<char_index) {
+ char_index -= 1;
+ if (SYNCTEX_IS_PATH_SEPARATOR(name[char_index])
+ && (result = _synctex_scanner_get_tag(scanner,name+char_index+1))) {
+ return result;
+ }
+ }
+ }
+ }
+ return result;
+ }
+ }
+ return 0;
+}
+synctex_node_p synctex_scanner_input(synctex_scanner_p scanner) {
+ return scanner?scanner->input:NULL;
+}
+synctex_node_p synctex_scanner_input_with_tag(synctex_scanner_p scanner, int tag) {
+ synctex_node_p input = scanner?scanner->input:NULL;
+ while (_synctex_data_tag(input)!=tag) {
+ if ((input = __synctex_tree_sibling(input))) {
+ continue;
+ }
+ break;
+ }
+ return input;
+}
+const char * synctex_scanner_get_output_fmt(synctex_scanner_p scanner) {
+ return NULL != scanner && scanner->output_fmt?scanner->output_fmt:"";
+}
+const char * synctex_scanner_get_output(synctex_scanner_p scanner) {
+ return NULL != scanner && scanner->reader->output?scanner->reader->output:"";
+}
+const char * synctex_scanner_get_synctex(synctex_scanner_p scanner) {
+ return NULL != scanner && scanner->reader->synctex?scanner->reader->synctex:"";
+}
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark Public node attributes
+# endif
+
+# define SYNCTEX_DEFINE_NODE_HVWHD(WHAT) \
+int synctex_node_##WHAT(synctex_node_p node) { \
+ return (node && node->class_->inspector->WHAT)? \
+ node->class_->inspector->WHAT(node): 0; \
+}
+# define SYNCTEX_DEFINE_PROXY_HV(WHAT) \
+static int _synctex_proxy_##WHAT(synctex_proxy_p proxy) { \
+ synctex_node_p target = _synctex_tree_target(proxy); \
+ if (target) { \
+ return _synctex_data_##WHAT(proxy)+synctex_node_##WHAT(target); \
+ } else { \
+ return proxy? _synctex_data_##WHAT(proxy): 0; \
+ } \
+}
+#define SYNCTEX_DEFINE_PROXY_TLCWVD(WHAT) \
+static int _synctex_proxy_##WHAT(synctex_proxy_p proxy) { \
+ synctex_node_p target = _synctex_tree_target(proxy); \
+ return target? synctex_node_##WHAT(target): 0; \
+}
+
+/**
+ * The horizontal location of the node.
+ * Idem for v, width, height and depth.
+ * - parameter node: a node with geometrical information.
+ * - returns: an integer.
+ * - requires: every proxy node has a target.
+ * - note: recursive call if the parameter has a proxy.
+ * - author: JL
+ */
+SYNCTEX_DEFINE_NODE_HVWHD(h)
+SYNCTEX_DEFINE_NODE_HVWHD(v)
+SYNCTEX_DEFINE_NODE_HVWHD(width)
+SYNCTEX_DEFINE_NODE_HVWHD(height)
+SYNCTEX_DEFINE_NODE_HVWHD(depth)
+SYNCTEX_DEFINE_PROXY_TLCWVD(tag)
+SYNCTEX_DEFINE_PROXY_TLCWVD(line)
+SYNCTEX_DEFINE_PROXY_TLCWVD(column)
+SYNCTEX_DEFINE_PROXY_HV(h)
+SYNCTEX_DEFINE_PROXY_HV(v)
+SYNCTEX_DEFINE_PROXY_TLCWVD(width)
+SYNCTEX_DEFINE_PROXY_TLCWVD(height)
+SYNCTEX_DEFINE_PROXY_TLCWVD(depth)
+
+/**
+ * Whether the argument is a box,
+ * either vertical or horizontal,
+ * either void or not,
+ * or a proxy to such a box.
+ * - parameter NODE: of type synctex_node_p
+ * - returns: yorn
+ */
+
+SYNCTEX_INLINE static synctex_bool_t _synctex_node_is_box(synctex_node_p node) {
+ return node &&
+ (node->class_->type == synctex_node_type_hbox
+ || node->class_->type == synctex_node_type_void_hbox
+ || node->class_->type == synctex_node_type_vbox
+ || node->class_->type == synctex_node_type_void_vbox
+ || _synctex_node_is_box(_synctex_tree_target(node)));
+}
+
+/**
+ * Whether the argument is a handle.
+ * Handles are similar to proxies because they have a target.
+ * They are used for query results.
+ * - parameter NODE: of type synctex_node_p
+ * - returns: yorn
+ */
+
+SYNCTEX_INLINE static synctex_bool_t _synctex_node_is_handle(synctex_node_p node) {
+ return node &&
+ (node->class_->type == synctex_node_type_handle);
+}
+
+/**
+ * Resolves handle indirection.
+ * - parameter node: of type synctex_node_p
+ * - returns: node if it is not a handle,
+ * its target otherwise.
+ */
+
+SYNCTEX_INLINE static synctex_node_p _synctex_node_or_handle_target(synctex_node_p node) {
+ return _synctex_node_is_handle(node)?
+ _synctex_tree_target(node):node;
+}
+
+/**
+ * Whether the argument is an hbox.
+ * - parameter NODE: of type synctex_node_p
+ * - returns: yorn
+ */
+
+SYNCTEX_INLINE static synctex_bool_t _synctex_node_is_hbox(synctex_node_p node) {
+ return node &&
+ (node->class_->type == synctex_node_type_hbox
+ || node->class_->type == synctex_node_type_void_hbox
+ || _synctex_node_is_hbox(_synctex_tree_target(node)));
+}
+
+/**
+ * The horizontal location of the first box enclosing node.
+ * - parameter node: a node with geometrical information.
+ * - returns: an integer.
+ * - author: JL
+ */
+int synctex_node_box_h(synctex_node_p node) {
+ if (_synctex_node_is_box(node) || (node = _synctex_tree_parent(node))) {
+ return synctex_node_h(node);
+ }
+ return 0;
+}
+/**
+ * The vertical location of the first box enclosing node.
+ * - parameter node: a node with geometrical information.
+ * - returns: an integer.
+ * - author: JL
+ */
+int synctex_node_box_v(synctex_node_p node) {
+ if (_synctex_node_is_box(node) || (node = _synctex_tree_parent(node))) {
+ return synctex_node_v(node);
+ }
+ return 0;
+}
+/**
+ * The width of the first box enclosing node.
+ * - parameter node: a node with geometrical information.
+ * - returns: an integer.
+ * - author: JL
+ */
+int synctex_node_box_width(synctex_node_p node) {
+ if (_synctex_node_is_box(node) || (node = _synctex_tree_parent(node))) {
+ return synctex_node_width(node);
+ }
+ return 0;
+}
+/**
+ * The height of the first box enclosing node.
+ * - parameter node: a node with geometrical information.
+ * - returns: an integer.
+ * - author: JL
+ */
+int synctex_node_box_height(synctex_node_p node) {
+ if (_synctex_node_is_box(node) || (node = _synctex_tree_parent(node))) {
+ return synctex_node_height(node);
+ }
+ return 0;
+}
+/**
+ * The depth of the first box enclosing node.
+ * - parameter node: a node with geometrical information.
+ * - returns: an integer.
+ * - author: JL
+ */
+int synctex_node_box_depth(synctex_node_p node) {
+ if (_synctex_node_is_box(node) || (node = _synctex_tree_parent(node))) {
+ return synctex_node_depth(node);
+ }
+ return 0;
+}
+/**
+ * The horizontal location of an hbox, corrected with contents.
+ * - parameter node: an hbox node.
+ * - returns: an integer, 0 if node is not an hbox or an hbox proxy.
+ * - note: recursive call when node is an hbox proxy.
+ * - author: JL
+ */
+int synctex_node_hbox_h(synctex_node_p node) {
+ switch(synctex_node_type(node)) {
+ case synctex_node_type_hbox:
+ return _synctex_data_h_V(node);
+ case synctex_node_type_proxy_hbox:
+ return _synctex_data_h(node)+synctex_node_hbox_h(_synctex_tree_target(node));
+ default:
+ return 0;
+ }
+}
+/**
+ * The vertical location of an hbox, corrected with contents.
+ * - parameter node: an hbox node.
+ * - returns: an integer, 0 if node is not an hbox or an hbox proxy.
+ * - note: recursive call when node is an hbox proxy.
+ * - author: JL
+ */
+int synctex_node_hbox_v(synctex_node_p node) {
+ switch(synctex_node_type(node)) {
+ case synctex_node_type_hbox:
+ return _synctex_data_v_V(node);
+ case synctex_node_type_proxy_hbox:
+ return _synctex_data_v(node)+synctex_node_hbox_v(_synctex_tree_target(node));
+ default:
+ return 0;
+ }
+}
+/**
+ * The width of an hbox, corrected with contents.
+ * - parameter node: an hbox node, 0 if node is not an hbox or an hbox proxy.
+ * - returns: an integer.
+ * - author: JL
+ */
+int synctex_node_hbox_width(synctex_node_p node) {
+ synctex_node_p target = _synctex_tree_target(node);
+ if (target) {
+ node = target;
+ }
+ return synctex_node_type(node) == synctex_node_type_hbox?
+ _synctex_data_width_V(node): 0;
+}
+/**
+ * The height of an hbox, corrected with contents.
+ * - parameter node: an hbox node.
+ * - returns: an integer, 0 if node is not an hbox or an hbox proxy.
+ * - author: JL
+ */
+int synctex_node_hbox_height(synctex_node_p node) {
+ synctex_node_p target = _synctex_tree_target(node);
+ if (target) {
+ node = target;
+ }
+ return synctex_node_type(node) == synctex_node_type_hbox?
+ _synctex_data_height_V(node): 0;
+}
+/**
+ * The depth of an hbox, corrected with contents.
+ * - parameter node: an hbox node.
+ * - returns: an integer, 0 if node is not an hbox or an hbox proxy.
+ * - note: recursive call when node is an hbox proxy.
+ * - author: JL
+ */
+int synctex_node_hbox_depth(synctex_node_p node) {
+ synctex_node_p target = _synctex_tree_target(node);
+ if (target) {
+ node = target;
+ }
+ return synctex_node_type(node) == synctex_node_type_hbox?
+ _synctex_data_depth_V(node): 0;
+}
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark Public node visible attributes
+# endif
+
+#define SYNCTEX_VISIBLE_SIZE(node,s) \
+(s)*node->class_->scanner->unit
+#define SYNCTEX_VISIBLE_DISTANCE_h(node,d) \
+((d)*node->class_->scanner->unit+node->class_->scanner->x_offset)
+#define SYNCTEX_VISIBLE_DISTANCE_v(node,d) \
+((d)*node->class_->scanner->unit+node->class_->scanner->y_offset)
+static float __synctex_node_visible_h(synctex_node_p node) {
+ return SYNCTEX_VISIBLE_DISTANCE_h(node,synctex_node_h(node));
+}
+static float __synctex_node_visible_v(synctex_node_p node) {
+ return SYNCTEX_VISIBLE_DISTANCE_v(node,synctex_node_v(node));
+}
+static float __synctex_node_visible_width(synctex_node_p node) {
+ return SYNCTEX_VISIBLE_SIZE(node,synctex_node_width(node));
+}
+static float __synctex_node_visible_height(synctex_node_p node) {
+ return SYNCTEX_VISIBLE_SIZE(node,synctex_node_height(node));
+}
+static float __synctex_node_visible_depth(synctex_node_p node) {
+ return SYNCTEX_VISIBLE_SIZE(node,synctex_node_depth(node));
+}
+static float __synctex_proxy_visible_h(synctex_node_p node) {
+ return SYNCTEX_VISIBLE_DISTANCE_h(node,synctex_node_h(node));
+}
+static float __synctex_proxy_visible_v(synctex_node_p node) {
+ return SYNCTEX_VISIBLE_DISTANCE_v(node,synctex_node_v(node));
+}
+static float __synctex_proxy_visible_width(synctex_node_p node) {
+ synctex_node_p target = _synctex_tree_target(node);
+ return __synctex_node_visible_width(target);
+}
+static float __synctex_proxy_visible_height(synctex_node_p node) {
+ synctex_node_p target = _synctex_tree_target(node);
+ return __synctex_node_visible_height(target);
+}
+static float __synctex_proxy_visible_depth(synctex_node_p node) {
+ synctex_node_p target = _synctex_tree_target(node);
+ return __synctex_node_visible_depth(target);
+}
+static float __synctex_kern_visible_h(synctex_noxy_p noxy) {
+ int h = _synctex_data_h(noxy);
+ int width = _synctex_data_width(noxy);
+ return SYNCTEX_VISIBLE_DISTANCE_h(noxy, width>0?h-width:h);
+}
+static float __synctex_kern_visible_width(synctex_noxy_p noxy) {
+ int width = _synctex_data_width(noxy);
+ return SYNCTEX_VISIBLE_SIZE(noxy, width>0?width:-width);
+}
+static float __synctex_rule_visible_h(synctex_noxy_p noxy) {
+ int h = _synctex_data_h(noxy);
+ int width = _synctex_data_width(noxy);
+ return SYNCTEX_VISIBLE_DISTANCE_h(noxy, width>0?h:h-width);
+}
+static float __synctex_rule_visible_width(synctex_noxy_p noxy) {
+ int width = _synctex_data_width(noxy);
+ return SYNCTEX_VISIBLE_SIZE(noxy, width>0?width:-width);
+}
+static float __synctex_rule_visible_v(synctex_noxy_p noxy) {
+ return __synctex_node_visible_v(noxy);
+}
+static float __synctex_rule_visible_height(synctex_noxy_p noxy) {
+ return __synctex_node_visible_height(noxy);
+}
+static float __synctex_rule_visible_depth(synctex_noxy_p noxy) {
+ return __synctex_node_visible_depth(noxy);
+}
+
+/**
+ * The horizontal location of node, in page coordinates.
+ * - parameter node: a node.
+ * - returns: a float.
+ * - author: JL
+ */
+float synctex_node_visible_h(synctex_node_p node){
+ return node? node->class_->vispector->h(node): 0;
+}
+/**
+ * The vertical location of node, in page coordinates.
+ * - parameter node: a node.
+ * - returns: a float.
+ * - author: JL
+ */
+float synctex_node_visible_v(synctex_node_p node){
+ return node? node->class_->vispector->v(node): 0;
+}
+/**
+ * The width of node, in page coordinates.
+ * - parameter node: a node.
+ * - returns: a float.
+ * - author: JL
+ */
+float synctex_node_visible_width(synctex_node_p node){
+ return node? node->class_->vispector->width(node): 0;
+}
+/**
+ * The height of node, in page coordinates.
+ * - parameter node: a node.
+ * - returns: a float.
+ * - author: JL
+ */
+float synctex_node_visible_height(synctex_node_p node){
+ return node? node->class_->vispector->height(node): 0;
+}
+/**
+ * The depth of node, in page coordinates.
+ * - parameter node: a node.
+ * - returns: a float.
+ * - author: JL
+ */
+float synctex_node_visible_depth(synctex_node_p node){
+ return node? node->class_->vispector->depth(node): 0;
+}
+
+/**
+ * The V variant of geometrical information.
+ * - parameter node: a node.
+ * - returns: an integer.
+ * - author: JL
+ */
+#define SYNCTEX_DEFINE_V(WHAT)\
+SYNCTEX_INLINE static int _synctex_node_##WHAT##_V(synctex_node_p node) { \
+ synctex_node_p target = _synctex_tree_target(node); \
+ if (target) { \
+ return _synctex_data_##WHAT(node)+_synctex_node_##WHAT##_V(target); \
+ } else if (_synctex_data_has_##WHAT##_V(node)) { \
+ return _synctex_data_##WHAT##_V(node); \
+ } else { \
+ return _synctex_data_##WHAT(node); \
+ } \
+}
+SYNCTEX_DEFINE_V(h)
+SYNCTEX_DEFINE_V(v)
+SYNCTEX_DEFINE_V(width)
+SYNCTEX_DEFINE_V(height)
+SYNCTEX_DEFINE_V(depth)
+
+SYNCTEX_INLINE static synctex_point_s _synctex_data_point(synctex_node_p node) {
+ return (synctex_point_s){synctex_node_h(node),synctex_node_v(node)};
+}
+SYNCTEX_INLINE static synctex_point_s _synctex_data_point_V(synctex_node_p node) {
+ return (synctex_point_s){_synctex_node_h_V(node),_synctex_node_v_V(node)};
+}
+SYNCTEX_INLINE static synctex_point_s _synctex_data_set_point(synctex_node_p node, synctex_point_s point) {
+ synctex_point_s old = _synctex_data_point(node);
+ _synctex_data_set_h(node,point.h);
+ _synctex_data_set_v(node,point.v);
+ return old;
+}
+SYNCTEX_INLINE static synctex_box_s _synctex_data_box(synctex_node_p node) {
+ synctex_box_s box = {{0,0},{0,0}};
+ int n;
+ n = synctex_node_width(node);
+ if (n<0) {
+ box.max.h = synctex_node_h(node);
+ box.min.h = box.max.h + n;
+ } else {
+ box.min.h = synctex_node_h(node);
+ box.max.h = box.min.h + n;
+ }
+ n = synctex_node_v(node);
+ box.min.v = n - synctex_node_height(node);
+ box.max.v = n + synctex_node_depth(node);
+ return box;
+}
+SYNCTEX_INLINE static synctex_box_s _synctex_data_xob(synctex_node_p node) {
+ synctex_box_s box = {{0,0},{0,0}};
+ int n;
+ n = synctex_node_width(node);
+ if (n>0) {
+ box.max.h = synctex_node_h(node);
+ box.min.h = box.max.h - n;
+ } else {
+ box.min.h = synctex_node_h(node);
+ box.max.h = box.min.h - n;
+ }
+ n = synctex_node_v(node);
+ box.min.v = n - synctex_node_height(node);
+ box.max.v = n + synctex_node_depth(node);
+ return box;
+}
+SYNCTEX_INLINE static synctex_box_s _synctex_data_box_V(synctex_node_p node) {
+ synctex_box_s box = {{0,0},{0,0}};
+ int n;
+ n = _synctex_node_width_V(node);
+ if (n<0) {
+ box.max.h = _synctex_node_h_V(node);
+ box.min.h = box.max.h + n;
+ } else {
+ box.min.h = _synctex_node_h_V(node);
+ box.max.h = box.min.h + n;
+ }
+ n = _synctex_node_v_V(node);
+ box.min.v = n - _synctex_node_height_V(node);
+ box.max.v = n + _synctex_node_depth_V(node);
+ return box;
+}
+
+/**
+ * The higher box node in the parent hierarchy which
+ * mean line number is the one of node ±1.
+ * This enclosing box is computed as follows
+ * 1) get the first hbox in the parent linked list
+ * starting at node.
+ * If there is none, simply return the parent of node.
+ * 2) compute the mean line number
+ * 3) scans up the tree for the higher hbox with
+ * the same mean line number, ±1 eventually
+* - parameter node: a node.
+ * - returns: a (proxy to a) box node.
+ * - author: JL
+ */
+static synctex_node_p _synctex_node_box_visible(synctex_node_p node) {
+ if ((node = _synctex_node_or_handle_target(node))) {
+ int mean = 0;
+ int bound = 1500000/(node->class_->scanner->pre_magnification/1000.0);
+ synctex_node_p parent = NULL;
+ /* get the first enclosing parent
+ * then get the highest enclosing parent with the same mean line ±1 */
+ node = _synctex_node_or_handle_target(node);
+ if (!_synctex_node_is_box(node)) {
+ if ((parent = _synctex_tree_parent(node))) {
+ node = parent;
+ } else if ((node = _synctex_tree_target(node))) {
+ if (!_synctex_node_is_box(node)) {
+ if ((parent = _synctex_tree_parent(node))) {
+ node = parent;
+ } else {
+ return NULL;
+ }
+ }
+ }
+ }
+ parent = node;
+ mean = synctex_node_mean_line(node);
+ while ((parent = _synctex_tree_parent(parent))) {
+ if (_synctex_node_is_hbox(parent)) {
+ if (_synctex_abs(mean-synctex_node_mean_line(parent))>1) {
+ return node;
+ } else if (synctex_node_width(parent)>bound) {
+ return parent;
+ } else if (synctex_node_height(parent)+synctex_node_depth(parent)>bound) {
+ return parent;
+ }
+ node = parent;
+ }
+ }
+ }
+ return node;
+}
+/**
+ * The horizontal location of the first box enclosing node, in page coordinates.
+ * - parameter node: a node.
+ * - returns: a float.
+ * - author: JL
+ */
+float synctex_node_box_visible_h(synctex_node_p node) {
+ return SYNCTEX_VISIBLE_DISTANCE_h(node,_synctex_node_h_V(_synctex_node_box_visible(node)));
+}
+/**
+ * The vertical location of the first box enclosing node, in page coordinates.
+ * - parameter node: a node.
+ * - returns: a float.
+ * - author: JL
+ */
+float synctex_node_box_visible_v(synctex_node_p node) {
+ return SYNCTEX_VISIBLE_DISTANCE_v(node,_synctex_node_v_V(_synctex_node_box_visible(node)));
+}
+/**
+ * The width of the first box enclosing node, in page coordinates.
+ * - parameter node: a node.
+ * - returns: a float.
+ * - author: JL
+ */
+float synctex_node_box_visible_width(synctex_node_p node) {
+ return SYNCTEX_VISIBLE_SIZE(node,_synctex_node_width_V(_synctex_node_box_visible(node)));
+}
+/**
+ * The height of the first box enclosing node, in page coordinates.
+ * - parameter node: a node.
+ * - returns: a float.
+ * - author: JL
+ */
+float synctex_node_box_visible_height(synctex_node_p node) {
+ return SYNCTEX_VISIBLE_SIZE(node,_synctex_node_height_V(_synctex_node_box_visible(node)));
+}
+/**
+ * The depth of the first box enclosing node, in page coordinates.
+ * - parameter node: a node.
+ * - returns: a float.
+ * - author: JL
+ */
+float synctex_node_box_visible_depth(synctex_node_p node) {
+ return SYNCTEX_VISIBLE_SIZE(node,_synctex_node_depth_V(_synctex_node_box_visible(node)));
+}
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark Other public node attributes
+# endif
+
+/**
+ * The page number of the sheet enclosing node.
+ * - parameter node: a node.
+ * - returns: the page number or -1 if node does not belong to a sheet tree.
+ * - note: a proxy target does not belong to a sheet
+ * but a form, its page number is always -1.
+ * - note: a handles does not belong to a sheet not a form.
+ * its page number is -1.
+ * - author: JL
+ */
+int synctex_node_page(synctex_node_p node){
+ synctex_node_p parent = NULL;
+ while((parent = _synctex_tree_parent(node))) {
+ node = parent;
+ }
+ if (synctex_node_type(node) == synctex_node_type_sheet) {
+ return _synctex_data_page(node);
+ }
+ return -1;
+}
+/**
+ * The page number of the target.
+ * - author: JL
+ */
+SYNCTEX_INLINE static int _synctex_node_target_page(synctex_node_p node){
+ return synctex_node_page(_synctex_tree_target(node));
+}
+
+#if defined (SYNCTEX_USE_CHARINDEX)
+synctex_charindex_t synctex_node_charindex(synctex_node_p node) {
+ synctex_node_p target = _synctex_tree_target(node);
+ return target? SYNCTEX_CHARINDEX(target):(node?SYNCTEX_CHARINDEX(node):0);
+}
+#endif
+
+/**
+ * The tag of the node.
+ * - parameter node: a node.
+ * - returns: the tag or -1 if node is NULL.
+ * - author: JL
+ */
+int synctex_node_tag(synctex_node_p node) {
+ return node? node->class_->tlcpector->tag(node): -1;
+}
+/**
+ * The line of the node.
+ * - parameter node: a node.
+ * - returns: the line or -1 if node is NULL.
+ * - author: JL
+ */
+int synctex_node_line(synctex_node_p node) {
+ return node? node->class_->tlcpector->line(node): -1;
+}
+/**
+ * The column of the node.
+ * - parameter node: a node.
+ * - returns: the column or -1 if node is NULL.
+ * - author: JL
+ */
+int synctex_node_column(synctex_node_p node) {
+ return node? node->class_->tlcpector->column(node): -1;
+}
+/**
+ * The mean line number of the node.
+ * - parameter node: a node.
+ * - returns: the mean line or -1 if node is NULL.
+ * - author: JL
+ */
+int synctex_node_mean_line(synctex_node_p node) {
+ synctex_node_p other = _synctex_tree_target(node);
+ if (other) {
+ node = other;
+ }
+ if (_synctex_data_has_mean_line(node)) {
+ return _synctex_data_mean_line(node);
+ }
+ if ((other = synctex_node_parent(node))) {
+ if (_synctex_data_has_mean_line(other)) {
+ return _synctex_data_mean_line(other);
+ }
+ }
+ return synctex_node_line(node);
+}
+/**
+ * The weight of the node.
+ * - parameter node: a node.
+ * - returns: the weight or -1 if node is NULL.
+ * - author: JL
+ */
+int synctex_node_weight(synctex_node_p node) {
+ synctex_node_p target = _synctex_tree_target(node);
+ if (target) {
+ node = target;
+ }
+ return node?(synctex_node_type(node)==synctex_node_type_hbox?_synctex_data_weight(node):0):-1;
+}
+/**
+ * The number of children of the node.
+ * - parameter node: a node.
+ * - returns: the count or -1 if node is NULL.
+ * - author: JL
+ */
+int synctex_node_child_count(synctex_node_p node) {
+ synctex_node_p target = _synctex_tree_target(node);
+ if (target) {
+ node = target;
+ }
+ return node?(synctex_node_type(node)==synctex_node_type_hbox?_synctex_data_weight(node):0):-1;
+}
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark Sheet & Form
+# endif
+
+/**
+ * The sheet of the scanner with a given page number.
+ * - parameter scanner: a scanner.
+ * - parameter page: a 1 based page number.
+ * If page == 0, returns the first sheet.
+ * - returns: a sheet or NULL.
+ * - author: JL
+ */
+synctex_node_p synctex_sheet(synctex_scanner_p scanner,int page) {
+ if (scanner) {
+ synctex_node_p sheet = scanner->sheet;
+ while(sheet) {
+ if (page == _synctex_data_page(sheet)) {
+ return sheet;
+ }
+ sheet = __synctex_tree_sibling(sheet);
+ }
+ if (page == 0) {
+ return scanner->sheet;
+ }
+ }
+ return NULL;
+}
+/**
+ * The form of the scanner with a given tag.
+ * - parameter scanner: a scanner.
+ * - parameter tag: an integer identifier.
+ * If tag == 0, returns the first form.
+ * - returns: a form.
+ * - author: JL
+ */
+synctex_node_p synctex_form(synctex_scanner_p scanner,int tag) {
+ if (scanner) {
+ synctex_node_p form = scanner->form;
+ while(form) {
+ if (tag == _synctex_data_tag(form)) {
+ return form;
+ }
+ form = __synctex_tree_sibling(form);
+ }
+ if (tag == 0) {
+ return scanner->form;
+ }
+ }
+ return NULL;
+}
+
+/**
+ * The content of the sheet with given page number.
+ * - parameter scanner: a scanner.
+ * - parameter page: a 1 based page number.
+ * - returns: a (vertical) box node.
+ * - author: JL
+ */
+synctex_node_p synctex_sheet_content(synctex_scanner_p scanner,int page) {
+ if (scanner) {
+ return _synctex_tree_child(synctex_sheet(scanner,page));
+ }
+ return NULL;
+}
+
+/**
+ * The content of the sheet with given page number.
+ * - parameter scanner: a scanner.
+ * - parameter tag: an integer identifier.
+ * - returns: a box node.
+ * - author: JL
+ */
+synctex_node_p synctex_form_content(synctex_scanner_p scanner,int tag) {
+ if (scanner) {
+ return _synctex_tree_child(synctex_form(scanner,tag));
+ }
+ return NULL;
+}
+
+SYNCTEX_INLINE static synctex_node_p _synctex_scanner_friend(synctex_scanner_p scanner,int i) {
+ if (i>=0) {
+ i = _synctex_abs(i)%(scanner->number_of_lists);
+ return (scanner->lists_of_friends)[i];
+ }
+ return NULL;
+}
+SYNCTEX_INLINE static synctex_bool_t _synctex_nodes_are_friend(synctex_node_p left, synctex_node_p right) {
+ return synctex_node_tag(left) == synctex_node_tag(right) && synctex_node_line(left) == synctex_node_line(right);
+}
+/**
+ * The sibling argument is a parent/child list of nodes of the same page.
+ */
+typedef struct {
+ int count;
+ synctex_node_p node;
+} synctex_counted_node_s;
+
+SYNCTEX_INLINE static synctex_counted_node_s _synctex_vertically_sorted_v2(synctex_node_p sibling) {
+ /* Clean the weights of the parents */
+ synctex_counted_node_s result = {0, NULL};
+ synctex_node_p h = NULL;
+ synctex_node_p next_h = NULL;
+ synctex_node_p parent = NULL;
+ int weight = 0;
+ synctex_node_p N = NULL;
+ h = sibling;
+ do {
+ N = _synctex_tree_target(h);
+ parent = _synctex_tree_parent(N);
+ _synctex_data_set_weight(parent, 0);
+ } while((h = _synctex_tree_child(h)));
+ /* Compute the weights of the nodes */
+ h = sibling;
+ do {
+ N = _synctex_tree_target(h);
+ parent = _synctex_tree_parent(N);
+ weight = _synctex_data_weight(parent);
+ if (weight==0) {
+ N = _synctex_tree_child(parent);
+ do {
+ if (_synctex_nodes_are_friend(N,sibling)) {
+ ++ weight;
+ }
+ } while ((N = __synctex_tree_sibling(N)));
+ _synctex_data_set_weight(h,weight);
+ _synctex_data_set_weight(parent,weight);
+ }
+ } while((h = _synctex_tree_child(h)));
+ /* Order handle nodes according to the weight */
+ h = _synctex_tree_reset_child(sibling);
+ result.node = sibling;
+ weight = 0;
+ while((h)) {
+ N = result.node;
+ if (_synctex_data_weight(h)>_synctex_data_weight(N)) {
+ next_h = _synctex_tree_set_child(h,N);
+ result.node = h;
+ } else if (_synctex_data_weight(h) == 0) {
+ ++ weight;
+ next_h = _synctex_tree_reset_child(h);
+ synctex_node_free(h);
+ } else {
+ synctex_node_p next_N = NULL;
+ while((next_N = _synctex_tree_child(N))) {
+ N = next_N;
+ if (_synctex_data_weight(h)<_synctex_data_weight(next_N)) {
+ continue;
+ }
+ break;
+ }
+ next_h = _synctex_tree_set_child(h,_synctex_tree_set_child(N,h));
+ }
+ h = next_h;
+ };
+ h = result.node;
+ weight = 0;
+ do {
+ ++weight;
+ } while((h = _synctex_tree_child(h)));
+ result.count = 1;
+ h = result.node;
+ while((next_h = _synctex_tree_child(h))) {
+ if (_synctex_data_weight(next_h)==0) {
+ _synctex_tree_reset_child(h);
+ weight = 1;
+ h = next_h;
+ while((h = _synctex_tree_child(h))) {
+ ++weight;
+ }
+ synctex_node_free(next_h);
+ break;
+ }
+ ++result.count;
+ h = next_h;
+ }
+ return result;
+}
+
+SYNCTEX_INLINE static synctex_bool_t _synctex_point_in_box_v2(synctex_point_p hitP, synctex_node_p node);
+
+/* This struct records distances, the left one is non negative and the right one is non positive.
+ * When comparing the locations of 2 different graphical objects on the page, we will have to also record the
+ * horizontal distance as signed to keep track of the typesetting order.*/
+
+typedef struct {
+ synctex_node_p node;
+ int distance;
+} synctex_nd_s;
+
+#define SYNCTEX_ND_0 (synctex_nd_s){NULL,INT_MAX}
+
+typedef synctex_nd_s * synctex_nd_p;
+
+typedef struct {
+ synctex_nd_s l;
+ synctex_nd_s r;
+} synctex_nd_lr_s;
+
+/* The best container is the deeper box that contains the hit point (H,V).
+ * _synctex_eq_deepest_container_v2 starts with node whereas
+ * _synctex_box_child_deepest starts with node's children, if any
+ * if node is not a box, or a void box, NULL is returned.
+ * We traverse the node tree in a deep first manner and stop as soon as a result is found. */
+static synctex_node_p _synctex_eq_deepest_container_v2(synctex_point_p hitP, synctex_node_p node);
+
+SYNCTEX_INLINE static synctex_nd_lr_s _synctex_eq_get_closest_children_in_box_v2(synctex_point_p hitP, synctex_node_p node);
+
+/* Closest child, recursive. */
+static synctex_nd_s __synctex_closest_deep_child_v2(synctex_point_p hitP, synctex_node_p node);
+
+/* The smallest container between two has the smallest width or height.
+ * This comparison is used when there are 2 overlapping boxes that contain the hit point.
+ * For ConTeXt, the problem appears at each page.
+ * The chosen box is the one with the smallest height, then the smallest width. */
+SYNCTEX_INLINE static synctex_node_p _synctex_smallest_container_v2(synctex_node_p node, synctex_node_p other_node);
+
+/* Returns the distance between the hit point hit point=(H,V) and the given node. */
+
+static int _synctex_point_node_distance_v2(synctex_point_p hitP, synctex_node_p node);
+
+/* The closest container is the box that is the one closest to the given point.
+ * The "visible" version takes into account the visible dimensions instead of the real ones given by TeX. */
+static synctex_nd_s _synctex_eq_closest_child_v2(synctex_point_p hitP, synctex_node_p node);
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark Queries
+# endif
+
+/**
+ * iterator for a deep first tree traversal.
+ */
+struct synctex_iterator_t {
+ synctex_node_p seed;
+ synctex_node_p top;
+ synctex_node_p next;
+ int count0;
+ int count;
+};
+
+SYNCTEX_INLINE static synctex_iterator_p _synctex_iterator_new(synctex_node_p result, int count) {
+ synctex_iterator_p iterator;
+ if ((iterator = _synctex_malloc(sizeof(synctex_iterator_s)))) {
+ iterator->seed = iterator->top = iterator->next = result;
+ iterator->count0 = iterator->count = count;
+ }
+ return iterator;
+};
+
+void synctex_iterator_free(synctex_iterator_p iterator) {
+ if (iterator) {
+ synctex_node_free(iterator->seed);
+ _synctex_free(iterator);
+ }
+}
+synctex_bool_t synctex_iterator_has_next(synctex_iterator_p iterator) {
+ return iterator?iterator->count>0:0;
+}
+int synctex_iterator_count(synctex_iterator_p iterator) {
+ return iterator? iterator->count: 0;
+}
+
+/**
+ * The next result of the iterator.
+ * Internally, the iterator stores handles to nodes.
+ * Externally, it returns the targets,
+ * such that the caller only sees nodes.
+ */
+synctex_node_p synctex_iterator_next_result(synctex_iterator_p iterator) {
+ if (iterator && iterator->count>0) {
+ synctex_node_p N = iterator->next;
+ if(!(iterator->next = _synctex_tree_child(N))) {
+ iterator->next = iterator->top = __synctex_tree_sibling(iterator->top);
+ }
+ --iterator->count;
+ return _synctex_tree_target(N);
+ }
+ return NULL;
+}
+int synctex_iterator_reset(synctex_iterator_p iterator) {
+ if (iterator) {
+ iterator->next = iterator->top = iterator->seed;
+ return iterator->count = iterator->count0;
+ }
+ return 0;
+}
+
+synctex_iterator_p synctex_iterator_new_edit(synctex_scanner_p scanner,int page,float h,float v){
+ if (scanner) {
+ synctex_node_p sheet = NULL;
+ synctex_point_s hit;
+ synctex_node_p node = NULL;
+ synctex_nd_lr_s nds = {{NULL,0},{NULL,0}};
+ if (NULL == (scanner = synctex_scanner_parse(scanner)) || 0 >= scanner->unit) {/* scanner->unit must be >0 */
+ return NULL;
+ }
+ /* Find the proper sheet */
+ sheet = synctex_sheet(scanner,page);
+ if (NULL == sheet) {
+ return NULL;
+ }
+ /* Now sheet points to the sheet node with proper page number. */
+ /* Now that scanner has been initialized, we can convert
+ * the given point to scanner integer coordinates */
+ hit = (synctex_point_s)
+ {(h-scanner->x_offset)/scanner->unit,
+ (v-scanner->y_offset)/scanner->unit};
+ /* At first, we browse all the horizontal boxes of the sheet
+ * until we find one containing the hit point. */
+ if ((node = _synctex_tree_next_hbox(sheet))) {
+ do {
+ if (_synctex_point_in_box_v2(&hit,node)) {
+ /* Maybe the hit point belongs to a contained vertical box.
+ * This is the most likely situation.
+ */
+ synctex_node_p next = node;
+#if defined(SYNCTEX_DEBUG)
+ printf("--- We are lucky\n");
+#endif
+ /* This trick is for catching overlapping boxes */
+ while ((next = _synctex_tree_next_hbox(next))) {
+ if (_synctex_point_in_box_v2(&hit,next)) {
+ node = _synctex_smallest_container_v2(next,node);
+ }
+ }
+ /* node is the smallest horizontal box that contains hit,
+ * unless there is no hbox at all.
+ */
+ node = _synctex_eq_deepest_container_v2(&hit, node);
+ nds = _synctex_eq_get_closest_children_in_box_v2(&hit, node);
+ end:
+ if (nds.r.node && nds.l.node) {
+ if ((_synctex_data_tag(nds.r.node)!=_synctex_data_tag(nds.l.node))
+ || (_synctex_data_line(nds.r.node)!=_synctex_data_line(nds.l.node))
+ || (_synctex_data_column(nds.r.node)!=_synctex_data_column(nds.l.node))) {
+ if (_synctex_data_line(nds.r.node)<_synctex_data_line(nds.l.node)) {
+ node = nds.r.node;
+ nds.r.node = nds.l.node;
+ nds.l.node = node;
+ } else if (_synctex_data_line(nds.r.node)==_synctex_data_line(nds.l.node)) {
+ if (nds.l.distance>nds.r.distance) {
+ node = nds.r.node;
+ nds.r.node = nds.l.node;
+ nds.l.node = node;
+ }
+ }
+ if((node = _synctex_new_handle_with_target(nds.l.node))) {
+ synctex_node_p other_handle;
+ if((other_handle = _synctex_new_handle_with_target(nds.r.node))) {
+ _synctex_tree_set_sibling(node,other_handle);
+ return _synctex_iterator_new(node,2);
+ }
+ return _synctex_iterator_new(node,1);
+ }
+ return NULL;
+ }
+ /* both nodes have the same input coordinates
+ * We choose the one closest to the hit point */
+ if (nds.l.distance>nds.r.distance) {
+ nds.l.node = nds.r.node;
+ }
+ nds.r.node = NULL;
+ } else if (nds.r.node) {
+ nds.l = nds.r;
+ } else if (!nds.l.node) {
+ nds.l.node = node;
+ }
+ if((node = _synctex_new_handle_with_target(nds.l.node))) {
+ return _synctex_iterator_new(node,1);
+ }
+ return 0;
+ }
+ } while ((node = _synctex_tree_next_hbox(node)));
+ /* All the horizontal boxes have been tested,
+ * None of them contains the hit point.
+ */
+ }
+ /* We are not lucky,
+ * we test absolutely all the node
+ * to find the closest... */
+ if ((node = _synctex_tree_child(sheet))) {
+#if defined(SYNCTEX_DEBUG)
+ printf("--- We are not lucky\n");
+#endif
+ nds.l = __synctex_closest_deep_child_v2(&hit, node);
+#if defined(SYNCTEX_DEBUG)
+ printf("Edit query best: %i\n", nds.l.distance);
+#endif
+ goto end;
+ }
+ }
+ return NULL;
+}
+
+/**
+ * Loop the candidate friendly list to find the ones with the proper
+ * tag and line.
+ * Returns a tree of results targeting the found candidates.
+ * At the top level each sibling has its own page number.
+ * All the results with the same page number are linked by child/parent entry.
+ * - parameter candidate: a friendly list of candidates
+ */
+static synctex_node_p _synctex_display_query_v2(synctex_node_p target, int tag, int line, synctex_bool_t exclude_box) {
+ synctex_node_p first_handle = NULL;
+ /* Search the first match */
+ if (target == NULL) {
+ return first_handle;
+ }
+ do {
+ int page;
+ if ((exclude_box
+ && _synctex_node_is_box(target))
+ || (tag != synctex_node_tag(target))
+ || (line != synctex_node_line(target))) {
+ continue;
+ }
+ /* We found a first match, create
+ * a result handle targeting that candidate. */
+ first_handle = _synctex_new_handle_with_target(target);
+ if (first_handle == NULL) {
+ return first_handle;
+ }
+ /* target is either a node,
+ * or a proxy to some node, in which case,
+ * the target's target belongs to a form,
+ * not a sheet. */
+ page = synctex_node_page(target);
+ /* Now create all the other results */
+ while ((target = _synctex_tree_friend(target))) {
+ synctex_node_p result = NULL;
+ if ((exclude_box
+ && _synctex_node_is_box(target))
+ || (tag != synctex_node_tag(target))
+ || (line != synctex_node_line(target))) {
+ continue;
+ }
+ /* Another match, same page number ? */
+ result = _synctex_new_handle_with_target(target);
+ if (NULL == result ) {
+ return first_handle;
+ }
+ /* is it the same page number ? */
+ if (synctex_node_page(target) == page) {
+ __synctex_tree_set_child(result, first_handle);
+ first_handle = result;
+ } else {
+ /* We have 2 page numbers involved */
+ __synctex_tree_set_sibling(first_handle, result);
+ while ((target = _synctex_tree_friend(target))) {
+ synctex_node_p same_page_node;
+ if ((exclude_box
+ && _synctex_node_is_box(target))
+ || (tag != synctex_node_tag(target))
+ || (line != synctex_node_line(target))) {
+ continue;
+ }
+ /* New match found, which page? */
+ result = _synctex_new_handle_with_target(target);
+ if (NULL == result) {
+ return first_handle;
+ }
+ same_page_node = first_handle;
+ page = synctex_node_page(target);
+ /* Find a result with the same page number */;
+ do {
+ if (_synctex_node_target_page(same_page_node) == page) {
+ /* Insert result between same_page_node and its child */
+ _synctex_tree_set_child(result,_synctex_tree_set_child(same_page_node,result));
+ } else if ((same_page_node = __synctex_tree_sibling(same_page_node))) {
+ continue;
+ } else {
+ /* This is a new page number */
+ __synctex_tree_set_sibling(result,first_handle);
+ first_handle = result;
+ }
+ break;
+ } while (synctex_YES);
+ }
+ return first_handle;
+ }
+ }
+ } while ((target = _synctex_tree_friend(target)));
+ return first_handle;
+}
+synctex_iterator_p synctex_iterator_new_display(synctex_scanner_p scanner,const char * name,int line,int column, int page_hint) {
+ SYNCTEX_UNUSED(column)
+ if (scanner) {
+ int tag = synctex_scanner_get_tag(scanner,name);/* parse if necessary */
+ int max_line = 0;
+ int line_offset = 1;
+ int try_count = 100;
+ synctex_node_p node = NULL;
+ synctex_node_p result = NULL;
+ if (tag == 0) {
+ printf("SyncTeX Warning: No tag for %s\n",name);
+ return NULL;
+ }
+ node = synctex_scanner_input_with_tag(scanner, tag);
+ max_line = _synctex_data_line(node);
+ /* node = NULL; */
+ if (line>max_line) {
+ line = max_line;
+ }
+ while(try_count--) {
+ if (line<=max_line) {
+ /* This loop will only be performed once for advanced viewers */
+ synctex_node_p friend = _synctex_scanner_friend(scanner,tag+line);
+ if ((node = friend)) {
+ result = _synctex_display_query_v2(node,tag,line,synctex_YES);
+ if (!result) {
+ /* We did not find any matching boundary, retry including boxes */
+ node = friend;/* no need to test it again, already done */
+ result = _synctex_display_query_v2(node,tag,line,synctex_NO);
+ }
+ /* Now reverse the order to have nodes in display order, and then keep just a few nodes.
+ * Order first the best node. */
+ /* The result is a tree. At the root level, all nodes
+ * correspond to different page numbers.
+ * Each node has a child which corresponds to the same
+ * page number if relevant.
+ * Then reorder the nodes to put first the one which fits best.
+ * The idea is to count the number of nodes
+ * with the same tag and line number in the parents
+ * and choose the ones with the biggest count.
+ */
+ if (result) {
+ /* navigate through siblings, then children */
+ synctex_node_p next_sibling = __synctex_tree_reset_sibling(result);
+ int best_match = abs(page_hint-_synctex_node_target_page(result));
+ synctex_node_p sibling;
+ int match;
+ synctex_counted_node_s cn = _synctex_vertically_sorted_v2(result);
+ int count = cn.count;
+ result = cn.node;
+ while((sibling = next_sibling)) {
+ /* What is next? Do not miss that step! */
+ next_sibling = __synctex_tree_reset_sibling(sibling);
+ cn = _synctex_vertically_sorted_v2(sibling);
+ count += cn.count;
+ sibling = cn.node;
+ match = abs(page_hint-_synctex_node_target_page(sibling));
+ if (match<best_match) {
+ /* Order this node first */
+ __synctex_tree_set_sibling(sibling,result);
+ result = sibling;
+ best_match = match;
+ } else /*if (match>=best_match)*/ {
+ __synctex_tree_set_sibling(sibling,__synctex_tree_sibling(result));
+ __synctex_tree_set_sibling(result,sibling);
+ }
+ }
+ return _synctex_iterator_new(result,count);
+ }
+ }
+# if defined(__SYNCTEX_STRONG_DISPLAY_QUERY__)
+ break;
+# else
+ line += line_offset;
+ line_offset=line_offset<0?-(line_offset-1):-(line_offset+1);
+ if (line <= 0) {
+ line += line_offset;
+ line_offset=line_offset<0?-(line_offset-1):-(line_offset+1);
+ }
+# endif
+ }
+ }
+ }
+ return NULL;
+}
+synctex_status_t synctex_display_query(synctex_scanner_p scanner,const char * name,int line,int column, int page_hint) {
+ if (scanner) {
+ synctex_iterator_free(scanner->iterator);
+ scanner->iterator = synctex_iterator_new_display(scanner, name,line,column, page_hint);
+ return synctex_iterator_count(scanner->iterator);
+ }
+ return SYNCTEX_STATUS_ERROR;
+}
+synctex_status_t synctex_edit_query(synctex_scanner_p scanner,int page,float h,float v) {
+ if (scanner) {
+ synctex_iterator_free(scanner->iterator);
+ scanner->iterator = synctex_iterator_new_edit(scanner, page, h, v);
+ return synctex_iterator_count(scanner->iterator);
+ }
+ return SYNCTEX_STATUS_ERROR;
+}
+/**
+ * The next result of a query.
+ */
+synctex_node_p synctex_scanner_next_result(synctex_scanner_p scanner) {
+ return scanner? synctex_iterator_next_result(scanner->iterator): NULL;
+}
+synctex_status_t synctex_scanner_reset_result(synctex_scanner_p scanner) {
+ return scanner? synctex_iterator_reset(scanner->iterator): SYNCTEX_STATUS_ERROR;
+}
+
+synctex_node_p synctex_node_target(synctex_node_p node) {
+ return _synctex_tree_target(node);
+}
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark Geometric utilities
+# endif
+
+/** Rougly speaking, this is:
+ * node's h coordinate - hit point's h coordinate.
+ * If node is to the right of the hit point, then this distance is positive,
+ * if node is to the left of the hit point, this distance is negative.
+ * If the argument is a pdf form reference, then the child is used and returned instead.
+ * Last Revision: Mon Apr 24 07:05:27 UTC 2017
+ */
+static synctex_nd_s _synctex_point_h_ordered_distance_v2
+(synctex_point_p hit, synctex_node_p node) {
+ synctex_nd_s nd = {node,INT_MAX};
+ if (node) {
+ int min,med,max,width;
+ switch(synctex_node_type(node)) {
+ /* The distance between a point and a box is special.
+ * It is not the euclidian distance, nor something similar.
+ * We have to take into account the particular layout,
+ * and the box hierarchy.
+ * Given a box, there are 9 regions delimited by the lines of the edges of the box.
+ * The origin being at the top left corner of the page,
+ * we also give names to the vertices of the box.
+ *
+ * 1 | 2 | 3
+ * ---A---B--->
+ * 4 | 5 | 6
+ * ---C---D--->
+ * 7 | 8 | 9
+ * v v
+ */
+ case synctex_node_type_vbox:
+ case synctex_node_type_void_vbox:
+ case synctex_node_type_void_hbox:
+ /* getting the box bounds, taking into account negative width, height and depth. */
+ width = _synctex_data_width(node);
+ min = _synctex_data_h(node);
+ max = min + (width>0?width:-width);
+ /* We always have min <= max */
+ if (hit->h<min) {
+ nd.distance = min - hit->h; /* regions 1+4+7, result is > 0 */
+ } else if (hit->h>max) {
+ nd.distance = max - hit->h; /* regions 3+6+9, result is < 0 */
+ } else {
+ nd.distance = 0; /* regions 2+5+8, inside the box, except for vertical coordinates */
+ }
+ break;
+ case synctex_node_type_proxy_vbox:
+ /* getting the box bounds, taking into account negative width, height and depth. */
+ width = synctex_node_width(node);
+ min = synctex_node_h(node);
+ max = min + (width>0?width:-width);
+ /* We always have min <= max */
+ if (hit->h<min) {
+ nd.distance = min - hit->h; /* regions 1+4+7, result is > 0 */
+ } else if (hit->h>max) {
+ nd.distance = max - hit->h; /* regions 3+6+9, result is < 0 */
+ } else {
+ nd.distance = 0; /* regions 2+5+8, inside the box, except for vertical coordinates */
+ }
+ break;
+ case synctex_node_type_hbox:
+ case synctex_node_type_proxy_hbox:
+ /* getting the box bounds, taking into account negative width, height and depth. */
+ width = synctex_node_hbox_width(node);
+ min = synctex_node_hbox_h(node);
+ max = min + (width>0?width:-width);
+ /* We always have min <= max */
+ if (hit->h<min) {
+ nd.distance = min - hit->h; /* regions 1+4+7, result is > 0 */
+ } else if (hit->h>max) {
+ nd.distance = max - hit->h; /* regions 3+6+9, result is < 0 */
+ } else {
+ nd.distance = 0; /* regions 2+5+8, inside the box, except for vertical coordinates */
+ }
+ break;
+ case synctex_node_type_kern:
+ /* IMPORTANT NOTICE: the location of the kern is recorded AFTER the move.
+ * The distance to the kern is very special,
+ * in general, there is no text material in the kern,
+ * this is why we compute the offset relative to the closest edge of the kern.*/
+ max = _synctex_data_width(node);
+ if (max<0) {
+ min = _synctex_data_h(node);
+ max = min - max;
+ } else {
+ min = -max;
+ max = _synctex_data_h(node);
+ min += max;
+ }
+ med = (min+max)/2;
+ /* positive kern: '.' means text, '>' means kern offset
+ * .............
+ * min>>>>med>>>>max
+ * ...............
+ * negative kern: '.' means text, '<' means kern offset
+ * ............................
+ * min<<<<med<<<<max
+ * .................................
+ * Actually, we do not take into account negative widths.
+ * There is a problem for such situation when there is effectively overlapping text.
+ * But this should be extremely rare. I guess that in that case, many different choices
+ * could be made, one being in contradiction with the other.
+ * It means that the best choice should be made according to the situation that occurs
+ * most frequently.
+ */
+ if (hit->h<min) {
+ nd.distance = min - hit->h + 1; /* penalty to ensure other nodes are chosen first in case of overlapping ones */
+ } else if (hit->h>max) {
+ nd.distance = max - hit->h - 1; /* same kind of penalty */
+ } else if (hit->h>med) {
+ /* do things like if the node had 0 width and was placed at the max edge + 1*/
+ nd.distance = max - hit->h + 1; /* positive, the kern is to the right of the hit point */
+ } else {
+ nd.distance = min - hit->h - 1; /* negative, the kern is to the left of the hit point */
+ }
+ break;
+ case synctex_node_type_rule:/* to do: special management */
+ case synctex_node_type_glue:
+ case synctex_node_type_math:
+ case synctex_node_type_boundary:
+ case synctex_node_type_box_bdry:
+ nd.distance = _synctex_data_h(node) - hit->h;
+ break;
+ case synctex_node_type_ref:
+ nd.node = synctex_node_child(node);
+ nd = _synctex_point_h_ordered_distance_v2(hit,nd.node);
+ break;
+ case synctex_node_type_proxy:
+ case synctex_node_type_proxy_last:
+ {
+ /* shift the hit point to be relative to the proxy origin,
+ * then compute the distance to the target
+ */
+ synctex_point_s otherHit = *hit;
+ otherHit.h -= _synctex_data_h(node);
+ otherHit.v -= _synctex_data_v(node);
+ nd.node = _synctex_tree_target(node);
+ nd = _synctex_point_h_ordered_distance_v2(&otherHit,nd.node);
+ nd.node = node;
+ }
+ default:
+ break;
+ }
+ }
+ return nd;
+}
+/** Rougly speaking, this is:
+ * node's v coordinate - hit point's v coordinate.
+ * If node is at the top of the hit point, then this distance is positive,
+ * if node is at the bottom of the hit point, this distance is negative.
+ */
+static synctex_nd_s _synctex_point_v_ordered_distance_v2
+(synctex_point_p hit, synctex_node_p node) {
+ synctex_nd_s nd = {node, INT_MAX};
+ int min,max,depth,height;
+ switch(synctex_node_type(node)) {
+ /* The distance between a point and a box is special.
+ * It is not the euclidian distance, nor something similar.
+ * We have to take into account the particular layout,
+ * and the box hierarchy.
+ * Given a box, there are 9 regions delimited by the lines of the edges of the box.
+ * The origin being at the top left corner of the page,
+ * we also give names to the vertices of the box.
+ *
+ * 1 | 2 | 3
+ * ---A---B--->
+ * 4 | 5 | 6
+ * ---C---D--->
+ * 7 | 8 | 9
+ * v v
+ */
+ case synctex_node_type_vbox:
+ case synctex_node_type_void_vbox:
+ case synctex_node_type_void_hbox:
+ /* getting the box bounds, taking into account negative width, height and depth. */
+ min = synctex_node_v(node);
+ max = min + _synctex_abs(_synctex_data_depth(node));
+ min -= _synctex_abs(_synctex_data_height(node));
+ /* We always have min <= max */
+ if (hit->v<min) {
+ nd.distance = min - hit->v; /* regions 1+2+3, result is > 0 */
+ } else if (hit->v>max) {
+ nd.distance = max - hit->v; /* regions 7+8+9, result is < 0 */
+ } else {
+ nd.distance = 0; /* regions 4.5.6, inside the box, except for horizontal coordinates */
+ }
+ break;
+ case synctex_node_type_proxy_vbox:
+ /* getting the box bounds, taking into account negative width, height and depth. */
+ min = synctex_node_v(node);
+ max = min + _synctex_abs(synctex_node_depth(node));
+ min -= _synctex_abs(synctex_node_height(node));
+ /* We always have min <= max */
+ if (hit->v<min) {
+ nd.distance = min - hit->v; /* regions 1+2+3, result is > 0 */
+ } else if (hit->v>max) {
+ nd.distance = max - hit->v; /* regions 7+8+9, result is < 0 */
+ } else {
+ nd.distance = 0; /* regions 4.5.6, inside the box, except for horizontal coordinates */
+ }
+ break;
+ case synctex_node_type_hbox:
+ case synctex_node_type_proxy_hbox:
+ /* getting the box bounds, taking into account negative height and depth. */
+ min = synctex_node_hbox_v(node);
+ depth = synctex_node_hbox_depth(node);
+ max = min + (depth>0?depth:-depth);
+ height = synctex_node_hbox_height(node);
+ min -= (height>0?height:-height);
+ /* We always have min <= max */
+ if (hit->v<min) {
+ nd.distance = min - hit->v; /* regions 1+2+3, result is > 0 */
+ } else if (hit->v>max) {
+ nd.distance = max - hit->v; /* regions 7+8+9, result is < 0 */
+ } else {
+ nd.distance = 0; /* regions 4.5.6, inside the box, except for horizontal coordinates */
+ }
+ break;
+ case synctex_node_type_rule:/* to do: special management */
+ case synctex_node_type_kern:
+ case synctex_node_type_glue:
+ case synctex_node_type_math:
+ min = _synctex_data_v(node);
+ max = min + _synctex_abs(_synctex_data_depth(_synctex_tree_parent(node)));
+ min -= _synctex_abs(_synctex_data_height(_synctex_tree_parent(node)));
+ /* We always have min <= max */
+ if (hit->v<min) {
+ nd.distance = min - hit->v; /* regions 1+2+3, result is > 0 */
+ } else if (hit->v>max) {
+ nd.distance = max - hit->v; /* regions 7+8+9, result is < 0 */
+ } else {
+ nd.distance = 0; /* regions 4.5.6, inside the box, except for horizontal coordinates */
+ }
+ break;
+ case synctex_node_type_ref:
+ nd.node = synctex_node_child(node);
+ nd = _synctex_point_v_ordered_distance_v2(hit,nd.node);
+ break;
+ case synctex_node_type_proxy:
+ case synctex_node_type_proxy_last:
+ {
+ synctex_point_s otherHit = *hit;
+ otherHit.h -= _synctex_data_h(node);
+ otherHit.v -= _synctex_data_v(node);
+ nd.node = _synctex_tree_target(node);
+ nd = _synctex_point_v_ordered_distance_v2(&otherHit,nd.node);
+ nd.node = node;
+ }
+ default: break;
+ }
+ return nd;
+}
+/**
+ * The best is the one with the smallest area.
+ * The area is width*height where width and height may be big.
+ * So there is a real risk of overflow if we stick with ints.
+ */
+SYNCTEX_INLINE static synctex_node_p _synctex_smallest_container_v2(synctex_node_p node, synctex_node_p other_node) {
+ long total_height, other_total_height;
+ unsigned long area, other_area;
+ long width = synctex_node_hbox_width(node);
+ long other_width = synctex_node_hbox_width(other_node);
+ if (width<0) {
+ width = -width;
+ }
+ if (other_width<0) {
+ other_width = -other_width;
+ }
+ total_height = _synctex_abs(synctex_node_hbox_depth(node)) + _synctex_abs(synctex_node_hbox_height(node));
+ other_total_height = _synctex_abs(synctex_node_hbox_depth(other_node)) + _synctex_abs(synctex_node_hbox_height(other_node));
+ area = total_height*width;
+ other_area = other_total_height*other_width;
+ if (area<other_area) {
+ return node;
+ }
+ if (area>other_area) {
+ return other_node;
+ }
+ if (_synctex_abs(_synctex_data_width(node))>_synctex_abs(_synctex_data_width(other_node))) {
+ return node;
+ }
+ if (_synctex_abs(_synctex_data_width(node))<_synctex_abs(_synctex_data_width(other_node))) {
+ return other_node;
+ }
+ if (total_height<other_total_height) {
+ return node;
+ }
+ if (total_height>other_total_height) {
+ return other_node;
+ }
+ return node;
+}
+
+SYNCTEX_INLINE static synctex_bool_t _synctex_point_in_box_v2(synctex_point_p hit, synctex_node_p node) {
+ if (node) {
+ if (0 == _synctex_point_h_ordered_distance_v2(hit,node).distance
+ && 0 == _synctex_point_v_ordered_distance_v2(hit,node).distance) {
+ return synctex_YES;
+ }
+ }
+ return synctex_NO;
+}
+
+static int _synctex_distance_to_box_v2(synctex_point_p hit,synctex_box_p box) {
+ /* The distance between a point and a box is special.
+ * It is not the euclidian distance, nor something similar.
+ * We have to take into account the particular layout,
+ * and the box hierarchy.
+ * Given a box, there are 9 regions delimited by the lines of the edges of the box.
+ * The origin being at the top left corner of the page,
+ * we also give names to the vertices of the box.
+ *
+ * 1 | 2 | 3
+ * ---A---B--->
+ * 4 | 5 | 6
+ * ---C---D--->
+ * 7 | 8 | 9
+ * v v
+ * In each region, there is a different formula.
+ * In the end we have a continuous distance which may not be a mathematical distance but who cares. */
+ if (hit->v<box->min.v) {
+ /* Regions 1, 2 or 3 */
+ if (hit->h<box->min.h) {
+ /* This is region 1. The distance to the box is the L1 distance PA. */
+ return box->min.v - hit->v + box->min.h - hit->h;/* Integer overflow? probability epsilon */
+ } else if (hit->h<=box->max.h) {
+ /* This is region 2. The distance to the box is the geometrical distance to the top edge. */
+ return box->min.v - hit->v;
+ } else {
+ /* This is region 3. The distance to the box is the L1 distance PB. */
+ return box->min.v - hit->v + hit->h - box->max.h;
+ }
+ } else if (hit->v<=box->max.v) {
+ /* Regions 4, 5 or 6 */
+ if (hit->h<box->min.h) {
+ /* This is region 4. The distance to the box is the geometrical distance to the left edge. */
+ return box->min.h - hit->h;
+ } else if (hit->h<=box->max.h) {
+ /* This is region 5. We are inside the box. */
+ return 0;
+ } else {
+ /* This is region 6. The distance to the box is the geometrical distance to the right edge. */
+ return hit->h - box->max.h;
+ }
+ } else {
+ /* Regions 7, 8 or 9 */
+ if (hit->h<box->min.h) {
+ /* This is region 7. The distance to the box is the L1 distance PC. */
+ return hit->v - box->max.v + box->min.h - hit->h;
+ } else if (hit->h<=box->max.h) {
+ /* This is region 8. The distance to the box is the geometrical distance to the top edge. */
+ return hit->v - box->max.v;
+ } else {
+ /* This is region 9. The distance to the box is the L1 distance PD. */
+ return hit->v - box->max.v + hit->h - box->max.h;
+ }
+ }
+}
+
+/**
+ * The distance from the hit point to the node.
+ */
+static int _synctex_point_node_distance_v2(synctex_point_p hit, synctex_node_p node) {
+ int d = INT_MAX;
+ if (node) {
+ synctex_box_s box = {{0,0},{0,0}};
+ int dd = INT_MAX;
+ switch(synctex_node_type(node)) {
+ case synctex_node_type_vbox:
+ box.min.h = _synctex_data_h(node);
+ box.max.h = box.min.h + _synctex_abs(_synctex_data_width(node));
+ box.min.v = synctex_node_v(node);
+ box.max.v = box.min.v + _synctex_abs(_synctex_data_depth(node));
+ box.min.v -= _synctex_abs(_synctex_data_height(node));
+ return _synctex_distance_to_box_v2(hit,&box);
+ case synctex_node_type_proxy_vbox:
+ box.min.h = synctex_node_h(node);
+ box.max.h = box.min.h + _synctex_abs(synctex_node_width(node));
+ box.min.v = synctex_node_v(node);
+ box.max.v = box.min.v + _synctex_abs(synctex_node_depth(node));
+ box.min.v -= _synctex_abs(synctex_node_height(node));
+ return _synctex_distance_to_box_v2(hit,&box);
+ case synctex_node_type_hbox:
+ case synctex_node_type_proxy_hbox:
+ box.min.h = synctex_node_hbox_h(node);
+ box.max.h = box.min.h + _synctex_abs(synctex_node_hbox_width(node));
+ box.min.v = synctex_node_hbox_v(node);
+ box.max.v = box.min.v + _synctex_abs(synctex_node_hbox_depth(node));
+ box.min.v -= _synctex_abs(synctex_node_hbox_height(node));
+ return _synctex_distance_to_box_v2(hit,&box);
+ case synctex_node_type_void_vbox:
+ case synctex_node_type_void_hbox:
+ /* best of distances from the left edge and right edge*/
+ box.min.h = _synctex_data_h(node);
+ box.max.h = box.min.h;
+ box.min.v = _synctex_data_v(node);
+ box.max.v = box.min.v + _synctex_abs(_synctex_data_depth(node));
+ box.min.v -= _synctex_abs(_synctex_data_height(node));
+ d = _synctex_distance_to_box_v2(hit,&box);
+ box.min.h = box.min.h + _synctex_abs(_synctex_data_width(node));
+ box.max.h = box.min.h;
+ dd = _synctex_distance_to_box_v2(hit,&box);
+ return d<dd ? d:dd;
+ case synctex_node_type_kern:
+ box.min.h = _synctex_data_h(node);
+ box.max.h = box.min.h;
+ box.max.v = _synctex_data_v(node);
+ box.min.v = box.max.v - _synctex_abs(_synctex_data_height(_synctex_tree_parent(node)));
+ d = _synctex_distance_to_box_v2(hit,&box);
+ box.min.h -= _synctex_data_width(node);
+ box.max.h = box.min.h;
+ dd = _synctex_distance_to_box_v2(hit,&box);
+ return d<dd ? d:dd;
+ case synctex_node_type_glue:
+ case synctex_node_type_math:
+ case synctex_node_type_boundary:
+ case synctex_node_type_box_bdry:
+ box.min.h = _synctex_data_h(node);
+ box.max.h = box.min.h;
+ box.max.v = _synctex_data_v(node);
+ box.min.v = box.max.v - _synctex_abs(_synctex_data_height(_synctex_tree_parent(node)));
+ return _synctex_distance_to_box_v2(hit,&box);
+ case synctex_node_type_proxy:
+ case synctex_node_type_proxy_last:
+ {
+ synctex_point_s otherHit = *hit;
+ otherHit.h -= _synctex_data_h(node);
+ otherHit.v -= _synctex_data_v(node);
+ return _synctex_point_node_distance_v2(&otherHit, _synctex_tree_target(node));
+ }
+ default: break;
+ }
+ }
+ return d;
+}
+static synctex_node_p _synctex_eq_deepest_container_v2(synctex_point_p hit, synctex_node_p node) {
+ if (node) {
+ /**/
+ synctex_node_p child;
+ if ((child = synctex_node_child(node))) {
+ /* Non void hbox or vbox, form ref or proxy */
+ /* We go deep first because some boxes have 0 dimensions
+ * despite they do contain some black material.
+ */
+ do {
+ if ((_synctex_point_in_box_v2(hit,child))) {
+ synctex_node_p deep = _synctex_eq_deepest_container_v2(hit,child);
+ if (deep) {
+ /* One of the children contains the hit. */
+ return deep;
+ }
+ }
+ } while((child = synctex_node_sibling(child)));
+ /* is the hit point inside the box? */
+ if (synctex_node_type(node) == synctex_node_type_vbox
+ || synctex_node_type(node) == synctex_node_type_proxy_vbox) {
+ /* For vboxes we try to use some node inside.
+ * Walk through the list of siblings until we find the closest one.
+ * Only consider siblings with children inside. */
+ if ((child = _synctex_tree_child(node))) {
+ synctex_nd_s best = SYNCTEX_ND_0;
+ do {
+ if (_synctex_tree_child(child)) {
+ int d = _synctex_point_node_distance_v2(hit,child);
+ if (d <= best.distance) {
+ best = (synctex_nd_s){child, d};
+ }
+ }
+ } while((child = __synctex_tree_sibling(child)));
+ if (best.node) {
+ return best.node;
+ }
+ }
+ }
+ if (_synctex_point_in_box_v2(hit,node)) {
+ return node;
+ }
+ }
+ }
+ return NULL;
+}
+static synctex_nd_s _synctex_eq_deepest_container_v3(synctex_point_p hit, synctex_node_p node) {
+ if (node) {
+ synctex_node_p child = NULL;
+ if ((child = synctex_node_child(node))) {
+ /* Non void hbox, vbox, box proxy or form ref */
+ /* We go deep first because some boxes have 0 dimensions
+ * despite they do contain some black material.
+ */
+ do {
+ synctex_nd_s deep = _synctex_eq_deepest_container_v3(hit, child);
+ if (deep.node) {
+ /* One of the children contains the hit-> */
+ return deep;
+ }
+ } while((child = synctex_node_sibling(child)));
+ /* For vboxes we try to use some node inside.
+ * Walk through the list of siblings until we find the closest one.
+ * Only consider siblings with children inside. */
+ if (synctex_node_type(node) == synctex_node_type_vbox
+ || synctex_node_type(node) == synctex_node_type_proxy_vbox) {
+ if ((child = synctex_node_child(node))) {
+ synctex_nd_s best = SYNCTEX_ND_0;
+ do {
+ if (synctex_node_child(child)) {
+ int d = _synctex_point_node_distance_v2(hit,child);
+ if (d < best.distance) {
+ best = (synctex_nd_s){child,d};
+ }
+ }
+ } while((child = synctex_node_sibling(child)));
+ if (best.node) {
+ return best;
+ }
+ }
+ }
+ /* is the hit point inside the box? */
+ if (_synctex_point_in_box_v2(hit,node)) {
+ return (synctex_nd_s){node, 0};
+ }
+ }
+ }
+ return SYNCTEX_ND_0;
+}
+
+/* Compares the locations of the hit point with the locations of
+ * the various nodes contained in the box.
+ * As it is an horizontal box, we only compare horizontal coordinates.
+ */
+SYNCTEX_INLINE static synctex_nd_lr_s __synctex_eq_get_closest_children_in_hbox_v2(synctex_point_p hitP, synctex_node_p node) {
+ synctex_nd_s childd = SYNCTEX_ND_0;
+ synctex_nd_lr_s nds = {SYNCTEX_ND_0,SYNCTEX_ND_0};
+ if ((childd.node = synctex_node_child(node))) {
+ synctex_nd_s nd = SYNCTEX_ND_0;
+ do {
+ childd = _synctex_point_h_ordered_distance_v2(hitP,childd.node);
+ if (childd.distance > 0) {
+ /* node is to the right of the hit point.
+ * We compare node and the previously recorded one, through the recorded distance.
+ * If the nodes have the same tag, prefer the one with the smallest line number,
+ * if the nodes also have the same line number, prefer the one with the smallest column. */
+ if (nds.r.distance > childd.distance) {
+ nds.r = childd;
+ } else if (nds.r.distance == childd.distance && nds.r.node) {
+ if (_synctex_data_tag(nds.r.node) == _synctex_data_tag(childd.node)
+ && (_synctex_data_line(nds.r.node) > _synctex_data_line(childd.node)
+ || (_synctex_data_line(nds.r.node) == _synctex_data_line(childd.node)
+ && _synctex_data_column(nds.r.node) > _synctex_data_column(childd.node)))) {
+ nds.r = childd;
+ }
+ }
+ } else if (childd.distance == 0) {
+ /* hit point is inside node. */
+ if (_synctex_tree_child(childd.node)) {
+ return _synctex_eq_get_closest_children_in_box_v2(hitP, childd.node);
+ }
+ nds.l = childd;
+ } else { /* here childd.distance < 0, the hit point is to the right of node */
+ childd.distance = -childd.distance;
+ if (nds.l.distance > childd.distance) {
+ nds.l = childd;
+ } else if (nds.l.distance == childd.distance && nds.l.node) {
+ if (_synctex_data_tag(nds.l.node) == _synctex_data_tag(childd.node)
+ && (_synctex_data_line(nds.l.node) > _synctex_data_line(childd.node)
+ || (_synctex_data_line(nds.l.node) == _synctex_data_line(childd.node)
+ && _synctex_data_column(nds.l.node) > _synctex_data_column(childd.node)))) {
+ nds.l = childd;
+ }
+ }
+ }
+ } while((childd.node = synctex_node_sibling(childd.node)));
+ if (nds.l.node) {
+ /* the left node is new, try to narrow the result */
+ if ((nd = _synctex_eq_deepest_container_v3(hitP,nds.l.node)).node) {
+ nds.l = nd;
+ }
+ if((nd = __synctex_closest_deep_child_v2(hitP,nds.l.node)).node) {
+ nds.l.node = nd.node;
+ }
+ }
+ if (nds.r.node) {
+ /* the right node is new, try to narrow the result */
+ if ((nd = _synctex_eq_deepest_container_v3(hitP,nds.r.node)).node) {
+ nds.r = nd;
+ }
+ if((nd = __synctex_closest_deep_child_v2(hitP,nds.r.node)).node) {
+ nds.r.node = nd.node;
+ }
+ }
+ }
+ return nds;
+}
+
+#if 0
+SYNCTEX_INLINE static synctex_nd_lr_s __synctex_eq_get_closest_children_in_hbox_v3(synctex_point_p hitP, synctex_node_p nodeP) {
+ synctex_nd_s nd = SYNCTEX_ND_0;
+ synctex_nd_lr_s nds = {SYNCTEX_ND_0,SYNCTEX_ND_0};
+ if ((nd.node = _synctex_tree_child(nodeP))) {
+ do {
+ nd = _synctex_point_h_ordered_distance_v2(hitP,nd.node);
+ if (nd.distance > 0) {
+ /* node is to the right of the hit point.
+ * We compare node and the previously recorded one, through the recorded distance.
+ * If the nodes have the same tag, prefer the one with the smallest line number,
+ * if the nodes also have the same line number, prefer the one with the smallest column. */
+ if (nds.r.distance > nd.distance) {
+ nds.r = nd;
+ } else if (nds.r.distance == nd.distance && nds.r.node) {
+ if (_synctex_data_tag(nds.r.node) == _synctex_data_tag(nd.node)
+ && (_synctex_data_line(nds.r.node) > _synctex_data_line(nd.node)
+ || (_synctex_data_line(nds.r.node) == _synctex_data_line(nd.node)
+ && _synctex_data_column(nds.r.node) > _synctex_data_column(nd.node)))) {
+ nds.r = nd;
+ }
+ }
+ } else if (nd.distance == 0) {
+ /* hit point is inside node. */
+ nds.l = nd;
+ } else { /* here nd.d < 0, the hit point is to the right of node */
+ nd.distance = -nd.distance;
+ if (nds.l.distance > nd.distance) {
+ nds.l = nd;
+ } else if (nds.l.distance == nd.distance && nds.l.node) {
+ if (_synctex_data_tag(nds.l.node) == _synctex_data_tag(nd.node)
+ && (_synctex_data_line(nds.l.node) > _synctex_data_line(nd.node)
+ || (_synctex_data_line(nds.l.node) == _synctex_data_line(nd.node)
+ && _synctex_data_column(nds.l.node) > _synctex_data_column(nd.node)))) {
+ nds.l = nd;
+ }
+ }
+ }
+ } while((nd.node = __synctex_tree_sibling(nd.node)));
+ if (nds.l.node) {
+ /* the left node is new, try to narrow the result */
+ if ((nd.node = _synctex_eq_deepest_container_v2(hitP,nds.l.node))) {
+ nds.l.node = nd.node;
+ }
+ if((nd = _synctex_eq_closest_child_v2(hitP,nds.l.node)).node) {
+ nds.l.node = nd.node;
+ }
+ }
+ if (nds.r.node) {
+ /* the right node is new, try to narrow the result */
+ if ((nd.node = _synctex_eq_deepest_container_v2(hitP,nds.r.node))) {
+ nds.r.node = nd.node;
+ }
+ if((nd = _synctex_eq_closest_child_v2(hitP,nds.r.node)).node) {
+ nds.r.node = nd.node;
+ }
+ }
+ }
+ return nds;
+}
+#endif
+SYNCTEX_INLINE static synctex_nd_lr_s __synctex_eq_get_closest_children_in_vbox_v2(synctex_point_p hitP, synctex_node_p nodeP) {
+ SYNCTEX_UNUSED(nodeP)
+ synctex_nd_lr_s nds = {SYNCTEX_ND_0,SYNCTEX_ND_0};
+ synctex_nd_s nd = SYNCTEX_ND_0;
+ if ((nd.node = synctex_node_child(nd.node))) {
+ do {
+ nd = _synctex_point_v_ordered_distance_v2(hitP,nd.node);
+ /* this is what makes the difference with the h version above */
+ if (nd.distance > 0) {
+ /* node is to the top of the hit point (below because TeX is oriented from top to bottom.
+ * We compare node and the previously recorded one, through the recorded distance.
+ * If the nodes have the same tag, prefer the one with the smallest line number,
+ * if the nodes also have the same line number, prefer the one with the smallest column. */
+ if (nds.r.distance > nd.distance) {
+ nds.r = nd;
+ } else if (nds.r.distance == nd.distance && nds.r.node) {
+ if (_synctex_data_tag(nds.r.node) == _synctex_data_tag(nd.node)
+ && (_synctex_data_line(nds.r.node) > _synctex_data_line(nd.node)
+ || (_synctex_data_line(nds.r.node) == _synctex_data_line(nd.node)
+ && _synctex_data_column(nds.r.node) > _synctex_data_column(nd.node)))) {
+ nds.r = nd;
+ }
+ }
+ } else if (nd.distance == 0) {
+ nds.l = nd;
+ } else { /* here nd < 0 */
+ nd.distance = -nd.distance;
+ if (nds.l.distance > nd.distance) {
+ nds.l = nd;
+ } else if (nds.l.distance == nd.distance && nds.l.node) {
+ if (_synctex_data_tag(nds.l.node) == _synctex_data_tag(nd.node)
+ && (_synctex_data_line(nds.l.node) > _synctex_data_line(nd.node)
+ || (_synctex_data_line(nds.l.node) == _synctex_data_line(nd.node)
+ && _synctex_data_column(nds.l.node) > _synctex_data_column(nd.node)))) {
+ nds.l = nd;
+ }
+ }
+ }
+ } while((nd.node = synctex_node_sibling(nd.node)));
+ if (nds.l.node) {
+ if ((nd.node = _synctex_eq_deepest_container_v2(hitP,nds.l.node))) {
+ nds.l.node = nd.node;
+ }
+ if((nd = _synctex_eq_closest_child_v2(hitP,nds.l.node)).node) {
+ nds.l.node = nd.node;
+ }
+ }
+ if (nds.r.node) {
+ if ((nd.node = _synctex_eq_deepest_container_v2(hitP,nds.r.node))) {
+ nds.r.node = nd.node;
+ }
+ if((nd = _synctex_eq_closest_child_v2(hitP,nds.r.node)).node) {
+ nds.r.node = nd.node;
+ }
+ }
+ }
+ return nds;
+}
+
+/**
+ * Get the child closest to the hit point.
+ * - parameter: hit point
+ * - parameter: containing node
+ * - returns: the child and the distance to the hit point.
+ * SYNCTEX_ND_0 if the parameter node has no children.
+ * - note: recursive call.
+ */
+static synctex_nd_s __synctex_closest_deep_child_v2(synctex_point_p hitP, synctex_node_p node) {
+ synctex_nd_s best = SYNCTEX_ND_0;
+ synctex_node_p child = NULL;
+ if ((child = synctex_node_child(node))) {
+#if defined(SYNCTEX_DEBUG)
+ printf("Closest deep child on box at line %i\n",
+ SYNCTEX_LINEINDEX(node));
+#endif
+ do {
+#if SYNCTEX_DEBUG>500
+ synctex_node_display(child);
+#endif
+ synctex_nd_s nd = SYNCTEX_ND_0;
+ if (_synctex_node_is_box(child)) {
+ nd = __synctex_closest_deep_child_v2(hitP,child);
+ } else {
+ nd = (synctex_nd_s) {child, _synctex_point_node_distance_v2(hitP,child)};
+ }
+ if (nd.distance < best.distance ||(nd.distance == best.distance
+ && synctex_node_type(nd.node) != synctex_node_type_kern)) {
+#if defined(SYNCTEX_DEBUG)
+ if(nd.node) {
+ printf("New best %i<=%i line %i\n",nd.distance,
+ best.distance,SYNCTEX_LINEINDEX(nd.node));
+ }
+#endif
+ best = nd;
+ }
+ } while((child = synctex_node_sibling(child)));
+#if defined(SYNCTEX_DEBUG)
+ if(best.node) {
+ printf("Found new best %i line %i\n",best.distance,SYNCTEX_LINEINDEX(best.node));
+ }
+#endif
+ }
+ return best;
+}
+
+/**
+ * Return the closest child.
+ * - parameter: a pointer to the hit point,
+ * - parameter: the container
+ * - return: SYNCTEX_ND_0 if node has no child,
+ * the __synctex_closest_deep_child_v2 otherwise.
+ */
+static synctex_nd_s _synctex_eq_closest_child_v2(synctex_point_p hitP, synctex_node_p node) {
+ synctex_nd_s nd = SYNCTEX_ND_0;
+ if (_synctex_node_is_box(node)) {
+ nd = __synctex_closest_deep_child_v2(hitP, node);
+ if (_synctex_node_is_box(nd.node)) {
+ synctex_node_p child = NULL;
+ if ((child = synctex_node_child(nd.node))) {
+ synctex_nd_s best = {child,_synctex_point_node_distance_v2(hitP,child)};
+ while((child = synctex_node_sibling(child))) {
+ int d = _synctex_point_node_distance_v2(hitP,child);
+ if (d < best.distance) {
+ best = (synctex_nd_s){child,d};
+ } else if (d == best.distance && synctex_node_type(child) != synctex_node_type_kern) {
+ best.node = child;
+ }
+ }
+ return best;
+ }
+ }
+ return nd;
+ }
+ return SYNCTEX_ND_0;
+}
+SYNCTEX_INLINE static synctex_nd_lr_s _synctex_eq_get_closest_children_in_box_v2(synctex_point_p hitP, synctex_node_p node) {
+ synctex_nd_lr_s nds = {SYNCTEX_ND_0,SYNCTEX_ND_0};
+ if(_synctex_tree_has_child(node)) { /* node != NULL */
+ if (node->class_->type==synctex_node_type_hbox ||
+ node->class_->type==synctex_node_type_proxy_hbox) {
+ return __synctex_eq_get_closest_children_in_hbox_v2(hitP,node);
+ } else {
+ return __synctex_eq_get_closest_children_in_vbox_v2(hitP,node);
+ }
+ }
+ return nds;
+}
+
+#ifndef SYNCTEX_NO_UPDATER
+
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark Updater
+# endif
+
+typedef int (*synctex_print_f)(synctex_updater_p, const char * , ...); /* print formatted to either FILE * or gzFile */
+typedef void (*synctex_close_f)(synctex_updater_p); /* close FILE * or gzFile */
+
+# define SYNCTEX_BITS_PER_BYTE 8
+
+typedef union {
+ gzFile as_gzFile;
+ FILE * as_FILE_p;
+ void * as_ptr;
+} synctex_file_u;
+
+struct synctex_updater_t {
+ synctex_file_u file;
+ synctex_print_f print;
+ synctex_close_f close;
+ int length; /* the number of chars appended */
+};
+
+static int _synctex_updater_print(synctex_updater_p updater, const char * format, ...) {
+ int result = 0;
+ if (updater) {
+ va_list va;
+ va_start(va, format);
+ result = vfprintf(updater->file.as_FILE_p,
+ format,
+ va);
+ va_end(va);
+ }
+ return result;
+}
+#if defined(_MSC_VER)
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+
+static int vasprintf(char **ret,
+ const char *format,
+ va_list ap)
+{
+ int len;
+ len = _vsnprintf(NULL, 0, format, ap);
+ if (len < 0) return -1;
+ *ret = malloc(len + 1);
+ if (!*ret) return -1;
+ _vsnprintf(*ret, len+1, format, ap);
+ (*ret)[len] = '\0';
+ return len;
+}
+
+#endif
+
+/**
+ * gzvprintf is not available until OSX 10.10
+ */
+static int _synctex_updater_print_gz(synctex_updater_p updater, const char * format, ...) {
+ int result = 0;
+ if (updater) {
+ char * buffer;
+ va_list va;
+ va_start(va, format);
+ if (vasprintf(&buffer, format, va) < 0) {
+ _synctex_error("Out of memory...");
+ } else if ((result = (int)strlen(buffer))) {
+ result = gzwrite(updater->file.as_gzFile, buffer, (unsigned)result);
+ }
+ va_end(va);
+ free(buffer);
+ }
+ return result;
+}
+
+static void _synctex_updater_close(synctex_updater_p updater) {
+ if (updater) {
+ fclose(updater->file.as_FILE_p);
+ }
+}
+
+static void _synctex_updater_close_gz(synctex_updater_p updater) {
+ if (updater) {
+ gzclose(updater->file.as_gzFile);
+ }
+}
+
+synctex_updater_p synctex_updater_new_with_output_file(const char * output, const char * build_directory) {
+ synctex_updater_p updater = NULL;
+ const char * mode = NULL;
+ synctex_open_s open;
+ /* prepare the updater, the memory is the only one dynamically allocated */
+ updater = (synctex_updater_p)_synctex_malloc(sizeof(synctex_updater_s));
+ if (NULL == updater) {
+ _synctex_error("! synctex_updater_new_with_file: malloc problem");
+ return NULL;
+ }
+ open = _synctex_open_v2(output,build_directory,0,synctex_ADD_QUOTES);
+ if (open.status < SYNCTEX_STATUS_OK) {
+ open = _synctex_open_v2(output,build_directory,0,synctex_DONT_ADD_QUOTES);
+ if (open.status < SYNCTEX_STATUS_OK) {
+ return_on_error:
+ _synctex_free(updater);
+ return updater = NULL;
+ }
+ }
+ /* OK, the file exists, we close it and reopen it with the correct mode.
+ * The receiver is now the owner of the "synctex" variable. */
+ gzclose(open.file);
+ updater->file.as_ptr = NULL;
+ mode = _synctex_get_io_mode_name(open.io_mode|synctex_io_append_mask);/* either "a" or "ab", depending on the file extension */
+ if (open.io_mode&synctex_io_gz_mask) {
+ if (NULL == (updater->file.as_FILE_p = fopen(open.synctex,mode))) {
+ no_write_error:
+ _synctex_error("! synctex_updater_new_with_file: Can't append to %s",open.synctex);
+ free(open.synctex);
+ goto return_on_error;
+ }
+ updater->print = &_synctex_updater_print;
+ updater->close = &_synctex_updater_close;
+ } else {
+ if (NULL == (updater->file.as_gzFile = gzopen(open.synctex,mode))) {
+ goto no_write_error;
+ }
+ updater->print = &_synctex_updater_print_gz;
+ updater->close = &_synctex_updater_close_gz;
+ }
+ printf("SyncTeX: updating %s...",open.synctex);
+ _synctex_free(open.synctex);
+ return updater;
+}
+
+void synctex_updater_append_magnification(synctex_updater_p updater, char * magnification){
+ if (NULL==updater) {
+ return;
+ }
+ if (magnification && strlen(magnification)) {
+ updater->length +=
+ updater->print(updater,"Magnification:%s\n",magnification);
+ }
+}
+
+void synctex_updater_append_x_offset(synctex_updater_p updater, char * x_offset){
+ if (NULL==updater) {
+ return;
+ }
+ if (x_offset && strlen(x_offset)) {
+ updater->length += updater->print(updater,"X Offset:%s\n",x_offset);
+ }
+}
+
+void synctex_updater_append_y_offset(synctex_updater_p updater, char * y_offset){
+ if (NULL==updater) {
+ return;
+ }
+ if (y_offset && strlen(y_offset)) {
+ updater->length += updater->print(updater,"Y Offset:%s\n",y_offset);
+ }
+}
+
+void synctex_updater_free(synctex_updater_p updater){
+ if (NULL==updater) {
+ return;
+ }
+ if (updater->length>0) {
+ updater->print(updater,"!%i\n",updater->length);
+ }
+ updater->close(updater);
+ _synctex_free(updater);
+ printf("... done.\n");
+ return;
+}
+#endif
+
+#if defined(SYNCTEX_TESTING)
+# ifdef SYNCTEX_NOTHING
+# pragma mark -
+# pragma mark Testers
+# endif
+/**
+ * The next nodes corresponds to a deep first tree traversal.
+ * Does not create child proxies as side effect contrary to
+ * the synctex_node_next method above.
+ * May loop infinitely many times if the tree
+ * is not properly built (contains loops).
+ */
+static synctex_node_p _synctex_node_next(synctex_node_p node) {
+ synctex_node_p N = _synctex_tree_child(node);
+ if (N) {
+ return N;
+ }
+ return _synctex_node_sibling_or_parents(node);
+}
+static int _synctex_input_copy_name(synctex_node_p input, char * name) {
+ char * copy = _synctex_malloc(strlen(name)+1);
+ memcpy(copy,name,strlen(name)+1);
+ _synctex_data_set_name(input,copy);
+ return 0;
+}
+int synctex_test_setup_scanner_sheets_421(synctex_scanner_p scanner) {
+ int TC = 0;
+ synctex_node_p sheet = synctex_node_new(scanner,synctex_node_type_sheet);
+ _synctex_data_set_page(sheet,4);
+ SYNCTEX_TEST_BODY(TC, _synctex_data_page(sheet)==4,"");
+ synctex_node_free(scanner->sheet);
+ scanner->sheet = sheet;
+ sheet = synctex_node_new(scanner,synctex_node_type_sheet);
+ _synctex_data_set_page(sheet,2);
+ SYNCTEX_TEST_BODY(TC, _synctex_data_page(sheet)==2,"");
+ __synctex_tree_set_sibling(sheet, scanner->sheet);
+ scanner->sheet = sheet;
+ sheet = synctex_node_new(scanner,synctex_node_type_sheet);
+ _synctex_data_set_page(sheet,1);
+ SYNCTEX_TEST_BODY(TC, _synctex_data_page(sheet)==1,"");
+ __synctex_tree_set_sibling(sheet, scanner->sheet);
+ scanner->sheet = sheet;
+ return TC;
+}
+int synctex_test_input(synctex_scanner_p scanner) {
+ int TC = 0;
+ synctex_node_p input = synctex_node_new(scanner,synctex_node_type_input);
+ _synctex_data_set_tag(input,421);
+ SYNCTEX_TEST_BODY(TC, _synctex_data_tag(input)==421,"");
+ _synctex_data_set_tag(input,124);
+ SYNCTEX_TEST_BODY(TC, _synctex_data_tag(input)==124,"");
+ _synctex_data_set_line(input,421);
+ SYNCTEX_TEST_BODY(TC, _synctex_data_line(input)==421,"");
+ _synctex_data_set_line(input,214);
+ SYNCTEX_TEST_BODY(TC, _synctex_data_line(input)==214,"");
+ _synctex_data_set_line(input,214);
+ SYNCTEX_TEST_BODY(TC, _synctex_data_line(input)==214,"");
+ _synctex_input_copy_name(input,"214");
+ SYNCTEX_TEST_BODY(TC, 0==memcmp(_synctex_data_name(input),"214",4),"");
+ _synctex_input_copy_name(input,"421421");
+
+ SYNCTEX_TEST_BODY(TC,
+ 0==memcmp(_synctex_data_name(input),
+ "421421",
+ 4),
+ "");
+ synctex_node_free(input);
+ return TC;
+}
+int synctex_test_proxy(synctex_scanner_p scanner) {
+ int TC = 0;
+ synctex_node_p proxy = synctex_node_new(scanner,synctex_node_type_proxy);
+ synctex_node_p target = synctex_node_new(scanner,synctex_node_type_rule);
+ _synctex_tree_set_target(proxy,target);
+ _synctex_data_set_tag(target,421);
+ SYNCTEX_TEST_BODY(TC, _synctex_data_tag(target)==421,"");
+ SYNCTEX_TEST_BODY(TC, synctex_node_tag(target)==421,"");
+ SYNCTEX_TEST_BODY(TC, synctex_node_tag(proxy)==421,"");
+ synctex_node_free(proxy);
+ synctex_node_free(target);
+ return TC;
+}
+int synctex_test_handle(synctex_scanner_p scanner) {
+ int TC = 0;
+ synctex_node_p handle = synctex_node_new(scanner,synctex_node_type_handle);
+ synctex_node_p proxy = synctex_node_new(scanner, synctex_node_type_proxy);
+ synctex_node_p target = synctex_node_new(scanner,synctex_node_type_rule);
+ _synctex_tree_set_target(handle,target);
+ _synctex_data_set_tag(target,421);
+ SYNCTEX_TEST_BODY(TC, _synctex_data_tag(target)==421,"");
+ SYNCTEX_TEST_BODY(TC, synctex_node_tag(target)==421,"");
+ SYNCTEX_TEST_BODY(TC, synctex_node_tag(handle)==421,"");
+ _synctex_data_set_line(target,214);
+ SYNCTEX_TEST_BODY(TC, _synctex_data_line(target)==214,"");
+ SYNCTEX_TEST_BODY(TC, synctex_node_line(target)==214,"");
+ SYNCTEX_TEST_BODY(TC, synctex_node_line(handle)==214,"");
+ _synctex_data_set_column(target,142);
+ SYNCTEX_TEST_BODY(TC, _synctex_data_column(target)==142,"");
+ SYNCTEX_TEST_BODY(TC, synctex_node_column(target)==142,"");
+ SYNCTEX_TEST_BODY(TC, synctex_node_column(handle)==142,"");
+ _synctex_tree_set_target(proxy,target);
+ _synctex_tree_set_target(handle,proxy);
+ _synctex_data_set_tag(target,412);
+ SYNCTEX_TEST_BODY(TC, _synctex_data_tag(target)==412,"");
+ SYNCTEX_TEST_BODY(TC, synctex_node_tag(target)==412,"");
+ SYNCTEX_TEST_BODY(TC, synctex_node_tag(handle)==412,"");
+ _synctex_data_set_line(target,124);
+ SYNCTEX_TEST_BODY(TC, _synctex_data_line(target)==124,"");
+ SYNCTEX_TEST_BODY(TC, synctex_node_line(target)==124,"");
+ SYNCTEX_TEST_BODY(TC, synctex_node_line(handle)==124,"");
+ _synctex_data_set_column(target,241);
+ SYNCTEX_TEST_BODY(TC, _synctex_data_column(target)==241,"");
+ SYNCTEX_TEST_BODY(TC, synctex_node_column(target)==241,"");
+ SYNCTEX_TEST_BODY(TC, synctex_node_column(handle)==241,"");
+ synctex_node_free(handle);
+ synctex_node_free(proxy);
+ synctex_node_free(target);
+ return TC;
+}
+int synctex_test_setup_scanner_input(synctex_scanner_p scanner) {
+ int TC = 0;
+ synctex_node_p input = synctex_node_new(scanner,synctex_node_type_input);
+ _synctex_data_set_tag(input,4);
+ _synctex_input_copy_name(input,"21");
+ _synctex_data_set_line(input,421);
+ synctex_node_free(scanner->input);
+ scanner->input = input;
+ SYNCTEX_TEST_BODY(TC, _synctex_data_tag(input)==4,"");
+ SYNCTEX_TEST_BODY(TC, strcmp(_synctex_data_name(input),"21")==0,"");
+ SYNCTEX_TEST_BODY(TC, _synctex_data_line(input)==421,"");
+ return TC;
+}
+int synctex_test_setup_nodes(synctex_scanner_p scanner, synctex_node_r nodes) {
+ int TC = 0;
+ int n;
+ for (n=0;n<synctex_node_number_of_types;++n) {
+ nodes[n] = synctex_node_new(scanner,n);
+ SYNCTEX_TEST_BODY(TC, nodes[n]!=NULL,"");
+ }
+ return TC;
+}
+int synctex_test_teardown_nodes(synctex_scanner_p scanner, synctex_node_r nodes) {
+ int n;
+ for (n=0;n<synctex_node_number_of_types;++n) {
+ synctex_node_free(nodes[n]);
+ nodes[n]=NULL;
+ }
+ return 1;
+}
+int synctex_test_tree(synctex_scanner_p scanner) {
+ int TC = 0;
+ synctex_node_p nodes1[synctex_node_number_of_types];
+ synctex_node_p nodes2[synctex_node_number_of_types];
+ synctex_node_p nodes3[synctex_node_number_of_types];
+ int i,j;
+ TC += synctex_test_setup_nodes(scanner,nodes1);
+ TC += synctex_test_setup_nodes(scanner,nodes2);
+ TC += synctex_test_setup_nodes(scanner,nodes3);
+ /* Every node has a sibling */
+ for (i=0;i<synctex_node_number_of_types;++i) {
+ for (j=0;j<synctex_node_number_of_types;++j) {
+ _synctex_tree_set_sibling(nodes1[i],nodes2[i]);
+ SYNCTEX_TEST_BODY(TC, nodes2[i]==synctex_node_sibling(nodes1[i]),"");
+ }
+ }
+ synctex_test_teardown_nodes(scanner,nodes3);
+ synctex_test_teardown_nodes(scanner,nodes2);
+ synctex_test_teardown_nodes(scanner,nodes1);
+ return TC;
+}
+int synctex_test_page(synctex_scanner_p scanner) {
+ int TC = synctex_test_setup_scanner_sheets_421(scanner);
+ synctex_node_p sheet = scanner->sheet;
+ synctex_node_p node = synctex_node_new(scanner,synctex_node_type_rule);
+ _synctex_data_set_tag(node,4);
+ _synctex_data_set_line(node,21);
+ synctex_node_free(_synctex_node_set_child(sheet,node));
+ SYNCTEX_TEST_BODY(TC, synctex_node_page(node)==synctex_node_page(sheet),"");
+ return TC;
+}
+int synctex_test_display_query(synctex_scanner_p scanner) {
+ int TC = synctex_test_setup_scanner_sheets_421(scanner);
+ synctex_node_p sheet = scanner->sheet;
+ synctex_node_p node = synctex_node_new(scanner,synctex_node_type_rule);
+ _synctex_data_set_tag(node,4);
+ _synctex_data_set_line(node,21);
+ synctex_node_free(_synctex_node_set_child(sheet,node));
+ SYNCTEX_TEST_BODY(TC, node==synctex_node_child(sheet),"");
+ __synctex_node_make_friend_tlc(node);
+ SYNCTEX_TEST_BODY(TC, _synctex_scanner_friend(scanner, 25)==node,"");
+ sheet = __synctex_tree_sibling(sheet);
+ node = synctex_node_new(scanner,synctex_node_type_rule);
+ _synctex_data_set_tag(node,4);
+ _synctex_data_set_line(node,21);
+ synctex_node_free(_synctex_node_set_child(sheet,node));
+ SYNCTEX_TEST_BODY(TC, node==synctex_node_child(sheet),"");
+ __synctex_node_make_friend_tlc(node);
+ SYNCTEX_TEST_BODY(TC, _synctex_scanner_friend(scanner, 25)==node,"");
+ sheet = __synctex_tree_sibling(sheet);
+ node = synctex_node_new(scanner,synctex_node_type_rule);
+ _synctex_data_set_tag(node,4);
+ _synctex_data_set_line(node,21);
+ synctex_node_free(_synctex_node_set_child(sheet,node));
+ SYNCTEX_TEST_BODY(TC, node==synctex_node_child(sheet),"");
+ __synctex_node_make_friend_tlc(node);
+ SYNCTEX_TEST_BODY(TC, (_synctex_scanner_friend(scanner, 25)==node),"");
+ synctex_test_setup_scanner_input(scanner);
+ scanner->flags.has_parsed = synctex_YES;
+#if 1
+ SYNCTEX_TEST_BODY(TC, (synctex_display_query(scanner,"21",21,4,-1)==3),"");
+#endif
+ return TC;
+}
+typedef struct {
+ int s; /* status */
+ char n[25]; /* name */
+} synctex_test_sn_s;
+
+synctex_test_sn_s synctex_test_tmp_sn(char * content) {
+ synctex_test_sn_s sn = {0, "/tmp/test.XXXXXX.synctex"};
+ FILE *sfp;
+ int fd = mkstemps(sn.n,8);
+ if (fd < 0) {
+ fprintf(stderr, "%s: %s\n", sn.n, strerror(errno));
+ sn.s = -1;
+ return sn;
+ }
+ if ((sfp = fdopen(fd, "w+")) == NULL) {
+ unlink(sn.n);
+ close(fd);
+ fprintf(stderr, "%s: %s\n", sn.n, strerror(errno));
+ sn.s = -2;
+ return sn;
+ }
+ sn.s = fputs(content,sfp);
+ printf("temp:%s\n%i\n",sn.n,sn.s);
+ fclose(sfp);
+ if (sn.s==0) {
+ sn.s = -2;
+ unlink(sn.n);
+ }
+ return sn;
+}
+int synctex_test_sheet_1() {
+ int TC = 0;
+ char * content =
+ "SyncTeX Version:1 \n" /*00-19*/
+ "Input:1:./1.tex \n" /*20-39*/
+ "Output:pdf \n" /*40-59*/
+ "Magnification:100000000 \n" /*60-89*/
+ "Unit:1 \n" /*90-99*/
+ "X Offset:0 \n" /*00-19*/
+ "Y Offset:0 \n" /*20-39*/
+ "Content: \n" /*40-49*/
+ "{1 \n" /*50-59*/
+ "[1,10:20,350:330,330,0 \n" /*60-89*/
+ "] \n" /*90-99*/
+ "} \n" /*00-09*/
+ "Postamble:\n";
+ synctex_test_sn_s sn = synctex_test_tmp_sn(content);
+ if (sn.s>0) {
+ synctex_scanner_p scanner = synctex_scanner_new_with_output_file(sn.n, NULL, synctex_YES);
+ synctex_node_p node = synctex_scanner_handle(scanner);
+ printf("Created nodes:\n");
+ while (node) {
+ printf("%s\n",_synctex_node_abstract(node));
+ node = synctex_node_next(node);
+ }
+ synctex_scanner_free(scanner);
+ unlink(sn.n);
+ } else {
+ ++TC;
+ }
+ return TC;
+}
+int synctex_test_sheet_2() {
+ int TC = 0;
+ char * content =
+ "SyncTeX Version:1 \n" /*00-19*/
+ "Input:1:./1.tex \n" /*20-39*/
+ "Output:pdf \n" /*40-59*/
+ "Magnification:100000000 \n" /*60-89*/
+ "Unit:1 \n" /*90-99*/
+ "X Offset:0 \n" /*00-19*/
+ "Y Offset:0 \n" /*20-39*/
+ "Content: \n" /*40-49*/
+ "{1 \n" /*50-59*/
+ "(1,10:20,350:330,330,0 \n" /*60-89*/
+ ") \n" /*90-99*/
+ "} \n" /*00-09*/
+ "Postamble:\n";
+ synctex_test_sn_s sn = synctex_test_tmp_sn(content);
+ if (sn.s>0) {
+ synctex_scanner_p scanner = synctex_scanner_new_with_output_file(sn.n, NULL, synctex_YES);
+ synctex_node_p node = synctex_scanner_handle(scanner);
+ printf("Created nodes:\n");
+ while (node) {
+ printf("%s\n",_synctex_node_abstract(node));
+ node = _synctex_node_next(node);
+ }
+ TC += synctex_scanner_free(scanner);
+ unlink(sn.n);
+ } else {
+ ++TC;
+ }
+ return TC;
+}
+int synctex_test_charindex() {
+ int TC = 0;
+ char * content =
+ "SyncTeX Version:1 \n" /*00-19*/
+ "Input:1:./1.tex \n" /*20-39*/
+ "Output:pdf \n" /*40-59*/
+ "Magnification:100000000 \n" /*60-89*/
+ "Unit:1 \n" /*90-99*/
+ "X Offset:0 \n" /*00-19*/
+ "Y Offset:0 \n" /*20-39*/
+ "Content: \n" /*40-49*/
+ "{1 \n" /*50-59*/
+ "[1,10:20,350:330,330,0 \n" /*60-89*/
+ "(1,58:20,100:250,10,5 \n" /*90-119*/
+ "f1000:50,100 \n" /*20-39*/
+ ") \n" /*40-49*/
+ "] \n" /*50-59*/
+ "} \n" /*60-69*/
+ "Postamble:\n";
+ synctex_test_sn_s sn = synctex_test_tmp_sn(content);
+ if (sn.s>0) {
+ synctex_scanner_p scanner = synctex_scanner_new_with_output_file(sn.n, NULL, synctex_YES);
+ synctex_node_p node = synctex_scanner_handle(scanner);
+ printf("Created nodes:\n");
+ while (node) {
+ printf("%s\n",_synctex_node_abstract(node));
+ node = synctex_node_next(node);
+ }
+ TC += synctex_scanner_free(scanner);
+ unlink(sn.n);
+ } else {
+ ++TC;
+ }
+ return TC;
+}
+int synctex_test_form() {
+ int TC = 0;
+ char * content =
+ "SyncTeX Version:1 \n" /*00-19*/
+ "Input:1:./1.tex \n" /*20-39*/
+ "Output:pdf \n" /*40-59*/
+ "Magnification:100000000 \n" /*60-89*/
+ "Unit:1 \n" /*90-99*/
+ "X Offset:0 \n" /*00-19*/
+ "Y Offset:0 \n" /*20-39*/
+ "Content: \n" /*40-49*/
+ "{1 \n" /*50-59*/
+ "[1,10:20,350:330,330,0 \n" /*60-89*/
+ "(1,58:20,100:250,10,5 \n" /*90-119*/
+ "f1000:50,100 \n" /*20-39*/
+ ") \n" /*40-49*/
+ "] \n" /*50-59*/
+ "} \n" /*60-69*/
+ "<1000 \n" /*70-79*/
+ "(1,63:0,0:100,8,3 \n" /*80-99*/
+ ") \n" /*00-09*/
+ "> \n" /*10-19*/
+ "Postamble:\n";
+ synctex_test_sn_s sn = synctex_test_tmp_sn(content);
+ if (sn.s>0) {
+ synctex_scanner_p scanner = synctex_scanner_new_with_output_file(sn.n, NULL, synctex_YES);
+ synctex_node_p node = synctex_scanner_handle(scanner);
+ while (node) {
+ printf("%s\n",_synctex_node_abstract(node));
+ node = _synctex_node_next(node);
+ }
+ TC += synctex_scanner_free(scanner);
+ unlink(sn.n);
+ } else {
+ ++TC;
+ }
+ return TC;
+}
+#endif
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser.h b/Build/source/texk/web2c/synctexdir/synctex_parser.h
new file mode 100644
index 00000000000..3a6a9018295
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser.h
@@ -0,0 +1,429 @@
+/*
+ Copyright (c) 2008-2017 jerome DOT laurens AT u-bourgogne DOT fr
+
+ This file is part of the __SyncTeX__ package.
+
+ [//]: # (Latest Revision: Fri Jul 14 16:20:41 UTC 2017)
+ [//]: # (Version: 1.21)
+
+ See `synctex_parser_readme.md` for more details
+
+ ## License
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE
+
+ Except as contained in this notice, the name of the copyright holder
+ shall not be used in advertising or otherwise to promote the sale,
+ use or other dealings in this Software without prior written
+ authorization from the copyright holder.
+
+ ## Acknowledgments:
+
+ The author received useful remarks from the __pdfTeX__ developers, especially Hahn The Thanh,
+ and significant help from __XeTeX__ developer Jonathan Kew.
+
+ ## Nota Bene:
+
+ If you include or use a significant part of the __SyncTeX__ package into a software,
+ I would appreciate to be listed as contributor and see "__SyncTeX__" highlighted.
+*/
+
+#ifndef __SYNCTEX_PARSER__
+# define __SYNCTEX_PARSER__
+
+#include "synctex_version.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /* The main synctex object is a scanner.
+ * Its implementation is considered private.
+ * The basic workflow is
+ * - create a "synctex scanner" with the contents of a file
+ * - perform actions on that scanner like
+ synctex_display_query or synctex_edit_query below.
+ * - perform actions on nodes returned by the scanner
+ * - free the scanner when the work is done
+ */
+ typedef struct synctex_scanner_t synctex_scanner_s;
+ typedef synctex_scanner_s * synctex_scanner_p;
+
+ /**
+ * This is the designated method to create
+ * a new synctex scanner object.
+ * - argument output: the pdf/dvi/xdv file associated
+ * to the synctex file.
+ * If necessary, it can be the tex file that
+ * originated the synctex file but this might cause
+ * problems if the \jobname has a custom value.
+ * Despite this method can accept a relative path
+ * in practice, you should only pass full paths.
+ * The path should be encoded by the underlying
+ * file system, assuming that it is based on
+ * 8 bits characters, including UTF8,
+ * not 16 bits nor 32 bits.
+ * The last file extension is removed and
+ * replaced by the proper extension,
+ * either synctex or synctex.gz.
+ * - argument build_directory: It is the directory where
+ * all the auxiliary stuff is created.
+ * If no synctex file is found in the same directory
+ * as the output file, then we try to find one in
+ * this build directory.
+ * It is the directory where all the auxiliary
+ * stuff is created. Sometimes, the synctex output
+ * file and the pdf, dvi or xdv files are not
+ * created in the same location. See MikTeX.
+ * This directory path can be NULL,
+ * it will be ignored then.
+ * It can be either absolute or relative to the
+ * directory of the output pdf (dvi or xdv) file.
+ * Please note that this new argument is provided
+ * as a convenience but should not be used.
+ * Available since version 1.5.
+ * - argument parse: In general, use 1.
+ * Use 0 only if you do not want to parse the
+ * content but just check for existence.
+ * Available since version 1.5
+ * - resturn: a scanner. NULL is returned in case
+ * of an error or non existent file.
+ */
+ synctex_scanner_p synctex_scanner_new_with_output_file(const char * output, const char * build_directory, int parse);
+
+ /**
+ * Designated method to delete a synctex scanner object,
+ * including all its internal resources.
+ * Frees all the memory, you must call it when you are finished with the scanner.
+ * - argument scanner: a scanner.
+ * - returns: an integer used for testing purposes.
+ */
+ int synctex_scanner_free(synctex_scanner_p scanner);
+
+ /**
+ * Send this message to force the scanner to
+ * parse the contents of the synctex output file.
+ * Nothing is performed if the file was already parsed.
+ * In each query below, this message is sent,
+ * but if you need to access information more directly,
+ * you must ensure that the parsing did occur.
+ * Usage:
+ * if((my_scanner = synctex_scanner_parse(my_scanner))) {
+ * continue with my_scanner...
+ * } else {
+ * there was a problem
+ * }
+ * - returns: the argument on success.
+ * On failure, frees scanner and returns NULL.
+ */
+ synctex_scanner_p synctex_scanner_parse(synctex_scanner_p scanner);
+
+ /* synctex_node_p is the type for all synctex nodes.
+ * Its implementation is considered private.
+ * The synctex file is parsed into a tree of nodes, either sheet, form, boxes, math nodes... */
+
+ typedef struct synctex_node_t synctex_node_s;
+ typedef synctex_node_s * synctex_node_p;
+
+ /* The main entry points.
+ * Given the file name, a line and a column number, synctex_display_query returns the number of nodes
+ * satisfying the constrain. Use code like
+ *
+ * if(synctex_display_query(scanner,name,line,column,page_hint)>0) {
+ * synctex_node_p node;
+ * while((node = synctex_scanner_next_result(scanner))) {
+ * // do something with node
+ * ...
+ * }
+ * }
+ *
+ * Please notice that since version 1.19,
+ * there is a new argument page_hint.
+ * The results in pages closer to page_hint are given first.
+ * For example, one can
+ * - highlight each resulting node in the output, using synctex_node_visible_h and synctex_node_visible_v
+ * - highlight all the rectangles enclosing those nodes, using synctex_node_box_visible_... functions
+ * - highlight just the character using that information
+ *
+ * Given the page and the position in the page, synctex_edit_query returns the number of nodes
+ * satisfying the constrain. Use code like
+ *
+ * if(synctex_edit_query(scanner,page,h,v)>0) {
+ * synctex_node_p node;
+ * while(node = synctex_scanner_next_result(scanner)) {
+ * // do something with node
+ * ...
+ * }
+ * }
+ *
+ * For example, one can
+ * - highlight each resulting line in the input,
+ * - highlight just the character using that information
+ *
+ * page is 1 based
+ * h and v are coordinates in 72 dpi unit, relative to the top left corner of the page.
+ * If you make a new query, the result of the previous one is discarded. If you need to make more than one query
+ * in parallel, use the iterator API exposed in
+ * the synctex_parser_private.h header.
+ * If one of this function returns a negative integer,
+ * it means that an error occurred.
+ *
+ * Both methods are conservative, in the sense that matching is weak.
+ * If the exact column number is not found, there will be an answer with the whole line.
+ *
+ * Sumatra-PDF, Skim, iTeXMac2, TeXShop and Texworks are examples of open source software that use this library.
+ * You can browse their code for a concrete implementation.
+ */
+ typedef long synctex_status_t;
+ /* The page_hint argument is used to resolve ambiguities.
+ * Whenever, different matches occur, the ones closest
+ * to the page will be given first. Pass a negative number
+ * when in doubt. Using pdf forms may lead to ambiguities.
+ */
+ synctex_status_t synctex_display_query(synctex_scanner_p scanner,const char * name,int line,int column, int page_hint);
+ synctex_status_t synctex_edit_query(synctex_scanner_p scanner,int page,float h,float v);
+ synctex_node_p synctex_scanner_next_result(synctex_scanner_p scanner);
+ synctex_status_t synctex_scanner_reset_result(synctex_scanner_p scanner);
+
+ /**
+ * The horizontal and vertical location,
+ * the width, height and depth of a box enclosing node.
+ * All dimensions are given in page coordinates
+ * as opposite to TeX coordinates.
+ * The origin is at the top left corner of the page.
+ * Code example for Qt5:
+ * (from TeXworks source TWSynchronize.cpp)
+ * QRectF nodeRect(synctex_node_box_visible_h(node),
+ * synctex_node_box_visible_v(node) -
+ * synctex_node_box_visible_height(node),
+ * synctex_node_box_visible_width(node),
+ * synctex_node_box_visible_height(node) +
+ * synctex_node_box_visible_depth(node));
+ * Code example for Cocoa:
+ * NSRect bounds = [pdfPage
+ * boundsForBox:kPDFDisplayBoxMediaBox];
+ * NSRect nodeRect = NSMakeRect(
+ * synctex_node_box_visible_h(node),
+ * NSMaxY(bounds)-synctex_node_box_visible_v(node) +
+ * synctex_node_box_visible_height(node),
+ * synctex_node_box_visible_width(node),
+ * synctex_node_box_visible_height(node) +
+ * synctex_node_box_visible_depth(node)
+ * );
+ * The visible dimensions are bigger than real ones
+ * to compensate 0 width boxes or nodes intentionally
+ * put outside the box (using \kern for example).
+ * - parameter node: a node.
+ * - returns: a float.
+ * - author: JL
+ */
+ float synctex_node_box_visible_h(synctex_node_p node);
+ float synctex_node_box_visible_v(synctex_node_p node);
+ float synctex_node_box_visible_width(synctex_node_p node);
+ float synctex_node_box_visible_height(synctex_node_p node);
+ float synctex_node_box_visible_depth(synctex_node_p node);
+
+ /**
+ * For quite all nodes, horizontal and vertical coordinates, and width.
+ * All dimensions are given in page coordinates
+ * as opposite to TeX coordinates.
+ * The origin is at the top left corner of the page.
+ * The visible dimensions are bigger than real ones
+ * to compensate 0 width boxes or nodes intentionally
+ * put outside the box (using \kern for example).
+ * All nodes have coordinates, but all nodes don't
+ * have non null size. For example, math nodes
+ * have no width according to TeX, and in that case
+ * synctex_node_visible_width simply returns 0.
+ * The same holds for kern nodes that do not have
+ * height nor depth, etc...
+ */
+ float synctex_node_visible_h(synctex_node_p node);
+ float synctex_node_visible_v(synctex_node_p node);
+ float synctex_node_visible_width(synctex_node_p node);
+ float synctex_node_visible_height(synctex_node_p node);
+ float synctex_node_visible_depth(synctex_node_p node);
+
+ /**
+ * Given a node, access to its tag, line and column.
+ * The line and column numbers are 1 based.
+ * The latter is not yet fully supported in TeX,
+ * the default implementation returns 0
+ * which means the whole line.
+ * synctex_node_get_name returns the path of the
+ * TeX source file that was used to create the node.
+ * When the tag is known, the scanner of the node
+ * will also give that same file name, see
+ * synctex_scanner_get_name below.
+ * For an hbox node, the mean line is the mean
+ * of all the lines of the child nodes.
+ * Sometimes, when synchronization form pdf to source
+ * fails with the line, one should try with the
+ * mean line.
+ */
+ int synctex_node_tag(synctex_node_p node);
+ int synctex_node_line(synctex_node_p node);
+ int synctex_node_mean_line(synctex_node_p node);
+ int synctex_node_column(synctex_node_p node);
+ const char * synctex_node_get_name(synctex_node_p node);
+
+ /**
+ This is the page where the node appears.
+ * This is a 1 based index as given by TeX.
+ */
+ int synctex_node_page(synctex_node_p node);
+
+ /**
+ * Display all the information contained in the scanner.
+ * If the records are too numerous, only the first ones are displayed.
+ * This is mainly for informational purpose to help developers.
+ */
+ void synctex_scanner_display(synctex_scanner_p scanner);
+
+ /* Managing the input file names.
+ * Given a tag, synctex_scanner_get_name will return the corresponding file name.
+ * Conversely, given a file name, synctex_scanner_get_tag will return, the corresponding tag.
+ * The file name must be the very same as understood by TeX.
+ * For example, if you \input myDir/foo.tex, the file name is myDir/foo.tex.
+ * No automatic path expansion is performed.
+ * Finally, synctex_scanner_input is the first input node of the scanner.
+ * To browse all the input node, use a loop like
+ * ...
+ * synctex_node_p = input_node;
+ * ...
+ * if((input_node = synctex_scanner_input(scanner))) {
+ * do {
+ * blah
+ * } while((input_node=synctex_node_sibling(input_node)));
+ * }
+ *
+ * The output is the name that was used to create the scanner.
+ * The synctex is the real name of the synctex file,
+ * it was obtained from output by setting the proper file extension.
+ */
+ const char * synctex_scanner_get_name(synctex_scanner_p scanner,int tag);
+
+ int synctex_scanner_get_tag(synctex_scanner_p scanner,const char * name);
+
+ synctex_node_p synctex_scanner_input(synctex_scanner_p scanner);
+ synctex_node_p synctex_scanner_input_with_tag(synctex_scanner_p scanner,int tag);
+ const char * synctex_scanner_get_output(synctex_scanner_p scanner);
+ const char * synctex_scanner_get_synctex(synctex_scanner_p scanner);
+
+ /* The x and y offset of the origin in TeX coordinates. The magnification
+ These are used by pdf viewers that want to display the real box size.
+ For example, getting the horizontal coordinates of a node would require
+ synctex_node_box_h(node)*synctex_scanner_magnification(scanner)+synctex_scanner_x_offset(scanner)
+ Getting its TeX width would simply require
+ synctex_node_box_width(node)*synctex_scanner_magnification(scanner)
+ but direct methods are available for that below.
+ */
+ int synctex_scanner_x_offset(synctex_scanner_p scanner);
+ int synctex_scanner_y_offset(synctex_scanner_p scanner);
+ float synctex_scanner_magnification(synctex_scanner_p scanner);
+
+ /**
+ * ## Browsing the nodes
+ * parent, child and sibling are standard names for tree nodes.
+ * The parent is one level higher,
+ * the child is one level deeper,
+ * and the sibling is at the same level.
+ * A node and its sibling have the same parent.
+ * A node is the parent of its children.
+ * A node is either the child of its parent,
+ * or belongs to the sibling chain of its parent's child.
+ * The sheet or form of a node is the topmost ancestor,
+ * it is of type sheet or form.
+ * The next node is either the child, the sibling or the parent's sibling,
+ * unless the parent is a sheet, a form or NULL.
+ * This allows to navigate through all the nodes of a given sheet node:
+ *
+ * synctex_node_p node = sheet;
+ * while((node = synctex_node_next(node))) {
+ * // do something with node
+ * }
+ *
+ * With synctex_sheet_content and synctex_form_content,
+ * you can retrieve the sheet node given the page
+ * or form tag.
+ * The page is 1 based, according to TeX standards.
+ * Conversely synctex_node_parent_sheet or
+ * synctex_node_parent_form allows to retrieve
+ * the sheet or the form containing a given node.
+ * Notice that a node is not contained in a sheet
+ * and a form at the same time.
+ * Some nodes are not contained in either (handles).
+ */
+
+ synctex_node_p synctex_node_parent(synctex_node_p node);
+ synctex_node_p synctex_node_parent_sheet(synctex_node_p node);
+ synctex_node_p synctex_node_parent_form(synctex_node_p node);
+ synctex_node_p synctex_node_child(synctex_node_p node);
+ synctex_node_p synctex_node_last_child(synctex_node_p node);
+ synctex_node_p synctex_node_sibling(synctex_node_p node);
+ synctex_node_p synctex_node_last_sibling(synctex_node_p node);
+ synctex_node_p synctex_node_arg_sibling(synctex_node_p node);
+ synctex_node_p synctex_node_next(synctex_node_p node);
+
+ /**
+ * Top level entry points.
+ * The scanner owns a list of sheet siblings and
+ * a list of form siblings.
+ * Sheets or forms have one child which is a box:
+ * their contents.
+ * - argument page: 1 based sheet page number.
+ * - argument tag: 1 based form tag number.
+ */
+ synctex_node_p synctex_sheet(synctex_scanner_p scanner,int page);
+ synctex_node_p synctex_sheet_content(synctex_scanner_p scanner,int page);
+ synctex_node_p synctex_form(synctex_scanner_p scanner,int tag);
+ synctex_node_p synctex_form_content(synctex_scanner_p scanner,int tag);
+
+ /* This is primarily used for debugging purpose.
+ * The second one logs information for the node and recursively displays information for its next node */
+ void synctex_node_log(synctex_node_p node);
+ void synctex_node_display(synctex_node_p node);
+
+ /* For quite all nodes, horizontal, vertical coordinates, and width.
+ * These are expressed in TeX small points coordinates, with origin at the top left corner.
+ */
+ int synctex_node_h(synctex_node_p node);
+ int synctex_node_v(synctex_node_p node);
+ int synctex_node_width(synctex_node_p node);
+ int synctex_node_height(synctex_node_p node);
+ int synctex_node_depth(synctex_node_p node);
+
+ /* For all nodes, dimensions of the enclosing box.
+ * These are expressed in TeX small points coordinates, with origin at the top left corner.
+ * A box is enclosing itself.
+ */
+ int synctex_node_box_h(synctex_node_p node);
+ int synctex_node_box_v(synctex_node_p node);
+ int synctex_node_box_width(synctex_node_p node);
+ int synctex_node_box_height(synctex_node_p node);
+ int synctex_node_box_depth(synctex_node_p node);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser_advanced.h b/Build/source/texk/web2c/synctexdir/synctex_parser_advanced.h
new file mode 100644
index 00000000000..a7f04d80dab
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser_advanced.h
@@ -0,0 +1,554 @@
+/*
+ Copyright (c) 2008-2017 jerome DOT laurens AT u-bourgogne DOT fr
+
+ This file is part of the __SyncTeX__ package.
+
+ [//]: # (Latest Revision: Sun Oct 15 15:09:55 UTC 2017)
+ [//]: # (Version: 1.21)
+
+ See `synctex_parser_readme.md` for more details
+
+ ## License
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE
+
+ Except as contained in this notice, the name of the copyright holder
+ shall not be used in advertising or otherwise to promote the sale,
+ use or other dealings in this Software without prior written
+ authorization from the copyright holder.
+ */
+
+#include "synctex_parser.h"
+#include "synctex_parser_utils.h"
+
+#ifndef __SYNCTEX_PARSER_PRIVATE__
+# define __SYNCTEX_PARSER_PRIVATE__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ /* Reminder that the argument must not be NULL */
+ typedef synctex_node_p synctex_non_null_node_p;
+
+ /* Each node of the tree, except the scanner itself belongs to a class.
+ * The class object is just a struct declaring the owning scanner
+ * This is a pointer to the scanner as root of the tree.
+ * The type is used to identify the kind of node.
+ * The class declares pointers to a creator and a destructor method.
+ * The log and display fields are used to log and display the node.
+ * display will also display the child, sibling and parent sibling.
+ * parent, child and sibling are used to navigate the tree,
+ * from TeX box hierarchy point of view.
+ * The friend field points to a method which allows to navigate from friend to friend.
+ * A friend is a node with very close tag and line numbers.
+ * Finally, the info field point to a method giving the private node info offset.
+ */
+
+ /**
+ * These are the masks for the synctex node types.
+ * int's are 32 bits at leats.
+ */
+ enum {
+ synctex_shift_root,
+ synctex_shift_no_root,
+ synctex_shift_void,
+ synctex_shift_no_void,
+ synctex_shift_box,
+ synctex_shift_no_box,
+ synctex_shift_proxy,
+ synctex_shift_no_proxy,
+ synctex_shift_h,
+ synctex_shift_v
+ };
+ enum {
+ synctex_mask_root = 1,
+ synctex_mask_no_root = synctex_mask_root<<1,
+ synctex_mask_void = synctex_mask_no_root<<1,
+ synctex_mask_no_void = synctex_mask_void<<1,
+ synctex_mask_box = synctex_mask_no_void<<1,
+ synctex_mask_no_box = synctex_mask_box<<1,
+ synctex_mask_proxy = synctex_mask_no_box<<1,
+ synctex_mask_no_proxy = synctex_mask_proxy<<1,
+ synctex_mask_h = synctex_mask_no_proxy<<1,
+ synctex_mask_v = synctex_mask_h<<1,
+ };
+ enum {
+ synctex_mask_non_void_hbox = synctex_mask_no_void
+ | synctex_mask_box
+ | synctex_mask_h,
+ synctex_mask_non_void_vbox = synctex_mask_no_void
+ | synctex_mask_box
+ | synctex_mask_v
+ };
+ typedef enum {
+ synctex_node_mask_sf =
+ synctex_mask_root
+ |synctex_mask_no_void
+ |synctex_mask_no_box
+ |synctex_mask_no_proxy,
+ synctex_node_mask_vbox =
+ synctex_mask_no_root
+ |synctex_mask_no_void
+ |synctex_mask_box
+ |synctex_mask_no_proxy
+ |synctex_mask_v,
+ synctex_node_mask_hbox =
+ synctex_mask_no_root
+ |synctex_mask_no_void
+ |synctex_mask_box
+ |synctex_mask_no_proxy
+ |synctex_mask_h,
+ synctex_node_mask_void_vbox =
+ synctex_mask_no_root
+ |synctex_mask_void
+ |synctex_mask_box
+ |synctex_mask_no_proxy
+ |synctex_mask_v,
+ synctex_node_mask_void_hbox =
+ synctex_mask_no_root
+ |synctex_mask_void
+ |synctex_mask_box
+ |synctex_mask_no_proxy
+ |synctex_mask_h,
+ synctex_node_mask_vbox_proxy =
+ synctex_mask_no_root
+ |synctex_mask_no_void
+ |synctex_mask_box
+ |synctex_mask_proxy
+ |synctex_mask_v,
+ synctex_node_mask_hbox_proxy =
+ synctex_mask_no_root
+ |synctex_mask_no_void
+ |synctex_mask_box
+ |synctex_mask_proxy
+ |synctex_mask_h,
+ synctex_node_mask_nvnn =
+ synctex_mask_no_root
+ |synctex_mask_void
+ |synctex_mask_no_box
+ |synctex_mask_no_proxy,
+ synctex_node_mask_input =
+ synctex_mask_root
+ |synctex_mask_void
+ |synctex_mask_no_box
+ |synctex_mask_no_proxy,
+ synctex_node_mask_proxy =
+ synctex_mask_no_root
+ |synctex_mask_void
+ |synctex_mask_no_box
+ |synctex_mask_proxy
+ } synctex_node_mask_t;
+
+ enum {
+ /* input */
+ synctex_tree_sibling_idx = 0,
+ synctex_tree_s_input_max = 1,
+ /* All */
+ synctex_tree_s_parent_idx = 1,
+ synctex_tree_sp_child_idx = 2,
+ synctex_tree_spc_friend_idx = 3,
+ synctex_tree_spcf_last_idx = 4,
+ synctex_tree_spcfl_vbox_max = 5,
+ /* hbox supplement */
+ synctex_tree_spcfl_next_hbox_idx = 5,
+ synctex_tree_spcfln_hbox_max = 6,
+ /* hbox proxy supplement */
+ synctex_tree_spcfln_target_idx = 6,
+ synctex_tree_spcflnt_proxy_hbox_max = 7,
+ /* vbox proxy supplement */
+ synctex_tree_spcfl_target_idx = 5,
+ synctex_tree_spcflt_proxy_vbox_max = 6,
+ /* spf supplement*/
+ synctex_tree_sp_friend_idx = 2,
+ synctex_tree_spf_max = 3,
+ /* box boundary supplement */
+ synctex_tree_spf_arg_sibling_idx = 3,
+ synctex_tree_spfa_max = 4,
+ /* proxy supplement */
+ synctex_tree_spf_target_idx = 3,
+ synctex_tree_spft_proxy_max = 4,
+ /* last proxy supplement */
+ synctex_tree_spfa_target_idx = 4,
+ synctex_tree_spfat_proxy_last_max = 5,
+ /* sheet supplement */
+ synctex_tree_s_child_idx = 1,
+ synctex_tree_sc_next_hbox_idx = 2,
+ synctex_tree_scn_sheet_max = 3,
+ /* form supplement */
+ synctex_tree_sc_target_idx = 2,
+ synctex_tree_sct_form_max = 3,
+ /* spct */
+ synctex_tree_spc_target_idx = 3,
+ synctex_tree_spct_handle_max = 4,
+ };
+
+ enum {
+ /* input */
+ synctex_data_input_tag_idx = 0,
+ synctex_data_input_line_idx = 1,
+ synctex_data_input_name_idx = 2,
+ synctex_data_input_tln_max = 3,
+ /* sheet */
+ synctex_data_sheet_page_idx = 0,
+ synctex_data_p_sheet_max = 1,
+ /* form */
+ synctex_data_form_tag_idx = 0,
+ synctex_data_t_form_max = 1,
+ /* tlchv */
+ synctex_data_tag_idx = 0,
+ synctex_data_line_idx = 1,
+ synctex_data_column_idx = 2,
+ synctex_data_h_idx = 3,
+ synctex_data_v_idx = 4,
+ synctex_data_tlchv_max = 5,
+ /* tlchvw */
+ synctex_data_width_idx = 5,
+ synctex_data_tlchvw_max = 6,
+ /* box */
+ synctex_data_height_idx = 6,
+ synctex_data_depth_idx = 7,
+ synctex_data_box_max = 8,
+ /* hbox supplement */
+ synctex_data_mean_line_idx = 8,
+ synctex_data_weight_idx = 9,
+ synctex_data_h_V_idx = 10,
+ synctex_data_v_V_idx = 11,
+ synctex_data_width_V_idx = 12,
+ synctex_data_height_V_idx = 13,
+ synctex_data_depth_V_idx = 14,
+ synctex_data_hbox_max = 15,
+ /* ref */
+ synctex_data_ref_tag_idx = 0,
+ synctex_data_ref_h_idx = 1,
+ synctex_data_ref_v_idx = 2,
+ synctex_data_ref_thv_max = 3,
+ /* proxy */
+ synctex_data_proxy_h_idx = 0,
+ synctex_data_proxy_v_idx = 1,
+ synctex_data_proxy_hv_max = 2,
+ /* handle */
+ synctex_data_handle_w_idx = 0,
+ synctex_data_handle_w_max = 1,
+ };
+
+ /* each synctex node has a class */
+ typedef struct synctex_class_t synctex_class_s;
+ typedef synctex_class_s * synctex_class_p;
+
+
+ /* synctex_node_p is a pointer to a node
+ * synctex_node_s is the target of the synctex_node_p pointer
+ * It is a pseudo object oriented program.
+ * class is a pointer to the class object the node belongs to.
+ * implementation is meant to contain the private data of the node
+ * basically, there are 2 kinds of information: navigation information and
+ * synctex information. Both will depend on the type of the node,
+ * thus different nodes will have different private data.
+ * There is no inheritancy overhead.
+ */
+ typedef union {
+ synctex_node_p as_node;
+ int as_integer;
+ char * as_string;
+ void * as_pointer;
+ } synctex_data_u;
+ typedef synctex_data_u * synctex_data_p;
+
+# if defined(SYNCTEX_USE_CHARINDEX)
+ typedef unsigned int synctex_charindex_t;
+ synctex_charindex_t synctex_node_charindex(synctex_node_p node);
+ typedef synctex_charindex_t synctex_lineindex_t;
+ synctex_lineindex_t synctex_node_lineindex(synctex_node_p node);
+ synctex_node_p synctex_scanner_handle(synctex_scanner_p scanner);
+# define SYNCTEX_DECLARE_CHARINDEX \
+ synctex_charindex_t char_index;\
+ synctex_lineindex_t line_index;
+# define SYNCTEX_DECLARE_CHAR_OFFSET \
+ synctex_charindex_t charindex_offset;
+# else
+# define SYNCTEX_DECLARE_CHARINDEX
+# define SYNCTEX_DECLARE_CHAR_OFFSET
+# endif
+ struct synctex_node_t {
+ SYNCTEX_DECLARE_CHARINDEX
+ synctex_class_p class_;
+#ifdef DEBUG
+ synctex_data_u data[22];
+#else
+ synctex_data_u data[1];
+#endif
+ };
+
+ typedef synctex_node_p * synctex_node_r;
+
+ typedef struct {
+ int h;
+ int v;
+ } synctex_point_s;
+
+ typedef synctex_point_s * synctex_point_p;
+
+ typedef struct {
+ synctex_point_s min; /* top left */
+ synctex_point_s max; /* bottom right */
+ } synctex_box_s;
+
+ typedef synctex_box_s * synctex_box_p;
+ /**
+ * These are the types of the synctex nodes.
+ * No need to use them but the compiler needs them here.
+ * There are 3 kinds of nodes.
+ * - primary nodes
+ * - proxies
+ * - handles
+ * Primary nodes are created at parse time
+ * of the synctex file.
+ * Proxies are used to support pdf forms.
+ * The ref primary nodes are replaced by a tree
+ * of proxy nodes which duplicate the tree of primary
+ * nodes available in the refered form.
+ * Roughly speaking, the primary nodes of the form
+ * know what to display, the proxy nodes know where.
+ * Handles are used in queries. They point to either
+ * primary nodes or proxies.
+ */
+ typedef enum {
+ synctex_node_type_none = 0,
+ synctex_node_type_input,
+ synctex_node_type_sheet,
+ synctex_node_type_form,
+ synctex_node_type_ref,
+ synctex_node_type_vbox,
+ synctex_node_type_void_vbox,
+ synctex_node_type_hbox,
+ synctex_node_type_void_hbox,
+ synctex_node_type_kern,
+ synctex_node_type_glue,
+ synctex_node_type_rule,
+ synctex_node_type_math,
+ synctex_node_type_boundary,
+ synctex_node_type_box_bdry,
+ synctex_node_type_proxy,
+ synctex_node_type_proxy_last,
+ synctex_node_type_proxy_vbox,
+ synctex_node_type_proxy_hbox,
+ synctex_node_type_handle,
+ synctex_node_number_of_types
+ } synctex_node_type_t;
+ /* synctex_node_type gives the type of a given node,
+ * synctex_node_isa gives the same information as a human readable text. */
+ synctex_node_type_t synctex_node_type(synctex_node_p node);
+ const char * synctex_node_isa(synctex_node_p node);
+
+ synctex_node_type_t synctex_node_target_type(synctex_node_p node);
+
+ synctex_node_type_t synctex_node_type(synctex_node_p node);
+ const char * synctex_node_isa(synctex_node_p node);
+
+ void synctex_node_log(synctex_node_p node);
+ void synctex_node_display(synctex_node_p node);
+
+ /* Given a node, access to the location in the synctex file where it is defined.
+ */
+
+ int synctex_node_form_tag(synctex_node_p node);
+
+ int synctex_node_weight(synctex_node_p node);
+ int synctex_node_child_count(synctex_node_p node);
+
+ int synctex_node_h(synctex_node_p node);
+ int synctex_node_v(synctex_node_p node);
+ int synctex_node_width(synctex_node_p node);
+
+ int synctex_node_box_h(synctex_node_p node);
+ int synctex_node_box_v(synctex_node_p node);
+ int synctex_node_box_width(synctex_node_p node);
+ int synctex_node_box_height(synctex_node_p node);
+ int synctex_node_box_depth(synctex_node_p node);
+
+ int synctex_node_hbox_h(synctex_node_p node);
+ int synctex_node_hbox_v(synctex_node_p node);
+ int synctex_node_hbox_width(synctex_node_p node);
+ int synctex_node_hbox_height(synctex_node_p node);
+ int synctex_node_hbox_depth(synctex_node_p node);
+
+ synctex_scanner_p synctex_scanner_new(void);
+ synctex_node_p synctex_node_new(synctex_scanner_p scanner,synctex_node_type_t type);
+
+ /**
+ * Scanner display switcher getter.
+ * If the switcher is 0, synctex_node_display is disabled.
+ * If the switcher is <0, synctex_node_display has no limit.
+ * If the switcher is >0, only the first switcher (as number) nodes are displayed.
+ * - parameter: a scanner
+ * - returns: an integer
+ */
+ int synctex_scanner_display_switcher(synctex_scanner_p scanR);
+ void synctex_scanner_set_display_switcher(synctex_scanner_p scanR, int switcher);
+
+ /**
+ * Iterator is the structure used to traverse
+ * the answer to client queries.
+ * First answers are the best matches, according
+ * to criteria explained below.
+ * Next answers are not ordered.
+ * Objects are handles to nodes in the synctex node tree starting at scanner.
+ */
+ typedef struct synctex_iterator_t synctex_iterator_s;
+ typedef synctex_iterator_s * synctex_iterator_p;
+
+ /**
+ * Designated creator for a display query, id est,
+ * forward navigation from source to output.
+ * Returns NULL if the query has no answer.
+ * Code example:
+ * synctex_iterator_p iterator = NULL;
+ * if ((iterator = synctex_iterator_new_display(...)) {
+ * synctex_node_p node = NULL;
+ * while((node = synctex_iterator_next_result(iterator))) {
+ * do something with node...
+ * }
+ */
+ synctex_iterator_p synctex_iterator_new_display(synctex_scanner_p scanner,const char * name,int line,int column, int page_hint);
+ /**
+ * Designated creator for an edit query, id est,
+ * backward navigation from output to source.
+ * Code example:
+ * synctex_iterator_p iterator = NULL;
+ * if ((iterator = synctex_iterator_new_edit(...)) {
+ * synctex_node_p node = NULL;
+ * while((node = synctex_iterator_next_result(iterator))) {
+ * do something with node...
+ * }
+ */
+ synctex_iterator_p synctex_iterator_new_edit(synctex_scanner_p scanner,int page,float h,float v);
+ /**
+ * Free all the resources.
+ * - argument iterator: the object to free...
+ * You should free the iterator before the scanner
+ * owning the nodes it iterates with.
+ */
+ void synctex_iterator_free(synctex_iterator_p iterator);
+ /**
+ * Whether the iterator actually points to an object.
+ * - argument iterator: the object to iterate on...
+ */
+ synctex_bool_t synctex_iterator_has_next(synctex_iterator_p iterator);
+ /**
+ * Returns the pointed object and advance the cursor
+ * to the next object. Returns NULL and does nothing
+ * if the end has already been reached.
+ * - argument iterator: the object to iterate on...
+ */
+ synctex_node_p synctex_iterator_next_result(synctex_iterator_p iterator);
+ /**
+ * Reset the cursor position to the first result.
+ * - argument iterator: the object to iterate on...
+ */
+ int synctex_iterator_reset(synctex_iterator_p iterator);
+ /**
+ * The number of objects left for traversal.
+ * - argument iterator: the object to iterate on...
+ */
+ int synctex_iterator_count(synctex_iterator_p iterator);
+
+ /**
+ * The target of the node, either a handle or a proxy.
+ */
+ synctex_node_p synctex_node_target(synctex_node_p node);
+
+#ifndef SYNCTEX_NO_UPDATER
+ /* The main synctex updater object.
+ * This object is used to append information to the synctex file.
+ * Its implementation is considered private.
+ * It is used by the synctex command line tool to take into account modifications
+ * that could occur while postprocessing files by dvipdf like filters.
+ */
+ typedef struct synctex_updater_t synctex_updater_s;
+ typedef synctex_updater_s * synctex_updater_p;
+
+ /* Designated initializer.
+ * Once you are done with your whole job,
+ * free the updater */
+ synctex_updater_p synctex_updater_new_with_output_file(const char * output, const char * directory);
+
+ /* Use the next functions to append records to the synctex file,
+ * no consistency tests made on the arguments */
+ void synctex_updater_append_magnification(synctex_updater_p updater, char * magnification);
+ void synctex_updater_append_x_offset(synctex_updater_p updater, char * x_offset);
+ void synctex_updater_append_y_offset(synctex_updater_p updater, char * y_offset);
+
+ /* You MUST free the updater, once everything is properly appended */
+ void synctex_updater_free(synctex_updater_p updater);
+#endif
+
+#if defined(SYNCTEX_DEBUG)
+# include "assert.h"
+# define SYNCTEX_ASSERT assert
+#else
+# define SYNCTEX_ASSERT(UNUSED)
+#endif
+
+#if defined(SYNCTEX_TESTING)
+#warning TESTING IS PROHIBITED
+#if __clang__
+#define __PRAGMA_PUSH_NO_EXTRA_ARG_WARNINGS \
+_Pragma("clang diagnostic push") \
+_Pragma("clang diagnostic ignored \"-Wformat-extra-args\"")
+
+#define __PRAGMA_POP_NO_EXTRA_ARG_WARNINGS _Pragma("clang diagnostic pop")
+#else
+#define __PRAGMA_PUSH_NO_EXTRA_ARG_WARNINGS
+#define __PRAGMA_POP_NO_EXTRA_ARG_WARNINGS
+#endif
+
+# define SYNCTEX_TEST_BODY(counter, condition, desc, ...) \
+ do { \
+ __PRAGMA_PUSH_NO_EXTRA_ARG_WARNINGS \
+ if (!(condition)) { \
+ ++counter; \
+ printf("**** Test failed: %s\nfile %s\nfunction %s\nline %i\n",#condition,__FILE__,__FUNCTION__,__LINE__); \
+ printf((desc), ##__VA_ARGS__); \
+ } \
+ __PRAGMA_POP_NO_EXTRA_ARG_WARNINGS \
+ } while(0)
+
+# define SYNCTEX_TEST_PARAMETER(counter, condition) SYNCTEX_TEST_BODY(counter, (condition), "Invalid parameter not satisfying: %s", #condition)
+
+ int synctex_test_input(synctex_scanner_p scanner);
+ int synctex_test_proxy(synctex_scanner_p scanner);
+ int synctex_test_tree(synctex_scanner_p scanner);
+ int synctex_test_page(synctex_scanner_p scanner);
+ int synctex_test_handle(synctex_scanner_p scanner);
+ int synctex_test_display_query(synctex_scanner_p scanner);
+ int synctex_test_charindex();
+ int synctex_test_sheet_1();
+ int synctex_test_sheet_2();
+ int synctex_test_sheet_3();
+ int synctex_test_form();
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser_api_level.txt b/Build/source/texk/web2c/synctexdir/synctex_parser_api_level.txt
new file mode 100644
index 00000000000..227cea21564
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser_api_level.txt
@@ -0,0 +1 @@
+2.0.0
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser_c-auto.h b/Build/source/texk/web2c/synctexdir/synctex_parser_c-auto.h
new file mode 100644
index 00000000000..872bef76a0c
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser_c-auto.h
@@ -0,0 +1,44 @@
+/*
+Copyright (c) 2005 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the SyncTeX package.
+
+Latest Revision: Jeu 25 jui 2015 10:10:58 UTC
+
+Version: 1.18
+
+See synctex_parser_readme.txt for more details
+
+License:
+--------
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+*/
+
+/* This local header file is for OS X, use your own header to fit your system */
+#define HAVE_STRLCAT
+#define HAVE_STRLCPY
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser_local.h b/Build/source/texk/web2c/synctexdir/synctex_parser_local.h
new file mode 100644
index 00000000000..032b25687b3
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser_local.h
@@ -0,0 +1,45 @@
+/*
+ Copyright (c) 2008, 2009, 2010 , 2011 jerome DOT laurens AT u-bourgogne DOT fr
+
+ This file is part of the SyncTeX package.
+
+ Latest Revision: Sun Oct 15 15:09:55 UTC 2017
+
+ Version: 1.21
+
+ See synctex_parser_readme.txt for more details
+
+ License:
+ --------
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE
+
+ Except as contained in this notice, the name of the copyright holder
+ shall not be used in advertising or otherwise to promote the sale,
+ use or other dealings in this Software without prior written
+ authorization from the copyright holder.
+
+ */
+
+/* This local header file is for TEXLIVE, use your own header to fit your system */
+# include <w2c/c-auto.h> /* for inline && HAVE_xxx */
+/* No inlining for synctex tool in texlive. */
+# define SYNCTEX_INLINE
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser_readme.md b/Build/source/texk/web2c/synctexdir/synctex_parser_readme.md
new file mode 100644
index 00000000000..d47a89f5705
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser_readme.md
@@ -0,0 +1,259 @@
+# __SyncTeX__
+
+This file is part of the __SyncTeX__ package.
+
+[//]: # (Version: 1.21)
+[//]: # (Date: Sun Oct 15 15:09:55 UTC 2017)
+
+## Important
+
+* Changes in version `1.21`
+
+ * Display query returns more results (as much as `1.18`)
+ * Remove a `\` character from the name of 2 test files.
+ * Change variable name `class` to `class_` because the former is a reserved keyword in C++.
+ * Adding a more portable unused variable management.
+ * Various cosmetic changes in the source code, including explicit declaration of `void` in forward function declaration.
+
+
+* Changes in version `1.20`
+
+ One bug fixed in some initialization and different syntax to make some compilers happy.
+
+* Changes in version `1.19`
+
+ A long standing bug affecting only pdftex has been fixed by adding support to pdf forms. As a side effect, the synchronization algorithm gains in accuracy for all the engines, especially from pdf to source. Of course, there is a small cost in both memory footprint and computational time, but none is noticeable.
+
+ Some technical changes in the API.
+ * more consistent type naming convention
+ * `_s` suffix for struct's
+ * `_p` suffix for pointers
+ * `_t` suffix for standard types
+ * `_f` suffix for functions...
+
+ thus `synctex_node_t` has become `synctex_node_p`.
+
+ * supplemental argument in `synctex_display_query`. Set `page_hint` to the currently displayed pdf page number (0 based). If this info is not available, set `page_hint` to 0, it corresponds to the old behaviour.
+ * rename `synctex_next_result` to `synctex_scanner_next_result`
+ * additional `synctex_parser_private.h` header where
+ more API are exposed. For an advanced usage only (eg parallel synchronizations).
+ * `SYNCTEX_NO_UPDATER` preprocessor macro to deactivate some code useless to frontends.
+
+## What is it ?
+
+The *Synchronization TeXnology* named __SyncTeX__ is a new feature
+of recent __TeX__ engines designed by Jérôme Laurens.
+It allows to synchronize between input and output, which means to
+navigate from the source document to the typeset material and vice versa.
+Browse the source code for more information.
+
+## Contents
+This package is mainly for developers, it contains the following files:
+
+* `synctex_parser_readme.md` (this file)
+* `synctex_parser_version.txt`
+* `synctex_parser_utils.c`
+* `synctex_parser_utils.h`
+* `synctex_parser_local.h`
+* `synctex_parser.h`
+* `synctex_parser_advanced.h`
+* `synctex_parser.c`
+
+The file you are reading contains more informations about the __SyncTeX__ parser history.
+
+## Source
+
+All stable sources are available from [TeXLive repository](http://www.tug.org/svn/texlive/trunk/Build/source/texk/web2c/synctexdir/).
+
+Latest development sources are available from GitHub.
+
+Please notice that due to the complexity of the TeXLive TeX distribution, there might be some delay before synchronization occurs between various repositories.
+
+## Usage
+
+In order to support __SyncTeX__ in a viewer, it is sufficient to include
+in the source the files `synctex_parser.c` and `synctex_parser_utils.c`.
+The synctex parser usage is described in `synctex_parser.h` header file.
+
+More advanced usage is found in `synctex_parser_advanced.h`
+
+The other files are used by tex engines or by the synctex command line utility:
+
+```
+ChangeLog
+README.txt
+am
+man1
+man5
+synctex-common.h
+synctex-convert.sh
+synctex-e-mem.ch0
+synctex-e-mem.ch1
+synctex-e-rec.ch0
+synctex-e-rec.ch1
+synctex-etex.h
+synctex-mem.ch0
+synctex-mem.ch1
+synctex-mem.ch2
+synctex-pdf-rec.ch2
+synctex-pdftex.h
+synctex-rec.ch0
+synctex-rec.ch1
+synctex-rec.ch2
+synctex-tex.h
+synctex-xe-mem.ch2
+synctex-xe-rec.ch2
+synctex-xe-rec.ch3
+synctex-xetex.h
+synctex.c
+synctex.defines
+synctex.h
+synctex_main.c
+tests
+...
+```
+
+## Version:
+
+This is version 1, which refers to the synctex output file format.
+
+The files are identified by a build number.
+In order to help developers to automatically manage the version and build numbers
+and download the parser only when necessary, the `synctex_parser_version.txt`
+is an ASCII text file just containing the current version and build numbers eg `1.19`.
+
+## History:
+
+* 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.
+* 1.2: Tue Sep 2 10:28:32 UTC 2008
+ - Correction for ConTeXt support in the edit query.
+ The previous method was assuming that TeX boxes do not overlap,
+ which is reasonable for LaTeX but not for ConTeXt.
+ This assumption is no longer considered.
+* 1.3: Fri Sep 5 09:39:57 UTC 2008
+ - Local variable "read" renamed to "already_read" to avoid conflicts.
+ - "inline" compiler directive renamed to "SYNCTEX_INLINE" for code support and maintenance
+ - _synctex_error cannot be inlined due to variable arguments (thanks Christiaan Hofman)
+ - Correction in the display query, extra boundary nodes are used for a more precise forwards synchronization
+* 1.4: Fri Sep 12 08:12:34 UTC 2008
+ - For an unknown reason, the previous version was not the real 1.3 (as used in iTeXMac2 build 747).
+ As a consequence, a crash was observed.
+ - Some typos are fixed.
+* 1.6: Mon Nov 3 20:20:02 UTC 2008
+ - The bug that prevented synchronization with compressed files on windows has been fixed.
+ - New interface to allow system specific customization.
+ - Note that some APIs have changed.
+* 1.8: Mer 8 jul 2009 11:32:38 UTC
+Note that version 1.7 was delivered privately.
+ - bug fix: synctex was causing a memory leak in pdftex and xetex, thus some processing speed degradation
+ - bug fix: the synctex command line tool was broken when updating a .synctex file
+ - enhancement: better accuracy of the synchronization process
+ - enhancement: the pdf output file and the associated .synctex file no longer need to live in the same directory.
+ The new -d option of the synctex command line tool manages this situation.
+ This is handy when using something like tex -output-directory=DIR ...
+* 1.9: Wed Nov 4 11:52:35 UTC 2009
+ - Various typo fixed
+ - OutputDebugString replaced by OutputDebugStringA to deliberately disable unicode preprocessing
+ - New conditional created because OutputDebugStringA is only available since Windows 2K professional
+* 1.10: Sun Jan 10 10:12:32 UTC 2010
+ - Bug fix in synctex_parser.c to solve a synchronization problem with amsmath's gather environment.
+ Concerns the synctex tool.
+* 1.11: Sun Jan 17 09:12:31 UTC 2010
+ - Bug fix in synctex_parser.c, function synctex_node_box_visible_v: 'x' replaced by 'y'.
+ Only 3rd party tools are concerned.
+* 1.12: Mon Jul 19 21:52:10 UTC 2010
+ - Bug fix in synctex_parser.c, function __synctex_open: the io_mode was modified even in case of a non zero return,
+causing a void .synctex.gz file to be created even if it was not expected. Reported by Marek Kasik concerning a bug on evince.
+* 1.13: Fri Mar 11 07:39:12 UTC 2011
+ - Bug fix in synctex_parser.c, better synchronization as suggested by Jan Sundermeyer (near line 3388).
+ - Stronger code design in synctex_parser_utils.c, function _synctex_get_name (really neutral behavior).
+ Only 3rd party tools are concerned.
+* 1.14: Fri Apr 15 19:10:57 UTC 2011
+ - taking output_directory into account
+ - Replaced FOPEN_WBIN_MODE by FOPEN_W_MODE when opening the text version of the .synctex file.
+ - Merging with LuaTeX's version of synctex.c
+* 1.15: Fri Jun 10 14:10:17 UTC 2011
+This concerns the synctex command line tool and 3rd party developers.
+TeX and friends are not concerned by these changes.
+ - Bug fixed in _synctex_get_io_mode_name, sometimes the wrong mode was returned
+ - Support for LuaTeX convention of './' file prefixing
+* 1.16: Tue Jun 14 08:23:30 UTC 2011
+This concerns the synctex command line tool and 3rd party developers.
+TeX and friends are not concerned by these changes.
+ - Better forward search (thanks Jose Alliste)
+ - Support for LuaTeX convention of './' file prefixing now for everyone, not only for Windows
+* 1.17: Fri Oct 14 08:15:16 UTC 2011
+This concerns the synctex command line tool and 3rd party developers.
+TeX and friends are not concerned by these changes.
+ - synctex_parser.c: cosmetic changes to enhance code readability
+ - Better forward synchronization.
+ The problem occurs for example with LaTeX \item command.
+ The fact is that this command creates nodes at parse time but these nodes are used only
+ after the text material of the \item is displayed on the page. The consequence is that sometimes,
+ forward synchronization spots an irrelevant point from the point of view of the editing process.
+ This was due to some very basic filtering policy, where a somehow arbitrary choice was made when
+ many different possibilities where offered for synchronisation.
+ Now, forward synchronization prefers nodes inside an hbox with as many acceptable spots as possible.
+ This is achieved with the notion of mean line and node weight.
+ - Adding support for the new file naming convention with './'
+ - function `synctex_ignore_leading_dot_slash_in_path replaces` `synctex_ignore_leading_dot_slash`
+ - function `_synctex_is_equivalent_file_name` is more permissive
+ Previously, the function synctex_scanner_get_tag would give an answer only when
+ the given file name was EXACTLY one of the file names listed in the synctex file.
+ The we added some changes accepting for example 'foo.tex' instead of './foo.tex'.
+ Now we have an even looser policy for dealing with file names.
+ If the given file name does not match exactly one the file names of the synctex file,
+ then we try to match the base names. If there is only one match of the base names,
+ then it is taken as a match for the whole names.
+ The base name is defined as following:
+
+ `./foo => foo
+ /my///.////foo => foo
+ /foo => /foo
+ /my//.foo => /my//.foo`
+
+* 1.17: Tue Mar 13 10:10:03 UTC 2012
+ - minor changes, no version changes
+ - syntax man pages are fixed as suggested by M. Shimata
+ see mail to tex-live@tug.org titled "syntax.5 has many warnings from groff" and "syntax.1 use invalid macro for mdoc"
+ - 1.17: Tue Jan 14 09:55:00 UTC 2014, fixed a segfault, patch from Sebastian Ramacher
+ - 1.17: Mon Aug 04, fixed a memory leak
+* 1.18: Thu Jun 25 11:36:05 UTC 2015
+ - nested sheets now fully supported (does it make sense in TeX)
+ - cosmetic changes: uniform indentation
+ - suppression of warnings, mainly long/int ones. In short, zlib likes ints when size_t likes longs.
+ - CLI synctex tool can build out of TeXLive (modulo appropriate options passed to the compiler)
+* 1.19: Mon Jul 3 20:03:56 UTC 2017
+ - the nested sheets patch was not a good solution.
+ It has been moved from the parser to the engine.
+ See the `synctex.c` source file for detailed explanations.
+ - there is a new synctex format specification.
+ We can see that a `.synctex` file can contain many times
+ the same vertical position because many objects belong
+ to the same line. When the options read `-synctex=±2` or more,
+ a very basic compression algorithm is used:
+ if synctex is about to write the same number then it writes
+ an `=` sign instead. This saves approximately 10% of the
+ synctex output file, either compressed or not.
+ The new synctex parser has been updated accordingly.
+ Actual tex frontend won't see any difference with the
+ TeX engines that include this new feature.
+ Frontends with the new parser won't see any difference
+ with the older TeX engines.
+ Frontends with the new parser will only see a difference
+ with new TeX engines if `-synctex=±2` or more is used.
+
+## Acknowledgments:
+
+The author received useful remarks from the __pdfTeX__ developers, especially Hahn The Thanh,
+and significant help from __XeTeX__ developer Jonathan Kew.
+
+## Nota Bene:
+
+If you include or use a significant part of the __SyncTeX__ package into a software,
+I would appreciate to be listed as contributor and see __SyncTeX__" highlighted.
+
+Copyright (c) 2008-2017 jerome DOT laurens AT u-bourgogne DOT fr
+
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser_readme.txt b/Build/source/texk/web2c/synctexdir/synctex_parser_readme.txt
new file mode 100644
index 00000000000..0ffa6618aae
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser_readme.txt
@@ -0,0 +1,204 @@
+This file is part of the SyncTeX package.
+
+Please refer to synctex_parser_readme.md
+
+The Synchronization TeXnology named SyncTeX is a new feature
+of recent TeX engines designed by Jerome Laurens.
+It allows to synchronize between input and output, which means to
+navigate from the source document to the typeset material and vice versa.
+More informations on http://itexmac2.sourceforge.net/SyncTeX.html
+
+This package is mainly for developers, it mainly contains the following files:
+
+synctex_parser_readme.txt
+synctex_parser_version.txt
+synctex_parser_utils.c
+synctex_parser_utils.h
+synctex_parser_local.h
+synctex_parser_private.h
+synctex_parser.h
+synctex_parser.c
+
+The file you are reading contains more informations about the SyncTeX parser history.
+
+In order to support SyncTeX in a viewer, it is sufficient to include
+in the source the files synctex_parser.h and synctex_parser.c.
+The synctex parser usage is described in synctex_parser.h header file.
+
+The other files are used by tex engines or by the synctex command line utility:
+
+ChangeLog
+README.txt
+am
+man1
+man5
+synctex-common.h
+synctex-convert.sh
+synctex-e-mem.ch0
+synctex-e-mem.ch1
+synctex-e-rec.ch0
+synctex-e-rec.ch1
+synctex-etex.h
+synctex-mem.ch0
+synctex-mem.ch1
+synctex-mem.ch2
+synctex-pdf-rec.ch2
+synctex-pdftex.h
+synctex-rec.ch0
+synctex-rec.ch1
+synctex-rec.ch2
+synctex-tex.h
+synctex-xe-mem.ch2
+synctex-xe-rec.ch2
+synctex-xe-rec.ch3
+synctex-xetex.h
+synctex.c
+synctex.defines
+synctex.h
+synctex_main.c
+tests
+
+
+Version:
+--------
+This is version 1, which refers to the synctex output file format.
+The files are identified by a build number.
+In order to help developers to automatically manage the version and build numbers
+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:
+--------
+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.
+1.2: Tue Sep 2 10:28:32 UTC 2008
+- Correction for ConTeXt support in the edit query.
+ The previous method was assuming that TeX boxes do not overlap,
+ which is reasonable for LaTeX but not for ConTeXt.
+ This assumption is no longer considered.
+1.3: Fri Sep 5 09:39:57 UTC 2008
+- Local variable "read" renamed to "already_read" to avoid conflicts.
+- "inline" compiler directive renamed to "SYNCTEX_INLINE" for code support and maintenance
+- _synctex_error cannot be inlined due to variable arguments (thanks Christiaan Hofman)
+- Correction in the display query, extra boundary nodes are used for a more precise forwards synchronization
+1.4: Fri Sep 12 08:12:34 UTC 2008
+- For an unknown reason, the previous version was not the real 1.3 (as used in iTeXMac2 build 747).
+ As a consequence, a crash was observed.
+- Some typos are fixed.
+1.6: Mon Nov 3 20:20:02 UTC 2008
+- The bug that prevented synchronization with compressed files on windows has been fixed.
+- New interface to allow system specific customization.
+- Note that some APIs have changed.
+1.8: Mer 8 jul 2009 11:32:38 UTC
+Note that version 1.7 was delivered privately.
+- bug fix: synctex was causing a memory leak in pdftex and xetex, thus some processing speed degradation
+- bug fix: the synctex command line tool was broken when updating a .synctex file
+- enhancement: better accuracy of the synchronization process
+- enhancement: the pdf output file and the associated .synctex file no longer need to live in the same directory.
+ The new -d option of the synctex command line tool manages this situation.
+ This is handy when using something like tex -output-directory=DIR ...
+1.9: Wed Nov 4 11:52:35 UTC 2009
+- Various typo fixed
+- OutputDebugString replaced by OutputDebugStringA to deliberately disable unicode preprocessing
+- New conditional created because OutputDebugStringA is only available since Windows 2K professional
+1.10: Sun Jan 10 10:12:32 UTC 2010
+- Bug fix in synctex_parser.c to solve a synchronization problem with amsmath's gather environment.
+ Concerns the synctex tool.
+1.11: Sun Jan 17 09:12:31 UTC 2010
+- Bug fix in synctex_parser.c, function synctex_node_box_visible_v: 'x' replaced by 'y'.
+ Only 3rd party tools are concerned.
+1.12: Mon Jul 19 21:52:10 UTC 2010
+- Bug fix in synctex_parser.c, function __synctex_open: the io_mode was modified even in case of a non zero return,
+causing a void .synctex.gz file to be created even if it was not expected. Reported by Marek Kasik concerning a bug on evince.
+1.13: Fri Mar 11 07:39:12 UTC 2011
+- Bug fix in synctex_parser.c, better synchronization as suggested by Jan Sundermeyer (near line 3388).
+- Stronger code design in synctex_parser_utils.c, function _synctex_get_name (really neutral behavior).
+ Only 3rd party tools are concerned.
+1.14: Fri Apr 15 19:10:57 UTC 2011
+- taking output_directory into account
+- Replaced FOPEN_WBIN_MODE by FOPEN_W_MODE when opening the text version of the .synctex file.
+- Merging with LuaTeX's version of synctex.c
+1.15: Fri Jun 10 14:10:17 UTC 2011
+This concerns the synctex command line tool and 3rd party developers.
+TeX and friends are not concerned by these changes.
+- Bug fixed in _synctex_get_io_mode_name, sometimes the wrong mode was returned
+- Support for LuaTeX convention of './' file prefixing
+1.16: Tue Jun 14 08:23:30 UTC 2011
+This concerns the synctex command line tool and 3rd party developers.
+TeX and friends are not concerned by these changes.
+- Better forward search (thanks Jose Alliste)
+- Support for LuaTeX convention of './' file prefixing now for everyone, not only for Windows
+1.17: Fri Oct 14 08:15:16 UTC 2011
+This concerns the synctex command line tool and 3rd party developers.
+TeX and friends are not concerned by these changes.
+- synctex_parser.c: cosmetic changes to enhance code readability
+- Better forward synchronization.
+ The problem occurs for example with LaTeX \item command.
+ The fact is that this command creates nodes at parse time but these nodes are used only
+ after the text material of the \item is displayed on the page. The consequence is that sometimes,
+ forward synchronization spots an irrelevant point from the point of view of the editing process.
+ This was due to some very basic filtering policy, where a somehow arbitrary choice was made when
+ many different possibilities where offered for synchronisation.
+ Now, forward synchronization prefers nodes inside an hbox with as many acceptable spots as possible.
+ This is achieved with the notion of mean line and node weight.
+- Adding support for the new file naming convention with './'
+ + function synctex_ignore_leading_dot_slash_in_path replaces synctex_ignore_leading_dot_slash
+ + function _synctex_is_equivalent_file_name is more permissive
+ Previously, the function synctex_scanner_get_tag would give an answer only when
+ the given file name was EXACTLY one of the file names listed in the synctex file.
+ The we added some changes accepting for example 'foo.tex' instead of './foo.tex'.
+ Now we have an even looser policy for dealing with file names.
+ If the given file name does not match exactly one the file names of the synctex file,
+ then we try to match the base names. If there is only one match of the base names,
+ then it is taken as a match for the whole names.
+ The base name is defined as following:
+ ./foo => foo
+ /my///.////foo => foo
+ /foo => /foo
+ /my//.foo => /my//.foo
+1.17: Tue Mar 13 10:10:03 UTC 2012
+- minor changes, no version changes
+- syntax man pages are fixed as suggested by M. Shimata
+ see mail to tex-live@tug.org titled "syntax.5 has many warnings from groff" and "syntax.1 use invalid macro for mdoc"
+1.17: Tue Jan 14 09:55:00 UTC 2014
+- fixed a segfault, from Sebastian Ramacher
+1.17: Mon Aug 04
+- fixed a memory leak
+1.18: Thu Jun 25 11:36:05 UTC 2015
+- nested sheets now fully supported (does it make sense in TeX)
+- cosmetic changes: uniform indentation
+- suppression of warnings, mainly long/int ones. In short, zlib likes ints when size_t likes longs.
+- CLI synctex tool can build out of TeXLive (modulo appropriate options passed to the compiler)
+1.19: Thu Mar 9 21:26:27 UTC 2017
+- the nested sheets patch was not a good solution.
+ It has been moved from the parser to the engine.
+ See the synctex.c source file for detailed explanations.
+- there is a new synctex format specification.
+ We can see that a .synctex file can contain many times
+ the same vertical position because many objects belong
+ to the same line. When the options read -synctex=±2 or more,
+ a very basic compression algorithm is used:
+ if synctex is about write the same number then it writes
+ an = sign instead. This saves approximately 10% of the
+ synctex output file, either compressed or not.
+ The new synctex parser has been updated accordingly.
+ Actual tex frontend won't see any difference with the
+ TeX engines that include this new feature.
+ Frontends with the new parser won't see any difference
+ with the older TeX engines.
+ Frontends with the new parser will only see a difference
+ with new TeX engines if -synctex=±2 or more is used.
+
+Acknowledgments:
+----------------
+The author received useful remarks from the pdfTeX developers, especially Hahn The Thanh,
+and significant help from XeTeX developer Jonathan Kew
+
+Nota Bene:
+----------
+If you include or use a significant part of the synctex package into a software,
+I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
+
+Copyright (c) 2008-2014 jerome DOT laurens AT u-bourgogne DOT fr
+
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c b/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c
new file mode 100644
index 00000000000..4b4065dab64
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c
@@ -0,0 +1,571 @@
+/*
+ Copyright (c) 2008-2017 jerome DOT laurens AT u-bourgogne DOT fr
+
+ This file is part of the __SyncTeX__ package.
+
+ [//]: # (Latest Revision: Fri Jul 14 16:20:41 UTC 2017)
+ [//]: # (Version: 1.21)
+
+ See `synctex_parser_readme.md` for more details
+
+ ## License
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE
+
+ Except as contained in this notice, the name of the copyright holder
+ shall not be used in advertising or otherwise to promote the sale,
+ use or other dealings in this Software without prior written
+ authorization from the copyright holder.
+
+*/
+
+/* In this file, we find all the functions that may depend on the operating system. */
+
+#include <synctex_parser_utils.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <stdio.h>
+
+#include <limits.h>
+#include <ctype.h>
+
+#include <sys/stat.h>
+
+#if defined(_WIN32) || defined(__WIN32__) || defined(__TOS_WIN__) || defined(__WINDOWS__)
+#define SYNCTEX_WINDOWS 1
+#endif
+
+#if defined(__OS2__)
+#define SYNCTEX_OS2 1
+#endif
+
+#if defined(_WIN32)
+#define SYNCTEX_RECENT_WINDOWS 1
+#endif
+
+#ifdef SYNCTEX_WINDOWS
+#include <windows.h>
+#include <shlwapi.h> /* Use shlwapi.lib */
+#endif
+
+void *_synctex_malloc(size_t size) {
+ void * ptr = malloc(size);
+ if(ptr) {
+ memset(ptr,0, size);/* ensures null termination of strings */
+ }
+ return (void *)ptr;
+}
+
+void _synctex_free(void * ptr) {
+ if (ptr) {
+ free(ptr);
+ }
+}
+
+#if !defined(_WIN32)
+# include <syslog.h>
+#endif
+
+static int _synctex_log(int level, const char * prompt, const char * reason,va_list arg) {
+ int result;
+# ifdef SYNCTEX_RECENT_WINDOWS
+ {/* This code is contributed by William Blum.
+ As it does not work on some older computers,
+ the _WIN32 conditional here is replaced with a SYNCTEX_RECENT_WINDOWS one.
+ According to http://msdn.microsoft.com/en-us/library/aa363362(VS.85).aspx
+ Minimum supported client Windows 2000 Professional
+ Minimum supported server Windows 2000 Server
+ People running Windows 2K standard edition will not have OutputDebugStringA.
+ JL.*/
+ char *buff;
+ size_t len;
+ OutputDebugStringA(prompt);
+ len = _vscprintf(reason, arg) + 1;
+ buff = (char*)malloc( len * sizeof(char) );
+ result = vsprintf(buff, reason, arg) +strlen(prompt);
+ OutputDebugStringA(buff);
+ OutputDebugStringA("\n");
+ free(buff);
+ }
+# elif SYNCTEX_USE_SYSLOG
+ char * buffer1 = NULL;
+ char * buffer2 = NULL;
+ openlog ("SyncTeX", LOG_CONS | LOG_PID | LOG_PERROR | LOG_NDELAY, LOG_LOCAL0);
+ if (vasprintf(&buffer1,reason,arg)>=0
+ && asprintf(&buffer2,"%s%s",prompt, buffer1)>=0) {
+ syslog (level, "%s", buffer2);
+ result = (int)strlen(buffer2);
+ } else {
+ syslog (level, "%s",prompt);
+ vsyslog(level,reason,arg);
+ result = (int)strlen(prompt);
+ }
+ free(buffer1);
+ free(buffer2);
+ closelog();
+# else
+ FILE * where = level == LOG_ERR? stderr: stdout;
+ result = fputs(prompt,where);
+ result += vfprintf(where, reason, arg);
+ result += fprintf(where,"\n");
+# endif
+ return result;
+}
+
+int _synctex_error(const char * reason,...) {
+ va_list arg;
+ int result;
+ va_start (arg, reason);
+#if defined(SYNCTEX_RECENT_WINDOWS) /* LOG_ERR is not used */
+ result = _synctex_log(0, "! SyncTeX Error : ", reason, arg);
+#else
+ result = _synctex_log(LOG_ERR, "! SyncTeX Error : ", reason, arg);
+#endif
+ va_end (arg);
+ return result;
+}
+
+int _synctex_debug(const char * reason,...) {
+ va_list arg;
+ int result;
+ va_start (arg, reason);
+#if defined(SYNCTEX_RECENT_WINDOWS) /* LOG_DEBUG is not used */
+ result = _synctex_log(0, "! SyncTeX Error : ", reason, arg);
+#else
+ result = _synctex_log(LOG_DEBUG, "! SyncTeX Error : ", reason, arg);
+#endif
+ va_end (arg);
+ return result;
+}
+
+/* strip the last extension of the given string, this string is modified! */
+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,"/"))){
+ last_component = string;
+ } else {
+ ++last_component;
+ while((next = strstr(last_component,"/"))){
+ last_component = next+1;
+ }
+ }
+# if defined(SYNCTEX_OS2)
+ /* On OS2, the '\' is also a path separator. */
+ while((next = strstr(last_component,"\\"))){
+ last_component = next+1;
+ }
+# endif /* SYNCTEX_OS2 */
+ /* then we find the last path extension */
+ if((last_extension = strstr(last_component,"."))){
+ ++last_extension;
+ while((next = strstr(last_extension,"."))){
+ last_extension = next+1;
+ }
+ --last_extension;/* back to the "." */
+ if(last_extension>last_component){/* filter out paths like ....my/dir/.hidden"*/
+ last_extension[0] = '\0';
+ }
+ }
+# endif /* SYNCTEX_WINDOWS */
+ }
+}
+
+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)[0])) {
+ ++(*name_ref);
+ }
+ } while(SYNCTEX_IS_DOT((*name_ref)[0]) && SYNCTEX_IS_PATH_SEPARATOR((*name_ref)[1]));
+ return synctex_YES;
+ }
+ return synctex_NO;
+}
+
+/* The base name is necessary to deal with the 2011 file naming convention...
+ * path is a '\0' terminated string
+ * The return value is the trailing part of the argument,
+ * just following the first occurrence of the regexp pattern "[^|/|\].[\|/]+".*/
+const char * _synctex_base_name(const char *path) {
+ const char * ptr = path;
+ do {
+ if (synctex_ignore_leading_dot_slash_in_path(&ptr)) {
+ return ptr;
+ }
+ do {
+ if (!*(++ptr)) {
+ return path;
+ }
+ } while (!SYNCTEX_IS_PATH_SEPARATOR(*ptr));
+ } while (*(++ptr));
+ return path;
+}
+
+/* Compare two file names, windows is sometimes case insensitive... */
+synctex_bool_t _synctex_is_equivalent_file_name(const char *lhs, const char *rhs) {
+ /* Remove the leading regex '(\./+)*' in both rhs and lhs */
+ synctex_ignore_leading_dot_slash_in_path(&lhs);
+ synctex_ignore_leading_dot_slash_in_path(&rhs);
+next_character:
+ if (SYNCTEX_IS_PATH_SEPARATOR(*lhs)) {/* lhs points to a path separator */
+ if (!SYNCTEX_IS_PATH_SEPARATOR(*rhs)) {/* but not rhs */
+ return synctex_NO;
+ }
+ ++lhs;
+ ++rhs;
+ synctex_ignore_leading_dot_slash_in_path(&lhs);
+ synctex_ignore_leading_dot_slash_in_path(&rhs);
+ goto next_character;
+ } else if (SYNCTEX_IS_PATH_SEPARATOR(*rhs)) {/* rhs points to a path separator but not lhs */
+ return synctex_NO;
+ } else if (SYNCTEX_ARE_PATH_CHARACTERS_EQUAL(*lhs,*rhs)){/* uppercase do not match */
+ return synctex_NO;
+ } else if (!*lhs) {/* lhs is at the end of the string */
+ return *rhs ? synctex_NO : synctex_YES;
+ } else if(!*rhs) {/* rhs is at the end of the string but not lhs */
+ return synctex_NO;
+ }
+ ++lhs;
+ ++rhs;
+ goto next_character;
+}
+
+synctex_bool_t _synctex_path_is_absolute(const char * name) {
+ if(!strlen(name)) {
+ return synctex_NO;
+ }
+# if defined(SYNCTEX_WINDOWS) || defined(SYNCTEX_OS2)
+ if(strlen(name)>2) {
+ return (name[1]==':' && SYNCTEX_IS_PATH_SEPARATOR(name[2]))?synctex_YES:synctex_NO;
+ }
+ return synctex_NO;
+# else
+ return SYNCTEX_IS_PATH_SEPARATOR(name[0])?synctex_YES:synctex_NO;
+# endif
+}
+
+/* We do not take care of UTF-8 */
+const char * _synctex_last_path_component(const char * name) {
+ const char * c = name+strlen(name);
+ if(c>name) {
+ if(!SYNCTEX_IS_PATH_SEPARATOR(*c)) {
+ do {
+ --c;
+ if(SYNCTEX_IS_PATH_SEPARATOR(*c)) {
+ return c+1;
+ }
+ } while(c>name);
+ }
+ return c;/* the last path component is the void string*/
+ }
+ return c;
+}
+
+int _synctex_copy_with_quoting_last_path_component(const char * src, char ** dest_ref, size_t size) {
+ if(src && dest_ref) {
+ const char * lpc;
+# define dest (*dest_ref)
+ dest = NULL; /* Default behavior: no change and success. */
+ lpc = _synctex_last_path_component(src);
+ if(strlen(lpc)) {
+ if(strchr(lpc,' ') && lpc[0]!='"' && lpc[strlen(lpc)-1]!='"') {
+ /* We are in the situation where adding the quotes is allowed. */
+ /* Time to add the quotes. */
+ /* Consistency test: we must have dest+size>dest+strlen(dest)+2
+ * or equivalently: strlen(dest)+2<size (see below) */
+ if(strlen(src)<size) {
+ if((dest = (char *)malloc(size+2))) {
+ char * dpc = dest + (lpc-src); /* dpc is the last path component of dest. */
+ if(dest != strncpy(dest,src,size)) {
+ _synctex_error("! _synctex_copy_with_quoting_last_path_component: Copy problem");
+ free(dest);
+ dest = NULL;/* Don't forget to reinitialize. */
+ return -2;
+ }
+ memmove(dpc+1,dpc,strlen(dpc)+1); /* Also move the null terminating character. */
+ dpc[0]='"';
+ dpc[strlen(dpc)+1]='\0';/* Consistency test */
+ dpc[strlen(dpc)]='"';
+ return 0; /* Success. */
+ }
+ return -1; /* Memory allocation error. */
+ }
+ _synctex_error("! _synctex_copy_with_quoting_last_path_component: Internal inconsistency");
+ return -3;
+ }
+ return 0; /* Success. */
+ }
+ return 0; /* No last path component. */
+# undef dest
+ }
+ return 1; /* Bad parameter, this value is subject to changes. */
+}
+
+/* The client is responsible of the management of the returned string, if any. */
+char * _synctex_merge_strings(const char * first,...);
+
+char * _synctex_merge_strings(const char * first,...) {
+ va_list arg;
+ size_t size = 0;
+ const char * temp;
+ /* First retrieve the size necessary to store the merged string */
+ va_start (arg, first);
+ temp = first;
+ do {
+ size_t len = strlen(temp);
+ if(UINT_MAX-len<size) {
+ _synctex_error("! _synctex_merge_strings: Capacity exceeded.");
+ va_end(arg);
+ return NULL;
+ }
+ size+=len;
+ } while( (temp = va_arg(arg, const char *)) != NULL);
+ va_end(arg);
+ if(size>0) {
+ char * result = NULL;
+ ++size;
+ /* Create the memory storage */
+ if(NULL!=(result = (char *)malloc(size))) {
+ char * dest = result;
+ va_start (arg, first);
+ temp = first;
+ do {
+ if((size = strlen(temp))>0) {
+ /* There is something to merge */
+ if(dest != strncpy(dest,temp,size)) {
+ _synctex_error("! _synctex_merge_strings: Copy problem");
+ free(result);
+ result = NULL;
+ va_end(arg);
+ return NULL;
+ }
+ dest += size;
+ }
+ } while( (temp = va_arg(arg, const char *)) != NULL);
+ va_end(arg);
+ dest[0]='\0';/* Terminate the merged string */
+ return result;
+ }
+ _synctex_error("! _synctex_merge_strings: Memory problem");
+ return NULL;
+ }
+ return NULL;
+}
+
+/* The purpose of _synctex_get_name is to find the name of the synctex file.
+ * There is a list of possible filenames from which we return the most recent one and try to remove all the others.
+ * With two runs of pdftex or xetex we are sure the synctex file is really the most appropriate.
+ */
+int _synctex_get_name(const char * output, const char * build_directory, char ** synctex_name_ref, synctex_io_mode_t * io_mode_ref)
+{
+ if(output && synctex_name_ref && io_mode_ref) {
+ /* If output is already absolute, we just have to manage the quotes and the compress mode */
+ size_t size = 0;
+ char * synctex_name = NULL;
+ synctex_io_mode_t io_mode = *io_mode_ref;
+ const char * base_name = _synctex_last_path_component(output); /* do not free, output is the owner. base name of output*/
+ /* Do we have a real base name ? */
+ if(strlen(base_name)>0) {
+ /* Yes, we do. */
+ const char * temp = NULL;
+ char * core_name = NULL; /* base name of output without path extension. */
+ char * dir_name = NULL; /* dir name of output */
+ char * quoted_core_name = NULL;
+ char * basic_name = NULL;
+ char * gz_name = NULL;
+ char * quoted_name = NULL;
+ char * quoted_gz_name = NULL;
+ char * build_name = NULL;
+ char * build_gz_name = NULL;
+ char * build_quoted_name = NULL;
+ char * build_quoted_gz_name = NULL;
+ struct stat buf;
+ time_t the_time = 0;
+ /* Create core_name: let temp point to the dot before the path extension of base_name;
+ * We start form the \0 terminating character and scan the string upward until we find a dot.
+ * The leading dot is not accepted. */
+ if((temp = strrchr(base_name,'.')) && (size = temp - base_name)>0) {
+ /* There is a dot and it is not at the leading position */
+ if(NULL == (core_name = (char *)malloc(size+1))) {
+ _synctex_error("! _synctex_get_name: Memory problem 1");
+ return -1;
+ }
+ if(core_name != strncpy(core_name,base_name,size)) {
+ _synctex_error("! _synctex_get_name: Copy problem 1");
+ free(core_name);
+ dir_name = NULL;
+ return -2;
+ }
+ core_name[size] = '\0';
+ } else {
+ /* There is no path extension,
+ * Just make a copy of base_name */
+ core_name = _synctex_merge_strings(base_name);
+ }
+ /* core_name is properly set up, owned by "self". */
+ /* creating dir_name. */
+ size = strlen(output)-strlen(base_name);
+ if(size>0) {
+ /* output contains more than one path component */
+ if(NULL == (dir_name = (char *)malloc(size+1))) {
+ _synctex_error("! _synctex_get_name: Memory problem");
+ free(core_name);
+ return -1;
+ }
+ if(dir_name != strncpy(dir_name,output,size)) {
+ _synctex_error("! _synctex_get_name: Copy problem");
+ free(dir_name);
+ dir_name = NULL;
+ free(core_name);
+ dir_name = NULL;
+ return -2;
+ }
+ dir_name[size] = '\0';
+ }
+ /* dir_name is properly set up. It ends with a path separator, if non void. */
+ /* creating quoted_core_name. */
+ if(strchr(core_name,' ')) {
+ quoted_core_name = _synctex_merge_strings("\"",core_name,"\"");
+ }
+ /* quoted_core_name is properly set up. */
+ if(dir_name &&strlen(dir_name)>0) {
+ basic_name = _synctex_merge_strings(dir_name,core_name,synctex_suffix,NULL);
+ if(quoted_core_name && strlen(quoted_core_name)>0) {
+ quoted_name = _synctex_merge_strings(dir_name,quoted_core_name,synctex_suffix,NULL);
+ }
+ } else {
+ basic_name = _synctex_merge_strings(core_name,synctex_suffix,NULL);
+ if(quoted_core_name && strlen(quoted_core_name)>0) {
+ quoted_name = _synctex_merge_strings(quoted_core_name,synctex_suffix,NULL);
+ }
+ }
+ if(!_synctex_path_is_absolute(output) && build_directory && (size = strlen(build_directory))) {
+ temp = build_directory + size - 1;
+ if(_synctex_path_is_absolute(temp)) {
+ build_name = _synctex_merge_strings(build_directory,basic_name,NULL);
+ if(quoted_core_name && strlen(quoted_core_name)>0) {
+ build_quoted_name = _synctex_merge_strings(build_directory,quoted_name,NULL);
+ }
+ } else {
+ build_name = _synctex_merge_strings(build_directory,"/",basic_name,NULL);
+ if(quoted_core_name && strlen(quoted_core_name)>0) {
+ build_quoted_name = _synctex_merge_strings(build_directory,"/",quoted_name,NULL);
+ }
+ }
+ }
+ if(basic_name) {
+ gz_name = _synctex_merge_strings(basic_name,synctex_suffix_gz,NULL);
+ }
+ if(quoted_name) {
+ quoted_gz_name = _synctex_merge_strings(quoted_name,synctex_suffix_gz,NULL);
+ }
+ if(build_name) {
+ build_gz_name = _synctex_merge_strings(build_name,synctex_suffix_gz,NULL);
+ }
+ if(build_quoted_name) {
+ build_quoted_gz_name = _synctex_merge_strings(build_quoted_name,synctex_suffix_gz,NULL);
+ }
+ /* All the others names are properly set up... */
+ /* retain the most recently modified file */
+# define TEST(FILENAME,COMPRESS_MODE) \
+ if(FILENAME) {\
+ if (stat(FILENAME, &buf)) { \
+ free(FILENAME);\
+ FILENAME = NULL;\
+ } else if (buf.st_mtime>the_time) { \
+ the_time=buf.st_mtime; \
+ synctex_name = FILENAME; \
+ if (COMPRESS_MODE) { \
+ io_mode |= synctex_io_gz_mask; \
+ } else { \
+ io_mode &= ~synctex_io_gz_mask; \
+ } \
+ } \
+ }
+ TEST(basic_name,synctex_DONT_COMPRESS);
+ TEST(gz_name,synctex_COMPRESS);
+ TEST(quoted_name,synctex_DONT_COMPRESS);
+ TEST(quoted_gz_name,synctex_COMPRESS);
+ TEST(build_name,synctex_DONT_COMPRESS);
+ TEST(build_gz_name,synctex_COMPRESS);
+ TEST(build_quoted_name,synctex_DONT_COMPRESS);
+ TEST(build_quoted_gz_name,synctex_COMPRESS);
+# undef TEST
+ /* Free all the intermediate filenames, except the one that will be used as returned value. */
+# define CLEAN_AND_REMOVE(FILENAME) \
+ if(FILENAME && (FILENAME!=synctex_name)) {\
+ remove(FILENAME);\
+ printf("synctex tool info: %s removed\n",FILENAME);\
+ free(FILENAME);\
+ FILENAME = NULL;\
+ }
+ CLEAN_AND_REMOVE(basic_name);
+ CLEAN_AND_REMOVE(gz_name);
+ CLEAN_AND_REMOVE(quoted_name);
+ CLEAN_AND_REMOVE(quoted_gz_name);
+ CLEAN_AND_REMOVE(build_name);
+ CLEAN_AND_REMOVE(build_gz_name);
+ CLEAN_AND_REMOVE(build_quoted_name);
+ CLEAN_AND_REMOVE(build_quoted_gz_name);
+# undef CLEAN_AND_REMOVE
+ /* set up the returned values */
+ * synctex_name_ref = synctex_name;
+ /* synctex_name won't always end in .gz, even when compressed. */
+ FILE * F = fopen(synctex_name, "r");
+ if (F != NULL) {
+ if (!feof(F)
+ && 31 == fgetc(F)
+ && !feof(F)
+ && 139 == fgetc(F)) {
+ io_mode = synctex_compress_mode_gz;
+ }
+ fclose(F);
+ }
+ * io_mode_ref = io_mode;
+ return 0;
+ }
+ return -1;/* bad argument */
+ }
+ return -2;
+}
+
+const char * _synctex_get_io_mode_name(synctex_io_mode_t io_mode) {
+ static const char * synctex_io_modes[4] = {"r","rb","a","ab"};
+ unsigned index = ((io_mode & synctex_io_gz_mask)?1:0) + ((io_mode & synctex_io_append_mask)?2:0);// bug pointed out by Jose Alliste
+ return synctex_io_modes[index];
+}
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser_utils.h b/Build/source/texk/web2c/synctexdir/synctex_parser_utils.h
new file mode 100644
index 00000000000..4dd4e17e649
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser_utils.h
@@ -0,0 +1,163 @@
+/*
+ Copyright (c) 2008-2017 jerome DOT laurens AT u-bourgogne DOT fr
+
+ This file is part of the __SyncTeX__ package.
+
+ [//]: # (Latest Revision: Fri Jul 14 16:20:41 UTC 2017)
+ [//]: # (Version: 1.21)
+
+ See `synctex_parser_readme.md` for more details
+
+ ## License
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+*/
+
+#ifndef SYNCTEX_PARSER_UTILS_H
+#define SYNCTEX_PARSER_UTILS_H
+
+/* The utilities declared here are subject to conditional implementation.
+ * All the operating system special stuff goes here.
+ * The problem mainly comes from file name management: path separator, encoding...
+ */
+
+#include "synctex_version.h"
+
+typedef int synctex_bool_t;
+# define synctex_YES (0==0)
+# define synctex_NO (0==1)
+
+# define synctex_ADD_QUOTES -1
+# define synctex_COMPRESS -1
+# define synctex_DONT_ADD_QUOTES 0
+# define synctex_DONT_COMPRESS 0
+
+#ifndef __SYNCTEX_PARSER_UTILS__
+# define __SYNCTEX_PARSER_UTILS__
+
+#include <stdlib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+# if defined(_WIN32) || defined(__OS2__)
+# define SYNCTEX_CASE_SENSITIVE_PATH 0
+# define SYNCTEX_IS_PATH_SEPARATOR(c) ('/' == c || '\\' == c)
+# else
+# define SYNCTEX_CASE_SENSITIVE_PATH 1
+# define SYNCTEX_IS_PATH_SEPARATOR(c) ('/' == c)
+# endif
+
+# if defined(_WIN32) || defined(__OS2__)
+# define SYNCTEX_IS_DOT(c) ('.' == c)
+# else
+# define SYNCTEX_IS_DOT(c) ('.' == c)
+# endif
+
+# if SYNCTEX_CASE_SENSITIVE_PATH
+# define SYNCTEX_ARE_PATH_CHARACTERS_EQUAL(left,right) (left != right)
+# else
+# define SYNCTEX_ARE_PATH_CHARACTERS_EQUAL(left,right) (toupper(left) != toupper(right))
+# endif
+
+/* This custom malloc functions initializes to 0 the newly allocated memory.
+ * There is no bzero function on windows. */
+void *_synctex_malloc(size_t size);
+
+/* To balance _synctex_malloc.
+ * ptr might be NULL. */
+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,...);
+
+/* strip the last extension of the given string, this string is modified!
+ * This function depends on the OS because the path separator may differ.
+ * This should be discussed more precisely. */
+void _synctex_strip_last_path_extension(char * string);
+
+/* Compare two file names, windows is sometimes case insensitive...
+ * The given strings may differ stricto sensu, but represent the same file name.
+ * It might not be the real way of doing things.
+ * The return value is an undefined non 0 value when the two file names are equivalent.
+ * It is 0 otherwise. */
+synctex_bool_t _synctex_is_equivalent_file_name(const char *lhs, const char *rhs);
+
+/* Description forthcoming.*/
+synctex_bool_t _synctex_path_is_absolute(const char * name);
+
+/* Description forthcoming...*/
+const char * _synctex_last_path_component(const char * name);
+
+/* Description forthcoming...*/
+const char * _synctex_base_name(const char *path);
+
+/* If the core of the last path component of src is not already enclosed with double quotes ('"')
+ * and contains a space character (' '), then a new buffer is created, the src is copied and quotes are added.
+ * In all other cases, no destination buffer is created and the src is not copied.
+ * 0 on success, which means no error, something non 0 means error, mainly due to memory allocation failure, or bad parameter.
+ * This is used to fix a bug in the first version of pdftex with synctex (1.40.9) for which names with spaces
+ * were not managed in a standard way.
+ * On success, the caller owns the buffer pointed to by dest_ref (is any) and
+ * is responsible of freeing the memory when done.
+ * The size argument is the size of the src buffer. On return the dest_ref points to a buffer sized size+2.*/
+int _synctex_copy_with_quoting_last_path_component(const char * src, char ** dest_ref, size_t size);
+
+/* These are the possible extensions of the synctex file */
+extern const char * synctex_suffix;
+extern const char * synctex_suffix_gz;
+
+typedef unsigned int synctex_io_mode_t;
+
+typedef enum {
+ synctex_io_append_mask = 1,
+ synctex_io_gz_mask = synctex_io_append_mask<<1
+} synctex_io_mode_masks_t;
+
+typedef enum {
+ synctex_compress_mode_none = 0,
+ synctex_compress_mode_gz = 1
+} synctex_compress_mode_t;
+
+int _synctex_get_name(const char * output, const char * build_directory, char ** synctex_name_ref, synctex_io_mode_t * io_mode_ref);
+
+/* returns the correct mode required by fopen and gzopen from the given io_mode */
+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);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+#endif /* SYNCTEX_PARSER_UTILS_H */
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser_version.txt b/Build/source/texk/web2c/synctexdir/synctex_parser_version.txt
new file mode 100644
index 00000000000..d2ab029d32c
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser_version.txt
@@ -0,0 +1 @@
+1.21
diff --git a/Build/source/texk/web2c/synctexdir/synctex_version.h b/Build/source/texk/web2c/synctexdir/synctex_version.h
new file mode 100644
index 00000000000..5665ccb9604
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/synctex_version.h
@@ -0,0 +1,59 @@
+/*
+Copyright (c) 2008-2017 jerome DOT laurens AT u-bourgogne DOT fr
+
+This file is part of the __SyncTeX__ package.
+
+[//]: # (Latest Revision: Fri Jul 14 16:20:41 UTC 2017)
+[//]: # (Version: 1.21)
+
+See `synctex_parser_readme.md` for more details
+
+## License
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE
+
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the copyright holder.
+
+## Acknowledgments:
+
+The author received useful remarks from the __pdfTeX__ developers, especially Hahn The Thanh,
+and significant help from __XeTeX__ developer Jonathan Kew.
+
+## Nota Bene:
+
+If you include or use a significant part of the __SyncTeX__ package into a software,
+I would appreciate to be listed as contributor and see "__SyncTeX__" highlighted.
+*/
+
+#ifndef __SYNCTEX_VERSION__
+# define __SYNCTEX_VERSION__
+
+# define SYNCTEX_VERSION_MAJOR 1
+
+# define SYNCTEX_VERSION_STRING "1.21"
+
+# define SYNCTEX_CLI_VERSION_STRING "1.5"
+
+#endif
diff --git a/Build/source/texk/web2c/synctexdir/tests/LM-Volume-manuscript.tex b/Build/source/texk/web2c/synctexdir/tests/LM-Volume-manuscript.tex
new file mode 100644
index 00000000000..2853bd550e2
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/tests/LM-Volume-manuscript.tex
@@ -0,0 +1,1009 @@
+\documentclass[ a4paper, oneside]{amsart}
+
+%\listfiles
+
+
+\RequirePackage{amsmath}
+\RequirePackage{bm}
+\RequirePackage{amssymb}
+\RequirePackage{upref}
+\RequirePackage{amsthm}
+\RequirePackage{enumerate}
+%\RequirePackage{pb-diagram}
+\RequirePackage{amsfonts}
+\RequirePackage[mathscr]{eucal}
+\RequirePackage{verbatim}
+\RequirePackage{xr}
+
+
+\def\@thm#1#2#3{%
+ \ifhmode\unskip\unskip\par\fi
+ \normalfont
+ \trivlist
+ \let\thmheadnl\relax
+ \let\thm@swap\@gobble
+ \let\thm@indent\indent % no indent
+ \thm@headfont{\scshape}% heading font bold
+ %\thm@notefont{\fontseries\mddefault\upshape}%
+ \thm@notefont{}%
+ \thm@headpunct{.}% add period after heading
+ \thm@headsep 5\p@ plus\p@ minus\p@\relax
+ \thm@preskip\topsep
+ \thm@postskip\thm@preskip
+ #1% style overrides
+ \@topsep \thm@preskip % used by thm head
+ \@topsepadd \thm@postskip % used by \@endparenv
+ \def\@tempa{#2}\ifx\@empty\@tempa
+ \def\@tempa{\@oparg{\@begintheorem{#3}{}}[]}%
+ \else
+ \refstepcounter{#2}%
+ \def\@tempa{\@oparg{\@begintheorem{#3}{\csname the#2\endcsname}}[]}%
+ \fi
+ \@tempa
+}
+
+
+
+
+%Redefined commands
+
+
+%Greek Letters
+
+\newcommand{\al}{\alpha}
+\newcommand{\bet}{\beta}
+\newcommand{\ga}{\gamma}
+\newcommand{\de}{\delta }
+\newcommand{\e}{\epsilon}
+\newcommand{\ve}{\varepsilon}
+\newcommand{\f}{\varphi}
+\newcommand{\h}{\eta}
+\newcommand{\io}{\iota}
+\newcommand{\tht}{\theta}
+\newcommand{\ka}{\kappa}
+\newcommand{\lam}{\lambda}
+\newcommand{\m}{\mu}
+\newcommand{\n}{\nu}
+\newcommand{\om}{\omega}
+\newcommand{\p}{\pi}
+\newcommand{\vt}{\vartheta}
+\newcommand{\vr}{\varrho}
+\newcommand{\s}{\sigma}
+\newcommand{\x}{\xi}
+\newcommand{\z}{\zeta}
+
+\newcommand{\C}{\varGamma}
+\newcommand{\D}{\varDelta}
+\newcommand{\F}{\varPhi}
+\newcommand{\Lam}{\varLambda}
+\newcommand{\Om}{\varOmega}
+\newcommand{\vPsi}{\varPsi}
+\newcommand{\Si}{\varSigma}
+
+%New Commands
+
+\newcommand{\di}[1]{#1\nobreakdash-\hspace{0pt}dimensional}%\di n
+\newcommand{\nbdd}{\nobreakdash--}
+\newcommand{\nbd}{\nobreakdash-\hspace{0pt}}
+\newcommand{\ce}[1]{$C^#1$\nbd{estimate}}
+\newcommand{\ces}[1]{$C^#1$\nbd{estimates}}
+
+
+\newcommand{\fm}[1]{F_{|_{M_#1}}}
+\newcommand{\fmo}[1]{F_{|_{#1}}}%\fmo M
+\newcommand{\fu}[3]{#1\hspace{0pt}_{|_{#2_#3}}}
+\newcommand{\fv}[2]{#1\hspace{0pt}_{|_{#2}}}
+\newcommand{\cchi}[1]{\chi\hspace{0pt}_{_{#1}}}
+\newcommand{\so}{{\mc S_0}}
+%\newcommand\sql[1][u]{\sqrt{1-|D#1|^2}}
+
+
+\newcommand{\const}{\tup{const}}
+
+
+\newcommand{\slim}[2]{\lim_{\substack{#1\ra #2\\#1\ne #2}}}
+
+
+\newcommand{\pih}{\frac{\pi}{2}}
+
+
+\newcommand{\msp[1]}[1]{\mspace{#1mu}}
+\newcommand{\low}[1]{{\hbox{}_{#1}}}
+
+
+
+%Special Symbols
+
+\newcommand{\R}[1][n+1]{{\protect\mathbb R}^{#1}}
+\newcommand{\Cc}{{\protect\mathbb C}}
+\newcommand{\K}{{\protect\mathbb K}}
+\newcommand{\N}{{\protect\mathbb N}}
+\newcommand{\Q}{{\protect\mathbb Q}}
+\newcommand{\Z}{{\protect\mathbb Z}}
+\newcommand{\eR}{\stackrel{\lower1ex \hbox{\rule{6.5pt}{0.5pt}}}{\msp[3]\R[]}}
+\newcommand{\eN}{\stackrel{\lower1ex \hbox{\rule{6.5pt}{0.5pt}}}{\msp[1]\N}}
+\newcommand{\eO}{\stackrel{\lower1ex
+\hbox{\rule{6pt}{0.5pt}}}{\msc O}}
+
+
+
+
+%Special math symbols
+
+\DeclareMathOperator{\arccot}{arccot}
+\DeclareMathOperator{\diam}{diam}
+\DeclareMathOperator{\Grad}{Grad}
+\DeclareMathOperator*{\es}{ess\,sup}
+\DeclareMathOperator{\graph}{graph}
+\DeclareMathOperator{\sub}{sub}
+\DeclareMathOperator{\supp}{supp}
+\DeclareMathOperator{\id}{id}
+\DeclareMathOperator{\lc}{lc}
+\DeclareMathOperator{\osc}{osc}
+\DeclareMathOperator{\pr}{pr}
+\DeclareMathOperator{\rec}{Re}
+\DeclareMathOperator{\imc}{Im}
+\DeclareMathOperator{\sign}{sign}
+\DeclareMathOperator{\proj}{proj}
+\DeclareMathOperator{\grad}{grad}
+\DeclareMathOperator{\Diff}{Diff}
+\DeclareMathOperator{\rg}{rg}
+
+
+\newcommand\im{\implies}
+\newcommand\ra{\rightarrow}
+\newcommand\xra{\xrightarrow}
+\newcommand\rra{\rightrightarrows}
+\newcommand\hra{\hookrightarrow}
+\newcommand{\nea}{\nearrow}
+\newcommand{\sea}{\searrow}
+\newcommand{\ua}{\uparrow}
+\newcommand{\da}{\downarrow}
+\newcommand{\rha}{\rightharpoondown}
+\newcommand{\wha}{\underset{w^*}\rightharpoondown}
+
+%PDE commands
+
+\newcommand\pa{\partial}
+\newcommand\pde[2]{\frac {\partial#1}{\partial#2}}
+\newcommand\pd[3]{\frac {\partial#1}{\partial#2^#3}} %e.g. \pd fxi
+\newcommand\pdc[3]{\frac {\partial#1}{\partial#2_#3}} %contravariant
+\newcommand\pdm[4]{\frac {\partial#1}{\partial#2_#3^#4}} %mixed
+\newcommand\pdd[4]{\frac {{\partial\hskip0.15em}^2#1}{\partial {#2^
+#3}\,\partial{#2^#4}}} %e.g. \pdd fxij, Abl. zweiter Ordnung
+\newcommand\pddc[4]{\frac {{\partial\hskip0.15em}^2#1}{\partial {#2_
+#3}\,\partial{#2_#4}}}
+\newcommand\PD[3]{\frac {{\partial\hskip0.15em}^2#1}{\partial
+#2\,\partial#3}} %e.g \PD fxy
+
+\newcommand\df[2]{\frac {d#1}{d#2}}
+
+
+\newcommand\sd{\vartriangle}
+\newcommand\sq[1][u]{\sqrt{1+|D#1|^2}}
+\newcommand\sql[1][u]{\sqrt{1-|D#1|^2}}
+\newcommand{\un}{\infty}
+\newcommand{\A}{\forall}
+\newcommand{\E}{\exists}
+
+%Set commands
+
+\newcommand{\set}[2]{\{\,#1\colon #2\,\}}
+\newcommand{\uu}{\cup}
+\newcommand{\ii}{\cap}
+\newcommand{\uuu}{\bigcup}
+\newcommand{\iii}{\bigcap}
+\newcommand{\uud}{ \stackrel{\lower 1ex \hbox {.}}{\uu}}
+\newcommand{\uuud}[1]{ \stackrel{\lower 1ex \hbox {.}}{\uuu_{#1}}}
+\newcommand\su{\subset}
+\newcommand\Su{\Subset}
+\newcommand\nsu{\nsubset}
+\newcommand\eS{\emptyset}
+\newcommand{\sminus}[1][28]{\raise 0.#1ex\hbox{$\scriptstyle\setminus$}}
+\newcommand{\cpl}{\complement}
+
+\newcommand\inn[1]{{\stackrel{\msp[9]\circ}{#1}}}
+
+
+
+%Embellishments
+
+\newcommand{\ol}{\overline}
+\newcommand{\pri}[1]{#1^\prime}
+\newcommand{\whn}[1]{\widehat{(#1_n)}}
+\newcommand{\wh}{\widehat}
+
+
+%Logical commands
+
+\newcommand{\wed}{\wedge}
+\newcommand{\eqv}{\Longleftrightarrow}
+\newcommand{\lla}{\Longleftarrow}
+\newcommand{\lra}{\Longrightarrow}
+\newcommand{\bv}{\bigvee}
+\newcommand{\bw}{\bigwedge}
+
+\newcommand{\nim}{{\hskip2.2ex\not\hskip-1.5ex\im}}
+
+\DeclareMathOperator*{\Au}{\A}
+\DeclareMathOperator*{\Eu}{\E}
+
+\newcommand\ti{\times }
+
+
+%Norms
+\newcommand{\abs}[1]{\lvert#1\rvert}
+\newcommand{\absb}[1]{\Bigl|#1\Bigr|}
+\newcommand{\norm}[1]{\lVert#1\rVert}
+\newcommand{\normb}[1]{\Big\lVert#1\Big\rVert}
+\newcommand{\nnorm}[1]{| \mspace{-2mu} |\mspace{-2mu}|#1| \mspace{-2mu}
+|\mspace{-2mu}|}
+\newcommand{\spd}[2]{\protect\langle #1,#2\protect\rangle}
+
+%Geometry
+\newcommand\ch[3]{\varGamma_{#1#2}^#3}
+\newcommand\cha[3]{{\bar\varGamma}_{#1#2}^#3}
+\newcommand{\riem}[4]{R_{#1#2#3#4}}
+\newcommand{\riema}[4]{{\bar R}_{#1#2#3#4}}
+\newcommand{\cod}{h_{ij;k}-h_{ik;j}=\riema\al\bet\ga\de\n^\al x_i^\bet x_j^\ga x_k^\de}
+\newcommand{\gau}[1][\s]{\riem ijkl=#1 \{h_{ik}h_{jl}-h_{il}h_{jk}\} + \riema
+\al\bet\ga\de x_i^\al x_j^\bet x_k^\ga x_l^\de}
+\newcommand{\ric}{\h_{i;jk}=\h_{i;kj}+\riem lijk\msp \h^l}
+
+%Font commands
+
+\newcommand{\tbf}{\textbf}
+\newcommand{\tit}{\textit}
+\newcommand{\tsl}{\textsl}
+
+\newcommand{\tsc}{\textsc}
+\newcommand{\trm}{\textrm}
+\newcommand{\tup}{\textup}% text upright
+
+\newcommand{\mbf}{\protect\mathbf}
+\newcommand{\mitc}{\protect\mathit}
+\newcommand{\mrm}{\protect\mathrm}
+
+
+\newcommand{\bs}{\protect\boldsymbol}
+\newcommand{\mc}{\protect\mathcal}
+\newcommand{\msc}{\protect\mathscr}
+
+
+
+%Miscellaneous
+
+\providecommand{\bysame}{\makeboc[3em]{\hrulefill}\thinspace}
+\newcommand{\la}{\label}
+\newcommand{\ci}{\cite}
+\newcommand{\bib}{\bibitem}
+
+\newcommand{\cq}[1]{\glqq{#1}\grqq\,}
+\newcommand{\cqr}{\glqq{$\lra$}\grqq\,}
+\newcommand{\cql}{\glqq{$\lla$}\grqq\,}
+
+\newcommand{\bt}{\begin{thm}}
+\newcommand{\bl}{\begin{lem}}
+\newcommand{\bc}{\begin{cor}}
+\newcommand{\bd}{\begin{definition}}
+\newcommand{\bpp}{\begin{prop}}
+\newcommand{\br}{\begin{rem}}
+\newcommand{\bn}{\begin{note}}
+\newcommand{\be}{\begin{ex}}
+\newcommand{\bes}{\begin{exs}}
+\newcommand{\bb}{\begin{example}}
+\newcommand{\bbs}{\begin{examples}}
+\newcommand{\ba}{\begin{axiom}}
+
+
+
+\newcommand{\et}{\end{thm}}
+\newcommand{\el}{\end{lem}}
+\newcommand{\ec}{\end{cor}}
+\newcommand{\ed}{\end{definition}}
+\newcommand{\epp}{\end{prop}}
+\newcommand{\er}{\end{rem}}
+\newcommand{\en}{\end{note}}
+\newcommand{\ee}{\end{ex}}
+\newcommand{\ees}{\end{exs}}
+\newcommand{\eb}{\end{example}}
+\newcommand{\ebs}{\end{examples}}
+\newcommand{\ea}{\end{axiom}}
+
+
+\newcommand{\bp}{\begin{proof}}
+\newcommand{\ep}{\end{proof}}
+\newcommand{\eps}{\renewcommand{\qed}{}\end{proof}}
+
+\newcommand{\bal}{\begin{align}}
+%\newcommand{\eal}{\end{align}}
+
+
+\newcommand{\bi}[1][1.]{\begin{enumerate}[\upshape #1]}
+\newcommand{\bia}[1][(1)]{\begin{enumerate}[\upshape #1]}
+\newcommand{\bin}[1][1]{\begin{enumerate}[\upshape\bfseries #1]}
+\newcommand{\bir}[1][(i)]{\begin{enumerate}[\upshape #1]}
+\newcommand{\bic}[1][(i)]{\begin{enumerate}[\upshape\hspace{2\cma}#1]}
+\newcommand{\bis}[2][1.]{\begin{enumerate}[\upshape\hspace{#2\parindent}#1]}
+\newcommand{\ei}{\end{enumerate}}
+
+
+
+% comma is raised when components are quotients
+
+\newcommand\ndots{\raise 0.47ex \hbox {,}\hskip0.06em\cdots %
+ \raise 0.47ex \hbox {,}\hskip0.06em}
+
+%Layout commands
+
+
+\newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}\cleardoublepage}}
+\newcommand{\q}{\quad}
+\newcommand{\qq}{\qquad}
+
+\newcommand{\vs}[1][3]{\vskip#1pt}
+\newcommand{\hs}[1][12]{\hskip#1pt}
+
+\newcommand{\hp}{\hphantom}
+\newcommand{\vp}{\vphantom}
+
+\newcommand\cl{\centerline}
+
+\newcommand\nl{\newline}
+
+\newcommand\nd{\noindent}
+
+\newcommand{\nt}{\notag}
+
+% %my private skips; set to 0 to restore default
+
+\newskip\Csmallskipamount
+\Csmallskipamount=\smallskipamount
+\newskip\Cmedskipamount
+\Cmedskipamount=\medskipamount
+\newskip\Cbigskipamount
+\Cbigskipamount=\bigskipamount
+
+\newcommand\cvs{\vspace\Csmallskipamount}
+\newcommand\cvm{\vspace\Cmedskipamount}
+\newcommand\cvb{\vspace\Cbigskipamount}
+
+
+\newskip\csa
+\csa=\smallskipamount
+
+\newskip\cma
+\cma=\medskipamount
+
+\newskip\cba
+\cba=\bigskipamount
+
+\newdimen\spt
+\spt=0.5pt
+
+
+%%special roster macro
+
+\newcommand\citem{\cvs\advance\itemno by
+1{(\romannumeral\the\itemno})\hskip3pt}
+\newcommand{\bitem}{\cvm\nd\advance\itemno by
+1{\bf\the\itemno}\hspace{\cma}}
+\newcommand\cendroster{\cvm\itemno=0}
+
+
+%New counts
+
+\newcount\itemno
+\itemno=0
+
+%Labels
+
+\newcommand{\las}[1]{\label{S:#1}}
+\newcommand{\lass}[1]{\label{SS:#1}}
+\newcommand{\lae}[1]{\label{E:#1}}
+\newcommand{\lat}[1]{\label{T:#1}}
+\newcommand{\lal}[1]{\label{L:#1}}
+\newcommand{\lad}[1]{\label{D:#1}}
+\newcommand{\lac}[1]{\label{C:#1}}
+\newcommand{\lan}[1]{\label{N:#1}}
+\newcommand{\lap}[1]{\label{P:#1}}
+\newcommand{\lar}[1]{\label{R:#1}}
+\newcommand{\laa}[1]{\label{A:#1}}
+
+%Referencing
+
+\newcommand{\rs}[1]{Section~\ref{S:#1}}
+\newcommand{\rss}[1]{Section~\ref{SS:#1}}
+\newcommand{\rt}[1]{Theorem~\ref{T:#1}}
+\newcommand{\rl}[1]{Lemma~\ref{L:#1}}
+\newcommand{\rd}[1]{Definition~\ref{D:#1}}
+\newcommand{\rc}[1]{Corollary~\ref{C:#1}}
+\newcommand{\rn}[1]{Number~\ref{N:#1}}
+\newcommand{\rp}[1]{Proposition~\ref{P:#1}}
+\newcommand{\rr}[1]{Remark~\ref{R:#1}}
+\newcommand{\raa}[1]{Axiom~\ref{A:#1}}
+\newcommand{\re}[1]{\eqref{E:#1}}
+
+
+%Index
+\newcommand{\ind}[1]{#1\index{#1}}
+
+
+
+
+
+
+\RequirePackage{upref}
+\RequirePackage{amsthm}
+%\usepackage{amsfonts}
+%\usepackage{amsintx}
+\RequirePackage{enumerate}%\begin{enumerate}[(i)]
+
+%%\usepackage{showkeys}
+\setlength{\textwidth}{4.7in}%JDG
+\setlength{\textheight}{7.5in}
+
+\usepackage{germanquotes}
+
+\theoremstyle{plain}
+\newtheorem{thm}{Theorem}[section]
+\newtheorem{lem}[thm]{Lemma}
+\newtheorem{prop}[thm]{Proposition}
+\newtheorem{cor}[thm]{Corollary}
+
+\theoremstyle{definition}
+\newtheorem{rem}[thm]{Remark}
+\newtheorem{definition}[thm]{Definition}
+\newtheorem{example}[thm]{Example}
+\newtheorem{ex}[thm]{Exercise}
+
+\swapnumbers
+\theoremstyle{remark}
+\newtheorem{case}{Case}
+
+\numberwithin{equation}{section}
+
+%\renewcommand{\qed}{q.e.d.}
+
+\usepackage{xr-hyper}
+\usepackage{url}
+\usepackage[hyperindex=true, pdfauthor= Claus\ Gerhardt, pdftitle= LM-Volume, bookmarks=true, extension= pdf, colorlinks=true, plainpages=false,hyperfootnotes=true, debug=false, pagebackref]{hyperref}
+
+\newcommand{\anl}{\htmladdnormallink}
+
+%\listfiles
+\begin{document}
+%\larger[1]
+\title{Estimates for the volume of a Lorentzian manifold}
+
+% author one information
+\author{Claus Gerhardt}
+\address{Ruprecht-Karls-Universit\"at, Institut f\"ur Angewandte Mathematik,
+Im Neuenheimer Feld 294, 69120 Heidelberg, Germany}
+%\curraddr{}
+\email{gerhardt@math.uni-heidelberg.de}
+\urladdr{\url{http://www.math.uni-heidelberg.de/studinfo/gerhardt/}}
+%\thanks{}
+
+% author two information
+%\author{}
+%\address{}
+%\curraddr{}
+%\email{}
+%\thanks{}
+%
+\subjclass[2000]{35J60, 53C21, 53C44, 53C50, 58J05}
+\keywords{Lorentzian manifold, volume estimates, cosmological spacetime, general relativity, constant mean curvature, CMC hypersurface}
+\date{April 18, 2002}
+%
+% at present the "communicated by" line appears only in ERA and PROC
+%\commby{}
+
+%\dedicatory{}
+
+\begin{abstract} We prove new estimates for the volume of a Lorentzian
+mani\-fold and show especially that cosmological spacetimes with crushing
+singularities have finite volume.
+\end{abstract}
+\maketitle
+\thispagestyle{empty}
+
+\setcounter{section}{-1}
+\section{Introduction}
+
+\cvb
+Let $N$ be a $(n+1)$-dimensional Lorentzian manifold and suppose that $N$ can be
+decomposed in the form
+
+\begin{equation}\lae{0.1}
+N=N_0\uu N_-\uu N_+,
+\end{equation}
+
+\cvm
+\nd where $N_0$ has finite volume and $N_-$ resp. $N_+$ represent the critical
+past resp. future Cauchy developments with not necessarily a priori bounded
+volume. We assume that $N_+$ is the future Cauchy development of a Cauchy
+hypersurface $M_1$, and $N_-$ the past Cauchy development of a hypersurface
+$M_2$, or, more precisely, we assume the existence of a time function $x^0$,
+such that
+
+\begin{equation}
+\begin{aligned}
+N_+&={x^0}^{-1}([t_1,T_+)),&\qq M_1=\{x^0=t_1\}&,\\
+N_-&={x^0}^{-1}((T_-,t_2]),&\qq M_2=\{x^0=t_2\}&,
+\end{aligned}
+\end{equation}
+
+\cvm
+\nd and that the Lorentz metric can be expressed as
+
+\begin{equation}\lae{0.3}
+d\bar s^2=e^{2\psi}\{-{dx^0}^2+\s_{ij}(x^0,x)dx^idx^j\},
+\end{equation}
+
+\cvm
+\nd where $x=(x^i)$ are local coordinates for the space-like hypersurface $M_1$
+if $N_+$ is considered resp. $M_2$ in case of $N_-$.
+
+The coordinate system $(x^\al)_{0\le\al\le n}$ is supposed to be future
+directed, i.e. the \tit{past} directed unit normal $(\nu^\al)$ of the level sets
+
+\begin{equation}
+M(t)=\{x^0=t\}
+\end{equation}
+
+\cvm
+\nd is of the form
+
+\begin{equation}\lae{0.5}
+(\nu^\al)=-e^{-\psi}(1,0,\ldots,0).
+\end{equation}
+
+\cvm
+If we assume the mean curvature of the slices $M(t)$ with respect to the past
+directed normal---cf. \ci[Section 2]{cg8} for a more detailed explanation of our
+conventions---is strictly bounded away from zero, then, the following volume
+estimates can be proved
+
+\bt\lat{0.1}
+Suppose there exists a positive constant $\e_0$ such that
+
+
+\begin{align}
+H(t)&\ge \e_0&\A\,t_1\le t< T_+&,\lae{0.6}\\
+\intertext{and}
+H(t)&\le-\e_0&\A\,T_-<t\le t_2&,\lae{0.7}
+\end{align}
+
+\cvm
+\nd then
+
+\begin{align}
+\abs{N_+}&\le \frac1{\e_0}\abs{M(t_1)},\\
+\intertext{and}
+\abs{N_-}&\le \frac1{\e_0}\abs{M(t_2}.
+\end{align}
+
+These estimates also hold locally, i.e. if $E_i\su M(t_i)$, $i=1,2$, are measurable
+subsets and $E_1^+,E_2^-$ the corresponding future resp. past directed
+cylinders, then,
+
+\begin{align}
+\abs{E_1^+}&\le\frac1{\e_0}\abs{E_1},\lae{0.10}\\
+\intertext{and}
+\abs{E_2^-}&\le\frac1{\e_0}\abs{E_2}.
+\end{align}
+\et
+
+\cvb
+\section{Proof of \rt{0.1}}\las{1}
+
+\cvb
+In the following we shall only prove the estimate for $N_+$, since the other case
+$N_-$ can easily be considered as a future development by reversing the time
+direction.
+
+\cvm
+Let $x=x(\xi)$ be an embedding of a space-like hypersurface and $(\nu^\al)$ be
+the past directed normal. Then, we have the Gau{\ss} formula
+
+\begin{equation}
+x^\al_{ij}=h_{ij}\nu^\al.
+\end{equation}
+
+\cvm
+\nd where $(h_{ij})$ is the second fundamental form, and the Weingarten equation
+
+\begin{equation}
+\nu^\al_i=h^k_ix^\al_k.
+\end{equation}
+
+
+\cvm
+We emphasize that covariant derivatives, indicated simply by indices, are
+always \tit{full} tensors.
+
+\cvm
+The slices $M(t)$ can be viewed as special embeddings of the form
+
+\begin{equation}
+x(t)=(t,x^i),
+\end{equation}
+
+\cvm
+\nd where $(x^i)$ are coordinates of the \tit{initial} slice $M(t_1)$. Hence, the
+slices $M(t)$ can be considered as the solution of the evolution problem
+
+\begin{equation}\lae{1.4}
+\dot x=-e^\psi \nu, \qq t_1\le t<T_+,
+\end{equation}
+
+\cvm
+\nd with initial hypersurface $M(t_1)$, in view of \re{0.5}.
+
+\cvm From the equation \re{1.4} we can immediately derive evolution equations
+for the geometric quantities $g_{ij}, h_{ij}, \nu$, and $H=g^{ij}h_{ij}$ of $M(t)$, cf.
+e.g.
+\ci[Section 4]{cg4}, where the corresponding evolution equations are derived in
+Riemannian space.
+
+\cvm
+For our purpose, we are only interested in the evolution equation for the metric,
+and we deduce
+
+\begin{equation}
+\dot g_{ij}=\spd{\dot x_i}{x_j}+\spd{x_i}{\dot x_j}=- 2e^\psi h_{ij},
+\end{equation}
+
+\cvm
+\nd in view of the Weingarten equation.
+
+\cvm
+Let $g=\det(g_{ij})$, then,
+
+\begin{equation}\lae{1.6}
+\dot g= g g^{ij}\dot g_{ij}=-2e^\psi H g,
+\end{equation}
+
+\cvm
+\nd and thus, the volume of $M(t), \abs{M(t)}$, evolves according to
+
+\begin{equation}\lae{1.7}
+\frac d{dt} \abs{M(t)}=\int_{M(t_1)}\frac d{dt}\sqrt g=-\int_{M(t)}e^\psi H,
+\end{equation}
+
+\cvm
+\nd where we shall assume without loss of generality that $\abs{M(t_1}$ is finite,
+otherwise, we replace $M(t_1)$ by an arbitrary measurable subset of $M(t_1)$
+with finite volume.
+
+\cvm
+Now, let $T\in [t_1, T_+)$ be arbitrary and denote by $Q(t_1,T)$ the
+cylinder
+
+\begin{equation}\lae{1.8}
+Q(t_1,T)=\set{(x^0,x)}{t_1\le x^0\le T},
+\end{equation}
+
+\cvm
+\nd then,
+
+\begin{equation}\lae{1.9}
+\abs{Q(t_1,T)}=\int_{t_1}^T\int_Me^\psi,
+\end{equation}
+
+\cvm
+\nd where we omit the volume elements, and where, $M=M(x^0)$.
+
+\cvm
+By assumption, the mean curvature $H$ of the slices is bounded from below by
+$\e_0$, and we conclude further, with the help of \re{1.7},
+
+\begin{equation}
+\begin{aligned}
+\abs{Q(t_1,T)}&\le\frac 1{\e_0} \int_{t_1}^T\int_Me^\psi H\\
+&=\frac1{\e_0}\{\abs{M(t_1)}-\abs{M(T)}\}\\
+&\le \frac1{\e_0}\abs{M(t_1)}.
+\end{aligned}
+\end{equation}
+
+
+\cvm
+Letting $T$ tend to $T_+$ gives the estimate for $\abs {N_+}$.
+
+\cvm
+To prove the estimate \re{0.10}, we simply replace $M(t_1)$ by $E_1$.
+
+\cvb
+If we relax the conditions \re{0.6} and \re{0.7} to include the case $\e_0=0$, a
+volume estimate is still possible.
+
+\cvm
+\bt
+If the assumptions of \rt{0.1} are valid with $\e_0=0$, and if in addition the
+length of any future directed curve starting from $M(t_1)$ is bounded by a
+constant $\ga_1$ and the length of any past directed curve starting from $M(t_2)$
+is bounded by a constant $\ga_2$, then,
+\begin{align}
+\abs{N_+}&\le \ga_1\abs{M(t_1)}\\
+\intertext{and}
+\abs{N_-}&\le \ga_2\abs{M(t_2)}.
+\end{align}
+\et
+
+\cvm
+\bp
+As before, we only consider the estimate for $N_+$.
+
+\cvm
+From \re{1.6} we infer that the volume element of the slices $M(t)$ is decreasing
+in $t$, and hence,
+\begin{equation}\lae{1.13}
+\sqrt{g(t)}\le \sqrt{g(t_1)}\qq\A\,t_1\le t.
+\end{equation}
+
+\cvm
+Furthermore, for fixed $x\in M(t_1)$ and $t>t_1$
+\begin{equation}\lae{1.14}
+\int_{t_1}^te^\psi\le \ga_1
+\end{equation}
+because the left-hand side is the length of the future directed curve
+\begin{equation}
+\ga(\tau)=(\tau,x)\qq t_1\le\tau\le t.
+\end{equation}
+
+\cvm
+Let us now look at the cylinder $Q(t_1,T)$ as in \re{1.8} and \re{1.9}. We have
+\begin{equation}
+\begin{aligned}
+\abs{Q(t_1,T)}&=\int_{t_1}^T\int_{M(t_1)}e^\psi\sqrt{g(t,x)}\le
+\int_{t_1}^T\int_{M(t_1)}e^\psi\sqrt{g(t_1,x)}\\[\cma]
+&\le \ga_1\int_{M(t_1)}\sqrt{g(t_1,x)}=\ga_1\abs{M(t_1)}
+\end{aligned}
+\end{equation}
+by applying Fubini's theorem and the estimates \re{1.13} and \re{1.14}.
+\ep
+
+\cvb
+\section{Cosmological spacetimes}\las{2}
+
+\cvb
+A cosmological spacetime is a globally hyperbolic Lorentzian manifold $N$ with
+compact Cauchy hypersurface $\so$, that satisfies the timelike convergence
+condition, i.e.
+
+\begin{equation}
+\bar R_{\al\bet}\nu^\al\nu^\bet\ge 0 \qq \A\,\spd\nu\nu=-1.
+\end{equation}
+
+\cvm
+If there exist crushing singularities, see \ci{es} or \ci{cg1} for a definition, then,
+we proved in
+\ci{cg1} that
+$N$ can be foliated by spacelike hypersurfaces $M(\tau)$ of constant mean
+curvature $\tau$, $-\un<\tau<\un$,
+
+\begin{equation}
+N=\uuu_{0\ne\tau\in \R[]}M(\tau)\uu{\msc C}_0,
+\end{equation}
+
+
+\cvm
+\nd where $\msc C_0$ consists either of a single maximal slice or of a whole
+continuum of maximal slices in which case the metric is stationary in $\msc
+C_0$. But in any case $\msc C_0$ is a compact subset of $N$.
+
+\cvm
+In the complement of $\msc C_0$ the mean curvature function $\tau$ is a regular
+function with non-vanishing gradient that can be used as a new time function, cf.
+\ci{cg6} for a simple proof.
+
+\cvm
+Thus, the Lorentz metric can be expressed in Gaussian coordinates $(x^\al)$ with
+$x^0=\tau$ as in \re{0.3}. We choose arbitrary $\tau_2<0<\tau_1$ and de\-fine
+
+\begin{equation}
+\begin{aligned}
+N_0&=\set{(\tau,x)}{\tau_2\le\tau \le \tau_1},\\
+N_-&=\set{(\tau,x)}{-\un<\tau \le \tau_2},\\
+N_+&=\set{(\tau,x)}{\tau_1\le \tau<\un}.
+\end{aligned}
+\end{equation}
+
+\cvm
+Then, $N_0$ is compact, and the volumes of $N_-, N_+$ can be estimated by
+
+\begin{align}
+\abs{N_+}&\le \frac1{\tau_1}\abs{M(\tau_1)},\\
+\intertext{and}
+\abs{N_-}&\le \frac1{\abs{\tau_2}}\abs{M(\tau_2)}.
+\end{align}
+
+\cvm
+Hence, we have proved
+
+\bt
+A cosmological spacetime $N$ with crushing singularities has finite volume.
+\et
+
+\cvb
+\br
+Let $N$ be a spacetime with compact Cauchy hypersurface and suppose that a
+subset
+$N_-\su N$ is foliated by constant mean curvature slices $M(\tau)$ such that
+
+\begin{equation}
+N_-=\uuu_{0<\tau\le \tau_2}M(\tau)
+\end{equation}
+
+\cvm
+\nd and suppose furthermore, that $x^0=\tau$ is a time function---which will be
+the case if the timelike convergence condition is satisfied---so that the metric
+can be represented in Gaussian coordinates $(x^\al)$ with $x^0=\tau$.
+
+\cvm
+Consider the cylinder $Q(\tau,\tau_2)=\{\tau\le x^0\le \tau_2\}$ for some
+fixed $\tau$. Then,
+
+\begin{equation}
+\abs{Q(\tau,\tau_2)}=\int_\tau^{\tau_2}\int_Me^\psi=\int_\tau
+^{\tau_2}H^{-1}\int_MH e^\psi,
+\end{equation}
+
+\cvm
+\nd and we obtain in view of \re{1.7}
+
+\begin{equation}
+\tau^{-1}_2\{\abs {M(\tau)}-\abs{M(\tau_2)}\}\le\abs{Q(\tau,\tau_2)},
+\end{equation}
+
+\cvm
+\nd and conclude further
+
+\begin{equation}
+\lim_{\tau\ra 0}\msp[2]\abs{M(\tau)}\le \tau_2\abs{N_-}+\abs{M(\tau_2)},
+\end{equation}
+
+\nd i.e.
+
+\begin{equation}
+\lim_{\tau\ra 0}\msp[2]\abs{M(\tau)}=\un\im \abs{N_-}=\un.
+\end{equation}
+\er
+
+\cvb
+\section{The Riemannian case}
+
+\cvb
+Suppose that $N$ is a Riemannian manifold that is decomposed as in \re{0.1} with
+metric
+
+
+\begin{equation}
+d\bar s^2=e^{2\psi}\{{dx^0}^2+\s_{ij}(x^0,x)dx^idx^j\}.
+\end{equation}
+
+\cvm
+The Gau{\ss} formula and the Weingarten equation for a hypersurface now have
+the form
+
+\begin{align}
+x^\al_{ij}&=-h_{ij}\nu^\al,\\
+\intertext{and}
+\nu^\al_i&=h^k_ix^\al_k.
+\end{align}
+
+
+\cvm
+As default normal vector---if such a choice is possible---we choose the outward
+normal, which, in case of the coordinate slices $M(t)=\{x^0=t\}$ is given by
+
+\begin{equation}
+(\nu^\al)=e^{-\psi}(1,0,\ldots,0).
+\end{equation}
+
+
+\cvm
+Thus, the coordinate slices are solutions of the evolution problem
+
+\begin{equation}
+\dot x=e^\psi \nu,
+\end{equation}
+
+\cvm
+\nd and, therefore,
+
+\begin{equation}
+\dot g_{ij}=2e^\psi h_{ij},
+\end{equation}
+
+\cvm
+\nd i.e. we have the opposite sign compared to the Lorentzian case leading to
+
+\begin{equation}
+\frac d{dt}\abs{M(t)}=\int_Me^\psi H.
+\end{equation}
+
+\cvm
+The arguments in \rs{1} now yield
+
+\bt
+\tup{(i)} Suppose there exists a positive constant $\e_0$ such that the mean
+curvature $H(t)$ of the slices $M(t)$ is estimated by
+
+\begin{align}
+H(t)&\ge \e_0&\A\,t_1\le t< T_+&,\\
+\intertext{and}
+H(t)&\le-\e_0&\A\,T_-<t\le t_2&,
+\end{align}
+
+\cvm
+\nd then
+
+\begin{align}
+\abs{N_+}&\le \frac1{\e_0}\lim_{t\ra T_+}\abs{M(t)},\\
+\intertext{and}
+\abs{N_-}&\le \frac1{\e_0}\lim_{t\ra T_-}\abs{M(t}.
+\end{align}
+
+\cvm
+\tup{(ii)} On the other hand, if the mean curvature $H$ is negative in $N_+$ and
+positive in $N_-$, then, we obtain the same estimates as \rt{0.1}, namely,
+
+\begin{align}
+\abs{N_+}&\le \frac1{\e_0}\abs{M(t_1)},\\
+\intertext{and}
+\abs{N_-}&\le \frac1{\e_0}\abs{M(t_2)}.
+\end{align}
+\et
+
+\cvb
+
+\begin{thebibliography}{99}
+\bib{es}
+D. Eardley \& L. Smarr, \emph{Time functions in numerical relativity: marginally
+bound dust collapse}, Phys. Rev. D \tbf{19} (1979) 2239\nbdd2259.
+
+
+\bib{cg1}
+C. Gerhardt, \emph{H-surfaces in Lorentzian manifolds}, Commun. Math. Phys.
+\tbf{89} (1983) 523\nbdd{553}.
+
+
+
+\bib{cg4}
+\bysame, \emph{Hypersurfaces of prescribed Weingarten curvature}, Math. Z.
+\tbf{224} (1997) 167\nbdd{194}.
+\url{http://www.math.uni-heidelberg.de/studinfo/gerhardt/MZ224,97.pdf}
+
+
+
+\bib{cg6}
+\bysame, \emph{On the foliation of space-time by constant mean curvature
+hypersurfaces}, preprint,
+\url{http://www.math.uni-heidelberg.de/studinfo/gerhardt/Foliation.pdf}
+
+
+\bib{cg8}
+\bysame, \emph{Hypersurfaces of
+prescribed curvature in Lorentzian manifolds}, Indiana Univ. Math. J. \tbf{49}
+(2000) 1125\nbdd1153.
+\url{http://www.math.uni-heidelberg.de/studinfo/gerhardt/GaussLorentz.pdf}]
+
+
+
+
+
+\bib{HE}
+S. W. Hawking \& G. F. R. Ellis, \emph{The large scale structure of space-time},
+Cambridge University Press, Cambridge, 1973.
+
+
+
+\end{thebibliography}
+\end{document}
+
+
+%------------------------------------------------------------------------------
+% End of journal.top
+%------------------------------------------------------------------------------
diff --git a/Build/source/texk/web2c/synctexdir/tests/bartest.synctex.gz b/Build/source/texk/web2c/synctexdir/tests/bartest.synctex.gz
new file mode 100644
index 00000000000..7cdd7cb2dab
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/tests/bartest.synctex.gz
Binary files differ
diff --git a/Build/source/texk/web2c/synctexdir/tests/footest.synctex b/Build/source/texk/web2c/synctexdir/tests/footest.synctex
new file mode 100644
index 00000000000..6004cb6391f
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/tests/footest.synctex
@@ -0,0 +1,8587 @@
+SyncTeX Version:1
+Input:1:test.tex
+Input:2:/usr/local/texlive/2008/texmf-dist/tex/latex/base/book.cls
+Input:3:/usr/local/texlive/2008/texmf-dist/tex/latex/base/bk11.clo
+Input:4:/usr/local/texlive/2008/texmf-dist/tex/generic/babel/babel.sty
+Input:5:/usr/local/texlive/2008/texmf-dist/tex/generic/babel/english.ldf
+Input:6:/usr/local/texlive/2008/texmf-dist/tex/generic/babel/babel.def
+Input:7:/usr/local/texlive/2008/texmf-dist/tex/generic/babel/bahasai.ldf
+Input:8:/usr/local/texlive/2008/texmf-dist/tex/latex/booktabs/booktabs.sty
+Input:9:/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/graphicx.sty
+Input:10:/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/keyval.sty
+Input:11:/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/graphics.sty
+Input:12:/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/trig.sty
+Input:13:/usr/local/texlive/2008/texmf/tex/latex/config/graphics.cfg
+Input:14:/usr/local/texlive/2008/texmf-dist/tex/latex/pdftex-def/pdftex.def
+Input:15:/usr/local/texlive/2008/texmf-dist/tex/latex/amsfonts/amssymb.sty
+Input:16:/usr/local/texlive/2008/texmf-dist/tex/latex/amsfonts/amsfonts.sty
+Input:17:/usr/local/texlive/2008/texmf-dist/tex/latex/jknapltx/mathrsfs.sty
+Input:18:/usr/local/texlive/2008/texmf-dist/tex/latex/base/textcomp.sty
+Input:19:/usr/local/texlive/2008/texmf-dist/tex/latex/base/ts1enc.def
+Input:20:/usr/local/texlive/2008/texmf-dist/tex/latex/base/syntonly.sty
+Input:21:/usr/local/texlive/2008/texmf-dist/tex/latex/mhchem/mhchem.sty
+Input:22:/usr/local/texlive/2008/texmf-dist/tex/latex/base/ifthen.sty
+Input:23:/usr/local/texlive/2008/texmf-dist/tex/latex/tools/calc.sty
+Input:24:/usr/local/texlive/2008/texmf-dist/tex/latex/oberdiek/twoopt.sty
+Input:25:/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amsmath.sty
+Input:26:/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amstext.sty
+Input:27:/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amsgen.sty
+Input:28:/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amsbsy.sty
+Input:29:/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amsopn.sty
+Input:30:/usr/local/texlive/2008/texmf-dist/tex/latex/mh/xfrac.sty
+Input:31:/usr/local/texlive/2008/texmf-dist/tex/latex/expl3/l3names.sty
+Input:32:/usr/local/texlive/2008/texmf-dist/tex/latex/xpackages/template.sty
+Input:33:/usr/local/texlive/2008/texmf-dist/tex/latex/xpackages/ldcsetup.sty
+Input:34:/usr/local/texlive/2008/texmf-dist/tex/latex/expl3/l3calc.sty
+Input:35:/usr/local/texlive/2008/texmf-dist/tex/latex/expl3/l3int.sty
+Input:36:/usr/local/texlive/2008/texmf-dist/tex/latex/expl3/l3num.sty
+Input:37:/usr/local/texlive/2008/texmf-dist/tex/latex/expl3/l3expan.sty
+Input:38:/usr/local/texlive/2008/texmf-dist/tex/latex/expl3/l3tlp.sty
+Input:39:/usr/local/texlive/2008/texmf-dist/tex/latex/expl3/l3basics.sty
+Input:40:/usr/local/texlive/2008/texmf-dist/tex/latex/expl3/l3skip.sty
+Input:41:/usr/local/texlive/2008/texmf-dist/tex/latex/expl3/l3prg.sty
+Input:42:/usr/local/texlive/2008/texmf-dist/tex/latex/expl3/l3quark.sty
+Input:43:/usr/local/texlive/2008/texmf-dist/tex/latex/expl3/l3toks.sty
+Input:44:/usr/local/texlive/2008/texmf-dist/tex/latex/expl3/l3box.sty
+Input:45:/usr/local/texlive/2008/texmf-dist/tex/latex/expl3/l3token.sty
+Input:46:/usr/local/texlive/2008/texmf-dist/tex/latex/xpackages/xparse.sty
+Input:47:/usr/local/texlive/2008/texmf-dist/tex/latex/expl3/l3seq.sty
+Input:48:/usr/local/texlive/2008/texmf-dist/tex/latex/expl3/l3clist.sty
+Input:49:/usr/local/texlive/2008/texmf-dist/tex/latex/xkeyval/xkeyval.sty
+Input:50:/usr/local/texlive/2008/texmf-dist/tex/generic/xkeyval/xkeyval.tex
+Input:51:/usr/local/texlive/2008/texmf-dist/tex/latex/siunitx/siunitx.sty
+Input:52:/usr/local/texlive/2008/texmf-dist/tex/latex/tools/array.sty
+Input:53:/usr/local/texlive/2008/texmf-dist/tex/latex/tools/xspace.sty
+Input:54:/usr/local/texlive/2008/texmf-dist/tex/latex/siunitx/config/si-prefix.cfg
+Input:55:/usr/local/texlive/2008/texmf-dist/tex/latex/siunitx/config/si-named.cfg
+Input:56:/usr/local/texlive/2008/texmf-dist/tex/latex/siunitx/config/si-addn.cfg
+Input:57:/usr/local/texlive/2008/texmf-dist/tex/latex/siunitx/config/si-prefixed.cfg
+Input:58:/usr/local/texlive/2008/texmf-dist/tex/latex/siunitx/config/si-accepted.cfg
+Input:59:/usr/local/texlive/2008/texmf-dist/tex/latex/siunitx/config/si-physical.cfg
+Input:60:/usr/local/texlive/2008/texmf-dist/tex/latex/siunitx/config/si-abbr.cfg
+Input:61:/usr/local/texlive/2008/texmf-dist/tex/latex/titlesec/titlesec.sty
+Input:62:/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/color.sty
+Input:63:/usr/local/texlive/2008/texmf/tex/latex/config/color.cfg
+Input:64:test.aux
+Input:65:/usr/local/texlive/2008/texmf-dist/tex/latex/base/ts1cmr.fd
+Input:66:/usr/local/texlive/2008/texmf-dist/tex/context/base/supp-pdf.tex
+Input:67:/usr/local/texlive/2008/texmf-dist/tex/latex/amsfonts/umsa.fd
+Input:68:/usr/local/texlive/2008/texmf-dist/tex/latex/amsfonts/umsb.fd
+Input:69:/usr/local/texlive/2008/texmf-dist/tex/latex/jknapltx/ursfs.fd
+Output:pdf
+Magnification:1000
+Unit:1
+X Offset:0
+Y Offset:0
+Content:
+!5050
+{1
+[1,24:4736286,45679049:25493504,40942763,0
+[1,24:6636830,45679049:23592960,39369899,0
+[1,24:6636830,7095582:23592960,786432,0
+(1,24:6636830,7095582:23592960,0,0
+h1,24:6636830,7095582:23592960,0,0
+)
+]
+[1,24:6636830,43879237:23592960,35481206,0
+h1,24:6636830,9118927:0,0,0
+(1,24:6636830,22608969:23592960,786432,220273
+k1,24:12651320,22608969:6014490
+(1,24:12651320,22608969:0,0,0
+g1,24:12651320,22608969
+g1,24:12651320,22608969
+g1,24:12292510,22608969
+(1,24:12292510,22608969:0,0,0
+)
+g1,24:12651320,22608969
+)
+x1,24:15351466,22608969
+x1,24:17316524,22608969
+g1,24:17658400,22608969
+x1,24:20432273,22608969
+g1,24:20774149,22608969
+x1,24:23087820,22608969
+x1,24:24215301,22608969
+g1,24:24215301,22608969
+k1,24:30229790,22608969:6014489
+)
+(1,24:6636830,25679336:23592960,642250,275254
+k1,24:15356059,25679336:8719229
+h1,24:15356059,25679336:0,0,0
+(1,24:15356059,25679336:6154503,642250,275254
+$1,24:15356059,25679336
+[1,24:15356059,25679336:6154503,642250,275254
+(1,24:15356059,25679336:6154503,642250,275254
+g1,24:15356059,25679336
+(1,24:15356059,25679336:6154503,642250,275254
+r1,24:15356059,25679336:0,917504,275254
+g1,24:15749275,25679336
+g1,24:15749275,25679336
+x1,24:19150012,25679336
+g1,24:19406692,25679336
+x1,24:21117346,25679336
+g1,24:21117346,25679336
+g1,24:21510562,25679336
+)
+g1,24:21510562,25679336
+)
+]
+$1,24:21510562,25679336
+)
+g1,24:21510562,25679336
+k1,24:30229790,25679336:8719228
+)
+h1,24:6636830,35763147:0,0,0
+]
+(1,24:6636830,45679049:23592960,0,0
+h1,24:6636830,45679049:23592960,0,0
+)
+]
+]
+!1515
+}1
+!9
+{2
+[1,25:4736286,45679049:28835840,40942763,0
+[1,25:9979166,45679049:23592960,39369899,0
+[1,25:9979166,7095582:23592960,786432,0
+(1,25:9979166,7095582:23592960,479268,0
+(1,25:9979166,7095582:23592960,479268,0
+x1,25:10377844,7095582
+k1,25:33572126,7095582:23194282
+)
+)
+]
+[1,25:9979166,43879237:0,35481206,0
+h1,25:9979166,9118927:0,0,0
+]
+(1,25:9979166,45679049:23592960,0,0
+h1,25:9979166,45679049:23592960,0,0
+)
+]
+]
+!417
+}2
+Input:70:test.toc
+!34
+{3
+[1,26:4736286,45679049:25493504,40942763,0
+[1,26:6636830,45679049:23592960,39369899,0
+[1,26:6636830,7095582:23592960,786432,0
+(1,26:6636830,7095582:23592960,0,0
+h1,26:6636830,7095582:23592960,0,0
+)
+]
+[1,26:6636830,43879237:23592960,35481206,0
+(1,25:6636830,14361807:23592960,1132315,0
+h1,25:6636830,14361807:0,0,0
+x1,25:11849261,14361807
+g1,25:12460712,14361807
+x1,25:14376972,14361807
+k1,25:22303381,14361807:7926409
+k1,25:30229790,14361807:7926409
+)
+(70,2:6636830,18592158:23592960,498346,139537
+g70,2:7713261,18592158
+g70,2:6636830,18592158
+(70,2:6636830,18592158:1076431,462465,0
+x70,2:7049458,18592158
+k70,2:7713261,18592158:663803
+)
+x70,2:10101921,18592158
+g70,2:10377006,18592158
+x70,2:11672201,18592158
+x70,2:12084829,18592158
+x70,2:12463071,18592158
+x70,2:13036166,18592158
+x70,2:13414408,18592158
+g70,2:13689493,18592158
+x70,2:15535856,18592158
+x70,2:16429883,18592158
+k70,2:28950640,18592158:12520757
+(70,2:28950640,18592158:1279150,462465,0
+k70,2:29817162,18592158:866522
+x70,2:30229790,18592158
+)
+g70,2:29117476,18592158
+g70,2:30229790,18592158
+)
+(70,3:6636830,19483448:23592960,498346,0
+g70,3:9363791,19483448
+h70,3:9363791,19483448:1076431,0,0
+h70,3:10440222,19483448:0,0,0
+g70,3:7713261,19483448
+(70,3:7713261,19483448:1650530,462465,0
+x70,3:8630220,19483448
+k70,3:9363791,19483448:733571
+)
+x70,3:11430936,19483448
+g70,3:11670142,19483448
+x70,3:14787804,19483448
+(70,3:15008945,19483448:558141,75748,0
+$70,3:15008945,19483448
+(70,3:15188346,19483448:199339,75748,0
+x70,3:15387685,19483448
+)
+$70,3:15567086,19483448
+)
+(70,3:15567086,19483448:558141,75748,0
+(70,3:15746487,19483448:199339,75748,0
+x70,3:15945826,19483448
+)
+)
+(70,3:16125227,19483448:558141,75748,0
+(70,3:16304628,19483448:199339,75748,0
+x70,3:16503967,19483448
+)
+)
+(70,3:16683368,19483448:558141,75748,0
+(70,3:16862769,19483448:199339,75748,0
+x70,3:17062108,19483448
+)
+)
+(70,3:17241509,19483448:558141,75748,0
+(70,3:17420910,19483448:199339,75748,0
+x70,3:17620249,19483448
+)
+)
+(70,3:17799650,19483448:558141,75748,0
+(70,3:17979051,19483448:199339,75748,0
+x70,3:18178390,19483448
+)
+)
+(70,3:18357791,19483448:558141,75748,0
+(70,3:18537192,19483448:199339,75748,0
+x70,3:18736531,19483448
+)
+)
+(70,3:18915932,19483448:558141,75748,0
+(70,3:19095333,19483448:199339,75748,0
+x70,3:19294672,19483448
+)
+)
+(70,3:19474073,19483448:558141,75748,0
+(70,3:19653474,19483448:199339,75748,0
+x70,3:19852813,19483448
+)
+)
+(70,3:20032214,19483448:558141,75748,0
+(70,3:20211615,19483448:199339,75748,0
+x70,3:20410954,19483448
+)
+)
+(70,3:20590355,19483448:558141,75748,0
+(70,3:20769756,19483448:199339,75748,0
+x70,3:20969095,19483448
+)
+)
+(70,3:21148496,19483448:558141,75748,0
+(70,3:21327897,19483448:199339,75748,0
+x70,3:21527236,19483448
+)
+)
+(70,3:21706637,19483448:558141,75748,0
+(70,3:21886038,19483448:199339,75748,0
+x70,3:22085377,19483448
+)
+)
+(70,3:22264778,19483448:558141,75748,0
+(70,3:22444179,19483448:199339,75748,0
+x70,3:22643518,19483448
+)
+)
+(70,3:22822919,19483448:558141,75748,0
+(70,3:23002320,19483448:199339,75748,0
+x70,3:23201659,19483448
+)
+)
+(70,3:23381060,19483448:558141,75748,0
+(70,3:23560461,19483448:199339,75748,0
+x70,3:23759800,19483448
+)
+)
+(70,3:23939201,19483448:558141,75748,0
+(70,3:24118602,19483448:199339,75748,0
+x70,3:24317941,19483448
+)
+)
+(70,3:24497342,19483448:558141,75748,0
+(70,3:24676743,19483448:199339,75748,0
+x70,3:24876082,19483448
+)
+)
+(70,3:25055483,19483448:558141,75748,0
+(70,3:25234884,19483448:199339,75748,0
+x70,3:25434223,19483448
+)
+)
+(70,3:25613624,19483448:558141,75748,0
+(70,3:25793025,19483448:199339,75748,0
+x70,3:25992364,19483448
+)
+)
+(70,3:26171765,19483448:558141,75748,0
+(70,3:26351166,19483448:199339,75748,0
+x70,3:26550505,19483448
+)
+)
+(70,3:26729906,19483448:558141,75748,0
+(70,3:26909307,19483448:199339,75748,0
+x70,3:27108646,19483448
+)
+)
+(70,3:27288047,19483448:558141,75748,0
+(70,3:27467448,19483448:199339,75748,0
+x70,3:27666787,19483448
+)
+)
+(70,3:27846188,19483448:558141,75748,0
+(70,3:28025589,19483448:199339,75748,0
+x70,3:28224928,19483448
+)
+)
+(70,3:28404329,19483448:558141,75748,0
+(70,3:28583730,19483448:199339,75748,0
+x70,3:28783069,19483448
+)
+)
+(70,3:29117476,19483448:1112314,462465,0
+k70,3:29870980,19483448:753504
+x70,3:30229790,19483448
+)
+g70,3:28399855,19483448
+g70,3:30229790,19483448
+)
+(70,4:6636830,20374738:23592960,498346,0
+g70,4:11660176,20374738
+h70,4:11660176,20374738:2726961,0,0
+h70,4:14387137,20374738:0,0,0
+g70,4:9363791,20374738
+(70,4:9363791,20374738:2296385,462465,0
+x70,4:10838899,20374738
+k70,4:11660176,20374738:821277
+)
+x70,4:14777838,20374738
+g70,4:15017044,20374738
+x70,4:17209773,20374738
+x70,4:18385874,20374738
+(70,4:18915932,20374738:558141,75748,0
+$70,4:18915932,20374738
+(70,4:19095333,20374738:199339,75748,0
+x70,4:19294672,20374738
+)
+$70,4:19474073,20374738
+)
+(70,4:19474073,20374738:558141,75748,0
+(70,4:19653474,20374738:199339,75748,0
+x70,4:19852813,20374738
+)
+)
+(70,4:20032214,20374738:558141,75748,0
+(70,4:20211615,20374738:199339,75748,0
+x70,4:20410954,20374738
+)
+)
+(70,4:20590355,20374738:558141,75748,0
+(70,4:20769756,20374738:199339,75748,0
+x70,4:20969095,20374738
+)
+)
+(70,4:21148496,20374738:558141,75748,0
+(70,4:21327897,20374738:199339,75748,0
+x70,4:21527236,20374738
+)
+)
+(70,4:21706637,20374738:558141,75748,0
+(70,4:21886038,20374738:199339,75748,0
+x70,4:22085377,20374738
+)
+)
+(70,4:22264778,20374738:558141,75748,0
+(70,4:22444179,20374738:199339,75748,0
+x70,4:22643518,20374738
+)
+)
+(70,4:22822919,20374738:558141,75748,0
+(70,4:23002320,20374738:199339,75748,0
+x70,4:23201659,20374738
+)
+)
+(70,4:23381060,20374738:558141,75748,0
+(70,4:23560461,20374738:199339,75748,0
+x70,4:23759800,20374738
+)
+)
+(70,4:23939201,20374738:558141,75748,0
+(70,4:24118602,20374738:199339,75748,0
+x70,4:24317941,20374738
+)
+)
+(70,4:24497342,20374738:558141,75748,0
+(70,4:24676743,20374738:199339,75748,0
+x70,4:24876082,20374738
+)
+)
+(70,4:25055483,20374738:558141,75748,0
+(70,4:25234884,20374738:199339,75748,0
+x70,4:25434223,20374738
+)
+)
+(70,4:25613624,20374738:558141,75748,0
+(70,4:25793025,20374738:199339,75748,0
+x70,4:25992364,20374738
+)
+)
+(70,4:26171765,20374738:558141,75748,0
+(70,4:26351166,20374738:199339,75748,0
+x70,4:26550505,20374738
+)
+)
+(70,4:26729906,20374738:558141,75748,0
+(70,4:26909307,20374738:199339,75748,0
+x70,4:27108646,20374738
+)
+)
+(70,4:27288047,20374738:558141,75748,0
+(70,4:27467448,20374738:199339,75748,0
+x70,4:27666787,20374738
+)
+)
+(70,4:27846188,20374738:558141,75748,0
+(70,4:28025589,20374738:199339,75748,0
+x70,4:28224928,20374738
+)
+)
+(70,4:28404329,20374738:558141,75748,0
+(70,4:28583730,20374738:199339,75748,0
+x70,4:28783069,20374738
+)
+)
+(70,4:29117476,20374738:1112314,462465,0
+k70,4:29870980,20374738:753504
+x70,4:30229790,20374738
+)
+g70,4:28399855,20374738
+g70,4:30229790,20374738
+)
+(70,5:6636830,21266028:23592960,498346,0
+g70,5:11660176,21266028
+h70,5:11660176,21266028:2726961,0,0
+h70,5:14387137,21266028:0,0,0
+g70,5:9363791,21266028
+(70,5:9363791,21266028:2296385,462465,0
+x70,5:10838899,21266028
+k70,5:11660176,21266028:821277
+)
+x70,5:14777838,21266028
+g70,5:15017044,21266028
+x70,5:17321403,21266028
+x70,5:18497504,21266028
+(70,5:18915932,21266028:558141,75748,0
+$70,5:18915932,21266028
+(70,5:19095333,21266028:199339,75748,0
+x70,5:19294672,21266028
+)
+$70,5:19474073,21266028
+)
+(70,5:19474073,21266028:558141,75748,0
+(70,5:19653474,21266028:199339,75748,0
+x70,5:19852813,21266028
+)
+)
+(70,5:20032214,21266028:558141,75748,0
+(70,5:20211615,21266028:199339,75748,0
+x70,5:20410954,21266028
+)
+)
+(70,5:20590355,21266028:558141,75748,0
+(70,5:20769756,21266028:199339,75748,0
+x70,5:20969095,21266028
+)
+)
+(70,5:21148496,21266028:558141,75748,0
+(70,5:21327897,21266028:199339,75748,0
+x70,5:21527236,21266028
+)
+)
+(70,5:21706637,21266028:558141,75748,0
+(70,5:21886038,21266028:199339,75748,0
+x70,5:22085377,21266028
+)
+)
+(70,5:22264778,21266028:558141,75748,0
+(70,5:22444179,21266028:199339,75748,0
+x70,5:22643518,21266028
+)
+)
+(70,5:22822919,21266028:558141,75748,0
+(70,5:23002320,21266028:199339,75748,0
+x70,5:23201659,21266028
+)
+)
+(70,5:23381060,21266028:558141,75748,0
+(70,5:23560461,21266028:199339,75748,0
+x70,5:23759800,21266028
+)
+)
+(70,5:23939201,21266028:558141,75748,0
+(70,5:24118602,21266028:199339,75748,0
+x70,5:24317941,21266028
+)
+)
+(70,5:24497342,21266028:558141,75748,0
+(70,5:24676743,21266028:199339,75748,0
+x70,5:24876082,21266028
+)
+)
+(70,5:25055483,21266028:558141,75748,0
+(70,5:25234884,21266028:199339,75748,0
+x70,5:25434223,21266028
+)
+)
+(70,5:25613624,21266028:558141,75748,0
+(70,5:25793025,21266028:199339,75748,0
+x70,5:25992364,21266028
+)
+)
+(70,5:26171765,21266028:558141,75748,0
+(70,5:26351166,21266028:199339,75748,0
+x70,5:26550505,21266028
+)
+)
+(70,5:26729906,21266028:558141,75748,0
+(70,5:26909307,21266028:199339,75748,0
+x70,5:27108646,21266028
+)
+)
+(70,5:27288047,21266028:558141,75748,0
+(70,5:27467448,21266028:199339,75748,0
+x70,5:27666787,21266028
+)
+)
+(70,5:27846188,21266028:558141,75748,0
+(70,5:28025589,21266028:199339,75748,0
+x70,5:28224928,21266028
+)
+)
+(70,5:28404329,21266028:558141,75748,0
+(70,5:28583730,21266028:199339,75748,0
+x70,5:28783069,21266028
+)
+)
+(70,5:29117476,21266028:1112314,462465,0
+k70,5:29870980,21266028:753504
+x70,5:30229790,21266028
+)
+g70,5:28399855,21266028
+g70,5:30229790,21266028
+)
+(70,6:6636830,22157318:23592960,498346,139537
+g70,6:14602427,22157318
+h70,6:14602427,22157318:5023347,0,0
+h70,6:19625774,22157318:0,0,0
+g70,6:11660177,22157318
+x70,6:15032991,22157318
+(70,6:15567086,22157318:558141,75748,0
+$70,6:15567086,22157318
+(70,6:15746487,22157318:199339,75748,0
+x70,6:15945826,22157318
+)
+$70,6:16125227,22157318
+)
+(70,6:16125227,22157318:558141,75748,0
+(70,6:16304628,22157318:199339,75748,0
+x70,6:16503967,22157318
+)
+)
+(70,6:16683368,22157318:558141,75748,0
+(70,6:16862769,22157318:199339,75748,0
+x70,6:17062108,22157318
+)
+)
+(70,6:17241509,22157318:558141,75748,0
+(70,6:17420910,22157318:199339,75748,0
+x70,6:17620249,22157318
+)
+)
+(70,6:17799650,22157318:558141,75748,0
+(70,6:17979051,22157318:199339,75748,0
+x70,6:18178390,22157318
+)
+)
+(70,6:18357791,22157318:558141,75748,0
+(70,6:18537192,22157318:199339,75748,0
+x70,6:18736531,22157318
+)
+)
+(70,6:18915932,22157318:558141,75748,0
+(70,6:19095333,22157318:199339,75748,0
+x70,6:19294672,22157318
+)
+)
+(70,6:19474073,22157318:558141,75748,0
+(70,6:19653474,22157318:199339,75748,0
+x70,6:19852813,22157318
+)
+)
+(70,6:20032214,22157318:558141,75748,0
+(70,6:20211615,22157318:199339,75748,0
+x70,6:20410954,22157318
+)
+)
+(70,6:20590355,22157318:558141,75748,0
+(70,6:20769756,22157318:199339,75748,0
+x70,6:20969095,22157318
+)
+)
+(70,6:21148496,22157318:558141,75748,0
+(70,6:21327897,22157318:199339,75748,0
+x70,6:21527236,22157318
+)
+)
+(70,6:21706637,22157318:558141,75748,0
+(70,6:21886038,22157318:199339,75748,0
+x70,6:22085377,22157318
+)
+)
+(70,6:22264778,22157318:558141,75748,0
+(70,6:22444179,22157318:199339,75748,0
+x70,6:22643518,22157318
+)
+)
+(70,6:22822919,22157318:558141,75748,0
+(70,6:23002320,22157318:199339,75748,0
+x70,6:23201659,22157318
+)
+)
+(70,6:23381060,22157318:558141,75748,0
+(70,6:23560461,22157318:199339,75748,0
+x70,6:23759800,22157318
+)
+)
+(70,6:23939201,22157318:558141,75748,0
+(70,6:24118602,22157318:199339,75748,0
+x70,6:24317941,22157318
+)
+)
+(70,6:24497342,22157318:558141,75748,0
+(70,6:24676743,22157318:199339,75748,0
+x70,6:24876082,22157318
+)
+)
+(70,6:25055483,22157318:558141,75748,0
+(70,6:25234884,22157318:199339,75748,0
+x70,6:25434223,22157318
+)
+)
+(70,6:25613624,22157318:558141,75748,0
+(70,6:25793025,22157318:199339,75748,0
+x70,6:25992364,22157318
+)
+)
+(70,6:26171765,22157318:558141,75748,0
+(70,6:26351166,22157318:199339,75748,0
+x70,6:26550505,22157318
+)
+)
+(70,6:26729906,22157318:558141,75748,0
+(70,6:26909307,22157318:199339,75748,0
+x70,6:27108646,22157318
+)
+)
+(70,6:27288047,22157318:558141,75748,0
+(70,6:27467448,22157318:199339,75748,0
+x70,6:27666787,22157318
+)
+)
+(70,6:27846188,22157318:558141,75748,0
+(70,6:28025589,22157318:199339,75748,0
+x70,6:28224928,22157318
+)
+)
+(70,6:28404329,22157318:558141,75748,0
+(70,6:28583730,22157318:199339,75748,0
+x70,6:28783069,22157318
+)
+)
+(70,6:29117476,22157318:1112314,462465,0
+k70,6:29870980,22157318:753504
+x70,6:30229790,22157318
+)
+g70,6:28399855,22157318
+g70,6:30229790,22157318
+)
+(70,7:6636830,23048608:23592960,498346,139537
+g70,7:14602427,23048608
+h70,7:14602427,23048608:5023347,0,0
+h70,7:19625774,23048608:0,0,0
+g70,7:11660177,23048608
+x70,7:14215703,23048608
+g70,7:14454909,23048608
+x70,7:16522054,23048608
+g70,7:16761260,23048608
+x70,7:17229707,23048608
+x70,7:19125418,23048608
+x70,7:21064986,23048608
+(70,7:21148496,23048608:558141,75748,0
+$70,7:21148496,23048608
+(70,7:21327897,23048608:199339,75748,0
+x70,7:21527236,23048608
+)
+$70,7:21706637,23048608
+)
+(70,7:21706637,23048608:558141,75748,0
+(70,7:21886038,23048608:199339,75748,0
+x70,7:22085377,23048608
+)
+)
+(70,7:22264778,23048608:558141,75748,0
+(70,7:22444179,23048608:199339,75748,0
+x70,7:22643518,23048608
+)
+)
+(70,7:22822919,23048608:558141,75748,0
+(70,7:23002320,23048608:199339,75748,0
+x70,7:23201659,23048608
+)
+)
+(70,7:23381060,23048608:558141,75748,0
+(70,7:23560461,23048608:199339,75748,0
+x70,7:23759800,23048608
+)
+)
+(70,7:23939201,23048608:558141,75748,0
+(70,7:24118602,23048608:199339,75748,0
+x70,7:24317941,23048608
+)
+)
+(70,7:24497342,23048608:558141,75748,0
+(70,7:24676743,23048608:199339,75748,0
+x70,7:24876082,23048608
+)
+)
+(70,7:25055483,23048608:558141,75748,0
+(70,7:25234884,23048608:199339,75748,0
+x70,7:25434223,23048608
+)
+)
+(70,7:25613624,23048608:558141,75748,0
+(70,7:25793025,23048608:199339,75748,0
+x70,7:25992364,23048608
+)
+)
+(70,7:26171765,23048608:558141,75748,0
+(70,7:26351166,23048608:199339,75748,0
+x70,7:26550505,23048608
+)
+)
+(70,7:26729906,23048608:558141,75748,0
+(70,7:26909307,23048608:199339,75748,0
+x70,7:27108646,23048608
+)
+)
+(70,7:27288047,23048608:558141,75748,0
+(70,7:27467448,23048608:199339,75748,0
+x70,7:27666787,23048608
+)
+)
+(70,7:27846188,23048608:558141,75748,0
+(70,7:28025589,23048608:199339,75748,0
+x70,7:28224928,23048608
+)
+)
+(70,7:28404329,23048608:558141,75748,0
+(70,7:28583730,23048608:199339,75748,0
+x70,7:28783069,23048608
+)
+)
+(70,7:29117476,23048608:1112314,462465,0
+k70,7:29870980,23048608:753504
+x70,7:30229790,23048608
+)
+g70,7:28399855,23048608
+g70,7:30229790,23048608
+)
+(70,8:6636830,23939898:23592960,498346,0
+g70,8:14602427,23939898
+h70,8:14602427,23939898:5023347,0,0
+h70,8:19625774,23939898:0,0,0
+g70,8:11660177,23939898
+x70,8:13721341,23939898
+g70,8:13960547,23939898
+x70,8:14428994,23939898
+x70,8:16324705,23939898
+x70,8:18264273,23939898
+(70,8:18357791,23939898:558141,75748,0
+$70,8:18357791,23939898
+(70,8:18537192,23939898:199339,75748,0
+x70,8:18736531,23939898
+)
+$70,8:18915932,23939898
+)
+(70,8:18915932,23939898:558141,75748,0
+(70,8:19095333,23939898:199339,75748,0
+x70,8:19294672,23939898
+)
+)
+(70,8:19474073,23939898:558141,75748,0
+(70,8:19653474,23939898:199339,75748,0
+x70,8:19852813,23939898
+)
+)
+(70,8:20032214,23939898:558141,75748,0
+(70,8:20211615,23939898:199339,75748,0
+x70,8:20410954,23939898
+)
+)
+(70,8:20590355,23939898:558141,75748,0
+(70,8:20769756,23939898:199339,75748,0
+x70,8:20969095,23939898
+)
+)
+(70,8:21148496,23939898:558141,75748,0
+(70,8:21327897,23939898:199339,75748,0
+x70,8:21527236,23939898
+)
+)
+(70,8:21706637,23939898:558141,75748,0
+(70,8:21886038,23939898:199339,75748,0
+x70,8:22085377,23939898
+)
+)
+(70,8:22264778,23939898:558141,75748,0
+(70,8:22444179,23939898:199339,75748,0
+x70,8:22643518,23939898
+)
+)
+(70,8:22822919,23939898:558141,75748,0
+(70,8:23002320,23939898:199339,75748,0
+x70,8:23201659,23939898
+)
+)
+(70,8:23381060,23939898:558141,75748,0
+(70,8:23560461,23939898:199339,75748,0
+x70,8:23759800,23939898
+)
+)
+(70,8:23939201,23939898:558141,75748,0
+(70,8:24118602,23939898:199339,75748,0
+x70,8:24317941,23939898
+)
+)
+(70,8:24497342,23939898:558141,75748,0
+(70,8:24676743,23939898:199339,75748,0
+x70,8:24876082,23939898
+)
+)
+(70,8:25055483,23939898:558141,75748,0
+(70,8:25234884,23939898:199339,75748,0
+x70,8:25434223,23939898
+)
+)
+(70,8:25613624,23939898:558141,75748,0
+(70,8:25793025,23939898:199339,75748,0
+x70,8:25992364,23939898
+)
+)
+(70,8:26171765,23939898:558141,75748,0
+(70,8:26351166,23939898:199339,75748,0
+x70,8:26550505,23939898
+)
+)
+(70,8:26729906,23939898:558141,75748,0
+(70,8:26909307,23939898:199339,75748,0
+x70,8:27108646,23939898
+)
+)
+(70,8:27288047,23939898:558141,75748,0
+(70,8:27467448,23939898:199339,75748,0
+x70,8:27666787,23939898
+)
+)
+(70,8:27846188,23939898:558141,75748,0
+(70,8:28025589,23939898:199339,75748,0
+x70,8:28224928,23939898
+)
+)
+(70,8:28404329,23939898:558141,75748,0
+(70,8:28583730,23939898:199339,75748,0
+x70,8:28783069,23939898
+)
+)
+(70,8:29117476,23939898:1112314,462465,0
+k70,8:29870980,23939898:753504
+x70,8:30229790,23939898
+)
+g70,8:28399855,23939898
+g70,8:30229790,23939898
+)
+(70,9:6636830,24831188:23592960,490372,0
+g70,9:14602427,24831188
+h70,9:14602427,24831188:5023347,0,0
+h70,9:19625774,24831188:0,0,0
+g70,9:11660177,24831188
+x70,9:13799084,24831188
+(70,9:13892663,24831188:558141,75748,0
+$70,9:13892663,24831188
+(70,9:14072064,24831188:199339,75748,0
+x70,9:14271403,24831188
+)
+$70,9:14450804,24831188
+)
+(70,9:14450804,24831188:558141,75748,0
+(70,9:14630205,24831188:199339,75748,0
+x70,9:14829544,24831188
+)
+)
+(70,9:15008945,24831188:558141,75748,0
+(70,9:15188346,24831188:199339,75748,0
+x70,9:15387685,24831188
+)
+)
+(70,9:15567086,24831188:558141,75748,0
+(70,9:15746487,24831188:199339,75748,0
+x70,9:15945826,24831188
+)
+)
+(70,9:16125227,24831188:558141,75748,0
+(70,9:16304628,24831188:199339,75748,0
+x70,9:16503967,24831188
+)
+)
+(70,9:16683368,24831188:558141,75748,0
+(70,9:16862769,24831188:199339,75748,0
+x70,9:17062108,24831188
+)
+)
+(70,9:17241509,24831188:558141,75748,0
+(70,9:17420910,24831188:199339,75748,0
+x70,9:17620249,24831188
+)
+)
+(70,9:17799650,24831188:558141,75748,0
+(70,9:17979051,24831188:199339,75748,0
+x70,9:18178390,24831188
+)
+)
+(70,9:18357791,24831188:558141,75748,0
+(70,9:18537192,24831188:199339,75748,0
+x70,9:18736531,24831188
+)
+)
+(70,9:18915932,24831188:558141,75748,0
+(70,9:19095333,24831188:199339,75748,0
+x70,9:19294672,24831188
+)
+)
+(70,9:19474073,24831188:558141,75748,0
+(70,9:19653474,24831188:199339,75748,0
+x70,9:19852813,24831188
+)
+)
+(70,9:20032214,24831188:558141,75748,0
+(70,9:20211615,24831188:199339,75748,0
+x70,9:20410954,24831188
+)
+)
+(70,9:20590355,24831188:558141,75748,0
+(70,9:20769756,24831188:199339,75748,0
+x70,9:20969095,24831188
+)
+)
+(70,9:21148496,24831188:558141,75748,0
+(70,9:21327897,24831188:199339,75748,0
+x70,9:21527236,24831188
+)
+)
+(70,9:21706637,24831188:558141,75748,0
+(70,9:21886038,24831188:199339,75748,0
+x70,9:22085377,24831188
+)
+)
+(70,9:22264778,24831188:558141,75748,0
+(70,9:22444179,24831188:199339,75748,0
+x70,9:22643518,24831188
+)
+)
+(70,9:22822919,24831188:558141,75748,0
+(70,9:23002320,24831188:199339,75748,0
+x70,9:23201659,24831188
+)
+)
+(70,9:23381060,24831188:558141,75748,0
+(70,9:23560461,24831188:199339,75748,0
+x70,9:23759800,24831188
+)
+)
+(70,9:23939201,24831188:558141,75748,0
+(70,9:24118602,24831188:199339,75748,0
+x70,9:24317941,24831188
+)
+)
+(70,9:24497342,24831188:558141,75748,0
+(70,9:24676743,24831188:199339,75748,0
+x70,9:24876082,24831188
+)
+)
+(70,9:25055483,24831188:558141,75748,0
+(70,9:25234884,24831188:199339,75748,0
+x70,9:25434223,24831188
+)
+)
+(70,9:25613624,24831188:558141,75748,0
+(70,9:25793025,24831188:199339,75748,0
+x70,9:25992364,24831188
+)
+)
+(70,9:26171765,24831188:558141,75748,0
+(70,9:26351166,24831188:199339,75748,0
+x70,9:26550505,24831188
+)
+)
+(70,9:26729906,24831188:558141,75748,0
+(70,9:26909307,24831188:199339,75748,0
+x70,9:27108646,24831188
+)
+)
+(70,9:27288047,24831188:558141,75748,0
+(70,9:27467448,24831188:199339,75748,0
+x70,9:27666787,24831188
+)
+)
+(70,9:27846188,24831188:558141,75748,0
+(70,9:28025589,24831188:199339,75748,0
+x70,9:28224928,24831188
+)
+)
+(70,9:28404329,24831188:558141,75748,0
+(70,9:28583730,24831188:199339,75748,0
+x70,9:28783069,24831188
+)
+)
+(70,9:29117476,24831188:1112314,462465,0
+k70,9:29870980,24831188:753504
+x70,9:30229790,24831188
+)
+g70,9:28399855,24831188
+g70,9:30229790,24831188
+)
+(70,10:6636830,25722478:23592960,498346,0
+g70,10:14602427,25722478
+h70,10:14602427,25722478:5023347,0,0
+h70,10:19625774,25722478:0,0,0
+g70,10:11660177,25722478
+x70,10:14474843,25722478
+(70,10:15008945,25722478:558141,75748,0
+$70,10:15008945,25722478
+(70,10:15188346,25722478:199339,75748,0
+x70,10:15387685,25722478
+)
+$70,10:15567086,25722478
+)
+(70,10:15567086,25722478:558141,75748,0
+(70,10:15746487,25722478:199339,75748,0
+x70,10:15945826,25722478
+)
+)
+(70,10:16125227,25722478:558141,75748,0
+(70,10:16304628,25722478:199339,75748,0
+x70,10:16503967,25722478
+)
+)
+(70,10:16683368,25722478:558141,75748,0
+(70,10:16862769,25722478:199339,75748,0
+x70,10:17062108,25722478
+)
+)
+(70,10:17241509,25722478:558141,75748,0
+(70,10:17420910,25722478:199339,75748,0
+x70,10:17620249,25722478
+)
+)
+(70,10:17799650,25722478:558141,75748,0
+(70,10:17979051,25722478:199339,75748,0
+x70,10:18178390,25722478
+)
+)
+(70,10:18357791,25722478:558141,75748,0
+(70,10:18537192,25722478:199339,75748,0
+x70,10:18736531,25722478
+)
+)
+(70,10:18915932,25722478:558141,75748,0
+(70,10:19095333,25722478:199339,75748,0
+x70,10:19294672,25722478
+)
+)
+(70,10:19474073,25722478:558141,75748,0
+(70,10:19653474,25722478:199339,75748,0
+x70,10:19852813,25722478
+)
+)
+(70,10:20032214,25722478:558141,75748,0
+(70,10:20211615,25722478:199339,75748,0
+x70,10:20410954,25722478
+)
+)
+(70,10:20590355,25722478:558141,75748,0
+(70,10:20769756,25722478:199339,75748,0
+x70,10:20969095,25722478
+)
+)
+(70,10:21148496,25722478:558141,75748,0
+(70,10:21327897,25722478:199339,75748,0
+x70,10:21527236,25722478
+)
+)
+(70,10:21706637,25722478:558141,75748,0
+(70,10:21886038,25722478:199339,75748,0
+x70,10:22085377,25722478
+)
+)
+(70,10:22264778,25722478:558141,75748,0
+(70,10:22444179,25722478:199339,75748,0
+x70,10:22643518,25722478
+)
+)
+(70,10:22822919,25722478:558141,75748,0
+(70,10:23002320,25722478:199339,75748,0
+x70,10:23201659,25722478
+)
+)
+(70,10:23381060,25722478:558141,75748,0
+(70,10:23560461,25722478:199339,75748,0
+x70,10:23759800,25722478
+)
+)
+(70,10:23939201,25722478:558141,75748,0
+(70,10:24118602,25722478:199339,75748,0
+x70,10:24317941,25722478
+)
+)
+(70,10:24497342,25722478:558141,75748,0
+(70,10:24676743,25722478:199339,75748,0
+x70,10:24876082,25722478
+)
+)
+(70,10:25055483,25722478:558141,75748,0
+(70,10:25234884,25722478:199339,75748,0
+x70,10:25434223,25722478
+)
+)
+(70,10:25613624,25722478:558141,75748,0
+(70,10:25793025,25722478:199339,75748,0
+x70,10:25992364,25722478
+)
+)
+(70,10:26171765,25722478:558141,75748,0
+(70,10:26351166,25722478:199339,75748,0
+x70,10:26550505,25722478
+)
+)
+(70,10:26729906,25722478:558141,75748,0
+(70,10:26909307,25722478:199339,75748,0
+x70,10:27108646,25722478
+)
+)
+(70,10:27288047,25722478:558141,75748,0
+(70,10:27467448,25722478:199339,75748,0
+x70,10:27666787,25722478
+)
+)
+(70,10:27846188,25722478:558141,75748,0
+(70,10:28025589,25722478:199339,75748,0
+x70,10:28224928,25722478
+)
+)
+(70,10:28404329,25722478:558141,75748,0
+(70,10:28583730,25722478:199339,75748,0
+x70,10:28783069,25722478
+)
+)
+(70,10:29117476,25722478:1112314,462465,0
+k70,10:29870980,25722478:753504
+x70,10:30229790,25722478
+)
+g70,10:28399855,25722478
+g70,10:30229790,25722478
+)
+(70,11:6636830,26613768:23592960,498346,0
+g70,11:11660176,26613768
+h70,11:11660176,26613768:2726961,0,0
+h70,11:14387137,26613768:0,0,0
+g70,11:9363791,26613768
+(70,11:9363791,26613768:2296385,462465,0
+x70,11:10838899,26613768
+k70,11:11660176,26613768:821277
+)
+x70,11:14777838,26613768
+g70,11:15017044,26613768
+x70,11:16880864,26613768
+x70,11:17399145,26613768
+g70,11:17638351,26613768
+x70,11:19506157,26613768
+(70,11:20032214,26613768:558141,75748,0
+$70,11:20032214,26613768
+(70,11:20211615,26613768:199339,75748,0
+x70,11:20410954,26613768
+)
+$70,11:20590355,26613768
+)
+(70,11:20590355,26613768:558141,75748,0
+(70,11:20769756,26613768:199339,75748,0
+x70,11:20969095,26613768
+)
+)
+(70,11:21148496,26613768:558141,75748,0
+(70,11:21327897,26613768:199339,75748,0
+x70,11:21527236,26613768
+)
+)
+(70,11:21706637,26613768:558141,75748,0
+(70,11:21886038,26613768:199339,75748,0
+x70,11:22085377,26613768
+)
+)
+(70,11:22264778,26613768:558141,75748,0
+(70,11:22444179,26613768:199339,75748,0
+x70,11:22643518,26613768
+)
+)
+(70,11:22822919,26613768:558141,75748,0
+(70,11:23002320,26613768:199339,75748,0
+x70,11:23201659,26613768
+)
+)
+(70,11:23381060,26613768:558141,75748,0
+(70,11:23560461,26613768:199339,75748,0
+x70,11:23759800,26613768
+)
+)
+(70,11:23939201,26613768:558141,75748,0
+(70,11:24118602,26613768:199339,75748,0
+x70,11:24317941,26613768
+)
+)
+(70,11:24497342,26613768:558141,75748,0
+(70,11:24676743,26613768:199339,75748,0
+x70,11:24876082,26613768
+)
+)
+(70,11:25055483,26613768:558141,75748,0
+(70,11:25234884,26613768:199339,75748,0
+x70,11:25434223,26613768
+)
+)
+(70,11:25613624,26613768:558141,75748,0
+(70,11:25793025,26613768:199339,75748,0
+x70,11:25992364,26613768
+)
+)
+(70,11:26171765,26613768:558141,75748,0
+(70,11:26351166,26613768:199339,75748,0
+x70,11:26550505,26613768
+)
+)
+(70,11:26729906,26613768:558141,75748,0
+(70,11:26909307,26613768:199339,75748,0
+x70,11:27108646,26613768
+)
+)
+(70,11:27288047,26613768:558141,75748,0
+(70,11:27467448,26613768:199339,75748,0
+x70,11:27666787,26613768
+)
+)
+(70,11:27846188,26613768:558141,75748,0
+(70,11:28025589,26613768:199339,75748,0
+x70,11:28224928,26613768
+)
+)
+(70,11:28404329,26613768:558141,75748,0
+(70,11:28583730,26613768:199339,75748,0
+x70,11:28783069,26613768
+)
+)
+(70,11:29117476,26613768:1112314,462465,0
+k70,11:29870980,26613768:753504
+x70,11:30229790,26613768
+)
+g70,11:28399855,26613768
+g70,11:30229790,26613768
+)
+(70,12:6636830,27505058:23592960,498346,0
+g70,12:9363791,27505058
+h70,12:9363791,27505058:1076431,0,0
+h70,12:10440222,27505058:0,0,0
+g70,12:7713261,27505058
+(70,12:7713261,27505058:1650530,462465,0
+x70,12:8630220,27505058
+k70,12:9363791,27505058:733571
+)
+x70,12:11430936,27505058
+g70,12:11670142,27505058
+x70,12:13288774,27505058
+(70,12:13334522,27505058:558141,75748,0
+$70,12:13334522,27505058
+(70,12:13513923,27505058:199339,75748,0
+x70,12:13713262,27505058
+)
+$70,12:13892663,27505058
+)
+(70,12:13892663,27505058:558141,75748,0
+(70,12:14072064,27505058:199339,75748,0
+x70,12:14271403,27505058
+)
+)
+(70,12:14450804,27505058:558141,75748,0
+(70,12:14630205,27505058:199339,75748,0
+x70,12:14829544,27505058
+)
+)
+(70,12:15008945,27505058:558141,75748,0
+(70,12:15188346,27505058:199339,75748,0
+x70,12:15387685,27505058
+)
+)
+(70,12:15567086,27505058:558141,75748,0
+(70,12:15746487,27505058:199339,75748,0
+x70,12:15945826,27505058
+)
+)
+(70,12:16125227,27505058:558141,75748,0
+(70,12:16304628,27505058:199339,75748,0
+x70,12:16503967,27505058
+)
+)
+(70,12:16683368,27505058:558141,75748,0
+(70,12:16862769,27505058:199339,75748,0
+x70,12:17062108,27505058
+)
+)
+(70,12:17241509,27505058:558141,75748,0
+(70,12:17420910,27505058:199339,75748,0
+x70,12:17620249,27505058
+)
+)
+(70,12:17799650,27505058:558141,75748,0
+(70,12:17979051,27505058:199339,75748,0
+x70,12:18178390,27505058
+)
+)
+(70,12:18357791,27505058:558141,75748,0
+(70,12:18537192,27505058:199339,75748,0
+x70,12:18736531,27505058
+)
+)
+(70,12:18915932,27505058:558141,75748,0
+(70,12:19095333,27505058:199339,75748,0
+x70,12:19294672,27505058
+)
+)
+(70,12:19474073,27505058:558141,75748,0
+(70,12:19653474,27505058:199339,75748,0
+x70,12:19852813,27505058
+)
+)
+(70,12:20032214,27505058:558141,75748,0
+(70,12:20211615,27505058:199339,75748,0
+x70,12:20410954,27505058
+)
+)
+(70,12:20590355,27505058:558141,75748,0
+(70,12:20769756,27505058:199339,75748,0
+x70,12:20969095,27505058
+)
+)
+(70,12:21148496,27505058:558141,75748,0
+(70,12:21327897,27505058:199339,75748,0
+x70,12:21527236,27505058
+)
+)
+(70,12:21706637,27505058:558141,75748,0
+(70,12:21886038,27505058:199339,75748,0
+x70,12:22085377,27505058
+)
+)
+(70,12:22264778,27505058:558141,75748,0
+(70,12:22444179,27505058:199339,75748,0
+x70,12:22643518,27505058
+)
+)
+(70,12:22822919,27505058:558141,75748,0
+(70,12:23002320,27505058:199339,75748,0
+x70,12:23201659,27505058
+)
+)
+(70,12:23381060,27505058:558141,75748,0
+(70,12:23560461,27505058:199339,75748,0
+x70,12:23759800,27505058
+)
+)
+(70,12:23939201,27505058:558141,75748,0
+(70,12:24118602,27505058:199339,75748,0
+x70,12:24317941,27505058
+)
+)
+(70,12:24497342,27505058:558141,75748,0
+(70,12:24676743,27505058:199339,75748,0
+x70,12:24876082,27505058
+)
+)
+(70,12:25055483,27505058:558141,75748,0
+(70,12:25234884,27505058:199339,75748,0
+x70,12:25434223,27505058
+)
+)
+(70,12:25613624,27505058:558141,75748,0
+(70,12:25793025,27505058:199339,75748,0
+x70,12:25992364,27505058
+)
+)
+(70,12:26171765,27505058:558141,75748,0
+(70,12:26351166,27505058:199339,75748,0
+x70,12:26550505,27505058
+)
+)
+(70,12:26729906,27505058:558141,75748,0
+(70,12:26909307,27505058:199339,75748,0
+x70,12:27108646,27505058
+)
+)
+(70,12:27288047,27505058:558141,75748,0
+(70,12:27467448,27505058:199339,75748,0
+x70,12:27666787,27505058
+)
+)
+(70,12:27846188,27505058:558141,75748,0
+(70,12:28025589,27505058:199339,75748,0
+x70,12:28224928,27505058
+)
+)
+(70,12:28404329,27505058:558141,75748,0
+(70,12:28583730,27505058:199339,75748,0
+x70,12:28783069,27505058
+)
+)
+(70,12:29117476,27505058:1112314,462465,0
+k70,12:29870980,27505058:753504
+x70,12:30229790,27505058
+)
+g70,12:28399855,27505058
+g70,12:30229790,27505058
+)
+(70,13:6636830,28396348:23592960,498346,0
+g70,13:11660176,28396348
+h70,13:11660176,28396348:2726961,0,0
+h70,13:14387137,28396348:0,0,0
+g70,13:9363791,28396348
+(70,13:9363791,28396348:2296385,462465,0
+x70,13:10838899,28396348
+k70,13:11660176,28396348:821277
+)
+x70,13:13278808,28396348
+g70,13:13518014,28396348
+x70,13:15822373,28396348
+x70,13:16998474,28396348
+(70,13:17241509,28396348:558141,75748,0
+$70,13:17241509,28396348
+(70,13:17420910,28396348:199339,75748,0
+x70,13:17620249,28396348
+)
+$70,13:17799650,28396348
+)
+(70,13:17799650,28396348:558141,75748,0
+(70,13:17979051,28396348:199339,75748,0
+x70,13:18178390,28396348
+)
+)
+(70,13:18357791,28396348:558141,75748,0
+(70,13:18537192,28396348:199339,75748,0
+x70,13:18736531,28396348
+)
+)
+(70,13:18915932,28396348:558141,75748,0
+(70,13:19095333,28396348:199339,75748,0
+x70,13:19294672,28396348
+)
+)
+(70,13:19474073,28396348:558141,75748,0
+(70,13:19653474,28396348:199339,75748,0
+x70,13:19852813,28396348
+)
+)
+(70,13:20032214,28396348:558141,75748,0
+(70,13:20211615,28396348:199339,75748,0
+x70,13:20410954,28396348
+)
+)
+(70,13:20590355,28396348:558141,75748,0
+(70,13:20769756,28396348:199339,75748,0
+x70,13:20969095,28396348
+)
+)
+(70,13:21148496,28396348:558141,75748,0
+(70,13:21327897,28396348:199339,75748,0
+x70,13:21527236,28396348
+)
+)
+(70,13:21706637,28396348:558141,75748,0
+(70,13:21886038,28396348:199339,75748,0
+x70,13:22085377,28396348
+)
+)
+(70,13:22264778,28396348:558141,75748,0
+(70,13:22444179,28396348:199339,75748,0
+x70,13:22643518,28396348
+)
+)
+(70,13:22822919,28396348:558141,75748,0
+(70,13:23002320,28396348:199339,75748,0
+x70,13:23201659,28396348
+)
+)
+(70,13:23381060,28396348:558141,75748,0
+(70,13:23560461,28396348:199339,75748,0
+x70,13:23759800,28396348
+)
+)
+(70,13:23939201,28396348:558141,75748,0
+(70,13:24118602,28396348:199339,75748,0
+x70,13:24317941,28396348
+)
+)
+(70,13:24497342,28396348:558141,75748,0
+(70,13:24676743,28396348:199339,75748,0
+x70,13:24876082,28396348
+)
+)
+(70,13:25055483,28396348:558141,75748,0
+(70,13:25234884,28396348:199339,75748,0
+x70,13:25434223,28396348
+)
+)
+(70,13:25613624,28396348:558141,75748,0
+(70,13:25793025,28396348:199339,75748,0
+x70,13:25992364,28396348
+)
+)
+(70,13:26171765,28396348:558141,75748,0
+(70,13:26351166,28396348:199339,75748,0
+x70,13:26550505,28396348
+)
+)
+(70,13:26729906,28396348:558141,75748,0
+(70,13:26909307,28396348:199339,75748,0
+x70,13:27108646,28396348
+)
+)
+(70,13:27288047,28396348:558141,75748,0
+(70,13:27467448,28396348:199339,75748,0
+x70,13:27666787,28396348
+)
+)
+(70,13:27846188,28396348:558141,75748,0
+(70,13:28025589,28396348:199339,75748,0
+x70,13:28224928,28396348
+)
+)
+(70,13:28404329,28396348:558141,75748,0
+(70,13:28583730,28396348:199339,75748,0
+x70,13:28783069,28396348
+)
+)
+(70,13:29117476,28396348:1112314,462465,0
+k70,13:29870980,28396348:753504
+x70,13:30229790,28396348
+)
+g70,13:28399855,28396348
+g70,13:30229790,28396348
+)
+(70,14:6636830,29287638:23592960,498346,0
+g70,14:11660176,29287638
+h70,14:11660176,29287638:2726961,0,0
+h70,14:14387137,29287638:0,0,0
+g70,14:9363791,29287638
+(70,14:9363791,29287638:2296385,462465,0
+x70,14:10838899,29287638
+k70,14:11660176,29287638:821277
+)
+x70,14:13278808,29287638
+g70,14:13518014,29287638
+x70,14:15710743,29287638
+x70,14:16886844,29287638
+(70,14:17241509,29287638:558141,75748,0
+$70,14:17241509,29287638
+(70,14:17420910,29287638:199339,75748,0
+x70,14:17620249,29287638
+)
+$70,14:17799650,29287638
+)
+(70,14:17799650,29287638:558141,75748,0
+(70,14:17979051,29287638:199339,75748,0
+x70,14:18178390,29287638
+)
+)
+(70,14:18357791,29287638:558141,75748,0
+(70,14:18537192,29287638:199339,75748,0
+x70,14:18736531,29287638
+)
+)
+(70,14:18915932,29287638:558141,75748,0
+(70,14:19095333,29287638:199339,75748,0
+x70,14:19294672,29287638
+)
+)
+(70,14:19474073,29287638:558141,75748,0
+(70,14:19653474,29287638:199339,75748,0
+x70,14:19852813,29287638
+)
+)
+(70,14:20032214,29287638:558141,75748,0
+(70,14:20211615,29287638:199339,75748,0
+x70,14:20410954,29287638
+)
+)
+(70,14:20590355,29287638:558141,75748,0
+(70,14:20769756,29287638:199339,75748,0
+x70,14:20969095,29287638
+)
+)
+(70,14:21148496,29287638:558141,75748,0
+(70,14:21327897,29287638:199339,75748,0
+x70,14:21527236,29287638
+)
+)
+(70,14:21706637,29287638:558141,75748,0
+(70,14:21886038,29287638:199339,75748,0
+x70,14:22085377,29287638
+)
+)
+(70,14:22264778,29287638:558141,75748,0
+(70,14:22444179,29287638:199339,75748,0
+x70,14:22643518,29287638
+)
+)
+(70,14:22822919,29287638:558141,75748,0
+(70,14:23002320,29287638:199339,75748,0
+x70,14:23201659,29287638
+)
+)
+(70,14:23381060,29287638:558141,75748,0
+(70,14:23560461,29287638:199339,75748,0
+x70,14:23759800,29287638
+)
+)
+(70,14:23939201,29287638:558141,75748,0
+(70,14:24118602,29287638:199339,75748,0
+x70,14:24317941,29287638
+)
+)
+(70,14:24497342,29287638:558141,75748,0
+(70,14:24676743,29287638:199339,75748,0
+x70,14:24876082,29287638
+)
+)
+(70,14:25055483,29287638:558141,75748,0
+(70,14:25234884,29287638:199339,75748,0
+x70,14:25434223,29287638
+)
+)
+(70,14:25613624,29287638:558141,75748,0
+(70,14:25793025,29287638:199339,75748,0
+x70,14:25992364,29287638
+)
+)
+(70,14:26171765,29287638:558141,75748,0
+(70,14:26351166,29287638:199339,75748,0
+x70,14:26550505,29287638
+)
+)
+(70,14:26729906,29287638:558141,75748,0
+(70,14:26909307,29287638:199339,75748,0
+x70,14:27108646,29287638
+)
+)
+(70,14:27288047,29287638:558141,75748,0
+(70,14:27467448,29287638:199339,75748,0
+x70,14:27666787,29287638
+)
+)
+(70,14:27846188,29287638:558141,75748,0
+(70,14:28025589,29287638:199339,75748,0
+x70,14:28224928,29287638
+)
+)
+(70,14:28404329,29287638:558141,75748,0
+(70,14:28583730,29287638:199339,75748,0
+x70,14:28783069,29287638
+)
+)
+(70,14:29117476,29287638:1112314,462465,0
+k70,14:29870980,29287638:753504
+x70,14:30229790,29287638
+)
+g70,14:28399855,29287638
+g70,14:30229790,29287638
+)
+(70,15:6636830,30178928:23592960,498346,0
+g70,15:11660176,30178928
+h70,15:11660176,30178928:2726961,0,0
+h70,15:14387137,30178928:0,0,0
+g70,15:9363791,30178928
+(70,15:9363791,30178928:2296385,462465,0
+x70,15:10838899,30178928
+k70,15:11660176,30178928:821277
+)
+x70,15:13278808,30178928
+g70,15:13518014,30178928
+x70,15:15381834,30178928
+x70,15:15900115,30178928
+g70,15:16139321,30178928
+x70,15:18007127,30178928
+(70,15:18357791,30178928:558141,75748,0
+$70,15:18357791,30178928
+(70,15:18537192,30178928:199339,75748,0
+x70,15:18736531,30178928
+)
+$70,15:18915932,30178928
+)
+(70,15:18915932,30178928:558141,75748,0
+(70,15:19095333,30178928:199339,75748,0
+x70,15:19294672,30178928
+)
+)
+(70,15:19474073,30178928:558141,75748,0
+(70,15:19653474,30178928:199339,75748,0
+x70,15:19852813,30178928
+)
+)
+(70,15:20032214,30178928:558141,75748,0
+(70,15:20211615,30178928:199339,75748,0
+x70,15:20410954,30178928
+)
+)
+(70,15:20590355,30178928:558141,75748,0
+(70,15:20769756,30178928:199339,75748,0
+x70,15:20969095,30178928
+)
+)
+(70,15:21148496,30178928:558141,75748,0
+(70,15:21327897,30178928:199339,75748,0
+x70,15:21527236,30178928
+)
+)
+(70,15:21706637,30178928:558141,75748,0
+(70,15:21886038,30178928:199339,75748,0
+x70,15:22085377,30178928
+)
+)
+(70,15:22264778,30178928:558141,75748,0
+(70,15:22444179,30178928:199339,75748,0
+x70,15:22643518,30178928
+)
+)
+(70,15:22822919,30178928:558141,75748,0
+(70,15:23002320,30178928:199339,75748,0
+x70,15:23201659,30178928
+)
+)
+(70,15:23381060,30178928:558141,75748,0
+(70,15:23560461,30178928:199339,75748,0
+x70,15:23759800,30178928
+)
+)
+(70,15:23939201,30178928:558141,75748,0
+(70,15:24118602,30178928:199339,75748,0
+x70,15:24317941,30178928
+)
+)
+(70,15:24497342,30178928:558141,75748,0
+(70,15:24676743,30178928:199339,75748,0
+x70,15:24876082,30178928
+)
+)
+(70,15:25055483,30178928:558141,75748,0
+(70,15:25234884,30178928:199339,75748,0
+x70,15:25434223,30178928
+)
+)
+(70,15:25613624,30178928:558141,75748,0
+(70,15:25793025,30178928:199339,75748,0
+x70,15:25992364,30178928
+)
+)
+(70,15:26171765,30178928:558141,75748,0
+(70,15:26351166,30178928:199339,75748,0
+x70,15:26550505,30178928
+)
+)
+(70,15:26729906,30178928:558141,75748,0
+(70,15:26909307,30178928:199339,75748,0
+x70,15:27108646,30178928
+)
+)
+(70,15:27288047,30178928:558141,75748,0
+(70,15:27467448,30178928:199339,75748,0
+x70,15:27666787,30178928
+)
+)
+(70,15:27846188,30178928:558141,75748,0
+(70,15:28025589,30178928:199339,75748,0
+x70,15:28224928,30178928
+)
+)
+(70,15:28404329,30178928:558141,75748,0
+(70,15:28583730,30178928:199339,75748,0
+x70,15:28783069,30178928
+)
+)
+(70,15:29117476,30178928:1112314,462465,0
+k70,15:29870980,30178928:753504
+x70,15:30229790,30178928
+)
+g70,15:28399855,30178928
+g70,15:30229790,30178928
+)
+(70,16:6636830,31070218:23592960,498346,0
+g70,16:9363791,31070218
+h70,16:9363791,31070218:1076431,0,0
+h70,16:10440222,31070218:0,0,0
+g70,16:7713261,31070218
+(70,16:7713261,31070218:1650530,462465,0
+x70,16:8630220,31070218
+k70,16:9363791,31070218:733571
+)
+x70,16:11430936,31070218
+g70,16:11670142,31070218
+x70,16:14594444,31070218
+(70,16:15008945,31070218:558141,75748,0
+$70,16:15008945,31070218
+(70,16:15188346,31070218:199339,75748,0
+x70,16:15387685,31070218
+)
+$70,16:15567086,31070218
+)
+(70,16:15567086,31070218:558141,75748,0
+(70,16:15746487,31070218:199339,75748,0
+x70,16:15945826,31070218
+)
+)
+(70,16:16125227,31070218:558141,75748,0
+(70,16:16304628,31070218:199339,75748,0
+x70,16:16503967,31070218
+)
+)
+(70,16:16683368,31070218:558141,75748,0
+(70,16:16862769,31070218:199339,75748,0
+x70,16:17062108,31070218
+)
+)
+(70,16:17241509,31070218:558141,75748,0
+(70,16:17420910,31070218:199339,75748,0
+x70,16:17620249,31070218
+)
+)
+(70,16:17799650,31070218:558141,75748,0
+(70,16:17979051,31070218:199339,75748,0
+x70,16:18178390,31070218
+)
+)
+(70,16:18357791,31070218:558141,75748,0
+(70,16:18537192,31070218:199339,75748,0
+x70,16:18736531,31070218
+)
+)
+(70,16:18915932,31070218:558141,75748,0
+(70,16:19095333,31070218:199339,75748,0
+x70,16:19294672,31070218
+)
+)
+(70,16:19474073,31070218:558141,75748,0
+(70,16:19653474,31070218:199339,75748,0
+x70,16:19852813,31070218
+)
+)
+(70,16:20032214,31070218:558141,75748,0
+(70,16:20211615,31070218:199339,75748,0
+x70,16:20410954,31070218
+)
+)
+(70,16:20590355,31070218:558141,75748,0
+(70,16:20769756,31070218:199339,75748,0
+x70,16:20969095,31070218
+)
+)
+(70,16:21148496,31070218:558141,75748,0
+(70,16:21327897,31070218:199339,75748,0
+x70,16:21527236,31070218
+)
+)
+(70,16:21706637,31070218:558141,75748,0
+(70,16:21886038,31070218:199339,75748,0
+x70,16:22085377,31070218
+)
+)
+(70,16:22264778,31070218:558141,75748,0
+(70,16:22444179,31070218:199339,75748,0
+x70,16:22643518,31070218
+)
+)
+(70,16:22822919,31070218:558141,75748,0
+(70,16:23002320,31070218:199339,75748,0
+x70,16:23201659,31070218
+)
+)
+(70,16:23381060,31070218:558141,75748,0
+(70,16:23560461,31070218:199339,75748,0
+x70,16:23759800,31070218
+)
+)
+(70,16:23939201,31070218:558141,75748,0
+(70,16:24118602,31070218:199339,75748,0
+x70,16:24317941,31070218
+)
+)
+(70,16:24497342,31070218:558141,75748,0
+(70,16:24676743,31070218:199339,75748,0
+x70,16:24876082,31070218
+)
+)
+(70,16:25055483,31070218:558141,75748,0
+(70,16:25234884,31070218:199339,75748,0
+x70,16:25434223,31070218
+)
+)
+(70,16:25613624,31070218:558141,75748,0
+(70,16:25793025,31070218:199339,75748,0
+x70,16:25992364,31070218
+)
+)
+(70,16:26171765,31070218:558141,75748,0
+(70,16:26351166,31070218:199339,75748,0
+x70,16:26550505,31070218
+)
+)
+(70,16:26729906,31070218:558141,75748,0
+(70,16:26909307,31070218:199339,75748,0
+x70,16:27108646,31070218
+)
+)
+(70,16:27288047,31070218:558141,75748,0
+(70,16:27467448,31070218:199339,75748,0
+x70,16:27666787,31070218
+)
+)
+(70,16:27846188,31070218:558141,75748,0
+(70,16:28025589,31070218:199339,75748,0
+x70,16:28224928,31070218
+)
+)
+(70,16:28404329,31070218:558141,75748,0
+(70,16:28583730,31070218:199339,75748,0
+x70,16:28783069,31070218
+)
+)
+(70,16:29117476,31070218:1112314,462465,0
+k70,16:29870980,31070218:753504
+x70,16:30229790,31070218
+)
+g70,16:28399855,31070218
+g70,16:30229790,31070218
+)
+(70,17:6636830,31961508:23592960,498346,0
+g70,17:9363791,31961508
+h70,17:9363791,31961508:1076431,0,0
+h70,17:10440222,31961508:0,0,0
+g70,17:7713261,31961508
+(70,17:7713261,31961508:1650530,462465,0
+x70,17:8630220,31961508
+k70,17:9363791,31961508:733571
+)
+x70,17:11430936,31961508
+g70,17:11670142,31961508
+x70,17:13936626,31961508
+(70,17:14450804,31961508:558141,75748,0
+$70,17:14450804,31961508
+(70,17:14630205,31961508:199339,75748,0
+x70,17:14829544,31961508
+)
+$70,17:15008945,31961508
+)
+(70,17:15008945,31961508:558141,75748,0
+(70,17:15188346,31961508:199339,75748,0
+x70,17:15387685,31961508
+)
+)
+(70,17:15567086,31961508:558141,75748,0
+(70,17:15746487,31961508:199339,75748,0
+x70,17:15945826,31961508
+)
+)
+(70,17:16125227,31961508:558141,75748,0
+(70,17:16304628,31961508:199339,75748,0
+x70,17:16503967,31961508
+)
+)
+(70,17:16683368,31961508:558141,75748,0
+(70,17:16862769,31961508:199339,75748,0
+x70,17:17062108,31961508
+)
+)
+(70,17:17241509,31961508:558141,75748,0
+(70,17:17420910,31961508:199339,75748,0
+x70,17:17620249,31961508
+)
+)
+(70,17:17799650,31961508:558141,75748,0
+(70,17:17979051,31961508:199339,75748,0
+x70,17:18178390,31961508
+)
+)
+(70,17:18357791,31961508:558141,75748,0
+(70,17:18537192,31961508:199339,75748,0
+x70,17:18736531,31961508
+)
+)
+(70,17:18915932,31961508:558141,75748,0
+(70,17:19095333,31961508:199339,75748,0
+x70,17:19294672,31961508
+)
+)
+(70,17:19474073,31961508:558141,75748,0
+(70,17:19653474,31961508:199339,75748,0
+x70,17:19852813,31961508
+)
+)
+(70,17:20032214,31961508:558141,75748,0
+(70,17:20211615,31961508:199339,75748,0
+x70,17:20410954,31961508
+)
+)
+(70,17:20590355,31961508:558141,75748,0
+(70,17:20769756,31961508:199339,75748,0
+x70,17:20969095,31961508
+)
+)
+(70,17:21148496,31961508:558141,75748,0
+(70,17:21327897,31961508:199339,75748,0
+x70,17:21527236,31961508
+)
+)
+(70,17:21706637,31961508:558141,75748,0
+(70,17:21886038,31961508:199339,75748,0
+x70,17:22085377,31961508
+)
+)
+(70,17:22264778,31961508:558141,75748,0
+(70,17:22444179,31961508:199339,75748,0
+x70,17:22643518,31961508
+)
+)
+(70,17:22822919,31961508:558141,75748,0
+(70,17:23002320,31961508:199339,75748,0
+x70,17:23201659,31961508
+)
+)
+(70,17:23381060,31961508:558141,75748,0
+(70,17:23560461,31961508:199339,75748,0
+x70,17:23759800,31961508
+)
+)
+(70,17:23939201,31961508:558141,75748,0
+(70,17:24118602,31961508:199339,75748,0
+x70,17:24317941,31961508
+)
+)
+(70,17:24497342,31961508:558141,75748,0
+(70,17:24676743,31961508:199339,75748,0
+x70,17:24876082,31961508
+)
+)
+(70,17:25055483,31961508:558141,75748,0
+(70,17:25234884,31961508:199339,75748,0
+x70,17:25434223,31961508
+)
+)
+(70,17:25613624,31961508:558141,75748,0
+(70,17:25793025,31961508:199339,75748,0
+x70,17:25992364,31961508
+)
+)
+(70,17:26171765,31961508:558141,75748,0
+(70,17:26351166,31961508:199339,75748,0
+x70,17:26550505,31961508
+)
+)
+(70,17:26729906,31961508:558141,75748,0
+(70,17:26909307,31961508:199339,75748,0
+x70,17:27108646,31961508
+)
+)
+(70,17:27288047,31961508:558141,75748,0
+(70,17:27467448,31961508:199339,75748,0
+x70,17:27666787,31961508
+)
+)
+(70,17:27846188,31961508:558141,75748,0
+(70,17:28025589,31961508:199339,75748,0
+x70,17:28224928,31961508
+)
+)
+(70,17:28404329,31961508:558141,75748,0
+(70,17:28583730,31961508:199339,75748,0
+x70,17:28783069,31961508
+)
+)
+(70,17:29117476,31961508:1112314,462465,0
+k70,17:29870980,31961508:753504
+x70,17:30229790,31961508
+)
+g70,17:28399855,31961508
+g70,17:30229790,31961508
+)
+(70,18:6636830,32852798:23592960,498346,0
+g70,18:11660176,32852798
+h70,18:11660176,32852798:2726961,0,0
+h70,18:14387137,32852798:0,0,0
+g70,18:9363791,32852798
+(70,18:9363791,32852798:2296385,462465,0
+x70,18:10838899,32852798
+k70,18:11660176,32852798:821277
+)
+x70,18:14319359,32852798
+(70,18:14450804,32852798:558141,75748,0
+$70,18:14450804,32852798
+(70,18:14630205,32852798:199339,75748,0
+x70,18:14829544,32852798
+)
+$70,18:15008945,32852798
+)
+(70,18:15008945,32852798:558141,75748,0
+(70,18:15188346,32852798:199339,75748,0
+x70,18:15387685,32852798
+)
+)
+(70,18:15567086,32852798:558141,75748,0
+(70,18:15746487,32852798:199339,75748,0
+x70,18:15945826,32852798
+)
+)
+(70,18:16125227,32852798:558141,75748,0
+(70,18:16304628,32852798:199339,75748,0
+x70,18:16503967,32852798
+)
+)
+(70,18:16683368,32852798:558141,75748,0
+(70,18:16862769,32852798:199339,75748,0
+x70,18:17062108,32852798
+)
+)
+(70,18:17241509,32852798:558141,75748,0
+(70,18:17420910,32852798:199339,75748,0
+x70,18:17620249,32852798
+)
+)
+(70,18:17799650,32852798:558141,75748,0
+(70,18:17979051,32852798:199339,75748,0
+x70,18:18178390,32852798
+)
+)
+(70,18:18357791,32852798:558141,75748,0
+(70,18:18537192,32852798:199339,75748,0
+x70,18:18736531,32852798
+)
+)
+(70,18:18915932,32852798:558141,75748,0
+(70,18:19095333,32852798:199339,75748,0
+x70,18:19294672,32852798
+)
+)
+(70,18:19474073,32852798:558141,75748,0
+(70,18:19653474,32852798:199339,75748,0
+x70,18:19852813,32852798
+)
+)
+(70,18:20032214,32852798:558141,75748,0
+(70,18:20211615,32852798:199339,75748,0
+x70,18:20410954,32852798
+)
+)
+(70,18:20590355,32852798:558141,75748,0
+(70,18:20769756,32852798:199339,75748,0
+x70,18:20969095,32852798
+)
+)
+(70,18:21148496,32852798:558141,75748,0
+(70,18:21327897,32852798:199339,75748,0
+x70,18:21527236,32852798
+)
+)
+(70,18:21706637,32852798:558141,75748,0
+(70,18:21886038,32852798:199339,75748,0
+x70,18:22085377,32852798
+)
+)
+(70,18:22264778,32852798:558141,75748,0
+(70,18:22444179,32852798:199339,75748,0
+x70,18:22643518,32852798
+)
+)
+(70,18:22822919,32852798:558141,75748,0
+(70,18:23002320,32852798:199339,75748,0
+x70,18:23201659,32852798
+)
+)
+(70,18:23381060,32852798:558141,75748,0
+(70,18:23560461,32852798:199339,75748,0
+x70,18:23759800,32852798
+)
+)
+(70,18:23939201,32852798:558141,75748,0
+(70,18:24118602,32852798:199339,75748,0
+x70,18:24317941,32852798
+)
+)
+(70,18:24497342,32852798:558141,75748,0
+(70,18:24676743,32852798:199339,75748,0
+x70,18:24876082,32852798
+)
+)
+(70,18:25055483,32852798:558141,75748,0
+(70,18:25234884,32852798:199339,75748,0
+x70,18:25434223,32852798
+)
+)
+(70,18:25613624,32852798:558141,75748,0
+(70,18:25793025,32852798:199339,75748,0
+x70,18:25992364,32852798
+)
+)
+(70,18:26171765,32852798:558141,75748,0
+(70,18:26351166,32852798:199339,75748,0
+x70,18:26550505,32852798
+)
+)
+(70,18:26729906,32852798:558141,75748,0
+(70,18:26909307,32852798:199339,75748,0
+x70,18:27108646,32852798
+)
+)
+(70,18:27288047,32852798:558141,75748,0
+(70,18:27467448,32852798:199339,75748,0
+x70,18:27666787,32852798
+)
+)
+(70,18:27846188,32852798:558141,75748,0
+(70,18:28025589,32852798:199339,75748,0
+x70,18:28224928,32852798
+)
+)
+(70,18:28404329,32852798:558141,75748,0
+(70,18:28583730,32852798:199339,75748,0
+x70,18:28783069,32852798
+)
+)
+(70,18:29117476,32852798:1112314,462465,0
+k70,18:29870980,32852798:753504
+x70,18:30229790,32852798
+)
+g70,18:28399855,32852798
+g70,18:30229790,32852798
+)
+(70,19:6636830,33744088:23592960,498346,139537
+g70,19:14602427,33744088
+h70,19:14602427,33744088:5023347,0,0
+h70,19:19625774,33744088:0,0,0
+g70,19:11660177,33744088
+x70,19:14042277,33744088
+g70,19:14281483,33744088
+x70,19:14769863,33744088
+x70,19:18286201,33744088
+g70,19:18525407,33744088
+x70,19:20648367,33744088
+(70,19:21148496,33744088:558141,75748,0
+$70,19:21148496,33744088
+(70,19:21327897,33744088:199339,75748,0
+x70,19:21527236,33744088
+)
+$70,19:21706637,33744088
+)
+(70,19:21706637,33744088:558141,75748,0
+(70,19:21886038,33744088:199339,75748,0
+x70,19:22085377,33744088
+)
+)
+(70,19:22264778,33744088:558141,75748,0
+(70,19:22444179,33744088:199339,75748,0
+x70,19:22643518,33744088
+)
+)
+(70,19:22822919,33744088:558141,75748,0
+(70,19:23002320,33744088:199339,75748,0
+x70,19:23201659,33744088
+)
+)
+(70,19:23381060,33744088:558141,75748,0
+(70,19:23560461,33744088:199339,75748,0
+x70,19:23759800,33744088
+)
+)
+(70,19:23939201,33744088:558141,75748,0
+(70,19:24118602,33744088:199339,75748,0
+x70,19:24317941,33744088
+)
+)
+(70,19:24497342,33744088:558141,75748,0
+(70,19:24676743,33744088:199339,75748,0
+x70,19:24876082,33744088
+)
+)
+(70,19:25055483,33744088:558141,75748,0
+(70,19:25234884,33744088:199339,75748,0
+x70,19:25434223,33744088
+)
+)
+(70,19:25613624,33744088:558141,75748,0
+(70,19:25793025,33744088:199339,75748,0
+x70,19:25992364,33744088
+)
+)
+(70,19:26171765,33744088:558141,75748,0
+(70,19:26351166,33744088:199339,75748,0
+x70,19:26550505,33744088
+)
+)
+(70,19:26729906,33744088:558141,75748,0
+(70,19:26909307,33744088:199339,75748,0
+x70,19:27108646,33744088
+)
+)
+(70,19:27288047,33744088:558141,75748,0
+(70,19:27467448,33744088:199339,75748,0
+x70,19:27666787,33744088
+)
+)
+(70,19:27846188,33744088:558141,75748,0
+(70,19:28025589,33744088:199339,75748,0
+x70,19:28224928,33744088
+)
+)
+(70,19:28404329,33744088:558141,75748,0
+(70,19:28583730,33744088:199339,75748,0
+x70,19:28783069,33744088
+)
+)
+(70,19:29117476,33744088:1112314,462465,0
+k70,19:29870980,33744088:753504
+x70,19:30229790,33744088
+)
+g70,19:28399855,33744088
+g70,19:30229790,33744088
+)
+(70,20:6636830,34635378:23592960,498346,139537
+g70,20:14602427,34635378
+h70,20:14602427,34635378:5023347,0,0
+h70,20:19625774,34635378:0,0,0
+g70,20:11660177,34635378
+x70,20:14042277,34635378
+g70,20:14281483,34635378
+x70,20:14769863,34635378
+x70,20:18286201,34635378
+g70,20:18525407,34635378
+x70,20:20758003,34635378
+(70,20:21148496,34635378:558141,75748,0
+$70,20:21148496,34635378
+(70,20:21327897,34635378:199339,75748,0
+x70,20:21527236,34635378
+)
+$70,20:21706637,34635378
+)
+(70,20:21706637,34635378:558141,75748,0
+(70,20:21886038,34635378:199339,75748,0
+x70,20:22085377,34635378
+)
+)
+(70,20:22264778,34635378:558141,75748,0
+(70,20:22444179,34635378:199339,75748,0
+x70,20:22643518,34635378
+)
+)
+(70,20:22822919,34635378:558141,75748,0
+(70,20:23002320,34635378:199339,75748,0
+x70,20:23201659,34635378
+)
+)
+(70,20:23381060,34635378:558141,75748,0
+(70,20:23560461,34635378:199339,75748,0
+x70,20:23759800,34635378
+)
+)
+(70,20:23939201,34635378:558141,75748,0
+(70,20:24118602,34635378:199339,75748,0
+x70,20:24317941,34635378
+)
+)
+(70,20:24497342,34635378:558141,75748,0
+(70,20:24676743,34635378:199339,75748,0
+x70,20:24876082,34635378
+)
+)
+(70,20:25055483,34635378:558141,75748,0
+(70,20:25234884,34635378:199339,75748,0
+x70,20:25434223,34635378
+)
+)
+(70,20:25613624,34635378:558141,75748,0
+(70,20:25793025,34635378:199339,75748,0
+x70,20:25992364,34635378
+)
+)
+(70,20:26171765,34635378:558141,75748,0
+(70,20:26351166,34635378:199339,75748,0
+x70,20:26550505,34635378
+)
+)
+(70,20:26729906,34635378:558141,75748,0
+(70,20:26909307,34635378:199339,75748,0
+x70,20:27108646,34635378
+)
+)
+(70,20:27288047,34635378:558141,75748,0
+(70,20:27467448,34635378:199339,75748,0
+x70,20:27666787,34635378
+)
+)
+(70,20:27846188,34635378:558141,75748,0
+(70,20:28025589,34635378:199339,75748,0
+x70,20:28224928,34635378
+)
+)
+(70,20:28404329,34635378:558141,75748,0
+(70,20:28583730,34635378:199339,75748,0
+x70,20:28783069,34635378
+)
+)
+(70,20:29117476,34635378:1112314,462465,0
+k70,20:29870980,34635378:753504
+x70,20:30229790,34635378
+)
+g70,20:28399855,34635378
+g70,20:30229790,34635378
+)
+(70,21:6636830,35526668:23592960,498346,139537
+g70,21:14602427,35526668
+h70,21:14602427,35526668:5023347,0,0
+h70,21:19625774,35526668:0,0,0
+g70,21:11660177,35526668
+x70,21:14042277,35526668
+g70,21:14281483,35526668
+x70,21:14769863,35526668
+x70,21:18286201,35526668
+g70,21:18525407,35526668
+x70,21:20120120,35526668
+(70,21:20590355,35526668:558141,75748,0
+$70,21:20590355,35526668
+(70,21:20769756,35526668:199339,75748,0
+x70,21:20969095,35526668
+)
+$70,21:21148496,35526668
+)
+(70,21:21148496,35526668:558141,75748,0
+(70,21:21327897,35526668:199339,75748,0
+x70,21:21527236,35526668
+)
+)
+(70,21:21706637,35526668:558141,75748,0
+(70,21:21886038,35526668:199339,75748,0
+x70,21:22085377,35526668
+)
+)
+(70,21:22264778,35526668:558141,75748,0
+(70,21:22444179,35526668:199339,75748,0
+x70,21:22643518,35526668
+)
+)
+(70,21:22822919,35526668:558141,75748,0
+(70,21:23002320,35526668:199339,75748,0
+x70,21:23201659,35526668
+)
+)
+(70,21:23381060,35526668:558141,75748,0
+(70,21:23560461,35526668:199339,75748,0
+x70,21:23759800,35526668
+)
+)
+(70,21:23939201,35526668:558141,75748,0
+(70,21:24118602,35526668:199339,75748,0
+x70,21:24317941,35526668
+)
+)
+(70,21:24497342,35526668:558141,75748,0
+(70,21:24676743,35526668:199339,75748,0
+x70,21:24876082,35526668
+)
+)
+(70,21:25055483,35526668:558141,75748,0
+(70,21:25234884,35526668:199339,75748,0
+x70,21:25434223,35526668
+)
+)
+(70,21:25613624,35526668:558141,75748,0
+(70,21:25793025,35526668:199339,75748,0
+x70,21:25992364,35526668
+)
+)
+(70,21:26171765,35526668:558141,75748,0
+(70,21:26351166,35526668:199339,75748,0
+x70,21:26550505,35526668
+)
+)
+(70,21:26729906,35526668:558141,75748,0
+(70,21:26909307,35526668:199339,75748,0
+x70,21:27108646,35526668
+)
+)
+(70,21:27288047,35526668:558141,75748,0
+(70,21:27467448,35526668:199339,75748,0
+x70,21:27666787,35526668
+)
+)
+(70,21:27846188,35526668:558141,75748,0
+(70,21:28025589,35526668:199339,75748,0
+x70,21:28224928,35526668
+)
+)
+(70,21:28404329,35526668:558141,75748,0
+(70,21:28583730,35526668:199339,75748,0
+x70,21:28783069,35526668
+)
+)
+(70,21:29117476,35526668:1112314,462465,0
+k70,21:29870980,35526668:753504
+x70,21:30229790,35526668
+)
+g70,21:28399855,35526668
+g70,21:30229790,35526668
+)
+(70,22:6636830,36417958:23592960,498346,0
+g70,22:11660176,36417958
+h70,22:11660176,36417958:2726961,0,0
+h70,22:14387137,36417958:0,0,0
+g70,22:9363791,36417958
+(70,22:9363791,36417958:2296385,462465,0
+x70,22:10838899,36417958
+k70,22:11660176,36417958:821277
+)
+x70,22:14165867,36417958
+(70,22:14450804,36417958:558141,75748,0
+$70,22:14450804,36417958
+(70,22:14630205,36417958:199339,75748,0
+x70,22:14829544,36417958
+)
+$70,22:15008945,36417958
+)
+(70,22:15008945,36417958:558141,75748,0
+(70,22:15188346,36417958:199339,75748,0
+x70,22:15387685,36417958
+)
+)
+(70,22:15567086,36417958:558141,75748,0
+(70,22:15746487,36417958:199339,75748,0
+x70,22:15945826,36417958
+)
+)
+(70,22:16125227,36417958:558141,75748,0
+(70,22:16304628,36417958:199339,75748,0
+x70,22:16503967,36417958
+)
+)
+(70,22:16683368,36417958:558141,75748,0
+(70,22:16862769,36417958:199339,75748,0
+x70,22:17062108,36417958
+)
+)
+(70,22:17241509,36417958:558141,75748,0
+(70,22:17420910,36417958:199339,75748,0
+x70,22:17620249,36417958
+)
+)
+(70,22:17799650,36417958:558141,75748,0
+(70,22:17979051,36417958:199339,75748,0
+x70,22:18178390,36417958
+)
+)
+(70,22:18357791,36417958:558141,75748,0
+(70,22:18537192,36417958:199339,75748,0
+x70,22:18736531,36417958
+)
+)
+(70,22:18915932,36417958:558141,75748,0
+(70,22:19095333,36417958:199339,75748,0
+x70,22:19294672,36417958
+)
+)
+(70,22:19474073,36417958:558141,75748,0
+(70,22:19653474,36417958:199339,75748,0
+x70,22:19852813,36417958
+)
+)
+(70,22:20032214,36417958:558141,75748,0
+(70,22:20211615,36417958:199339,75748,0
+x70,22:20410954,36417958
+)
+)
+(70,22:20590355,36417958:558141,75748,0
+(70,22:20769756,36417958:199339,75748,0
+x70,22:20969095,36417958
+)
+)
+(70,22:21148496,36417958:558141,75748,0
+(70,22:21327897,36417958:199339,75748,0
+x70,22:21527236,36417958
+)
+)
+(70,22:21706637,36417958:558141,75748,0
+(70,22:21886038,36417958:199339,75748,0
+x70,22:22085377,36417958
+)
+)
+(70,22:22264778,36417958:558141,75748,0
+(70,22:22444179,36417958:199339,75748,0
+x70,22:22643518,36417958
+)
+)
+(70,22:22822919,36417958:558141,75748,0
+(70,22:23002320,36417958:199339,75748,0
+x70,22:23201659,36417958
+)
+)
+(70,22:23381060,36417958:558141,75748,0
+(70,22:23560461,36417958:199339,75748,0
+x70,22:23759800,36417958
+)
+)
+(70,22:23939201,36417958:558141,75748,0
+(70,22:24118602,36417958:199339,75748,0
+x70,22:24317941,36417958
+)
+)
+(70,22:24497342,36417958:558141,75748,0
+(70,22:24676743,36417958:199339,75748,0
+x70,22:24876082,36417958
+)
+)
+(70,22:25055483,36417958:558141,75748,0
+(70,22:25234884,36417958:199339,75748,0
+x70,22:25434223,36417958
+)
+)
+(70,22:25613624,36417958:558141,75748,0
+(70,22:25793025,36417958:199339,75748,0
+x70,22:25992364,36417958
+)
+)
+(70,22:26171765,36417958:558141,75748,0
+(70,22:26351166,36417958:199339,75748,0
+x70,22:26550505,36417958
+)
+)
+(70,22:26729906,36417958:558141,75748,0
+(70,22:26909307,36417958:199339,75748,0
+x70,22:27108646,36417958
+)
+)
+(70,22:27288047,36417958:558141,75748,0
+(70,22:27467448,36417958:199339,75748,0
+x70,22:27666787,36417958
+)
+)
+(70,22:27846188,36417958:558141,75748,0
+(70,22:28025589,36417958:199339,75748,0
+x70,22:28224928,36417958
+)
+)
+(70,22:28404329,36417958:558141,75748,0
+(70,22:28583730,36417958:199339,75748,0
+x70,22:28783069,36417958
+)
+)
+(70,22:29117476,36417958:1112314,462465,0
+k70,22:29870980,36417958:753504
+x70,22:30229790,36417958
+)
+g70,22:28399855,36417958
+g70,22:30229790,36417958
+)
+]
+(1,26:6636830,45679049:23592960,479268,0
+(1,26:6636830,45679049:23592960,479268,0
+k1,26:18134302,45679049:11497472
+x1,26:18732319,45679049
+k1,26:30229790,45679049:11497471
+)
+)
+]
+]
+!56917
+}3
+!10
+{4
+[1,26:4736286,45679049:28835840,40942763,0
+[1,26:9979166,45679049:23592960,39369899,0
+[1,26:9979166,7095582:23592960,786432,0
+(1,26:9979166,7095582:23592960,490372,0
+(1,26:9979166,7095582:23592960,490372,0
+x1,26:10557250,7095582
+k1,26:29356112,7095582:18798862
+x1,26:29904294,7095582
+x1,26:31409302,7095582
+x1,26:32415962,7095582
+g1,26:32655168,7095582
+x1,26:33572126,7095582
+)
+)
+]
+[1,26:9979166,43879237:0,35481206,0
+h1,26:9979166,9118927:0,0,0
+]
+(1,26:9979166,45679049:23592960,0,0
+h1,26:9979166,45679049:23592960,0,0
+)
+]
+]
+!533
+}4
+!8
+{5
+[1,53:4736286,45679049:25760436,40942763,0
+[1,53:6636830,45679049:23859892,39369899,0
+[1,53:6636830,7095582:23592960,786432,0
+(1,53:6636830,7095582:23592960,0,0
+h1,53:6636830,7095582:23592960,0,0
+)
+]
+[1,53:6636830,43879237:23859892,35481206,0
+(1,27:6636830,14116311:23592960,943899,0
+h1,27:6636830,14116311:0,0,0
+x1,27:9316721,14116311
+g1,27:9826427,14116311
+x1,27:10590986,14116311
+k1,27:20410388,14116311:9819402
+k1,27:30229790,14116311:9819402
+)
+(1,27:6636830,17475296:23592960,1132315,317047
+h1,27:6636830,17475296:0,0,0
+x1,27:11934942,17475296
+g1,27:12546393,17475296
+x1,27:15421534,17475296
+x1,27:16338709,17475296
+x1,27:17179453,17475296
+x1,27:18453308,17475296
+x1,27:19294052,17475296
+g1,27:19905503,17475296
+x1,27:24001660,17475296
+x1,27:25988875,17475296
+k1,27:28109333,17475296:2120458
+k1,27:30229790,17475296:2120457
+)
+(1,29:6636830,21358568:23592960,825750,353898
+g1,29:9055105,21358568
+r1,29:9055105,21358568:0,1179648,353898
+(1,29:9055105,21358568:0,825750,353898
+k1,29:6636830,21358568:-2418275
+(1,29:6636830,21358568:2418275,825750,353898
+x1,29:7993423,21358568
+g1,29:9055105,21358568
+r1,29:9055105,21358568:0,1179648,353898
+g1,29:9055105,21358568
+)
+)
+x1,29:12121533,21358568
+g1,29:12475427,21358568
+x1,29:17087845,21358568
+r1,29:17087845,21358568:0,1179648,353898
+k1,29:30229790,21358568:13141945
+g1,29:30229790,21358568
+)
+(1,31:6636830,23120174:23592960,490372,59802
+$1,30:6636830,23120174
+(1,30:6636830,23120174:1624613,490372,59802
+(1,30:6636830,23120174:528248,490372,0
+(1,30:6636830,23120174:528248,490372,0
+x1,30:7165078,23120174
+)
+)
+(1,30:7165078,23120174:558150,418611,59802
+x1,30:7723228,23120174
+)
+(1,30:7723228,23120174:538215,490372,0
+(1,30:7723228,23120174:538215,490372,0
+x1,30:8261443,23120174
+)
+)
+)
+g1,30:8420911,23120174
+x1,30:8979061,23120174
+g1,30:9138529,23120174
+h1,30:9138529,23120174:0,0,0
+(1,30:9138529,23120174:1076430,490372,0
+(1,30:9138529,23120174:1076430,490372,0
+x1,30:10214959,23120174
+)
+)
+(1,30:10214959,23120174:1549563,478561,0
+h1,30:10214959,23120174:0,0,0
+g1,30:10414294,23120174
+(1,30:10414294,23120174:1150893,478561,0
+[1,30:10414294,23120174:1150893,478561,0
+(1,30:10414294,22713375:1150893,0,0
+k1,30:10584508,22713375:170214
+g1,30:11302129,22713375
+k1,30:11565187,22713375:170214
+)
+(1,30:10414294,23120174:1150893,263276,0
+$1,30:10414294,23120174
+(1,30:10414294,23120174:558150,0,0
+(1,30:10414294,23120174:558150,0,0
+$1,30:10414294,23120174
+(1,30:10414294,23120174:558150,418611,59802
+x1,30:10972444,23120174
+)
+$1,30:10972444,23120174
+)
+)
+(1,30:10710669,23120174:398682,0,0
+$1,30:10710669,23120174
+(1,30:10630935,23120174:558150,0,0
+(1,30:10630935,23120174:558150,0,0
+$1,30:10630935,23120174
+(1,30:10630935,23120174:558150,418611,59802
+x1,30:11189085,23120174
+)
+$1,30:11189085,23120174
+)
+)
+$1,30:11109351,23120174
+)
+x1,30:11565187,23120174
+$1,30:11565187,23120174
+)
+]
+)
+g1,30:11764522,23120174
+h1,30:11764522,23120174:0,0,0
+)
+(1,30:11764522,23120174:1624613,490372,59802
+(1,30:11764522,23120174:528248,490372,0
+(1,30:11764522,23120174:528248,490372,0
+x1,30:12292770,23120174
+)
+)
+(1,30:12292770,23120174:558150,418611,59802
+x1,30:12850920,23120174
+)
+(1,30:12850920,23120174:538215,490372,0
+(1,30:12850920,23120174:538215,490372,0
+x1,30:13389135,23120174
+)
+)
+)
+g1,30:13548603,23120174
+x1,30:14106753,23120174
+g1,30:14266221,23120174
+h1,30:14266221,23120174:0,0,0
+(1,30:14266221,23120174:1076430,490372,0
+(1,30:14266221,23120174:1076430,490372,0
+x1,30:15342651,23120174
+)
+)
+$1,30:15342651,23120174
+k1,31:30229790,23120174:14887139
+g1,31:30229790,23120174
+)
+(1,31:6636830,25511491:23592960,642250,275254
+g1,31:9340190,25511491
+r1,31:9340190,25511491:0,917504,275254
+(1,31:9340190,25511491:0,642250,275254
+k1,31:6636830,25511491:-2703360
+(1,31:6636830,25511491:2703360,642250,275254
+x1,31:8455454,25511491
+g1,31:9340190,25511491
+r1,31:9340190,25511491:0,917504,275254
+g1,31:9340190,25511491
+)
+)
+x1,31:13183878,25511491
+g1,31:13478790,25511491
+x1,31:16220835,25511491
+x1,31:17670819,25511491
+r1,31:17670819,25511491:0,917504,275254
+k1,31:30229790,25511491:12558971
+g1,31:30229790,25511491
+)
+(1,32:6636830,27025917:23592960,498346,139537
+x1,32:7862765,27025917
+x1,32:9599007,27025917
+g1,32:9838213,27025917
+x1,32:10914643,27025917
+x1,32:12130610,27025917
+k1,32:30229790,27025917:18099180
+g1,32:30229790,27025917
+)
+(1,36:6636830,28884656:23859892,623900,267389
+g1,36:6636830,28884656
+(1,36:6636830,28884656:7193139,623900,267389
+k1,36:8921587,28884656:2284757
+(1,36:8921587,28884656:0,623900,267389
+[1,36:8921587,28884656:0,623900,267389
+(1,21:8921587,28884656:0,623900,267389
+r1,36:8921587,28884656:0,891289,267389
+)
+]
+)
+(1,36:8921587,28884656:4908382,498346,205512
+$1,36:8921587,28884656
+(1,36:8921587,28884656:4908382,498346,205512
+h1,36:8921587,28884656:0,0,0
+(1,36:8921587,28884656:4908382,498346,205512
+(1,36:8921587,28884656:2775461,490372,205512
+x1,36:9439868,28884656
+[1,36:9439868,29090168:311300,507307,0
+(1,36:9439868,28582861:32768,0,54616
+h1,36:9439868,28582861:0,0,0
+h1,36:9439868,28582861:0,0,54616
+h1,36:9439868,28582861:0,0,0
+)
+(1,36:9439868,29090168:311300,337875,0
+h1,36:9439868,29090168:0,0,0
+x1,36:9718400,29090168
+)
+]
+x1,36:10289383,28884656
+[1,36:10289383,29090168:311300,507307,0
+(1,36:10289383,28582861:32768,0,54616
+h1,36:10289383,28582861:0,0,0
+h1,36:10289383,28582861:0,0,54616
+h1,36:10289383,28582861:0,0,0
+)
+(1,36:10289383,29090168:311300,337875,0
+h1,36:10289383,29090168:0,0,0
+x1,36:10567915,29090168
+)
+]
+(1,36:10600683,28884656:1096365,490372,0
+x1,36:11697048,28884656
+)
+)
+g1,36:11856516,28884656
+x1,36:12414666,28884656
+g1,36:12574134,28884656
+h1,36:12574134,28884656:0,0,0
+(1,36:12574134,28884656:1255835,498346,0
+x1,36:13829969,28884656
+)
+)
+)
+$1,36:13829969,28884656
+)
+)
+g1,36:13829969,28884656
+(1,36:13829969,28884656:16666753,623900,267389
+(1,36:13829969,28884656:6231030,498346,205512
+$1,36:13829969,28884656
+(1,36:13829969,28884656:6231030,498346,205512
+h1,36:13829969,28884656:0,0,0
+(1,36:13829969,28884656:6231030,498346,205512
+(1,36:13829969,28884656:1549563,478561,0
+h1,36:13829969,28884656:0,0,0
+g1,36:14029304,28884656
+(1,36:14029304,28884656:1150893,478561,0
+[1,36:14029304,28884656:1150893,478561,0
+(1,36:14029304,28477857:1150893,0,0
+k1,36:14199518,28477857:170214
+g1,36:14917139,28477857
+k1,36:15180197,28477857:170214
+)
+(1,36:14029304,28884656:1150893,263276,0
+$1,36:14029304,28884656
+(1,36:14029304,28884656:558150,0,0
+(1,36:14029304,28884656:558150,0,0
+$1,36:14029304,28884656
+(1,36:14029304,28884656:558150,418611,59802
+x1,36:14587454,28884656
+)
+$1,36:14587454,28884656
+)
+)
+(1,36:14325679,28884656:398682,0,0
+$1,36:14325679,28884656
+(1,36:14245945,28884656:558150,0,0
+(1,36:14245945,28884656:558150,0,0
+$1,36:14245945,28884656
+(1,36:14245945,28884656:558150,418611,59802
+x1,36:14804095,28884656
+)
+$1,36:14804095,28884656
+)
+)
+$1,36:14724361,28884656
+)
+x1,36:15180197,28884656
+$1,36:15180197,28884656
+)
+]
+)
+g1,36:15379532,28884656
+h1,36:15379532,28884656:0,0,0
+)
+(1,36:15379532,28884656:2396716,498346,205512
+x1,36:15897813,28884656
+[1,36:15897813,29090168:311300,507307,0
+(1,36:15897813,28582861:32768,0,54616
+h1,36:15897813,28582861:0,0,0
+h1,36:15897813,28582861:0,0,54616
+h1,36:15897813,28582861:0,0,0
+)
+(1,36:15897813,29090168:311300,337875,0
+h1,36:15897813,29090168:0,0,0
+x1,36:16176345,29090168
+)
+]
+x1,36:16747328,28884656
+[1,36:16747328,29090168:311300,507307,0
+(1,36:16747328,28582861:32768,0,54616
+h1,36:16747328,28582861:0,0,0
+h1,36:16747328,28582861:0,0,54616
+h1,36:16747328,28582861:0,0,0
+)
+(1,36:16747328,29090168:311300,337875,0
+h1,36:16747328,29090168:0,0,0
+x1,36:17025860,29090168
+)
+]
+(1,36:17058628,28884656:717620,498346,0
+x1,36:17776248,28884656
+)
+)
+g1,36:17935716,28884656
+x1,36:18493866,28884656
+g1,36:18653334,28884656
+h1,36:18653334,28884656:0,0,0
+(1,36:18653334,28884656:1407665,490372,205512
+x1,36:19191549,28884656
+[1,36:19191549,29090168:311300,507307,0
+(1,36:19191549,28582861:32768,0,54616
+h1,36:19191549,28582861:0,0,0
+h1,36:19191549,28582861:0,0,54616
+h1,36:19191549,28582861:0,0,0
+)
+(1,36:19191549,29090168:311300,337875,0
+h1,36:19191549,29090168:0,0,0
+x1,36:19470081,29090168
+)
+]
+x1,36:20060999,28884656
+)
+)
+)
+$1,36:20060999,28884656
+)
+k1,36:30496722,28884656:10435723
+)
+g1,36:31152082,28884656
+(1,36:31152082,28884656:-655360,623900,267389
+)
+g1,36:30496722,28884656
+)
+(1,36:6636830,29972554:23859892,623900,267389
+g1,36:6636830,29972554
+(1,36:6636830,29972554:7193139,623900,267389
+k1,36:7421896,29972554:785066
+(1,36:7421896,29972554:0,623900,267389
+[1,36:7421896,29972554:0,623900,267389
+(1,21:7421896,29972554:0,623900,267389
+r1,36:7421896,29972554:0,891289,267389
+)
+]
+)
+(1,36:7421896,29972554:6408073,498346,205512
+$1,36:7421896,29972554
+(1,36:7421896,29972554:6408073,498346,205512
+h1,36:7421896,29972554:0,0,0
+(1,36:7421896,29972554:6408073,498346,205512
+(1,36:7421896,29972554:2396716,498346,205512
+x1,36:7940177,29972554
+[1,36:7940177,30178066:311300,507307,0
+(1,36:7940177,29670759:32768,0,54616
+h1,36:7940177,29670759:0,0,0
+h1,36:7940177,29670759:0,0,54616
+h1,36:7940177,29670759:0,0,0
+)
+(1,36:7940177,30178066:311300,337875,0
+h1,36:7940177,30178066:0,0,0
+x1,36:8218709,30178066
+)
+]
+x1,36:8789692,29972554
+[1,36:8789692,30178066:311300,507307,0
+(1,36:8789692,29670759:32768,0,54616
+h1,36:8789692,29670759:0,0,0
+h1,36:8789692,29670759:0,0,54616
+h1,36:8789692,29670759:0,0,0
+)
+(1,36:8789692,30178066:311300,337875,0
+h1,36:8789692,30178066:0,0,0
+x1,36:9068224,30178066
+)
+]
+(1,36:9100992,29972554:717620,498346,0
+x1,36:9818612,29972554
+)
+)
+g1,36:9978080,29972554
+x1,36:10536230,29972554
+g1,36:10695698,29972554
+h1,36:10695698,29972554:0,0,0
+(1,36:10695698,29972554:3134271,490372,205512
+x1,36:11213979,29972554
+[1,36:11213979,30178066:311300,507307,0
+(1,36:11213979,29670759:32768,0,54616
+h1,36:11213979,29670759:0,0,0
+h1,36:11213979,29670759:0,0,54616
+h1,36:11213979,29670759:0,0,0
+)
+(1,36:11213979,30178066:311300,337875,0
+h1,36:11213979,30178066:0,0,0
+x1,36:11492511,30178066
+)
+]
+x1,36:12063494,29972554
+[1,36:12063494,30178066:311300,507307,0
+(1,36:12063494,29670759:32768,0,54616
+h1,36:12063494,29670759:0,0,0
+h1,36:12063494,29670759:0,0,54616
+h1,36:12063494,29670759:0,0,0
+)
+(1,36:12063494,30178066:311300,337875,0
+h1,36:12063494,30178066:0,0,0
+x1,36:12342026,30178066
+)
+]
+(1,36:12374794,29972554:1455175,490372,0
+x1,36:13829969,29972554
+)
+)
+)
+)
+$1,36:13829969,29972554
+)
+)
+g1,36:13829969,29972554
+(1,36:13829969,29972554:16666753,623900,267389
+(1,36:13829969,29972554:16666753,538214,205512
+$1,36:13829969,29972554
+(1,36:13829969,29972554:16666753,538214,205512
+h1,36:13829969,29972554:0,0,0
+(1,36:13829969,29972554:7957636,498346,205512
+(1,36:13829969,29972554:1549563,478561,0
+h1,36:13829969,29972554:0,0,0
+g1,36:14029304,29972554
+(1,36:14029304,29972554:1150893,478561,0
+[1,36:14029304,29972554:1150893,478561,0
+(1,36:14029304,29565755:1150893,0,0
+k1,36:14199518,29565755:170214
+g1,36:14917139,29565755
+k1,36:15180197,29565755:170214
+)
+(1,36:14029304,29972554:1150893,263276,0
+$1,36:14029304,29972554
+(1,36:14029304,29972554:558150,0,0
+(1,36:14029304,29972554:558150,0,0
+$1,36:14029304,29972554
+(1,36:14029304,29972554:558150,418611,59802
+x1,36:14587454,29972554
+)
+$1,36:14587454,29972554
+)
+)
+(1,36:14325679,29972554:398682,0,0
+$1,36:14325679,29972554
+(1,36:14245945,29972554:558150,0,0
+(1,36:14245945,29972554:558150,0,0
+$1,36:14245945,29972554
+(1,36:14245945,29972554:558150,418611,59802
+x1,36:14804095,29972554
+)
+$1,36:14804095,29972554
+)
+)
+$1,36:14724361,29972554
+)
+x1,36:15180197,29972554
+$1,36:15180197,29972554
+)
+]
+)
+g1,36:15379532,29972554
+h1,36:15379532,29972554:0,0,0
+)
+(1,36:15379532,29972554:3916342,490372,205512
+x1,36:15897813,29972554
+[1,36:15897813,30178066:311300,507307,0
+(1,36:15897813,29670759:32768,0,54616
+h1,36:15897813,29670759:0,0,0
+h1,36:15897813,29670759:0,0,54616
+h1,36:15897813,29670759:0,0,0
+)
+(1,36:15897813,30178066:311300,337875,0
+h1,36:15897813,30178066:0,0,0
+x1,36:16176345,30178066
+)
+]
+x1,36:16747328,29972554
+[1,36:16747328,30178066:311300,507307,0
+(1,36:16747328,29670759:32768,0,54616
+h1,36:16747328,29670759:0,0,0
+h1,36:16747328,29670759:0,0,54616
+h1,36:16747328,29670759:0,0,0
+)
+(1,36:16747328,30178066:311300,337875,0
+h1,36:16747328,30178066:0,0,0
+x1,36:17025860,30178066
+)
+]
+(1,36:17058628,29972554:1076431,490372,0
+x1,36:18135059,29972554
+)
+[1,36:18135059,30178066:311300,507307,0
+(1,36:18135059,29670759:32768,0,54616
+h1,36:18135059,29670759:0,0,0
+h1,36:18135059,29670759:0,0,54616
+h1,36:18135059,29670759:0,0,0
+)
+(1,36:18135059,30178066:311300,337875,0
+h1,36:18135059,30178066:0,0,0
+x1,36:18413591,30178066
+)
+]
+x1,36:18984574,29972554
+[1,36:18984574,30178066:311300,507307,0
+(1,36:18984574,29670759:32768,0,54616
+h1,36:18984574,29670759:0,0,0
+h1,36:18984574,29670759:0,0,54616
+h1,36:18984574,29670759:0,0,0
+)
+(1,36:18984574,30178066:311300,337875,0
+h1,36:18984574,30178066:0,0,0
+x1,36:19263106,30178066
+)
+]
+)
+g1,36:19455342,29972554
+x1,36:20013492,29972554
+g1,36:20172960,29972554
+h1,36:20172960,29972554:0,0,0
+(1,36:20172960,29972554:1614645,498346,0
+x1,36:21787605,29972554
+)
+)
+g1,36:22505226,29972554
+(1,36:22505226,29972554:7991496,538214,179404
+(1,36:22505226,29972554:7991496,538214,179404
+x1,36:23665379,29972554
+x1,36:25008922,29972554
+g1,36:25248128,29972554
+x1,36:26446155,29972554
+g1,36:26685361,29972554
+x1,36:30496722,29972554
+)
+)
+)
+$1,36:30496722,29972554
+)
+g1,36:30496722,29972554
+)
+g1,36:31152082,29972554
+(1,36:31152082,29972554:-655360,623900,267389
+)
+g1,36:30496722,29972554
+)
+(1,36:6636830,31060452:23859892,623900,267389
+g1,36:6636830,31060452
+(1,36:6636830,31060452:7193139,623900,267389
+g1,36:6636830,31060452
+(1,36:6636830,31060452:0,623900,267389
+[1,36:6636830,31060452:0,623900,267389
+(1,21:6636830,31060452:0,623900,267389
+r1,36:6636830,31060452:0,891289,267389
+)
+]
+)
+(1,36:6636830,31060452:7193139,490372,205512
+$1,36:6636830,31060452
+(1,36:6636830,31060452:7193139,490372,205512
+h1,36:6636830,31060452:0,0,0
+(1,36:6636830,31060452:7193139,490372,205512
+(1,36:6636830,31060452:3540592,490372,205512
+(1,36:6636830,31060452:1056496,490372,0
+x1,36:7693326,31060452
+)
+[1,36:7693326,31265964:311300,507307,0
+(1,36:7693326,30758657:32768,0,54616
+h1,36:7693326,30758657:0,0,0
+h1,36:7693326,30758657:0,0,54616
+h1,36:7693326,30758657:0,0,0
+)
+(1,36:7693326,31265964:311300,337875,0
+h1,36:7693326,31265964:0,0,0
+x1,36:7971858,31265964
+)
+]
+(1,36:8004626,31060452:2172796,490372,0
+x1,36:10177422,31060452
+)
+)
+g1,36:10336890,31060452
+x1,36:10895040,31060452
+g1,36:11054508,31060452
+h1,36:11054508,31060452:0,0,0
+(1,36:11054508,31060452:2775461,490372,205512
+x1,36:11572789,31060452
+[1,36:11572789,31265964:311300,507307,0
+(1,36:11572789,30758657:32768,0,54616
+h1,36:11572789,30758657:0,0,0
+h1,36:11572789,30758657:0,0,54616
+h1,36:11572789,30758657:0,0,0
+)
+(1,36:11572789,31265964:311300,337875,0
+h1,36:11572789,31265964:0,0,0
+x1,36:11851321,31265964
+)
+]
+x1,36:12422304,31060452
+[1,36:12422304,31265964:311300,507307,0
+(1,36:12422304,30758657:32768,0,54616
+h1,36:12422304,30758657:0,0,0
+h1,36:12422304,30758657:0,0,54616
+h1,36:12422304,30758657:0,0,0
+)
+(1,36:12422304,31265964:311300,337875,0
+h1,36:12422304,31265964:0,0,0
+x1,36:12700836,31265964
+)
+]
+(1,36:12733604,31060452:1096365,490372,0
+x1,36:13829969,31060452
+)
+)
+)
+)
+$1,36:13829969,31060452
+)
+)
+g1,36:13829969,31060452
+(1,36:13829969,31060452:16666753,623900,267389
+(1,36:13829969,31060452:13050750,538214,205512
+$1,36:13829969,31060452
+(1,36:13829969,31060452:13050750,538214,205512
+h1,36:13829969,31060452:0,0,0
+(1,36:13829969,31060452:8515787,490372,205512
+(1,36:13829969,31060452:1549563,478561,0
+h1,36:13829969,31060452:0,0,0
+g1,36:14029304,31060452
+(1,36:14029304,31060452:1150893,478561,0
+[1,36:14029304,31060452:1150893,478561,0
+(1,36:14029304,30653653:1150893,0,0
+k1,36:14199518,30653653:170214
+g1,36:14917139,30653653
+k1,36:15180197,30653653:170214
+)
+(1,36:14029304,31060452:1150893,263276,0
+$1,36:14029304,31060452
+(1,36:14029304,31060452:558150,0,0
+(1,36:14029304,31060452:558150,0,0
+$1,36:14029304,31060452
+(1,36:14029304,31060452:558150,418611,59802
+x1,36:14587454,31060452
+)
+$1,36:14587454,31060452
+)
+)
+(1,36:14325679,31060452:398682,0,0
+$1,36:14325679,31060452
+(1,36:14245945,31060452:558150,0,0
+(1,36:14245945,31060452:558150,0,0
+$1,36:14245945,31060452
+(1,36:14245945,31060452:558150,418611,59802
+x1,36:14804095,31060452
+)
+$1,36:14804095,31060452
+)
+)
+$1,36:14724361,31060452
+)
+x1,36:15180197,31060452
+$1,36:15180197,31060452
+)
+]
+)
+g1,36:15379532,31060452
+h1,36:15379532,31060452:0,0,0
+)
+(1,36:15379532,31060452:4681473,490372,205512
+(1,36:15379532,31060452:1056496,490372,0
+x1,36:16436028,31060452
+)
+[1,36:16436028,31265964:311300,507307,0
+(1,36:16436028,30758657:32768,0,54616
+h1,36:16436028,30758657:0,0,0
+h1,36:16436028,30758657:0,0,54616
+h1,36:16436028,30758657:0,0,0
+)
+(1,36:16436028,31265964:311300,337875,0
+h1,36:16436028,31265964:0,0,0
+x1,36:16714560,31265964
+)
+]
+(1,36:16747328,31060452:2152862,490372,0
+x1,36:18900190,31060452
+)
+[1,36:18900190,31265964:311300,507307,0
+(1,36:18900190,30758657:32768,0,54616
+h1,36:18900190,30758657:0,0,0
+h1,36:18900190,30758657:0,0,54616
+h1,36:18900190,30758657:0,0,0
+)
+(1,36:18900190,31265964:311300,337875,0
+h1,36:18900190,31265964:0,0,0
+x1,36:19178722,31265964
+)
+]
+x1,36:19749705,31060452
+[1,36:19749705,31265964:311300,507307,0
+(1,36:19749705,30758657:32768,0,54616
+h1,36:19749705,30758657:0,0,0
+h1,36:19749705,30758657:0,0,54616
+h1,36:19749705,30758657:0,0,0
+)
+(1,36:19749705,31265964:311300,337875,0
+h1,36:19749705,31265964:0,0,0
+x1,36:20028237,31265964
+)
+]
+)
+g1,36:20220473,31060452
+x1,36:20778623,31060452
+g1,36:20938091,31060452
+h1,36:20938091,31060452:0,0,0
+(1,36:20938091,31060452:1407665,490372,205512
+x1,36:21476306,31060452
+[1,36:21476306,31265964:311300,507307,0
+(1,36:21476306,30758657:32768,0,54616
+h1,36:21476306,30758657:0,0,0
+h1,36:21476306,30758657:0,0,54616
+h1,36:21476306,30758657:0,0,0
+)
+(1,36:21476306,31265964:311300,337875,0
+h1,36:21476306,31265964:0,0,0
+x1,36:21754838,31265964
+)
+]
+x1,36:22345756,31060452
+)
+)
+g1,36:23063377,31060452
+(1,36:23063377,31060452:3817342,538214,179404
+(1,36:23063377,31060452:3817342,538214,179404
+x1,36:25022879,31060452
+x1,36:25800302,31060452
+x1,36:26880719,31060452
+)
+)
+)
+$1,36:26880719,31060452
+)
+k1,36:30496722,31060452:3616003
+)
+g1,36:31152082,31060452
+(1,36:31152082,31060452:-655360,623900,267389
+)
+g1,36:30496722,31060452
+)
+[1,36:6636830,31060452:23592960,623900,267389
+(1,36:6636830,31060452:23592960,623900,267389
+(1,36:6636830,31060452:23859892,623900,267389
+(1,36:6636830,31060452:0,623900,267389
+[1,36:6636830,31060452:0,623900,267389
+(1,21:6636830,31060452:0,623900,267389
+r1,36:6636830,31060452:0,891289,267389
+)
+]
+)
+k1,36:30496722,31060452:23859892
+)
+g1,36:30496722,31060452
+g1,36:30496722,31060452
+)
+]
+(1,39:6636830,33001376:23592960,538214,179404
+h1,38:6636830,33001376:1114112,0,0
+x1,38:10918439,33001376
+x1,38:11636059,33001376
+k1,38:11856849,33001376:220790
+x1,38:13152553,33001376
+x1,38:15269532,33001376
+k1,38:15490321,33001376:220789
+x1,38:17708964,33001376
+x1,38:18067774,33001376
+x1,38:18605988,33001376
+k1,38:18830461,33001376:224473
+x1,38:19807223,33001376
+x1,38:21063057,33001376
+k1,38:21283847,33001376:220790
+x1,38:23103812,33001376
+k1,38:23324601,33001376:220789
+x1,38:24620304,33001376
+k1,38:24841094,33001376:220790
+x1,38:26477667,33001376
+k1,38:26698457,33001376:220790
+x1,38:27336342,33001376
+k1,38:27557131,33001376:220789
+x1,38:28713297,33001376
+k1,38:28934087,33001376:220790
+x1,38:30229790,33001376
+k1,38:30229790,33001376:0
+)
+(1,39:6636830,33892666:23592960,538214,179404
+x1,39:8273403,33892666
+g1,38:8512609,33892666
+x1,38:9349833,33892666
+k1,39:30229790,33892666:20879957
+g1,39:30229790,33892666
+)
+(1,40:6636830,36283983:23592960,642250,275254
+g1,40:9340190,36283983
+r1,40:9340190,36283983:0,917504,275254
+(1,40:9340190,36283983:0,642250,275254
+k1,40:6636830,36283983:-2703360
+(1,40:6636830,36283983:2703360,642250,275254
+x1,40:8455454,36283983
+g1,40:9340190,36283983
+r1,40:9340190,36283983:0,917504,275254
+g1,40:9340190,36283983
+)
+)
+x1,40:13183878,36283983
+g1,40:13478790,36283983
+x1,40:16323690,36283983
+x1,40:17773674,36283983
+r1,40:17773674,36283983:0,917504,275254
+k1,40:30229790,36283983:12456116
+g1,40:30229790,36283983
+)
+(1,41:6636830,37871809:23592960,623900,267389
+r1,41:6636830,37871809:0,891289,267389
+x1,41:10530985,37871809
+r1,41:10530985,37871809:0,891289,267389
+k1,41:30229790,37871809:19698805
+g1,41:30229790,37871809
+)
+(1,44:6636830,39773921:23592960,946051,205512
+$1,42:6636830,39773921
+(1,42:6636830,39773921:1679096,490372,205512
+(1,42:6636830,39773921:518281,490372,0
+(1,42:6636830,39773921:518281,490372,0
+x1,42:7155111,39773921
+)
+)
+[1,42:7155111,39979433:311300,507307,0
+(1,42:7155111,39472126:32768,0,54616
+h1,42:7155111,39472126:0,0,0
+h1,42:7155111,39472126:0,0,54616
+(1,42:7155111,39472126:0,0,0
+h1,42:7155111,39472126:0,0,0
+)
+)
+(1,42:7155111,39979433:311300,337875,0
+h1,42:7155111,39979433:0,0,0
+(1,42:7155111,39979433:278532,337875,0
+(1,42:7155111,39979433:278532,337875,0
+x1,42:7433643,39979433
+)
+)
+)
+]
+(1,42:7466411,39773921:538215,490372,0
+(1,42:7466411,39773921:538215,490372,0
+x1,42:8004626,39773921
+)
+)
+[1,42:8004626,39979433:311300,507307,0
+(1,42:8004626,39472126:32768,0,54616
+h1,42:8004626,39472126:0,0,0
+h1,42:8004626,39472126:0,0,54616
+(1,42:8004626,39472126:0,0,0
+h1,42:8004626,39472126:0,0,0
+)
+)
+(1,42:8004626,39979433:311300,337875,0
+h1,42:8004626,39979433:0,0,0
+(1,42:8004626,39979433:278532,337875,0
+(1,42:8004626,39979433:278532,337875,0
+x1,42:8283158,39979433
+)
+)
+)
+]
+)
+g1,42:8475394,39773921
+x1,42:9033544,39773921
+g1,42:9193012,39773921
+h1,42:9193012,39773921:0,0,0
+(1,42:9193012,39773921:1028920,498346,205512
+(1,42:9193012,39773921:717620,498346,0
+(1,42:9193012,39773921:717620,498346,0
+x1,42:9910632,39773921
+)
+)
+[1,42:9910632,39979433:311300,507307,0
+(1,42:9910632,39472126:32768,0,54616
+h1,42:9910632,39472126:0,0,0
+h1,42:9910632,39472126:0,0,54616
+(1,42:9910632,39472126:0,0,0
+h1,42:9910632,39472126:0,0,0
+)
+)
+(1,42:9910632,39979433:311300,337875,0
+h1,42:9910632,39979433:0,0,0
+(1,42:9910632,39979433:278532,337875,0
+(1,42:9910632,39979433:278532,337875,0
+x1,42:10189164,39979433
+)
+)
+)
+]
+)
+(1,42:10221932,39773921:2234061,946051,0
+h1,42:10221932,39773921:0,0,0
+g1,42:10421267,39773921
+(1,42:10421267,39773921:1835391,946051,0
+[1,42:10421267,39773921:1835391,946051,0
+(1,42:10421267,39263721:1835391,364089,167189
+k1,42:10591481,39263721:170214
+(1,42:10591481,39263721:1402119,364089,167189
+(1,42:10591481,39263721:1129056,364089,0
+(1,42:10591481,39263721:1129056,364089,0
+x1,42:11720537,39263721
+)
+)
+[1,42:11720537,39430910:273063,402389,0
+(1,42:11720537,39028521:32768,0,54612
+h1,42:11720537,39028521:0,0,0
+h1,42:11720537,39028521:0,0,54612
+(1,42:11720537,39028521:0,0,0
+h1,42:11720537,39028521:0,0,0
+)
+)
+(1,42:11720537,39430910:273063,253405,0
+h1,42:11720537,39430910:0,0,0
+(1,42:11720537,39430910:240295,253405,0
+(1,42:11720537,39430910:240295,253405,0
+x1,42:11960832,39430910
+)
+)
+)
+]
+)
+k1,42:12256658,39263721:170214
+)
+(1,42:10421267,39773921:1835391,263276,0
+$1,42:10421267,39773921
+(1,42:10421267,39773921:558150,0,0
+(1,42:10421267,39773921:558150,0,0
+$1,42:10421267,39773921
+(1,42:10421267,39773921:558150,418611,59802
+x1,42:10979417,39773921
+)
+$1,42:10979417,39773921
+)
+)
+(1,42:10860550,39773921:398682,0,0
+$1,42:10860550,39773921
+(1,42:10780816,39773921:558150,0,0
+(1,42:10780816,39773921:558150,0,0
+$1,42:10780816,39773921
+(1,42:10780816,39773921:558150,418611,59802
+x1,42:11338966,39773921
+)
+$1,42:11338966,39773921
+)
+)
+$1,42:11259232,39773921
+)
+(1,42:11259232,39773921:398682,0,0
+(1,42:11179498,39773921:558150,0,0
+(1,42:11179498,39773921:558150,0,0
+(1,42:11179498,39773921:558150,418611,59802
+x1,42:11737648,39773921
+)
+)
+)
+)
+x1,42:12256658,39773921
+$1,42:12256658,39773921
+)
+]
+)
+g1,42:12455993,39773921
+h1,42:12455993,39773921:0,0,0
+h1,42:12455993,39773921:0,0,0
+)
+(1,42:12455993,39773921:2396716,498346,205512
+(1,42:12455993,39773921:518281,490372,0
+(1,42:12455993,39773921:518281,490372,0
+x1,42:12974274,39773921
+)
+)
+[1,42:12974274,39979433:311300,507307,0
+(1,42:12974274,39472126:32768,0,54616
+h1,42:12974274,39472126:0,0,0
+h1,42:12974274,39472126:0,0,54616
+(1,42:12974274,39472126:0,0,0
+h1,42:12974274,39472126:0,0,0
+)
+)
+(1,42:12974274,39979433:311300,337875,0
+h1,42:12974274,39979433:0,0,0
+(1,42:12974274,39979433:278532,337875,0
+(1,42:12974274,39979433:278532,337875,0
+x1,42:13252806,39979433
+)
+)
+)
+]
+(1,42:13285574,39773921:538215,490372,0
+(1,42:13285574,39773921:538215,490372,0
+x1,42:13823789,39773921
+)
+)
+[1,42:13823789,39979433:311300,507307,0
+(1,42:13823789,39472126:32768,0,54616
+h1,42:13823789,39472126:0,0,0
+h1,42:13823789,39472126:0,0,54616
+(1,42:13823789,39472126:0,0,0
+h1,42:13823789,39472126:0,0,0
+)
+)
+(1,42:13823789,39979433:311300,337875,0
+h1,42:13823789,39979433:0,0,0
+(1,42:13823789,39979433:278532,337875,0
+(1,42:13823789,39979433:278532,337875,0
+x1,42:14102321,39979433
+)
+)
+)
+]
+(1,42:14135089,39773921:717620,498346,0
+(1,42:14135089,39773921:717620,498346,0
+x1,42:14852709,39773921
+)
+)
+)
+g1,42:15012177,39773921
+x1,42:15570327,39773921
+g1,42:15729795,39773921
+h1,42:15729795,39773921:0,0,0
+(1,42:15729795,39773921:1255835,498346,0
+(1,42:15729795,39773921:1255835,498346,0
+x1,42:16985630,39773921
+)
+)
+$1,42:16985630,39773921
+k1,43:30229790,39773921:13244160
+g1,44:30229790,39773921
+)
+(1,44:6636830,40665211:23592960,498346,139537
+x1,44:7992336,40665211
+x1,43:10109315,40665211
+g1,43:10348521,40665211
+x1,43:12567164,40665211
+x1,43:12925974,40665211
+x1,43:13464188,40665211
+k1,44:30229790,40665211:16765602
+g1,44:30229790,40665211
+)
+(1,47:6636830,42523950:16580211,623900,267389
+g1,47:13649579,42523950
+(1,47:13649579,42523950:3739842,623900,267389
+k1,47:13716941,42523950:67362
+(1,47:13716941,42523950:0,623900,267389
+[1,47:13716941,42523950:0,623900,267389
+(1,21:13716941,42523950:0,623900,267389
+r1,47:13716941,42523950:0,891289,267389
+)
+]
+)
+(1,47:13716941,42523950:3672480,498346,205512
+$1,47:13716941,42523950
+(1,47:13716941,42523950:3672480,498346,205512
+h1,47:13716941,42523950:0,0,0
+(1,47:13716941,42523950:3672480,498346,205512
+(1,47:13716941,42523950:1028920,498346,205512
+(1,47:13716941,42523950:717620,498346,0
+x1,47:14434561,42523950
+)
+[1,47:14434561,42729462:311300,507307,0
+(1,47:14434561,42222155:32768,0,54616
+h1,47:14434561,42222155:0,0,0
+h1,47:14434561,42222155:0,0,54616
+h1,47:14434561,42222155:0,0,0
+)
+(1,47:14434561,42729462:311300,337875,0
+h1,47:14434561,42729462:0,0,0
+x1,47:14713093,42729462
+)
+]
+)
+g1,47:14905329,42523950
+x1,47:15463479,42523950
+g1,47:15622947,42523950
+h1,47:15622947,42523950:0,0,0
+(1,47:15622947,42523950:1766474,498346,205512
+(1,47:15622947,42523950:1455174,498346,0
+x1,47:17078121,42523950
+)
+[1,47:17078121,42729462:311300,507307,0
+(1,47:17078121,42222155:32768,0,54616
+h1,47:17078121,42222155:0,0,0
+h1,47:17078121,42222155:0,0,54616
+h1,47:17078121,42222155:0,0,0
+)
+(1,47:17078121,42729462:311300,337875,0
+h1,47:17078121,42729462:0,0,0
+x1,47:17356653,42729462
+)
+]
+)
+)
+)
+$1,47:17389421,42523950
+)
+)
+g1,47:17389421,42523950
+(1,47:17389421,42523950:5827620,623900,267389
+(1,47:17389421,42523950:5531523,618555,205512
+$1,47:17389421,42523950
+(1,47:17389421,42523950:5531523,618555,205512
+h1,47:17389421,42523950:0,0,0
+(1,47:17389421,42523950:5531523,618555,205512
+(1,47:17389421,42523950:1549563,478561,0
+h1,47:17389421,42523950:0,0,0
+g1,47:17588756,42523950
+(1,47:17588756,42523950:1150893,478561,0
+[1,47:17588756,42523950:1150893,478561,0
+(1,47:17588756,42117151:1150893,0,0
+k1,47:17758970,42117151:170214
+g1,47:18476591,42117151
+k1,47:18739649,42117151:170214
+)
+(1,47:17588756,42523950:1150893,263276,0
+$1,47:17588756,42523950
+(1,47:17588756,42523950:558150,0,0
+(1,47:17588756,42523950:558150,0,0
+$1,47:17588756,42523950
+(1,47:17588756,42523950:558150,418611,59802
+x1,47:18146906,42523950
+)
+$1,47:18146906,42523950
+)
+)
+(1,47:17885131,42523950:398682,0,0
+$1,47:17885131,42523950
+(1,47:17805397,42523950:558150,0,0
+(1,47:17805397,42523950:558150,0,0
+$1,47:17805397,42523950
+(1,47:17805397,42523950:558150,418611,59802
+x1,47:18363547,42523950
+)
+$1,47:18363547,42523950
+)
+)
+$1,47:18283813,42523950
+)
+x1,47:18739649,42523950
+$1,47:18739649,42523950
+)
+]
+)
+g1,47:18938984,42523950
+h1,47:18938984,42523950:0,0,0
+)
+(1,47:18938984,42523950:1921214,618555,205512
+(1,47:18938984,42523950:1455174,498346,0
+x1,47:20394158,42523950
+)
+[1,47:20394158,42729462:466040,824067,0
+(1,47:20394158,42222155:466040,316760,54616
+h1,47:20394158,42222155:0,0,0
+h1,47:20394158,42222155:0,0,54616
+(1,47:20394158,42222155:433272,316760,54616
+x1,47:20827430,42222155
+)
+)
+(1,47:20394158,42729462:311300,337875,0
+h1,47:20394158,42729462:0,0,0
+x1,47:20672690,42729462
+)
+]
+)
+g1,47:21019666,42523950
+x1,47:21577816,42523950
+g1,47:21737284,42523950
+h1,47:21737284,42523950:0,0,0
+(1,47:21737284,42523950:1183660,613059,177407
+(1,47:21737284,42523950:717620,498346,0
+x1,47:22454904,42523950
+)
+[1,47:22454904,42701357:466040,790466,0
+(1,47:22454904,42227651:466040,316760,54616
+h1,47:22454904,42227651:0,0,0
+h1,47:22454904,42227651:0,0,54616
+(1,47:22454904,42227651:433272,316760,54616
+x1,47:22888176,42227651
+)
+)
+(1,47:22454904,42701357:32768,0,0
+h1,47:22454904,42701357:0,0,0
+h1,47:22454904,42701357:0,0,0
+)
+]
+)
+)
+)
+$1,47:22920944,42523950
+)
+k1,47:23217041,42523950:296097
+)
+g1,47:30229790,42523950
+(1,47:30229790,42523950:-7012749,623900,267389
+)
+g1,47:23217041,42523950
+)
+(1,47:6636830,43611848:16580211,623900,267389
+g1,47:13649579,43611848
+(1,47:13649579,43611848:3739842,623900,267389
+g1,47:13649579,43611848
+(1,47:13649579,43611848:0,623900,267389
+[1,47:13649579,43611848:0,623900,267389
+(1,21:13649579,43611848:0,623900,267389
+r1,47:13649579,43611848:0,891289,267389
+)
+]
+)
+(1,47:13649579,43611848:3739842,613059,205512
+$1,47:13649579,43611848
+(1,47:13649579,43611848:3739842,613059,205512
+h1,47:13649579,43611848:0,0,0
+(1,47:13649579,43611848:3739842,613059,205512
+(1,47:13649579,43611848:1183660,613059,177407
+(1,47:13649579,43611848:717620,498346,0
+x1,47:14367199,43611848
+)
+[1,47:14367199,43789255:466040,790466,0
+(1,47:14367199,43315549:466040,316760,54616
+h1,47:14367199,43315549:0,0,0
+h1,47:14367199,43315549:0,0,54616
+(1,47:14367199,43315549:433272,316760,54616
+x1,47:14800471,43315549
+)
+)
+(1,47:14367199,43789255:32768,0,0
+h1,47:14367199,43789255:0,0,0
+h1,47:14367199,43789255:0,0,0
+)
+]
+)
+g1,47:14992707,43611848
+x1,47:15550857,43611848
+g1,47:15710325,43611848
+h1,47:15710325,43611848:0,0,0
+(1,47:15710325,43611848:1679096,490372,205512
+x1,47:16228606,43611848
+[1,47:16228606,43817360:311300,507307,0
+(1,47:16228606,43310053:32768,0,54616
+h1,47:16228606,43310053:0,0,0
+h1,47:16228606,43310053:0,0,54616
+h1,47:16228606,43310053:0,0,0
+)
+(1,47:16228606,43817360:311300,337875,0
+h1,47:16228606,43817360:0,0,0
+x1,47:16507138,43817360
+)
+]
+x1,47:17078121,43611848
+[1,47:17078121,43817360:311300,507307,0
+(1,47:17078121,43310053:32768,0,54616
+h1,47:17078121,43310053:0,0,0
+h1,47:17078121,43310053:0,0,54616
+h1,47:17078121,43310053:0,0,0
+)
+(1,47:17078121,43817360:311300,337875,0
+h1,47:17078121,43817360:0,0,0
+x1,47:17356653,43817360
+)
+]
+)
+)
+)
+$1,47:17389421,43611848
+)
+)
+g1,47:17389421,43611848
+(1,47:17389421,43611848:5827620,623900,267389
+(1,47:17389421,43611848:5827620,613059,205512
+$1,47:17389421,43611848
+(1,47:17389421,43611848:5827620,613059,205512
+h1,47:17389421,43611848:0,0,0
+(1,47:17389421,43611848:5827620,613059,205512
+(1,47:17389421,43611848:1549563,478561,0
+h1,47:17389421,43611848:0,0,0
+g1,47:17588756,43611848
+(1,47:17588756,43611848:1150893,478561,0
+[1,47:17588756,43611848:1150893,478561,0
+(1,47:17588756,43205049:1150893,0,0
+k1,47:17758970,43205049:170214
+g1,47:18476591,43205049
+k1,47:18739649,43205049:170214
+)
+(1,47:17588756,43611848:1150893,263276,0
+$1,47:17588756,43611848
+(1,47:17588756,43611848:558150,0,0
+(1,47:17588756,43611848:558150,0,0
+$1,47:17588756,43611848
+(1,47:17588756,43611848:558150,418611,59802
+x1,47:18146906,43611848
+)
+$1,47:18146906,43611848
+)
+)
+(1,47:17885131,43611848:398682,0,0
+$1,47:17885131,43611848
+(1,47:17805397,43611848:558150,0,0
+(1,47:17805397,43611848:558150,0,0
+$1,47:17805397,43611848
+(1,47:17805397,43611848:558150,418611,59802
+x1,47:18363547,43611848
+)
+$1,47:18363547,43611848
+)
+)
+$1,47:18283813,43611848
+)
+x1,47:18739649,43611848
+$1,47:18739649,43611848
+)
+]
+)
+g1,47:18938984,43611848
+h1,47:18938984,43611848:0,0,0
+)
+(1,47:18938984,43611848:2396716,498346,205512
+x1,47:19457265,43611848
+[1,47:19457265,43817360:311300,507307,0
+(1,47:19457265,43310053:32768,0,54616
+h1,47:19457265,43310053:0,0,0
+h1,47:19457265,43310053:0,0,54616
+h1,47:19457265,43310053:0,0,0
+)
+(1,47:19457265,43817360:311300,337875,0
+h1,47:19457265,43817360:0,0,0
+x1,47:19735797,43817360
+)
+]
+x1,47:20306780,43611848
+[1,47:20306780,43817360:311300,507307,0
+(1,47:20306780,43310053:32768,0,54616
+h1,47:20306780,43310053:0,0,0
+h1,47:20306780,43310053:0,0,54616
+h1,47:20306780,43310053:0,0,0
+)
+(1,47:20306780,43817360:311300,337875,0
+h1,47:20306780,43817360:0,0,0
+x1,47:20585312,43817360
+)
+]
+(1,47:20618080,43611848:717620,498346,0
+x1,47:21335700,43611848
+)
+)
+g1,47:21495168,43611848
+x1,47:22053318,43611848
+g1,47:22212786,43611848
+h1,47:22212786,43611848:0,0,0
+(1,47:22212786,43611848:1004255,613059,177407
+x1,47:22751001,43611848
+[1,47:22751001,43789255:466040,790466,0
+(1,47:22751001,43315549:466040,316760,54616
+h1,47:22751001,43315549:0,0,0
+h1,47:22751001,43315549:0,0,54616
+(1,47:22751001,43315549:433272,316760,54616
+x1,47:23184273,43315549
+)
+)
+(1,47:22751001,43789255:32768,0,0
+h1,47:22751001,43789255:0,0,0
+h1,47:22751001,43789255:0,0,0
+)
+]
+)
+)
+)
+$1,47:23217041,43611848
+)
+g1,47:23217041,43611848
+)
+g1,47:30229790,43611848
+(1,47:30229790,43611848:-7012749,623900,267389
+)
+g1,47:23217041,43611848
+)
+]
+(1,53:6636830,45679049:23592960,462465,0
+(1,53:6636830,45679049:23592960,462465,0
+k1,53:18253905,45679049:11617075
+x1,53:18612715,45679049
+k1,53:30229790,45679049:11617075
+)
+)
+]
+]
+!33453
+}5
+!10
+{6
+[1,88:4736286,45679049:30050495,40942763,0
+[1,88:9979166,45679049:24807615,39369899,0
+[1,88:9979166,7095582:23592960,786432,0
+(1,88:9979166,7095582:23592960,490372,0
+(1,88:9979166,7095582:23592960,490372,0
+x1,88:10337976,7095582
+k1,88:20625066,7095582:10287090
+x1,88:22179911,7095582
+g1,88:22419117,7095582
+x1,88:22977266,7095582
+g1,88:23296207,7095582
+g1,88:23535413,7095582
+x1,88:26306224,7095582
+g1,88:26545430,7095582
+x1,88:28508918,7095582
+x1,88:28987330,7095582
+x1,88:29645148,7095582
+x1,88:30103627,7095582
+g1,88:30342833,7095582
+x1,88:33572126,7095582
+)
+)
+]
+[1,88:9979166,43879237:24807615,35481206,0
+(1,49:9979166,9118927:23592960,623900,267389
+r1,49:9979166,9118927:0,891289,267389
+x1,49:12911518,9118927
+g1,49:13186603,9118927
+x1,49:15575263,9118927
+g1,49:15850348,9118927
+x1,49:16369622,9118927
+x1,49:18589244,9118927
+x1,49:20824913,9118927
+r1,49:20824913,9118927:0,891289,267389
+k1,49:33572126,9118927:12747213
+g1,49:33572126,9118927
+)
+(1,52:9979166,10861364:23592960,946051,205512
+$1,50:9979166,10861364
+(1,50:9979166,10861364:1679096,490372,205512
+(1,50:9979166,10861364:518281,490372,0
+(1,50:9979166,10861364:518281,490372,0
+x1,50:10497447,10861364
+)
+)
+[1,50:10497447,11066876:311300,507307,0
+(1,50:10497447,10559569:32768,0,54616
+h1,50:10497447,10559569:0,0,0
+h1,50:10497447,10559569:0,0,54616
+(1,50:10497447,10559569:0,0,0
+h1,50:10497447,10559569:0,0,0
+)
+)
+(1,50:10497447,11066876:311300,337875,0
+h1,50:10497447,11066876:0,0,0
+(1,50:10497447,11066876:278532,337875,0
+(1,50:10497447,11066876:278532,337875,0
+x1,50:10775979,11066876
+)
+)
+)
+]
+(1,50:10808747,10861364:538215,490372,0
+(1,50:10808747,10861364:538215,490372,0
+x1,50:11346962,10861364
+)
+)
+[1,50:11346962,11066876:311300,507307,0
+(1,50:11346962,10559569:32768,0,54616
+h1,50:11346962,10559569:0,0,0
+h1,50:11346962,10559569:0,0,54616
+(1,50:11346962,10559569:0,0,0
+h1,50:11346962,10559569:0,0,0
+)
+)
+(1,50:11346962,11066876:311300,337875,0
+h1,50:11346962,11066876:0,0,0
+(1,50:11346962,11066876:278532,337875,0
+(1,50:11346962,11066876:278532,337875,0
+x1,50:11625494,11066876
+)
+)
+)
+]
+)
+g1,50:11817730,10861364
+x1,50:12375880,10861364
+g1,50:12535348,10861364
+h1,50:12535348,10861364:0,0,0
+(1,50:12535348,10861364:2085416,498346,205512
+(1,50:12535348,10861364:1056496,490372,0
+(1,50:12535348,10861364:1056496,490372,0
+x1,50:13591844,10861364
+)
+)
+[1,50:13591844,11066876:311300,507307,0
+(1,50:13591844,10559569:32768,0,54616
+h1,50:13591844,10559569:0,0,0
+h1,50:13591844,10559569:0,0,54616
+(1,50:13591844,10559569:0,0,0
+h1,50:13591844,10559569:0,0,0
+)
+)
+(1,50:13591844,11066876:311300,337875,0
+h1,50:13591844,11066876:0,0,0
+(1,50:13591844,11066876:278532,337875,0
+(1,50:13591844,11066876:278532,337875,0
+x1,50:13870376,11066876
+)
+)
+)
+]
+(1,50:13903144,10861364:717620,498346,0
+(1,50:13903144,10861364:717620,498346,0
+x1,50:14620764,10861364
+)
+)
+)
+(1,50:14620764,10861364:2234061,946051,0
+h1,50:14620764,10861364:0,0,0
+g1,50:14820099,10861364
+(1,50:14820099,10861364:1835391,946051,0
+[1,50:14820099,10861364:1835391,946051,0
+(1,50:14820099,10351164:1835391,364089,167189
+k1,50:14990313,10351164:170214
+(1,50:14990313,10351164:1402119,364089,167189
+(1,50:14990313,10351164:1129056,364089,0
+(1,50:14990313,10351164:1129056,364089,0
+x1,50:16119369,10351164
+)
+)
+[1,50:16119369,10518353:273063,402389,0
+(1,50:16119369,10115964:32768,0,54612
+h1,50:16119369,10115964:0,0,0
+h1,50:16119369,10115964:0,0,54612
+(1,50:16119369,10115964:0,0,0
+h1,50:16119369,10115964:0,0,0
+)
+)
+(1,50:16119369,10518353:273063,253405,0
+h1,50:16119369,10518353:0,0,0
+(1,50:16119369,10518353:240295,253405,0
+(1,50:16119369,10518353:240295,253405,0
+x1,50:16359664,10518353
+)
+)
+)
+]
+)
+k1,50:16655490,10351164:170214
+)
+(1,50:14820099,10861364:1835391,263276,0
+$1,50:14820099,10861364
+(1,50:14820099,10861364:558150,0,0
+(1,50:14820099,10861364:558150,0,0
+$1,50:14820099,10861364
+(1,50:14820099,10861364:558150,418611,59802
+x1,50:15378249,10861364
+)
+$1,50:15378249,10861364
+)
+)
+(1,50:15259382,10861364:398682,0,0
+$1,50:15259382,10861364
+(1,50:15179648,10861364:558150,0,0
+(1,50:15179648,10861364:558150,0,0
+$1,50:15179648,10861364
+(1,50:15179648,10861364:558150,418611,59802
+x1,50:15737798,10861364
+)
+$1,50:15737798,10861364
+)
+)
+$1,50:15658064,10861364
+)
+(1,50:15658064,10861364:398682,0,0
+(1,50:15578330,10861364:558150,0,0
+(1,50:15578330,10861364:558150,0,0
+(1,50:15578330,10861364:558150,418611,59802
+x1,50:16136480,10861364
+)
+)
+)
+)
+x1,50:16655490,10861364
+$1,50:16655490,10861364
+)
+]
+)
+g1,50:16854825,10861364
+h1,50:16854825,10861364:0,0,0
+h1,50:16854825,10861364:0,0,0
+)
+(1,50:16854825,10861364:3046892,490372,205512
+(1,50:16854825,10861364:518281,490372,0
+(1,50:16854825,10861364:518281,490372,0
+x1,50:17373106,10861364
+)
+)
+[1,50:17373106,11066876:311300,507307,0
+(1,50:17373106,10559569:32768,0,54616
+h1,50:17373106,10559569:0,0,0
+h1,50:17373106,10559569:0,0,54616
+(1,50:17373106,10559569:0,0,0
+h1,50:17373106,10559569:0,0,0
+)
+)
+(1,50:17373106,11066876:311300,337875,0
+h1,50:17373106,11066876:0,0,0
+(1,50:17373106,11066876:278532,337875,0
+(1,50:17373106,11066876:278532,337875,0
+x1,50:17651638,11066876
+)
+)
+)
+]
+(1,50:17684406,10861364:538215,490372,0
+(1,50:17684406,10861364:538215,490372,0
+x1,50:18222621,10861364
+)
+)
+[1,50:18222621,11066876:311300,507307,0
+(1,50:18222621,10559569:32768,0,54616
+h1,50:18222621,10559569:0,0,0
+h1,50:18222621,10559569:0,0,54616
+(1,50:18222621,10559569:0,0,0
+h1,50:18222621,10559569:0,0,0
+)
+)
+(1,50:18222621,11066876:311300,337875,0
+h1,50:18222621,11066876:0,0,0
+(1,50:18222621,11066876:278532,337875,0
+(1,50:18222621,11066876:278532,337875,0
+x1,50:18501153,11066876
+)
+)
+)
+]
+(1,50:18533921,10861364:1056496,490372,0
+(1,50:18533921,10861364:1056496,490372,0
+x1,50:19590417,10861364
+)
+)
+[1,50:19590417,11066876:311300,507307,0
+(1,50:19590417,10559569:32768,0,54616
+h1,50:19590417,10559569:0,0,0
+h1,50:19590417,10559569:0,0,54616
+(1,50:19590417,10559569:0,0,0
+h1,50:19590417,10559569:0,0,0
+)
+)
+(1,50:19590417,11066876:311300,337875,0
+h1,50:19590417,11066876:0,0,0
+(1,50:19590417,11066876:278532,337875,0
+(1,50:19590417,11066876:278532,337875,0
+x1,50:19868949,11066876
+)
+)
+)
+]
+)
+g1,50:20061185,10861364
+x1,50:20619335,10861364
+g1,50:20778803,10861364
+h1,50:20778803,10861364:0,0,0
+(1,50:20778803,10861364:1255835,498346,0
+(1,50:20778803,10861364:1255835,498346,0
+x1,50:22034638,10861364
+)
+)
+$1,50:22034638,10861364
+k1,51:33572126,10861364:11537488
+g1,52:33572126,10861364
+)
+(1,52:9979166,11752654:23592960,498346,139537
+x1,52:11334672,11752654
+x1,51:13451651,11752654
+g1,51:13690857,11752654
+x1,51:15909500,11752654
+x1,51:16268310,11752654
+x1,51:16607185,11752654
+g1,51:16846391,11752654
+x1,51:18522832,11752654
+g1,51:18762038,11752654
+x1,51:20994634,11752654
+g1,51:21233840,11752654
+x1,51:23053805,11752654
+g1,51:23293011,11752654
+x1,51:26526288,11752654
+g1,51:26765494,11752654
+x1,51:27363511,11752654
+g1,51:27602717,11752654
+x1,51:29081812,11752654
+k1,52:33572126,11752654:4490314
+g1,52:33572126,11752654
+)
+(1,53:9979166,13618226:23592960,623900,267389
+r1,53:9979166,13618226:0,891289,267389
+x1,53:12343008,13618226
+g1,53:12618093,13618226
+x1,53:13137367,13618226
+x1,53:15356989,13618226
+x1,53:17592658,13618226
+r1,53:17592658,13618226:0,891289,267389
+k1,53:33572126,13618226:15979468
+g1,53:33572126,13618226
+)
+(1,55:9979166,15360663:23592960,946051,205512
+$1,54:9979166,15360663
+(1,54:9979166,15360663:1679096,490372,205512
+(1,54:9979166,15360663:518281,490372,0
+(1,54:9979166,15360663:518281,490372,0
+x1,54:10497447,15360663
+)
+)
+[1,54:10497447,15566175:311300,507307,0
+(1,54:10497447,15058868:32768,0,54616
+h1,54:10497447,15058868:0,0,0
+h1,54:10497447,15058868:0,0,54616
+(1,54:10497447,15058868:0,0,0
+h1,54:10497447,15058868:0,0,0
+)
+)
+(1,54:10497447,15566175:311300,337875,0
+h1,54:10497447,15566175:0,0,0
+(1,54:10497447,15566175:278532,337875,0
+(1,54:10497447,15566175:278532,337875,0
+x1,54:10775979,15566175
+)
+)
+)
+]
+(1,54:10808747,15360663:538215,490372,0
+(1,54:10808747,15360663:538215,490372,0
+x1,54:11346962,15360663
+)
+)
+[1,54:11346962,15566175:311300,507307,0
+(1,54:11346962,15058868:32768,0,54616
+h1,54:11346962,15058868:0,0,0
+h1,54:11346962,15058868:0,0,54616
+(1,54:11346962,15058868:0,0,0
+h1,54:11346962,15058868:0,0,0
+)
+)
+(1,54:11346962,15566175:311300,337875,0
+h1,54:11346962,15566175:0,0,0
+(1,54:11346962,15566175:278532,337875,0
+(1,54:11346962,15566175:278532,337875,0
+x1,54:11625494,15566175
+)
+)
+)
+]
+)
+g1,54:11817730,15360663
+x1,54:12375880,15360663
+g1,54:12535348,15360663
+h1,54:12535348,15360663:0,0,0
+(1,54:12535348,15360663:3161847,498346,205512
+(1,54:12535348,15360663:1056496,490372,0
+(1,54:12535348,15360663:1056496,490372,0
+x1,54:13591844,15360663
+)
+)
+[1,54:13591844,15566175:311300,507307,0
+(1,54:13591844,15058868:32768,0,54616
+h1,54:13591844,15058868:0,0,0
+h1,54:13591844,15058868:0,0,54616
+(1,54:13591844,15058868:0,0,0
+h1,54:13591844,15058868:0,0,0
+)
+)
+(1,54:13591844,15566175:311300,337875,0
+h1,54:13591844,15566175:0,0,0
+(1,54:13591844,15566175:278532,337875,0
+(1,54:13591844,15566175:278532,337875,0
+x1,54:13870376,15566175
+)
+)
+)
+]
+(1,54:13903144,15360663:1794051,498346,0
+(1,54:13903144,15360663:1794051,498346,0
+x1,54:15697195,15360663
+)
+)
+)
+(1,54:15697195,15360663:2234061,946051,0
+h1,54:15697195,15360663:0,0,0
+g1,54:15896530,15360663
+(1,54:15896530,15360663:1835391,946051,0
+[1,54:15896530,15360663:1835391,946051,0
+(1,54:15896530,14850463:1835391,364089,167189
+k1,54:16066744,14850463:170214
+(1,54:16066744,14850463:1402119,364089,167189
+(1,54:16066744,14850463:1129056,364089,0
+(1,54:16066744,14850463:1129056,364089,0
+x1,54:17195800,14850463
+)
+)
+[1,54:17195800,15017652:273063,402389,0
+(1,54:17195800,14615263:32768,0,54612
+h1,54:17195800,14615263:0,0,0
+h1,54:17195800,14615263:0,0,54612
+(1,54:17195800,14615263:0,0,0
+h1,54:17195800,14615263:0,0,0
+)
+)
+(1,54:17195800,15017652:273063,253405,0
+h1,54:17195800,15017652:0,0,0
+(1,54:17195800,15017652:240295,253405,0
+(1,54:17195800,15017652:240295,253405,0
+x1,54:17436095,15017652
+)
+)
+)
+]
+)
+k1,54:17731921,14850463:170214
+)
+(1,54:15896530,15360663:1835391,263276,0
+$1,54:15896530,15360663
+(1,54:15896530,15360663:558150,0,0
+(1,54:15896530,15360663:558150,0,0
+$1,54:15896530,15360663
+(1,54:15896530,15360663:558150,418611,59802
+x1,54:16454680,15360663
+)
+$1,54:16454680,15360663
+)
+)
+(1,54:16335813,15360663:398682,0,0
+$1,54:16335813,15360663
+(1,54:16256079,15360663:558150,0,0
+(1,54:16256079,15360663:558150,0,0
+$1,54:16256079,15360663
+(1,54:16256079,15360663:558150,418611,59802
+x1,54:16814229,15360663
+)
+$1,54:16814229,15360663
+)
+)
+$1,54:16734495,15360663
+)
+(1,54:16734495,15360663:398682,0,0
+(1,54:16654761,15360663:558150,0,0
+(1,54:16654761,15360663:558150,0,0
+(1,54:16654761,15360663:558150,418611,59802
+x1,54:17212911,15360663
+)
+)
+)
+)
+x1,54:17731921,15360663
+$1,54:17731921,15360663
+)
+]
+)
+g1,54:17931256,15360663
+h1,54:17931256,15360663:0,0,0
+h1,54:17931256,15360663:0,0,0
+)
+g1,54:18090724,15360663
+x1,54:18648874,15360663
+g1,54:18808342,15360663
+h1,54:18808342,15360663:0,0,0
+(1,54:18808342,15360663:4123323,490372,205512
+(1,54:18808342,15360663:518281,490372,0
+(1,54:18808342,15360663:518281,490372,0
+x1,54:19326623,15360663
+)
+)
+[1,54:19326623,15566175:311300,507307,0
+(1,54:19326623,15058868:32768,0,54616
+h1,54:19326623,15058868:0,0,0
+h1,54:19326623,15058868:0,0,54616
+(1,54:19326623,15058868:0,0,0
+h1,54:19326623,15058868:0,0,0
+)
+)
+(1,54:19326623,15566175:311300,337875,0
+h1,54:19326623,15566175:0,0,0
+(1,54:19326623,15566175:278532,337875,0
+(1,54:19326623,15566175:278532,337875,0
+x1,54:19605155,15566175
+)
+)
+)
+]
+(1,54:19637923,15360663:538215,490372,0
+(1,54:19637923,15360663:538215,490372,0
+x1,54:20176138,15360663
+)
+)
+[1,54:20176138,15566175:311300,507307,0
+(1,54:20176138,15058868:32768,0,54616
+h1,54:20176138,15058868:0,0,0
+h1,54:20176138,15058868:0,0,54616
+(1,54:20176138,15058868:0,0,0
+h1,54:20176138,15058868:0,0,0
+)
+)
+(1,54:20176138,15566175:311300,337875,0
+h1,54:20176138,15566175:0,0,0
+(1,54:20176138,15566175:278532,337875,0
+(1,54:20176138,15566175:278532,337875,0
+x1,54:20454670,15566175
+)
+)
+)
+]
+(1,54:20487438,15360663:2132927,490372,0
+(1,54:20487438,15360663:2132927,490372,0
+x1,54:22620365,15360663
+)
+)
+[1,54:22620365,15566175:311300,507307,0
+(1,54:22620365,15058868:32768,0,54616
+h1,54:22620365,15058868:0,0,0
+h1,54:22620365,15058868:0,0,54616
+(1,54:22620365,15058868:0,0,0
+h1,54:22620365,15058868:0,0,0
+)
+)
+(1,54:22620365,15566175:311300,337875,0
+h1,54:22620365,15566175:0,0,0
+(1,54:22620365,15566175:278532,337875,0
+(1,54:22620365,15566175:278532,337875,0
+x1,54:22898897,15566175
+)
+)
+)
+]
+)
+g1,54:23091133,15360663
+x1,54:23649283,15360663
+g1,54:23808751,15360663
+h1,54:23808751,15360663:0,0,0
+(1,54:23808751,15360663:1255835,498346,0
+(1,54:23808751,15360663:1255835,498346,0
+x1,54:25064586,15360663
+)
+)
+$1,54:25064586,15360663
+k1,55:33572126,15360663:8507540
+g1,55:33572126,15360663
+)
+(1,56:9979166,17226236:23592960,623900,267389
+r1,56:9979166,17226236:0,891289,267389
+x1,56:12470984,17226236
+r1,56:12470984,17226236:0,891289,267389
+k1,56:33572126,17226236:21101142
+g1,56:33572126,17226236
+)
+(1,58:9979166,18962847:23592960,940225,205512
+$1,57:9979166,18962847
+(1,57:9979166,18962847:1679096,490372,205512
+(1,57:9979166,18962847:518281,490372,0
+(1,57:9979166,18962847:518281,490372,0
+x1,57:10497447,18962847
+)
+)
+[1,57:10497447,19168359:311300,507307,0
+(1,57:10497447,18661052:32768,0,54616
+h1,57:10497447,18661052:0,0,0
+h1,57:10497447,18661052:0,0,54616
+(1,57:10497447,18661052:0,0,0
+h1,57:10497447,18661052:0,0,0
+)
+)
+(1,57:10497447,19168359:311300,337875,0
+h1,57:10497447,19168359:0,0,0
+(1,57:10497447,19168359:278532,337875,0
+(1,57:10497447,19168359:278532,337875,0
+x1,57:10775979,19168359
+)
+)
+)
+]
+(1,57:10808747,18962847:538215,490372,0
+(1,57:10808747,18962847:538215,490372,0
+x1,57:11346962,18962847
+)
+)
+[1,57:11346962,19168359:311300,507307,0
+(1,57:11346962,18661052:32768,0,54616
+h1,57:11346962,18661052:0,0,0
+h1,57:11346962,18661052:0,0,54616
+(1,57:11346962,18661052:0,0,0
+h1,57:11346962,18661052:0,0,0
+)
+)
+(1,57:11346962,19168359:311300,337875,0
+h1,57:11346962,19168359:0,0,0
+(1,57:11346962,19168359:278532,337875,0
+(1,57:11346962,19168359:278532,337875,0
+x1,57:11625494,19168359
+)
+)
+)
+]
+)
+g1,57:11817730,18962847
+x1,57:12375880,18962847
+g1,57:12535348,18962847
+h1,57:12535348,18962847:0,0,0
+(1,57:12535348,18962847:1945880,490372,205512
+(1,57:12535348,18962847:1634580,490372,0
+(1,57:12535348,18962847:1634580,490372,0
+x1,57:14169928,18962847
+)
+)
+[1,57:14169928,19168359:311300,507307,0
+(1,57:14169928,18661052:32768,0,54616
+h1,57:14169928,18661052:0,0,0
+h1,57:14169928,18661052:0,0,54616
+(1,57:14169928,18661052:0,0,0
+h1,57:14169928,18661052:0,0,0
+)
+)
+(1,57:14169928,19168359:311300,337875,0
+h1,57:14169928,19168359:0,0,0
+(1,57:14169928,19168359:278532,337875,0
+(1,57:14169928,19168359:278532,337875,0
+x1,57:14448460,19168359
+)
+)
+)
+]
+)
+(1,57:14481228,18962847:2538072,940225,0
+h1,57:14481228,18962847:0,0,0
+g1,57:14680563,18962847
+(1,57:14680563,18962847:2139402,940225,0
+[1,57:14680563,18962847:2139402,940225,0
+(1,57:14680563,18452647:2139402,358263,167189
+k1,57:14850777,18452647:170214
+(1,57:14850777,18452647:1706130,358263,167189
+(1,57:14850777,18452647:417252,358263,0
+(1,57:14850777,18452647:417252,358263,0
+x1,57:15268029,18452647
+)
+)
+[1,57:15268029,18619836:273063,402389,0
+(1,57:15268029,18217447:32768,0,54612
+h1,57:15268029,18217447:0,0,0
+h1,57:15268029,18217447:0,0,54612
+(1,57:15268029,18217447:0,0,0
+h1,57:15268029,18217447:0,0,0
+)
+)
+(1,57:15268029,18619836:273063,253405,0
+h1,57:15268029,18619836:0,0,0
+(1,57:15268029,18619836:240295,253405,0
+(1,57:15268029,18619836:240295,253405,0
+x1,57:15508324,18619836
+)
+)
+)
+]
+(1,57:15541092,18452647:742752,358263,0
+(1,57:15541092,18452647:742752,358263,0
+x1,57:16283844,18452647
+)
+)
+[1,57:16283844,18619836:273063,402389,0
+(1,57:16283844,18217447:32768,0,54612
+h1,57:16283844,18217447:0,0,0
+h1,57:16283844,18217447:0,0,54612
+(1,57:16283844,18217447:0,0,0
+h1,57:16283844,18217447:0,0,0
+)
+)
+(1,57:16283844,18619836:273063,253405,0
+h1,57:16283844,18619836:0,0,0
+(1,57:16283844,18619836:240295,253405,0
+(1,57:16283844,18619836:240295,253405,0
+x1,57:16524139,18619836
+)
+)
+)
+]
+)
+k1,57:16819965,18452647:170214
+)
+(1,57:14680563,18962847:2139402,263276,0
+$1,57:14680563,18962847
+(1,57:14680563,18962847:558150,0,0
+(1,57:14680563,18962847:558150,0,0
+$1,57:14680563,18962847
+(1,57:14680563,18962847:558150,418611,59802
+x1,57:15238713,18962847
+)
+$1,57:15238713,18962847
+)
+)
+(1,57:15072510,18962847:398682,0,0
+$1,57:15072510,18962847
+(1,57:14992776,18962847:558150,0,0
+(1,57:14992776,18962847:558150,0,0
+$1,57:14992776,18962847
+(1,57:14992776,18962847:558150,418611,59802
+x1,57:15550926,18962847
+)
+$1,57:15550926,18962847
+)
+)
+$1,57:15471192,18962847
+)
+(1,57:15471192,18962847:398682,0,0
+(1,57:15391458,18962847:558150,0,0
+(1,57:15391458,18962847:558150,0,0
+(1,57:15391458,18962847:558150,418611,59802
+x1,57:15949608,18962847
+)
+)
+)
+)
+(1,57:15869874,18962847:398682,0,0
+(1,57:15790140,18962847:558150,0,0
+(1,57:15790140,18962847:558150,0,0
+(1,57:15790140,18962847:558150,418611,59802
+x1,57:16348290,18962847
+)
+)
+)
+)
+x1,57:16819965,18962847
+$1,57:16819965,18962847
+)
+]
+)
+g1,57:17019300,18962847
+h1,57:17019300,18962847:0,0,0
+h1,57:17019300,18962847:0,0,0
+)
+(1,57:17019300,18962847:3086761,490372,205512
+(1,57:17019300,18962847:518281,490372,0
+(1,57:17019300,18962847:518281,490372,0
+x1,57:17537581,18962847
+)
+)
+[1,57:17537581,19168359:311300,507307,0
+(1,57:17537581,18661052:32768,0,54616
+h1,57:17537581,18661052:0,0,0
+h1,57:17537581,18661052:0,0,54616
+(1,57:17537581,18661052:0,0,0
+h1,57:17537581,18661052:0,0,0
+)
+)
+(1,57:17537581,19168359:311300,337875,0
+h1,57:17537581,19168359:0,0,0
+(1,57:17537581,19168359:278532,337875,0
+(1,57:17537581,19168359:278532,337875,0
+x1,57:17816113,19168359
+)
+)
+)
+]
+(1,57:17848881,18962847:538215,490372,0
+(1,57:17848881,18962847:538215,490372,0
+x1,57:18387096,18962847
+)
+)
+[1,57:18387096,19168359:311300,507307,0
+(1,57:18387096,18661052:32768,0,54616
+h1,57:18387096,18661052:0,0,0
+h1,57:18387096,18661052:0,0,54616
+(1,57:18387096,18661052:0,0,0
+h1,57:18387096,18661052:0,0,0
+)
+)
+(1,57:18387096,19168359:311300,337875,0
+h1,57:18387096,19168359:0,0,0
+(1,57:18387096,19168359:278532,337875,0
+(1,57:18387096,19168359:278532,337875,0
+x1,57:18665628,19168359
+)
+)
+)
+]
+(1,57:18698396,18962847:1096365,490372,0
+(1,57:18698396,18962847:1096365,490372,0
+x1,57:19794761,18962847
+)
+)
+[1,57:19794761,19168359:311300,507307,0
+(1,57:19794761,18661052:32768,0,54616
+h1,57:19794761,18661052:0,0,0
+h1,57:19794761,18661052:0,0,54616
+(1,57:19794761,18661052:0,0,0
+h1,57:19794761,18661052:0,0,0
+)
+)
+(1,57:19794761,19168359:311300,337875,0
+h1,57:19794761,19168359:0,0,0
+(1,57:19794761,19168359:278532,337875,0
+(1,57:19794761,19168359:278532,337875,0
+x1,57:20073293,19168359
+)
+)
+)
+]
+)
+g1,57:20265529,18962847
+x1,57:20823679,18962847
+g1,57:20983147,18962847
+h1,57:20983147,18962847:0,0,0
+(1,57:20983147,18962847:1407665,490372,205512
+(1,57:20983147,18962847:538215,490372,0
+(1,57:20983147,18962847:538215,490372,0
+x1,57:21521362,18962847
+)
+)
+[1,57:21521362,19168359:311300,507307,0
+(1,57:21521362,18661052:32768,0,54616
+h1,57:21521362,18661052:0,0,0
+h1,57:21521362,18661052:0,0,54616
+(1,57:21521362,18661052:0,0,0
+h1,57:21521362,18661052:0,0,0
+)
+)
+(1,57:21521362,19168359:311300,337875,0
+h1,57:21521362,19168359:0,0,0
+(1,57:21521362,19168359:278532,337875,0
+(1,57:21521362,19168359:278532,337875,0
+x1,57:21799894,19168359
+)
+)
+)
+]
+(1,57:21832662,18962847:558150,490372,0
+(1,57:21832662,18962847:558150,490372,0
+x1,57:22390812,18962847
+)
+)
+)
+$1,57:22390812,18962847
+k1,58:33572126,18962847:11181314
+g1,58:33572126,18962847
+)
+(1,59:9979166,20828419:23592960,623900,267389
+r1,59:9979166,20828419:0,891289,267389
+x1,59:13204544,20828419
+r1,59:13204544,20828419:0,891289,267389
+k1,59:33572126,20828419:20367582
+g1,59:33572126,20828419
+)
+(1,61:9979166,22565030:23592960,940225,205512
+$1,60:9979166,22565030
+(1,60:9979166,22565030:1679096,490372,205512
+(1,60:9979166,22565030:518281,490372,0
+(1,60:9979166,22565030:518281,490372,0
+x1,60:10497447,22565030
+)
+)
+[1,60:10497447,22770542:311300,507307,0
+(1,60:10497447,22263235:32768,0,54616
+h1,60:10497447,22263235:0,0,0
+h1,60:10497447,22263235:0,0,54616
+(1,60:10497447,22263235:0,0,0
+h1,60:10497447,22263235:0,0,0
+)
+)
+(1,60:10497447,22770542:311300,337875,0
+h1,60:10497447,22770542:0,0,0
+(1,60:10497447,22770542:278532,337875,0
+(1,60:10497447,22770542:278532,337875,0
+x1,60:10775979,22770542
+)
+)
+)
+]
+(1,60:10808747,22565030:538215,490372,0
+(1,60:10808747,22565030:538215,490372,0
+x1,60:11346962,22565030
+)
+)
+[1,60:11346962,22770542:311300,507307,0
+(1,60:11346962,22263235:32768,0,54616
+h1,60:11346962,22263235:0,0,0
+h1,60:11346962,22263235:0,0,54616
+(1,60:11346962,22263235:0,0,0
+h1,60:11346962,22263235:0,0,0
+)
+)
+(1,60:11346962,22770542:311300,337875,0
+h1,60:11346962,22770542:0,0,0
+(1,60:11346962,22770542:278532,337875,0
+(1,60:11346962,22770542:278532,337875,0
+x1,60:11625494,22770542
+)
+)
+)
+]
+)
+g1,60:11817730,22565030
+x1,60:12375880,22565030
+g1,60:12535348,22565030
+h1,60:12535348,22565030:0,0,0
+(1,60:12535348,22565030:2117643,490372,205512
+(1,60:12535348,22565030:538215,490372,0
+(1,60:12535348,22565030:538215,490372,0
+x1,60:13073563,22565030
+)
+)
+[1,60:13073563,22770542:311300,507307,0
+(1,60:13073563,22263235:32768,0,54616
+h1,60:13073563,22263235:0,0,0
+h1,60:13073563,22263235:0,0,54616
+(1,60:13073563,22263235:0,0,0
+h1,60:13073563,22263235:0,0,0
+)
+)
+(1,60:13073563,22770542:311300,337875,0
+h1,60:13073563,22770542:0,0,0
+(1,60:13073563,22770542:278532,337875,0
+(1,60:13073563,22770542:278532,337875,0
+x1,60:13352095,22770542
+)
+)
+)
+]
+(1,60:13384863,22565030:956828,490372,0
+(1,60:13384863,22565030:956828,490372,0
+x1,60:14341691,22565030
+)
+)
+[1,60:14341691,22770542:311300,507307,0
+(1,60:14341691,22263235:32768,0,54616
+h1,60:14341691,22263235:0,0,0
+h1,60:14341691,22263235:0,0,54616
+(1,60:14341691,22263235:0,0,0
+h1,60:14341691,22263235:0,0,0
+)
+)
+(1,60:14341691,22770542:311300,337875,0
+h1,60:14341691,22770542:0,0,0
+(1,60:14341691,22770542:278532,337875,0
+(1,60:14341691,22770542:278532,337875,0
+x1,60:14620223,22770542
+)
+)
+)
+]
+)
+(1,60:14652991,22565030:2538072,940225,0
+h1,60:14652991,22565030:0,0,0
+g1,60:14852326,22565030
+(1,60:14852326,22565030:2139402,940225,0
+[1,60:14852326,22565030:2139402,940225,0
+(1,60:14852326,22054830:2139402,358263,167189
+k1,60:15022540,22054830:170214
+(1,60:15022540,22054830:1706130,358263,167189
+(1,60:15022540,22054830:417252,358263,0
+(1,60:15022540,22054830:417252,358263,0
+x1,60:15439792,22054830
+)
+)
+[1,60:15439792,22222019:273063,402389,0
+(1,60:15439792,21819630:32768,0,54612
+h1,60:15439792,21819630:0,0,0
+h1,60:15439792,21819630:0,0,54612
+(1,60:15439792,21819630:0,0,0
+h1,60:15439792,21819630:0,0,0
+)
+)
+(1,60:15439792,22222019:273063,253405,0
+h1,60:15439792,22222019:0,0,0
+(1,60:15439792,22222019:240295,253405,0
+(1,60:15439792,22222019:240295,253405,0
+x1,60:15680087,22222019
+)
+)
+)
+]
+(1,60:15712855,22054830:742752,358263,0
+(1,60:15712855,22054830:742752,358263,0
+x1,60:16455607,22054830
+)
+)
+[1,60:16455607,22222019:273063,402389,0
+(1,60:16455607,21819630:32768,0,54612
+h1,60:16455607,21819630:0,0,0
+h1,60:16455607,21819630:0,0,54612
+(1,60:16455607,21819630:0,0,0
+h1,60:16455607,21819630:0,0,0
+)
+)
+(1,60:16455607,22222019:273063,253405,0
+h1,60:16455607,22222019:0,0,0
+(1,60:16455607,22222019:240295,253405,0
+(1,60:16455607,22222019:240295,253405,0
+x1,60:16695902,22222019
+)
+)
+)
+]
+)
+k1,60:16991728,22054830:170214
+)
+(1,60:14852326,22565030:2139402,263276,0
+$1,60:14852326,22565030
+(1,60:14852326,22565030:558150,0,0
+(1,60:14852326,22565030:558150,0,0
+$1,60:14852326,22565030
+(1,60:14852326,22565030:558150,418611,59802
+x1,60:15410476,22565030
+)
+$1,60:15410476,22565030
+)
+)
+(1,60:15244273,22565030:398682,0,0
+$1,60:15244273,22565030
+(1,60:15164539,22565030:558150,0,0
+(1,60:15164539,22565030:558150,0,0
+$1,60:15164539,22565030
+(1,60:15164539,22565030:558150,418611,59802
+x1,60:15722689,22565030
+)
+$1,60:15722689,22565030
+)
+)
+$1,60:15642955,22565030
+)
+(1,60:15642955,22565030:398682,0,0
+(1,60:15563221,22565030:558150,0,0
+(1,60:15563221,22565030:558150,0,0
+(1,60:15563221,22565030:558150,418611,59802
+x1,60:16121371,22565030
+)
+)
+)
+)
+(1,60:16041637,22565030:398682,0,0
+(1,60:15961903,22565030:558150,0,0
+(1,60:15961903,22565030:558150,0,0
+(1,60:15961903,22565030:558150,418611,59802
+x1,60:16520053,22565030
+)
+)
+)
+)
+x1,60:16991728,22565030
+$1,60:16991728,22565030
+)
+]
+)
+g1,60:17191063,22565030
+h1,60:17191063,22565030:0,0,0
+h1,60:17191063,22565030:0,0,0
+)
+(1,60:17191063,22565030:3485439,490372,205512
+(1,60:17191063,22565030:518281,490372,0
+(1,60:17191063,22565030:518281,490372,0
+x1,60:17709344,22565030
+)
+)
+[1,60:17709344,22770542:311300,507307,0
+(1,60:17709344,22263235:32768,0,54616
+h1,60:17709344,22263235:0,0,0
+h1,60:17709344,22263235:0,0,54616
+(1,60:17709344,22263235:0,0,0
+h1,60:17709344,22263235:0,0,0
+)
+)
+(1,60:17709344,22770542:311300,337875,0
+h1,60:17709344,22770542:0,0,0
+(1,60:17709344,22770542:278532,337875,0
+(1,60:17709344,22770542:278532,337875,0
+x1,60:17987876,22770542
+)
+)
+)
+]
+(1,60:18020644,22565030:538215,490372,0
+(1,60:18020644,22565030:538215,490372,0
+x1,60:18558859,22565030
+)
+)
+[1,60:18558859,22770542:311300,507307,0
+(1,60:18558859,22263235:32768,0,54616
+h1,60:18558859,22263235:0,0,0
+h1,60:18558859,22263235:0,0,54616
+(1,60:18558859,22263235:0,0,0
+h1,60:18558859,22263235:0,0,0
+)
+)
+(1,60:18558859,22770542:311300,337875,0
+h1,60:18558859,22770542:0,0,0
+(1,60:18558859,22770542:278532,337875,0
+(1,60:18558859,22770542:278532,337875,0
+x1,60:18837391,22770542
+)
+)
+)
+]
+(1,60:18870159,22565030:956828,490372,0
+(1,60:18870159,22565030:956828,490372,0
+x1,60:19826987,22565030
+)
+)
+[1,60:19826987,22770542:311300,507307,0
+(1,60:19826987,22263235:32768,0,54616
+h1,60:19826987,22263235:0,0,0
+h1,60:19826987,22263235:0,0,54616
+(1,60:19826987,22263235:0,0,0
+h1,60:19826987,22263235:0,0,0
+)
+)
+(1,60:19826987,22770542:311300,337875,0
+h1,60:19826987,22770542:0,0,0
+(1,60:19826987,22770542:278532,337875,0
+(1,60:19826987,22770542:278532,337875,0
+x1,60:20105519,22770542
+)
+)
+)
+]
+(1,60:20138287,22565030:538215,490372,0
+(1,60:20138287,22565030:538215,490372,0
+x1,60:20676502,22565030
+)
+)
+)
+g1,60:20835970,22565030
+x1,60:21394120,22565030
+g1,60:21553588,22565030
+h1,60:21553588,22565030:0,0,0
+(1,60:21553588,22565030:1407665,490372,205512
+(1,60:21553588,22565030:538215,490372,0
+(1,60:21553588,22565030:538215,490372,0
+x1,60:22091803,22565030
+)
+)
+[1,60:22091803,22770542:311300,507307,0
+(1,60:22091803,22263235:32768,0,54616
+h1,60:22091803,22263235:0,0,0
+h1,60:22091803,22263235:0,0,54616
+(1,60:22091803,22263235:0,0,0
+h1,60:22091803,22263235:0,0,0
+)
+)
+(1,60:22091803,22770542:311300,337875,0
+h1,60:22091803,22770542:0,0,0
+(1,60:22091803,22770542:278532,337875,0
+(1,60:22091803,22770542:278532,337875,0
+x1,60:22370335,22770542
+)
+)
+)
+]
+(1,60:22403103,22565030:558150,490372,0
+(1,60:22403103,22565030:558150,490372,0
+x1,60:22961253,22565030
+)
+)
+)
+$1,60:22961253,22565030
+k1,61:33572126,22565030:10610873
+g1,61:33572126,22565030
+)
+(1,62:9979166,24456817:23592960,642250,275254
+g1,62:12682526,24456817
+r1,62:12682526,24456817:0,917504,275254
+(1,62:12682526,24456817:0,642250,275254
+k1,62:9979166,24456817:-2703360
+(1,62:9979166,24456817:2703360,642250,275254
+x1,62:11797790,24456817
+g1,62:12682526,24456817
+r1,62:12682526,24456817:0,917504,275254
+g1,62:12682526,24456817
+)
+)
+x1,62:16526214,24456817
+g1,62:16821126,24456817
+x1,62:19115342,24456817
+x1,62:19742030,24456817
+g1,62:20036942,24456817
+x1,62:22340169,24456817
+r1,62:22340169,24456817:0,917504,275254
+k1,62:33572126,24456817:11231957
+g1,62:33572126,24456817
+)
+(1,64:9979166,25811568:23592960,498346,0
+x1,64:11254935,25811568
+x1,63:12470902,25811568
+k1,64:33572126,25811568:21101224
+g1,64:33572126,25811568
+)
+(1,64:9979166,26702858:23592960,0,0
+g1,64:9979166,26702858
+)
+(1,66:16202423,27594148:11146447,836824,205512
+h1,66:16202423,27594148:0,0,0
+(1,66:16202423,27594148:11146447,836824,205512
+(1,66:16202423,27594148:1679096,490372,205512
+x1,66:16720704,27594148
+[1,66:16720704,27799660:311300,507307,0
+(1,66:16720704,27292353:32768,0,54616
+h1,65:16720704,27292353:0,0,0
+h1,65:16720704,27292353:0,0,54616
+h1,66:16720704,27292353:0,0,0
+)
+(1,66:16720704,27799660:311300,337875,0
+h1,65:16720704,27799660:0,0,0
+x1,65:16999236,27799660
+)
+]
+x1,66:17570219,27594148
+[1,66:17570219,27799660:311300,507307,0
+(1,66:17570219,27292353:32768,0,54616
+h1,65:17570219,27292353:0,0,0
+h1,65:17570219,27292353:0,0,54616
+h1,66:17570219,27292353:0,0,0
+)
+(1,66:17570219,27799660:311300,337875,0
+h1,65:17570219,27799660:0,0,0
+x1,65:17848751,27799660
+)
+]
+)
+g1,66:18040987,27594148
+x1,66:18599137,27594148
+g1,66:18758605,27594148
+h1,66:18758605,27594148:0,0,0
+(1,66:18758605,27594148:1028920,498346,205512
+(1,66:18758605,27594148:717620,498346,0
+x1,66:19476225,27594148
+)
+[1,66:19476225,27799660:311300,507307,0
+(1,66:19476225,27292353:32768,0,54616
+h1,65:19476225,27292353:0,0,0
+h1,65:19476225,27292353:0,0,54616
+h1,66:19476225,27292353:0,0,0
+)
+(1,66:19476225,27799660:311300,337875,0
+h1,65:19476225,27799660:0,0,0
+x1,65:19754757,27799660
+)
+]
+)
+(1,66:19787525,27594148:3031708,836824,0
+h1,66:19787525,27594148:0,0,0
+g1,66:19986860,27594148
+(1,66:19986860,27594148:2633038,836824,0
+[1,66:19986860,27594148:2633038,836824,0
+(1,66:19986860,27187349:2633038,358263,0
+k1,66:20157074,27187349:170214
+(1,66:20157074,27187349:2199766,358263,0
+(1,65:20157074,27187349:2199766,358263,0
+x1,65:21336648,27187349
+g1,65:21522336,27187349
+x1,65:22356840,27187349
+)
+)
+k1,65:22356840,27187349:92844
+k1,66:22619898,27187349:170214
+)
+(1,65:19986860,27594148:2633038,263276,0
+$1,65:19986860,27594148
+(1,65:19986860,27594148:558150,0,0
+(1,65:19986860,27594148:558150,0,0
+$1,65:19986860,27594148
+(1,65:19986860,27594148:558150,418611,59802
+x1,65:20545010,27594148
+)
+$1,65:20545010,27594148
+)
+)
+(1,65:20426284,27594148:398682,0,0
+$1,65:20426284,27594148
+(1,65:20346550,27594148:558150,0,0
+(1,65:20346550,27594148:558150,0,0
+$1,65:20346550,27594148
+(1,65:20346550,27594148:558150,418611,59802
+x1,65:20904700,27594148
+)
+$1,65:20904700,27594148
+)
+)
+$1,65:20824966,27594148
+)
+(1,65:20824966,27594148:398682,0,0
+(1,65:20745232,27594148:558150,0,0
+(1,65:20745232,27594148:558150,0,0
+(1,65:20745232,27594148:558150,418611,59802
+x1,65:21303382,27594148
+)
+)
+)
+)
+(1,65:21223648,27594148:398682,0,0
+(1,65:21143914,27594148:558150,0,0
+(1,65:21143914,27594148:558150,0,0
+(1,65:21143914,27594148:558150,418611,59802
+x1,65:21702064,27594148
+)
+)
+)
+)
+(1,65:21622330,27594148:398682,0,0
+(1,65:21542596,27594148:558150,0,0
+(1,65:21542596,27594148:558150,0,0
+(1,65:21542596,27594148:558150,418611,59802
+x1,65:22100746,27594148
+)
+)
+)
+)
+x1,65:22619898,27594148
+$1,65:22619898,27594148
+)
+]
+)
+g1,66:22819233,27594148
+h1,66:22819233,27594148:0,0,0
+h1,66:22819233,27594148:0,0,0
+)
+(1,66:22819233,27594148:2396716,498346,205512
+x1,66:23337514,27594148
+[1,66:23337514,27799660:311300,507307,0
+(1,66:23337514,27292353:32768,0,54616
+h1,65:23337514,27292353:0,0,0
+h1,65:23337514,27292353:0,0,54616
+h1,66:23337514,27292353:0,0,0
+)
+(1,66:23337514,27799660:311300,337875,0
+h1,65:23337514,27799660:0,0,0
+x1,65:23616046,27799660
+)
+]
+x1,66:24187029,27594148
+[1,66:24187029,27799660:311300,507307,0
+(1,66:24187029,27292353:32768,0,54616
+h1,65:24187029,27292353:0,0,0
+h1,65:24187029,27292353:0,0,54616
+h1,66:24187029,27292353:0,0,0
+)
+(1,66:24187029,27799660:311300,337875,0
+h1,65:24187029,27799660:0,0,0
+x1,65:24465561,27799660
+)
+]
+(1,66:24498329,27594148:717620,498346,0
+x1,66:25215949,27594148
+)
+)
+g1,66:25375417,27594148
+x1,66:25933567,27594148
+g1,66:26093035,27594148
+h1,66:26093035,27594148:0,0,0
+(1,66:26093035,27594148:1255835,498346,0
+x1,66:27348870,27594148
+)
+)
+)
+(1,68:9979166,28816343:23592960,498346,139537
+x1,68:12211762,28816343
+g1,67:12450968,28816343
+x1,67:13746672,28816343
+x1,67:15863651,28816343
+g1,67:16102857,28816343
+x1,67:18122161,28816343
+k1,68:33572126,28816343:15449965
+g1,68:33572126,28816343
+)
+(1,75:9979166,30388980:24807615,836824,267389
+g1,75:9979166,30388980
+(1,75:9979166,30388980:3784441,836824,267389
+k1,75:12734687,30388980:2755521
+(1,75:12734687,30388980:0,623900,267389
+[1,75:12734687,30388980:0,623900,267389
+(1,21:12734687,30388980:0,623900,267389
+r1,75:12734687,30388980:0,891289,267389
+)
+]
+)
+(1,75:12734687,30388980:1028920,498346,205512
+$1,75:12734687,30388980
+(1,75:12734687,30388980:1028920,498346,205512
+h1,75:12734687,30388980:0,0,0
+(1,75:12734687,30388980:1028920,498346,205512
+(1,75:12734687,30388980:717620,498346,0
+x1,75:13452307,30388980
+)
+[1,75:13452307,30594492:311300,507307,0
+(1,75:13452307,30087185:32768,0,54616
+h1,75:13452307,30087185:0,0,0
+h1,75:13452307,30087185:0,0,54616
+h1,75:13452307,30087185:0,0,0
+)
+(1,75:13452307,30594492:311300,337875,0
+h1,75:13452307,30594492:0,0,0
+x1,75:13730839,30594492
+)
+]
+)
+)
+$1,75:13763607,30388980
+)
+)
+g1,75:13763607,30388980
+(1,75:13763607,30388980:7175566,836824,267389
+(1,75:13763607,30388980:5862320,836824,0
+$1,75:13763607,30388980
+(1,75:13763607,30388980:5862320,836824,0
+h1,75:13763607,30388980:0,0,0
+(1,75:13763607,30388980:4427078,836824,0
+(1,75:13763607,30388980:3031708,836824,0
+h1,75:13763607,30388980:0,0,0
+g1,75:13962942,30388980
+(1,75:13962942,30388980:2633038,836824,0
+[1,75:13962942,30388980:2633038,836824,0
+(1,75:13962942,29982181:2633038,358263,0
+k1,75:14133156,29982181:170214
+(1,75:14133156,29982181:2199766,358263,0
+(1,75:14133156,29982181:2199766,358263,0
+x1,75:15312730,29982181
+g1,75:15498418,29982181
+x1,75:16332922,29982181
+)
+)
+k1,75:16595980,29982181:170214
+)
+(1,75:13962942,30388980:2633038,263276,0
+$1,75:13962942,30388980
+(1,75:13962942,30388980:558150,0,0
+(1,75:13962942,30388980:558150,0,0
+$1,75:13962942,30388980
+(1,75:13962942,30388980:558150,418611,59802
+x1,75:14521092,30388980
+)
+$1,75:14521092,30388980
+)
+)
+(1,75:14402366,30388980:398682,0,0
+$1,75:14402366,30388980
+(1,75:14322632,30388980:558150,0,0
+(1,75:14322632,30388980:558150,0,0
+$1,75:14322632,30388980
+(1,75:14322632,30388980:558150,418611,59802
+x1,75:14880782,30388980
+)
+$1,75:14880782,30388980
+)
+)
+$1,75:14801048,30388980
+)
+(1,75:14801048,30388980:398682,0,0
+(1,75:14721314,30388980:558150,0,0
+(1,75:14721314,30388980:558150,0,0
+(1,75:14721314,30388980:558150,418611,59802
+x1,75:15279464,30388980
+)
+)
+)
+)
+(1,75:15199730,30388980:398682,0,0
+(1,75:15119996,30388980:558150,0,0
+(1,75:15119996,30388980:558150,0,0
+(1,75:15119996,30388980:558150,418611,59802
+x1,75:15678146,30388980
+)
+)
+)
+)
+(1,75:15598412,30388980:398682,0,0
+(1,75:15518678,30388980:558150,0,0
+(1,75:15518678,30388980:558150,0,0
+(1,75:15518678,30388980:558150,418611,59802
+x1,75:16076828,30388980
+)
+)
+)
+)
+x1,75:16595980,30388980
+$1,75:16595980,30388980
+)
+]
+)
+g1,75:16795315,30388980
+h1,75:16795315,30388980:0,0,0
+h1,75:16795315,30388980:0,0,0
+)
+(1,75:16795315,30388980:478411,462465,0
+x1,75:17154125,30388980
+g1,75:17273726,30388980
+)
+(1,75:17273726,30388980:916959,498346,0
+(1,75:17273726,30388980:199339,318942,0
+(1,75:17273726,30388980:199339,318942,0
+$1,75:17273726,30388980
+x1,75:17473065,30388980
+$1,75:17473065,30388980
+)
+)
+h1,75:17473065,30388980:0,0,0
+(1,75:17473065,30388980:717620,498346,0
+x1,75:18190685,30388980
+)
+)
+)
+g1,75:19625927,30388980
+)
+$1,75:19625927,30388980
+)
+k1,75:20939173,30388980:1313246
+)
+g1,75:21594533,30388980
+(1,75:21594533,30388980:13192248,836824,267389
+k1,75:30632558,30388980:9038025
+(1,75:30632558,30388980:0,623900,267389
+[1,75:30632558,30388980:0,623900,267389
+(1,21:30632558,30388980:0,623900,267389
+r1,75:30632558,30388980:0,891289,267389
+)
+]
+)
+(1,75:30632558,30388980:4154223,498346,139537
+$1,75:30632558,30388980
+(1,75:30632558,30388980:4154223,498346,139537
+(1,75:30632558,30388980:4154223,498346,139537
+x1,75:32426609,30388980
+g1,75:32665815,30388980
+x1,75:34786781,30388980
+)
+)
+$1,75:34786781,30388980
+)
+)
+g1,75:34786781,30388980
+(1,75:34786781,30388980:0,836824,267389
+(1,75:34786781,30388980:0,0,0
+$1,75:34786781,30388980
+h1,75:34786781,30388980:0,0,0
+$1,75:34786781,30388980
+)
+g1,75:34786781,30388980
+)
+g1,75:35442141,30388980
+(1,75:35442141,30388980:-655360,836824,267389
+)
+g1,75:34786781,30388980
+)
+(1,75:9979166,31476878:24807615,623900,267389
+g1,75:9979166,31476878
+(1,75:9979166,31476878:3784441,623900,267389
+k1,75:10290466,31476878:311300
+(1,75:10290466,31476878:0,623900,267389
+[1,75:10290466,31476878:0,623900,267389
+(1,21:10290466,31476878:0,623900,267389
+r1,75:10290466,31476878:0,891289,267389
+)
+]
+)
+(1,75:10290466,31476878:3473141,498346,205512
+$1,75:10290466,31476878
+(1,75:10290466,31476878:3473141,498346,205512
+h1,75:10290466,31476878:0,0,0
+(1,75:10290466,31476878:3473141,498346,205512
+(1,75:10290466,31476878:916959,498346,0
+(1,75:10290466,31476878:199339,318942,0
+(1,75:10290466,31476878:199339,318942,0
+$1,75:10290466,31476878
+x1,75:10489805,31476878
+$1,75:10489805,31476878
+)
+)
+h1,75:10489805,31476878:0,0,0
+(1,75:10489805,31476878:717620,498346,0
+x1,75:11207425,31476878
+)
+)
+g1,75:11366893,31476878
+x1,75:11925043,31476878
+g1,75:12084511,31476878
+h1,75:12084511,31476878:0,0,0
+(1,75:12084511,31476878:1679096,490372,205512
+x1,75:12602792,31476878
+[1,75:12602792,31682390:311300,507307,0
+(1,75:12602792,31175083:32768,0,54616
+h1,75:12602792,31175083:0,0,0
+h1,75:12602792,31175083:0,0,54616
+h1,75:12602792,31175083:0,0,0
+)
+(1,75:12602792,31682390:311300,337875,0
+h1,75:12602792,31682390:0,0,0
+x1,75:12881324,31682390
+)
+]
+x1,75:13452307,31476878
+[1,75:13452307,31682390:311300,507307,0
+(1,75:13452307,31175083:32768,0,54616
+h1,75:13452307,31175083:0,0,0
+h1,75:13452307,31175083:0,0,54616
+h1,75:13452307,31175083:0,0,0
+)
+(1,75:13452307,31682390:311300,337875,0
+h1,75:13452307,31682390:0,0,0
+x1,75:13730839,31682390
+)
+]
+)
+)
+)
+$1,75:13763607,31476878
+)
+)
+g1,75:13763607,31476878
+(1,75:13763607,31476878:7175566,623900,267389
+(1,75:13763607,31476878:6996161,498346,205512
+$1,75:13763607,31476878
+(1,75:13763607,31476878:6996161,498346,205512
+h1,75:13763607,31476878:0,0,0
+(1,75:13763607,31476878:5560919,498346,205512
+(1,75:13763607,31476878:1549563,478561,0
+h1,75:13763607,31476878:0,0,0
+g1,75:13962942,31476878
+(1,75:13962942,31476878:1150893,478561,0
+[1,75:13962942,31476878:1150893,478561,0
+(1,75:13962942,31070079:1150893,0,0
+k1,75:14133156,31070079:170214
+g1,75:14850777,31070079
+k1,75:15113835,31070079:170214
+)
+(1,75:13962942,31476878:1150893,263276,0
+$1,75:13962942,31476878
+(1,75:13962942,31476878:558150,0,0
+(1,75:13962942,31476878:558150,0,0
+$1,75:13962942,31476878
+(1,75:13962942,31476878:558150,418611,59802
+x1,75:14521092,31476878
+)
+$1,75:14521092,31476878
+)
+)
+(1,75:14259317,31476878:398682,0,0
+$1,75:14259317,31476878
+(1,75:14179583,31476878:558150,0,0
+(1,75:14179583,31476878:558150,0,0
+$1,75:14179583,31476878
+(1,75:14179583,31476878:558150,418611,59802
+x1,75:14737733,31476878
+)
+$1,75:14737733,31476878
+)
+)
+$1,75:14657999,31476878
+)
+x1,75:15113835,31476878
+$1,75:15113835,31476878
+)
+]
+)
+g1,75:15313170,31476878
+h1,75:15313170,31476878:0,0,0
+)
+(1,75:15313170,31476878:1255835,498346,0
+x1,75:16569005,31476878
+)
+g1,75:16728473,31476878
+x1,75:17286623,31476878
+g1,75:17446091,31476878
+h1,75:17446091,31476878:0,0,0
+(1,75:17446091,31476878:199339,318942,0
+(1,75:17446091,31476878:199339,318942,0
+(1,75:17446091,31476878:199339,318942,0
+$1,75:17446091,31476878
+x1,75:17645430,31476878
+$1,75:17645430,31476878
+)
+)
+h1,75:17645430,31476878:0,0,0
+)
+(1,75:17645430,31476878:1679096,490372,205512
+x1,75:18163711,31476878
+[1,75:18163711,31682390:311300,507307,0
+(1,75:18163711,31175083:32768,0,54616
+h1,75:18163711,31175083:0,0,0
+h1,75:18163711,31175083:0,0,54616
+h1,75:18163711,31175083:0,0,0
+)
+(1,75:18163711,31682390:311300,337875,0
+h1,75:18163711,31682390:0,0,0
+x1,75:18442243,31682390
+)
+]
+x1,75:19013226,31476878
+[1,75:19013226,31682390:311300,507307,0
+(1,75:19013226,31175083:32768,0,54616
+h1,75:19013226,31175083:0,0,0
+h1,75:19013226,31175083:0,0,54616
+h1,75:19013226,31175083:0,0,0
+)
+(1,75:19013226,31682390:311300,337875,0
+h1,75:19013226,31682390:0,0,0
+x1,75:19291758,31682390
+)
+]
+)
+)
+g1,75:20759768,31476878
+)
+$1,75:20759768,31476878
+)
+k1,75:20939173,31476878:179405
+)
+g1,75:21594533,31476878
+(1,75:21594533,31476878:13192248,623900,267389
+k1,75:29757460,31476878:8162927
+(1,75:29757460,31476878:0,623900,267389
+[1,75:29757460,31476878:0,623900,267389
+(1,21:29757460,31476878:0,623900,267389
+r1,75:29757460,31476878:0,891289,267389
+)
+]
+)
+(1,75:29757460,31476878:5029321,498346,139537
+$1,75:29757460,31476878
+(1,75:29757460,31476878:5029321,498346,139537
+(1,75:29757460,31476878:5029321,498346,139537
+x1,75:31551511,31476878
+g1,75:31790717,31476878
+x1,75:34786781,31476878
+)
+)
+$1,75:34786781,31476878
+)
+)
+g1,75:34786781,31476878
+(1,75:34786781,31476878:0,623900,267389
+(1,75:34786781,31476878:0,0,0
+$1,75:34786781,31476878
+h1,75:34786781,31476878:0,0,0
+$1,75:34786781,31476878
+)
+g1,75:34786781,31476878
+)
+g1,75:35442141,31476878
+(1,75:35442141,31476878:-655360,623900,267389
+)
+g1,75:34786781,31476878
+)
+(1,75:9979166,32564776:24807615,623900,267389
+g1,75:9979166,32564776
+(1,75:9979166,32564776:3784441,623900,267389
+g1,75:9979166,32564776
+(1,75:9979166,32564776:0,623900,267389
+[1,75:9979166,32564776:0,623900,267389
+(1,21:9979166,32564776:0,623900,267389
+r1,75:9979166,32564776:0,891289,267389
+)
+]
+)
+(1,75:9979166,32564776:3784441,498346,205512
+$1,75:9979166,32564776
+(1,75:9979166,32564776:3784441,498346,205512
+h1,75:9979166,32564776:0,0,0
+(1,75:9979166,32564776:3784441,498346,205512
+(1,75:9979166,32564776:1878435,490372,205512
+(1,75:9979166,32564776:199339,318942,0
+(1,75:9979166,32564776:199339,318942,0
+$1,75:9979166,32564776
+x1,75:10178505,32564776
+$1,75:10178505,32564776
+)
+)
+h1,75:10178505,32564776:0,0,0
+x1,75:10696786,32564776
+[1,75:10696786,32770288:311300,507307,0
+(1,75:10696786,32262981:32768,0,54616
+h1,75:10696786,32262981:0,0,0
+h1,75:10696786,32262981:0,0,54616
+h1,75:10696786,32262981:0,0,0
+)
+(1,75:10696786,32770288:311300,337875,0
+h1,75:10696786,32770288:0,0,0
+x1,75:10975318,32770288
+)
+]
+x1,75:11546301,32564776
+[1,75:11546301,32770288:311300,507307,0
+(1,75:11546301,32262981:32768,0,54616
+h1,75:11546301,32262981:0,0,0
+h1,75:11546301,32262981:0,0,54616
+h1,75:11546301,32262981:0,0,0
+)
+(1,75:11546301,32770288:311300,337875,0
+h1,75:11546301,32770288:0,0,0
+x1,75:11824833,32770288
+)
+]
+)
+g1,75:12017069,32564776
+x1,75:12575219,32564776
+g1,75:12734687,32564776
+h1,75:12734687,32564776:0,0,0
+(1,75:12734687,32564776:1028920,498346,205512
+(1,75:12734687,32564776:717620,498346,0
+x1,75:13452307,32564776
+)
+[1,75:13452307,32770288:311300,507307,0
+(1,75:13452307,32262981:32768,0,54616
+h1,75:13452307,32262981:0,0,0
+h1,75:13452307,32262981:0,0,54616
+h1,75:13452307,32262981:0,0,0
+)
+(1,75:13452307,32770288:311300,337875,0
+h1,75:13452307,32770288:0,0,0
+x1,75:13730839,32770288
+)
+]
+)
+)
+)
+$1,75:13763607,32564776
+)
+)
+g1,75:13763607,32564776
+(1,75:13763607,32564776:7175566,623900,267389
+(1,75:13763607,32564776:7175566,498346,205512
+$1,75:13763607,32564776
+(1,75:13763607,32564776:7175566,498346,205512
+h1,75:13763607,32564776:0,0,0
+(1,75:13763607,32564776:5740324,498346,205512
+(1,75:13763607,32564776:1549563,478561,0
+h1,75:13763607,32564776:0,0,0
+g1,75:13962942,32564776
+(1,75:13962942,32564776:1150893,478561,0
+[1,75:13962942,32564776:1150893,478561,0
+(1,75:13962942,32157977:1150893,0,0
+k1,75:14133156,32157977:170214
+g1,75:14850777,32157977
+k1,75:15113835,32157977:170214
+)
+(1,75:13962942,32564776:1150893,263276,0
+$1,75:13962942,32564776
+(1,75:13962942,32564776:558150,0,0
+(1,75:13962942,32564776:558150,0,0
+$1,75:13962942,32564776
+(1,75:13962942,32564776:558150,418611,59802
+x1,75:14521092,32564776
+)
+$1,75:14521092,32564776
+)
+)
+(1,75:14259317,32564776:398682,0,0
+$1,75:14259317,32564776
+(1,75:14179583,32564776:558150,0,0
+(1,75:14179583,32564776:558150,0,0
+$1,75:14179583,32564776
+(1,75:14179583,32564776:558150,418611,59802
+x1,75:14737733,32564776
+)
+$1,75:14737733,32564776
+)
+)
+$1,75:14657999,32564776
+)
+x1,75:15113835,32564776
+$1,75:15113835,32564776
+)
+]
+)
+g1,75:15313170,32564776
+h1,75:15313170,32564776:0,0,0
+)
+(1,75:15313170,32564776:2396716,498346,205512
+x1,75:15831451,32564776
+[1,75:15831451,32770288:311300,507307,0
+(1,75:15831451,32262981:32768,0,54616
+h1,75:15831451,32262981:0,0,0
+h1,75:15831451,32262981:0,0,54616
+h1,75:15831451,32262981:0,0,0
+)
+(1,75:15831451,32770288:311300,337875,0
+h1,75:15831451,32770288:0,0,0
+x1,75:16109983,32770288
+)
+]
+x1,75:16680966,32564776
+[1,75:16680966,32770288:311300,507307,0
+(1,75:16680966,32262981:32768,0,54616
+h1,75:16680966,32262981:0,0,0
+h1,75:16680966,32262981:0,0,54616
+h1,75:16680966,32262981:0,0,0
+)
+(1,75:16680966,32770288:311300,337875,0
+h1,75:16680966,32770288:0,0,0
+x1,75:16959498,32770288
+)
+]
+(1,75:16992266,32564776:717620,498346,0
+x1,75:17709886,32564776
+)
+)
+g1,75:17869354,32564776
+x1,75:18427504,32564776
+g1,75:18586972,32564776
+h1,75:18586972,32564776:0,0,0
+(1,75:18586972,32564776:916959,498346,0
+(1,75:18586972,32564776:199339,318942,0
+(1,75:18586972,32564776:199339,318942,0
+$1,75:18586972,32564776
+x1,75:18786311,32564776
+$1,75:18786311,32564776
+)
+)
+h1,75:18786311,32564776:0,0,0
+(1,75:18786311,32564776:717620,498346,0
+x1,75:19503931,32564776
+)
+)
+)
+g1,75:20939173,32564776
+)
+$1,75:20939173,32564776
+)
+g1,75:20939173,32564776
+)
+g1,75:21594533,32564776
+(1,75:21594533,32564776:13192248,623900,267389
+k1,75:29757460,32564776:8162927
+(1,75:29757460,32564776:0,623900,267389
+[1,75:29757460,32564776:0,623900,267389
+(1,21:29757460,32564776:0,623900,267389
+r1,75:29757460,32564776:0,891289,267389
+)
+]
+)
+(1,75:29757460,32564776:5029321,498346,139537
+$1,75:29757460,32564776
+(1,75:29757460,32564776:5029321,498346,139537
+(1,75:29757460,32564776:5029321,498346,139537
+x1,75:31551511,32564776
+g1,75:31790717,32564776
+x1,75:34786781,32564776
+)
+)
+$1,75:34786781,32564776
+)
+)
+g1,75:34786781,32564776
+(1,75:34786781,32564776:0,623900,267389
+(1,75:34786781,32564776:0,0,0
+$1,75:34786781,32564776
+h1,75:34786781,32564776:0,0,0
+$1,75:34786781,32564776
+)
+g1,75:34786781,32564776
+)
+g1,75:35442141,32564776
+(1,75:35442141,32564776:-655360,623900,267389
+)
+g1,75:34786781,32564776
+)
+(1,75:9979166,33652674:24807615,623900,267389
+g1,75:9979166,33652674
+(1,75:9979166,33652674:3784441,623900,267389
+k1,75:10091127,33652674:111961
+(1,75:10091127,33652674:0,623900,267389
+[1,75:10091127,33652674:0,623900,267389
+(1,21:10091127,33652674:0,623900,267389
+r1,75:10091127,33652674:0,891289,267389
+)
+]
+)
+(1,75:10091127,33652674:3672480,498346,205512
+$1,75:10091127,33652674
+(1,75:10091127,33652674:3672480,498346,205512
+h1,75:10091127,33652674:0,0,0
+(1,75:10091127,33652674:3672480,498346,205512
+(1,75:10091127,33652674:1878435,490372,205512
+(1,75:10091127,33652674:199339,318942,0
+(1,75:10091127,33652674:199339,318942,0
+$1,75:10091127,33652674
+x1,75:10290466,33652674
+$1,75:10290466,33652674
+)
+)
+h1,75:10290466,33652674:0,0,0
+x1,75:10808747,33652674
+[1,75:10808747,33858186:311300,507307,0
+(1,75:10808747,33350879:32768,0,54616
+h1,75:10808747,33350879:0,0,0
+h1,75:10808747,33350879:0,0,54616
+h1,75:10808747,33350879:0,0,0
+)
+(1,75:10808747,33858186:311300,337875,0
+h1,75:10808747,33858186:0,0,0
+x1,75:11087279,33858186
+)
+]
+x1,75:11658262,33652674
+[1,75:11658262,33858186:311300,507307,0
+(1,75:11658262,33350879:32768,0,54616
+h1,75:11658262,33350879:0,0,0
+h1,75:11658262,33350879:0,0,54616
+h1,75:11658262,33350879:0,0,0
+)
+(1,75:11658262,33858186:311300,337875,0
+h1,75:11658262,33858186:0,0,0
+x1,75:11936794,33858186
+)
+]
+)
+g1,75:12129030,33652674
+x1,75:12687180,33652674
+g1,75:12846648,33652674
+h1,75:12846648,33652674:0,0,0
+(1,75:12846648,33652674:916959,498346,0
+(1,75:12846648,33652674:199339,318942,0
+(1,75:12846648,33652674:199339,318942,0
+$1,75:12846648,33652674
+x1,75:13045987,33652674
+$1,75:13045987,33652674
+)
+)
+h1,75:13045987,33652674:0,0,0
+(1,75:13045987,33652674:717620,498346,0
+x1,75:13763607,33652674
+)
+)
+)
+)
+$1,75:13763607,33652674
+)
+)
+g1,75:13763607,33652674
+(1,75:13763607,33652674:7175566,623900,267389
+(1,75:13763607,33652674:5381521,498346,205512
+$1,75:13763607,33652674
+(1,75:13763607,33652674:5381521,498346,205512
+h1,75:13763607,33652674:0,0,0
+(1,75:13763607,33652674:3946279,498346,205512
+(1,75:13763607,33652674:1549563,478561,0
+h1,75:13763607,33652674:0,0,0
+g1,75:13962942,33652674
+(1,75:13962942,33652674:1150893,478561,0
+[1,75:13962942,33652674:1150893,478561,0
+(1,75:13962942,33245875:1150893,0,0
+k1,75:14133156,33245875:170214
+g1,75:14850777,33245875
+k1,75:15113835,33245875:170214
+)
+(1,75:13962942,33652674:1150893,263276,0
+$1,75:13962942,33652674
+(1,75:13962942,33652674:558150,0,0
+(1,75:13962942,33652674:558150,0,0
+$1,75:13962942,33652674
+(1,75:13962942,33652674:558150,418611,59802
+x1,75:14521092,33652674
+)
+$1,75:14521092,33652674
+)
+)
+(1,75:14259317,33652674:398682,0,0
+$1,75:14259317,33652674
+(1,75:14179583,33652674:558150,0,0
+(1,75:14179583,33652674:558150,0,0
+$1,75:14179583,33652674
+(1,75:14179583,33652674:558150,418611,59802
+x1,75:14737733,33652674
+)
+$1,75:14737733,33652674
+)
+)
+$1,75:14657999,33652674
+)
+x1,75:15113835,33652674
+$1,75:15113835,33652674
+)
+]
+)
+g1,75:15313170,33652674
+h1,75:15313170,33652674:0,0,0
+)
+(1,75:15313170,33652674:2396716,498346,205512
+x1,75:15831451,33652674
+[1,75:15831451,33858186:311300,507307,0
+(1,75:15831451,33350879:32768,0,54616
+h1,75:15831451,33350879:0,0,0
+h1,75:15831451,33350879:0,0,54616
+h1,75:15831451,33350879:0,0,0
+)
+(1,75:15831451,33858186:311300,337875,0
+h1,75:15831451,33858186:0,0,0
+x1,75:16109983,33858186
+)
+]
+x1,75:16680966,33652674
+[1,75:16680966,33858186:311300,507307,0
+(1,75:16680966,33350879:32768,0,54616
+h1,75:16680966,33350879:0,0,0
+h1,75:16680966,33350879:0,0,54616
+h1,75:16680966,33350879:0,0,0
+)
+(1,75:16680966,33858186:311300,337875,0
+h1,75:16680966,33858186:0,0,0
+x1,75:16959498,33858186
+)
+]
+(1,75:16992266,33652674:717620,498346,0
+x1,75:17709886,33652674
+)
+)
+)
+g1,75:19145128,33652674
+)
+$1,75:19145128,33652674
+)
+k1,75:20939173,33652674:1794045
+)
+g1,75:21594533,33652674
+(1,75:21594533,33652674:13192248,623900,267389
+k1,75:29837195,33652674:8242662
+(1,75:29837195,33652674:0,623900,267389
+[1,75:29837195,33652674:0,623900,267389
+(1,21:29837195,33652674:0,623900,267389
+r1,75:29837195,33652674:0,891289,267389
+)
+]
+)
+(1,75:29837195,33652674:4949586,498346,139537
+$1,75:29837195,33652674
+(1,75:29837195,33652674:4949586,498346,139537
+(1,75:29837195,33652674:4949586,498346,139537
+x1,75:31631246,33652674
+g1,75:31870452,33652674
+x1,75:34786781,33652674
+)
+)
+$1,75:34786781,33652674
+)
+)
+g1,75:34786781,33652674
+(1,75:34786781,33652674:0,623900,267389
+(1,75:34786781,33652674:0,0,0
+$1,75:34786781,33652674
+h1,75:34786781,33652674:0,0,0
+$1,75:34786781,33652674
+)
+g1,75:34786781,33652674
+)
+g1,75:35442141,33652674
+(1,75:35442141,33652674:-655360,623900,267389
+)
+g1,75:34786781,33652674
+)
+(1,75:9979166,34740572:24807615,623900,267389
+g1,75:9979166,34740572
+(1,75:9979166,34740572:3784441,623900,267389
+k1,75:12368237,34740572:2389071
+(1,75:12368237,34740572:0,623900,267389
+[1,75:12368237,34740572:0,623900,267389
+(1,21:12368237,34740572:0,623900,267389
+r1,75:12368237,34740572:0,891289,267389
+)
+]
+)
+(1,75:12368237,34740572:1395370,498346,0
+$1,75:12368237,34740572
+(1,75:12368237,34740572:1395370,498346,0
+h1,75:12368237,34740572:0,0,0
+(1,75:12368237,34740572:1395370,498346,0
+(1,75:12368237,34740572:478411,462465,0
+x1,75:12727047,34740572
+g1,75:12846648,34740572
+)
+(1,75:12846648,34740572:199339,318942,0
+(1,75:12846648,34740572:199339,318942,0
+$1,75:12846648,34740572
+x1,75:13045987,34740572
+$1,75:13045987,34740572
+)
+)
+h1,75:13045987,34740572:0,0,0
+(1,75:13045987,34740572:717620,498346,0
+x1,75:13763607,34740572
+)
+)
+)
+$1,75:13763607,34740572
+)
+)
+g1,75:13763607,34740572
+(1,75:13763607,34740572:7175566,623900,267389
+(1,75:13763607,34740572:2578483,498346,205512
+$1,75:13763607,34740572
+(1,75:13763607,34740572:2578483,498346,205512
+h1,75:13763607,34740572:0,0,0
+(1,75:13763607,34740572:2578483,498346,205512
+(1,75:13763607,34740572:1549563,478561,0
+h1,75:13763607,34740572:0,0,0
+g1,75:13962942,34740572
+(1,75:13962942,34740572:1150893,478561,0
+[1,75:13962942,34740572:1150893,478561,0
+(1,75:13962942,34333773:1150893,0,0
+k1,75:14133156,34333773:170214
+g1,75:14850777,34333773
+k1,75:15113835,34333773:170214
+)
+(1,75:13962942,34740572:1150893,263276,0
+$1,75:13962942,34740572
+(1,75:13962942,34740572:558150,0,0
+(1,75:13962942,34740572:558150,0,0
+$1,75:13962942,34740572
+(1,75:13962942,34740572:558150,418611,59802
+x1,75:14521092,34740572
+)
+$1,75:14521092,34740572
+)
+)
+(1,75:14259317,34740572:398682,0,0
+$1,75:14259317,34740572
+(1,75:14179583,34740572:558150,0,0
+(1,75:14179583,34740572:558150,0,0
+$1,75:14179583,34740572
+(1,75:14179583,34740572:558150,418611,59802
+x1,75:14737733,34740572
+)
+$1,75:14737733,34740572
+)
+)
+$1,75:14657999,34740572
+)
+x1,75:15113835,34740572
+$1,75:15113835,34740572
+)
+]
+)
+g1,75:15313170,34740572
+h1,75:15313170,34740572:0,0,0
+)
+(1,75:15313170,34740572:1028920,498346,205512
+(1,75:15313170,34740572:717620,498346,0
+x1,75:16030790,34740572
+)
+[1,75:16030790,34946084:311300,507307,0
+(1,75:16030790,34438777:32768,0,54616
+h1,75:16030790,34438777:0,0,0
+h1,75:16030790,34438777:0,0,54616
+h1,75:16030790,34438777:0,0,0
+)
+(1,75:16030790,34946084:311300,337875,0
+h1,75:16030790,34946084:0,0,0
+x1,75:16309322,34946084
+)
+]
+)
+)
+)
+$1,75:16342090,34740572
+)
+k1,75:20939173,34740572:4597083
+)
+g1,75:21594533,34740572
+(1,75:21594533,34740572:13192248,623900,267389
+k1,75:34786781,34740572:13192248
+(1,75:34786781,34740572:0,623900,267389
+[1,75:34786781,34740572:0,623900,267389
+(1,21:34786781,34740572:0,623900,267389
+r1,75:34786781,34740572:0,891289,267389
+)
+]
+)
+(1,75:34786781,34740572:0,0,0
+$1,75:34786781,34740572
+h1,75:34786781,34740572:0,0,0
+$1,75:34786781,34740572
+)
+)
+g1,75:34786781,34740572
+(1,75:34786781,34740572:0,623900,267389
+(1,75:34786781,34740572:0,0,0
+$1,75:34786781,34740572
+h1,75:34786781,34740572:0,0,0
+$1,75:34786781,34740572
+)
+g1,75:34786781,34740572
+)
+g1,75:35442141,34740572
+(1,75:35442141,34740572:-655360,623900,267389
+)
+g1,75:34786781,34740572
+)
+(1,75:9979166,35828470:24807615,623900,267389
+g1,75:9979166,35828470
+(1,75:9979166,35828470:3784441,623900,267389
+k1,75:11406761,35828470:1427595
+(1,75:11406761,35828470:0,623900,267389
+[1,75:11406761,35828470:0,623900,267389
+(1,21:11406761,35828470:0,623900,267389
+r1,75:11406761,35828470:0,891289,267389
+)
+]
+)
+(1,75:11406761,35828470:2356846,490372,205512
+$1,75:11406761,35828470
+(1,75:11406761,35828470:2356846,490372,205512
+h1,75:11406761,35828470:0,0,0
+(1,75:11406761,35828470:2356846,490372,205512
+(1,75:11406761,35828470:478411,462465,0
+x1,75:11765571,35828470
+g1,75:11885172,35828470
+)
+(1,75:11885172,35828470:199339,318942,0
+(1,75:11885172,35828470:199339,318942,0
+$1,75:11885172,35828470
+x1,75:12084511,35828470
+$1,75:12084511,35828470
+)
+)
+h1,75:12084511,35828470:0,0,0
+x1,75:12602792,35828470
+[1,75:12602792,36033982:311300,507307,0
+(1,75:12602792,35526675:32768,0,54616
+h1,75:12602792,35526675:0,0,0
+h1,75:12602792,35526675:0,0,54616
+h1,75:12602792,35526675:0,0,0
+)
+(1,75:12602792,36033982:311300,337875,0
+h1,75:12602792,36033982:0,0,0
+x1,75:12881324,36033982
+)
+]
+x1,75:13452307,35828470
+[1,75:13452307,36033982:311300,507307,0
+(1,75:13452307,35526675:32768,0,54616
+h1,75:13452307,35526675:0,0,0
+h1,75:13452307,35526675:0,0,54616
+h1,75:13452307,35526675:0,0,0
+)
+(1,75:13452307,36033982:311300,337875,0
+h1,75:13452307,36033982:0,0,0
+x1,75:13730839,36033982
+)
+]
+)
+)
+$1,75:13763607,35828470
+)
+)
+g1,75:13763607,35828470
+(1,75:13763607,35828470:7175566,623900,267389
+(1,75:13763607,35828470:3507191,490372,205512
+$1,75:13763607,35828470
+(1,75:13763607,35828470:3507191,490372,205512
+h1,75:13763607,35828470:0,0,0
+(1,75:13763607,35828470:3507191,490372,205512
+(1,75:13763607,35828470:1549563,478561,0
+h1,75:13763607,35828470:0,0,0
+g1,75:13962942,35828470
+(1,75:13962942,35828470:1150893,478561,0
+[1,75:13962942,35828470:1150893,478561,0
+(1,75:13962942,35421671:1150893,0,0
+k1,75:14133156,35421671:170214
+g1,75:14850777,35421671
+k1,75:15113835,35421671:170214
+)
+(1,75:13962942,35828470:1150893,263276,0
+$1,75:13962942,35828470
+(1,75:13962942,35828470:558150,0,0
+(1,75:13962942,35828470:558150,0,0
+$1,75:13962942,35828470
+(1,75:13962942,35828470:558150,418611,59802
+x1,75:14521092,35828470
+)
+$1,75:14521092,35828470
+)
+)
+(1,75:14259317,35828470:398682,0,0
+$1,75:14259317,35828470
+(1,75:14179583,35828470:558150,0,0
+(1,75:14179583,35828470:558150,0,0
+$1,75:14179583,35828470
+(1,75:14179583,35828470:558150,418611,59802
+x1,75:14737733,35828470
+)
+$1,75:14737733,35828470
+)
+)
+$1,75:14657999,35828470
+)
+x1,75:15113835,35828470
+$1,75:15113835,35828470
+)
+]
+)
+g1,75:15313170,35828470
+h1,75:15313170,35828470:0,0,0
+)
+(1,75:15313170,35828470:1957628,490372,205512
+x1,75:15831451,35828470
+[1,75:15831451,36033982:311300,507307,0
+(1,75:15831451,35526675:32768,0,54616
+h1,75:15831451,35526675:0,0,0
+h1,75:15831451,35526675:0,0,54616
+h1,75:15831451,35526675:0,0,0
+)
+(1,75:15831451,36033982:311300,337875,0
+h1,75:15831451,36033982:0,0,0
+x1,75:16109983,36033982
+)
+]
+x1,75:16680966,35828470
+[1,75:16680966,36033982:589832,507307,0
+(1,75:16680966,35526675:32768,0,54616
+h1,75:16680966,35526675:0,0,0
+h1,75:16680966,35526675:0,0,54616
+h1,75:16680966,35526675:0,0,0
+)
+(1,75:16680966,36033982:589832,337875,0
+h1,75:16680966,36033982:0,0,0
+(1,75:16680966,36033982:557064,337875,0
+x1,75:17238030,36033982
+)
+)
+]
+)
+)
+)
+$1,75:17270798,35828470
+)
+k1,75:20939173,35828470:3668375
+)
+g1,75:21594533,35828470
+(1,75:21594533,35828470:13192248,623900,267389
+g1,75:21594533,35828470
+(1,75:21594533,35828470:0,623900,267389
+[1,75:21594533,35828470:0,623900,267389
+(1,21:21594533,35828470:0,623900,267389
+r1,75:21594533,35828470:0,891289,267389
+)
+]
+)
+(1,75:21594533,35828470:13192248,498346,139537
+$1,75:21594533,35828470
+(1,75:21594533,35828470:13192248,498346,139537
+(1,75:21594533,35828470:13192248,498346,139537
+x1,75:24510862,35828470
+g1,75:24750068,35828470
+x1,75:25128813,35828470
+x1,75:26225176,35828470
+g1,75:26464382,35828470
+x1,75:27979358,35828470
+x1,75:28358101,35828470
+x1,75:29556129,35828470
+x1,75:30273749,35828470
+g1,75:30512955,35828470
+x1,75:31952182,35828470
+g1,75:32191388,35828470
+x1,75:34786781,35828470
+)
+)
+$1,75:34786781,35828470
+)
+)
+g1,75:34786781,35828470
+(1,75:34786781,35828470:0,623900,267389
+(1,75:34786781,35828470:0,0,0
+$1,75:34786781,35828470
+h1,75:34786781,35828470:0,0,0
+$1,75:34786781,35828470
+)
+g1,75:34786781,35828470
+)
+g1,75:35442141,35828470
+(1,75:35442141,35828470:-655360,623900,267389
+)
+g1,75:34786781,35828470
+)
+[1,75:9979166,35828470:23592960,623900,267389
+(1,75:9979166,35828470:23592960,623900,267389
+(1,75:9979166,35828470:24807615,623900,267389
+(1,75:9979166,35828470:0,623900,267389
+[1,75:9979166,35828470:0,623900,267389
+(1,21:9979166,35828470:0,623900,267389
+r1,75:9979166,35828470:0,891289,267389
+)
+]
+)
+k1,75:34786781,35828470:24807615
+)
+g1,75:34786781,35828470
+g1,75:34786781,35828470
+)
+]
+(1,78:9979166,38059645:23592960,825750,353898
+g1,78:12397441,38059645
+r1,78:12397441,38059645:0,1179648,353898
+(1,78:12397441,38059645:0,825750,353898
+k1,78:9979166,38059645:-2418275
+(1,78:9979166,38059645:2418275,825750,353898
+x1,78:11335759,38059645
+g1,78:12397441,38059645
+r1,78:12397441,38059645:0,1179648,353898
+g1,78:12397441,38059645
+)
+)
+x1,78:15463869,38059645
+g1,78:15817763,38059645
+x1,78:18217908,38059645
+r1,78:18217908,38059645:0,1179648,353898
+k1,78:33572126,38059645:15354218
+g1,78:33572126,38059645
+)
+(1,80:9979166,39741410:23592960,551690,179404
+$1,79:9979166,39741410
+(1,79:9979166,39741410:5072155,551690,121595
+(1,79:9979166,39741410:550424,490372,0
+(1,79:9979166,39741410:550424,490372,0
+$1,79:9979166,39741410
+x1,79:10524046,39741410
+$1,79:10529590,39741410
+)
+)
+(1,79:10529590,39741410:0,0,0
+h1,79:10529590,39741410:0,0,0
+)
+(1,79:10529590,39741410:558150,418611,59802
+x1,79:11087740,39741410
+)
+(1,79:11087740,39741410:0,0,0
+h1,79:11087740,39741410:0,0,0
+)
+(1,79:11087740,39741410:1056496,490372,0
+(1,79:11087740,39741410:1056496,490372,0
+x1,79:12144236,39741410
+)
+)
+(1,79:12144236,39741410:0,480404,0
+(1,79:12144236,39741410:558150,480404,0
+(1,79:12144236,39679617:558150,418611,59802
+$1,79:12144236,39679617
+x1,79:12702386,39679617
+$1,79:12702386,39679617
+)
+)
+k1,79:12144236,39741410:-558150
+)
+(1,79:12144236,39741410:558150,356818,121595
+(1,79:12144236,39803203:558150,418611,59802
+$1,79:12144236,39803203
+x1,79:12702386,39803203
+$1,79:12702386,39803203
+)
+)
+(1,79:12702386,39741410:1056496,490372,0
+(1,79:12702386,39741410:1056496,490372,0
+x1,79:13758882,39741410
+)
+)
+(1,79:13758882,39741410:558150,418611,59802
+x1,79:14317032,39741410
+)
+(1,79:14317032,39741410:0,0,0
+h1,79:14317032,39741410:0,0,0
+)
+(1,79:14317032,39741410:734289,551690,0
+(1,79:14317032,39741410:734289,551690,0
+$1,79:14317032,39741410
+x1,79:14861912,39741410
+(1,79:14867456,39480992:183865,291272,0
+x1,79:15018553,39480992
+)
+$1,79:15051321,39741410
+)
+)
+(1,79:15051321,39741410:0,0,0
+h1,79:15051321,39741410:0,0,0
+)
+)
+g1,79:15210789,39741410
+x1,79:15768939,39741410
+g1,79:15928407,39741410
+h1,79:15928407,39741410:0,0,0
+(1,79:15928407,39741410:1046530,490372,0
+(1,79:15928407,39741410:1046530,490372,0
+x1,79:16974937,39741410
+)
+)
+(1,79:16974937,39741410:1549563,478561,0
+h1,79:16974937,39741410:0,0,0
+g1,79:17174272,39741410
+(1,79:17174272,39741410:1150893,478561,0
+[1,79:17174272,39741410:1150893,478561,0
+(1,79:17174272,39334611:1150893,0,0
+k1,79:17344486,39334611:170214
+g1,79:18062107,39334611
+k1,79:18325165,39334611:170214
+)
+(1,79:17174272,39741410:1150893,263276,0
+$1,79:17174272,39741410
+(1,79:17174272,39741410:558150,0,0
+(1,79:17174272,39741410:558150,0,0
+$1,79:17174272,39741410
+(1,79:17174272,39741410:558150,418611,59802
+x1,79:17732422,39741410
+)
+$1,79:17732422,39741410
+)
+)
+(1,79:17470647,39741410:398682,0,0
+$1,79:17470647,39741410
+(1,79:17390913,39741410:558150,0,0
+(1,79:17390913,39741410:558150,0,0
+$1,79:17390913,39741410
+(1,79:17390913,39741410:558150,418611,59802
+x1,79:17949063,39741410
+)
+$1,79:17949063,39741410
+)
+)
+$1,79:17869329,39741410
+)
+x1,79:18325165,39741410
+$1,79:18325165,39741410
+)
+]
+)
+g1,79:18524500,39741410
+h1,79:18524500,39741410:0,0,0
+)
+(1,79:18524500,39741410:6676835,551690,179404
+(1,79:18524500,39741410:550424,490372,0
+(1,79:18524500,39741410:550424,490372,0
+$1,79:18524500,39741410
+x1,79:19069380,39741410
+$1,79:19074924,39741410
+)
+)
+(1,79:19074924,39741410:0,0,0
+h1,79:19074924,39741410:0,0,0
+)
+(1,79:19074924,39741410:1056496,490372,0
+(1,79:19074924,39741410:1056496,490372,0
+x1,79:20131420,39741410
+)
+)
+(1,79:20131420,39741410:279075,538214,179404
+(1,79:20131420,39741410:279075,538214,179404
+x1,79:20410495,39741410
+)
+)
+(1,79:20410495,39741410:538215,490372,0
+(1,79:20410495,39741410:538215,490372,0
+x1,79:20948710,39741410
+)
+)
+(1,79:20948710,39741410:279075,538214,179404
+(1,79:20948710,39741410:279075,538214,179404
+x1,79:21227785,39741410
+)
+)
+(1,79:21227785,39741410:0,0,0
+h1,79:21227785,39741410:0,0,0
+)
+(1,79:21227785,39741410:558150,418611,59802
+x1,79:21785935,39741410
+)
+(1,79:21785935,39741410:1056496,490372,0
+(1,79:21785935,39741410:1056496,490372,0
+x1,79:22842431,39741410
+)
+)
+(1,79:22842431,39741410:279075,538214,179404
+(1,79:22842431,39741410:279075,538214,179404
+x1,79:23121506,39741410
+)
+)
+(1,79:23121506,39741410:508315,490372,0
+(1,79:23121506,39741410:508315,490372,0
+x1,79:23629821,39741410
+)
+)
+(1,79:23629821,39741410:279075,538214,179404
+(1,79:23629821,39741410:279075,538214,179404
+x1,79:23908896,39741410
+)
+)
+(1,79:23908896,39741410:0,0,0
+h1,79:23908896,39741410:0,0,0
+)
+(1,79:23908896,39741410:558150,418611,59802
+x1,79:24467046,39741410
+)
+(1,79:24467046,39741410:0,0,0
+h1,79:24467046,39741410:0,0,0
+)
+(1,79:24467046,39741410:734289,551690,0
+(1,79:24467046,39741410:734289,551690,0
+$1,79:24467046,39741410
+x1,79:25011926,39741410
+(1,79:25017470,39480992:183865,291272,0
+x1,79:25168567,39480992
+)
+$1,79:25201335,39741410
+)
+)
+(1,79:25201335,39741410:0,0,0
+h1,79:25201335,39741410:0,0,0
+)
+)
+$1,79:25201335,39741410
+k1,80:33572126,39741410:8370791
+g1,80:33572126,39741410
+)
+(1,81:9979166,41633196:23592960,642250,275254
+g1,81:12682526,41633196
+r1,81:12682526,41633196:0,917504,275254
+(1,81:12682526,41633196:0,642250,275254
+k1,81:9979166,41633196:-2703360
+(1,81:9979166,41633196:2703360,642250,275254
+x1,81:11797790,41633196
+g1,81:12682526,41633196
+r1,81:12682526,41633196:0,917504,275254
+g1,81:12682526,41633196
+)
+)
+x1,81:14682649,41633196
+g1,81:14977561,41633196
+x1,81:17822461,41633196
+x1,81:19272445,41633196
+r1,81:19272445,41633196:0,917504,275254
+k1,81:33572126,41633196:14299681
+g1,81:33572126,41633196
+)
+(1,84:9979166,42987947:23592960,551690,205512
+$1,82:9979166,42987947
+(1,82:9979166,42987947:3955855,551690,121595
+(1,82:9979166,42987947:550424,490372,0
+(1,82:9979166,42987947:550424,490372,0
+$1,82:9979166,42987947
+x1,82:10524046,42987947
+$1,82:10529590,42987947
+)
+)
+(1,82:10529590,42987947:0,0,0
+h1,82:10529590,42987947:0,0,0
+)
+(1,82:10529590,42987947:1056496,490372,0
+(1,82:10529590,42987947:1056496,490372,0
+x1,82:11586086,42987947
+)
+)
+(1,82:11586086,42987947:0,480404,0
+(1,82:11586086,42987947:558150,480404,0
+(1,82:11586086,42926154:558150,418611,59802
+$1,82:11586086,42926154
+x1,82:12144236,42926154
+$1,82:12144236,42926154
+)
+)
+k1,82:11586086,42987947:-558150
+)
+(1,82:11586086,42987947:558150,356818,121595
+(1,82:11586086,43049740:558150,418611,59802
+$1,82:11586086,43049740
+x1,82:12144236,43049740
+$1,82:12144236,43049740
+)
+)
+(1,82:12144236,42987947:1056496,490372,0
+(1,82:12144236,42987947:1056496,490372,0
+x1,82:13200732,42987947
+)
+)
+(1,82:13200732,42987947:734289,551690,0
+(1,82:13200732,42987947:734289,551690,0
+$1,82:13200732,42987947
+x1,82:13745612,42987947
+(1,82:13751156,42727529:183865,291272,0
+x1,82:13902253,42727529
+)
+$1,82:13935021,42987947
+)
+)
+(1,82:13935021,42987947:0,0,0
+h1,82:13935021,42987947:0,0,0
+)
+)
+k1,82:13969824,42987947:34803
+x1,82:14527974,42987947
+k1,82:14562777,42987947:34803
+h1,82:14562777,42987947:0,0,0
+(1,82:14562777,42987947:1255835,498346,0
+(1,82:14562777,42987947:1255835,498346,0
+x1,82:15818612,42987947
+)
+)
+(1,82:15818612,42987947:1549563,478561,0
+h1,82:15818612,42987947:0,0,0
+g1,82:16017947,42987947
+(1,82:16017947,42987947:1150893,478561,0
+[1,82:16017947,42987947:1150893,478561,0
+(1,82:16017947,42581148:1150893,0,0
+k1,82:16188161,42581148:170214
+g1,82:16905782,42581148
+k1,82:17168840,42581148:170214
+)
+(1,82:16017947,42987947:1150893,263276,0
+$1,82:16017947,42987947
+(1,82:16017947,42987947:558150,0,0
+(1,82:16017947,42987947:558150,0,0
+$1,82:16017947,42987947
+(1,82:16017947,42987947:558150,418611,59802
+x1,82:16576097,42987947
+)
+$1,82:16576097,42987947
+)
+)
+(1,82:16314322,42987947:398682,0,0
+$1,82:16314322,42987947
+(1,82:16234588,42987947:558150,0,0
+(1,82:16234588,42987947:558150,0,0
+$1,82:16234588,42987947
+(1,82:16234588,42987947:558150,418611,59802
+x1,82:16792738,42987947
+)
+$1,82:16792738,42987947
+)
+)
+$1,82:16713004,42987947
+)
+x1,82:17168840,42987947
+$1,82:17168840,42987947
+)
+]
+)
+g1,82:17368175,42987947
+h1,82:17368175,42987947:0,0,0
+)
+(1,82:17368175,42987947:4984775,551690,205512
+(1,82:17368175,42987947:550424,490372,0
+(1,82:17368175,42987947:550424,490372,0
+$1,82:17368175,42987947
+x1,82:17913055,42987947
+$1,82:17918599,42987947
+)
+)
+(1,82:17918599,42987947:0,0,0
+h1,82:17918599,42987947:0,0,0
+)
+(1,82:17918599,42987947:1056496,490372,0
+(1,82:17918599,42987947:1056496,490372,0
+x1,82:18975095,42987947
+)
+)
+[1,82:18975095,43193459:311300,507307,0
+(1,82:18975095,42686152:32768,0,54616
+h1,82:18975095,42686152:0,0,0
+h1,82:18975095,42686152:0,0,54616
+(1,82:18975095,42686152:0,0,0
+h1,82:18975095,42686152:0,0,0
+)
+)
+(1,82:18975095,43193459:311300,337875,0
+h1,82:18975095,43193459:0,0,0
+(1,82:18975095,43193459:278532,337875,0
+(1,82:18975095,43193459:278532,337875,0
+x1,82:19253627,43193459
+)
+)
+)
+]
+(1,82:19286395,42987947:558150,418611,59802
+x1,82:19844545,42987947
+)
+(1,82:19844545,42987947:0,0,0
+h1,82:19844545,42987947:0,0,0
+)
+(1,82:19844545,42987947:1774116,498346,0
+(1,82:19844545,42987947:1774116,498346,0
+x1,82:21618661,42987947
+)
+)
+(1,82:21618661,42987947:734289,551690,0
+(1,82:21618661,42987947:734289,551690,0
+$1,82:21618661,42987947
+x1,82:22163541,42987947
+(1,82:22169085,42727529:183865,291272,0
+x1,82:22320182,42727529
+)
+$1,82:22352950,42987947
+)
+)
+(1,82:22352950,42987947:0,0,0
+h1,82:22352950,42987947:0,0,0
+)
+)
+$1,82:22352950,42987947
+k1,82:22529823,42987947:176873
+k1,82:23965065,42987947:1435242
+x1,82:27094688,42987947
+k1,82:27271560,42987947:176872
+x1,82:29346679,42987947
+k1,82:29523552,42987947:176873
+x1,82:31199994,42987947
+x1,82:31538869,42987947
+x1,82:32874441,42987947
+x1,82:33213316,42987947
+x1,82:33572126,42987947
+k1,83:33572126,42987947:0
+k1,84:33572126,42987947:0
+)
+(1,84:9979166,43879237:23592960,498346,205512
+x1,84:11254935,43879237
+x1,83:12470902,43879237
+g1,83:12789843,43879237
+$1,83:12789843,43879237
+(1,83:12789843,43879237:4908388,490372,205512
+(1,83:12789843,43879237:1056496,490372,0
+(1,83:12789843,43879237:1056496,490372,0
+x1,83:13846339,43879237
+)
+)
+[1,83:13846339,44084749:311300,507307,0
+(1,83:13846339,43577442:32768,0,54616
+h1,83:13846339,43577442:0,0,0
+h1,83:13846339,43577442:0,0,54616
+(1,83:13846339,43577442:0,0,0
+h1,83:13846339,43577442:0,0,0
+)
+)
+(1,83:13846339,44084749:311300,337875,0
+h1,83:13846339,44084749:0,0,0
+(1,83:13846339,44084749:278532,337875,0
+(1,83:13846339,44084749:278532,337875,0
+x1,83:14124871,44084749
+)
+)
+)
+]
+(1,83:14157639,43879237:558150,418611,59802
+x1,83:14715789,43879237
+)
+(1,83:14715789,43879237:0,0,0
+h1,83:14715789,43879237:0,0,0
+)
+(1,83:14715789,43879237:1056496,490372,0
+(1,83:14715789,43879237:1056496,490372,0
+x1,83:15772285,43879237
+)
+)
+(1,83:15772285,43879237:0,480404,0
+(1,83:15772285,43879237:558150,480404,0
+(1,83:15772285,43817444:558150,418611,59802
+$1,83:15772285,43817444
+x1,83:16330435,43817444
+$1,83:16330435,43817444
+)
+)
+k1,83:15772285,43879237:-558150
+)
+(1,83:15772285,43879237:558150,356818,121595
+(1,83:15772285,43941030:558150,418611,59802
+$1,83:15772285,43941030
+x1,83:16330435,43941030
+$1,83:16330435,43941030
+)
+)
+(1,83:16330435,43879237:1056496,490372,0
+(1,83:16330435,43879237:1056496,490372,0
+x1,83:17386931,43879237
+)
+)
+[1,83:17386931,44084749:311300,507307,0
+(1,83:17386931,43577442:32768,0,54616
+h1,83:17386931,43577442:0,0,0
+h1,83:17386931,43577442:0,0,54616
+(1,83:17386931,43577442:0,0,0
+h1,83:17386931,43577442:0,0,0
+)
+)
+(1,83:17386931,44084749:311300,337875,0
+h1,83:17386931,44084749:0,0,0
+(1,83:17386931,44084749:278532,337875,0
+(1,83:17386931,44084749:278532,337875,0
+x1,83:17665463,44084749
+)
+)
+)
+]
+)
+g1,83:17857699,43879237
+x1,83:18415849,43879237
+g1,83:18575317,43879237
+h1,83:18575317,43879237:0,0,0
+(1,83:18575317,43879237:1255835,498346,0
+(1,83:18575317,43879237:1255835,498346,0
+x1,83:19831152,43879237
+)
+)
+(1,83:19831152,43879237:1549563,478561,0
+h1,83:19831152,43879237:0,0,0
+g1,83:20030487,43879237
+(1,83:20030487,43879237:1150893,478561,0
+[1,83:20030487,43879237:1150893,478561,0
+(1,83:20030487,43472438:1150893,0,0
+k1,83:20200701,43472438:170214
+g1,83:20918322,43472438
+k1,83:21181380,43472438:170214
+)
+(1,83:20030487,43879237:1150893,263276,0
+$1,83:20030487,43879237
+(1,83:20030487,43879237:558150,0,0
+(1,83:20030487,43879237:558150,0,0
+$1,83:20030487,43879237
+(1,83:20030487,43879237:558150,418611,59802
+x1,83:20588637,43879237
+)
+$1,83:20588637,43879237
+)
+)
+(1,83:20326862,43879237:398682,0,0
+$1,83:20326862,43879237
+(1,83:20247128,43879237:558150,0,0
+(1,83:20247128,43879237:558150,0,0
+$1,83:20247128,43879237
+(1,83:20247128,43879237:558150,418611,59802
+x1,83:20805278,43879237
+)
+$1,83:20805278,43879237
+)
+)
+$1,83:20725544,43879237
+)
+x1,83:21181380,43879237
+$1,83:21181380,43879237
+)
+]
+)
+g1,83:21380715,43879237
+h1,83:21380715,43879237:0,0,0
+)
+(1,83:21380715,43879237:5626008,498346,205512
+(1,83:21380715,43879237:1056496,490372,0
+(1,83:21380715,43879237:1056496,490372,0
+x1,83:22437211,43879237
+)
+)
+[1,83:22437211,44084749:311300,507307,0
+(1,83:22437211,43577442:32768,0,54616
+h1,83:22437211,43577442:0,0,0
+h1,83:22437211,43577442:0,0,54616
+(1,83:22437211,43577442:0,0,0
+h1,83:22437211,43577442:0,0,0
+)
+)
+(1,83:22437211,44084749:311300,337875,0
+h1,83:22437211,44084749:0,0,0
+(1,83:22437211,44084749:278532,337875,0
+(1,83:22437211,44084749:278532,337875,0
+x1,83:22715743,44084749
+)
+)
+)
+]
+(1,83:22748511,43879237:558150,418611,59802
+x1,83:23306661,43879237
+)
+(1,83:23306661,43879237:0,0,0
+h1,83:23306661,43879237:0,0,0
+)
+(1,83:23306661,43879237:1774116,498346,0
+(1,83:23306661,43879237:1774116,498346,0
+x1,83:25080777,43879237
+)
+)
+(1,83:25080777,43879237:558150,418611,59802
+x1,83:25638927,43879237
+)
+(1,83:25638927,43879237:1056496,490372,0
+(1,83:25638927,43879237:1056496,490372,0
+x1,83:26695423,43879237
+)
+)
+[1,83:26695423,44084749:311300,507307,0
+(1,83:26695423,43577442:32768,0,54616
+h1,83:26695423,43577442:0,0,0
+h1,83:26695423,43577442:0,0,54616
+(1,83:26695423,43577442:0,0,0
+h1,83:26695423,43577442:0,0,0
+)
+)
+(1,83:26695423,44084749:311300,337875,0
+h1,83:26695423,44084749:0,0,0
+(1,83:26695423,44084749:278532,337875,0
+(1,83:26695423,44084749:278532,337875,0
+x1,83:26973955,44084749
+)
+)
+)
+]
+)
+$1,83:27006723,43879237
+k1,84:33572126,43879237:6565403
+g1,84:33572126,43879237
+)
+]
+(1,88:9979166,45679049:23592960,0,0
+h1,88:9979166,45679049:23592960,0,0
+)
+]
+]
+!72125
+}6
+!10
+{7
+[1,115:4736286,45679049:25493504,40942763,0
+[1,115:6636830,45679049:23592960,39369899,0
+[1,115:6636830,7095582:23592960,786432,0
+(1,115:6636830,7095582:23592960,490372,0
+(1,115:6636830,7095582:23592960,490372,0
+x1,115:7753128,7095582
+g1,115:8072069,7095582
+g1,115:8311275,7095582
+x1,115:11082086,7095582
+g1,115:11321292,7095582
+x1,115:15168532,7095582
+k1,115:29870980,7095582:14702448
+x1,115:30229790,7095582
+)
+)
+]
+[1,115:6636830,43879237:23592960,35481206,0
+(1,85:6636830,9118927:23592960,642250,275254
+g1,85:9340190,9118927
+r1,85:9340190,9118927:0,917504,275254
+(1,85:9340190,9118927:0,642250,275254
+k1,85:6636830,9118927:-2703360
+(1,85:6636830,9118927:2703360,642250,275254
+x1,85:8455454,9118927
+g1,85:9340190,9118927
+r1,85:9340190,9118927:0,917504,275254
+g1,85:9340190,9118927
+)
+)
+x1,85:11340313,9118927
+g1,85:11635225,9118927
+x1,85:14377270,9118927
+x1,85:15827254,9118927
+r1,85:15827254,9118927:0,917504,275254
+k1,85:30229790,9118927:14402536
+g1,85:30229790,9118927
+)
+(1,87:6636830,10863403:23592960,940225,231726
+$1,86:6636830,10863403
+(1,86:6636830,10863403:2681109,490372,121595
+(1,86:6636830,10863403:1564809,490372,0
+(1,86:6636830,10863403:1564809,490372,0
+x1,86:7165078,10863403
+x1,86:8201639,10863403
+)
+)
+(1,86:8201639,10863403:0,480404,0
+(1,86:8201639,10863403:558150,480404,0
+(1,86:8201639,10801610:558150,418611,59802
+$1,86:8201639,10801610
+x1,86:8759789,10801610
+$1,86:8759789,10801610
+)
+)
+k1,86:8201639,10863403:-558150
+)
+(1,86:8201639,10863403:558150,356818,121595
+(1,86:8201639,10925196:558150,418611,59802
+$1,86:8201639,10925196
+x1,86:8759789,10925196
+$1,86:8759789,10925196
+)
+)
+(1,86:8759789,10863403:558150,490372,0
+(1,86:8759789,10863403:558150,490372,0
+x1,86:9317939,10863403
+)
+)
+)
+g1,86:9477407,10863403
+x1,86:10035557,10863403
+g1,86:10195025,10863403
+h1,86:10195025,10863403:0,0,0
+(1,86:10195025,10863403:2468538,551690,139537
+(1,86:10195025,10863403:734289,551690,0
+(1,86:10195025,10863403:734289,551690,0
+$1,86:10195025,10863403
+x1,86:10739905,10863403
+(1,86:10745449,10602985:183865,291272,0
+x1,86:10896546,10602985
+)
+$1,86:10929314,10863403
+)
+)
+(1,86:10929314,10863403:0,0,0
+h1,86:10929314,10863403:0,0,0
+)
+(1,86:10929314,10863403:1734249,498346,139537
+(1,86:10929314,10863403:1734249,498346,139537
+x1,86:12663563,10863403
+)
+)
+)
+(1,86:12663563,10863403:1549563,478561,0
+h1,86:12663563,10863403:0,0,0
+g1,86:12862898,10863403
+(1,86:12862898,10863403:1150893,478561,0
+[1,86:12862898,10863403:1150893,478561,0
+(1,86:12862898,10456604:1150893,0,0
+k1,86:13033112,10456604:170214
+g1,86:13750733,10456604
+k1,86:14013791,10456604:170214
+)
+(1,86:12862898,10863403:1150893,263276,0
+$1,86:12862898,10863403
+(1,86:12862898,10863403:558150,0,0
+(1,86:12862898,10863403:558150,0,0
+$1,86:12862898,10863403
+(1,86:12862898,10863403:558150,418611,59802
+x1,86:13421048,10863403
+)
+$1,86:13421048,10863403
+)
+)
+(1,86:13159273,10863403:398682,0,0
+$1,86:13159273,10863403
+(1,86:13079539,10863403:558150,0,0
+(1,86:13079539,10863403:558150,0,0
+$1,86:13079539,10863403
+(1,86:13079539,10863403:558150,418611,59802
+x1,86:13637689,10863403
+)
+$1,86:13637689,10863403
+)
+)
+$1,86:13557955,10863403
+)
+x1,86:14013791,10863403
+$1,86:14013791,10863403
+)
+]
+)
+g1,86:14213126,10863403
+h1,86:14213126,10863403:0,0,0
+)
+(1,86:14213126,10863403:5149647,551690,179404
+(1,86:14213126,10863403:1564809,490372,0
+(1,86:14213126,10863403:1564809,490372,0
+x1,86:14741374,10863403
+x1,86:15777935,10863403
+)
+)
+(1,86:15777935,10863403:279075,538214,179404
+(1,86:15777935,10863403:279075,538214,179404
+x1,86:16057010,10863403
+)
+)
+(1,86:16057010,10863403:2292399,498346,139537
+(1,86:16057010,10863403:2292399,498346,139537
+x1,86:18349409,10863403
+)
+)
+(1,86:18349409,10863403:279075,538214,179404
+(1,86:18349409,10863403:279075,538214,179404
+x1,86:18628484,10863403
+)
+)
+(1,86:18628484,10863403:0,0,0
+h1,86:18628484,10863403:0,0,0
+)
+(1,86:18628484,10863403:734289,551690,0
+(1,86:18628484,10863403:734289,551690,0
+$1,86:18628484,10863403
+x1,86:19173364,10863403
+(1,86:19178908,10602985:183865,291272,0
+x1,86:19330005,10602985
+)
+$1,86:19362773,10863403
+)
+)
+(1,86:19362773,10863403:0,0,0
+h1,86:19362773,10863403:0,0,0
+)
+)
+(1,86:19362773,10863403:1955529,940225,0
+h1,86:19362773,10863403:0,0,0
+g1,86:19562108,10863403
+(1,86:19562108,10863403:1556859,940225,0
+[1,86:19562108,10863403:1556859,940225,0
+(1,86:19562108,10353203:1556859,358263,167189
+k1,86:19732322,10353203:170214
+(1,86:19732322,10353203:1123587,358263,167189
+(1,86:19732322,10353203:417252,358263,0
+(1,86:19732322,10353203:417252,358263,0
+x1,86:20149574,10353203
+)
+)
+[1,86:20149574,10520392:273063,402389,0
+(1,86:20149574,10118003:32768,0,54612
+h1,86:20149574,10118003:0,0,0
+h1,86:20149574,10118003:0,0,54612
+(1,86:20149574,10118003:0,0,0
+h1,86:20149574,10118003:0,0,0
+)
+)
+(1,86:20149574,10520392:273063,253405,0
+h1,86:20149574,10520392:0,0,0
+(1,86:20149574,10520392:240295,253405,0
+(1,86:20149574,10520392:240295,253405,0
+x1,86:20389869,10520392
+)
+)
+)
+]
+(1,86:20422637,10353203:433272,358263,0
+(1,86:20422637,10353203:433272,358263,0
+x1,86:20855909,10353203
+)
+)
+)
+k1,86:21118967,10353203:170214
+)
+(1,86:19562108,10863403:1556859,263276,0
+$1,86:19562108,10863403
+(1,86:19562108,10863403:558150,0,0
+(1,86:19562108,10863403:558150,0,0
+$1,86:19562108,10863403
+(1,86:19562108,10863403:558150,418611,59802
+x1,86:20120258,10863403
+)
+$1,86:20120258,10863403
+)
+)
+(1,86:19862125,10863403:398682,0,0
+$1,86:19862125,10863403
+(1,86:19782391,10863403:558150,0,0
+(1,86:19782391,10863403:558150,0,0
+$1,86:19782391,10863403
+(1,86:19782391,10863403:558150,418611,59802
+x1,86:20340541,10863403
+)
+$1,86:20340541,10863403
+)
+)
+$1,86:20260807,10863403
+)
+(1,86:20260807,10863403:398682,0,0
+(1,86:20181073,10863403:558150,0,0
+(1,86:20181073,10863403:558150,0,0
+(1,86:20181073,10863403:558150,418611,59802
+x1,86:20739223,10863403
+)
+)
+)
+)
+x1,86:21118967,10863403
+$1,86:21118967,10863403
+)
+]
+)
+g1,86:21318302,10863403
+h1,86:21318302,10863403:0,0,0
+h1,86:21318302,10863403:0,0,0
+)
+(1,86:21318302,10863403:3935080,538214,231726
+(1,86:21318302,10863403:1564809,490372,0
+(1,86:21318302,10863403:1564809,490372,0
+x1,86:21846550,10863403
+x1,86:22883111,10863403
+)
+)
+(1,86:22883111,10863403:279075,538214,179404
+(1,86:22883111,10863403:279075,538214,179404
+x1,86:23162186,10863403
+)
+)
+(1,86:23162186,10863403:1096365,490372,0
+(1,86:23162186,10863403:1096365,490372,0
+x1,86:24258551,10863403
+)
+)
+(1,86:24258551,10863403:279075,538214,179404
+(1,86:24258551,10863403:279075,538214,179404
+x1,86:24537626,10863403
+)
+)
+(1,86:24537626,10863403:528248,490372,0
+(1,86:24537626,10863403:528248,490372,0
+x1,86:25065874,10863403
+)
+)
+[1,86:25065874,11095129:187508,533521,0
+(1,86:25065874,10561608:32768,0,54616
+h1,86:25065874,10561608:0,0,0
+h1,86:25065874,10561608:0,0,54616
+(1,86:25065874,10561608:0,0,0
+h1,86:25065874,10561608:0,0,0
+)
+)
+(1,86:25065874,11095129:187508,364089,0
+h1,86:25065874,11095129:0,0,0
+(1,86:25065874,11095129:154740,364089,0
+(1,86:25065874,11095129:154740,364089,0
+x1,86:25220614,11095129
+)
+)
+)
+]
+)
+g1,86:25412850,10863403
+x1,86:25971000,10863403
+g1,86:26130468,10863403
+h1,86:26130468,10863403:0,0,0
+(1,86:26130468,10863403:2830614,498346,139537
+(1,86:26130468,10863403:2830614,498346,139537
+x1,86:28961082,10863403
+)
+)
+$1,86:28961082,10863403
+k1,87:30229790,10863403:1268708
+g1,87:30229790,10863403
+)
+(1,88:6636830,12740590:23592960,642250,275254
+g1,88:9340190,12740590
+r1,88:9340190,12740590:0,917504,275254
+(1,88:9340190,12740590:0,642250,275254
+k1,88:6636830,12740590:-2703360
+(1,88:6636830,12740590:2703360,642250,275254
+x1,88:8455454,12740590
+g1,88:9340190,12740590
+r1,88:9340190,12740590:0,917504,275254
+g1,88:9340190,12740590
+)
+)
+x1,88:11340313,12740590
+g1,88:11635225,12740590
+x1,88:13929441,12740590
+x1,88:14556129,12740590
+g1,88:14851041,12740590
+x1,88:17154268,12740590
+r1,88:17154268,12740590:0,917504,275254
+k1,88:30229790,12740590:13075522
+g1,88:30229790,12740590
+)
+(1,90:6636830,14095341:23592960,498346,139537
+x1,90:9826255,14095341
+g1,89:10065461,14095341
+x1,89:12140580,14095341
+g1,89:12379786,14095341
+x1,89:13137274,14095341
+x1,89:13834959,14095341
+x1,89:15511401,14095341
+x1,89:15850276,14095341
+x1,89:17185848,14095341
+x1,89:17524723,14095341
+x1,89:17883533,14095341
+k1,90:30229790,14095341:12346257
+g1,90:30229790,14095341
+)
+(1,91:6636830,16311916:23592960,825750,353898
+g1,91:9055105,16311916
+r1,91:9055105,16311916:0,1179648,353898
+(1,91:9055105,16311916:0,825750,353898
+k1,91:6636830,16311916:-2418275
+(1,91:6636830,16311916:2418275,825750,353898
+x1,91:7993423,16311916
+g1,91:9055105,16311916
+r1,91:9055105,16311916:0,1179648,353898
+g1,91:9055105,16311916
+)
+)
+x1,91:12121533,16311916
+g1,91:12475427,16311916
+x1,91:16761366,16311916
+r1,91:16761366,16311916:0,1179648,353898
+k1,91:30229790,16311916:13468424
+g1,91:30229790,16311916
+)
+(1,93:6636830,17913847:23592960,498346,139537
+x1,93:9048833,17913847
+x1,92:9766453,17913847
+k1,92:10009392,17913847:242939
+x1,92:11247287,17913847
+k1,92:11490227,17913847:242940
+x1,92:13310192,17913847
+k1,92:13553131,17913847:242939
+x1,92:15191697,17913847
+k1,92:15521839,17913847:330142
+x1,92:17588984,17913847
+k1,92:17831923,17913847:242939
+x1,92:20586787,17913847
+k1,92:20829727,17913847:242940
+x1,92:21208472,17913847
+x1,92:22304835,17913847
+k1,92:22547774,17913847:242939
+x1,92:24062750,17913847
+x1,92:24441493,17913847
+x1,92:25179047,17913847
+x1,92:26215610,17913847
+k1,92:26458550,17913847:242940
+x1,92:27036634,17913847
+x1,92:28392139,17913847
+k1,92:28635078,17913847:242939
+$1,92:28635078,17913847
+(1,92:28635078,17913847:1594712,490372,121595
+(1,92:28635078,17913847:518281,490372,0
+(1,92:28635078,17913847:518281,490372,0
+x1,92:29153359,17913847
+)
+)
+(1,92:29153359,17913847:0,480404,0
+(1,92:29153359,17913847:558150,480404,0
+(1,92:29153359,17852054:558150,418611,59802
+$1,92:29153359,17852054
+x1,92:29711509,17852054
+$1,92:29711509,17852054
+)
+)
+k1,92:29153359,17913847:-558150
+)
+(1,92:29153359,17913847:558150,356818,121595
+(1,92:29153359,17975640:558150,418611,59802
+$1,92:29153359,17975640
+x1,92:29711509,17975640
+$1,92:29711509,17975640
+)
+)
+(1,92:29711509,17913847:518281,490372,0
+(1,92:29711509,17913847:518281,490372,0
+x1,92:30229790,17913847
+)
+)
+)
+$1,92:30229790,17913847
+k1,93:30229790,17913847:0
+)
+(1,93:6636830,18805137:23592960,542198,183389
+x1,93:8032203,18805137
+g1,92:8271409,18805137
+$1,92:8271409,18805137
+(1,92:8271409,18805137:1594712,542198,183389
+(1,92:8271409,18805137:518281,490372,0
+(1,92:8271409,18805137:518281,490372,0
+x1,92:8789690,18805137
+)
+)
+(1,92:8789690,18805137:558150,542198,183389
+(1,92:8789690,18805137:0,542198,0
+(1,92:8789690,18805137:558150,542198,0
+(1,92:8789690,18681550:558150,418611,59802
+$1,92:8789690,18681550
+x1,92:9347840,18681550
+$1,92:9347840,18681550
+)
+)
+k1,92:8789690,18805137:-558150
+)
+(1,92:8789690,18805137:0,418611,59802
+$1,92:8789690,18805137
+x1,92:9347840,18805137
+$1,92:9347840,18805137
+k1,92:8789690,18805137:-558150
+)
+(1,92:8789690,18805137:558150,295024,183389
+(1,92:8789690,18928724:558150,418611,59802
+$1,92:8789690,18928724
+x1,92:9347840,18928724
+$1,92:9347840,18928724
+)
+)
+)
+(1,92:9347840,18805137:518281,490372,0
+(1,92:9347840,18805137:518281,490372,0
+x1,92:9866121,18805137
+)
+)
+)
+$1,92:9866121,18805137
+g1,92:10105327,18805137
+x1,92:11704025,18805137
+g1,92:11943231,18805137
+x1,92:12341909,18805137
+x1,92:13340598,18805137
+x1,92:14676168,18805137
+x1,92:15975858,18805137
+g1,92:16215064,18805137
+x1,92:18447660,18805137
+g1,92:18686866,18805137
+x1,92:20506831,18805137
+g1,92:20746037,18805137
+x1,92:23748082,18805137
+g1,92:23987288,18805137
+x1,92:24385966,18805137
+x1,92:26020545,18805137
+x1,92:27395985,18805137
+k1,93:30229790,18805137:2833805
+g1,93:30229790,18805137
+)
+(1,94:6636830,21021711:23592960,825750,353898
+g1,94:9055105,21021711
+r1,94:9055105,21021711:0,1179648,353898
+(1,94:9055105,21021711:0,825750,353898
+k1,94:6636830,21021711:-2418275
+(1,94:6636830,21021711:2418275,825750,353898
+x1,94:7993423,21021711
+g1,94:9055105,21021711
+r1,94:9055105,21021711:0,1179648,353898
+g1,94:9055105,21021711
+)
+)
+x1,94:12121533,21021711
+g1,94:12475427,21021711
+x1,94:15851513,21021711
+r1,94:15851513,21021711:0,1179648,353898
+k1,94:30229790,21021711:14378277
+g1,94:30229790,21021711
+)
+(1,96:6636830,22623642:23592960,498346,205512
+x1,96:7753128,22623642
+x1,95:8111938,22623642
+x1,95:8450813,22623642
+x1,95:8949159,22623642
+x1,95:9288034,22623642
+k1,95:9447505,22623642:159471
+x1,95:9826250,22623642
+x1,95:10426260,22623642
+x1,95:10824938,22623642
+x1,95:11602360,22623642
+k1,95:11761831,22623642:159471
+x1,95:12359848,22623642
+x1,95:12959858,22623642
+x1,95:13697413,22623642
+x1,95:14179813,22623642
+x1,95:14558558,22623642
+x1,95:15276178,22623642
+k1,95:15435649,22623642:159471
+x1,95:16153269,22623642
+x1,95:17668245,22623642
+k1,95:17827716,22623642:159471
+x1,95:18565271,22623642
+x1,95:19047671,22623642
+x1,95:19805159,22623642
+x1,95:20724112,22623642
+k1,95:20883583,22623642:159471
+x1,95:22278956,22623642
+k1,95:22438427,22623642:159471
+x1,95:23038437,22623642
+x1,95:24214538,22623642
+x1,95:25332830,22623642
+k1,95:25508248,22623642:175418
+x1,95:26110251,22623642
+x1,95:26508929,22623642
+x1,95:27128873,22623642
+x1,95:27607287,22623642
+k1,95:27766758,22623642:159471
+$1,95:27766758,22623642
+(1,95:27766758,22623642:2484097,490372,205512
+(1,95:27766758,22623642:2172797,490372,0
+(1,95:27766758,22623642:2172797,490372,0
+x1,95:29939555,22623642
+)
+)
+[1,95:29939555,22829154:311300,507307,0
+(1,95:29939555,22321847:32768,0,54616
+h1,95:29939555,22321847:0,0,0
+h1,95:29939555,22321847:0,0,54616
+(1,95:29939555,22321847:0,0,0
+h1,95:29939555,22321847:0,0,0
+)
+)
+(1,95:29939555,22829154:311300,337875,0
+h1,95:29939555,22829154:0,0,0
+(1,95:29939555,22829154:278532,337875,0
+(1,95:29939555,22829154:278532,337875,0
+x1,95:30218087,22829154
+)
+)
+)
+]
+)
+$1,95:30250855,22623642
+x1,95:30450194,22623642
+k1,95:30450194,22623642:0
+)
+(1,96:6636830,23514932:23592960,498346,205512
+(1,95:6636830,23514932:2849549,490372,205512
+(1,95:6636830,23514932:558150,490372,0
+(1,95:6636830,23514932:558150,490372,0
+x1,95:7194980,23514932
+)
+)
+[1,95:7194980,23720444:311300,507307,0
+(1,95:7194980,23213137:32768,0,54616
+h1,95:7194980,23213137:0,0,0
+h1,95:7194980,23213137:0,0,54616
+(1,95:7194980,23213137:0,0,0
+h1,95:7194980,23213137:0,0,0
+)
+)
+(1,95:7194980,23720444:311300,337875,0
+h1,95:7194980,23720444:0,0,0
+(1,95:7194980,23720444:278532,337875,0
+(1,95:7194980,23720444:278532,337875,0
+x1,95:7473512,23720444
+)
+)
+)
+]
+(1,95:7506280,23514932:799349,490372,0
+(1,95:7506280,23514932:799349,490372,0
+x1,95:8305629,23514932
+)
+)
+[1,95:8305629,23720444:311300,507307,0
+(1,95:8305629,23213137:32768,0,54616
+h1,95:8305629,23213137:0,0,0
+h1,95:8305629,23213137:0,0,54616
+(1,95:8305629,23213137:0,0,0
+h1,95:8305629,23213137:0,0,0
+)
+)
+(1,95:8305629,23720444:311300,337875,0
+h1,95:8305629,23720444:0,0,0
+(1,95:8305629,23720444:278532,337875,0
+(1,95:8305629,23720444:278532,337875,0
+x1,95:8584161,23720444
+)
+)
+)
+]
+(1,95:8616929,23514932:558150,490372,0
+(1,95:8616929,23514932:558150,490372,0
+x1,95:9175079,23514932
+)
+)
+[1,95:9175079,23720444:311300,507307,0
+(1,95:9175079,23213137:32768,0,54616
+h1,95:9175079,23213137:0,0,0
+h1,95:9175079,23213137:0,0,54616
+(1,95:9175079,23213137:0,0,0
+h1,95:9175079,23213137:0,0,0
+)
+)
+(1,95:9175079,23720444:311300,337875,0
+h1,95:9175079,23720444:0,0,0
+(1,95:9175079,23720444:278532,337875,0
+(1,95:9175079,23720444:278532,337875,0
+x1,95:9453611,23720444
+)
+)
+)
+]
+)
+$1,95:9486379,23514932
+x1,95:9685718,23514932
+g1,95:9924924,23514932
+x1,95:10323602,23514932
+x1,95:10943546,23514932
+x1,95:11262488,23514932
+x1,95:12000043,23514932
+x1,95:12482443,23514932
+g1,95:12721649,23514932
+x1,95:13190096,23514932
+x1,95:13847913,23514932
+x1,95:15203418,23514932
+g1,95:15442624,23514932
+x1,95:16269881,23514932
+x1,95:16987501,23514932
+x1,95:17585518,23514932
+x1,95:18382874,23514932
+g1,95:18622080,23514932
+x1,95:19618775,23514932
+k1,96:30229790,23514932:10611015
+g1,96:30229790,23514932
+)
+(1,97:6636830,25392119:23592960,642250,275254
+g1,97:9340190,25392119
+r1,97:9340190,25392119:0,917504,275254
+(1,97:9340190,25392119:0,642250,275254
+k1,97:6636830,25392119:-2703360
+(1,97:6636830,25392119:2703360,642250,275254
+x1,97:8455454,25392119
+g1,97:9340190,25392119
+r1,97:9340190,25392119:0,917504,275254
+g1,97:9340190,25392119
+)
+)
+x1,97:12582675,25392119
+r1,97:12582675,25392119:0,917504,275254
+k1,97:30229790,25392119:17647115
+g1,97:30229790,25392119
+)
+(1,98:6636830,26820270:23592960,623900,267389
+r1,98:6636830,26820270:0,891289,267389
+x1,98:9378715,26820270
+g1,98:9653800,26820270
+x1,98:10217925,26820270
+x1,98:14261682,26820270
+g1,98:14536767,26820270
+x1,98:16958716,26820270
+r1,98:16958716,26820270:0,891289,267389
+k1,98:30229790,26820270:13271074
+g1,98:30229790,26820270
+)
+(1,100:6636830,28175021:23592960,620716,179404
+x1,100:7976388,28175021
+g1,99:8295329,28175021
+x1,99:8694007,28175021
+x1,99:10852848,28175021
+g1,99:11092054,28175021
+x1,99:11560501,28175021
+x1,99:13374484,28175021
+g1,99:13613690,28175021
+x1,99:13892765,28175021
+$1,99:13892765,28175021
+(1,99:13892765,28175021:1754394,620716,177407
+(1,99:13892765,28175021:916959,490372,0
+(1,99:13892765,28175021:916959,490372,0
+x1,99:14809724,28175021
+)
+)
+[1,99:14809724,28352428:837435,798123,0
+(1,99:14809724,27892180:837435,337875,54616
+h1,99:14809724,27892180:0,0,0
+h1,99:14809724,27892180:0,0,54616
+(1,99:14809724,27892180:804667,337875,54616
+(1,99:14809724,27892180:804667,337875,54616
+x1,99:15614391,27892180
+)
+)
+)
+(1,99:14809724,28352428:32768,0,0
+h1,99:14809724,28352428:0,0,0
+(1,99:14809724,28352428:0,0,0
+h1,99:14809724,28352428:0,0,0
+)
+)
+]
+)
+$1,99:15647159,28175021
+x1,99:16125573,28175021
+g1,99:16364779,28175021
+x1,99:19305029,28175021
+g1,99:19544235,28175021
+x1,99:20062516,28175021
+x1,99:21760882,28175021
+g1,99:22000088,28175021
+x1,99:22279163,28175021
+$1,99:22279163,28175021
+(1,99:22279163,28175021:1363065,599601,177407
+(1,99:22279163,28175021:897025,490372,139537
+(1,99:22279163,28175021:897025,490372,139537
+x1,99:23176188,28175021
+)
+)
+[1,99:23176188,28352428:466040,777008,0
+(1,99:23176188,27892180:466040,316760,54616
+h1,99:23176188,27892180:0,0,0
+h1,99:23176188,27892180:0,0,54616
+(1,99:23176188,27892180:433272,316760,54616
+(1,99:23176188,27892180:433272,316760,54616
+x1,99:23609460,27892180
+)
+)
+)
+(1,99:23176188,28352428:32768,0,0
+h1,99:23176188,28352428:0,0,0
+(1,99:23176188,28352428:0,0,0
+h1,99:23176188,28352428:0,0,0
+)
+)
+]
+)
+$1,99:23642228,28175021
+x1,99:24120642,28175021
+k1,100:30229790,28175021:6109148
+g1,100:30229790,28175021
+)
+(1,102:6636830,29504148:23592960,623900,267389
+g1,102:12639136,29504148
+(1,102:12639136,29504148:11588347,623900,267389
+g1,102:12639136,29504148
+(1,102:12639136,29504148:0,623900,267389
+[1,102:12639136,29504148:0,623900,267389
+(1,21:12639136,29504148:0,623900,267389
+r1,102:12639136,29504148:0,891289,267389
+)
+]
+)
+(1,102:12639136,29504148:11588347,613059,177407
+$1,102:12639136,29504148
+(1,102:12639136,29504148:11588347,613059,177407
+h1,102:12639136,29504148:0,0,0
+(1,102:12639136,29504148:11588347,613059,177407
+(1,102:12639136,29504148:2723220,490372,59802
+(1,102:12639136,29504148:550424,490372,0
+(1,102:12639136,29504148:550424,490372,0
+$1,102:12639136,29504148
+x1,102:13184016,29504148
+$1,102:13189560,29504148
+)
+)
+h1,102:13189560,29504148:0,0,0
+(1,102:13189560,29504148:558150,418611,59802
+x1,102:13747710,29504148
+)
+h1,102:13747710,29504148:0,0,0
+(1,102:13747710,29504148:1614646,490372,0
+x1,102:15362356,29504148
+)
+)
+g1,102:15521824,29504148
+x1,102:16079974,29504148
+g1,102:16239442,29504148
+h1,102:16239442,29504148:0,0,0
+(1,102:16239442,29504148:1373031,613059,177407
+(1,102:16239442,29504148:906991,490372,139537
+x1,102:17136467,29504148
+)
+[1,102:17146433,29681555:466040,790466,0
+(1,102:17146433,29207849:466040,316760,54616
+h1,102:17146433,29207849:0,0,0
+h1,102:17146433,29207849:0,0,54616
+(1,102:17146433,29207849:433272,316760,54616
+x1,102:17579705,29207849
+)
+)
+(1,102:17146433,29681555:32768,0,0
+h1,102:17146433,29681555:0,0,0
+h1,102:17146433,29681555:0,0,0
+)
+]
+)
+(1,102:17612473,29504148:1549563,478561,0
+h1,102:17612473,29504148:0,0,0
+g1,102:17811808,29504148
+(1,102:17811808,29504148:1150893,478561,0
+[1,102:17811808,29504148:1150893,478561,0
+(1,102:17811808,29097349:1150893,0,0
+k1,102:17982022,29097349:170214
+g1,102:18699643,29097349
+k1,102:18962701,29097349:170214
+)
+(1,102:17811808,29504148:1150893,263276,0
+$1,102:17811808,29504148
+(1,102:17811808,29504148:558150,0,0
+(1,102:17811808,29504148:558150,0,0
+$1,102:17811808,29504148
+(1,102:17811808,29504148:558150,418611,59802
+x1,102:18369958,29504148
+)
+$1,102:18369958,29504148
+)
+)
+(1,102:18108183,29504148:398682,0,0
+$1,102:18108183,29504148
+(1,102:18028449,29504148:558150,0,0
+(1,102:18028449,29504148:558150,0,0
+$1,102:18028449,29504148
+(1,102:18028449,29504148:558150,418611,59802
+x1,102:18586599,29504148
+)
+$1,102:18586599,29504148
+)
+)
+$1,102:18506865,29504148
+)
+x1,102:18962701,29504148
+$1,102:18962701,29504148
+)
+]
+)
+g1,102:19162036,29504148
+h1,102:19162036,29504148:0,0,0
+)
+(1,102:19162036,29504148:3281370,490372,59802
+(1,102:19162036,29504148:550424,490372,0
+(1,102:19162036,29504148:550424,490372,0
+$1,102:19162036,29504148
+x1,102:19706916,29504148
+$1,102:19712460,29504148
+)
+)
+h1,102:19712460,29504148:0,0,0
+(1,102:19712460,29504148:558150,418611,59802
+x1,102:20270610,29504148
+)
+h1,102:20270610,29504148:0,0,0
+(1,102:20270610,29504148:2172796,490372,0
+x1,102:22443406,29504148
+)
+)
+g1,102:22602874,29504148
+x1,102:23161024,29504148
+g1,102:23320492,29504148
+h1,102:23320492,29504148:0,0,0
+(1,102:23320492,29504148:906991,490372,139537
+x1,102:24217517,29504148
+)
+)
+)
+$1,102:24227483,29504148
+)
+)
+g1,102:24227483,29504148
+(1,102:24227483,29504148:0,623900,267389
+(1,102:24227483,29504148:0,0,0
+$1,102:24227483,29504148
+h1,102:24227483,29504148:0,0,0
+$1,102:24227483,29504148
+)
+g1,102:24227483,29504148
+)
+g1,102:30229789,29504148
+(1,102:30229789,29504148:1,623900,267389
+(1,102:30229790,29504148:0,623900,267389
+k1,102:28754681,29504148:-1475109
+(1,102:28754681,29504148:1475109,623900,267389
+(1,102:28754681,29504148:0,623900,267389
+[1,102:28754681,29504148:0,623900,267389
+(1,21:28754681,29504148:0,623900,267389
+r1,102:28754681,29504148:0,891289,267389
+)
+]
+)
+(1,102:28754681,29504148:1475109,538214,179404
+x1,102:29950715,29504148
+x1,102:30229790,29504148
+)
+)
+)
+)
+g1,102:30229790,29504148
+)
+(1,104:6636830,31355120:23592960,623900,267389
+r1,104:6636830,31355120:0,891289,267389
+x1,104:9378715,31355120
+g1,104:9653800,31355120
+x1,104:10217925,31355120
+x1,104:14261682,31355120
+g1,104:14536767,31355120
+x1,104:17104232,31355120
+r1,104:17104232,31355120:0,891289,267389
+k1,104:30229790,31355120:13125558
+g1,104:30229790,31355120
+)
+(1,107:6636830,32709871:23592960,490372,205512
+x1,107:7976388,32709871
+g1,105:8295329,32709871
+$1,105:8295329,32709871
+(1,105:8295329,32709871:2849549,490372,205512
+(1,105:8295329,32709871:558150,490372,0
+(1,105:8295329,32709871:558150,490372,0
+x1,105:8853479,32709871
+)
+)
+[1,105:8853479,32915383:311300,507307,0
+(1,105:8853479,32408076:32768,0,54616
+h1,105:8853479,32408076:0,0,0
+h1,105:8853479,32408076:0,0,54616
+(1,105:8853479,32408076:0,0,0
+h1,105:8853479,32408076:0,0,0
+)
+)
+(1,105:8853479,32915383:311300,337875,0
+h1,105:8853479,32915383:0,0,0
+(1,105:8853479,32915383:278532,337875,0
+(1,105:8853479,32915383:278532,337875,0
+x1,105:9132011,32915383
+)
+)
+)
+]
+(1,105:9164779,32709871:799349,490372,0
+(1,105:9164779,32709871:799349,490372,0
+x1,105:9964128,32709871
+)
+)
+[1,105:9964128,32915383:311300,507307,0
+(1,105:9964128,32408076:32768,0,54616
+h1,105:9964128,32408076:0,0,0
+h1,105:9964128,32408076:0,0,54616
+(1,105:9964128,32408076:0,0,0
+h1,105:9964128,32408076:0,0,0
+)
+)
+(1,105:9964128,32915383:311300,337875,0
+h1,105:9964128,32915383:0,0,0
+(1,105:9964128,32915383:278532,337875,0
+(1,105:9964128,32915383:278532,337875,0
+x1,105:10242660,32915383
+)
+)
+)
+]
+(1,105:10275428,32709871:558150,490372,0
+(1,105:10275428,32709871:558150,490372,0
+x1,105:10833578,32709871
+)
+)
+[1,105:10833578,32915383:311300,507307,0
+(1,105:10833578,32408076:32768,0,54616
+h1,105:10833578,32408076:0,0,0
+h1,105:10833578,32408076:0,0,54616
+(1,105:10833578,32408076:0,0,0
+h1,105:10833578,32408076:0,0,0
+)
+)
+(1,105:10833578,32915383:311300,337875,0
+h1,105:10833578,32915383:0,0,0
+(1,105:10833578,32915383:278532,337875,0
+(1,105:10833578,32915383:278532,337875,0
+x1,105:11112110,32915383
+)
+)
+)
+]
+)
+$1,105:11144878,32709871
+k1,106:30229790,32709871:19084912
+g1,107:30229790,32709871
+)
+(1,107:6636830,33601161:23592960,498346,139537
+x1,107:7753129,33601161
+x1,106:9048831,33601161
+g1,106:9288037,33601161
+x1,106:11365149,33601161
+g1,106:11604355,33601161
+x1,106:12760521,33601161
+g1,106:12999727,33601161
+x1,106:13936621,33601161
+x1,106:15232323,33601161
+g1,106:15471529,33601161
+x1,106:18248321,33601161
+g1,106:18487527,33601161
+x1,106:18886205,33601161
+x1,106:21060993,33601161
+g1,106:21300199,33601161
+x1,106:23791936,33601161
+g1,106:24031142,33601161
+x1,106:24409887,33601161
+x1,106:25408575,33601161
+x1,106:26784014,33601161
+k1,107:30229790,33601161:3445776
+g1,107:30229790,33601161
+)
+(1,108:6636830,35452134:23592960,623900,267389
+r1,108:6636830,35452134:0,891289,267389
+x1,108:9378715,35452134
+g1,108:9653800,35452134
+x1,108:10217925,35452134
+x1,108:14261682,35452134
+g1,108:14536767,35452134
+x1,108:16364192,35452134
+r1,108:16364192,35452134:0,891289,267389
+k1,108:30229790,35452134:13865598
+g1,108:30229790,35452134
+)
+(1,112:6636830,36806885:23592960,490372,205512
+x1,112:7976388,36806885
+g1,109:8295329,36806885
+$1,109:8295329,36806885
+(1,109:8295329,36806885:2484097,490372,205512
+(1,109:8295329,36806885:2172797,490372,0
+(1,109:8295329,36806885:2172797,490372,0
+x1,109:10468126,36806885
+)
+)
+[1,109:10468126,37012397:311300,507307,0
+(1,109:10468126,36505090:32768,0,54616
+h1,109:10468126,36505090:0,0,0
+h1,109:10468126,36505090:0,0,54616
+(1,109:10468126,36505090:0,0,0
+h1,109:10468126,36505090:0,0,0
+)
+)
+(1,109:10468126,37012397:311300,337875,0
+h1,109:10468126,37012397:0,0,0
+(1,109:10468126,37012397:278532,337875,0
+(1,109:10468126,37012397:278532,337875,0
+x1,109:10746658,37012397
+)
+)
+)
+]
+)
+$1,109:10779426,36806885
+k1,110:30229790,36806885:19450364
+g1,112:30229790,36806885
+)
+(1,112:6636830,37698175:23592960,498346,139537
+x1,112:8550485,37698175
+k1,110:8773894,37698175:223409
+x1,110:9172572,37698175
+x1,110:9792516,37698175
+x1,110:10191194,37698175
+x1,110:11347360,37698175
+k1,110:11570768,37698175:223408
+x1,110:12886405,37698175
+x1,110:13464488,37698175
+x1,110:14062505,37698175
+k1,110:14285914,37698175:223409
+x1,110:14684592,37698175
+x1,110:15304536,37698175
+x1,110:16062024,37698175
+x1,110:16978983,37698175
+k1,110:17202392,37698175:223409
+x1,110:18801090,37698175
+k1,110:19024499,37698175:223409
+x1,110:19403244,37698175
+x1,110:20003254,37698175
+x1,110:20401932,37698175
+x1,110:21159421,37698175
+x1,110:21641821,37698175
+x1,110:22479045,37698175
+k1,110:22702453,37698175:223408
+x1,110:23420073,37698175
+x1,110:24935049,37698175
+k1,110:25158458,37698175:223409
+x1,110:25557136,37698175
+x1,110:25896012,37698175
+x1,110:26494029,37698175
+x1,110:26872772,37698175
+x1,110:27833586,37698175
+x1,110:28591074,37698175
+k1,110:28814483,37698175:223409
+x1,110:29392567,37698175
+x1,110:29990584,37698175
+x1,110:30229790,37698175
+k1,112:30229790,37698175:0
+)
+(1,112:6636830,38589465:23592960,498346,59802
+x1,112:7394318,38589465
+g1,110:7633524,38589465
+$1,110:7633524,38589465
+(1,110:7633524,38589465:1594712,490372,59802
+(1,110:7633524,38589465:518281,490372,0
+(1,110:7633524,38589465:518281,490372,0
+x1,110:8151805,38589465
+)
+)
+(1,110:8151805,38589465:558150,418611,59802
+x1,110:8709955,38589465
+)
+(1,110:8709955,38589465:518281,490372,0
+(1,110:8709955,38589465:518281,490372,0
+x1,110:9228236,38589465
+)
+)
+)
+$1,110:9228236,38589465
+g1,110:9467442,38589465
+x1,110:10065459,38589465
+g1,110:10304665,38589465
+x1,110:10906668,38589465
+x1,110:11484752,38589465
+x1,110:12403705,38589465
+g1,110:12642911,38589465
+x1,110:13021656,38589465
+x1,110:13621666,38589465
+x1,110:14020344,38589465
+x1,110:14399088,38589465
+x1,110:15395783,38589465
+k1,111:30229790,38589465:14834007
+g1,112:30229790,38589465
+)
+(1,112:6636830,39480755:23592960,498346,139537
+x1,112:7753129,39480755
+x1,111:9048831,39480755
+k1,111:9384518,39480755:335687
+x1,111:10263603,39480755
+x1,111:10746003,39480755
+x1,111:11346013,39480755
+k1,111:11681699,39480755:335686
+x1,111:12080377,39480755
+x1,111:12700321,39480755
+x1,111:13098999,39480755
+x1,111:14255165,39480755
+k1,111:14590852,39480755:335687
+x1,111:15906489,39480755
+x1,111:16484572,39480755
+x1,111:17082589,39480755
+k1,111:17418276,39480755:335687
+x1,111:19016974,39480755
+k1,111:19352660,39480755:335686
+x1,111:19731405,39480755
+x1,111:20331415,39480755
+x1,111:20730093,39480755
+x1,111:21487582,39480755
+x1,111:21969982,39480755
+x1,111:22807206,39480755
+k1,111:23142893,39480755:335687
+x1,111:24299059,39480755
+k1,111:24634746,39480755:335687
+x1,111:25013491,39480755
+x1,111:25312498,39480755
+x1,111:26349061,39480755
+k1,111:26684747,39480755:335686
+x1,111:27402367,39480755
+x1,111:28917343,39480755
+k1,111:29253030,39480755:335687
+x1,111:29651708,39480755
+x1,111:29990584,39480755
+x1,111:30229790,39480755
+k1,112:30229790,39480755:0
+)
+(1,112:6636830,40372045:23592960,498346,139537
+x1,112:7234847,40372045
+x1,112:7613590,40372045
+x1,112:8574404,40372045
+x1,112:9331892,40372045
+k1,111:9680466,40372045:348574
+x1,111:10258550,40372045
+x1,111:10856567,40372045
+x1,111:11614055,40372045
+k1,111:11962630,40372045:348575
+$1,111:11962630,40372045
+(1,111:11962630,40372045:1594712,490372,59802
+(1,111:11962630,40372045:518281,490372,0
+(1,111:11962630,40372045:518281,490372,0
+x1,111:12480911,40372045
+)
+)
+(1,111:12480911,40372045:558150,418611,59802
+x1,111:13039061,40372045
+)
+(1,111:13039061,40372045:518281,490372,0
+(1,111:13039061,40372045:518281,490372,0
+x1,111:13557342,40372045
+)
+)
+)
+$1,111:13557342,40372045
+k1,111:13905916,40372045:348574
+x1,111:14503933,40372045
+k1,111:14852508,40372045:348575
+x1,111:15454511,40372045
+x1,111:16032595,40372045
+x1,111:16951548,40372045
+k1,111:17300122,40372045:348574
+x1,111:17818403,40372045
+k1,111:18166868,40372045:348465
+x1,111:19841315,40372045
+x1,111:20040654,40372045
+x1,111:20419399,40372045
+x1,111:21017416,40372045
+k1,111:21365991,40372045:348575
+x1,111:22661695,40372045
+k1,111:23010269,40372045:348574
+x1,111:23887361,40372045
+x1,111:24923924,40372045
+k1,111:25272499,40372045:348575
+x1,111:25651244,40372045
+x1,111:26747607,40372045
+k1,111:27096181,40372045:348574
+x1,111:27694198,40372045
+x1,111:28451686,40372045
+x1,111:29133425,40372045
+x1,111:29512170,40372045
+x1,111:30229790,40372045
+k1,111:30229790,40372045:0
+)
+(1,112:6636830,41263335:23592960,498346,139537
+x1,112:7234847,41263335
+x1,112:7633525,41263335
+x1,112:8291343,41263335
+x1,112:8690021,41263335
+x1,112:9048831,41263335
+x1,112:9387706,41263335
+g1,111:9626912,41263335
+x1,111:10224929,41263335
+x1,111:10866800,41263335
+g1,111:11106006,41263335
+x1,111:12780453,41263335
+x1,111:13139263,41263335
+x1,111:13697412,41263335
+x1,111:14494768,41263335
+g1,111:14733974,41263335
+x1,111:15333984,41263335
+x1,111:16071539,41263335
+x1,111:16553939,41263335
+g1,111:16793145,41263335
+x1,111:17311426,41263335
+x1,111:18308121,41263335
+g1,111:18547327,41263335
+x1,111:19504154,41263335
+x1,111:20600519,41263335
+k1,112:30229790,41263335:9629271
+g1,112:30229790,41263335
+)
+(1,113:6636830,43140522:23592960,642250,275254
+g1,113:9340190,43140522
+r1,113:9340190,43140522:0,917504,275254
+(1,113:9340190,43140522:0,642250,275254
+k1,113:6636830,43140522:-2703360
+(1,113:6636830,43140522:2703360,642250,275254
+x1,113:8455454,43140522
+g1,113:9340190,43140522
+r1,113:9340190,43140522:0,917504,275254
+g1,113:9340190,43140522
+)
+)
+x1,113:12448509,43140522
+r1,113:12448509,43140522:0,917504,275254
+k1,113:30229790,43140522:17781281
+g1,113:30229790,43140522
+)
+]
+(1,115:6636830,45679049:23592960,0,0
+h1,115:6636830,45679049:23592960,0,0
+)
+]
+]
+!31477
+}7
+Input:71:test.aux
+!36
+Postamble:
+Count:6909
+!26
+Post scriptum:
diff --git a/Build/source/texk/web2c/synctexdir/tests/story-zapfino.tex b/Build/source/texk/web2c/synctexdir/tests/story-zapfino.tex
new file mode 100644
index 00000000000..d928645ab61
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/tests/story-zapfino.tex
@@ -0,0 +1,24 @@
+%!TEX TS-program = xetex
+%!TEX encoding = UTF-8 Unicode
+
+% story.tex, with special characters converted to Unicode, and Zapfino font declarations
+\nopagenumbers
+
+\font\body="Zapfino" at 10pt \body
+\font\title="Zapfino:Stylistic Variants=First variant glyph set" at 12pt
+\font\author="Zapfino:Stylistic Variants=Second variant glyph set" at 10pt
+
+\hrule
+\vskip 1in
+\centerline{\title A \ SHORT \ STORY}
+\vskip 6pt
+\centerline{\author by A. U. Thor}
+\vskip .5cm
+Once upon a time, in a distant galaxy called Ööç,
+there lived a computer named R.~J. Drofnats.
+
+Mr.~Drofnats—or “R. J.,” as he preferred to be called—was happiest when he was at work
+typesetting beautiful documents.
+\vskip 1in
+\hrule
+\bye
diff --git a/Build/source/texk/web2c/synctexdir/tests/test file.sh b/Build/source/texk/web2c/synctexdir/tests/test file.sh
new file mode 100755
index 00000000000..83c981b358b
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/tests/test file.sh
@@ -0,0 +1,225 @@
+#! /bin/sh
+# this file is part of the synctex package
+# it is a unit test to enlight any malfunction of the _synctex_get_name function
+# This script can be sourced with "synctex" command available
+# The test is a SUCCESS if no "FAILURE" appears in the output
+
+echo "This is test file.sh"
+echo "You can source this file or execute it"
+echo "[SYNCTEX_PATH=/the/path/to/synctex ][SYNCTEX_TEST_DIR=/the/path/to/the/test/folder ](source |./)\"test file.sh\""
+
+if test -z "$SYNCTEX_PATH"
+then
+SYNCTEX_PATH="$(which synctex)"
+elif ! test -f "$SYNCTEX_PATH" || ! test -x "$SYNCTEX_PATH"
+then
+ echo "No executable file at $SYNCTEX_PATH"
+exit -1
+fi
+SYNCTEX_PATH="$(cd "$(dirname "$SYNCTEX_PATH")"; pwd)/$(basename "$SYNCTEX_PATH")"
+echo "synctex command used: $SYNCTEX_PATH"
+
+if ! test -x "$SYNCTEX_PATH"
+then
+ echo "No executable file at $SYNCTEX_PATH"
+ exit -1
+fi
+
+mkdir -p synctex_tests/foo/bar
+mkdir -p synctex_tests/bar
+
+if test -z "$SYNCTEX_TEST_DIR"
+then
+SYNCTEX_TEST_DIR="../source/texk/web2c/synctexdir/unit\ tests"
+fi
+if ! test -d "$SYNCTEX_TEST_DIR"
+then
+ echo "No directory file at $SYNCTEX_TEST_DIR"
+ exit -1
+fi
+echo "synctex test directory: $SYNCTEX_TEST_DIR"
+
+cp "$SYNCTEX_TEST_DIR/footest.synctex" synctex_tests
+cp "$SYNCTEX_TEST_DIR/bartest.synctex.gz" synctex_tests
+rm synctex_tests/bartest.synctex
+cp "$SYNCTEX_TEST_DIR/story-zapfino.tex" synctex_tests
+cd synctex_tests
+
+$SYNCTEX_PATH test file -o footest.pdf
+#
+echo "-------------------------------- A-1"
+"$SYNCTEX_PATH" view -i 1:0:test.tex -o footest
+"$SYNCTEX_PATH" edit -o 1:0:0:bartest.pdf
+"$SYNCTEX_PATH" update -o footest.pdf -m 2000 -x 212 -y 734
+cat footest.synctex
+"$SYNCTEX_PATH" update -o bartest.pdf -m 2000 -x 212 -y 734
+gunzip bartest.synctex.gz
+echo "test diff"
+diff footest.synctex bartest.synctex
+echo "test done"
+#pdflatex -synctex=1 story-zapfino.tex
+exit 0
+function my_touch {
+ sleep 1
+ touch $1
+}
+function my_test {
+ # syntax test output build touched expected mode YES
+ echo "
+================================"
+ echo "output:$1"
+ echo "build:$2"
+ if test -z "$2"
+ then
+ if test -z "$(synctex test file -o "$1"|grep "file name:$3\$")" || test -z "$(synctex test file -o "$1"|grep "mode:$4")"
+ then
+ if test "YES" = "$5"
+ then
+ echo "!!!!!!!!!!!!!!!"
+ echo "! FAILURE 1 !"
+ echo "!!!!!!!!!!!!!!!"
+ synctex test file -o "$1"
+ else
+ echo "SUCCESS"
+ ls -R
+ fi
+ else
+ if test "YES" = "$5"
+ then
+ echo "SUCCESS"
+ else
+ echo "!!!!!!!!!!!!!!!"
+ echo "! FAILURE 2 !"
+ echo "!!!!!!!!!!!!!!!"
+ synctex test file -o "$1"
+ fi
+ fi
+ else
+ if test -z "$(synctex test file -o "$1" -d "$2"|grep "file name:$3\$")" || test -z "$(synctex test file -o "$1" -d "$2"|grep "mode:$4")"
+ then
+ if test "YES" = "$5"
+ then
+ echo "!!!!!!!!!!!!!!!"
+ echo "! FAILURE 3 !"
+ echo "!!!!!!!!!!!!!!!"
+ synctex test file -o "$1" -d "$2"
+ else
+ echo "SUCCESS"
+ ls -R
+ fi
+ else
+ if test "YES" = "$5"
+ then
+ echo "SUCCESS"
+ else
+ echo "!!!!!!!!!!!!!!!"
+ echo "! FAILURE 4 !"
+ echo "!!!!!!!!!!!!!!!"
+ synctex test file -o "$1" -d "$2"
+ fi
+ fi
+ fi
+}
+echo "-------------------------------- B-1"
+my_touch foo.synctex.gz
+my_touch foo.synctex
+my_touch bar/foo.synctex
+my_touch bar/foo.synctex.gz
+my_touch foo/bar/foo.synctex
+my_touch foo/bar/foo.synctex.gz
+my_test foo.pdf "" foo.synctex none YES
+my_touch foo.synctex
+my_touch foo.synctex.gz
+my_touch bar/foo.synctex
+my_touch bar/foo.synctex.gz
+my_touch foo/bar/foo.synctex
+my_touch foo/bar/foo.synctex.gz
+my_test foo.pdf "" foo.synctex.gz gz YES
+echo "-------------------------------- B-2"
+my_touch bar/foo.synctex.gz
+my_touch bar/foo.synctex
+my_touch foo.synctex
+my_touch foo.synctex.gz
+my_touch foo/bar/foo.synctex
+my_touch foo/bar/foo.synctex.gz
+my_test bar/foo.pdf "" bar/foo.synctex none YES
+my_touch bar/foo.synctex
+my_touch bar/foo.synctex.gz
+my_touch foo.synctex
+my_touch foo.synctex.gz
+my_touch foo/bar/foo.synctex
+my_touch foo/bar/foo.synctex.gz
+my_test bar/foo.pdf "" bar/foo.synctex.gz gz YES
+echo "-------------------------------- B-3"
+my_touch foo/bar/foo.synctex.gz
+my_touch foo/bar/foo.synctex
+my_touch foo.synctex
+my_touch foo.synctex.gz
+my_touch bar/foo.synctex.gz
+my_touch bar/foo.synctex
+my_test foo/bar/foo.pdf "" foo/bar/foo.synctex none YES
+my_touch foo/bar/foo.synctex
+my_touch foo/bar/foo.synctex.gz
+my_touch foo.synctex
+my_touch foo.synctex.gz
+my_touch bar/foo.synctex.gz
+my_touch bar/foo.synctex
+my_test foo/bar/foo.pdf "" foo/bar/foo.synctex.gz gz YES
+echo "-------------------------------- B-4"
+my_touch bar/foo.synctex
+my_touch bar/foo.synctex.gz
+my_touch foo.synctex.gz
+my_touch foo.synctex
+my_touch foo/bar/foo.synctex
+my_touch foo/bar/foo.synctex.gz
+my_test foo.pdf bar foo.synctex none YES
+my_touch bar/foo.synctex
+my_touch bar/foo.synctex.gz
+my_touch foo.synctex
+my_touch foo.synctex.gz
+my_touch foo/bar/foo.synctex
+my_touch foo/bar/foo.synctex.gz
+my_test foo.pdf bar foo.synctex.gz gz YES
+my_touch foo.synctex
+my_touch foo.synctex.gz
+my_touch bar/foo.synctex.gz
+my_touch bar/foo.synctex
+my_touch foo/bar/foo.synctex
+my_touch foo/bar/foo.synctex.gz
+my_test foo.pdf bar bar/foo.synctex none YES
+my_touch foo.synctex
+my_touch foo.synctex.gz
+my_touch bar/foo.synctex
+my_touch bar/foo.synctex.gz
+my_touch foo/bar/foo.synctex
+my_touch foo/bar/foo.synctex.gz
+my_test foo.pdf bar bar/foo.synctex.gz gz YES
+echo "-------------------------------- B-5"
+my_touch foo/bar/foo.synctex
+my_touch foo/bar/foo.synctex.gz
+my_touch bar/foo.synctex.gz
+my_touch bar/foo.synctex
+my_touch foo.synctex.gz
+my_touch foo.synctex
+my_test bar/foo.pdf foo bar/foo.synctex none YES
+my_touch foo/bar/foo.synctex
+my_touch foo/bar/foo.synctex.gz
+my_touch bar/foo.synctex
+my_touch bar/foo.synctex.gz
+my_touch foo.synctex.gz
+my_touch foo.synctex
+my_test bar/foo.pdf foo bar/foo.synctex.gz gz YES
+my_touch bar/foo.synctex.gz
+my_touch bar/foo.synctex
+my_touch foo/bar/foo.synctex.gz
+my_touch foo/bar/foo.synctex
+my_touch foo.synctex.gz
+my_touch foo.synctex
+my_test bar/foo.pdf foo foo/bar/foo.synctex none YES
+my_touch bar/foo.synctex
+my_touch bar/foo.synctex.gz
+my_touch foo/bar/foo.synctex
+my_touch foo/bar/foo.synctex.gz
+my_touch foo.synctex.gz
+my_touch foo.synctex
+my_test bar/foo.pdf foo foo/bar/foo.synctex.gz gz YES