From 31734fdd6e6b306c1ad1cb712e28dabe5ebbfbaa Mon Sep 17 00:00:00 2001 From: Christian Schenk Date: Sun, 7 Apr 2019 18:19:11 +0200 Subject: [PATCH] TL sync --- .../windows-x64/miktex-dvipng-bin-x64.tpm.in | 4 +- .../TPM/windows-x86/miktex-dvipng-bin.tpm.in | 4 +- CHANGELOG.md | 3 +- Programs/DviWare/dvipng/CMakeLists.txt | 6 +- Programs/DviWare/dvipng/source/dvipng.c | 6 +- Programs/DviWare/dvipng/source/misc.c | 69 ++++++++----------- Programs/DviWare/dvipng/source/special.c | 9 ++- 7 files changed, 46 insertions(+), 55 deletions(-) diff --git a/Admin/TPM/windows-x64/miktex-dvipng-bin-x64.tpm.in b/Admin/TPM/windows-x64/miktex-dvipng-bin-x64.tpm.in index 8751d9e88..4cc18806a 100644 --- a/Admin/TPM/windows-x64/miktex-dvipng-bin-x64.tpm.in +++ b/Admin/TPM/windows-x64/miktex-dvipng-bin-x64.tpm.in @@ -4,9 +4,9 @@ Dvipng win64 DVI-to-PNG Converter, Windows x64 - + - 1.15 + 1.16 windows-x64 @MIKTEX_DATETIME_STR@ diff --git a/Admin/TPM/windows-x86/miktex-dvipng-bin.tpm.in b/Admin/TPM/windows-x86/miktex-dvipng-bin.tpm.in index 0c24bc698..fc662b153 100644 --- a/Admin/TPM/windows-x86/miktex-dvipng-bin.tpm.in +++ b/Admin/TPM/windows-x86/miktex-dvipng-bin.tpm.in @@ -4,9 +4,9 @@ Dvipng win32 DVI-to-PNG Converter, Windows x86 - + - 1.15 + 1.16 windows-x86 @MIKTEX_DATETIME_STR@ diff --git a/CHANGELOG.md b/CHANGELOG.md index f21ba5f4e..f75e3f1f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,11 @@ # MiKTeX Change Log -## 2.9.7000 - 2019-04-07 +## 2.9.7000 - 2019-04-08 ### Upgraded programs * dvipdfmx 20190225 +* dvipng 1.16 * dvips 5.999 * dvisvgm 2.6.3 * Gregorio 5.2.0 diff --git a/Programs/DviWare/dvipng/CMakeLists.txt b/Programs/DviWare/dvipng/CMakeLists.txt index 8830c54b5..3a41310a8 100644 --- a/Programs/DviWare/dvipng/CMakeLists.txt +++ b/Programs/DviWare/dvipng/CMakeLists.txt @@ -1,6 +1,6 @@ ## CMakeLists.txt -*- CMake -*- ## -## Copyright (C) 2006-2017 Christian Schenk +## Copyright (C) 2006-2019 Christian Schenk ## ## This file is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published @@ -40,8 +40,8 @@ set(HAVE_LIBZ) set(HAVE_PNG_H 1) set(PACKAGE_NAME "dvipng") -set(PACKAGE_STRING "dvipng 1.15") -set(PACKAGE_VERSION "1.15") +set(PACKAGE_STRING "dvipng 1.16") +set(PACKAGE_VERSION "1.16") configure_file( config.h.cmake diff --git a/Programs/DviWare/dvipng/source/dvipng.c b/Programs/DviWare/dvipng/source/dvipng.c index 6af3599e0..ca88586bc 100644 --- a/Programs/DviWare/dvipng/source/dvipng.c +++ b/Programs/DviWare/dvipng/source/dvipng.c @@ -83,10 +83,8 @@ int main(int argc, char ** argv) kpse_set_program_enabled (kpse_pk_format, makeTexPK, kpse_src_compile); #endif -#if !defined(MIKTEX) -#ifdef WIN32 - texlive_gs_init (); -#endif +#ifdef HAVE_TEXLIVE_GS_INIT + texlive_gs_init(); #endif initcolor(); diff --git a/Programs/DviWare/dvipng/source/misc.c b/Programs/DviWare/dvipng/source/misc.c index e04df7ef6..d540991b1 100644 --- a/Programs/DviWare/dvipng/source/misc.c +++ b/Programs/DviWare/dvipng/source/misc.c @@ -18,15 +18,13 @@ License along with this program. If not, see . - Copyright (C) 2002-2015 Jan-Åke Larsson + Copyright (C) 2002-2015, 2019 Jan-Åke Larsson ************************************************************************/ #include "dvipng.h" #ifdef HAVE_LIBGEN_H # include -#else -#define basename xbasename #endif #include /* open/close */ #ifdef HAVE_MMAP @@ -34,6 +32,15 @@ #endif #include +#if defined _WIN32 && !defined __CYGWIN__ && !defined __CYGWIN32__ + /* Use Windows separators on all _WIN32 defining + environments, except Cygwin. */ +# define DIR_SEPARATOR_CHAR '\\' +#endif +#ifndef DIR_SEPARATOR_CHAR +# define DIR_SEPARATOR_CHAR '/' +#endif /* !DIR_SEPARATOR_CHAR */ + static char *programname; /*-->DecodeArgs*/ @@ -47,43 +54,25 @@ bool DecodeArgs(int argc, char ** argv) int32_t number; /* Temporary storage for numeric parameter */ char *dviname=NULL; /* Name of dvi file */ char *outname=NULL; /* Name of output file */ - char *base; /* basename of argv[0] */ -#ifdef HAVE_LIBKPATHSEA - /* we certainly don't want to modify argv[0]. */ - programname = xstrdup (argv[0] ? argv[0] : PACKAGE_NAME); -# ifdef HAVE_KPSE_PROGRAM_BASENAME - base = kpse_program_basename (programname); -# else - base = xstrdup (xbasename (programname)); - { - char *dot = strrchr (base, '.'); - if (dot && FILESTRCASEEQ (dot, ".exe")) - *dot = 0; - } -# endif -#else - /* we certainly don't want to modify argv[0]. */ - programname = strdup (argv[0] ? argv[0] : PACKAGE_NAME); - base = strrchr (programname, '/'); - if (base) - base++; - else - base = programname; -#endif + programname=PACKAGE_NAME; + if (argv[0]) { #ifdef HAVE_GDIMAGEGIF -# ifdef HAVE_LIBKPATHSEA - if (FILESTRCASEEQ (base, "dvigif")) -# else - if (strncmp(programname,"dvigif",6)==0) -# endif - option_flags |= GIF_OUTPUT; + programname=strrchr(argv[0],DIR_SEPARATOR_CHAR); + if (programname!=NULL) + programname++; + else + programname=argv[0]; + if (strncasecmp(programname,"dvigif",6)==0) + option_flags |= GIF_OUTPUT; #endif + programname=argv[0]; + } Message(BE_NONQUIET,"This is %s",programname); - if (strcmp(base,PACKAGE_NAME)!=0) + if (option_flags & GIF_OUTPUT) Message(BE_NONQUIET," (%s)", PACKAGE_NAME); - Message(BE_NONQUIET," %s Copyright 2002-2015 Jan-Ake Larsson\n", - PACKAGE_VERSION); + Message(BE_NONQUIET," %s Copyright 2002-2015, 2019 Jan-Ake Larsson\n", + PACKAGE_VERSION); for (i=1; i #else /* WIN32 */ -#undef pipe +#include +#include +#include +#ifndef pipe #define pipe(p) _pipe(p, 65536, O_BINARY | _O_NOINHERIT) +#endif +#ifndef snprintf +#define snprintf _snprintf +#endif #endif /* WIN32 */ #endif