From d3507c95db29f3c6502627edee0a10ca5bbd27a8 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Sat, 29 Nov 2014 15:09:44 +0000 Subject: texk/dvipdfm-x: Revert git-svn-id: svn://tug.org/texlive/trunk@35694 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/dvipdfm-x/spc_dvips.c | 37 ++++----------------------------- 1 file changed, 4 insertions(+), 33 deletions(-) (limited to 'Build/source/texk/dvipdfm-x/spc_dvips.c') diff --git a/Build/source/texk/dvipdfm-x/spc_dvips.c b/Build/source/texk/dvipdfm-x/spc_dvips.c index df628d78761..e12a7276125 100644 --- a/Build/source/texk/dvipdfm-x/spc_dvips.c +++ b/Build/source/texk/dvipdfm-x/spc_dvips.c @@ -283,7 +283,6 @@ static char *global_defs = 0; static char *page_defs = 0; static char *temporary_defs = 0; static char *distiller_template = 0; -static char *pstricks_template = 0; static pdf_coord *put_stack; static int put_stack_depth = -1; static char *gs_in = 0; @@ -536,21 +535,8 @@ spc_handler_ps_tricks_parse_path (struct spc_env *spe, struct spc_arg *args) const char *clip; int error; - if (!distiller_template) { - char *p; + if (!distiller_template) distiller_template = get_distiller_template(); - pstricks_template = xmalloc (strlen (distiller_template) + 14); - p = strstr (distiller_template, "-dEPSCrop"); - if (p) { - memcpy (pstricks_template, distiller_template, p - distiller_template); - pstricks_template[p - distiller_template] = '\0'; - strcat (pstricks_template, "-sPAPERSIZE=a0"); - p += 9; - strcat (pstricks_template, p); - } else { - strcpy (pstricks_template, distiller_template); - } - } pdf_dev_currentmatrix(&M); if (!gs_in) { @@ -617,7 +603,7 @@ spc_handler_ps_tricks_parse_path (struct spc_env *spe, struct spc_arg *args) fprintf(fp, " showpage\n"); fclose(fp); - error = dpx_file_apply_filter(pstricks_template, gs_in, gs_out, + error = dpx_file_apply_filter(distiller_template, gs_in, gs_out, (unsigned char) pdf_get_version()); if (error) { WARN("Image format conversion for PSTricks failed."); @@ -650,21 +636,8 @@ spc_handler_ps_tricks_render (struct spc_env *spe, struct spc_arg *args) int k; pdf_tmatrix M; - if (!distiller_template) { - char *p; + if (!distiller_template) distiller_template = get_distiller_template(); - pstricks_template = xmalloc (strlen(distiller_template) + 14); - p = strstr (distiller_template, "-dEPSCrop"); - if(p) { - memcpy (pstricks_template, distiller_template, p - distiller_template); - pstricks_template[p - distiller_template] = '\0'; - strcat (pstricks_template, "-sPAPERSIZE=a0"); - p += 9; - strcat (pstricks_template, p); - } else { - strcpy (pstricks_template, distiller_template); - } - } pdf_dev_currentmatrix(&M); if (!gs_in) { @@ -724,7 +697,7 @@ spc_handler_ps_tricks_render (struct spc_env *spe, struct spc_arg *args) fprintf(fp, " showpage\n"); fclose(fp); - error = dpx_file_apply_filter(pstricks_template, gs_in, gs_out, + error = dpx_file_apply_filter(distiller_template, gs_in, gs_out, (unsigned char) pdf_get_version()); if (error) { WARN("Image format conversion for PSTricks failed."); @@ -934,8 +907,6 @@ spc_dvips_at_end_document (void) } dpx_delete_temp_file(global_defs, true); dpx_delete_temp_file(page_defs, true); - if (pstricks_template) - RELEASE(pstricks_template); return 0; } -- cgit v1.2.3