texlive[48164] Build/source/texk: dvisvgm 2.4.1

commits+kakuto at tug.org commits+kakuto at tug.org
Sun Jul 8 10:06:15 CEST 2018


Revision: 48164
          http://tug.org/svn/texlive?view=revision&revision=48164
Author:   kakuto
Date:     2018-07-08 10:06:14 +0200 (Sun, 08 Jul 2018)
Log Message:
-----------
dvisvgm 2.4.1

Modified Paths:
--------------
    trunk/Build/source/texk/README
    trunk/Build/source/texk/dvisvgm/ChangeLog
    trunk/Build/source/texk/dvisvgm/TLpatches/ChangeLog
    trunk/Build/source/texk/dvisvgm/TLpatches/patch-08-makefiles
    trunk/Build/source/texk/dvisvgm/configure
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/NEWS
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/README
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/configure.ac
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/doc/conf-dblatex-pdf.xsl
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.1
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.txt.in
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/Makefile.am
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/Makefile.in
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/dictionary.c
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/platform.h
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/version.h
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references.c
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/brotli_bit_stream.h
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/command.h
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment.c
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment_two_pass.c
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encode.c
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encoder_dict.h
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/fast_log.h
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash.h
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/quality.h
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/static_dict.c
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/write_bits.h
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/port.h
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/types.h
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/include/woff2/version.h
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/src/font.cc
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/src/normalize.cc
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.cpp
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/FileSystem.cpp
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/FontCache.cpp
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMap.cpp
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/GFGlyphTracer.cpp
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/ImageToSVG.cpp
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/MetafontWrapper.cpp
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.cpp
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/SourceInput.cpp
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/SourceInput.hpp
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.cpp
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/utility.cpp
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/version.hpp
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/tests/DVIReaderTest.cpp
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/tests/GFReaderTest.cpp
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/tests/JFMReaderTest.cpp
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/tests/TFMReaderTest.cpp
    trunk/Build/source/texk/dvisvgm/version.ac

Added Paths:
-----------
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/transform.c
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_composite_inc.h
    trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_rolling_inc.h

Modified: trunk/Build/source/texk/README
===================================================================
--- trunk/Build/source/texk/README	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/README	2018-07-08 08:06:14 UTC (rev 48164)
@@ -60,7 +60,7 @@
 
 dvipsk - maintained here, by us
 
-dvisvgm 2.4 - checked 04may18
+dvisvgm 2.4.1 - checked 08jul18
   http://dvisvgm.bplaced.net/Downloads
 
 gregorio 5.1.1 - checked 25mar18

Modified: trunk/Build/source/texk/dvisvgm/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvisvgm/ChangeLog	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/ChangeLog	2018-07-08 08:06:14 UTC (rev 48164)
@@ -1,3 +1,7 @@
+2018-07-08  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	* Import 2.4.1
+
 2018-05-04  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	* Import 2.4.

Modified: trunk/Build/source/texk/dvisvgm/TLpatches/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvisvgm/TLpatches/ChangeLog	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/TLpatches/ChangeLog	2018-07-08 08:06:14 UTC (rev 48164)
@@ -1,3 +1,8 @@
+2018-07-08  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	* Import 2.4.1.
+	* patch-08-makefiles: adapt.
+
 2018-05-04  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	* Import 2.4.

Modified: trunk/Build/source/texk/dvisvgm/TLpatches/patch-08-makefiles
===================================================================
--- trunk/Build/source/texk/dvisvgm/TLpatches/patch-08-makefiles	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/TLpatches/patch-08-makefiles	2018-07-08 08:06:14 UTC (rev 48164)
@@ -1,6 +1,6 @@
-diff -u2r dvisvgm-2.4/Makefile.am dvisvgm-src/Makefile.am
---- dvisvgm-2.4/Makefile.am	Tue Jan 02 18:32:38 2018
-+++ dvisvgm-src/Makefile.am	Fri May 04 13:03:43 2018
+diff -u2r dvisvgm-2.4.1/Makefile.am dvisvgm-src/Makefile.am
+--- dvisvgm-2.4.1/Makefile.am	Tue Jan 02 18:32:38 2018
++++ dvisvgm-src/Makefile.am	Sun Jul 08 16:29:11 2018
 @@ -6,5 +6,5 @@
  AUTOMAKE_OPTIONS = foreign
  EXTRA_DIST = COPYING
@@ -8,9 +8,9 @@
 +SUBDIRS = libs src #not for TL: tests doc
  ACLOCAL_AMFLAGS = -I m4
  
-diff -u2r dvisvgm-2.4/src/Makefile.am dvisvgm-src/src/Makefile.am
---- dvisvgm-2.4/src/Makefile.am	Thu May 03 17:27:18 2018
-+++ dvisvgm-src/src/Makefile.am	Fri May 04 13:12:50 2018
+diff -u2r dvisvgm-2.4.1/src/Makefile.am dvisvgm-src/src/Makefile.am
+--- dvisvgm-2.4.1/src/Makefile.am	Thu May 03 17:27:18 2018
++++ dvisvgm-src/src/Makefile.am	Sun Jul 08 16:39:42 2018
 @@ -14,8 +14,5 @@
  	$(noinst_LIBRARIES) \
  	../libs/clipper/libclipper.a \

Modified: trunk/Build/source/texk/dvisvgm/configure
===================================================================
--- trunk/Build/source/texk/dvisvgm/configure	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/configure	2018-07-08 08:06:14 UTC (rev 48164)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for dvisvgm (TeX Live) 2.4.
+# Generated by GNU Autoconf 2.69 for dvisvgm (TeX Live) 2.4.1.
 #
 # Report bugs to <tex-k at tug.org>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='dvisvgm (TeX Live)'
 PACKAGE_TARNAME='dvisvgm--tex-live-'
-PACKAGE_VERSION='2.4'
-PACKAGE_STRING='dvisvgm (TeX Live) 2.4'
+PACKAGE_VERSION='2.4.1'
+PACKAGE_STRING='dvisvgm (TeX Live) 2.4.1'
 PACKAGE_BUGREPORT='tex-k at tug.org'
 PACKAGE_URL=''
 
