Bug 97137

Summary: [MAINTAINER] www/mimetex: fix size mismatch
Product: Ports & Packages Reporter: Nicola Vitale <nivit>
Component: Individual Port(s)Assignee: Aaron Dalton <aaron>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
mimetex-1.60_1.patch none

Description Nicola Vitale 2006-05-11 14:50:22 UTC
- Fix size mismatch

Generated with FreeBSD Port Tools 0.75
Comment 1 Aaron Dalton freebsd_committer freebsd_triage 2006-05-11 14:58:05 UTC
Responsible Changed
From-To: freebsd-ports-bugs->aaron

I'll take it.
Comment 2 Aaron Dalton freebsd_committer freebsd_triage 2006-05-11 22:21:12 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 3 Aaron Dalton freebsd_committer freebsd_triage 2006-05-18 18:48:10 UTC
Mi dispiace Nicola ma ho fato un errore commettendo questo "patch" senza 
cercare piu` degli informazioni.  Perche' e` cambiata la firma del 
"tarball"?  Puoi fornirci un "diff"?  Grazie per il tuo tempo.

Ciao!
-- 
Aaron Dalton
aaron@FreeBSD.org
FreeBSD Ports Committer
Comment 4 Nicola Vitale 2006-05-19 20:49:07 UTC
Ciao,

> [Aaron Dalton, 2006-05-18T11:48:10+00:00]
> [...]  Perche' e` cambiata la firma del "tarball"?  Puoi fornirci un "diff"?

Certamente. L'autore ha modificato leggermente il codice (non la funzionalità
del programma) senza incrementare il numero di versione.

Ecco la diff (mimetex.9b201b0e36d83b2713caa9048958be82 è il vecchio "tarball"):


diff -ruN mimetex.9b201b0e36d83b2713caa9048958be82/mimetex.c mimetex.8182dc0ec2401c31eba5f723afa3e8e5/mimetex.c
--- mimetex.9b201b0e36d83b2713caa9048958be82/mimetex.c	Sat Feb  4 09:49:00 2006
+++ mimetex.8182dc0ec2401c31eba5f723afa3e8e5/mimetex.c	Fri Feb 24 15:20:00 2006
@@ -2890,7 +2890,7 @@
 int	irow=0, jcol=0;		/*height(row), width(col) indexes in raster*/
 int	pixmin=9999, pixmax=(-9999), /* min, max pixel value in raster */
 	ngray = 0;		/* #gray scale values */
-FILE	*fopen(), *fp=NULL;	/* pointer to output file (or NULL) */
+FILE	/* *fopen(), */ *fp=NULL; /* pointer to output file (or NULL) */
 char	outline[1024], outfield[256], /* output line, field */
 	cr[16] = "\n\000";	/* cr at end-of-line */
 int	maxlinelen = 70;	/* maximum allowed line length */
@@ -7509,7 +7509,9 @@
   case DOTACCENT: case DDOTACCENT:
     accheight = (size<4? 3:4);		/* default for dots */
     break;
-  case HATACCENT: case VECACCENT:
+  case VECACCENT:
+    vspace = 1;				/* set 1-pixel vertical space */
+  case HATACCENT:
     accheight = 7;			/* default */
     if ( subwidth < 10 ) accheight = 5;	/* unless small width */
       else if ( subwidth > 25 ) accheight = 9; /* or large */
@@ -11946,11 +11948,14 @@
     { fprintf(msgfp,"main> created gifSize=%d\n", gifSize);
       fflush(msgfp); }
   /* --- may need to emit image from cached file or from memory --- */
-  if ( isquery || msglevel >= 99 )	/* have an actual query string */
+  if ( isquery				/* have an actual query string */
+  ||   isdumpimage			/* or dumping image */
+  ||   msglevel >= 99 ) {		/* or debugging */
+  int maxage2 = (isdumpimage?(-1):maxage); /* no headers if dumping image */
    if ( iscaching )			/* caching enabled */
-     emitcache(cachefile,maxage,0);	/* cached image (hopefully) emitted*/
+     emitcache(cachefile,maxage2,0);	/* cached image (hopefully) emitted*/
    else if ( isinmemory )		/* or emit image from memory buffer*/
-     emitcache(gif_buffer,maxage,1);	/* emitted from memory buffer */
+     emitcache(gif_buffer,maxage2,1); }	/* emitted from memory buffer */
   /* --- for testing, may need to write image buffer to file --- */
   if ( isdumpbuffer > 99 )		/* gif image in memory buffer */
    if ( gifSize > 0 )			/* and it's not an empty buffer */