delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/12/14/12:40:48

X-Spam-Check-By: sourceware.org
X-Authenticated: #1350826
Date: Thu, 14 Dec 2006 18:40:18 +0100 (CET)
From: =?iso-8859-15?Q?Franz_H=E4uslschmid?= <lukrez AT gmx DOT at>
To: cygwin AT cygwin DOT com
Subject: EPS import for XFig
Message-ID: <alpine.DEB.0.81.0612141836250.4640@pan.haeuslsc.org>
MIME-Version: 1.0
X-Y-GMX-Trusted: 0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Hello,

[Sorry for being careless and posting this recently to the patches
 list.]

There is a problem with XFig as soon as more than one EPS should
be imported as figure object.  The problem has been addressed
earlier:

  <http://article.gmane.org/gmane.os.cygwin.xfree/14757>

  <http://thread.gmane.org/gmane.os.cygwin/40818>

and finally

  <http://article.gmane.org/gmane.os.cygwin/69899>

An inspection of XFig's source code revealed that a call to
`unlink' in order to remove a temporary bitmap preview of the EPS
to include delays the actual deletion.  The bitmap preview for
subsequent EPS files would go to a temporary file always having
the same name.  As the deletion of the first preview is pending
(which means that the preview file is still there, without any
file permissions observable by Windows Explorer), subsequent
previews having the same file name can't be created and the
import into the editor view fails.

The cause for the delay of the deletion is, that there is still a
`FILE' object in memory that references that file.  The patch
forces the file to be closed as soon as it isn't needed any more.

Regards,
Franz.

2006-12-10  Franz Haeuslschmid  <lukrez AT gmx DOT at>

	    * f_readeps.c (bitmap_from_gs): Ensures that all FILE
	      objects
	      referring to the temporary bitmap preview are
	      closed before the
	      preview file is unlinked.

--- f_readeps.c.orig  2005-10-05 11:17:05.985950000 +0200
+++ f_readeps.c	      2005-10-05 11:19:29.095325000 +0200
@@ -407,6 +407,7 @@ Boolean
         ht = pic->pic_cache->size_y;
         pcxfile = open_picfile(pixnam, &filtyp, PIPEOK,
         tmpfile);
         status = _read_pcx(pcxfile, pic);
+        fclose(pcxfile);
         /* restore width/height */
         pic->pic_cache->size_x = wid;
         pic->pic_cache->size_y = ht;





--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019