summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dvipdfm-x/ChangeLog7
-rwxr-xr-xBuild/source/texk/dvipdfm-x/configure22
-rw-r--r--Build/source/texk/dvipdfm-x/configure.ac2
-rw-r--r--Build/source/texk/dvipdfm-x/spc_dvips.c101
4 files changed, 93 insertions, 39 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog
index 1890579ac02..1610c0c4884 100644
--- a/Build/source/texk/dvipdfm-x/ChangeLog
+++ b/Build/source/texk/dvipdfm-x/ChangeLog
@@ -1,3 +1,10 @@
+2021-11-17 Akira Kakuto <kakuto@jcom.zaq.ne.jp>
+
+ * spc_dvips.c: Realize PSTricks on XeTeX without -dNOSAFER,
+ in the way described in
+ https://tug.org/pipermail/dvipdfmx/2021-November/000308.html
+ * configure.ac: version 20211117.
+
2021-11-12 Karl Berry <karl@freefriends.org>
* dvipdfmx.c (show_usage): mention -i.
diff --git a/Build/source/texk/dvipdfm-x/configure b/Build/source/texk/dvipdfm-x/configure
index 51c21ffa652..1a91b4f0b24 100755
--- a/Build/source/texk/dvipdfm-x/configure
+++ b/Build/source/texk/dvipdfm-x/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for dvipdfm-x (TeX Live) 20211029.
+# Generated by GNU Autoconf 2.71 for dvipdfm-x (TeX Live) 20211117.
#
# Report bugs to <dvipdfmx@tug.org>.
#
@@ -629,8 +629,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='dvipdfm-x (TeX Live)'
PACKAGE_TARNAME='dvipdfm-x--tex-live-'
-PACKAGE_VERSION='20211029'
-PACKAGE_STRING='dvipdfm-x (TeX Live) 20211029'
+PACKAGE_VERSION='20211117'
+PACKAGE_STRING='dvipdfm-x (TeX Live) 20211117'
PACKAGE_BUGREPORT='dvipdfmx@tug.org'
PACKAGE_URL=''
@@ -1395,7 +1395,7 @@ if test "$ac_init_help" = "long"; then
# 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 dvipdfm-x (TeX Live) 20211029 to adapt to many kinds of systems.
+\`configure' configures dvipdfm-x (TeX Live) 20211117 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1467,7 +1467,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20211029:";;
+ short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20211117:";;
esac
cat <<\_ACEOF
@@ -1597,7 +1597,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-dvipdfm-x (TeX Live) configure 20211029
+dvipdfm-x (TeX Live) configure 20211117
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2353,7 +2353,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by dvipdfm-x (TeX Live) $as_me 20211029, which was
+It was created by dvipdfm-x (TeX Live) $as_me 20211117, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -8675,7 +8675,7 @@ fi
# Define the identity of the package.
PACKAGE='dvipdfm-x--tex-live-'
- VERSION='20211029'
+ VERSION='20211117'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -15480,7 +15480,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-dvipdfm-x (TeX Live) config.lt 20211029
+dvipdfm-x (TeX Live) config.lt 20211117
configured by $0, generated by GNU Autoconf 2.71.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -17392,7 +17392,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by dvipdfm-x (TeX Live) $as_me 20211029, which was
+This file was extended by dvipdfm-x (TeX Live) $as_me 20211117, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -17464,7 +17464,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-dvipdfm-x (TeX Live) config.status 20211029
+dvipdfm-x (TeX Live) config.status 20211117
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/texk/dvipdfm-x/configure.ac b/Build/source/texk/dvipdfm-x/configure.ac
index abdf1c09af7..8704cc45c52 100644
--- a/Build/source/texk/dvipdfm-x/configure.ac
+++ b/Build/source/texk/dvipdfm-x/configure.ac
@@ -8,7 +8,7 @@ dnl This file is free software; the copyright holder
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
-AC_INIT([dvipdfm-x (TeX Live)], [20211029], [dvipdfmx@tug.org])
+AC_INIT([dvipdfm-x (TeX Live)], [20211117], [dvipdfmx@tug.org])
AC_PREREQ([2.65])
AC_CONFIG_SRCDIR([agl.c])
AC_CONFIG_AUX_DIR([../../build-aux])
diff --git a/Build/source/texk/dvipdfm-x/spc_dvips.c b/Build/source/texk/dvipdfm-x/spc_dvips.c
index 8090d2664d4..c06b40a5255 100644
--- a/Build/source/texk/dvipdfm-x/spc_dvips.c
+++ b/Build/source/texk/dvipdfm-x/spc_dvips.c
@@ -1,6 +1,6 @@
/* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
- Copyright (C) 2002-2020 by Jin-Hwan Cho and Shunsaku Hirata,
+ Copyright (C) 2002-2021 by Jin-Hwan Cho and Shunsaku Hirata,
the dvipdfmx project team.
Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu>
@@ -527,12 +527,12 @@ check_next_obj(const unsigned char * buffer)
static int
spc_handler_ps_tricks_parse_path (struct spc_env *spe, struct spc_arg *args)
{
- FILE* fp;
+ FILE* fp; FILE* fi;
int k;
pdf_tmatrix M;
char *gs_out;
const char *clip;
- int error;
+ int error, c;
if (!distiller_template)
distiller_template = get_distiller_template();
@@ -545,13 +545,26 @@ spc_handler_ps_tricks_parse_path (struct spc_env *spe, struct spc_arg *args)
return -1;
}
fp = fopen(gs_in, "wb");
- for (k = 0; k < num_ps_headers; k++)
- fprintf(fp, "(%s) run\n", ps_headers[k]);
+ for (k = 0; k < num_ps_headers; k++) {
+ fi = fopen(ps_headers[k], "rb");
+ while((c = getc(fi)) != EOF)
+ putc(c, fp);
+ putc('\n', fp);
+ fclose(fi);
+ }
fprintf(fp, "[%f %f %f %f %f %f] concat %f %f translate 0 0 moveto\n", M.a, M.b, M.c, M.d, M.e, M.f, spe->x_user, spe->y_user);
- fprintf(fp, "(%s) run\n", global_defs);
- if (page_defs != 0)
- fprintf(fp, "(%s) run\n", page_defs);
-
+ fi = fopen(global_defs, "rb");
+ while((c = getc(fi)) != EOF)
+ putc(c, fp);
+ putc('\n', fp);
+ fclose(fi);
+ if (page_defs != 0) {
+ fi = fopen(page_defs, "rb");
+ while((c = getc(fi)) != EOF)
+ putc(c, fp);
+ putc('\n', fp);
+ fclose(fi);
+ }
#if 0
fprintf(fp, "/clip {stroke} def\n");
fwrite(args->curptr, 1, args->endptr - args->curptr, fp);
@@ -631,8 +644,8 @@ spc_handler_ps_tricks_parse_path (struct spc_env *spe, struct spc_arg *args)
static int
spc_handler_ps_tricks_render (struct spc_env *spe, struct spc_arg *args)
{
- FILE *fp;
- int k;
+ FILE *fp, *fi;
+ int k, c;
pdf_tmatrix M;
load_options options = {1, 0, NULL};
@@ -647,12 +660,26 @@ spc_handler_ps_tricks_render (struct spc_env *spe, struct spc_arg *args)
return -1;
}
fp = fopen(gs_in, "wb");
- for (k = 0; k < num_ps_headers; k++)
- fprintf(fp, "(%s) run\n", ps_headers[k]);
+ for (k = 0; k < num_ps_headers; k++) {
+ fi = fopen(ps_headers[k], "rb");
+ while((c = getc(fi)) != EOF)
+ putc(c, fp);
+ putc('\n', fp);
+ fclose(fi);
+ }
fprintf(fp, "[%f %f %f %f %f %f] concat %f %f translate 0 0 moveto\n", M.a, M.b, M.c, M.d, M.e, M.f, spe->x_user, spe->y_user);
- fprintf(fp, "(%s) run\n", global_defs);
- if (page_defs != 0)
- fprintf(fp, "(%s) run\n", page_defs);
+ fi = fopen(global_defs, "rb");
+ while((c = getc(fi)) != EOF)
+ putc(c, fp);
+ putc('\n', fp);
+ fclose(fi);
+ if (page_defs != 0) {
+ fi = fopen(page_defs, "rb");
+ while ((c = getc(fi)) != EOF)
+ putc(c, fp);
+ putc('\n', fp);
+ fclose(fi);
+ }
} else
fp = fopen(gs_in, "ab");
@@ -1017,11 +1044,11 @@ spc_dvips_setup_handler (struct spc_handler *handle,
}
#ifdef __EMX__
-#define GS_CALCULATOR "gsos2 -q -dALLOWPSTRANSPARENCY -dDELAYSAFER -dNOPAUSE -dBATCH -sDEVICE=nullpage -f "
+#define GS_CALCULATOR "gsos2 -q -dALLOWPSTRANSPARENCY -dNOPAUSE -dBATCH -sDEVICE=nullpage -f "
#elif defined(WIN32)
-#define GS_CALCULATOR "rungs -q -dALLOWPSTRANSPARENCY -dDELAYSAFER -dNOPAUSE -dBATCH -sDEVICE=nullpage -f "
+#define GS_CALCULATOR "rungs -q -dALLOWPSTRANSPARENCY -dNOPAUSE -dBATCH -sDEVICE=nullpage -f "
#else
-#define GS_CALCULATOR "gs -q -dALLOWPSTRANSPARENCY -dDELAYSAFER -dNOPAUSE -dBATCH -sDEVICE=nullpage -f "
+#define GS_CALCULATOR "gs -q -dALLOWPSTRANSPARENCY -dNOPAUSE -dBATCH -sDEVICE=nullpage -f "
#endif
static
@@ -1029,7 +1056,8 @@ int calculate_PS (char *strptr, int length, double *res1, double *res2, double *
char *formula, *cmd;
FILE *fp, *coord;
int k;
-
+ FILE *fi;
+ int c;
if (res1 == 0 && res2 == 0)
return -1;
formula = dpx_create_temp_file();
@@ -1039,14 +1067,33 @@ int calculate_PS (char *strptr, int length, double *res1, double *res2, double *
}
fp = fopen(formula, "wb");
- for (k = 0; k < num_ps_headers; k++)
- fprintf(fp, "(%s) run\n", ps_headers[k]);
+ for (k = 0; k < num_ps_headers; k++) {
+ fi = fopen(ps_headers[k], "rb");
+ while((c = getc(fi)) != EOF)
+ putc(c, fp);
+ putc('\n', fp);
+ fclose(fi);
+ }
fprintf(fp, "0 0 moveto\n");
- fprintf(fp, "(%s) run\n", global_defs);
- if (page_defs != 0)
- fprintf(fp, "(%s) run\n", page_defs);
- if (temporary_defs)
- fprintf(fp, "(%s) run\n", temporary_defs);
+ fi = fopen(global_defs, "rb");
+ while((c = getc(fi)) != EOF)
+ putc(c, fp);
+ putc('\n', fp);
+ fclose(fi);
+ if (page_defs != 0) {
+ fi = fopen(page_defs, "rb");
+ while((c = getc(fi)) != EOF)
+ putc(c, fp);
+ putc('\n', fp);
+ fclose(fi);
+ }
+ if (temporary_defs) {
+ fi = fopen(temporary_defs, "rb");
+ while ((c = getc(fi)) != EOF)
+ putc(c, fp);
+ putc('\n', fp);
+ fclose(fi);
+ }
fwrite(strptr, 1, length, fp);
fclose(fp);
#ifdef MIKTEX