.
OBS-URL: https://build.opensuse.org/package/show/graphics/xfig?expand=0&rev=19
This commit is contained in:
parent
d52ca9bbdc
commit
e0c463ef37
@ -1,12 +1,13 @@
|
|||||||
--- f_readeps.c
|
--- f_readeps.c
|
||||||
+++ f_readeps.c 2010-12-01 14:26:05.884195851 +0000
|
+++ f_readeps.c 2011-06-17 12:46:08.519926308 +0000
|
||||||
@@ -252,11 +252,12 @@ bitmap_from_gs(file, filetype, pic, urx,
|
@@ -252,11 +252,12 @@ bitmap_from_gs(file, filetype, pic, urx,
|
||||||
{
|
{
|
||||||
char buf[300];
|
char buf[300];
|
||||||
FILE *tmpfp, *pixfile, *gsfile;
|
FILE *tmpfp, *pixfile, *gsfile;
|
||||||
- char *psnam, *driver;
|
- char *psnam, *driver;
|
||||||
|
- int status, wid, ht, nbitmap, fd;
|
||||||
+ char *driver;
|
+ char *driver;
|
||||||
int status, wid, ht, nbitmap, fd;
|
+ int status, wid, ht, nbitmap, fd, len;
|
||||||
char tmpfile[PATH_MAX],
|
char tmpfile[PATH_MAX],
|
||||||
pixnam[PATH_MAX],
|
pixnam[PATH_MAX],
|
||||||
errnam[PATH_MAX],
|
errnam[PATH_MAX],
|
||||||
@ -14,7 +15,7 @@
|
|||||||
gscom[2 * PATH_MAX];
|
gscom[2 * PATH_MAX];
|
||||||
|
|
||||||
wid = urx - llx;
|
wid = urx - llx;
|
||||||
@@ -307,19 +308,22 @@ bitmap_from_gs(file, filetype, pic, urx,
|
@@ -307,19 +308,26 @@ bitmap_from_gs(file, filetype, pic, urx,
|
||||||
/* for color, use pcx */
|
/* for color, use pcx */
|
||||||
driver = "pcx256";
|
driver = "pcx256";
|
||||||
}
|
}
|
||||||
@ -31,7 +32,7 @@
|
|||||||
+ if (!realpath(tmpfile, psnam)) {
|
+ if (!realpath(tmpfile, psnam)) {
|
||||||
+ file_msg("Cannot canonicalize %s: %s\n", tmpfile, strerror(errno));
|
+ file_msg("Cannot canonicalize %s: %s\n", tmpfile, strerror(errno));
|
||||||
+ return False;
|
+ return False;
|
||||||
}
|
+ }
|
||||||
+ /* From Language.htm of ghostscript 9.00 and higher:
|
+ /* From Language.htm of ghostscript 9.00 and higher:
|
||||||
+ * If Ghostscript is started with -dNOSAFER or -dDELAYSAFER, this operator can
|
+ * If Ghostscript is started with -dNOSAFER or -dDELAYSAFER, this operator can
|
||||||
+ * be used to enter SAFER mode with the current set of PermitFile... user
|
+ * be used to enter SAFER mode with the current set of PermitFile... user
|
||||||
@ -40,11 +41,16 @@
|
|||||||
+ * for file Reading, Writing and/or Control can use this operator to perform
|
+ * for file Reading, Writing and/or Control can use this operator to perform
|
||||||
+ * the locking needed to enter SAFER mode.
|
+ * the locking needed to enter SAFER mode.
|
||||||
+ */
|
+ */
|
||||||
sprintf(&gscom[strlen(gscom)],
|
+ len = snprintf(gscom, sizeof(gscom) - 1,
|
||||||
- "%s -r72x72 -dSAFER -sDEVICE=%s -g%dx%d -sOutputFile=%s -q - > %s 2>&1",
|
|
||||||
- appres.ghostscript, driver, wid, ht, pixnam, errnam);
|
|
||||||
+ "%s -r72x72 -sDEVICE=%s -g%dx%d -dDELAYSAFER -sOutputFile=%s -c '<</PermitFileReading[(%s)]>> setuserparams .locksafe' -q - > %s 2>&1",
|
+ "%s -r72x72 -sDEVICE=%s -g%dx%d -dDELAYSAFER -sOutputFile=%s -c '<</PermitFileReading[(%s)]>> setuserparams .locksafe' -q - > %s 2>&1",
|
||||||
+ appres.ghostscript, driver, wid, ht, pixnam, psnam, errnam);
|
+ appres.ghostscript, driver, wid, ht, pixnam, psnam, errnam);
|
||||||
|
+ if (len >= sizeof(gscom) - 1 || len < 0) {
|
||||||
|
+ file_msg("Cannot write to buffer, file name to large: %s\n", psnam);
|
||||||
|
+ return False;
|
||||||
|
}
|
||||||
|
- sprintf(&gscom[strlen(gscom)],
|
||||||
|
- "%s -r72x72 -dSAFER -sDEVICE=%s -g%dx%d -sOutputFile=%s -q - > %s 2>&1",
|
||||||
|
- appres.ghostscript, driver, wid, ht, pixnam, errnam);
|
||||||
if (appres.DEBUG)
|
if (appres.DEBUG)
|
||||||
fprintf(stderr,"calling: %s\n",gscom);
|
fprintf(stderr,"calling: %s\n",gscom);
|
||||||
if ((gsfile = popen(gscom, "w")) == 0) {
|
if ((gsfile = popen(gscom, "w")) == 0) {
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jun 17 15:07:40 CEST 2011 - werner@suse.de
|
||||||
|
|
||||||
|
- Fix broken append mode for eps/ps import (bnc#696368)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Dec 3 15:23:11 CET 2010 - werner@suse.de
|
Fri Dec 3 15:23:11 CET 2010 - werner@suse.de
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ Provides: xfig.3.2.3d
|
|||||||
Requires: transfig netpbm ghostscript-fonts-std
|
Requires: transfig netpbm ghostscript-fonts-std
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Version: 3.2.5b
|
Version: 3.2.5b
|
||||||
Release: 9
|
Release: 10
|
||||||
Summary: Facility for Interactive Generation of Figures under the X Window System
|
Summary: Facility for Interactive Generation of Figures under the X Window System
|
||||||
Url: http://www.xfig.org/
|
Url: http://www.xfig.org/
|
||||||
Source: xfig.%{version}.tar.bz2
|
Source: xfig.%{version}.tar.bz2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user