texlive[44972] Build/source/libs: potrace 1.15
commits+kakuto at tug.org
commits+kakuto at tug.org
Mon Aug 7 11:40:47 CEST 2017
Revision: 44972
http://tug.org/svn/texlive?view=revision&revision=44972
Author: kakuto
Date: 2017-08-07 11:40:46 +0200 (Mon, 07 Aug 2017)
Log Message:
-----------
potrace 1.15
Modified Paths:
--------------
trunk/Build/source/libs/README
trunk/Build/source/libs/potrace/ChangeLog
trunk/Build/source/libs/potrace/TLpatches/ChangeLog
trunk/Build/source/libs/potrace/TLpatches/TL-Changes
trunk/Build/source/libs/potrace/configure
trunk/Build/source/libs/potrace/potrace-src/ChangeLog
trunk/Build/source/libs/potrace/potrace-src/NEWS
trunk/Build/source/libs/potrace/potrace-src/README
trunk/Build/source/libs/potrace/potrace-src/README-WIN
trunk/Build/source/libs/potrace/potrace-src/config.h.in
trunk/Build/source/libs/potrace/potrace-src/configure.ac
trunk/Build/source/libs/potrace/potrace-src/src/Makefile.am
trunk/Build/source/libs/potrace/potrace-src/src/backend_eps.c
trunk/Build/source/libs/potrace/potrace-src/src/bitmap_io.c
trunk/Build/source/libs/potrace/potrace-src/src/decompose.c
trunk/Build/source/libs/potrace/potrace-src/src/getopt.c
trunk/Build/source/libs/potrace/potrace-src/src/getopt1.c
trunk/Build/source/libs/potrace/potrace-src/src/greymap.c
trunk/Build/source/libs/potrace/potrace-src/src/greymap.h
trunk/Build/source/libs/potrace/potrace-src/src/main.c
trunk/Build/source/libs/potrace/potrace-src/src/mkbitmap.c
trunk/Build/source/libs/potrace/potrace-src/src/potracelib.h
trunk/Build/source/libs/potrace/potrace-src/src/trace.c
trunk/Build/source/libs/potrace/version.ac
Added Paths:
-----------
trunk/Build/source/libs/potrace/potrace-src/src/include/
trunk/Build/source/libs/potrace/potrace-src/src/include/getopt/
trunk/Build/source/libs/potrace/potrace-src/src/include/getopt/getopt.h
Removed Paths:
-------------
trunk/Build/source/libs/potrace/potrace-src/src/getopt.h
Modified: trunk/Build/source/libs/README
===================================================================
--- trunk/Build/source/libs/README 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/README 2017-08-07 09:40:46 UTC (rev 44972)
@@ -52,7 +52,7 @@
poppler 0.52.0 - checked 17feb17
http://poppler.freedesktop.org/ - used by luatex and xetex
-potrace 1.14 - checked 22feb17
+potrace 1.15 - checked 07aug17
http://potrace.sourceforge.net
teckit 2.5.7 - checked 27jun17
Modified: trunk/Build/source/libs/potrace/ChangeLog
===================================================================
--- trunk/Build/source/libs/potrace/ChangeLog 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/ChangeLog 2017-08-07 09:40:46 UTC (rev 44972)
@@ -1,3 +1,8 @@
+2017-08-07 Akira Kakuto <kakuto at fuk.kindai.ac.jp>
+
+ Import potrace-1.15.
+ * version.ac: Adjust.
+
2017-02-22 Akira Kakuto <kakuto at fuk.kindai.ac.jp>
Import potrace-1.14.
Modified: trunk/Build/source/libs/potrace/TLpatches/ChangeLog
===================================================================
--- trunk/Build/source/libs/potrace/TLpatches/ChangeLog 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/TLpatches/ChangeLog 2017-08-07 09:40:46 UTC (rev 44972)
@@ -1,3 +1,8 @@
+2017-08-07 Akira Kakuto <kakuto at fuk.kindai.ac.jp>
+
+ Import potrace-1.15 source tree from:
+ http://potrace.sourceforge.net
+
2017-02-22 Akira Kakuto <kakuto at fuk.kindai.ac.jp>
Import potrace-1.14 source tree from:
Modified: trunk/Build/source/libs/potrace/TLpatches/TL-Changes
===================================================================
--- trunk/Build/source/libs/potrace/TLpatches/TL-Changes 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/TLpatches/TL-Changes 2017-08-07 09:40:46 UTC (rev 44972)
@@ -1,4 +1,4 @@
-Changes applied to the potrace-1.14/ tree as obtained from:
+Changes applied to the potrace-1.15/ tree as obtained from:
http://potrace.sourceforge.net
Removed:
Modified: trunk/Build/source/libs/potrace/configure
===================================================================
--- trunk/Build/source/libs/potrace/configure 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/configure 2017-08-07 09:40:46 UTC (rev 44972)
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for potrace (TeX Live) 1.14.
+# Generated by GNU Autoconf 2.69 for potrace (TeX Live) 1.15.
#
# Report bugs to <tex-k at tug.org>.
#
@@ -580,8 +580,8 @@
# Identity of this package.
PACKAGE_NAME='potrace (TeX Live)'
PACKAGE_TARNAME='potrace--tex-live-'
-PACKAGE_VERSION='1.14'
-PACKAGE_STRING='potrace (TeX Live) 1.14'
+PACKAGE_VERSION='1.15'
+PACKAGE_STRING='potrace (TeX Live) 1.15'
PACKAGE_BUGREPORT='tex-k at tug.org'
PACKAGE_URL=''
@@ -1241,7 +1241,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 potrace (TeX Live) 1.14 to adapt to many kinds of systems.
+\`configure' configures potrace (TeX Live) 1.15 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1308,7 +1308,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of potrace (TeX Live) 1.14:";;
+ short | recursive ) echo "Configuration of potrace (TeX Live) 1.15:";;
esac
cat <<\_ACEOF
@@ -1405,7 +1405,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-potrace (TeX Live) configure 1.14
+potrace (TeX Live) configure 1.15
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1585,7 +1585,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by potrace (TeX Live) $as_me 1.14, which was
+It was created by potrace (TeX Live) $as_me 1.15, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3508,7 +3508,7 @@
# Define the identity of the package.
PACKAGE='potrace--tex-live-'
- VERSION='1.14'
+ VERSION='1.15'
cat >>confdefs.h <<_ACEOF
@@ -5582,7 +5582,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by potrace (TeX Live) $as_me 1.14, which was
+This file was extended by potrace (TeX Live) $as_me 1.15, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5648,7 +5648,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-potrace (TeX Live) config.status 1.14
+potrace (TeX Live) config.status 1.15
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Modified: trunk/Build/source/libs/potrace/potrace-src/ChangeLog
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/ChangeLog 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/potrace-src/ChangeLog 2017-08-07 09:40:46 UTC (rev 44972)
@@ -1,5 +1,25 @@
ChangeLog
+v1.15 2017/08/05
+ (2017/08/05) PS1 - use round() instead of rint()
+ (2017/08/05) PS1 - portability: set both _POSIX_C_SOURCE and
+ _NETBSD_SOURCE to enable strdup prototype in string.h, as
+ _XOPEN_SOURCE=500 doesn't work on macOS, _XOPEN_SOURCE=600 doesn't
+ work on SunOS, and _POSIX_C_SOURCE alone doesn't work on Minix.
+ (2017/08/02) PS1 - fixed a potential arithmetic overflow.
+ (2017/06/17) PS1 - fixed a bug with very large bitmaps. Reported
+ by Michael Voříšek.
+ (2017/03/05) PS1 - autoconf: added --enable-local-getopt to avoid
+ using the system-wide getopt library (it may still end up being
+ used on GNU systems).
+ (2017/03/05) PS1 - portability: moved getopt.h to a subdirectory,
+ to be included only when needed. Reported by Daniel Macks.
+ (2017/03/05) PS1 - portability: use _XOPEN_SOURCE=600 to fix macOS
+ warning.
+ (2017/02/27) PS1 - fixed more buffer overflows (not security
+ critical), including one reported by Agostino Sarubbo. This also
+ fixes CVE-2017-12067.
+
v1.14 2017/02/19
(2017/02/19) PS1 - speed: use clang as default compiler if
available, and no longer use -ffloat-store even with gcc.
Modified: trunk/Build/source/libs/potrace/potrace-src/NEWS
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/NEWS 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/potrace-src/NEWS 2017-08-07 09:40:46 UTC (rev 44972)
@@ -1,3 +1,12 @@
+August 5, 2017: Release 1.15
+
+ This release consists of bugfixes and minor portability improvements.
+ Some potential buffer overflows and arithmetic overflows were fixed,
+ including CVE-2017-12067. A bug triggered by very large bitmaps has
+ been fixed. A new configuration option --enable-local-getopt was
+ added. Thanks to Agostino Sarubbo, Daniel Macks, and Michael Voříšek
+ for reporting bugs and suggesting improvements.
+
February 19, 2017: Release 1.14
This release consists of bugfixes and minor portability improvements.
Modified: trunk/Build/source/libs/potrace/potrace-src/README
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/README 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/potrace-src/README 2017-08-07 09:40:46 UTC (rev 44972)
@@ -7,16 +7,16 @@
Potrace is a tool for tracing a bitmap, which means, transforming a
bitmap into a smooth, scalable image. The input is a bitmap (PBM,
- PGM, PPM, or BMP), and the default output is one of several vector
- file formats. A typical use is to create EPS files from scanned
+ PGM, PPM, or BMP), and the output is one of several vector file
+ formats. A typical use is to create SVG or PDF files from scanned
data, such as company or university logos, handwritten notes, etc.
The resulting image is not "jaggy" like a bitmap, but smooth. It can
then be rendered at any resolution.
- Potrace can currently produce the following output formats: EPS,
- PostScript, PDF, SVG (scalable vector graphics), DXF, GeoJSON, PGM
- (for easy antialiasing of pixel-based images), Gimppath, and
- XFig. Additional backends might be added in the future.
+ Potrace can currently produce the following output formats: SVG, PDF,
+ EPS, PostScript, DXF, GeoJSON, PGM (for easy antialiasing of
+ pixel-based images), Gimppath, and XFig. Additional backends might be
+ added in the future.
A separate program, mkbitmap, is also provided. This program can act
as a pre-processor for Potrace, applying scaling and various filters
@@ -40,6 +40,7 @@
--enable-metric use metric units (centimeters) as default
--enable-a4 use a4 as the default papersize
--enable-dumb-tty use simplified ASCII-only progress bar
+ --enable-local-getopt avoid using the system-wide getopt library
See also ./configure --help.
@@ -69,12 +70,12 @@
-- - end of options; 0 or more input filenames follow
Backend selection:
-b, --backend <name> - select backend by name
- -e, --eps - EPS backend (encapsulated PostScript) (default)
- -p, --postscript - PostScript backend
- -s, --svg - SVG backend (scalable vector graphics)
- -g, --pgm - PGM backend (portable greymap)
+ -b svg, -s, --svg - SVG backend (scalable vector graphics)
-b pdf - PDF backend (portable document format)
-b pdfpage - fixed page-size PDF backend
+ -b eps, -e, --eps - EPS backend (encapsulated PostScript) (default)
+ -b ps, -p, --postscript - PostScript backend
+ -b pgm, -g, --pgm - PGM backend (portable greymap)
-b dxf - DXF backend (drawing interchange format)
-b geojson - GeoJSON backend
-b gimppath - Gimppath backend (GNU Gimp)
@@ -125,7 +126,7 @@
Dimensions can have optional units, e.g. 6.5in, 15cm, 100pt.
Default is inches (or pixels for pgm, dxf, and gimppath backends).
Possible input file formats are: pnm (pbm, pgm, ppm), bmp.
- Backends are: eps, postscript, ps, pdf, pdfpage, svg, dxf, geojson, pgm,
+ Backends are: svg, pdf, pdfpage, eps, postscript, ps, dxf, geojson, pgm,
gimppath, xfig.
POTRACE LIBRARY (FOR DEVELOPERS)
@@ -159,6 +160,9 @@
Copyright (C) 2001-2017 Peter Selinger
+ The use of the name "Potrace" is governed by a separate policy, see
+ TRADEMARKS below.
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
@@ -176,6 +180,34 @@
See the file COPYING for details.
+TRADEMARKS
+
+ "Potrace" is a trademark of Peter Selinger.
+
+ Policy on using the name "Potrace". If you are planning to modify
+ Potrace, including making a port of Potrace to another programming
+ language, please be aware of the following. While the source code of
+ Potrace is licensed under the GNU General Public License, the name
+ "Potrace" is my trademark, and may only be used with my permission.
+
+ In practice, I will permit the use of the name "Potrace" in
+ connection with a port of Potrace to another programming language,
+ provided that the port complies with the term of the GNU General
+ Public License and produces the same high quality vectorized output
+ as the original Potrace. Ports that are buggy or do not produce high
+ quality output are not permitted to use the name "Potrace". To ensure
+ compliance with this policy, please run your port by me before making
+ it public. Also, if you use the "Potrace" name (or any derivative,
+ such as "MyPotrace"), you must provide a name and email address where
+ I can reach you. Derivatives of Potrace that are posted anonymously
+ or where the authors cannot be reached or do not reply to email or
+ bug reports are not permitted to use the name "Potrace".
+
+ The purpose of this policy is to allow people to port Potrace to as
+ many programming languages as possible, while also ensuring that all
+ such ports are of the same high quality that has come to be
+ associated with the name "Potrace".
+
GPG KEY
The key fingerprint of Peter Selinger's GPG key is:
Modified: trunk/Build/source/libs/potrace/potrace-src/README-WIN
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/README-WIN 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/potrace-src/README-WIN 2017-08-07 09:40:46 UTC (rev 44972)
@@ -10,8 +10,8 @@
etc.
-INSTALLATION for Windows 95/98/2000/NT/XP/Vista/7/whatever:
-===========================================================
+INSTALLATION for Windows:
+=========================
Download the file potrace-XXX.win32.zip (or potrace-XXX.win64.zip if
you want the 64-bit version). Unpack it with your favorite unzipping
@@ -29,11 +29,7 @@
PATH=%PATH%;C:\DIRECTORY\WHERE\FILES\ARE
-Note: as of version 1.6, the Potrace Windows distribution is built
-using MinGW and not Cygwin. It is no longer necessary to install a
-separate DLL file with Potrace.
-
RUNNING:
========
@@ -51,15 +47,3 @@
potrace h:\data\*.*
potrace h:/data/*.*
-
-Earlier versions of Potrace had some problems when wildcards and
-backslashes were mixed; these problems seem to have been solved by the
-switch from Cygwin to MinGW.
-
-Another problem that some users have reported is that the generated
-".ps" and ".eps" were not executable under Windows (i.e., one could
-not simply display these files by typing their name on the MSDOS
-Prompt, as should normally be the case if a default application for
-PostScript files has been configured). I was never able to replicate
-this problem, but I believe that it has also been solved by the switch
-to MinGW.
Modified: trunk/Build/source/libs/potrace/potrace-src/config.h.in
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/config.h.in 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/potrace-src/config.h.in 2017-08-07 09:40:46 UTC (rev 44972)
@@ -87,6 +87,11 @@
/* Version number of package */
#undef VERSION
+/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+#undef _UINT64_T
+
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
@@ -98,3 +103,7 @@
/* Replacement function for strncasecmp */
#undef strncasecmp
+
+/* Define to the type of an unsigned integer type of width exactly 64 bits if
+ such a type exists and the standard includes do not define it. */
+#undef uint64_t
Modified: trunk/Build/source/libs/potrace/potrace-src/configure.ac
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/configure.ac 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/potrace-src/configure.ac 2017-08-07 09:40:46 UTC (rev 44972)
@@ -6,13 +6,13 @@
dnl ----------------------------------------------------------------------
dnl Package info
-AC_INIT([potrace],[1.14],[selinger at users.sourceforge.net])
+AC_INIT([potrace],[1.15],[selinger at users.sourceforge.net])
AC_CONFIG_SRCDIR(src/trace.c)
AM_INIT_AUTOMAKE
AC_CONFIG_HEADER(config.h)
AC_CONFIG_MACRO_DIR([m4])
-DATE="February 2017"
+DATE="August 2017"
dnl ----------------------------------------------------------------------
dnl The names of the installed executables are defined here, but
@@ -34,7 +34,7 @@
AC_SUBST(CADD)
AC_MSG_CHECKING(what compiler options to use)
-AC_MSG_RESULT($CFLAGS $CADD)
+AC_MSG_RESULT($CADD $CFLAGS)
dnl ----------------------------------------------------------------------
dnl check if --with-libpotrace was given - this must be done
@@ -192,6 +192,11 @@
AC_CHECK_LIB(m, floor, true, AC_MSG_ERROR([cannot find the m library (-lm)]))
dnl ----------------------------------------------------------------------
+dnl Check for types
+
+AC_TYPE_UINT64_T
+
+dnl ----------------------------------------------------------------------
dnl Check for library functions.
dnl Check for getopt_long
@@ -216,8 +221,17 @@
[AC_MSG_RESULT(maybe (cross-compiling))
have_getopt_long=no])
fi
-if test "$have_getopt_long" != "yes"; then
+
+AC_ARG_ENABLE(local-getopt,
+ AS_HELP_STRING([--enable-local-getopt],[avoid using the system-wide getopt library]))
+
+AC_MSG_CHECKING(whether to use local getopt)
+if test "$have_getopt_long" != "yes" || test "$enable_local_getopt" = yes; then
EXTRA_OBJS="$EXTRA_OBJS getopt.o getopt1.o"
+ EXTRA_INCLUDES="$EXTRA_INCLUDES -I\$(srcdir)/include/getopt"
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
fi
AC_CHECK_FUNC(strcasecmp, ,
@@ -255,6 +269,7 @@
AC_SUBST(POTRACE)
AC_SUBST(MKBITMAP)
AC_SUBST(EXTRA_OBJS)
+AC_SUBST(EXTRA_INCLUDES)
AC_SUBST(EXTRA_LIBS)
AC_SUBST(AM_CPPFLAGS)
AC_SUBST(POTRACELIB_VERSION)
Modified: trunk/Build/source/libs/potrace/potrace-src/src/Makefile.am
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/src/Makefile.am 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/potrace-src/src/Makefile.am 2017-08-07 09:40:46 UTC (rev 44972)
@@ -32,6 +32,8 @@
potracelib_demo_LDADD = libpotrace.la -lm
potracelib_demo_DEPENDENCIES = libpotrace.la
+AM_CPPFLAGS = @EXTRA_INCLUDES@
+
#----------------------------------------------------------------------
# Potrace library:
@@ -42,7 +44,7 @@
lib_LTLIBRARIES = $(INSTLIBS)
EXTRA_LTLIBRARIES = libpotrace.la
libpotrace_la_SOURCES = $(libsources)
-libpotrace_la_LDFLAGS = -version-info 0:4:0 -rpath '$(libdir)' \
+libpotrace_la_LDFLAGS = -version-info 0:5:0 -rpath '$(libdir)' \
-export-symbols $(srcdir)/libpotrace-export.sym -no-undefined
libpotrace_la_LIBADD = -lm
MOSTLYCLEANFILES = libpotrace.la
@@ -54,4 +56,4 @@
#----------------------------------------------------------------------
# other stuff to distribute
-EXTRA_DIST = getopt.c getopt1.c getopt.h libpotrace-export.sym
+EXTRA_DIST = getopt.c getopt1.c include/getopt/getopt.h libpotrace-export.sym
Modified: trunk/Build/source/libs/potrace/potrace-src/src/backend_eps.c
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/src/backend_eps.c 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/potrace-src/src/backend_eps.c 2017-08-07 09:40:46 UTC (rev 44972)
@@ -8,8 +8,14 @@
output. Postscript compression is optionally supplied via the
functions in flate.c. */
-#define _XOPEN_SOURCE 500
+#ifndef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200809L
+#endif
+#ifndef _NETBSD_SOURCE
+#define _NETBSD_SOURCE 1
+#endif
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
Modified: trunk/Build/source/libs/potrace/potrace-src/src/bitmap_io.c
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/src/bitmap_io.c 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/potrace-src/src/bitmap_io.c 2017-08-07 09:40:46 UTC (rev 44972)
@@ -689,11 +689,11 @@
x=0;
y++;
}
- if (y>=bmpinfo.h) {
+ if (x>=bmpinfo.w || y>=bmpinfo.h) {
break;
}
realheight = y+1;
- BM_UPUT(bm, x, y, col[i&1]);
+ BM_PUT(bm, x, y, col[i&1]);
x++;
}
} else if (c == 0) {
@@ -719,7 +719,7 @@
x=0;
y++;
}
- if (y>=bmpinfo.h) {
+ if (x>=bmpinfo.w || y>=bmpinfo.h) {
break;
}
realheight = y+1;
@@ -747,11 +747,11 @@
x=0;
y++;
}
- if (y>=bmpinfo.h) {
+ if (x>=bmpinfo.w || y>=bmpinfo.h) {
break;
}
realheight = y+1;
- BM_UPUT(bm, x, y, COLTABLE(c));
+ BM_PUT(bm, x, y, COLTABLE(c));
x++;
}
} else if (c == 0) {
@@ -775,7 +775,7 @@
x=0;
y++;
}
- if (y>=bmpinfo.h) {
+ if (x>=bmpinfo.w || y>=bmpinfo.h) {
break;
}
realheight = y+1;
Modified: trunk/Build/source/libs/potrace/potrace-src/src/decompose.c
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/src/decompose.c 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/potrace-src/src/decompose.c 2017-08-07 09:40:46 UTC (rev 44972)
@@ -10,6 +10,9 @@
#include <stdlib.h>
#include <string.h>
#include <limits.h>
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
#include "potracelib.h"
#include "curve.h"
@@ -199,7 +202,8 @@
cannot have length 0). Sign is required for correct interpretation
of turnpolicies. */
static path_t *findpath(potrace_bitmap_t *bm, int x0, int y0, int sign, int turnpolicy) {
- int x, y, dirx, diry, len, size, area;
+ int x, y, dirx, diry, len, size;
+ uint64_t area;
int c, d, tmp;
point_t *pt, *pt1;
path_t *p = NULL;
@@ -276,7 +280,7 @@
p->priv->pt = pt;
p->priv->len = len;
- p->area = area;
+ p->area = area <= INT_MAX ? area : INT_MAX; /* avoid overflow */
p->sign = sign;
return p;
Modified: trunk/Build/source/libs/potrace/potrace-src/src/getopt.c
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/src/getopt.c 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/potrace-src/src/getopt.c 2017-08-07 09:40:46 UTC (rev 44972)
@@ -41,25 +41,6 @@
#include <stdio.h>
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself. This code is part of the GNU C
- Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object files,
- it is simpler to just do this in the source for each such file. */
-
-#define GETOPT_INTERFACE_VERSION 2
-#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
-# include <gnu-versions.h>
-# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
-# define ELIDE_CODE
-# endif
-#endif
-
-#ifndef ELIDE_CODE
-
-
/* This needs to come after some library #include
to get __GNU_LIBRARY__ defined. */
#ifdef __GNU_LIBRARY__
@@ -986,7 +967,6 @@
0);
}
-#endif /* Not ELIDE_CODE. */
#ifdef TEST
Deleted: trunk/Build/source/libs/potrace/potrace-src/src/getopt.h
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/src/getopt.h 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/potrace-src/src/getopt.h 2017-08-07 09:40:46 UTC (rev 44972)
@@ -1,180 +0,0 @@
-/* Declarations for getopt.
- Copyright (C) 1989,90,91,92,93,94,96,97,98,99 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-#ifndef _GETOPT_H
-
-#ifndef __need_getopt
-# define _GETOPT_H 1
-#endif
-
-/* If __GNU_LIBRARY__ is not already defined, either we are being used
- standalone, or this is the first header included in the source file.
- If we are being used with glibc, we need to include <features.h>, but
- that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
- not defined, include <ctype.h>, which will pull in <features.h> for us
- if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
- doesn't flood the namespace with stuff the way some other headers do.) */
-#if !defined __GNU_LIBRARY__
-# include <ctype.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
- the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
- each non-option ARGV-element is returned here. */
-
-extern char *optarg;
-
-/* Index in ARGV of the next element to be scanned.
- This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
-
- On entry to `getopt', zero means this is the first call; initialize.
-
- When `getopt' returns -1, this is the index of the first of the
- non-option elements that the caller should itself scan.
-
- Otherwise, `optind' communicates from one call to the next
- how much of ARGV has been scanned so far. */
-
-extern int optind;
-
-/* Callers store zero here to inhibit the error message `getopt' prints
- for unrecognized options. */
-
-extern int opterr;
-
-/* Set to an option character which was unrecognized. */
-
-extern int optopt;
-
-#ifndef __need_getopt
-/* Describe the long-named options requested by the application.
- The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
- of `struct option' terminated by an element containing a name which is
- zero.
-
- The field `has_arg' is:
- no_argument (or 0) if the option does not take an argument,
- required_argument (or 1) if the option requires an argument,
- optional_argument (or 2) if the option takes an optional argument.
-
- If the field `flag' is not NULL, it points to a variable that is set
- to the value given in the field `val' when the option is found, but
- left unchanged if the option is not found.
-
- To have a long-named option do something other than set an `int' to
- a compiled-in constant, such as set a value from `optarg', set the
- option's `flag' field to zero and its `val' field to a nonzero
- value (the equivalent single-letter option character, if there is
- one). For long options that have a zero `flag' field, `getopt'
- returns the contents of the `val' field. */
-
-struct option
-{
-# if defined __STDC__ && __STDC__
- const char *name;
-# else
- char *name;
-# endif
- /* has_arg can't be an enum because some compilers complain about
- type mismatches in all the code that assumes it is an int. */
- int has_arg;
- int *flag;
- int val;
-};
-
-/* Names for the values of the `has_arg' field of `struct option'. */
-
-# define no_argument 0
-# define required_argument 1
-# define optional_argument 2
-#endif /* need getopt */
-
-
-/* Get definitions and prototypes for functions to process the
- arguments in ARGV (ARGC of them, minus the program name) for
- options given in OPTS.
-
- Return the option character from OPTS just read. Return -1 when
- there are no more options. For unrecognized options, or options
- missing arguments, `optopt' is set to the option letter, and '?' is
- returned.
-
- The OPTS string is a list of characters which are recognized option
- letters, optionally followed by colons, specifying that that letter
- takes an argument, to be placed in `optarg'.
-
- If a letter in OPTS is followed by two colons, its argument is
- optional. This behavior is specific to the GNU `getopt'.
-
- The argument `--' causes premature termination of argument
- scanning, explicitly telling `getopt' that there are no more
- options.
-
- If OPTS begins with `--', then non-option arguments are treated as
- arguments to the option '\0'. This behavior is specific to the GNU
- `getopt'. */
-
-#if defined __STDC__ && __STDC__
-# ifdef __GNU_LIBRARY__
-/* Many other libraries have conflicting prototypes for getopt, with
- differences in the consts, in stdlib.h. To avoid compilation
- errors, only prototype getopt for the GNU C library. */
-extern int getopt (int argc, char *const *argv, const char *shortopts);
-# else /* not __GNU_LIBRARY__ */
-extern int getopt ();
-# endif /* __GNU_LIBRARY__ */
-
-# ifndef __need_getopt
-extern int getopt_long (int argc, char *const *argv, const char *shortopts,
- const struct option *longopts, int *longind);
-extern int getopt_long_only (int argc, char *const *argv,
- const char *shortopts,
- const struct option *longopts, int *longind);
-
-/* Internal only. Users should not call this directly. */
-extern int _getopt_internal (int argc, char *const *argv,
- const char *shortopts,
- const struct option *longopts, int *longind,
- int long_only);
-# endif
-#else /* not __STDC__ */
-extern int getopt ();
-# ifndef __need_getopt
-extern int getopt_long ();
-extern int getopt_long_only ();
-
-extern int _getopt_internal ();
-# endif
-#endif /* __STDC__ */
-
-#ifdef __cplusplus
-}
-#endif
-
-/* Make sure we later can get all the definitions and declarations. */
-#undef __need_getopt
-
-#endif /* getopt.h */
Modified: trunk/Build/source/libs/potrace/potrace-src/src/getopt1.c
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/src/getopt1.c 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/potrace-src/src/getopt1.c 2017-08-07 09:40:46 UTC (rev 44972)
@@ -34,25 +34,6 @@
#include <stdio.h>
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself. This code is part of the GNU C
- Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object files,
- it is simpler to just do this in the source for each such file. */
-
-#define GETOPT_INTERFACE_VERSION 2
-#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
-#include <gnu-versions.h>
-#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
-#define ELIDE_CODE
-#endif
-#endif
-
-#ifndef ELIDE_CODE
-
-
/* This needs to come after some library #include
to get __GNU_LIBRARY__ defined. */
#ifdef __GNU_LIBRARY__
@@ -91,7 +72,6 @@
}
-#endif /* Not ELIDE_CODE. */
#ifdef TEST
Modified: trunk/Build/source/libs/potrace/potrace-src/src/greymap.c
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/src/greymap.c 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/potrace-src/src/greymap.c 2017-08-07 09:40:46 UTC (rev 44972)
@@ -845,11 +845,11 @@
x=0;
y++;
}
- if (y>=bmpinfo.h) {
+ if (x>=bmpinfo.w || y>=bmpinfo.h) {
break;
}
realheight = y+1;
- GM_UPUT(gm, x, y, col[i&1]);
+ GM_PUT(gm, x, y, col[i&1]);
x++;
}
} else if (c == 0) {
@@ -875,7 +875,7 @@
x=0;
y++;
}
- if (y>=bmpinfo.h) {
+ if (x>=bmpinfo.w || y>=bmpinfo.h) {
break;
}
realheight = y+1;
@@ -903,11 +903,11 @@
x=0;
y++;
}
- if (y>=bmpinfo.h) {
+ if (x>=bmpinfo.w || y>=bmpinfo.h) {
break;
}
realheight = y+1;
- GM_UPUT(gm, x, y, COLTABLE(c));
+ GM_PUT(gm, x, y, COLTABLE(c));
x++;
}
} else if (c == 0) {
@@ -931,7 +931,7 @@
x=0;
y++;
}
- if (y>=bmpinfo.h) {
+ if (x>=bmpinfo.w || y>=bmpinfo.h) {
break;
}
realheight = y+1;
Modified: trunk/Build/source/libs/potrace/potrace-src/src/greymap.h
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/src/greymap.h 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/potrace-src/src/greymap.h 2017-08-07 09:40:46 UTC (rev 44972)
@@ -41,7 +41,7 @@
#define GM_INC(gm, x, y, b) (gm_safe(gm, x, y) ? GM_UINC(gm, x, y, b) : 0)
#define GM_INV(gm, x, y) (gm_safe(gm, x, y) ? GM_UINV(gm, x, y) : 0)
#define GM_PUT(gm, x, y, b) (gm_safe(gm, x, y) ? GM_UPUT(gm, x, y, b) : 0)
-#define GM_BGET(gm, x, y) GM_UGET(gm, gm_bound(x, gm->w), gm_bound(y, gm->h))
+#define GM_BGET(gm, x, y) ((gm)->w == 0 || (gm)->h == 0 ? 0 : GM_UGET(gm, gm_bound(x, (gm)->w), gm_bound(y, (gm)->h)))
/* modes for cutting off out-of-range values. The following names
refer to winding numbers. I.e., make a pixel black if winding
Added: trunk/Build/source/libs/potrace/potrace-src/src/include/getopt/getopt.h
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/src/include/getopt/getopt.h (rev 0)
+++ trunk/Build/source/libs/potrace/potrace-src/src/include/getopt/getopt.h 2017-08-07 09:40:46 UTC (rev 44972)
@@ -0,0 +1,180 @@
+/* Declarations for getopt.
+ Copyright (C) 1989,90,91,92,93,94,96,97,98,99 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+#ifndef _GETOPT_H
+
+#ifndef __need_getopt
+# define _GETOPT_H 1
+#endif
+
+/* If __GNU_LIBRARY__ is not already defined, either we are being used
+ standalone, or this is the first header included in the source file.
+ If we are being used with glibc, we need to include <features.h>, but
+ that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
+ not defined, include <ctype.h>, which will pull in <features.h> for us
+ if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
+ doesn't flood the namespace with stuff the way some other headers do.) */
+#if !defined __GNU_LIBRARY__
+# include <ctype.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* For communication from `getopt' to the caller.
+ When `getopt' finds an option that takes an argument,
+ the argument value is returned here.
+ Also, when `ordering' is RETURN_IN_ORDER,
+ each non-option ARGV-element is returned here. */
+
+extern char *optarg;
+
+/* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+ and for communication between successive calls to `getopt'.
+
+ On entry to `getopt', zero means this is the first call; initialize.
+
+ When `getopt' returns -1, this is the index of the first of the
+ non-option elements that the caller should itself scan.
+
+ Otherwise, `optind' communicates from one call to the next
+ how much of ARGV has been scanned so far. */
+
+extern int optind;
+
+/* Callers store zero here to inhibit the error message `getopt' prints
+ for unrecognized options. */
+
+extern int opterr;
+
+/* Set to an option character which was unrecognized. */
+
+extern int optopt;
+
+#ifndef __need_getopt
+/* Describe the long-named options requested by the application.
+ The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
+ of `struct option' terminated by an element containing a name which is
+ zero.
+
+ The field `has_arg' is:
+ no_argument (or 0) if the option does not take an argument,
+ required_argument (or 1) if the option requires an argument,
+ optional_argument (or 2) if the option takes an optional argument.
+
+ If the field `flag' is not NULL, it points to a variable that is set
+ to the value given in the field `val' when the option is found, but
+ left unchanged if the option is not found.
+
+ To have a long-named option do something other than set an `int' to
+ a compiled-in constant, such as set a value from `optarg', set the
+ option's `flag' field to zero and its `val' field to a nonzero
+ value (the equivalent single-letter option character, if there is
+ one). For long options that have a zero `flag' field, `getopt'
+ returns the contents of the `val' field. */
+
+struct option
+{
+# if defined __STDC__ && __STDC__
+ const char *name;
+# else
+ char *name;
+# endif
+ /* has_arg can't be an enum because some compilers complain about
+ type mismatches in all the code that assumes it is an int. */
+ int has_arg;
+ int *flag;
+ int val;
+};
+
+/* Names for the values of the `has_arg' field of `struct option'. */
+
+# define no_argument 0
+# define required_argument 1
+# define optional_argument 2
+#endif /* need getopt */
+
+
+/* Get definitions and prototypes for functions to process the
+ arguments in ARGV (ARGC of them, minus the program name) for
+ options given in OPTS.
+
+ Return the option character from OPTS just read. Return -1 when
+ there are no more options. For unrecognized options, or options
+ missing arguments, `optopt' is set to the option letter, and '?' is
+ returned.
+
+ The OPTS string is a list of characters which are recognized option
+ letters, optionally followed by colons, specifying that that letter
+ takes an argument, to be placed in `optarg'.
+
+ If a letter in OPTS is followed by two colons, its argument is
+ optional. This behavior is specific to the GNU `getopt'.
+
+ The argument `--' causes premature termination of argument
+ scanning, explicitly telling `getopt' that there are no more
+ options.
+
+ If OPTS begins with `--', then non-option arguments are treated as
+ arguments to the option '\0'. This behavior is specific to the GNU
+ `getopt'. */
+
+#if defined __STDC__ && __STDC__
+# ifdef __GNU_LIBRARY__
+/* Many other libraries have conflicting prototypes for getopt, with
+ differences in the consts, in stdlib.h. To avoid compilation
+ errors, only prototype getopt for the GNU C library. */
+extern int getopt (int argc, char *const *argv, const char *shortopts);
+# else /* not __GNU_LIBRARY__ */
+extern int getopt ();
+# endif /* __GNU_LIBRARY__ */
+
+# ifndef __need_getopt
+extern int getopt_long (int argc, char *const *argv, const char *shortopts,
+ const struct option *longopts, int *longind);
+extern int getopt_long_only (int argc, char *const *argv,
+ const char *shortopts,
+ const struct option *longopts, int *longind);
+
+/* Internal only. Users should not call this directly. */
+extern int _getopt_internal (int argc, char *const *argv,
+ const char *shortopts,
+ const struct option *longopts, int *longind,
+ int long_only);
+# endif
+#else /* not __STDC__ */
+extern int getopt ();
+# ifndef __need_getopt
+extern int getopt_long ();
+extern int getopt_long_only ();
+
+extern int _getopt_internal ();
+# endif
+#endif /* __STDC__ */
+
+#ifdef __cplusplus
+}
+#endif
+
+/* Make sure we later can get all the definitions and declarations. */
+#undef __need_getopt
+
+#endif /* getopt.h */
Property changes on: trunk/Build/source/libs/potrace/potrace-src/src/include/getopt/getopt.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Modified: trunk/Build/source/libs/potrace/potrace-src/src/main.c
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/src/main.c 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/potrace-src/src/main.c 2017-08-07 09:40:46 UTC (rev 44972)
@@ -2,8 +2,14 @@
This file is part of Potrace. It is free software and it is covered
by the GNU General Public License. See the file COPYING for details. */
-#define _XOPEN_SOURCE 500
+#ifndef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200809L
+#endif
+#ifndef _NETBSD_SOURCE
+#define _NETBSD_SOURCE 1
+#endif
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -101,12 +107,12 @@
typedef struct backend_s backend_t;
static backend_t backend[] = {
+ { "svg", ".svg", 0, 0, 0, NULL, page_svg, NULL, 1 },
+ { "pdf", ".pdf", 0, 0, 1, init_pdf, page_pdf, term_pdf, 1 },
+ { "pdfpage", ".pdf", 1, 0, 1, init_pdf, page_pdfpage, term_pdf, 1 },
{ "eps", ".eps", 0, 0, 0, NULL, page_eps, NULL, 1 },
{ "postscript", ".ps", 1, 0, 1, init_ps, page_ps, term_ps, 1 },
{ "ps", ".ps", 1, 0, 1, init_ps, page_ps, term_ps, 1 },
- { "pdf", ".pdf", 0, 0, 1, init_pdf, page_pdf, term_pdf, 1 },
- { "pdfpage", ".pdf", 1, 0, 1, init_pdf, page_pdfpage, term_pdf, 1 },
- { "svg", ".svg", 0, 0, 0, NULL, page_svg, NULL, 1 },
{ "dxf", ".dxf", 0, 1, 0, NULL, page_dxf, NULL, 1 },
{ "geojson", ".json",0, 1, 0, NULL, page_geojson, NULL, 1 },
{ "pgm", ".pgm", 0, 1, 1, NULL, page_pgm, NULL, 1 },
@@ -203,12 +209,12 @@
fprintf(f, " -- - end of options; 0 or more input filenames follow\n");
fprintf(f, "Backend selection:\n");
fprintf(f, " -b, --backend <name> - select backend by name\n");
- fprintf(f, " -e, --eps - EPS backend (encapsulated PostScript) (default)\n");
- fprintf(f, " -p, --postscript - PostScript backend\n");
- fprintf(f, " -s, --svg - SVG backend (scalable vector graphics)\n");
- fprintf(f, " -g, --pgm - PGM backend (portable greymap)\n");
+ fprintf(f, " -b svg, -s, --svg - SVG backend (scalable vector graphics)\n");
fprintf(f, " -b pdf - PDF backend (portable document format)\n");
fprintf(f, " -b pdfpage - fixed page-size PDF backend\n");
+ fprintf(f, " -b eps, -e, --eps - EPS backend (encapsulated PostScript) (default)\n");
+ fprintf(f, " -b ps, -p, --postscript - PostScript backend\n");
+ fprintf(f, " -b pgm, -g, --pgm - PGM backend (portable greymap)\n");
fprintf(f, " -b dxf - DXF backend (drawing interchange format)\n");
fprintf(f, " -b geojson - GeoJSON backend\n");
fprintf(f, " -b gimppath - Gimppath backend (GNU Gimp)\n");
@@ -613,8 +619,8 @@
}
parse_dimensions(optarg, &p, &dimx, &dimy);
if (*p == 0) {
- info.paperwidth = (int)rint(double_of_dim(dimx, DEFAULT_DIM));
- info.paperheight = (int)rint(double_of_dim(dimy, DEFAULT_DIM));
+ info.paperwidth = (int)round(double_of_dim(dimx, DEFAULT_DIM));
+ info.paperheight = (int)round(double_of_dim(dimy, DEFAULT_DIM));
break;
}
if (matches == 0) {
Modified: trunk/Build/source/libs/potrace/potrace-src/src/mkbitmap.c
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/src/mkbitmap.c 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/potrace-src/src/mkbitmap.c 2017-08-07 09:40:46 UTC (rev 44972)
@@ -7,8 +7,14 @@
filter (evening out background gradients), lowpass filter
(smoothing foreground details), interpolated scaling, inversion. */
-#define _XOPEN_SOURCE 500
+#ifndef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200809L
+#endif
+#ifndef _NETBSD_SOURCE
+#define _NETBSD_SOURCE 1
+#endif
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -332,9 +338,9 @@
v += window[k][i] * poly[l][i];
}
if (bilevel) {
- BM_UPUT(bm_out, x*s+l, y*s+k, v < c1);
+ BM_PUT(bm_out, x*s+l, y*s+k, v < c1);
} else {
- GM_UPUT(gm_out, x*s+l, y*s+k, v);
+ GM_PUT(gm_out, x*s+l, y*s+k, v);
}
}
}
Modified: trunk/Build/source/libs/potrace/potrace-src/src/potracelib.h
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/src/potracelib.h 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/potrace-src/src/potracelib.h 2017-08-07 09:40:46 UTC (rev 44972)
@@ -121,7 +121,7 @@
/* free parameter set */
void potrace_param_free(potrace_param_t *p);
-/* trace a bitmap*/
+/* trace a bitmap */
potrace_state_t *potrace_trace(const potrace_param_t *param,
const potrace_bitmap_t *bm);
Modified: trunk/Build/source/libs/potrace/potrace-src/src/trace.c
===================================================================
--- trunk/Build/source/libs/potrace/potrace-src/src/trace.c 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/potrace-src/src/trace.c 2017-08-07 09:40:46 UTC (rev 44972)
@@ -282,9 +282,9 @@
y = pp->pt[i].y - pp->y0;
pp->sums[i+1].x = pp->sums[i].x + x;
pp->sums[i+1].y = pp->sums[i].y + y;
- pp->sums[i+1].x2 = pp->sums[i].x2 + x*x;
- pp->sums[i+1].xy = pp->sums[i].xy + x*y;
- pp->sums[i+1].y2 = pp->sums[i].y2 + y*y;
+ pp->sums[i+1].x2 = pp->sums[i].x2 + (double)x*x;
+ pp->sums[i+1].xy = pp->sums[i].xy + (double)x*y;
+ pp->sums[i+1].y2 = pp->sums[i].y2 + (double)y*y;
}
return 0;
Modified: trunk/Build/source/libs/potrace/version.ac
===================================================================
--- trunk/Build/source/libs/potrace/version.ac 2017-08-07 01:56:14 UTC (rev 44971)
+++ trunk/Build/source/libs/potrace/version.ac 2017-08-07 09:40:46 UTC (rev 44972)
@@ -8,4 +8,4 @@
dnl --------------------------------------------------------
dnl
dnl m4-include this file to define the current potrace version
-m4_define([potrace_version], [1.14])
+m4_define([potrace_version], [1.15])
More information about the tex-live-commits
mailing list