Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Feb 2000 14:52:18 -0800 (PST)
From:      jabrown@caida.org
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/16896: dvipdfm port bugs and patches
Message-ID:  <200002212252.OAA90039@stimpy.nlanr.net>

next in thread | raw e-mail | index | archive | help

>Number:         16896
>Category:       ports
>Synopsis:       dvipdfm port chokes on some figures [PATCH INCLUDED]
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 21 15:00:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Jeff Brown
>Release:        FreeBSD 3.3-RELEASE i386
>Organization:
>Environment:

3.3-R system with an up-to-date ports tree; dvipdfm-0.12.7 and teTeX-1.0.6 
ports.

>Description:

Two problems:

1) dvipdfm choked on the figures in my TeX document, reporting that it
couldn't find " jabs-random-figure.eps" -- note the leading space.  It
appears that one function is missing a call to the
whitespace-remover-o-matic.

2) once #1 was fixed, dvipdfm cored on a figure produced by tgif; it turns out
that dvipdfm was mis-identifying it as MetaPost postscript since the third
line, "%%Title: graph1:", is shorter than the string "%%Creator: MetaPost",
which was tripping up the comparison routine.



>How-To-Repeat:

Write a LaTeX document with an EPS figure made from tgif, and embedded with
the "\psfig{figure=...}" command.  Try dvipdfm on it.

>Fix:
	
To fix #1:

--- psspecial.c.orig    Mon Feb 21 14:00:47 2000
+++ psspecial.c Mon Feb 21 14:01:19 2000
@@ -192,6 +192,7 @@
 {
   char *filename;
   struct xform_info *p;
+  skip_white (start, end);
   if (*start < end && (filename = parse_ident (start, end))) {
 
     p = texfig_info ();


To fix #2:

--- mpost.c.orig        Mon Feb 21 14:11:49 2000
+++ mpost.c     Mon Feb 21 14:14:56 2000
@@ -49,12 +49,10 @@
   if (strncmp (work_buffer, "%!PS", 4))
     return 0;
   mfgets (work_buffer, WORK_BUFFER_SIZE, image_file);
-  if (strlen(work_buffer)>=strlen("%%BoundingBox") &&
-      strncmp (work_buffer, "%%BoundingBox", strlen("%%BoundingBox")))
+  if (strncmp (work_buffer, "%%BoundingBox", strlen("%%BoundingBox")))
     return 0;
   mfgets (work_buffer, WORK_BUFFER_SIZE, image_file);
-  if (strlen(work_buffer) >= strlen("%%Creator: MetaPost") &&
-      strncmp (work_buffer, "%%Creator: MetaPost", strlen("%%Creator: MetaPost")))
+  if (strncmp (work_buffer, "%%Creator: MetaPost", strlen("%%Creator: MetaPost")))
     return 0;
   return 1;
 }


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200002212252.OAA90039>