@@ -1375,7 +1375,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures dvisvgm (TeX Live) 2.4 to adapt to many kinds of systems.
+\`configure' configures dvisvgm (TeX Live) 2.4.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1446,7 +1446,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of dvisvgm (TeX Live) 2.4:";;
+     short | recursive ) echo "Configuration of dvisvgm (TeX Live) 2.4.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1581,7 +1581,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-dvisvgm (TeX Live) configure 2.4
+dvisvgm (TeX Live) configure 2.4.1
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2449,7 +2449,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by dvisvgm (TeX Live) $as_me 2.4, which was
+It was created by dvisvgm (TeX Live) $as_me 2.4.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -8188,7 +8188,7 @@
 
 # Define the identity of the package.
  PACKAGE='dvisvgm--tex-live-'
- VERSION='2.4'
+ VERSION='2.4.1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -20189,7 +20189,7 @@
 Report bugs to <bug-libtool at gnu.org>."
 
 lt_cl_version="\
-dvisvgm (TeX Live) config.lt 2.4
+dvisvgm (TeX Live) config.lt 2.4.1
 configured by $0, generated by GNU Autoconf 2.69.
 
 Copyright (C) 2011 Free Software Foundation, Inc.
@@ -23585,7 +23585,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by dvisvgm (TeX Live) $as_me 2.4, which was
+This file was extended by dvisvgm (TeX Live) $as_me 2.4.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -23651,7 +23651,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-dvisvgm (TeX Live) config.status 2.4
+dvisvgm (TeX Live) config.status 2.4.1
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/NEWS
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/NEWS	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/NEWS	2018-07-08 08:06:14 UTC (rev 48164)
@@ -1,3 +1,10 @@
+dvisvgm-2.4.1 (2018-07-07)
+- fixed handling of delay parameter of option --progress
+- updated brotli library to version 1.0.5
+- updated woff2 library to version 1.0.2
+- updated URLs in manual page
+- several minor code refactorings
+
 dvisvgm-2.4 (2018-05-03)
 - added special 'pdffile' similar to 'psfile' to embed PDF graphics
 - added option --pdf to convert single-page PDF documents to SVG

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/README
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/README	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/README	2018-07-08 08:06:14 UTC (rev 48164)
@@ -109,7 +109,7 @@
  This package is available from CTAN (dviware/dvisvgm) and can be downloaded
  from the project website as well:
 
-    http://dvisvgm.bplaced.net
+    https://dvisvgm.de
 
  Here you can find the sources, pre-compiled binaries and further additional
  information about the converter and related topics.

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/configure.ac
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/configure.ac	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/configure.ac	2018-07-08 08:06:14 UTC (rev 48164)
@@ -4,8 +4,8 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT([dvisvgm],[2.4],[martin.gieseking at uos.de])
-DATE="April 2018"
+AC_INIT([dvisvgm],[2.4.1],[martin.gieseking at uos.de])
+DATE="July 2018"
 AC_CONFIG_SRCDIR(src)
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_MACRO_DIR([m4])

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/doc/conf-dblatex-pdf.xsl
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/doc/conf-dblatex-pdf.xsl	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/doc/conf-dblatex-pdf.xsl	2018-07-08 08:06:14 UTC (rev 48164)
@@ -49,4 +49,19 @@
 		</xsl:call-template>
 		<xsl:apply-templates/>
 	</xsl:template>
+
+	<!-- add named list items (e.g. command-line options, specials) to PDF bookmarks -->
+	<xsl:template match="refsect1/variablelist/varlistentry/term[emphasis]">
+		<xsl:text>\phantomsection\pdfbookmark[3]{</xsl:text>
+		<xsl:choose>
+			<xsl:when test="contains(emphasis, '--')">
+				<xsl:value-of select="concat('-{}-', substring-after(emphasis, '--'))"/>
+			</xsl:when>
+			<xsl:otherwise>
+				<xsl:value-of select="emphasis"/>
+			</xsl:otherwise>
+		</xsl:choose>
+		<xsl:value-of select="concat('}{', generate-id(emphasis), '}
')"/>
+		<xsl:apply-imports/>
+	</xsl:template>
 </xsl:stylesheet>

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.1
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.1	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.1	2018-07-08 08:06:14 UTC (rev 48164)
@@ -2,12 +2,12 @@
 .\"     Title: dvisvgm
 .\"    Author: Martin Gieseking <martin.gieseking at uos.de>
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 05/03/2018
+.\"      Date: 07/07/2018
 .\"    Manual: dvisvgm Manual
-.\"    Source: dvisvgm 2.4
+.\"    Source: dvisvgm 2.4.1
 .\"  Language: English
 .\"
-.TH "DVISVGM" "1" "05/03/2018" "dvisvgm 2\&.4" "dvisvgm Manual"
+.TH "DVISVGM" "1" "07/07/2018" "dvisvgm 2\&.4\&.1" "dvisvgm Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -51,37 +51,6 @@
 .sp
 dvisvgm provides a POSIX\-compliant command\-line interface with short and long option names\&. They may be given before and/or after the name of the file to be converted\&. Also, the order of specifying the options is not significant, i\&.e\&. you can add them in any order without changing dvisvgm\(cqs behavior\&. Certain options accept or require additional parameters which are directly appended to or separated by whitespace from a short option (e\&.g\&. \fB\-v0\fR or \fB\-v 0\fR)\&. Long options require an additional equals sign (\fB=\fR) between option name and argument but without any surrounding whitespace (e\&.g\&. \fB\-\-verbosity=0\fR)\&. Multiple short options that don\(cqt expect a further parameter can be combined after a single dash (e\&.g\&. \fB\-ejs\fR rather than \fB\-e \-j \-s\fR)\&.
 .PP
-\fB\-a, \-\-trace\-all\fR=[\fIretrace\fR]
-.RS 4
-This option forces dvisvgm to vectorize not only the glyphs actually required to render the SVG file correctly \(en which is the default \(en, but processes all glyphs of all fonts referenced in the DVI file\&. Because dvisvgm stores the tracing results in a font cache, all following conversions of these fonts will speed up significantly\&. The boolean option
-\fIretrace\fR
-determines how to handle glyphs already stored in the cache\&. By default, these glyphs are skipped\&. Setting argument
-\fIretrace\fR
-to
-\fIyes\fR
-or
-\fItrue\fR
-forces dvisvgm to retrace the corresponding bitmaps again\&.
-.if n \{\
-.sp
-.\}
-.RS 4
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBNote\fR
-.ps -1
-.br
-This option only takes effect if font caching is active\&. Therefore,
-\fB\-\-trace\-all\fR
-cannot be combined with option
-\fB\-\-cache=none\fR\&.
-.sp .5v
-.RE
-.RE
-.PP
 \fB\-b, \-\-bbox\fR=\fIfmt\fR
 .RS 4
 Sets the bounding box of the generated graphic to the specified format\&. The parameter
@@ -214,7 +183,7 @@
 .PP
 \fB\-\-color\fR
 .RS 4
-Enables colorization of messages printed during the conversion process\&. The colors can be customized via the environment variable
+Enables colorization of messages printed during the conversion process\&. The colors can be customized via environment variable
 \fBDVISVGM_COLORS\fR\&. See the
 Environment section
 below for further information\&.
@@ -400,7 +369,7 @@
 \fIcolor specifier\fR
 is either a hexadecimal RGB value of the form
 \fI#RRGGBB\fR, or a
-dvips color name (\m[blue]http://en.wikibooks.org/wiki/LaTeX/Colors#The_68_standard_colors_known_to_dvips\m[])\&.
+dvips color name (\m[blue]https://en.wikibooks.org/wiki/LaTeX/Colors#The_68_standard_colors_known_to_dvips\m[])\&.
 .sp
 Moreover, argument
 \fIstyle\fR
@@ -623,6 +592,37 @@
 is omitted, dvisvgm prints the location of the system\(cqs temp folder and exits\&.
 .RE
 .PP
+\fB\-a, \-\-trace\-all\fR=[\fIretrace\fR]
+.RS 4
+This option forces dvisvgm to vectorize not only the glyphs actually required to render the SVG file correctly \(en which is the default \(en, but processes all glyphs of all fonts referenced in the DVI file\&. Because dvisvgm stores the tracing results in a font cache, all following conversions of these fonts will speed up significantly\&. The boolean option
+\fIretrace\fR
+determines how to handle glyphs already stored in the cache\&. By default, these glyphs are skipped\&. Setting argument
+\fIretrace\fR
+to
+\fIyes\fR
+or
+\fItrue\fR
+forces dvisvgm to retrace the corresponding bitmaps again\&.
+.if n \{\
+.sp
+.\}
+.RS 4
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBNote\fR
+.ps -1
+.br
+This option only takes effect if font caching is active\&. Therefore,
+\fB\-\-trace\-all\fR
+cannot be combined with option
+\fB\-\-cache=none\fR\&.
+.sp .5v
+.RE
+.RE
+.PP
 \fB\-T, \-\-transform\fR=\fIcommands\fR
 .RS 4
 Applies a sequence of transformations to the SVG content\&. Each transformation is described by a
@@ -859,9 +859,9 @@
 Creates a compressed SVG file with suffix \&.svgz\&. The optional argument specifies the compression level\&. Valid values are in the range of 1 to 9 (default value is 9)\&. Larger values cause better compression results but may take slightly more computation time\&.
 .RE
 .PP
-\fB\-Z, \-\-zoom\fR[=\fIfactor\fR]
+\fB\-Z, \-\-zoom\fR=\fIfactor\fR
 .RS 4
-Multiplies the
+Multiplies the values of the
 \fIwidth\fR
 and
 \fIheight\fR
@@ -1041,7 +1041,7 @@
 These specials were introduced with the
 \fIemTeX\fR
 distribution by Eberhard Mattes\&. They provide line drawing statements, instructions for embedding MSP, PCX, and BMP image files, as well as two PCL commands\&. dvisvgm supports only the line drawing statements and ignores all other em specials silently\&. A description of the command syntax can be found in the DVI driver documentation coming with
-emTeX (\m[blue]http://www.ctan.org/pkg/emtex\m[])\&.
+emTeX (\m[blue]https://ctan.org/pkg/emtex\m[])\&.
 .RE
 .PP
 \fBhtml\fR
@@ -1050,7 +1050,7 @@
 \fIhypertex\fR\&. By default, all linked areas of the document are marked by a rectangle\&. Option
 \fB\-\-linkmark\fR
 allows to change this behavior\&. See above for further details\&. Information on syntax and semantics of the HyperTeX specials can be found in the
-hyperref manual (\m[blue]http://www.ctan.org/pkg/hyperref\m[])\&.
+hyperref manual (\m[blue]https://ctan.org/pkg/hyperref\m[])\&.
 .RE
 .PP
 \fBpapersize\fR
@@ -1082,7 +1082,7 @@
 allow for modifying the font map tree while processing the DVI file\&. They are used by CTeX, for example\&. dvisvgm supports both, the dvips and dvipdfm font map format\&. For further information on the command syntax and semantics, see the documentation of
 \fB\epdfmapfile\fR
 in the
-pdfTeX user manual (\m[blue]http://www.ctan.org/pkg/pdftex\m[])\&.
+pdfTeX user manual (\m[blue]https://ctan.org/pkg/pdftex\m[])\&.
 .RE
 .PP
 \fBps\fR
@@ -1092,7 +1092,7 @@
 introduced its own set of specials in order to embed PostScript code into DVI files, which greatly improves the capabilities of DVI documents\&. One aim of dvisvgm is to completely evaluate all PostScript snippets and to convert as many of them as possible to SVG\&. In contrast to dvips, dvisvgm uses floating point arithmetics to compute the precise position of each graphic element, i\&.e\&. it doesn\(cqt round the coordinates\&. Therefore, the relative locations of the graphic elements may slightly differ from those computed by dvips\&.
 .sp
 Since PostScript is a rather complex language, dvisvgm does not implement its own PostScript interpreter but relies on
-Ghostscript (\m[blue]http://ghostscript.com\m[])
+Ghostscript (\m[blue]https://ghostscript.com\m[])
 instead\&. If the Ghostscript library was not linked to the dvisvgm binary, it is looked up and loaded dynamically during runtime\&. In this case, dvisvgm looks for
 \fIlibgs\&.so\&.X\fR
 on Unix\-like systems (supported ABI versions: 7,8,9), for
@@ -1111,7 +1111,7 @@
 is present\&.
 .sp
 The PostScript handler also recognizes and evaluates bounding box data generated by the
-preview package (\m[blue]http://www.ctan.org/pkg/preview\m[])
+preview package (\m[blue]https://ctan.org/pkg/preview\m[])
 with option
 \fItightpage\fR\&. If such data is present in the DVI file and if dvisvgm is called with option
 \fB\-\-bbox=preview\fR, dvisvgm sets the width and total height of the SVG file to the values derived from the preview data\&. Additionally, it prints a message showing the width, height, and depth of the box in TeX point units to the console\&. Especially, the depth value can be read by a post\-processor to vertically align the SVG graphics with the baseline of surrounding text in HTML or XSL\-FO documents, for example\&. Please note that SVG bounding boxes are defined by a width and (total) height\&. In contrast to TeX, SVG provides no means to differentiate between height and depth, i\&.e\&. the vertical extents above and below the baseline, respectively\&. Therefore, it is generally not possible to retrieve the depth value from the SVG file itself\&.
@@ -1192,7 +1192,7 @@
 .sp
 If dvisvgm was linked without the Ghostscript library, and if PostScript support has not been disabled, the shared Ghostscript library is looked up during runtime via dlopen()\&. The environment variable \fBLIBGS\fR can be used to specify path and file name of the library\&.
 .sp
-The pre\-compiled Windows versions of dvisvgm require a working installation of MiKTeX 2\&.9 or above\&. dvisvgm does not work together with the portable edition of MiKTeX because it relies on MiKTeX\(cqs COM interface that is only accessible in a local installation\&. To enable the evaluation of PostScript specials, the original Ghostscript DLL \fIgsdll32\&.dll\fR must be present and reachable through the search path\&. 64\-bit Windows builds require the 64\-bit Ghostscript DLL \fIgsdll64\&.dll\fR\&. Both DLLs come with the corresponding Ghostscript installers available from \m[blue]\fBhttp://ghostscript\&.com\fR\m[]\&.
+The pre\-compiled Windows versions of dvisvgm require a working installation of MiKTeX 2\&.9 or above\&. dvisvgm does not work together with the portable edition of MiKTeX because it relies on MiKTeX\(cqs COM interface that is only accessible in a local installation\&. To enable the evaluation of PostScript specials, the original Ghostscript DLL \fIgsdll32\&.dll\fR must be present and reachable through the search path\&. 64\-bit Windows builds require the 64\-bit Ghostscript DLL \fIgsdll64\&.dll\fR\&. Both DLLs come with the corresponding Ghostscript installers available from \m[blue]\fBhttps://ghostscript\&.com\fR\m[]\&.
 .sp
 The environment variable \fBDVISVGM_COLORS\fR specifies the colors used to highlight various parts of dvisvgm\(cqs message output\&. It is only evaluated if option \fB\-\-color\fR is given\&. The value of \fBDVISVGM_COLORS\fR is a list of colon\-separated entries of the form \fIgg\fR=\fIBF\fR, where \fIgg\fR denotes one of the color group indicators listed below, and \fIBF\fR are two hexadecimal digits specifying the background (first digit) and foreground/text color (second digit)\&. The color values are defined as follows: 0=black, 1=red, 2=green, 3=yellow, 4=blue, 5=magenta, 6=cyan, 7=gray, 8=bright red, 9=bright green, A=bright yellow, B=bright blue, C=bright magenta, D=bright cyan, E=bright gray, F=white\&. Depending on the terminal, the colors may differ\&. Rather than changing both the text and background color, it\(cqs also possible to change only one of them: An asterisk (*) in place of a hexadecimal digit indicates the default text or background color of the terminal\&.
 .sp
@@ -1353,7 +1353,7 @@
 .PP
 Project home page
 .RS 4
-\m[blue]\fBhttp://dvisvgm\&.bplaced\&.net\fR\m[]
+\m[blue]\fBhttps://dvisvgm\&.de\fR\m[]
 .RE
 .PP
 Code repository

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.txt.in
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.txt.in	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.txt.in	2018-07-08 08:06:14 UTC (rev 48164)
@@ -82,21 +82,6 @@
 whitespace (e.g. +--verbosity=0+). Multiple short options that don't expect a further parameter can
 be combined after a single dash (e.g. +-ejs+ rather than +-e -j -s+).
 
-*-a, --trace-all*=['retrace']::
-This option forces dvisvgm to vectorize not only the glyphs actually required to render the
-SVG file correctly – which is the default –, but processes all glyphs of all fonts referenced in
-the DVI file. Because dvisvgm stores the tracing results in a font cache, all following conversions
-of these fonts will speed up significantly.
-The boolean option 'retrace' determines how to handle glyphs already stored in the cache.
-By default, these glyphs are skipped. Setting argument 'retrace' to 'yes' or 'true' forces dvisvgm
-to retrace the corresponding bitmaps again.
-+
-[NOTE]
-This option only takes effect if font caching is active. Therefore, *--trace-all* cannot be
-combined with option *--cache=none*.
-+
-
-
 *-b, --bbox*='fmt'::
 Sets the bounding box of the generated graphic to the specified format. The parameter 'fmt'
 takes either one of the format specifiers listed below, or a sequence of four comma- or
@@ -159,7 +144,7 @@
 
 *--color*::
 Enables colorization of messages printed during the conversion process. The colors can be
-customized via the environment variable *DVISVGM_COLORS*. See the <<environment, Environment section>>
+customized via environment variable *DVISVGM_COLORS*. See the <<environment, Environment section>>
 below for further information.
 
 *--colornames*::
@@ -299,7 +284,7 @@
 The lines and boxes get the current text color selected. In order to apply a different, constant color,
 a colon followed by a color specifier can be appended to the style string. A 'color specifier' is either
 a hexadecimal RGB value of the form '#RRGGBB', or a
-http://en.wikibooks.org/wiki/LaTeX/Colors#The_68_standard_colors_known_to_dvips[dvips color name].
+https://en.wikibooks.org/wiki/LaTeX/Colors#The_68_standard_colors_known_to_dvips[dvips color name].
 +
 Moreover, argument 'style' can take a single color specifier to highlight the linked region by
 a frameless box filled with that color. An optional second color specifier separated by a colon
@@ -444,6 +429,20 @@
 If the optional parameter 'path' is omitted, dvisvgm prints the location of the system's
 temp folder and exits.
 
+*-a, --trace-all*=['retrace']::
+This option forces dvisvgm to vectorize not only the glyphs actually required to render the
+SVG file correctly – which is the default –, but processes all glyphs of all fonts referenced in
+the DVI file. Because dvisvgm stores the tracing results in a font cache, all following conversions
+of these fonts will speed up significantly.
+The boolean option 'retrace' determines how to handle glyphs already stored in the cache.
+By default, these glyphs are skipped. Setting argument 'retrace' to 'yes' or 'true' forces dvisvgm
+to retrace the corresponding bitmaps again.
++
+[NOTE]
+This option only takes effect if font caching is active. Therefore, *--trace-all* cannot be
+combined with option *--cache=none*.
++
+
 *-T, --transform*='commands'::
 Applies a sequence of transformations to the SVG content. Each transformation is described
 by a 'command' beginning with a capital letter followed by a list of comma-separated
@@ -544,9 +543,9 @@
 level. Valid values are in the range of 1 to 9 (default value is 9). Larger values cause better
 compression results but may take slightly more computation time.
 
-*-Z, --zoom*[='factor']::
-Multiplies the 'width' and 'height' attributes of the SVG root element by argument 'factor' while
-the coordinate system of the graphic content is retained. As a result, most SVG viewers zoom the
+*-Z, --zoom*='factor'::
+Multiplies the values of the 'width' and 'height' attributes of the SVG root element by argument 'factor'
+while the coordinate system of the graphic content is retained. As a result, most SVG viewers zoom the
 graphics accordingly. If a negative zoom factor is given, the 'width' and 'height' attributes are omitted.
 
 [[specials]]
@@ -652,7 +651,7 @@
 statements, instructions for embedding MSP, PCX, and BMP image files, as well as two PCL commands.
 dvisvgm supports only the line drawing statements and ignores all other em specials silently.
 A description of the command syntax can be found in the DVI driver documentation coming with
-http://www.ctan.org/pkg/emtex[emTeX].
+https://ctan.org/pkg/emtex[emTeX].
 
 *html*::
 The hyperref specification defines several variants on how to mark hyperlinked areas in a DVI file. dvisvgm
@@ -659,7 +658,7 @@
 supports the plain HyperTeX special constructs as created with hyperref package option 'hypertex'.
 By default, all linked areas of the document are marked by a rectangle. Option *--linkmark* allows to change
 this behavior. See above for further details. Information on syntax and semantics of the HyperTeX specials can be
-found in the http://www.ctan.org/pkg/hyperref[hyperref manual].
+found in the https://ctan.org/pkg/hyperref[hyperref manual].
 
 *papersize*::
 The 'papersize' special, which is an extension introduced by dvips, can be used to specify the widths and
@@ -681,7 +680,7 @@
 'pdf:mapfile' and 'pdf:mapline' allow for modifying the font map tree while processing the DVI file.
 They are used by CTeX, for example. dvisvgm supports both, the dvips and dvipdfm font map format. For further
 information on the command syntax and semantics, see the documentation of +\pdfmapfile+ in the
-http://www.ctan.org/pkg/pdftex[pdfTeX user manual].
+https://ctan.org/pkg/pdftex[pdfTeX user manual].
 
 *ps*::
 The famous DVI driver 'dvips' introduced its own set of specials in order to embed PostScript code into DVI files,
@@ -692,7 +691,7 @@
 by dvips.
 +
 Since PostScript is a rather complex language, dvisvgm does not implement its own PostScript interpreter
-but relies on http://ghostscript.com[Ghostscript] instead. If the Ghostscript library was not linked to the
+but relies on https://ghostscript.com[Ghostscript] instead. If the Ghostscript library was not linked to the
 dvisvgm binary, it is looked up and loaded dynamically during runtime. In this case, dvisvgm looks for
 'libgs.so.X' on Unix-like systems (supported ABI versions: 7,8,9), for 'libgs.X.dylib' on macOS, and for
 'gsdll32.dll' or 'gsdll64.dll' on Windows. You can override the default file names with environment variable
@@ -702,7 +701,7 @@
 Use option *--list-specials* to check whether PostScript support is available, i.e. entry 'ps' is present.
 +
 The PostScript handler also recognizes and evaluates bounding box data generated by the
-http://www.ctan.org/pkg/preview[preview package] with option 'tightpage'. If such data is present in the DVI file
+https://ctan.org/pkg/preview[preview package] with option 'tightpage'. If such data is present in the DVI file
 and if dvisvgm is called with option *--bbox=preview*, dvisvgm sets the width and total height of the SVG file to
 the values derived from the preview data. Additionally, it prints a message showing the width, height,
 and depth of the box in TeX point units to the console. Especially, the depth value can be read by a post-processor
@@ -764,7 +763,7 @@
 interface that is only accessible in a local installation.
 To enable the evaluation of PostScript specials, the original Ghostscript DLL 'gsdll32.dll' must be present
 and reachable through the search path. 64-bit Windows builds require the 64-bit Ghostscript DLL 'gsdll64.dll'.
-Both DLLs come with the corresponding Ghostscript installers available from http://ghostscript.com.
+Both DLLs come with the corresponding Ghostscript installers available from https://ghostscript.com.
 
 The environment variable *DVISVGM_COLORS* specifies the colors used to highlight various parts of dvisvgm's
 message output. It is only evaluated if option *--color* is given. The value of *DVISVGM_COLORS* is a list of
@@ -813,7 +812,7 @@
 
 Resources
 ---------
-Project home page::: http://dvisvgm.bplaced.net
+Project home page::: https://dvisvgm.de
 Code repository::: https://github.com/mgieseki/dvisvgm
 
 Bugs

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/Makefile.am
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/Makefile.am	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/Makefile.am	2018-07-08 08:06:14 UTC (rev 48164)
@@ -5,6 +5,7 @@
 	common/dictionary.c \
 	common/dictionary.h \
 	common/platform.h \
+	common/transform.c \
 	common/transform.h \
 	common/version.h \
 	enc/backward_references.c \
@@ -39,11 +40,13 @@
 	enc/entropy_encode_static.h \
 	enc/fast_log.h \
 	enc/find_match_length.h \
+	enc/hash_composite_inc.h \
 	enc/hash_forgetful_chain_inc.h \
 	enc/hash.h \
 	enc/hash_longest_match64_inc.h \
 	enc/hash_longest_match_inc.h \
 	enc/hash_longest_match_quickly_inc.h \
+	enc/hash_rolling_inc.h \
 	enc/hash_to_binary_tree_inc.h \
 	enc/histogram.c \
 	enc/histogram.h \

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/Makefile.in
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/Makefile.in	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/Makefile.in	2018-07-08 08:06:14 UTC (rev 48164)
@@ -122,7 +122,7 @@
 libbrotli_a_LIBADD =
 am__dirstamp = $(am__leading_dot)dirstamp
 am_libbrotli_a_OBJECTS = common/dictionary.$(OBJEXT) \
-	enc/backward_references.$(OBJEXT) \
+	common/transform.$(OBJEXT) enc/backward_references.$(OBJEXT) \
 	enc/backward_references_hq.$(OBJEXT) enc/bit_cost.$(OBJEXT) \
 	enc/block_splitter.$(OBJEXT) enc/brotli_bit_stream.$(OBJEXT) \
 	enc/cluster.$(OBJEXT) enc/compress_fragment.$(OBJEXT) \
@@ -149,6 +149,7 @@
 depcomp = $(SHELL) $(top_srcdir)/../../build-aux/depcomp
 am__maybe_remake_depfiles = depfiles
 am__depfiles_remade = common/$(DEPDIR)/dictionary.Po \
+	common/$(DEPDIR)/transform.Po \
 	enc/$(DEPDIR)/backward_references.Po \
 	enc/$(DEPDIR)/backward_references_hq.Po \
 	enc/$(DEPDIR)/bit_cost.Po enc/$(DEPDIR)/block_splitter.Po \
@@ -363,6 +364,7 @@
 	common/dictionary.c \
 	common/dictionary.h \
 	common/platform.h \
+	common/transform.c \
 	common/transform.h \
 	common/version.h \
 	enc/backward_references.c \
@@ -397,11 +399,13 @@
 	enc/entropy_encode_static.h \
 	enc/fast_log.h \
 	enc/find_match_length.h \
+	enc/hash_composite_inc.h \
 	enc/hash_forgetful_chain_inc.h \
 	enc/hash.h \
 	enc/hash_longest_match64_inc.h \
 	enc/hash_longest_match_inc.h \
 	enc/hash_longest_match_quickly_inc.h \
+	enc/hash_rolling_inc.h \
 	enc/hash_to_binary_tree_inc.h \
 	enc/histogram.c \
 	enc/histogram.h \
@@ -475,6 +479,8 @@
 	@: > common/$(DEPDIR)/$(am__dirstamp)
 common/dictionary.$(OBJEXT): common/$(am__dirstamp) \
 	common/$(DEPDIR)/$(am__dirstamp)
+common/transform.$(OBJEXT): common/$(am__dirstamp) \
+	common/$(DEPDIR)/$(am__dirstamp)
 enc/$(am__dirstamp):
 	@$(MKDIR_P) enc
 	@: > enc/$(am__dirstamp)
@@ -532,6 +538,7 @@
 	-rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/dictionary.Po at am__quote@ # am--include-marker
+ at AMDEP_TRUE@@am__include@ @am__quote at common/$(DEPDIR)/transform.Po at am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote at enc/$(DEPDIR)/backward_references.Po at am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote at enc/$(DEPDIR)/backward_references_hq.Po at am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote at enc/$(DEPDIR)/bit_cost.Po at am__quote@ # am--include-marker
@@ -718,6 +725,7 @@
 
 distclean: distclean-am
 		-rm -f common/$(DEPDIR)/dictionary.Po
+	-rm -f common/$(DEPDIR)/transform.Po
 	-rm -f enc/$(DEPDIR)/backward_references.Po
 	-rm -f enc/$(DEPDIR)/backward_references_hq.Po
 	-rm -f enc/$(DEPDIR)/bit_cost.Po
@@ -782,6 +790,7 @@
 
 maintainer-clean: maintainer-clean-am
 		-rm -f common/$(DEPDIR)/dictionary.Po
+	-rm -f common/$(DEPDIR)/transform.Po
 	-rm -f enc/$(DEPDIR)/backward_references.Po
 	-rm -f enc/$(DEPDIR)/backward_references_hq.Po
 	-rm -f enc/$(DEPDIR)/bit_cost.Po

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/dictionary.c
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/dictionary.c	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/dictionary.c	2018-07-08 08:06:14 UTC (rev 48164)
@@ -5883,7 +5883,7 @@
   122784,
 
   /* data */
-#ifdef BROTLI_EXTERNAL_DICTIONARY_DATA
+#if defined(BROTLI_EXTERNAL_DICTIONARY_DATA)
   NULL
 #else
   kBrotliDictionaryData

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/platform.h
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/platform.h	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/platform.h	2018-07-08 08:06:14 UTC (rev 48164)
@@ -4,8 +4,22 @@
    See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
 */
 
-/* Macros for compiler / platform specific features and build options. */
+/* Macros for compiler / platform specific features and build options.
 
+   Build options are:
+    * BROTLI_BUILD_32_BIT disables 64-bit optimizations
+    * BROTLI_BUILD_64_BIT forces to use 64-bit optimizations
+    * BROTLI_BUILD_BIG_ENDIAN forces to use big-endian optimizations
+    * BROTLI_BUILD_ENDIAN_NEUTRAL disables endian-aware optimizations
+    * BROTLI_BUILD_LITTLE_ENDIAN forces to use little-endian optimizations
+    * BROTLI_BUILD_PORTABLE disables dangerous optimizations, like unaligned
+      read and overlapping memcpy; this reduces decompression speed by 5%
+    * BROTLI_BUILD_NO_RBIT disables "rbit" optimization for ARM CPUs
+    * BROTLI_DEBUG dumps file name and line number when decoder detects stream
+      or memory error
+    * BROTLI_ENABLE_LOG enables asserts and dumps various state information
+*/
+
 #ifndef BROTLI_COMMON_PLATFORM_H_
 #define BROTLI_COMMON_PLATFORM_H_
 
@@ -15,11 +29,11 @@
 #include <brotli/port.h>
 #include <brotli/types.h>
 
-#if defined OS_LINUX || defined OS_CYGWIN
+#if defined(OS_LINUX) || defined(OS_CYGWIN)
 #include <endian.h>
-#elif defined OS_FREEBSD
+#elif defined(OS_FREEBSD)
 #include <machine/endian.h>
-#elif defined OS_MACOSX
+#elif defined(OS_MACOSX)
 #include <machine/endian.h>
 /* Let's try and follow the Linux convention */
 #define BROTLI_X_BYTE_ORDER BYTE_ORDER
@@ -32,71 +46,138 @@
 #include <stdio.h>
 #endif
 
-/* Macros for compiler / platform specific features and build options.
+/* The following macros were borrowed from https://github.com/nemequ/hedley
+ * with permission of original author - Evan Nemerson <evan at nemerson.com> */
 
-   Build options are:
-    * BROTLI_BUILD_32_BIT disables 64-bit optimizations
-    * BROTLI_BUILD_64_BIT forces to use 64-bit optimizations
-    * BROTLI_BUILD_BIG_ENDIAN forces to use big-endian optimizations
-    * BROTLI_BUILD_ENDIAN_NEUTRAL disables endian-aware optimizations
-    * BROTLI_BUILD_LITTLE_ENDIAN forces to use little-endian optimizations
-    * BROTLI_BUILD_PORTABLE disables dangerous optimizations, like unaligned
-      read and overlapping memcpy; this reduces decompression speed by 5%
-    * BROTLI_BUILD_NO_RBIT disables "rbit" optimization for ARM CPUs
-    * BROTLI_DEBUG dumps file name and line number when decoder detects stream
-      or memory error
-    * BROTLI_ENABLE_LOG enables asserts and dumps various state information
+/* >>> >>> >>> hedley macros */
+
+/* Define "BROTLI_PREDICT_TRUE" and "BROTLI_PREDICT_FALSE" macros for capable
+   compilers.
+
+To apply compiler hint, enclose the branching condition into macros, like this:
+
+  if (BROTLI_PREDICT_TRUE(zero == 0)) {
+    // main execution path
+  } else {
+    // compiler should place this code outside of main execution path
+  }
+
+OR:
+
+  if (BROTLI_PREDICT_FALSE(something_rare_or_unexpected_happens)) {
+    // compiler should place this code outside of main execution path
+  }
+
 */
-
-#if BROTLI_MODERN_COMPILER || __has_attribute(always_inline)
-#define BROTLI_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((always_inline))
+#if BROTLI_GNUC_HAS_BUILTIN(__builtin_expect, 3, 0, 0) || \
+    BROTLI_INTEL_VERSION_CHECK(16, 0, 0) ||               \
+    BROTLI_SUNPRO_VERSION_CHECK(5, 12, 0) ||              \
+    BROTLI_ARM_VERSION_CHECK(4, 1, 0) ||                  \
+    BROTLI_IBM_VERSION_CHECK(10, 1, 0) ||                 \
+    BROTLI_TI_VERSION_CHECK(7, 3, 0) ||                   \
+    BROTLI_TINYC_VERSION_CHECK(0, 9, 27)
+#define BROTLI_PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))
+#define BROTLI_PREDICT_FALSE(x) (__builtin_expect(x, 0))
 #else
-#define BROTLI_ATTRIBUTE_ALWAYS_INLINE
+#define BROTLI_PREDICT_FALSE(x) (x)
+#define BROTLI_PREDICT_TRUE(x) (x)
 #endif
 
-#if defined(_WIN32) || defined(__CYGWIN__)
-#define BROTLI_ATTRIBUTE_VISIBILITY_HIDDEN
-#elif BROTLI_MODERN_COMPILER || __has_attribute(visibility)
-#define BROTLI_ATTRIBUTE_VISIBILITY_HIDDEN \
-    __attribute__ ((visibility ("hidden")))
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \
+    !defined(__cplusplus)
+#define BROTLI_RESTRICT restrict
+#elif BROTLI_GNUC_VERSION_CHECK(3, 1, 0) ||                         \
+    BROTLI_MSVC_VERSION_CHECK(14, 0, 0) ||                          \
+    BROTLI_INTEL_VERSION_CHECK(16, 0, 0) ||                         \
+    BROTLI_ARM_VERSION_CHECK(4, 1, 0) ||                            \
+    BROTLI_IBM_VERSION_CHECK(10, 1, 0) ||                           \
+    BROTLI_PGI_VERSION_CHECK(17, 10, 0) ||                          \
+    BROTLI_TI_VERSION_CHECK(8, 0, 0) ||                             \
+    BROTLI_IAR_VERSION_CHECK(8, 0, 0) ||                            \
+    (BROTLI_SUNPRO_VERSION_CHECK(5, 14, 0) && defined(__cplusplus))
+#define BROTLI_RESTRICT __restrict
+#elif BROTLI_SUNPRO_VERSION_CHECK(5, 3, 0) && !defined(__cplusplus)
+#define BROTLI_RESTRICT _Restrict
 #else
-#define BROTLI_ATTRIBUTE_VISIBILITY_HIDDEN
+#define BROTLI_RESTRICT
 #endif
 
-#ifndef BROTLI_INTERNAL
-#define BROTLI_INTERNAL BROTLI_ATTRIBUTE_VISIBILITY_HIDDEN
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \
+    (defined(__cplusplus) && (__cplusplus >= 199711L))
+#define BROTLI_MAYBE_INLINE inline
+#elif defined(__GNUC_STDC_INLINE__) || defined(__GNUC_GNU_INLINE__) || \
+    BROTLI_ARM_VERSION_CHECK(6, 2, 0)
+#define BROTLI_MAYBE_INLINE __inline__
+#elif BROTLI_MSVC_VERSION_CHECK(12, 0, 0) || \
+    BROTLI_ARM_VERSION_CHECK(4, 1, 0) || BROTLI_TI_VERSION_CHECK(8, 0, 0)
+#define BROTLI_MAYBE_INLINE __inline
+#else
+#define BROTLI_MAYBE_INLINE
 #endif
 
-#ifndef _MSC_VER
-#if defined(__cplusplus) || !defined(__STRICT_ANSI__) || \
-    (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
-#define BROTLI_INLINE inline BROTLI_ATTRIBUTE_ALWAYS_INLINE
+#if BROTLI_GNUC_HAS_ATTRIBUTE(always_inline, 4, 0, 0) ||                       \
+    BROTLI_INTEL_VERSION_CHECK(16, 0, 0) ||                                    \
+    BROTLI_SUNPRO_VERSION_CHECK(5, 11, 0) ||                                   \
+    BROTLI_ARM_VERSION_CHECK(4, 1, 0) ||                                       \
+    BROTLI_IBM_VERSION_CHECK(10, 1, 0) ||                                      \
+    BROTLI_TI_VERSION_CHECK(8, 0, 0) ||                                        \
+    (BROTLI_TI_VERSION_CHECK(7, 3, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__))
+#define BROTLI_INLINE BROTLI_MAYBE_INLINE __attribute__((__always_inline__))
+#elif BROTLI_MSVC_VERSION_CHECK(12, 0, 0)
+#define BROTLI_INLINE BROTLI_MAYBE_INLINE __forceinline
+#elif BROTLI_TI_VERSION_CHECK(7, 0, 0) && defined(__cplusplus)
+#define BROTLI_INLINE BROTLI_MAYBE_INLINE _Pragma("FUNC_ALWAYS_INLINE;")
+#elif BROTLI_IAR_VERSION_CHECK(8, 0, 0)
+#define BROTLI_INLINE BROTLI_MAYBE_INLINE _Pragma("inline=forced")
 #else
-#define BROTLI_INLINE
+#define BROTLI_INLINE BROTLI_MAYBE_INLINE
 #endif
-#else  /* _MSC_VER */
-#define BROTLI_INLINE __forceinline
-#endif  /* _MSC_VER */
 
-#if BROTLI_MODERN_COMPILER || __has_attribute(unused)
-#define BROTLI_UNUSED_FUNCTION static BROTLI_INLINE __attribute__ ((unused))
+#if BROTLI_GNUC_HAS_ATTRIBUTE(noinline, 4, 0, 0) ||                            \
+    BROTLI_INTEL_VERSION_CHECK(16, 0, 0) ||                                    \
+    BROTLI_SUNPRO_VERSION_CHECK(5, 11, 0) ||                                   \
+    BROTLI_ARM_VERSION_CHECK(4, 1, 0) ||                                       \
+    BROTLI_IBM_VERSION_CHECK(10, 1, 0) ||                                      \
+    BROTLI_TI_VERSION_CHECK(8, 0, 0) ||                                        \
+    (BROTLI_TI_VERSION_CHECK(7, 3, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__))
+#define BROTLI_NOINLINE __attribute__((__noinline__))
+#elif BROTLI_MSVC_VERSION_CHECK(13, 10, 0)
+#define BROTLI_NOINLINE __declspec(noinline)
+#elif BROTLI_PGI_VERSION_CHECK(10, 2, 0)
+#define BROTLI_NOINLINE _Pragma("noinline")
+#elif BROTLI_TI_VERSION_CHECK(6, 0, 0) && defined(__cplusplus)
+#define BROTLI_NOINLINE _Pragma("FUNC_CANNOT_INLINE;")
+#elif BROTLI_IAR_VERSION_CHECK(8, 0, 0)
+#define BROTLI_NOINLINE _Pragma("inline=never")
 #else
-#define BROTLI_UNUSED_FUNCTION static BROTLI_INLINE
+#define BROTLI_NOINLINE
 #endif
 
-#if !defined(__cplusplus) && !defined(c_plusplus) && \
-    (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
-#define BROTLI_RESTRICT restrict
-#elif BROTLI_GCC_VERSION > 295 || defined(__llvm__)
-#define BROTLI_RESTRICT __restrict
+/* BROTLI_INTERNAL could be defined to override visibility, e.g. for tests. */
+#if !defined(BROTLI_INTERNAL)
+#if defined(_WIN32) || defined(__CYGWIN__)
+#define BROTLI_INTERNAL
+#elif BROTLI_GNUC_VERSION_CHECK(3, 3, 0) ||                         \
+    BROTLI_TI_VERSION_CHECK(8, 0, 0) ||                             \
+    BROTLI_INTEL_VERSION_CHECK(16, 0, 0) ||                         \
+    BROTLI_ARM_VERSION_CHECK(4, 1, 0) ||                            \
+    BROTLI_IBM_VERSION_CHECK(13, 1, 0) ||                           \
+    BROTLI_SUNPRO_VERSION_CHECK(5, 11, 0) ||                        \
+    (BROTLI_TI_VERSION_CHECK(7, 3, 0) &&                            \
+     defined(__TI_GNU_ATTRIBUTE_SUPPORT__) && defined(__TI_EABI__))
+#define BROTLI_INTERNAL __attribute__ ((visibility ("hidden")))
 #else
-#define BROTLI_RESTRICT
+#define BROTLI_INTERNAL
 #endif
+#endif
 
-#if BROTLI_MODERN_COMPILER || __has_attribute(noinline)
-#define BROTLI_NOINLINE __attribute__((noinline))
+/* <<< <<< <<< end of hedley macros. */
+
+#if BROTLI_GNUC_HAS_ATTRIBUTE(unused, 2, 7, 0) || \
+    BROTLI_INTEL_VERSION_CHECK(16, 0, 0)
+#define BROTLI_UNUSED_FUNCTION static BROTLI_INLINE __attribute__ ((unused))
 #else
-#define BROTLI_NOINLINE
+#define BROTLI_UNUSED_FUNCTION static BROTLI_INLINE
 #endif
 
 #if (defined(__ARM_ARCH) && (__ARM_ARCH == 7)) || \
@@ -121,12 +202,16 @@
 #define BROTLI_TARGET_POWERPC64
 #endif
 
+#if defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
+#define BROTLI_TARGET_RISCV64
+#endif
+
 #if defined(BROTLI_BUILD_64_BIT)
 #define BROTLI_64_BITS 1
 #elif defined(BROTLI_BUILD_32_BIT)
 #define BROTLI_64_BITS 0
 #elif defined(BROTLI_TARGET_X64) || defined(BROTLI_TARGET_ARMV8) || \
-    defined(BROTLI_TARGET_POWERPC64)
+    defined(BROTLI_TARGET_POWERPC64) || defined(BROTLI_TARGET_RISCV64)
 #define BROTLI_64_BITS 1
 #else
 #define BROTLI_64_BITS 0
@@ -167,16 +252,17 @@
 #define BROTLI_BIG_ENDIAN 0
 #endif
 
-#ifdef BROTLI_X_BYTE_ORDER
+#if defined(BROTLI_X_BYTE_ORDER)
 #undef BROTLI_X_BYTE_ORDER
 #undef BROTLI_X_LITTLE_ENDIAN
 #undef BROTLI_X_BIG_ENDIAN
 #endif
 
-#ifdef BROTLI_BUILD_PORTABLE
+#if defined(BROTLI_BUILD_PORTABLE)
 #define BROTLI_ALIGNED_READ (!!1)
 #elif defined(BROTLI_TARGET_X86) || defined(BROTLI_TARGET_X64) || \
-     defined(BROTLI_TARGET_ARMV7) || defined(BROTLI_TARGET_ARMV8)
+    defined(BROTLI_TARGET_ARMV7) || defined(BROTLI_TARGET_ARMV8) || \
+    defined(BROTLI_TARGET_RISCV64)
 /* Allow unaligned read only for white-listed CPUs. */
 #define BROTLI_ALIGNED_READ (!!0)
 #else
@@ -306,34 +392,9 @@
 }
 #endif  /* BROTLI_LITTLE_ENDIAN */
 
-/* Define "BROTLI_PREDICT_TRUE" and "BROTLI_PREDICT_FALSE" macros for capable
-   compilers.
-
-To apply compiler hint, enclose the branching condition into macros, like this:
-
-  if (BROTLI_PREDICT_TRUE(zero == 0)) {
-    // main execution path
-  } else {
-    // compiler should place this code outside of main execution path
-  }
-
-OR:
-
-  if (BROTLI_PREDICT_FALSE(something_rare_or_unexpected_happens)) {
-    // compiler should place this code outside of main execution path
-  }
-
-*/
-#if BROTLI_MODERN_COMPILER || __has_builtin(__builtin_expect)
-#define BROTLI_PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))
-#define BROTLI_PREDICT_FALSE(x) (__builtin_expect(x, 0))
-#else
-#define BROTLI_PREDICT_FALSE(x) (x)
-#define BROTLI_PREDICT_TRUE(x) (x)
-#endif
-
 /* BROTLI_IS_CONSTANT macros returns true for compile-time constants. */
-#if BROTLI_MODERN_COMPILER || __has_builtin(__builtin_constant_p)
+#if BROTLI_GNUC_HAS_BUILTIN(__builtin_constant_p, 3, 0, 1) || \
+    BROTLI_INTEL_VERSION_CHECK(16, 0, 0)
 #define BROTLI_IS_CONSTANT(x) (!!__builtin_constant_p(x))
 #else
 #define BROTLI_IS_CONSTANT(x) (!!0)
@@ -345,7 +406,7 @@
 #define BROTLI_HAS_UBFX (!!0)
 #endif
 
-#ifdef BROTLI_ENABLE_LOG
+#if defined(BROTLI_ENABLE_LOG)
 #define BROTLI_DCHECK(x) assert(x)
 #define BROTLI_LOG(x) printf x
 #else
@@ -363,7 +424,8 @@
 #define BROTLI_DUMP() (void)(0)
 #endif
 
-#if (BROTLI_MODERN_COMPILER || defined(__llvm__)) && \
+/* TODO: add appropriate icc/sunpro/arm/ibm/ti checks. */
+#if (BROTLI_GNUC_VERSION_CHECK(3, 0, 0) || defined(__llvm__)) && \
     !defined(BROTLI_BUILD_NO_RBIT)
 #if defined(BROTLI_TARGET_ARMV7) || defined(BROTLI_TARGET_ARMV8)
 /* TODO: detect ARMv6T2 and enable this code for it. */
@@ -415,32 +477,32 @@
 }
 
 BROTLI_UNUSED_FUNCTION void BrotliSuppressUnusedFunctions(void) {
-  BROTLI_UNUSED(BrotliSuppressUnusedFunctions);
-  BROTLI_UNUSED(BrotliUnalignedRead16);
-  BROTLI_UNUSED(BrotliUnalignedRead32);
-  BROTLI_UNUSED(BrotliUnalignedRead64);
-  BROTLI_UNUSED(BrotliUnalignedWrite64);
-  BROTLI_UNUSED(BROTLI_UNALIGNED_LOAD16LE);
-  BROTLI_UNUSED(BROTLI_UNALIGNED_LOAD32LE);
-  BROTLI_UNUSED(BROTLI_UNALIGNED_LOAD64LE);
-  BROTLI_UNUSED(BROTLI_UNALIGNED_STORE64LE);
-  BROTLI_UNUSED(BrotliRBit);
-  BROTLI_UNUSED(brotli_min_double);
-  BROTLI_UNUSED(brotli_max_double);
-  BROTLI_UNUSED(brotli_min_float);
-  BROTLI_UNUSED(brotli_max_float);
-  BROTLI_UNUSED(brotli_min_int);
-  BROTLI_UNUSED(brotli_max_int);
-  BROTLI_UNUSED(brotli_min_size_t);
-  BROTLI_UNUSED(brotli_max_size_t);
-  BROTLI_UNUSED(brotli_min_uint32_t);
-  BROTLI_UNUSED(brotli_max_uint32_t);
-  BROTLI_UNUSED(brotli_min_uint8_t);
-  BROTLI_UNUSED(brotli_max_uint8_t);
-  BROTLI_UNUSED(BrotliDefaultAllocFunc);
-  BROTLI_UNUSED(BrotliDefaultFreeFunc);
+  BROTLI_UNUSED(&BrotliSuppressUnusedFunctions);
+  BROTLI_UNUSED(&BrotliUnalignedRead16);
+  BROTLI_UNUSED(&BrotliUnalignedRead32);
+  BROTLI_UNUSED(&BrotliUnalignedRead64);
+  BROTLI_UNUSED(&BrotliUnalignedWrite64);
+  BROTLI_UNUSED(&BROTLI_UNALIGNED_LOAD16LE);
+  BROTLI_UNUSED(&BROTLI_UNALIGNED_LOAD32LE);
+  BROTLI_UNUSED(&BROTLI_UNALIGNED_LOAD64LE);
+  BROTLI_UNUSED(&BROTLI_UNALIGNED_STORE64LE);
+  BROTLI_UNUSED(&BrotliRBit);
+  BROTLI_UNUSED(&brotli_min_double);
+  BROTLI_UNUSED(&brotli_max_double);
+  BROTLI_UNUSED(&brotli_min_float);
+  BROTLI_UNUSED(&brotli_max_float);
+  BROTLI_UNUSED(&brotli_min_int);
+  BROTLI_UNUSED(&brotli_max_int);
+  BROTLI_UNUSED(&brotli_min_size_t);
+  BROTLI_UNUSED(&brotli_max_size_t);
+  BROTLI_UNUSED(&brotli_min_uint32_t);
+  BROTLI_UNUSED(&brotli_max_uint32_t);
+  BROTLI_UNUSED(&brotli_min_uint8_t);
+  BROTLI_UNUSED(&brotli_max_uint8_t);
+  BROTLI_UNUSED(&BrotliDefaultAllocFunc);
+  BROTLI_UNUSED(&BrotliDefaultFreeFunc);
 #if defined(BROTLI_DEBUG) || defined(BROTLI_ENABLE_LOG)
-  BROTLI_UNUSED(BrotliDump);
+  BROTLI_UNUSED(&BrotliDump);
 #endif
 }
 

Added: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/transform.c
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/transform.c	                        (rev 0)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/transform.c	2018-07-08 08:06:14 UTC (rev 48164)
@@ -0,0 +1,235 @@
+/* Copyright 2013 Google Inc. All Rights Reserved.
+
+   Distributed under MIT license.
+   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+#include "./transform.h"
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+/* RFC 7932 transforms string data */
+static const char kPrefixSuffix[217] =
+      "\1 \2, \10 of the \4 of \2s \1.\5 and \4 "
+/* 0x  _0 _2  __5        _E    _3  _6 _8     _E */
+      "in \1\"\4 to \2\">\1\n\2. \1]\5 for \3 a \6 "
+/* 2x     _3_ _5    _A_  _D_ _F  _2 _4     _A   _E */
+      "that \1\'\6 with \6 from \4 by \1(\6. T"
+/* 4x       _5_ _7      _E      _5    _A _C */
+      "he \4 on \4 as \4 is \4ing \2\n\t\1:\3ed "
+/* 6x     _3    _8    _D    _2    _7_ _ _A _C */
+      "\2=\"\4 at \3ly \1,\2=\'\5.com/\7. This \5"
+/* 8x  _0 _ _3    _8   _C _E _ _1     _7       _F */
+      " not \3er \3al \4ful \4ive \5less \4es"
+/* Ax       _5   _9   _D    _2    _7     _D */
+      "t \4ize \2\xc2\xa0\4ous \5 the \2e \0";
+/* Cx    _2    _7___ ___ _A    _F     _5  _8 */
+
+static const uint16_t kPrefixSuffixMap[50] = {
+  0x00, 0x02, 0x05, 0x0E, 0x13, 0x16, 0x18, 0x1E, 0x23, 0x25,
+  0x2A, 0x2D, 0x2F, 0x32, 0x34, 0x3A, 0x3E, 0x45, 0x47, 0x4E,
+  0x55, 0x5A, 0x5C, 0x63, 0x68, 0x6D, 0x72, 0x77, 0x7A, 0x7C,
+  0x80, 0x83, 0x88, 0x8C, 0x8E, 0x91, 0x97, 0x9F, 0xA5, 0xA9,
+  0xAD, 0xB2, 0xB7, 0xBD, 0xC2, 0xC7, 0xCA, 0xCF, 0xD5, 0xD8
+};
+
+/* RFC 7932 transforms */
+static const uint8_t kTransformsData[] = {
+  49, BROTLI_TRANSFORM_IDENTITY, 49,
+  49, BROTLI_TRANSFORM_IDENTITY, 0,
+   0, BROTLI_TRANSFORM_IDENTITY, 0,
+  49, BROTLI_TRANSFORM_OMIT_FIRST_1, 49,
+  49, BROTLI_TRANSFORM_UPPERCASE_FIRST, 0,
+  49, BROTLI_TRANSFORM_IDENTITY, 47,
+   0, BROTLI_TRANSFORM_IDENTITY, 49,
+   4, BROTLI_TRANSFORM_IDENTITY, 0,
+  49, BROTLI_TRANSFORM_IDENTITY, 3,
+  49, BROTLI_TRANSFORM_UPPERCASE_FIRST, 49,
+  49, BROTLI_TRANSFORM_IDENTITY, 6,
+  49, BROTLI_TRANSFORM_OMIT_FIRST_2, 49,
+  49, BROTLI_TRANSFORM_OMIT_LAST_1, 49,
+   1, BROTLI_TRANSFORM_IDENTITY, 0,
+  49, BROTLI_TRANSFORM_IDENTITY, 1,
+   0, BROTLI_TRANSFORM_UPPERCASE_FIRST, 0,
+  49, BROTLI_TRANSFORM_IDENTITY, 7,
+  49, BROTLI_TRANSFORM_IDENTITY, 9,
+  48, BROTLI_TRANSFORM_IDENTITY, 0,
+  49, BROTLI_TRANSFORM_IDENTITY, 8,
+  49, BROTLI_TRANSFORM_IDENTITY, 5,
+  49, BROTLI_TRANSFORM_IDENTITY, 10,
+  49, BROTLI_TRANSFORM_IDENTITY, 11,
+  49, BROTLI_TRANSFORM_OMIT_LAST_3, 49,
+  49, BROTLI_TRANSFORM_IDENTITY, 13,
+  49, BROTLI_TRANSFORM_IDENTITY, 14,
+  49, BROTLI_TRANSFORM_OMIT_FIRST_3, 49,
+  49, BROTLI_TRANSFORM_OMIT_LAST_2, 49,
+  49, BROTLI_TRANSFORM_IDENTITY, 15,
+  49, BROTLI_TRANSFORM_IDENTITY, 16,
+   0, BROTLI_TRANSFORM_UPPERCASE_FIRST, 49,
+  49, BROTLI_TRANSFORM_IDENTITY, 12,
+   5, BROTLI_TRANSFORM_IDENTITY, 49,
+   0, BROTLI_TRANSFORM_IDENTITY, 1,
+  49, BROTLI_TRANSFORM_OMIT_FIRST_4, 49,
+  49, BROTLI_TRANSFORM_IDENTITY, 18,
+  49, BROTLI_TRANSFORM_IDENTITY, 17,
+  49, BROTLI_TRANSFORM_IDENTITY, 19,
+  49, BROTLI_TRANSFORM_IDENTITY, 20,
+  49, BROTLI_TRANSFORM_OMIT_FIRST_5, 49,
+  49, BROTLI_TRANSFORM_OMIT_FIRST_6, 49,
+  47, BROTLI_TRANSFORM_IDENTITY, 49,
+  49, BROTLI_TRANSFORM_OMIT_LAST_4, 49,
+  49, BROTLI_TRANSFORM_IDENTITY, 22,
+  49, BROTLI_TRANSFORM_UPPERCASE_ALL, 49,
+  49, BROTLI_TRANSFORM_IDENTITY, 23,
+  49, BROTLI_TRANSFORM_IDENTITY, 24,
+  49, BROTLI_TRANSFORM_IDENTITY, 25,
+  49, BROTLI_TRANSFORM_OMIT_LAST_7, 49,
+  49, BROTLI_TRANSFORM_OMIT_LAST_1, 26,
+  49, BROTLI_TRANSFORM_IDENTITY, 27,
+  49, BROTLI_TRANSFORM_IDENTITY, 28,
+   0, BROTLI_TRANSFORM_IDENTITY, 12,
+  49, BROTLI_TRANSFORM_IDENTITY, 29,
+  49, BROTLI_TRANSFORM_OMIT_FIRST_9, 49,
+  49, BROTLI_TRANSFORM_OMIT_FIRST_7, 49,
+  49, BROTLI_TRANSFORM_OMIT_LAST_6, 49,
+  49, BROTLI_TRANSFORM_IDENTITY, 21,
+  49, BROTLI_TRANSFORM_UPPERCASE_FIRST, 1,
+  49, BROTLI_TRANSFORM_OMIT_LAST_8, 49,
+  49, BROTLI_TRANSFORM_IDENTITY, 31,
+  49, BROTLI_TRANSFORM_IDENTITY, 32,
+  47, BROTLI_TRANSFORM_IDENTITY, 3,
+  49, BROTLI_TRANSFORM_OMIT_LAST_5, 49,
+  49, BROTLI_TRANSFORM_OMIT_LAST_9, 49,
+   0, BROTLI_TRANSFORM_UPPERCASE_FIRST, 1,
+  49, BROTLI_TRANSFORM_UPPERCASE_FIRST, 8,
+   5, BROTLI_TRANSFORM_IDENTITY, 21,
+  49, BROTLI_TRANSFORM_UPPERCASE_ALL, 0,
+  49, BROTLI_TRANSFORM_UPPERCASE_FIRST, 10,
+  49, BROTLI_TRANSFORM_IDENTITY, 30,
+   0, BROTLI_TRANSFORM_IDENTITY, 5,
+  35, BROTLI_TRANSFORM_IDENTITY, 49,
+  47, BROTLI_TRANSFORM_IDENTITY, 2,
+  49, BROTLI_TRANSFORM_UPPERCASE_FIRST, 17,
+  49, BROTLI_TRANSFORM_IDENTITY, 36,
+  49, BROTLI_TRANSFORM_IDENTITY, 33,
+   5, BROTLI_TRANSFORM_IDENTITY, 0,
+  49, BROTLI_TRANSFORM_UPPERCASE_FIRST, 21,
+  49, BROTLI_TRANSFORM_UPPERCASE_FIRST, 5,
+  49, BROTLI_TRANSFORM_IDENTITY, 37,
+   0, BROTLI_TRANSFORM_IDENTITY, 30,
+  49, BROTLI_TRANSFORM_IDENTITY, 38,
+   0, BROTLI_TRANSFORM_UPPERCASE_ALL, 0,
+  49, BROTLI_TRANSFORM_IDENTITY, 39,
+   0, BROTLI_TRANSFORM_UPPERCASE_ALL, 49,
+  49, BROTLI_TRANSFORM_IDENTITY, 34,
+  49, BROTLI_TRANSFORM_UPPERCASE_ALL, 8,
+  49, BROTLI_TRANSFORM_UPPERCASE_FIRST, 12,
+   0, BROTLI_TRANSFORM_IDENTITY, 21,
+  49, BROTLI_TRANSFORM_IDENTITY, 40,
+   0, BROTLI_TRANSFORM_UPPERCASE_FIRST, 12,
+  49, BROTLI_TRANSFORM_IDENTITY, 41,
+  49, BROTLI_TRANSFORM_IDENTITY, 42,
+  49, BROTLI_TRANSFORM_UPPERCASE_ALL, 17,
+  49, BROTLI_TRANSFORM_IDENTITY, 43,
+   0, BROTLI_TRANSFORM_UPPERCASE_FIRST, 5,
+  49, BROTLI_TRANSFORM_UPPERCASE_ALL, 10,
+   0, BROTLI_TRANSFORM_IDENTITY, 34,
+  49, BROTLI_TRANSFORM_UPPERCASE_FIRST, 33,
+  49, BROTLI_TRANSFORM_IDENTITY, 44,
+  49, BROTLI_TRANSFORM_UPPERCASE_ALL, 5,
+  45, BROTLI_TRANSFORM_IDENTITY, 49,
+   0, BROTLI_TRANSFORM_IDENTITY, 33,
+  49, BROTLI_TRANSFORM_UPPERCASE_FIRST, 30,
+  49, BROTLI_TRANSFORM_UPPERCASE_ALL, 30,
+  49, BROTLI_TRANSFORM_IDENTITY, 46,
+  49, BROTLI_TRANSFORM_UPPERCASE_ALL, 1,
+  49, BROTLI_TRANSFORM_UPPERCASE_FIRST, 34,
+   0, BROTLI_TRANSFORM_UPPERCASE_FIRST, 33,
+   0, BROTLI_TRANSFORM_UPPERCASE_ALL, 30,
+   0, BROTLI_TRANSFORM_UPPERCASE_ALL, 1,
+  49, BROTLI_TRANSFORM_UPPERCASE_ALL, 33,
+  49, BROTLI_TRANSFORM_UPPERCASE_ALL, 21,
+  49, BROTLI_TRANSFORM_UPPERCASE_ALL, 12,
+   0, BROTLI_TRANSFORM_UPPERCASE_ALL, 5,
+  49, BROTLI_TRANSFORM_UPPERCASE_ALL, 34,
+   0, BROTLI_TRANSFORM_UPPERCASE_ALL, 12,
+   0, BROTLI_TRANSFORM_UPPERCASE_FIRST, 30,
+   0, BROTLI_TRANSFORM_UPPERCASE_ALL, 34,
+   0, BROTLI_TRANSFORM_UPPERCASE_FIRST, 34,
+};
+
+static BrotliTransforms kBrotliTransforms = {
+  sizeof(kPrefixSuffix),
+  (const uint8_t*)kPrefixSuffix,
+  kPrefixSuffixMap,
+  sizeof(kTransformsData) / (3 * sizeof(kTransformsData[0])),
+  kTransformsData,
+  {0, 12, 27, 23, 42, 63, 56, 48, 59, 64}
+};
+
+const BrotliTransforms* BrotliGetTransforms(void) {
+  return &kBrotliTransforms;
+}
+
+static int ToUpperCase(uint8_t* p) {
+  if (p[0] < 0xC0) {
+    if (p[0] >= 'a' && p[0] <= 'z') {
+      p[0] ^= 32;
+    }
+    return 1;
+  }
+  /* An overly simplified uppercasing model for UTF-8. */
+  if (p[0] < 0xE0) {
+    p[1] ^= 32;
+    return 2;
+  }
+  /* An arbitrary transform for three byte characters. */
+  p[2] ^= 5;
+  return 3;
+}
+
+int BrotliTransformDictionaryWord(uint8_t* dst, const uint8_t* word, int len,
+    const BrotliTransforms* transforms, int transfom_idx) {
+  int idx = 0;
+  const uint8_t* prefix = BROTLI_TRANSFORM_PREFIX(transforms, transfom_idx);
+  uint8_t type = BROTLI_TRANSFORM_TYPE(transforms, transfom_idx);
+  const uint8_t* suffix = BROTLI_TRANSFORM_SUFFIX(transforms, transfom_idx);
+  {
+    int prefix_len = *prefix++;
+    while (prefix_len--) { dst[idx++] = *prefix++; }
+  }
+  {
+    const int t = type;
+    int i = 0;
+    if (t <= BROTLI_TRANSFORM_OMIT_LAST_9) {
+      len -= t;
+    } else if (t >= BROTLI_TRANSFORM_OMIT_FIRST_1
+        && t <= BROTLI_TRANSFORM_OMIT_FIRST_9) {
+      int skip = t - (BROTLI_TRANSFORM_OMIT_FIRST_1 - 1);
+      word += skip;
+      len -= skip;
+    }
+    while (i < len) { dst[idx++] = word[i++]; }
+    if (t == BROTLI_TRANSFORM_UPPERCASE_FIRST) {
+      ToUpperCase(&dst[idx - len]);
+    } else if (t == BROTLI_TRANSFORM_UPPERCASE_ALL) {
+      uint8_t* uppercase = &dst[idx - len];
+      while (len > 0) {
+        int step = ToUpperCase(uppercase);
+        uppercase += step;
+        len -= step;
+      }
+    }
+  }
+  {
+    int suffix_len = *suffix++;
+    while (suffix_len--) { dst[idx++] = *suffix++; }
+    return idx;
+  }
+}
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}  /* extern "C" */
+#endif


Property changes on: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/transform.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/version.h
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/version.h	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/version.h	2018-07-08 08:06:14 UTC (rev 48164)
@@ -14,7 +14,7 @@
    BrotliEncoderVersion methods. */
 
 /* Semantic version, calculated as (MAJOR << 24) | (MINOR << 12) | PATCH */
-#define BROTLI_VERSION 0x1000004
+#define BROTLI_VERSION 0x1000005
 
 /* This macro is used by build system to produce Libtool-friendly soname. See
    https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
@@ -21,6 +21,6 @@
  */
 
 /* ABI version, calculated as (CURRENT << 24) | (REVISION << 12) | AGE */
-#define BROTLI_ABI_VERSION 0x1004000
+#define BROTLI_ABI_VERSION 0x1005000
 
 #endif  /* BROTLI_COMMON_VERSION_H_ */

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references.c
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references.c	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references.c	2018-07-08 08:06:14 UTC (rev 48164)
@@ -97,6 +97,21 @@
 #include "./backward_references_inc.h"
 #undef HASHER
 
+#define HASHER() H35
+/* NOLINTNEXTLINE(build/include) */
+#include "./backward_references_inc.h"
+#undef HASHER
+
+#define HASHER() H55
+/* NOLINTNEXTLINE(build/include) */
+#include "./backward_references_inc.h"
+#undef HASHER
+
+#define HASHER() H65
+/* NOLINTNEXTLINE(build/include) */
+#include "./backward_references_inc.h"
+#undef HASHER
+
 #undef PREFIX
 
 #undef EXPORT_FN

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/brotli_bit_stream.h
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/brotli_bit_stream.h	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/brotli_bit_stream.h	2018-07-08 08:06:14 UTC (rev 48164)
@@ -73,8 +73,9 @@
    REQUIRES: length > 0
    REQUIRES: length <= (1 << 24) */
 BROTLI_INTERNAL void BrotliStoreUncompressedMetaBlock(
-    BROTLI_BOOL is_final_block, const uint8_t* input, size_t position,
-    size_t mask, size_t len, size_t* storage_ix, uint8_t* storage);
+    BROTLI_BOOL is_final_block, const uint8_t* BROTLI_RESTRICT input,
+    size_t position, size_t mask, size_t len,
+    size_t* BROTLI_RESTRICT storage_ix, uint8_t* BROTLI_RESTRICT storage);
 
 #if defined(__cplusplus) || defined(c_plusplus)
 }  /* extern "C" */

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/command.h
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/command.h	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/command.h	2018-07-08 08:06:14 UTC (rev 48164)
@@ -62,13 +62,13 @@
 static BROTLI_INLINE uint16_t CombineLengthCodes(
     uint16_t inscode, uint16_t copycode, BROTLI_BOOL use_last_distance) {
   uint16_t bits64 =
-      (uint16_t)((copycode & 0x7u) | ((inscode & 0x7u) << 3));
-  if (use_last_distance && inscode < 8 && copycode < 16) {
-    return (copycode < 8) ? bits64 : (bits64 | 64);
+      (uint16_t)((copycode & 0x7u) | ((inscode & 0x7u) << 3u));
+  if (use_last_distance && inscode < 8u && copycode < 16u) {
+    return (copycode < 8u) ? bits64 : (bits64 | 64u);
   } else {
     /* Specification: 5 Encoding of ... (last table) */
     /* offset = 2 * index, where index is in range [0..8] */
-    int offset = 2 * ((copycode >> 3) + 3 * (inscode >> 3));
+    uint32_t offset = 2u * ((copycode >> 3u) + 3u * (inscode >> 3u));
     /* All values in specification are K * 64,
        where   K = [2, 3, 6, 4, 5, 8, 7, 9, 10],
            i + 1 = [1, 2, 3, 4, 5, 6, 7, 8,  9],
@@ -75,8 +75,8 @@
        K - i - 1 = [1, 1, 3, 0, 0, 2, 0, 1,  2] = D.
        All values in D require only 2 bits to encode.
        Magic constant is shifted 6 bits left, to avoid final multiplication. */
-    offset = (offset << 5) + 0x40 + ((0x520D40 >> offset) & 0xC0);
-    return (uint16_t)offset | bits64;
+    offset = (offset << 5u) + 0x40u + ((0x520D40u >> offset) & 0xC0u);
+    return (uint16_t)(offset | bits64);
   }
 }
 

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment.c
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment.c	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment.c	2018-07-08 08:06:14 UTC (rev 48164)
@@ -202,7 +202,7 @@
   } else {
     BrotliWriteBits(depth[61], bits[61], storage_ix, storage);
     BrotliWriteBits(12, insertlen - 2114, storage_ix, storage);
-    ++histo[21];
+    ++histo[61];
   }
 }
 
@@ -215,11 +215,11 @@
   if (insertlen < 22594) {
     BrotliWriteBits(depth[62], bits[62], storage_ix, storage);
     BrotliWriteBits(14, insertlen - 6210, storage_ix, storage);
-    ++histo[22];
+    ++histo[62];
   } else {
     BrotliWriteBits(depth[63], bits[63], storage_ix, storage);
     BrotliWriteBits(24, insertlen - 22594, storage_ix, storage);
-    ++histo[23];
+    ++histo[63];
   }
 }
 
@@ -251,7 +251,7 @@
   } else {
     BrotliWriteBits(depth[39], bits[39], storage_ix, storage);
     BrotliWriteBits(24, copylen - 2118, storage_ix, storage);
-    ++histo[47];
+    ++histo[39];
   }
 }
 
@@ -293,7 +293,7 @@
     BrotliWriteBits(depth[39], bits[39], storage_ix, storage);
     BrotliWriteBits(24, copylen - 2120, storage_ix, storage);
     BrotliWriteBits(depth[64], bits[64], storage_ix, storage);
-    ++histo[47];
+    ++histo[39];
     ++histo[64];
   }
 }

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment_two_pass.c
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment_two_pass.c	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment_two_pass.c	2018-07-08 08:06:14 UTC (rev 48164)
@@ -39,26 +39,29 @@
    * The number has been tuned heuristically against compression benchmarks. */
 static const uint32_t kHashMul32 = 0x1E35A7BD;
 
-static BROTLI_INLINE uint32_t Hash(const uint8_t* p, size_t shift) {
-  const uint64_t h = (BROTLI_UNALIGNED_LOAD64LE(p) << 16) * kHashMul32;
+static BROTLI_INLINE uint32_t Hash(const uint8_t* p,
+    size_t shift, size_t length) {
+  const uint64_t h =
+      (BROTLI_UNALIGNED_LOAD64LE(p) << ((8 - length) * 8)) * kHashMul32;
   return (uint32_t)(h >> shift);
 }
 
-static BROTLI_INLINE uint32_t HashBytesAtOffset(
-    uint64_t v, int offset, size_t shift) {
-  BROTLI_DCHECK(offset >= 0);
-  BROTLI_DCHECK(offset <= 2);
+static BROTLI_INLINE uint32_t HashBytesAtOffset(uint64_t v, size_t offset,
+    size_t shift, size_t length) {
+  BROTLI_DCHECK(offset <= 8 - length);
   {
-    const uint64_t h = ((v >> (8 * offset)) << 16) * kHashMul32;
+    const uint64_t h = ((v >> (8 * offset)) << ((8 - length) * 8)) * kHashMul32;
     return (uint32_t)(h >> shift);
   }
 }
 
-static BROTLI_INLINE BROTLI_BOOL IsMatch(const uint8_t* p1, const uint8_t* p2) {
-  return TO_BROTLI_BOOL(
-      BrotliUnalignedRead32(p1) == BrotliUnalignedRead32(p2) &&
-      p1[4] == p2[4] &&
-      p1[5] == p2[5]);
+static BROTLI_INLINE BROTLI_BOOL IsMatch(const uint8_t* p1, const uint8_t* p2,
+    size_t length) {
+  if (BrotliUnalignedRead32(p1) == BrotliUnalignedRead32(p2)) {
+    if (length == 4) return BROTLI_TRUE;
+    return TO_BROTLI_BOOL(p1[4] == p2[4] && p1[5] == p2[5]);
+  }
+  return BROTLI_FALSE;
 }
 
 /* Builds a command and distance prefix code (each 64 symbols) into "depth" and
@@ -235,7 +238,8 @@
 
 static BROTLI_INLINE void CreateCommands(const uint8_t* input,
     size_t block_size, size_t input_size, const uint8_t* base_ip, int* table,
-    size_t table_bits, uint8_t** literals, uint32_t** commands) {
+    size_t table_bits, size_t min_match,
+    uint8_t** literals, uint32_t** commands) {
   /* "ip" is the input pointer. */
   const uint8_t* ip = input;
   const size_t shift = 64u - table_bits;
@@ -247,7 +251,6 @@
 
   int last_distance = -1;
   const size_t kInputMarginBytes = BROTLI_WINDOW_GAP;
-  const size_t kMinMatchLen = 6;
 
   if (BROTLI_PREDICT_TRUE(block_size >= kInputMarginBytes)) {
     /* For the last block, we need to keep a 16 bytes margin so that we can be
@@ -254,12 +257,12 @@
        sure that all distances are at most window size - 16.
        For all other blocks, we only need to keep a margin of 5 bytes so that
        we don't go over the block size with a copy. */
-    const size_t len_limit = BROTLI_MIN(size_t, block_size - kMinMatchLen,
+    const size_t len_limit = BROTLI_MIN(size_t, block_size - min_match,
                                         input_size - kInputMarginBytes);
     const uint8_t* ip_limit = input + len_limit;
 
     uint32_t next_hash;
-    for (next_hash = Hash(++ip, shift); ; ) {
+    for (next_hash = Hash(++ip, shift, min_match); ; ) {
       /* Step 1: Scan forward in the input looking for a 6-byte-long match.
          If we get close to exhausting the input then goto emit_remainder.
 
@@ -286,14 +289,14 @@
         uint32_t hash = next_hash;
         uint32_t bytes_between_hash_lookups = skip++ >> 5;
         ip = next_ip;
-        BROTLI_DCHECK(hash == Hash(ip, shift));
+        BROTLI_DCHECK(hash == Hash(ip, shift, min_match));
         next_ip = ip + bytes_between_hash_lookups;
         if (BROTLI_PREDICT_FALSE(next_ip > ip_limit)) {
           goto emit_remainder;
         }
-        next_hash = Hash(next_ip, shift);
+        next_hash = Hash(next_ip, shift, min_match);
         candidate = ip - last_distance;
-        if (IsMatch(ip, candidate)) {
+        if (IsMatch(ip, candidate, min_match)) {
           if (BROTLI_PREDICT_TRUE(candidate < ip)) {
             table[hash] = (int)(ip - base_ip);
             break;
@@ -304,7 +307,7 @@
         BROTLI_DCHECK(candidate < ip);
 
         table[hash] = (int)(ip - base_ip);
-      } while (BROTLI_PREDICT_TRUE(!IsMatch(ip, candidate)));
+      } while (BROTLI_PREDICT_TRUE(!IsMatch(ip, candidate, min_match)));
 
       /* Check copy distance. If candidate is not feasible, continue search.
          Checking is done outside of hot loop to reduce overhead. */
@@ -319,8 +322,9 @@
         /* We have a 6-byte match at ip, and we need to emit bytes in
            [next_emit, ip). */
         const uint8_t* base = ip;
-        size_t matched = 6 + FindMatchLengthWithLimit(
-            candidate + 6, ip + 6, (size_t)(ip_end - ip) - 6);
+        size_t matched = min_match + FindMatchLengthWithLimit(
+            candidate + min_match, ip + min_match,
+            (size_t)(ip_end - ip) - min_match);
         int distance = (int)(base - candidate);  /* > 0 */
         int insert = (int)(base - next_emit);
         ip += matched;
@@ -345,20 +349,33 @@
           /* We could immediately start working at ip now, but to improve
              compression we first update "table" with the hashes of some
              positions within the last copy. */
-          uint64_t input_bytes = BROTLI_UNALIGNED_LOAD64LE(ip - 5);
-          uint32_t prev_hash = HashBytesAtOffset(input_bytes, 0, shift);
+          uint64_t input_bytes;
           uint32_t cur_hash;
-          table[prev_hash] = (int)(ip - base_ip - 5);
-          prev_hash = HashBytesAtOffset(input_bytes, 1, shift);
-          table[prev_hash] = (int)(ip - base_ip - 4);
-          prev_hash = HashBytesAtOffset(input_bytes, 2, shift);
-          table[prev_hash] = (int)(ip - base_ip - 3);
-          input_bytes = BROTLI_UNALIGNED_LOAD64LE(ip - 2);
-          cur_hash = HashBytesAtOffset(input_bytes, 2, shift);
-          prev_hash = HashBytesAtOffset(input_bytes, 0, shift);
-          table[prev_hash] = (int)(ip - base_ip - 2);
-          prev_hash = HashBytesAtOffset(input_bytes, 1, shift);
-          table[prev_hash] = (int)(ip - base_ip - 1);
+          uint32_t prev_hash;
+          if (min_match == 4) {
+            input_bytes = BROTLI_UNALIGNED_LOAD64LE(ip - 3);
+            cur_hash = HashBytesAtOffset(input_bytes, 3, shift, min_match);
+            prev_hash = HashBytesAtOffset(input_bytes, 0, shift, min_match);
+            table[prev_hash] = (int)(ip - base_ip - 3);
+            prev_hash = HashBytesAtOffset(input_bytes, 1, shift, min_match);
+            table[prev_hash] = (int)(ip - base_ip - 2);
+            prev_hash = HashBytesAtOffset(input_bytes, 0, shift, min_match);
+            table[prev_hash] = (int)(ip - base_ip - 1);
+          } else {
+            input_bytes = BROTLI_UNALIGNED_LOAD64LE(ip - 5);
+            prev_hash = HashBytesAtOffset(input_bytes, 0, shift, min_match);
+            table[prev_hash] = (int)(ip - base_ip - 5);
+            prev_hash = HashBytesAtOffset(input_bytes, 1, shift, min_match);
+            table[prev_hash] = (int)(ip - base_ip - 4);
+            prev_hash = HashBytesAtOffset(input_bytes, 2, shift, min_match);
+            table[prev_hash] = (int)(ip - base_ip - 3);
+            input_bytes = BROTLI_UNALIGNED_LOAD64LE(ip - 2);
+            cur_hash = HashBytesAtOffset(input_bytes, 2, shift, min_match);
+            prev_hash = HashBytesAtOffset(input_bytes, 0, shift, min_match);
+            table[prev_hash] = (int)(ip - base_ip - 2);
+            prev_hash = HashBytesAtOffset(input_bytes, 1, shift, min_match);
+            table[prev_hash] = (int)(ip - base_ip - 1);
+          }
 
           candidate = base_ip + table[cur_hash];
           table[cur_hash] = (int)(ip - base_ip);
@@ -365,12 +382,14 @@
         }
       }
 
-      while (ip - candidate <= MAX_DISTANCE && IsMatch(ip, candidate)) {
+      while (ip - candidate <= MAX_DISTANCE &&
+          IsMatch(ip, candidate, min_match)) {
         /* We have a 6-byte match at ip, and no need to emit any
            literal bytes prior to ip. */
         const uint8_t* base = ip;
-        size_t matched = 6 + FindMatchLengthWithLimit(
-            candidate + 6, ip + 6, (size_t)(ip_end - ip) - 6);
+        size_t matched = min_match + FindMatchLengthWithLimit(
+            candidate + min_match, ip + min_match,
+            (size_t)(ip_end - ip) - min_match);
         ip += matched;
         last_distance = (int)(base - candidate);  /* > 0 */
         BROTLI_DCHECK(0 == memcmp(base, candidate, matched));
@@ -385,20 +404,33 @@
           /* We could immediately start working at ip now, but to improve
              compression we first update "table" with the hashes of some
              positions within the last copy. */
-          uint64_t input_bytes = BROTLI_UNALIGNED_LOAD64LE(ip - 5);
-          uint32_t prev_hash = HashBytesAtOffset(input_bytes, 0, shift);
+          uint64_t input_bytes;
           uint32_t cur_hash;
-          table[prev_hash] = (int)(ip - base_ip - 5);
-          prev_hash = HashBytesAtOffset(input_bytes, 1, shift);
-          table[prev_hash] = (int)(ip - base_ip - 4);
-          prev_hash = HashBytesAtOffset(input_bytes, 2, shift);
-          table[prev_hash] = (int)(ip - base_ip - 3);
-          input_bytes = BROTLI_UNALIGNED_LOAD64LE(ip - 2);
-          cur_hash = HashBytesAtOffset(input_bytes, 2, shift);
-          prev_hash = HashBytesAtOffset(input_bytes, 0, shift);
-          table[prev_hash] = (int)(ip - base_ip - 2);
-          prev_hash = HashBytesAtOffset(input_bytes, 1, shift);
-          table[prev_hash] = (int)(ip - base_ip - 1);
+          uint32_t prev_hash;
+          if (min_match == 4) {
+            input_bytes = BROTLI_UNALIGNED_LOAD64LE(ip - 3);
+            cur_hash = HashBytesAtOffset(input_bytes, 3, shift, min_match);
+            prev_hash = HashBytesAtOffset(input_bytes, 0, shift, min_match);
+            table[prev_hash] = (int)(ip - base_ip - 3);
+            prev_hash = HashBytesAtOffset(input_bytes, 1, shift, min_match);
+            table[prev_hash] = (int)(ip - base_ip - 2);
+            prev_hash = HashBytesAtOffset(input_bytes, 2, shift, min_match);
+            table[prev_hash] = (int)(ip - base_ip - 1);
+          } else {
+            input_bytes = BROTLI_UNALIGNED_LOAD64LE(ip - 5);
+            prev_hash = HashBytesAtOffset(input_bytes, 0, shift, min_match);
+            table[prev_hash] = (int)(ip - base_ip - 5);
+            prev_hash = HashBytesAtOffset(input_bytes, 1, shift, min_match);
+            table[prev_hash] = (int)(ip - base_ip - 4);
+            prev_hash = HashBytesAtOffset(input_bytes, 2, shift, min_match);
+            table[prev_hash] = (int)(ip - base_ip - 3);
+            input_bytes = BROTLI_UNALIGNED_LOAD64LE(ip - 2);
+            cur_hash = HashBytesAtOffset(input_bytes, 2, shift, min_match);
+            prev_hash = HashBytesAtOffset(input_bytes, 0, shift, min_match);
+            table[prev_hash] = (int)(ip - base_ip - 2);
+            prev_hash = HashBytesAtOffset(input_bytes, 1, shift, min_match);
+            table[prev_hash] = (int)(ip - base_ip - 1);
+          }
 
           candidate = base_ip + table[cur_hash];
           table[cur_hash] = (int)(ip - base_ip);
@@ -405,7 +437,7 @@
         }
       }
 
-      next_hash = Hash(++ip, shift);
+      next_hash = Hash(++ip, shift, min_match);
     }
   }
 
@@ -525,7 +557,8 @@
 static BROTLI_INLINE void BrotliCompressFragmentTwoPassImpl(
     MemoryManager* m, const uint8_t* input, size_t input_size,
     BROTLI_BOOL is_last, uint32_t* command_buf, uint8_t* literal_buf,
-    int* table, size_t table_bits, size_t* storage_ix, uint8_t* storage) {
+    int* table, size_t table_bits, size_t min_match,
+    size_t* storage_ix, uint8_t* storage) {
   /* Save the start of the first block for position and distance computations.
   */
   const uint8_t* base_ip = input;
@@ -537,8 +570,8 @@
     uint32_t* commands = command_buf;
     uint8_t* literals = literal_buf;
     size_t num_literals;
-    CreateCommands(input, block_size, input_size, base_ip, table, table_bits,
-                   &literals, &commands);
+    CreateCommands(input, block_size, input_size, base_ip, table,
+                   table_bits, min_match, &literals, &commands);
     num_literals = (size_t)(literals - literal_buf);
     if (ShouldCompress(input, block_size, num_literals)) {
       const size_t num_commands = (size_t)(commands - command_buf);
@@ -567,8 +600,9 @@
     MemoryManager* m, const uint8_t* input, size_t input_size,                 \
     BROTLI_BOOL is_last, uint32_t* command_buf, uint8_t* literal_buf,          \
     int* table, size_t* storage_ix, uint8_t* storage) {                        \
+  size_t min_match = (B <= 15) ? 4 : 6;                                        \
   BrotliCompressFragmentTwoPassImpl(m, input, input_size, is_last, command_buf,\
-      literal_buf, table, B, storage_ix, storage);                             \
+      literal_buf, table, B, min_match, storage_ix, storage);                  \
 }
 FOR_TABLE_BITS_(BAKE_METHOD_PARAM_)
 #undef BAKE_METHOD_PARAM_

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encode.c
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encode.c	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encode.c	2018-07-08 08:06:14 UTC (rev 48164)
@@ -117,7 +117,6 @@
 static BROTLI_BOOL EnsureInitialized(BrotliEncoderState* s);
 
 static size_t InputBlockSize(BrotliEncoderState* s) {
-  if (!EnsureInitialized(s)) return 0;
   return (size_t)1 << s->params.lgblock;
 }
 
@@ -817,7 +816,6 @@
                                   const uint8_t* input_buffer) {
   RingBuffer* ringbuffer_ = &s->ringbuffer_;
   MemoryManager* m = &s->memory_manager_;
-  if (!EnsureInitialized(s)) return;
   RingBufferWrite(m, input_buffer, input_size, ringbuffer_);
   if (BROTLI_IS_OOM(m)) return;
   s->input_pos_ += input_size;
@@ -882,7 +880,8 @@
   Command* last_command = &s->commands_[s->num_commands_ - 1];
   const uint8_t* data = s->ringbuffer_.buffer_;
   const uint32_t mask = s->ringbuffer_.mask_;
-  uint64_t max_backward_distance = (1u << s->params.lgwin) - BROTLI_WINDOW_GAP;
+  uint64_t max_backward_distance =
+      (((uint64_t)1) << s->params.lgwin) - BROTLI_WINDOW_GAP;
   uint64_t last_copy_len = last_command->copy_len_ & 0x1FFFFFF;
   uint64_t last_processed_pos = s->last_processed_pos_ - last_copy_len;
   uint64_t max_distance = last_processed_pos < max_backward_distance ?
@@ -932,7 +931,6 @@
   MemoryManager* m = &s->memory_manager_;
   ContextType literal_context_mode;
 
-  if (!EnsureInitialized(s)) return BROTLI_FALSE;
   data = s->ringbuffer_.buffer_;
   mask = s->ringbuffer_.mask_;
 

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encoder_dict.h
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encoder_dict.h	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encoder_dict.h	2018-07-08 08:06:14 UTC (rev 48164)
@@ -34,7 +34,6 @@
 
 BROTLI_INTERNAL void BrotliInitEncoderDictionary(BrotliEncoderDictionary* dict);
 
-
 #if defined(__cplusplus) || defined(c_plusplus)
 }  /* extern "C" */
 #endif

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/fast_log.h
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/fast_log.h	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/fast_log.h	2018-07-08 08:06:14 UTC (rev 48164)
@@ -19,7 +19,9 @@
 #endif
 
 static BROTLI_INLINE uint32_t Log2FloorNonZero(size_t n) {
-#if BROTLI_MODERN_COMPILER || __has_builtin(__builtin_clz)
+  /* TODO: generalize and move to platform.h */
+#if BROTLI_GNUC_HAS_BUILTIN(__builtin_clz, 3, 4, 0) || \
+    BROTLI_INTEL_VERSION_CHECK(16, 0, 0)
   return 31u ^ (uint32_t)__builtin_clz((uint32_t)n);
 #else
   uint32_t result = 0;

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash.h
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash.h	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash.h	2018-07-08 08:06:14 UTC (rev 48164)
@@ -36,8 +36,10 @@
  * * HasherCommon structure
  * * private structured hasher data, depending on hasher type
  * * private dynamic hasher data, depending on hasher type and parameters
- */
-typedef uint8_t* HasherHandle;
+ *
+ * Using "define" instead of "typedef", because on MSVC __restrict does not work
+ * on typedef pointer types. */
+#define HasherHandle uint8_t*
 
 typedef struct {
   BrotliHasherParams params;
@@ -151,14 +153,14 @@
     size_t max_length, size_t max_backward, size_t max_distance,
     HasherSearchResult* out) {
   size_t len;
-  size_t dist;
+  size_t word_idx;
   size_t offset;
   size_t matchlen;
   size_t backward;
   score_t score;
   len = item & 0x1F;
-  dist = item >> 5;
-  offset = dictionary->words->offsets_by_length[len] + len * dist;
+  word_idx = item >> 5;
+  offset = dictionary->words->offsets_by_length[len] + len * word_idx;
   if (len > max_length) {
     return BROTLI_FALSE;
   }
@@ -172,7 +174,7 @@
     size_t cut = len - matchlen;
     size_t transform_id = (cut << 2) +
         (size_t)((dictionary->cutoffTransforms >> (cut * 6)) & 0x3F);
-    backward = max_backward + dist + 1 +
+    backward = max_backward + 1 + word_idx +
         (transform_id << dictionary->words->size_bits_by_length[len]);
   }
   if (backward > max_distance) {
@@ -341,11 +343,57 @@
 #undef BUCKET_BITS
 #undef HASHER
 
+/* fast large window hashers */
+
+#define HASHER() HROLLING_FAST
+#define CHUNKLEN 32
+#define JUMP 4
+#define NUMBUCKETS 16777216
+#define MASK ((NUMBUCKETS * 64) - 1)
+#include "./hash_rolling_inc.h"  /* NOLINT(build/include) */
+#undef JUMP
+#undef HASHER
+
+
+#define HASHER() HROLLING
+#define JUMP 1
+#include "./hash_rolling_inc.h"  /* NOLINT(build/include) */
+#undef MASK
+#undef NUMBUCKETS
+#undef JUMP
+#undef CHUNKLEN
+#undef HASHER
+
+#define HASHER() H35
+#define HASHER_A H3
+#define HASHER_B HROLLING_FAST
+#include "./hash_composite_inc.h"  /* NOLINT(build/include) */
+#undef HASHER_A
+#undef HASHER_B
+#undef HASHER
+
+#define HASHER() H55
+#define HASHER_A H54
+#define HASHER_B HROLLING_FAST
+#include "./hash_composite_inc.h"  /* NOLINT(build/include) */
+#undef HASHER_A
+#undef HASHER_B
+#undef HASHER
+
+#define HASHER() H65
+#define HASHER_A H6
+#define HASHER_B HROLLING
+#include "./hash_composite_inc.h"  /* NOLINT(build/include) */
+#undef HASHER_A
+#undef HASHER_B
+#undef HASHER
+
 #undef FN
 #undef CAT
 #undef EXPAND_CAT
 
-#define FOR_GENERIC_HASHERS(H) H(2) H(3) H(4) H(5) H(6) H(40) H(41) H(42) H(54)
+#define FOR_GENERIC_HASHERS(H) H(2) H(3) H(4) H(5) H(6) H(40) H(41) H(42) H(54)\
+                               H(35) H(55) H(65)
 #define FOR_ALL_HASHERS(H) FOR_GENERIC_HASHERS(H) H(10)
 
 static BROTLI_INLINE void DestroyHasher(

Added: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_composite_inc.h
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_composite_inc.h	                        (rev 0)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_composite_inc.h	2018-07-08 08:06:14 UTC (rev 48164)
@@ -0,0 +1,133 @@
+/* NOLINT(build/header_guard) */
+/* Copyright 2018 Google Inc. All Rights Reserved.
+
+   Distributed under MIT license.
+   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* template parameters: FN, HASHER_A, HASHER_B */
+
+/* Composite hasher: This hasher allows to combine two other hashers, HASHER_A
+   and HASHER_B. */
+
+#define HashComposite HASHER()
+
+#define FN_A(X) EXPAND_CAT(X, HASHER_A)
+#define FN_B(X) EXPAND_CAT(X, HASHER_B)
+
+static BROTLI_INLINE size_t FN(HashTypeLength)(void) {
+  size_t a =  FN_A(HashTypeLength)();
+  size_t b =  FN_B(HashTypeLength)();
+  return a > b ? a : b;
+}
+
+static BROTLI_INLINE size_t FN(StoreLookahead)(void) {
+  size_t a =  FN_A(StoreLookahead)();
+  size_t b =  FN_B(StoreLookahead)();
+  return a > b ? a : b;
+}
+
+typedef struct HashComposite {
+  HasherHandle ha;
+  HasherHandle hb;
+  const BrotliEncoderParams* params;
+} HashComposite;
+
+static BROTLI_INLINE HashComposite* FN(Self)(HasherHandle handle) {
+  return (HashComposite*)&(GetHasherCommon(handle)[1]);
+}
+
+static void FN(Initialize)(
+    HasherHandle handle, const BrotliEncoderParams* params) {
+  HashComposite* self = FN(Self)(handle);
+  self->ha = 0;
+  self->hb = 0;
+  self->params = params;
+  /* TODO: Initialize of the hashers is defered to Prepare (and params
+     remembered here) because we don't get the one_shot and input_size params
+     here that are needed to know the memory size of them. Instead provide
+     those params to all hashers FN(Initialize) */
+}
+
+static void FN(Prepare)(HasherHandle handle, BROTLI_BOOL one_shot,
+    size_t input_size, const uint8_t* data) {
+  HashComposite* self = FN(Self)(handle);
+  if (!self->ha) {
+    HasherCommon* common_a;
+    HasherCommon* common_b;
+
+    self->ha = handle + sizeof(HasherCommon) + sizeof(HashComposite);
+    common_a = (HasherCommon*)self->ha;
+    common_a->params = self->params->hasher;
+    common_a->is_prepared_ = BROTLI_FALSE;
+    common_a->dict_num_lookups = 0;
+    common_a->dict_num_matches = 0;
+    FN_A(Initialize)(self->ha, self->params);
+
+    self->hb = self->ha + sizeof(HasherCommon) + FN_A(HashMemAllocInBytes)(
+        self->params, one_shot, input_size);
+    common_b = (HasherCommon*)self->hb;
+    common_b->params = self->params->hasher;
+    common_b->is_prepared_ = BROTLI_FALSE;
+    common_b->dict_num_lookups = 0;
+    common_b->dict_num_matches = 0;
+    FN_B(Initialize)(self->hb, self->params);
+  }
+  FN_A(Prepare)(self->ha, one_shot, input_size, data);
+  FN_B(Prepare)(self->hb, one_shot, input_size, data);
+}
+
+static BROTLI_INLINE size_t FN(HashMemAllocInBytes)(
+    const BrotliEncoderParams* params, BROTLI_BOOL one_shot,
+    size_t input_size) {
+  return sizeof(HashComposite) + 2 * sizeof(HasherCommon) +
+      FN_A(HashMemAllocInBytes)(params, one_shot, input_size) +
+      FN_B(HashMemAllocInBytes)(params, one_shot, input_size);
+}
+
+static BROTLI_INLINE void FN(Store)(HasherHandle BROTLI_RESTRICT handle,
+    const uint8_t* BROTLI_RESTRICT data, const size_t mask, const size_t ix) {
+  HashComposite* self = FN(Self)(handle);
+  FN_A(Store)(self->ha, data, mask, ix);
+  FN_B(Store)(self->hb, data, mask, ix);
+}
+
+static BROTLI_INLINE void FN(StoreRange)(HasherHandle handle,
+    const uint8_t* data, const size_t mask, const size_t ix_start,
+    const size_t ix_end) {
+  HashComposite* self = FN(Self)(handle);
+  FN_A(StoreRange)(self->ha, data, mask, ix_start, ix_end);
+  FN_B(StoreRange)(self->hb, data, mask, ix_start, ix_end);
+}
+
+static BROTLI_INLINE void FN(StitchToPreviousBlock)(HasherHandle handle,
+    size_t num_bytes, size_t position, const uint8_t* ringbuffer,
+    size_t ring_buffer_mask) {
+  HashComposite* self = FN(Self)(handle);
+  FN_A(StitchToPreviousBlock)(self->ha, num_bytes, position, ringbuffer,
+      ring_buffer_mask);
+  FN_B(StitchToPreviousBlock)(self->hb, num_bytes, position, ringbuffer,
+      ring_buffer_mask);
+}
+
+static BROTLI_INLINE void FN(PrepareDistanceCache)(
+    HasherHandle handle, int* BROTLI_RESTRICT distance_cache) {
+  HashComposite* self = FN(Self)(handle);
+  FN_A(PrepareDistanceCache)(self->ha, distance_cache);
+  FN_B(PrepareDistanceCache)(self->hb, distance_cache);
+}
+
+static BROTLI_INLINE void FN(FindLongestMatch)(HasherHandle handle,
+    const BrotliEncoderDictionary* dictionary,
+    const uint8_t* BROTLI_RESTRICT data, const size_t ring_buffer_mask,
+    const int* BROTLI_RESTRICT distance_cache, const size_t cur_ix,
+    const size_t max_length, const size_t max_backward, const size_t gap,
+    const size_t max_distance, HasherSearchResult* BROTLI_RESTRICT out) {
+  HashComposite* self = FN(Self)(handle);
+  FN_A(FindLongestMatch)(self->ha, dictionary, data, ring_buffer_mask,
+      distance_cache, cur_ix, max_length, max_backward, gap, max_distance, out);
+  FN_B(FindLongestMatch)(self->hb, dictionary, data, ring_buffer_mask,
+      distance_cache, cur_ix, max_length, max_backward, gap, max_distance, out);
+}
+
+#undef HashComposite


Property changes on: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_composite_inc.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_rolling_inc.h
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_rolling_inc.h	                        (rev 0)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_rolling_inc.h	2018-07-08 08:06:14 UTC (rev 48164)
@@ -0,0 +1,215 @@
+/* NOLINT(build/header_guard) */
+/* Copyright 2018 Google Inc. All Rights Reserved.
+
+   Distributed under MIT license.
+   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* template parameters: FN, JUMP, NUMBUCKETS, MASK, CHUNKLEN */
+/* NUMBUCKETS / (MASK + 1) = probability of storing and using hash code. */
+/* JUMP = skip bytes for speedup */
+
+/* Rolling hash for long distance long string matches. Stores one position
+   per bucket, bucket key is computed over a long region. */
+
+#define HashRolling HASHER()
+
+static const uint32_t FN(kRollingHashMul32) = 69069;
+static const uint32_t FN(kInvalidPos) = 0xffffffff;
+
+/* This hasher uses a longer forward length, but returning a higher value here
+   will hurt compression by the main hasher when combined with a composite
+   hasher. The hasher tests for forward itself instead. */
+static BROTLI_INLINE size_t FN(HashTypeLength)(void) { return 4; }
+static BROTLI_INLINE size_t FN(StoreLookahead)(void) { return 4; }
+
+/* Computes a code from a single byte. A lookup table of 256 values could be
+   used, but simply adding 1 works about as good. */
+static uint32_t FN(HashByte)(uint8_t byte) {
+  return (uint32_t)byte + 1u;
+}
+
+static uint32_t FN(HashRollingFunctionInitial)(uint32_t state, uint8_t add,
+                                               uint32_t factor) {
+  return (uint32_t)(factor * state + FN(HashByte)(add));
+}
+
+static uint32_t FN(HashRollingFunction)(uint32_t state, uint8_t add,
+                                        uint8_t rem, uint32_t factor,
+                                        uint32_t factor_remove) {
+  return (uint32_t)(factor * state +
+      FN(HashByte)(add) - factor_remove * FN(HashByte)(rem));
+}
+
+typedef struct HashRolling {
+  uint32_t state;
+  uint32_t* table;
+  size_t next_ix;
+
+  uint32_t chunk_len;
+  uint32_t factor;
+  uint32_t factor_remove;
+} HashRolling;
+
+static BROTLI_INLINE HashRolling* FN(Self)(HasherHandle handle) {
+  return (HashRolling*)&(GetHasherCommon(handle)[1]);
+}
+
+static void FN(Initialize)(
+    HasherHandle handle, const BrotliEncoderParams* params) {
+  HashRolling* self = FN(Self)(handle);
+  size_t i;
+  self->state = 0;
+  self->next_ix = 0;
+
+  self->factor = FN(kRollingHashMul32);
+
+  /* Compute the factor of the oldest byte to remove: factor**steps modulo
+     0xffffffff (the multiplications rely on 32-bit overflow) */
+  self->factor_remove = 1;
+  for (i = 0; i < CHUNKLEN; i += JUMP) {
+    self->factor_remove *= self->factor;
+  }
+
+  self->table = (uint32_t*)((HasherHandle)self + sizeof(HashRolling));
+  for (i = 0; i < NUMBUCKETS; i++) {
+    self->table[i] = FN(kInvalidPos);
+  }
+
+  BROTLI_UNUSED(params);
+}
+
+static void FN(Prepare)(HasherHandle handle, BROTLI_BOOL one_shot,
+    size_t input_size, const uint8_t* data) {
+  HashRolling* self = FN(Self)(handle);
+  size_t i;
+  /* Too small size, cannot use this hasher. */
+  if (input_size < CHUNKLEN) return;
+  self->state = 0;
+  for (i = 0; i < CHUNKLEN; i += JUMP) {
+    self->state = FN(HashRollingFunctionInitial)(
+        self->state, data[i], self->factor);
+  }
+  BROTLI_UNUSED(one_shot);
+}
+
+static BROTLI_INLINE size_t FN(HashMemAllocInBytes)(
+    const BrotliEncoderParams* params, BROTLI_BOOL one_shot,
+    size_t input_size) {
+  return sizeof(HashRolling) + NUMBUCKETS * sizeof(uint32_t);
+  BROTLI_UNUSED(params);
+  BROTLI_UNUSED(one_shot);
+  BROTLI_UNUSED(input_size);
+}
+
+static BROTLI_INLINE void FN(Store)(HasherHandle BROTLI_RESTRICT handle,
+    const uint8_t* BROTLI_RESTRICT data, const size_t mask, const size_t ix) {
+  BROTLI_UNUSED(handle);
+  BROTLI_UNUSED(data);
+  BROTLI_UNUSED(mask);
+  BROTLI_UNUSED(ix);
+}
+
+static BROTLI_INLINE void FN(StoreRange)(HasherHandle handle,
+    const uint8_t* data, const size_t mask, const size_t ix_start,
+    const size_t ix_end) {
+  BROTLI_UNUSED(handle);
+  BROTLI_UNUSED(data);
+  BROTLI_UNUSED(mask);
+  BROTLI_UNUSED(ix_start);
+  BROTLI_UNUSED(ix_end);
+}
+
+static BROTLI_INLINE void FN(StitchToPreviousBlock)(HasherHandle handle,
+    size_t num_bytes, size_t position, const uint8_t* ringbuffer,
+    size_t ring_buffer_mask) {
+  /* In this case we must re-initialize the hasher from scratch from the
+     current position. */
+  HashRolling* self = FN(Self)(handle);
+  size_t position_masked;
+  size_t available = num_bytes;
+  if ((position & (JUMP - 1)) != 0) {
+    size_t diff = JUMP - (position & (JUMP - 1));
+    available = (diff > available) ? 0 : (available - diff);
+    position += diff;
+  }
+  position_masked = position & ring_buffer_mask;
+  /* wrapping around ringbuffer not handled. */
+  if (available > ring_buffer_mask - position_masked) {
+    available = ring_buffer_mask - position_masked;
+  }
+
+  FN(Prepare)(handle, BROTLI_FALSE, available,
+      ringbuffer + (position & ring_buffer_mask));
+  self->next_ix = position;
+  BROTLI_UNUSED(num_bytes);
+}
+
+static BROTLI_INLINE void FN(PrepareDistanceCache)(
+    HasherHandle handle, int* BROTLI_RESTRICT distance_cache) {
+  BROTLI_UNUSED(handle);
+  BROTLI_UNUSED(distance_cache);
+}
+
+static BROTLI_INLINE void FN(FindLongestMatch)(HasherHandle handle,
+    const BrotliEncoderDictionary* dictionary,
+    const uint8_t* BROTLI_RESTRICT data, const size_t ring_buffer_mask,
+    const int* BROTLI_RESTRICT distance_cache, const size_t cur_ix,
+    const size_t max_length, const size_t max_backward, const size_t gap,
+    const size_t max_distance, HasherSearchResult* BROTLI_RESTRICT out) {
+  HashRolling* self = FN(Self)(handle);
+  const size_t cur_ix_masked = cur_ix & ring_buffer_mask;
+  size_t pos = self->next_ix;
+
+  if ((cur_ix & (JUMP - 1)) != 0) return;
+
+  /* Not enough lookahead */
+  if (max_length < CHUNKLEN) return;
+
+  for (pos = self->next_ix; pos <= cur_ix; pos += JUMP) {
+    uint32_t code = self->state & MASK;
+
+    uint8_t rem = data[pos & ring_buffer_mask];
+    uint8_t add = data[(pos + CHUNKLEN) & ring_buffer_mask];
+    size_t found_ix = FN(kInvalidPos);
+
+    self->state = FN(HashRollingFunction)(
+        self->state, add, rem, self->factor, self->factor_remove);
+
+    if (code < NUMBUCKETS) {
+      found_ix = self->table[code];
+      self->table[code] = (uint32_t)pos;
+      if (pos == cur_ix && found_ix != FN(kInvalidPos)) {
+        /* The cast to 32-bit makes backward distances up to 4GB work even
+           if cur_ix is above 4GB, despite using 32-bit values in the table. */
+        size_t backward = (uint32_t)(cur_ix - found_ix);
+        if (backward <= max_backward) {
+          const size_t found_ix_masked = found_ix & ring_buffer_mask;
+          const size_t len = FindMatchLengthWithLimit(&data[found_ix_masked],
+                                                      &data[cur_ix_masked],
+                                                      max_length);
+          if (len >= 4 && len > out->len) {
+            score_t score = BackwardReferenceScore(len, backward);
+            if (score > out->score) {
+              out->len = len;
+              out->distance = backward;
+              out->score = score;
+              out->len_code_delta = 0;
+            }
+          }
+        }
+      }
+    }
+  }
+
+  self->next_ix = cur_ix + JUMP;
+
+  /* NOTE: this hasher does not search in the dictionary. It is used as
+     backup-hasher, the main hasher already searches in it. */
+  BROTLI_UNUSED(dictionary);
+  BROTLI_UNUSED(distance_cache);
+  BROTLI_UNUSED(gap);
+  BROTLI_UNUSED(max_distance);
+}
+
+#undef HashRolling


Property changes on: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_rolling_inc.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/quality.h
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/quality.h	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/quality.h	2018-07-08 08:06:14 UTC (rev 48164)
@@ -142,6 +142,24 @@
     hparams->num_last_distances_to_check =
         params->quality < 7 ? 4 : params->quality < 9 ? 10 : 16;
   }
+
+  if (params->lgwin > 24) {
+    /* Different hashers for large window brotli: not for qualities <= 2,
+       these are too fast for large window. Not for qualities >= 10: their
+       hasher already works well with large window. So the changes are:
+       H3 --> H35: for quality 3.
+       H54 --> H55: for quality 4 with size hint > 1MB
+       H6 --> H65: for qualities 5, 6, 7, 8, 9. */
+    if (hparams->type == 3) {
+      hparams->type = 35;
+    }
+    if (hparams->type == 54) {
+      hparams->type = 55;
+    }
+    if (hparams->type == 6) {
+      hparams->type = 65;
+    }
+  }
 }
 
 #endif  /* BROTLI_ENC_QUALITY_H_ */

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/static_dict.c
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/static_dict.c	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/static_dict.c	2018-07-08 08:06:14 UTC (rev 48164)
@@ -16,11 +16,6 @@
 extern "C" {
 #endif
 
-/* TODO: use BrotliTransforms.cutOffTransforms instead. */
-static const uint8_t kOmitLastNTransforms[10] = {
-  0, 12, 27, 23, 42, 63, 56, 48, 59, 64,
-};
-
 static BROTLI_INLINE uint32_t Hash(const uint8_t* data) {
   uint32_t h = BROTLI_UNALIGNED_LOAD32LE(data) * kDictHashMul32;
   /* The higher bits contain more mixture from the multiplication,
@@ -121,7 +116,10 @@
         if (l > 9) minlen = BROTLI_MAX(size_t, minlen, l - 9);
         maxlen = BROTLI_MIN(size_t, matchlen, l - 2);
         for (len = minlen; len <= maxlen; ++len) {
-          AddMatch(id + kOmitLastNTransforms[l - len] * n, len, l, matches);
+          size_t cut = l - len;
+          size_t transform_id = (cut << 2) +
+              (size_t)((dictionary->cutoffTransforms >> (cut * 6)) & 0x3F);
+          AddMatch(id + transform_id * n, len, l, matches);
           has_found_match = BROTLI_TRUE;
         }
         if (matchlen < l || l + 6 >= max_length) {

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/write_bits.h
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/write_bits.h	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/write_bits.h	2018-07-08 08:06:14 UTC (rev 48164)
@@ -37,7 +37,7 @@
                                           uint64_t bits,
                                           size_t* BROTLI_RESTRICT pos,
                                           uint8_t* BROTLI_RESTRICT array) {
-#ifdef BROTLI_LITTLE_ENDIAN
+#if defined(BROTLI_LITTLE_ENDIAN)
   /* This branch of the code can write up to 56 bits at a time,
      7 bits are lost by being perhaps already in *p and at least
      1 bit is needed to initialize the bit-stream ahead (i.e. if 7

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/port.h
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/port.h	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/port.h	2018-07-08 08:06:14 UTC (rev 48164)
@@ -4,50 +4,247 @@
    See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
 */
 
-/* Macros for compiler / platform specific features and build options.
+/* Macros for compiler / platform specific API declarations. */
 
-   Build options are:
-    * BROTLI_BUILD_MODERN_COMPILER forces to use modern compilers built-ins,
-      features and attributes
- */
-
 #ifndef BROTLI_COMMON_PORT_H_
 #define BROTLI_COMMON_PORT_H_
 
-/* Compatibility with non-clang compilers. */
-#ifndef __has_builtin
-#define __has_builtin(x) 0
+/* The following macros were borrowed from https://github.com/nemequ/hedley
+ * with permission of original author - Evan Nemerson <evan at nemerson.com> */
+
+/* >>> >>> >>> hedley macros */
+
+#define BROTLI_MAKE_VERSION(major, minor, revision) \
+  (((major) * 1000000) + ((minor) * 1000) + (revision))
+
+#if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__)
+#define BROTLI_GNUC_VERSION \
+  BROTLI_MAKE_VERSION(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
+#elif defined(__GNUC__)
+#define BROTLI_GNUC_VERSION BROTLI_MAKE_VERSION(__GNUC__, __GNUC_MINOR__, 0)
 #endif
 
-#ifndef __has_attribute
-#define __has_attribute(x) 0
+#if defined(BROTLI_GNUC_VERSION)
+#define BROTLI_GNUC_VERSION_CHECK(major, minor, patch) \
+  (BROTLI_GNUC_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
+#else
+#define BROTLI_GNUC_VERSION_CHECK(major, minor, patch) (0)
 #endif
 
-#ifndef __has_feature
-#define __has_feature(x) 0
+#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000)
+#define BROTLI_MSVC_VERSION                                \
+  BROTLI_MAKE_VERSION((_MSC_FULL_VER / 10000000),          \
+                      (_MSC_FULL_VER % 10000000) / 100000, \
+                      (_MSC_FULL_VER % 100000) / 100)
+#elif defined(_MSC_FULL_VER)
+#define BROTLI_MSVC_VERSION                              \
+  BROTLI_MAKE_VERSION((_MSC_FULL_VER / 1000000),         \
+                      (_MSC_FULL_VER % 1000000) / 10000, \
+                      (_MSC_FULL_VER % 10000) / 10)
+#elif defined(_MSC_VER)
+#define BROTLI_MSVC_VERSION \
+  BROTLI_MAKE_VERSION(_MSC_VER / 100, _MSC_VER % 100, 0)
 #endif
 
-#if defined(__GNUC__) && defined(__GNUC_MINOR__)
-#define BROTLI_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
+#if !defined(_MSC_VER)
+#define BROTLI_MSVC_VERSION_CHECK(major, minor, patch) (0)
+#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
+#define BROTLI_MSVC_VERSION_CHECK(major, minor, patch) \
+  (_MSC_FULL_VER >= ((major * 10000000) + (minor * 100000) + (patch)))
+#elif defined(_MSC_VER) && (_MSC_VER >= 1200)
+#define BROTLI_MSVC_VERSION_CHECK(major, minor, patch) \
+  (_MSC_FULL_VER >= ((major * 1000000) + (minor * 10000) + (patch)))
 #else
-#define BROTLI_GCC_VERSION 0
+#define BROTLI_MSVC_VERSION_CHECK(major, minor, patch) \
+  (_MSC_VER >= ((major * 100) + (minor)))
 #endif
 
-#if defined(__ICC)
-#define BROTLI_ICC_VERSION __ICC
+#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE)
+#define BROTLI_INTEL_VERSION                   \
+  BROTLI_MAKE_VERSION(__INTEL_COMPILER / 100,  \
+                      __INTEL_COMPILER % 100,  \
+                      __INTEL_COMPILER_UPDATE)
+#elif defined(__INTEL_COMPILER)
+#define BROTLI_INTEL_VERSION \
+  BROTLI_MAKE_VERSION(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0)
+#endif
+
+#if defined(BROTLI_INTEL_VERSION)
+#define BROTLI_INTEL_VERSION_CHECK(major, minor, patch) \
+  (BROTLI_INTEL_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
 #else
-#define BROTLI_ICC_VERSION 0
+#define BROTLI_INTEL_VERSION_CHECK(major, minor, patch) (0)
 #endif
 
-#if defined(BROTLI_BUILD_MODERN_COMPILER)
-#define BROTLI_MODERN_COMPILER 1
-#elif BROTLI_GCC_VERSION >= 304 || BROTLI_ICC_VERSION >= 1600
-#define BROTLI_MODERN_COMPILER 1
+#if defined(__PGI) && \
+    defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__)
+#define BROTLI_PGI_VERSION \
+  BROTLI_MAKE_VERSION(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__)
+#endif
+
+#if defined(BROTLI_PGI_VERSION)
+#define BROTLI_PGI_VERSION_CHECK(major, minor, patch) \
+  (BROTLI_PGI_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
 #else
-#define BROTLI_MODERN_COMPILER 0
+#define BROTLI_PGI_VERSION_CHECK(major, minor, patch) (0)
 #endif
 
-#if defined(BROTLI_SHARED_COMPILATION) && defined(_WIN32)
+#if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000)
+#define BROTLI_SUNPRO_VERSION                                       \
+  BROTLI_MAKE_VERSION(                                              \
+    (((__SUNPRO_C >> 16) & 0xf) * 10) + ((__SUNPRO_C >> 12) & 0xf), \
+    (((__SUNPRO_C >> 8) & 0xf) * 10) + ((__SUNPRO_C >> 4) & 0xf),   \
+    (__SUNPRO_C & 0xf) * 10)
+#elif defined(__SUNPRO_C)
+#define BROTLI_SUNPRO_VERSION                  \
+  BROTLI_MAKE_VERSION((__SUNPRO_C >> 8) & 0xf, \
+                      (__SUNPRO_C >> 4) & 0xf, \
+                      (__SUNPRO_C) & 0xf)
+#elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000)
+#define BROTLI_SUNPRO_VERSION                                         \
+  BROTLI_MAKE_VERSION(                                                \
+    (((__SUNPRO_CC >> 16) & 0xf) * 10) + ((__SUNPRO_CC >> 12) & 0xf), \
+    (((__SUNPRO_CC >> 8) & 0xf) * 10) + ((__SUNPRO_CC >> 4) & 0xf),   \
+    (__SUNPRO_CC & 0xf) * 10)
+#elif defined(__SUNPRO_CC)
+#define BROTLI_SUNPRO_VERSION                   \
+  BROTLI_MAKE_VERSION((__SUNPRO_CC >> 8) & 0xf, \
+                      (__SUNPRO_CC >> 4) & 0xf, \
+                      (__SUNPRO_CC) & 0xf)
+#endif
+
+#if defined(BROTLI_SUNPRO_VERSION)
+#define BROTLI_SUNPRO_VERSION_CHECK(major, minor, patch) \
+  (BROTLI_SUNPRO_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
+#else
+#define BROTLI_SUNPRO_VERSION_CHECK(major, minor, patch) (0)
+#endif
+
+#if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION)
+#define BROTLI_ARM_VERSION                                       \
+  BROTLI_MAKE_VERSION((__ARMCOMPILER_VERSION / 1000000),         \
+                      (__ARMCOMPILER_VERSION % 1000000) / 10000, \
+                      (__ARMCOMPILER_VERSION % 10000) / 100)
+#elif defined(__CC_ARM) && defined(__ARMCC_VERSION)
+#define BROTLI_ARM_VERSION                                 \
+  BROTLI_MAKE_VERSION((__ARMCC_VERSION / 1000000),         \
+                      (__ARMCC_VERSION % 1000000) / 10000, \
+                      (__ARMCC_VERSION % 10000) / 100)
+#endif
+
+#if defined(BROTLI_ARM_VERSION)
+#define BROTLI_ARM_VERSION_CHECK(major, minor, patch) \
+  (BROTLI_ARM_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
+#else
+#define BROTLI_ARM_VERSION_CHECK(major, minor, patch) (0)
+#endif
+
+#if defined(__ibmxl__)
+#define BROTLI_IBM_VERSION                    \
+  BROTLI_MAKE_VERSION(__ibmxl_version__,      \
+                      __ibmxl_release__,      \
+                      __ibmxl_modification__)
+#elif defined(__xlC__) && defined(__xlC_ver__)
+#define BROTLI_IBM_VERSION \
+  BROTLI_MAKE_VERSION(__xlC__ >> 8, __xlC__ & 0xff, (__xlC_ver__ >> 8) & 0xff)
+#elif defined(__xlC__)
+#define BROTLI_IBM_VERSION BROTLI_MAKE_VERSION(__xlC__ >> 8, __xlC__ & 0xff, 0)
+#endif
+
+#if defined(BROTLI_IBM_VERSION)
+#define BROTLI_IBM_VERSION_CHECK(major, minor, patch) \
+  (BROTLI_IBM_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
+#else
+#define BROTLI_IBM_VERSION_CHECK(major, minor, patch) (0)
+#endif
+
+#if defined(__TI_COMPILER_VERSION__)
+#define BROTLI_TI_VERSION                                         \
+  BROTLI_MAKE_VERSION((__TI_COMPILER_VERSION__ / 1000000),        \
+                      (__TI_COMPILER_VERSION__ % 1000000) / 1000, \
+                      (__TI_COMPILER_VERSION__ % 1000))
+#endif
+
+#if defined(BROTLI_TI_VERSION)
+#define BROTLI_TI_VERSION_CHECK(major, minor, patch) \
+  (BROTLI_TI_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
+#else
+#define BROTLI_TI_VERSION_CHECK(major, minor, patch) (0)
+#endif
+
+#if defined(__IAR_SYSTEMS_ICC__)
+#if __VER__ > 1000
+#define BROTLI_IAR_VERSION                     \
+  BROTLI_MAKE_VERSION((__VER__ / 1000000),     \
+                      (__VER__ / 1000) % 1000, \
+                      (__VER__ % 1000))
+#else
+#define BROTLI_IAR_VERSION BROTLI_MAKE_VERSION(VER / 100, __VER__ % 100, 0)
+#endif
+#endif
+
+#if defined(BROTLI_IAR_VERSION)
+#define BROTLI_IAR_VERSION_CHECK(major, minor, patch) \
+  (BROTLI_IAR_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
+#else
+#define BROTLI_IAR_VERSION_CHECK(major, minor, patch) (0)
+#endif
+
+#if defined(__TINYC__)
+#define BROTLI_TINYC_VERSION \
+  BROTLI_MAKE_VERSION(__TINYC__ / 1000, (__TINYC__ / 100) % 10, __TINYC__ % 100)
+#endif
+
+#if defined(BROTLI_TINYC_VERSION)
+#define BROTLI_TINYC_VERSION_CHECK(major, minor, patch) \
+  (BROTLI_TINYC_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
+#else
+#define BROTLI_TINYC_VERSION_CHECK(major, minor, patch) (0)
+#endif
+
+#if defined(__has_attribute)
+#define BROTLI_GNUC_HAS_ATTRIBUTE(attribute, major, minor, patch) \
+  __has_attribute(attribute)
+#else
+#define BROTLI_GNUC_HAS_ATTRIBUTE(attribute, major, minor, patch) \
+  BROTLI_GNUC_VERSION_CHECK(major, minor, patch)
+#endif
+
+#if defined(__has_builtin)
+#define BROTLI_GNUC_HAS_BUILTIN(builtin, major, minor, patch) \
+  __has_builtin(builtin)
+#else
+#define BROTLI_GNUC_HAS_BUILTIN(builtin, major, minor, patch) \
+  BROTLI_GNUC_VERSION_CHECK(major, minor, patch)
+#endif
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+#define BROTLI_PUBLIC
+#elif BROTLI_GNUC_VERSION_CHECK(3, 3, 0) ||                         \
+    BROTLI_TI_VERSION_CHECK(8, 0, 0) ||                             \
+    BROTLI_INTEL_VERSION_CHECK(16, 0, 0) ||                         \
+    BROTLI_ARM_VERSION_CHECK(4, 1, 0) ||                            \
+    BROTLI_IBM_VERSION_CHECK(13, 1, 0) ||                           \
+    BROTLI_SUNPRO_VERSION_CHECK(5, 11, 0) ||                        \
+    (BROTLI_TI_VERSION_CHECK(7, 3, 0) &&                            \
+     defined(__TI_GNU_ATTRIBUTE_SUPPORT__) && defined(__TI_EABI__))
+#define BROTLI_PUBLIC __attribute__ ((visibility ("default")))
+#else
+#define BROTLI_PUBLIC
+#endif
+
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \
+    !defined(__STDC_NO_VLA__) && !defined(__cplusplus) &&         \
+    !defined(__PGI) && !defined(__PGIC__) && !defined(__TINYC__)
+#define BROTLI_ARRAY_PARAM(name) (name)
+#else
+#define BROTLI_ARRAY_PARAM(name)
+#endif
+
+/* <<< <<< <<< end of hedley macros. */
+
+#if defined(BROTLI_SHARED_COMPILATION)
+#if defined(_WIN32)
 #if defined(BROTLICOMMON_SHARED_COMPILATION)
 #define BROTLI_COMMON_API __declspec(dllexport)
 #else
@@ -63,16 +260,15 @@
 #else
 #define BROTLI_ENC_API __declspec(dllimport)
 #endif  /* BROTLIENC_SHARED_COMPILATION */
-#else  /* BROTLI_SHARED_COMPILATION && _WIN32 */
+#else  /* _WIN32 */
+#define BROTLI_COMMON_API BROTLI_PUBLIC
+#define BROTLI_DEC_API BROTLI_PUBLIC
+#define BROTLI_ENC_API BROTLI_PUBLIC
+#endif  /* _WIN32 */
+#else  /* BROTLI_SHARED_COMPILATION */
 #define BROTLI_COMMON_API
 #define BROTLI_DEC_API
 #define BROTLI_ENC_API
 #endif
 
-#if BROTLI_MODERN_COMPILER || __has_attribute(deprecated)
-#define BROTLI_DEPRECATED __attribute__((deprecated))
-#else
-#define BROTLI_DEPRECATED
-#endif
-
 #endif  /* BROTLI_COMMON_PORT_H_ */

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/types.h
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/types.h	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/types.h	2018-07-08 08:06:14 UTC (rev 48164)
@@ -80,11 +80,4 @@
  */
 typedef void (*brotli_free_func)(void* opaque, void* address);
 
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \
-    !defined(__cplusplus) && !defined(__PGI)
-#define BROTLI_ARRAY_PARAM(L) L
-#else
-#define BROTLI_ARRAY_PARAM(L)
-#endif
-
 #endif  /* BROTLI_COMMON_TYPES_H_ */

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/include/woff2/version.h
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/include/woff2/version.h	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/include/woff2/version.h	2018-07-08 08:06:14 UTC (rev 48164)
@@ -2,7 +2,7 @@
 #define WOFF2_WOFF2_VERSION_H_
 
 namespace woff2 {
-constexpr const int version = 0x010001;
+constexpr const int version = 0x010002;
 }
 
 #endif

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/src/font.cc
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/src/font.cc	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/src/font.cc	2018-07-08 08:06:14 UTC (rev 48164)
@@ -123,6 +123,9 @@
       (*all_tables)[table.offset] = font->FindTable(table.tag);
     } else {
       table.reuse_of = (*all_tables)[table.offset];
+      if (table.tag != table.reuse_of->tag) {
+        return FONT_COMPRESSION_FAILURE();
+      }
     }
 
   }

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/src/normalize.cc
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/src/normalize.cc	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/src/normalize.cc	2018-07-08 08:06:14 UTC (rev 48164)
@@ -96,7 +96,10 @@
   int sz = Round4(table->length);
   table->buffer.resize(sz);
   uint8_t* buf = &table->buffer[0];
-  memcpy(buf, table->data, sz);
+  memcpy(buf, table->data, table->length);
+  if (PREDICT_FALSE(sz > table->length)) {
+    memset(buf + table->length, 0, sz - table->length);
+  }
   table->data = buf;
   return true;
 }

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.cpp
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.cpp	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.cpp	2018-07-08 08:06:14 UTC (rev 48164)
@@ -280,7 +280,7 @@
  *  a rotating dash. */
 void DVIToSVGActions::progress (const char *id) {
 	if (PROGRESSBAR_DELAY < 1000) {
-		static double time=0;
+		static double time=System::time();
 		// slow down updating the progress indicator to prevent flickering
 		if (System::time() - time > 0.1) {
 			progress(0, 0, id);

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/FileSystem.cpp
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/FileSystem.cpp	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/FileSystem.cpp	2018-07-08 08:06:14 UTC (rev 48164)
@@ -98,8 +98,8 @@
  *  @param[in] remove_src remove file 'src' if true
  *  @return true on success */
 bool FileSystem::copy (const string &src, const string &dest, bool remove_src) {
-	ifstream ifs(src.c_str(), ios::in|ios::binary);
-	ofstream ofs(dest.c_str(), ios::out|ios::binary);
+	ifstream ifs(src, ios::in|ios::binary);
+	ofstream ofs(dest, ios::out|ios::binary);
 	if (ifs && ofs) {
 		ofs << ifs.rdbuf();
 		if (!ifs.fail() && !ofs.fail() && remove_src) {

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/FontCache.cpp
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/FontCache.cpp	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/FontCache.cpp	2018-07-08 08:06:14 UTC (rev 48164)
@@ -81,7 +81,7 @@
 		string dirstr = dir.empty() ? FileSystem::getcwd() : dir;
 		ostringstream oss;
 		oss << dirstr << '/' << fontname << ".fgd";
-		ofstream ofs(oss.str().c_str(), ios::binary);
+		ofstream ofs(oss.str(), ios::binary);
 		return write(fontname, ofs);
 	}
 	return false;
@@ -177,7 +177,7 @@
 	string dirstr = dir.empty() ? FileSystem::getcwd() : dir;
 	ostringstream oss;
 	oss << dirstr << '/' << fontname << ".fgd";
-	ifstream ifs(oss.str().c_str(), ios::binary);
+	ifstream ifs(oss.str(), ios::binary);
 	return read(fontname, ifs);
 }
 
@@ -265,7 +265,7 @@
 			if (fname[0] == 'f' && fname.length() > 5 && fname.substr(fname.length()-4) == ".fgd") {
 				FontInfo info;
 				string path = dirname+"/"+(fname.substr(1));
-				ifstream ifs(path.c_str(), ios::binary);
+				ifstream ifs(path, ios::binary);
 				if (fontinfo(ifs, info))
 					infos.emplace_back(move(info));
 				else

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMap.cpp
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMap.cpp	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMap.cpp	2018-07-08 08:06:14 UTC (rev 48164)
@@ -47,7 +47,7 @@
  *  @param[in] mode selects how to integrate the map file entries into the global map tree
  *  @return true if file could be opened */
 bool FontMap::read (const string &fname, FontMap::Mode mode) {
-	ifstream ifs(fname.c_str());
+	ifstream ifs(fname);
 	if (!ifs)
 		return false;
 

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/GFGlyphTracer.cpp
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/GFGlyphTracer.cpp	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/GFGlyphTracer.cpp	2018-07-08 08:06:14 UTC (rev 48164)
@@ -34,7 +34,7 @@
 {
 	if (_callback)
 		_callback->setFont(fname);
-	_ifs.open(fname.c_str(), ios::binary);
+	_ifs.open(fname, ios::binary);
 }
 
 
@@ -44,7 +44,7 @@
 	if (_ifs.is_open())
 		_ifs.close();
 	unitsPerPoint(upp);
-	_ifs.open(fname.c_str(), ios::binary);
+	_ifs.open(fname, ios::binary);
 }
 
 

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/ImageToSVG.cpp
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/ImageToSVG.cpp	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/ImageToSVG.cpp	2018-07-08 08:06:14 UTC (rev 48164)
@@ -93,7 +93,7 @@
 
 
 void ImageToSVG::progress (const char *id) {
-	static double time=0;
+	static double time=System::time();
 	static bool draw=false; // show progress indicator?
 	static size_t count=0;
 	count++;

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/MetafontWrapper.cpp
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/MetafontWrapper.cpp	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/MetafontWrapper.cpp	2018-07-08 08:06:14 UTC (rev 48164)
@@ -106,8 +106,8 @@
  *  @param[in] mag magnification factor
  *  @return true on success */
 bool MetafontWrapper::make (const string &mode, double mag) {
-	ifstream tfm((_dir+_fontname+".tfm").c_str());
-	ifstream gf((_dir+_fontname+".gf").c_str());
+	ifstream tfm(_dir+_fontname+".tfm");
+	ifstream gf(_dir+_fontname+".gf");
 	if (gf && tfm) // @@ distinguish between gf and tfm
 		return true;
 	return call(mode, mag);
@@ -115,7 +115,7 @@
 
 
 bool MetafontWrapper::success () const {
-	ifstream tfm((_dir+_fontname+".tfm").c_str());
-	ifstream gf((_dir+_fontname+".gf").c_str());
+	ifstream tfm(_dir+_fontname+".tfm");
+	ifstream gf(_dir+_fontname+".gf");
 	return tfm && gf;
 }

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.cpp
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.cpp	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.cpp	2018-07-08 08:06:14 UTC (rev 48164)
@@ -243,7 +243,7 @@
 		StreamInputReader in(is);
 		if (in.check(" plotfile ")) { // ps: plotfile fname
 			string fname = in.getString();
-			ifstream ifs(fname.c_str());
+			ifstream ifs(fname);
 			if (ifs)
 				_psi.execute(ifs);
 			else

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/SourceInput.cpp
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/SourceInput.cpp	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/SourceInput.cpp	2018-07-08 08:06:14 UTC (rev 48164)
@@ -50,46 +50,64 @@
 #endif
 
 
-SourceInput::~SourceInput () {
-	// remove temporary file created for reading from stdin
-	if (!_tmpfilepath.empty())
-		FileSystem::remove(_tmpfilepath);
-}
-
-
-/** Creates a temporary file in the configured tmp folder.
- *  @param[out] path path of the created file
- *  @return file descriptor (>= 0 on success) */
-static int create_tmp_file (string &path) {
-	path = FileSystem::tmpdir();
+/** Creates a new temporary file in the configured tmp folder.
+ *  If the object already holds an opened temporary file, it's closed
+ *  and removed before creating the new one.
+ *  @return true on success */
+bool TemporaryFile::create () {
+	if (opened())
+		close();
+	_path = FileSystem::tmpdir();
 #ifndef _WIN32
-	path += "stdinXXXXXX";
-	int fd = mkstemp(&path[0]);
+	_path += "stdinXXXXXX";
+	_fd = mkstemp(&_path[0]);
 #else
-	int fd = -1;
 	char fname[MAX_PATH];
-	std::replace(path.begin(), path.end(), '/', '\\');
-	if (GetTempFileName(path.c_str(), "stdin", 0, fname)) {
-		fd = _open(fname, _O_CREAT | _O_WRONLY | _O_BINARY, _S_IWRITE);
-		path = fname;
+	std::replace(_path.begin(), _path.end(), '/', '\\');
+	if (GetTempFileName(_path.c_str(), "stdin", 0, fname)) {
+		_fd = _open(fname, _O_CREAT | _O_WRONLY | _O_BINARY, _S_IWRITE);
+		_path = fname;
 	}
 #endif
-	return fd;
+	return opened();
 }
 
 
+/** Writes a sequence of characters to the file.
+ *  @param[in] buf buffer containing the characters to write
+ *  @param[in] len number of characters to write
+ *  @return true on success */
+bool TemporaryFile::write (const char *buf, size_t len) {
+	return opened() && fdwrite(_fd, buf, len) >= 0;
+}
+
+
+/** Closes and removes the temporary file.
+ *  @return true on success */
+bool TemporaryFile::close () {
+	bool ok = true;
+	if (opened()) {
+		ok = (fdclose(_fd) >= 0);
+		FileSystem::remove(_path);
+		_fd = -1;
+		_path.clear();
+	}
+	return ok;
+}
+
+////////////////////////////////////////////////////////////////
+
 istream& SourceInput::getInputStream (bool showMessages) {
 	if (!_ifs.is_open()) {
 		if (!_fname.empty())
 			_ifs.open(_fname, ios::binary);
 		else {
-			int fd = create_tmp_file(_tmpfilepath);
-			if (fd < 0)
-				throw MessageException("can't create temporary file for writing");
 #ifdef _WIN32
 			if (_setmode(_fileno(stdin), _O_BINARY) == -1)
 				throw MessageException("can't open stdin in binary mode");
 #endif
+			if (!_tmpfile.create())
+				throw MessageException("can't create temporary file for writing");
 			if (showMessages)
 				Message::mstream() << "reading from " << getMessageFileName() << '\n';
 			char buf[1024];
@@ -96,12 +114,10 @@
 			while (cin) {
 				cin.read(buf, 1024);
 				size_t count = cin.gcount();
-				if (fdwrite(fd, buf, count) < 0)
+				if (!_tmpfile.write(buf, count))
 					throw MessageException("failed to write data to temporary file");
 			}
-			if (fdclose(fd) < 0)
-				throw MessageException("failed to close temporary file");
-			_ifs.open(_tmpfilepath, ios::binary);
+			_ifs.open(_tmpfile.path(), ios::binary);
 		}
 	}
 	return _ifs;
@@ -119,5 +135,5 @@
 
 
 string SourceInput::getFilePath () const {
-	return _tmpfilepath.empty() ? _fname : _tmpfilepath;
+	return _tmpfile.path().empty() ? _fname : _tmpfile.path();
 }

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/SourceInput.hpp
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/SourceInput.hpp	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/SourceInput.hpp	2018-07-08 08:06:14 UTC (rev 48164)
@@ -18,16 +18,32 @@
 ** along with this program; if not, see <http://www.gnu.org/licenses/>. **
 *************************************************************************/
 
-#ifndef DVIINPUT_HPP
-#define DVIINPUT_HPP
+#ifndef SOURCEINPUT_HPP
+#define SOURCEINPUT_HPP
 
 #include <fstream>
 #include <string>
 
+
+/** Helper class to handle temporary files. */
+class TemporaryFile {
+	public:
+		~TemporaryFile () {close();}
+		bool create ();
+		bool opened () const {return _fd >= 0;}
+		bool write (const char *buf, size_t len);
+		bool close ();
+		const std::string& path () const {return _path;}
+
+	private:
+		int _fd = -1;       ///< file descriptor assigned to the temporary file
+		std::string _path;  ///< path to temporary file
+};
+
+
 class SourceInput {
 	public:
 		SourceInput (const std::string &fname) : _fname(fname) {}
-		~SourceInput ();
 		std::istream& getInputStream (bool showMessages=false);
 		std::string getFileName () const;
 		std::string getMessageFileName () const;
@@ -35,8 +51,8 @@
 
 	private:
 		const std::string &_fname; ///< name of file to read from
-		std::string _tmpfilepath;  ///< path of temporary file used when reading from stdin
+		TemporaryFile _tmpfile;    ///< temporary file used when reading from stdin
 		std::ifstream _ifs;
 };
 
-#endif
\ No newline at end of file
+#endif

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.cpp
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.cpp	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.cpp	2018-07-08 08:06:14 UTC (rev 48164)
@@ -99,7 +99,7 @@
  *  @return the string read */
 string StreamReader::readString (CRC32 &crc32, bool finalZero) {
 	string ret = readString();
-	crc32.update((const uint8_t*)ret.c_str(), ret.length());
+	crc32.update(reinterpret_cast<const uint8_t*>(ret.data()), ret.length());
 	if (finalZero)
 		crc32.update(0, 1);
 	return ret;
@@ -114,7 +114,7 @@
 		throw StreamReaderException("no stream assigned");
 	length = max(0, length);
 	string str(length, '\0');
-	_is->read(&str[0], length);  // reads 'length' bytes and appends \0
+	_is->read(&str[0], length);  // read 'length' bytes and append '\0'
 	return str;
 }
 
@@ -125,7 +125,7 @@
  *  @return the string read */
 string StreamReader::readString (int length, CRC32 &crc32) {
 	string ret = readString(length);
-	crc32.update(ret.c_str());
+	crc32.update(reinterpret_cast<const uint8_t*>(ret.data()), length);
 	return ret;
 }
 

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/utility.cpp
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/utility.cpp	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/utility.cpp	2018-07-08 08:06:14 UTC (rev 48164)
@@ -124,7 +124,7 @@
 /** Returns the contents of a file.
  *  @param[in] fname name/path of the file */
 string util::read_file_contents (const string &fname) {
-	ifstream ifs(fname.c_str(), ios::binary);
+	ifstream ifs(fname, ios::binary);
 	return string(istreambuf_iterator<char>(ifs.rdbuf()), istreambuf_iterator<char>());
 }
 
@@ -134,6 +134,6 @@
  *  @param[in] start iterator pointing to the begin of the byte sequence
  *  @param[in] end iterator pointing to the first byte after the byte sequence to write */
 void util::write_file_contents (const string &fname, string::iterator start, string::iterator end) {
-	ofstream ofs(fname.c_str(), ios::binary);
+	ofstream ofs(fname, ios::binary);
 	copy(start, end, ostream_iterator<char>(ofs));
 }

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/version.hpp
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/version.hpp	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/src/version.hpp	2018-07-08 08:06:14 UTC (rev 48164)
@@ -22,7 +22,7 @@
 #define VERSION_HPP
 
 constexpr const char *PROGRAM_NAME = "dvisvgm";
-constexpr const char *PROGRAM_VERSION = "2.4";
+constexpr const char *PROGRAM_VERSION = "2.4.1";
 
 #endif
 

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/tests/DVIReaderTest.cpp
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/tests/DVIReaderTest.cpp	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/tests/DVIReaderTest.cpp	2018-07-08 08:06:14 UTC (rev 48164)
@@ -163,7 +163,7 @@
 static void test_dvi_file (const char *fname, const vector<const char*> &expected_lines) {
 	XMLString::DECIMAL_PLACES = 3;
 	string dviname = string(SRCDIR)+"/data/"+fname;
-	ifstream ifs(dviname.c_str(), ios::binary);
+	ifstream ifs(dviname, ios::binary);
 	ASSERT_TRUE(bool(ifs));
 	stringstream ss;
 	LoggingDVIReader dviReader(ifs, ss);

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/tests/GFReaderTest.cpp
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/tests/GFReaderTest.cpp	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/tests/GFReaderTest.cpp	2018-07-08 08:06:14 UTC (rev 48164)
@@ -233,7 +233,7 @@
 
 TEST(GFReaderTest, preamble) {
 	string gf = string(SRCDIR)+"/data/cmr10.600gf";
-	ifstream ifs(gf.c_str(), ios::binary);
+	ifstream ifs(gf, ios::binary);
 	ASSERT_TRUE(bool(ifs));
 	LoggingGFReader gfReader(ifs);
 	gfReader.executePreamble();
@@ -243,7 +243,7 @@
 
 TEST(GFReaderTest, postamble) {
 	string gf = string(SRCDIR)+"/data/cmr10.600gf";
-	ifstream ifs(gf.c_str(), ios::binary);
+	ifstream ifs(gf, ios::binary);
 	ASSERT_TRUE(bool(ifs));
 	GFReader gfReader(ifs);
 	gfReader.executePostamble();
@@ -256,7 +256,7 @@
 
 TEST(GFReaderTest, executeChar) {
 	string gf = string(SRCDIR)+"/data/cmr10.600gf";
-	ifstream ifs(gf.c_str(), ios::binary);
+	ifstream ifs(gf, ios::binary);
 	ASSERT_TRUE(bool(ifs));
 	GFReader gfReader(ifs);
 	PixelActions actions;
@@ -286,7 +286,7 @@
 
 TEST(GFReaderTest, executeAllChars) {
 	string gf = string(SRCDIR)+"/data/cmr10.600gf";
-	ifstream ifs(gf.c_str(), ios::binary);
+	ifstream ifs(gf, ios::binary);
 	ASSERT_TRUE(bool(ifs));
 	GFReader gfReader(ifs);
 	gfReader.executeAllChars();

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/tests/JFMReaderTest.cpp
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/tests/JFMReaderTest.cpp	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/tests/JFMReaderTest.cpp	2018-07-08 08:06:14 UTC (rev 48164)
@@ -38,7 +38,7 @@
 	public:
 		void SetUp () override {
 			string fname = string(SRCDIR)+"/data/cidjmgr0-h.tfm";
-			ifstream ifs(fname.c_str(), ios::binary);
+			ifstream ifs(fname, ios::binary);
 			ASSERT_TRUE(ifs.is_open()) << "failed opening " << fname;
 			jfm = util::make_unique<JFM>(ifs);
 		}

Modified: trunk/Build/source/texk/dvisvgm/dvisvgm-src/tests/TFMReaderTest.cpp
===================================================================
--- trunk/Build/source/texk/dvisvgm/dvisvgm-src/tests/TFMReaderTest.cpp	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/dvisvgm-src/tests/TFMReaderTest.cpp	2018-07-08 08:06:14 UTC (rev 48164)
@@ -38,7 +38,7 @@
 	public:
 		void SetUp () override {
 			string fname = string(SRCDIR)+"/data/cmr10.tfm";
-			ifstream ifs(fname.c_str(), ios::binary);
+			ifstream ifs(fname, ios::binary);
 			ASSERT_TRUE(ifs.is_open()) << "failed opening " << fname;
 			tfm = util::make_unique<TFM>(ifs);
 		}

Modified: trunk/Build/source/texk/dvisvgm/version.ac
===================================================================
--- trunk/Build/source/texk/dvisvgm/version.ac	2018-07-08 05:47:34 UTC (rev 48163)
+++ trunk/Build/source/texk/dvisvgm/version.ac	2018-07-08 08:06:14 UTC (rev 48164)
@@ -9,4 +9,4 @@
 dnl --------------------------------------------------------
 dnl
 dnl  m4-include this file to define the current dvisvgm version
-m4_define([dvisvgm_version], [2.4])
+m4_define([dvisvgm_version], [2.4.1])



More information about the tex-live-commits mailing list